{"version":3,"sources":["api/withAuth.ts","models/TypeOfRepresentative.ts","models/Address.ts","models/Group.ts","models/Position.ts","models/Contact.ts","models/Workplace.ts","models/Department.ts","utils/format.ts","models/Member.ts","models/Profile.ts","api/profile/profile.ts","theme/palette.ts","assets/icons/ChevronDownFill.tsx","assets/icons/CloseSolid.tsx","assets/icons/Heart.tsx","assets/icons/PersonSearch.tsx","assets/icons/AddContact.tsx","assets/icons/Aftalearkiv.tsx","assets/icons/BookmarkFill.tsx","assets/icons/Calendar.tsx","assets/icons/Check.tsx","assets/icons/CheckFill.tsx","assets/icons/ChevronLeft.tsx","assets/icons/ChevronRight.tsx","assets/icons/Close.tsx","assets/icons/ContactFill.tsx","assets/icons/ContactLedger.tsx","assets/icons/Delete.tsx","assets/icons/DeleteFill.tsx","assets/icons/Edit.tsx","assets/icons/EditFill.tsx","assets/icons/EmailFill.tsx","assets/icons/Envelop.tsx","assets/icons/FlagFill.tsx","assets/icons/Foa.tsx","assets/icons/HandshakeFill.tsx","assets/icons/Help.tsx","assets/icons/Info.tsx","assets/icons/Kontigenter.tsx","assets/icons/LinkFill.tsx","assets/icons/LockFill.tsx","assets/icons/Materialer.tsx","assets/icons/Medlemsfordele.tsx","assets/icons/MessageFill.tsx","assets/icons/Note.tsx","assets/icons/Notes.tsx","assets/icons/Ok.tsx","assets/icons/Organiseringsprocent.tsx","assets/icons/PersonalInfo.tsx","assets/icons/PhotoFill.tsx","assets/icons/PinFill.tsx","assets/icons/Plus.tsx","assets/icons/Priority.tsx","assets/icons/Question.tsx","assets/icons/RatingStar.tsx","assets/icons/SearchPerson.tsx","assets/icons/Search.tsx","assets/icons/SendFill.tsx","assets/icons/SendToMany.tsx","assets/icons/Settings.tsx","assets/icons/StarYellow.tsx","assets/icons/Star.tsx","assets/icons/StarFill.tsx","assets/icons/SuitcaseFill.tsx","assets/icons/Tips.tsx","components/ui/Dialog/Dialog.tsx","components/ui/Typography/Typography.tsx","theme/breakpoints.ts","components/ui/Button/Button.tsx","store/auth/index.ts","components/ui/FormElememts/Select.tsx","api/departments/index.ts","components/ui/FormElememts/Input.tsx","hooks/useWindowSize.ts","components/ui/Card/Card.tsx","components/ui/Card/CardList.tsx","components/ui/Card/CardMobile.tsx","components/ui/Card/CardHeader.tsx","components/ui/Card/CardContentMobile.tsx","components/ui/Card/CardCell.tsx","components/ui/Circle/styles.ts","components/ui/Circle/Circle.tsx","components/ui/SortButton/index.tsx","utils/initials.ts","models/Filter.ts","utils/filterhelper.ts","api/members/members.ts","utils/sortHelper.ts","utils/searchHelper.ts","store/lokalise/lokaliseAtom.ts","components/ui/Loaders/Spinner.tsx","components/providers/Lokalise.tsx","utils/utils.ts","store/filter/filterAtom.ts","hooks/useSortMembersList.ts","theme/layout.ts","theme/reuseables.ts","components/ui/FormElememts/FormControl.tsx","components/modules/Imitator/index.tsx","api/misc/index.ts","utils/Auth0.tsx","theme/zIndex.ts","theme/index.ts","theme/sizes.ts","components/Layout/index.tsx","components/modules/Imitator/ImitatorNoAccessWarning.tsx","components/ui/TabbedMenu/index.tsx","components/Navigation/Menu/Menu.tsx","utils/Logout.ts","components/ui/Navbar/NavbarDesktop.tsx","api/Interceptor.tsx","components/Example/index.tsx","components/ui/Badge/Badge.tsx","components/ui/Favorite/index.tsx","api/favorite/index.ts","components/ui/NoteButton/index.tsx","components/ui/Accordion/Accordion.tsx","components/ui/FormElememts/Checkbox.tsx","components/pages/Members/Checkboxes.tsx","components/ui/Sidebar/index.tsx","components/pages/Members/Filter.tsx","components/modules/Filter/FiltersSummary.tsx","components/ui/FormElememts/stories/Input.stories.tsx","components/ui/SearchField/SearchField.tsx","components/ui/FormElememts/RadioButton.tsx","components/modules/GotoMembrsearchModal/index.tsx","components/modules/SignupMemberModal/index.tsx","components/modules/Headerlinks/index.tsx","components/pages/Members/index.tsx","components/ui/FormElememts/TextArea.tsx","components/modules/FormElements/FormInput.tsx","components/ui/Card/CardWithIconAndMessge.tsx","components/ui/FormElememts/DatePicker.tsx","components/ui/FormElememts/FormMessage.tsx","components/pages/AllMembers/index.tsx","api/updates/index.ts","models/UpdateBatch.ts","components/modules/FormElements/DrawerHeader.tsx","components/ui/FormElememts/FormHeader.tsx","components/modules/Updates/UpdateDetails.tsx","components/pages/Updates/index.tsx","api/notes/index.ts","models/Note.ts","components/modules/notes/AddNewNote.tsx","components/modules/notes/EditNote.tsx","components/modules/notes/EditMemberNoteButton.tsx","components/modules/notes/NoteSidebarCard.tsx","components/modules/notes/NoteOverviewSidebar.tsx","components/modules/notes/EditWorkplaceNotes.tsx","components/pages/Workplaces/WorkplaceCardCell.tsx","components/pages/Workplaces/index.tsx","components/ui/Card/CardColumn.tsx","components/ui/Card/CardColumnContainer.tsx","components/modules/EditMyProfile/index.tsx","components/ui/PercentLevel/PercentLevel.tsx","assets/img/gmapsBgImage.png","components/ui/GmapsLink/GmapsLink.tsx","components/modules/WorkplaceDropdown/index.tsx","components/pages/MyProfile/index.tsx","components/modules/EditMemberProfile/index.tsx","components/modules/CancelWorkplace/index.tsx","components/modules/AddMemberToWorkplace/index.tsx","components/ui/BackLink/index.tsx","components/modules/notes/EditMemberNotes.tsx","components/pages/MemberProfile/index.tsx","components/modules/AddMemberToOwnList/index.tsx","components/pages/MemberProfileFromSearch/index.tsx","components/modules/FirstLoginModal/FirstLoginModal.tsx","components/ui/Footer/Footer.tsx","components/modules/notes/EditNoteFromPage.tsx","components/pages/MyNotes/NotePage.tsx","components/ui/ScrollToTopButton/ScrollToTopButton.tsx","components/pages/Organization/index.tsx","RoleBasedRoutes.tsx","App.tsx","reportWebVitals.ts","index.tsx"],"names":["oidcSettings","process","baseURL","getBaseURL","userData","localStorage","getItem","upn","token","base64","split","replace","jsonPayload","decodeURIComponent","window","atob","map","c","charCodeAt","toString","slice","join","JSON","parse","parseJwt","access_token","axiosWithAuth","axios","create","doRefreshToken","a","defaults","headers","common","post","qs","stringify","grant_type","redirect_uri","client_id","refresh_token","response","user","data","updatedUserDate","setItem","clear","location","href","interceptors","request","use","config","localUser","Authorization","error","Promise","reject","status","axiosWithImitator","profile","isImitator","apiProfile","myProfileId","params","newConfig","currentBaseURL","TypeOfRepresentative","isActive","name","shortName","sort","type","showLongName","electedDate","alternateRepresentativeList","undefined","supplementedOfDutyType","pos","ErAktiv","KortNavn","Navn","Sorteringsorden","Type","VisLangtNavnIOversigt","Genvalgsdato","SupplererMedlemsidentList","SuppleresAfHvervsType","SuppleresHvervsType","mapTypeOfRepresentatives","build","Address","id","addressLine1","addressLine2","addressLine3","postDistrict","postNumber","address","Adresselinie1","Adresselinie2","Adresselinie3","Postdistrikt","Postnummer","Group","group","Nummer","Position","number","numbers","department","Faggruppe","Arbejdsstedsnumre","mapPositions","position","Contact","email","telephone","telephoneShow","mobile","mobileShow","isTelefonPrivate","contactInfoType","workPlacesContact","contact","Email","ErTelefonerHemmelige","KontaktoplysningerType","Telefon","TelefonVis","Mobil","MobilVis","KontaktoplysningerForArbejdssted","Workplace","mapContacts","isPrimaryWorkplace","okGroup","postionNumber","typeOfRepresentatives","hoursPerWeek","positions","numberOfNotes","trMemberList","numberOfMembers","searchable_name","searchable_address","mapWorkplaces","workplace","workPlace","Adresse","ErPrimaertArbejdssted","ArbejdsstedType","OKGruppe","Stillingsnummer","Timetal","Tillidshverv","Stillinger","AntalNoter","TRTillidshvervMedlemLister","length","forEach","item","Medlemsidenter","Array","from","Set","getNumberOfMembers","Department","registrationDate","Indmeldelsesdato","Date","formatDate","date","getDate","getMonth","getFullYear","formatPhoneNumber","defaultGapSize","result","cloned","gap_size","substring","Member","workPlaces","allWorkPlaces","isFavorite","memberId","firstName","lastName","fullName","memberNumber","birthday","age","isOwnMember","primaryWorkPlace","profilePicture","content","mimeType","contactInfoList","privateContact","workContact","membershipInfo","searchable_fullName","searchable_workPlace","searchable_birthDay","searchable_age","mapMembers","member","Arbejdssteder","ErFavorit","OpdaterStatus","Medlemsident","Medlemsnummer","Fornavn","Efternavn","FuldeNavn","Afdeling","ErEgetMedlem","ProfilBillede","Content","Alder","KontaktoplysningerList","find","FoedselsDato","wpNumbers","wpNumber","wp","w","findMyWorkplaces","found","wordPlace","findPrimaryWorkPlace","Profile","roles","personalInfo","birthdate","totalNumberOfPeopleUserCovers","numberFoaMemberUserCovers","trForSelf","trForOthers","myProfile","TotalAntalKollegaerBrugerDaekker","AntalFoaMedlemmerBrugerDaekker","MimeType","BrugerSuppleantForTillidshvervMedlemmer","TillidhvervMedlemmerSuppleantForBruger","initialValue","getProfile","get","getProfileSupportInfo","updateProfile","values","getProfileByIdent","ident","getMemberForImitating","departmentNumber","profileAtom","atom","idAtom","getProfileAtom","atomWithQuery","queryKey","queryFn","colors","green","white","gray","black","borderColorLight","borderColor","labelColor","green200","green400","green500","green600","red100","red500","red600","orange500","orange600","gray500","gray600","gray700","gray800","gray900","blue300","errorBg","palette","link","foreground","background","navBackgroundColor","backgroundOpaque","primary","secondary","buttonPrimary","creme","CTAhover","SvgChevronDownFill","title","titleId","props","viewBox","fill","xmlns","opacity","fillRule","clipRule","d","stroke","strokeWidth","strokeLinecap","strokeLinejoin","SvgCloseSolid","SvgHeart","SvgPersonSearch","cx","cy","r","SvgAddContact","SvgAftalearkiv","SvgBookmarkFill","SvgCalendar","SvgCheck","SvgCheckFill","SvgChevronLeft","SvgChevronRight","SvgClose","SvgContactFill","SvgContactLedger","SvgDelete","SvgDeleteFill","SvgEdit","SvgEditFill","SvgEmailFill","SvgEnvelop","SvgFlagFill","SvgFoa","SvgHandshakeFill","SvgHelp","SvgInfo","SvgKontigenter","SvgLinkFill","SvgLockFill","SvgMaterialer","SvgMedlemsfordele","SvgMessageFill","SvgNote","SvgNotes","SvgOk","SvgOrganiseringsprocent","SvgPersonalInfo","SvgPhotoFill","SvgPinFill","SvgPlus","SvgPriority","className","SvgQuestion","SvgRatingStar","SvgSearchPerson","SvgSearch","SvgSendFill","SvgSendToMany","SvgSettings","transform","SvgStarYellow","SvgStar","SvgStarFill","SvgSuitcaseFill","SvgTips","useStyles","createUseStyles","top","to","overlayContainer","left","width","height","zIndex","container","backgroundColor","borderRadius","boxShadow","maxWidth","maxHeight","padding","animation","AnimationEffect","pointerEvents","display","flexDirection","alignItems","textAlign","paddingTop","overlay","inset","button","right","margin","boxSizing","textDecoration","fontWeight","transition","cursor","border","circleIcon","iconBGColor","iconBorder","justifyContent","marginRight","defaultProps","description","trigger","defaultOpen","hideClose","icon","Dialog","children","theme","useTheme","classes","onOpenChange","open","documentWidth","document","documentElement","clientWidth","scrollBarWidth","innerWidth","body","style","overflow","paddingRight","classList","add","handleIsOpen","remove","asChild","Close","sizes","XXXS","XXS","XS","S","M","L","XL","XXL","XXXL","XXXXL","text","fontSize","size","weight","fontStyle","lineHeight","suggested","getLineheight","color","align","Typography","tag","Tag","spacing","breakpoints","Desktop","BUTTON_CONTAINER","minHeight","composes","outline","outlineOffset","Button","ref","onClick","disabled","buttonType","ButtonLink","target","isAuthenticatedAtom","chooseImitatorAtom","authRoles","wrap","select","paddingLeft","outlineColor","hasValue","transitionDuration","label","Select","React","forwardRef","options","onChange","defaultValue","placeholder","isOpen","useControlled","hasError","useState","query","setQuery","useEffect","value","e","hidden","htmlFor","getDepartments","Afdelinger","input","isDatePicker","span","lock","Input","required","useDisabled","setError","autoComplete","LockFill","useFloats","InputNumber","event","newValue","modified","useWindowResize","innerHeight","windowSize","setWindowSize","onResize","resizeHandler","throttle","addEventListener","removeEventListener","row","gridTemplateColumns","wrapper","marginBottom","withHover","Card","url","useHover","showFooter","footer","tabIndex","role","onKeyDown","CardList","CardMobile","header","cellStyles","headerCell","CardHeader","CardHeaderCell","CardContentMobile","flexBasis","containerOpen","overflowHidden","CardCell","cirleIconStyles","iconContainer","borderWidth","withBorder","aspectRatio","styles","circle","customRight","mWidth","image","objectFit","iconWidth","Circle","CircleText","CircleIcon","CircleIcon2","CircleImage","src","alt","marginLeft","SortButton","property","direction","ChevronRight","getInitials","nameString","shift","charAt","pop","toUpperCase","FilterWorkplace","FilterWorkGroup","workGroup","FilterPosition","obj","FilterTypeOfRepresentative","FilterTRFor","memberIds","displayName","initialFilter","workplaces","groups","typeOfRepresentative","representing","updateStatus","initialSelectedFilters","initFilter","filter","UdsoegteArbejdssteder","UdsoegteFaggrupper","UdsoegteStillinger","UdsoegteTillidshverv","trust","trfor","updateWorkplaces","selectedItems","selected","isFound","some","indexOf","findIndex","splice","push","updatePositions","updateTypeOfRepresentatives","p","updateTRFor","duty","trFors","t","updateUpdateStatus","statuses","s","updateGroups","membersAtom","members","Medlemmer","searchMembers","queryString","getOwnMember","getMemberAfterSearch","updateOwnMember","addMemberToOwnList","addMemberToWorkplace","cancelMemberFromWorkplace","getMemberWorkPlaces","ArbejdsstedTRHvervMedlemLister","compareName","objectA","objectB","sorter","sortByNoteDate","notes","b","updated","getTime","compareAge","compareWorkplaces","toLowerCase","compareStatus","compareNotes","compareIsRead","isRead","compareNumberOfMembersOnWorkplace","compareIsOwnMember","compareDepartments","sortUpdatesBy","updates","sorted","sorted1","sorted2","created","sortByUpdateCreatedDate","compareMemberOnUpdateName","compareProfileOnUpdateName","sortByUpdateUpdatedDate","reverse","sortNotesBy","sortedNotes","n","isNotRead","sortNotesByDateAndIsRead","sortByNoteFavorite","sortBy","sortedMembers","sortByDate","filterByValue","array","includes","searchables","include","o","Object","keys","k","Math","abs","projectId","getLokaliseDataFromApi","base","translations","val","key_name","web","trans","key_id","translation","loader","Spinner","setLokalise","getLokalise","key","lData","L_HTML","replacements","manipulated","identifier","dangerouslySetInnerHTML","__html","Lokalise","initialized","setInitialized","initFallback","myData","init","timeout","setTimeout","clearTimeout","getUpdateTypeLabel","getUpdateStatusLabel","filterAtom","filterSelected","sortedAtom","sortLock","searchAtom","searchNoteAtom","searchWorkplaceAtom","searchMembersAtom","showOnlyFavorites","allNotes","allWorkplaces","allUpdates","allUpdatesDone","allUpdatesInProgress","searchPageAtom","filteredItems","workplacesPageAtom","sortedWorkplaces","search","sortWorkplacesBy","updatePageAtom","all","sortedUpdates","updatePageDoneAtom","updatePageInProgressAtom","notePageAtom","filteredAtom","items","favoritesOnly","filtered","trFor","m","mem","filterTRforHelper","element","filterWorkplaces","workgroups","filterWorkgroups","filterPositions","pots","pot","filterTypeOfRepresentative","filterUpdateStatus","filterItems","Map","useSortMembersList","useAtom","setSortedAtom","setLock","sortState","setSortState","setSort","useContainerStyles","baseButton","sortPlaceholder","control","FormControl","headerArea","formArea","gap","topArea","borderBottom","headerActions","flexShrink","form","linkButton","textDecorationLine","subArea","messageWrapper","marginTop","selectContainer","selectTrigger","selectContent","hr","Imitator","authProfile","_set","_setDepartmentNumber","_setName","suggestions","_setSuggestions","setOptions","loading","setLoading","_setIsAuthenticated","layout","setAuthRoles","splitted","birthDay","Rolle","getDeps","RolleListe","depResponse","opt","chooseImitator","getWorkplacesAndPositions","userIsActiveInApp","Auth0","isAuthenticated","setIsAuthenticated","setProfile","setChooseImitator","_setLoading","_setRoles","periodicCheckInitiated","setPeriodicCheckInitiated","errorMessage","setErrorMessage","intiatePeriodicCheck","setInterval","validateImitator","profileData","authP","imitatorInStorage","setAlreadyAuthenticated","BrugerMedlemsident","Message","activeProfile","getToken","code","code_verifier","console","log","id_token","roleList","history","replaceState","pathname","checkUser","URLSearchParams","sessionStorage","signIn","generateCodeChallenge","codeVerifier","encoder","TextEncoder","encode","crypto","subtle","digest","base64Digest","base64encode","randomString","then","challenge","qParams","logoutURL","zIndexes","topNavigation","drawer","index","navbarDesktopHeight","Layout","ImitatorNoAccessWarning","show","onClose","SendFill","menu","listStyle","flexWrap","flexGrow","TabItem","showImitatorModal","setShowImitatorModal","preventDefault","TabbedMenu","links","Menu","linksToUse","logout","keep","desktopOnly","inner","brandIcon","containerLogin","profileLink","greenText","containerProfilePicture","logo","helpContainer","NavbarDesktop","_setProfile","Foa","Aftalearkiv","rel","Heart","querySelector","scrollTo","getBoundingClientRect","behavior","scrollToFooter","Help","localProfileData","REDIRECT_TO_FOA_CODES","Interceptor","apiError","setApiError","errorStatusCode","setErrorStatusCode","interceptorId","eject","Example","Badge","star","useOnClick","bottom","Favorite","active","StarFill","RatingStar","setFavorite","removeFavorite","delete","note","noteText","NoteButton","accordion","fontFamily","flex","close","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","paddingBottom","formControl","contentWrapper","Accordion","ChevronDownFill","reversed","isChecked","borderLeft","Checkbox","checked","Checkboxes","handleChange","isSelected","visibility","medium","large","xlarge","Overlay","isShowing","hide","node","useRef","handleClickOutside","current","contains","onKeyPressed","ReactDOM","createPortal","getElementById","accordionWrapper","filterBottom","borderTop","Filter","setSelectedItems","setSelected","setIsOpen","Settings","onUpdateTRFor","onUpdateStatus","pills","pillStyles","pill","closeIcon","Pill","FilterSummary","g","onUpdateGroups","onUpdateTypeOfRepresentatives","onUpdatePositions","onUpdateWorkplaces","tr","onUpdateTrFor","onUpdateUpdateStatus","ifAny","args","borderTopColor","borderBottomColor","borderRightColor","searchButton","borderRight","typeSearch","minWidth","SearchField","searchButtonLabel","autoFocus","onSearch","Search","innerContainer","groupLabel","RadioButtons","labels","activeValue","modalButtons","modalCheckbox","GotoMembrsearchModal","showAgain","setShowAgain","hideMemberDialog","setHideMemberDialog","navigate","useNavigate","localData","AddContact","linkArea","SignupMemberModal","HeaderLinks","showGotoMembrsearchModal","headerAreaTop","sendingEmailSettings","dialogButtonsContainer","iconWrapper","searchField","Members","update","setFilter","setSearchAtom","isSendingView","setIsSendingView","isEmailSentView","setIsEmailSentView","AllChosen","setAllChosen","emailType","setEmailType","chosenMembers","setChosenMembers","mailingList","setMailingList","showDialog","setShowDialog","invalidEmailsList","setInvalidEmailsList","setShowOnlyFavorites","setFilterSelected","useSearchParams","searchParams","firstTimeSendingEmail","setfirstTimeSendingEmail","showFirstTimeModal","setHowFirstTimeShowModal","FIRST_TIME_EMAIL_KEY","copy","onClickFavorite","callback","handleSendingEmailView","v","checkValids","useCallback","isValid","invalidEmails","mailingListRaw","validEmail","mailingListString","navigator","platform","userAgent","confirmSendingEmail","SendToMany","Star","RadioButton","currentTarget","String","ml","idx","stopPropagation","toLocaleLowerCase","textarea","resize","count","TextArea","maxCount","setCount","containerRef","autoResize","scrollHeight","rows","cols","onFocus","maxLength","FormInput","register","rules","FormSelect","FormInputNumber","FormTextArea","message","CardWithIconAndMessge","datepickerWrapper","datepicker","DatePickerComponent","maxDate","minDate","disableCalendar","setBirthdate","showPicker","setShowPicker","setHasValue","asText","moment","format","calendarIcon","Calendar","dayPlaceholder","monthPlaceholder","yearPlaceholder","clearIcon","FormMessage","AllMembers","useForm","reset","handleSubmit","setValue","formState","getValues","selectedDate","_setSelectedDate","setResult","setIsValid","inputReference","isDirty","valid","fuldeNavn","foedselsesdato","telefon","afdelingsnummer","searchMembersApi","start","performance","now","duration","focus","setSelectedDate","toDateString","setDepartmentNumber","errors","PersonSearch","onSubmit","subtract","toDate","minLength","validate","trim","getAllUpdates","UpdateBatch","batchId","mapUpdates","BatchId","OpdateringType","RegTid","BehandlingTid","Medlem","Bruger","OpdateringBatchStatus","DrawerContent","DrawerHeaderMemberInfo","DrawerHeaderWorkplaceInfo","FormHeader","getLabel","fieldName","WebkitLineClamp","WebkitBoxOrient","textOverflow","deleteButtons","sidebarArea","oldName","UpdateDetailsSidebarContent","updateDetails","sortingArr","OpdateringFelter","OpdateringFeltType","field","NyVaerdiNavn","GlVaerdiNavn","dateString","nowYear","prototype","call","Number","isNaN","renderDate","FraDato","OphoertDato","OevrigeOplysninger","castAsMember","memberOnUpdate","DetailsOverlay","onHide","isFetching","setIsFetching","setUpdateDetails","place","fetch","response2","UpdateDetails","showUpdatedColumn","boolean","updateList","numberOfUpdate","customIcon","gridTemplateColumnsUpdated","Updates","showDone","setAllUpdates","today","targetDate","setDate","resZero","mapped","OpdateringBatches","fetchData","antal","getMemberNotes","getAllNotes","addNewNote","updateNote","updateNoteIsArchived","deleteNote","Note","referenceId","referenceType","archived","searchable_title","searchable_content","searchable_member","ReferenceId","Indhold","Titel","ReferenceType","NoteId","OpdaterTid","OpretTid","ReferenceNavn","ErLaest","mapNotes","AddNewNote","onUpdated","onClickCancel","hasNotes","dirtyFields","fieldsToEdit","datePlaceholder","EditNote","onCancel","EditMemberNoteButton","onClickCreate","onClickView","firstNoteLabel","Plus","card","actions","titleOpen","whiteSpace","contentOpen","NoteSidebarCard","onClickEdit","onClickDelete","showDelete","setShowDelete","readMore","setReadMore","isMore","setIsMore","contentRef","titleRef","checkLines","lines","getComputedStyle","getPropertyValue","round","parseFloat","wordBreak","prev","DeleteFill","EditFill","createNote","NoteOverviewSidebar","buttons","addNote","noteButton","EditWorkplaceNotes","setNotes","viewState","setViewState","editNote","setEditNote","notesMapped","Noter","numnerOfNotes","noteContent","googleLink","showMembers","contentMobile","WorkplaceCardCell","allMembers","membersForWorkplace","setMembersForWorkplace","setOpen","wpMembersIdents","wpMembers","onClickMapLink","PinFill","Workplaces","setAllWorkplaces","membersData","res","column","titleContainer","rowContainer","CardColumn","titleIcon","titleLabel","hideTitle","mailToLinkIcon","useContent","gridGap","CardColumnContainer","EditMyProfile","KontaktTR","err","Edit","ContactLedger","svgContainer","percentage","PercentCircle","progress","setProgress","useInView","inView","radius","circumference","PI","dash","strokeOpacity","strokeDasharray","end","gmapsContainer","gmapsImage","gmapsButton","GmapsLink","customedGmapsUrl","GmapsImage","dropdownIcon","dropdownItem","dropdownItems","check","WorkplaceDropdown","selectedWorkplace","setSelectedWorkplace","beforContent","afterContent","showHo","getPositionName","getGroupName","SuitcaseFill","ChevronLeft","Check","buildRow","profileHeader","nameContainer","edit","section","editIconWrapper","alignContent","confirmButtons","MyProfile","tors","percentageShowEdit","setPercentageShowEdit","percentageEditValue","setPercentageEditValue","percentageOfMembersCovered","setPercentageOfMembersCovered","calcPercentageCovered","calcPercentageCoveredInEditMode","getDuties","duties","tor","getTypeOfRepresentativeRows","names","tfo","getSuppleantNamesForTR","PersonalInfo","getMembershipInfoRows","noShowMessage","Envelop","getContactInfoRows","CheckFill","getSuppleantForTRRows","ProcentDaekker","EditMemberProfile","setPositions","setWorkplaces","setCustomErrors","selectedPostion","setSelectedPosition","formRef","setWP","wpp","wco","wc","getPositions","positionssss","setAttribute","resetForm","Aendringsdato","Arbejdsstednummer","KontaktPrivat","OpdaterFunktionMobil","OpdaterFunktionEmail","KontaktArbejde","OpdaterFunktionTelefon","Info","CancelWorkplace","setAddInfo","work","submitHandler","resolve","AddMemberToWorkplace","onCallSubstitute","setOnCallSubstitute","customErrors","noValidate","BackLink","EditMemberNotes","buildEmailRow","showModal","editButton","MemberProfile","useParams","_setData","backurl","setbackUrl","buildTOR","AddMemberToOwnList","MemberProfileFromSearch","birthYear","getPersonalInfoRows","getWorkInfo","containerBG","headline","headlines","leftText","list","listItem","listItemBold","listItemSpan","video","primaryButton","FirstLoginInfo","showVideo","setClose","setIsShowing","loginData","loginJson","isMoreThanSixMonths","diff","agreed","frameBorder","scrolling","allowFullScreen","allow","Tips","closeInfo","contactLink","videoLink","Footer","info","setInfo","setShowVideo","col1","setCol1","getInfo","firstColumn","EditNoteFromPage","_setMember","setMember","findMember","noteContentOpen","readIcon","ClampContent","checkNote","showMore","setShowMore","hasOverflow","setHasOverflow","isOverflow","setIsOverflow","useLayoutEffect","clientHeight","ResizeObserver","observe","useIsOverflow","NotePage","setAllNotes","_setSortLock","freezedNotes","setFreezedNotes","onClickSetArchived","Priority","ScrollToTopButton","offset","setOffset","onScroll","pageYOffset","passive","mainContent","viewportHeight","mainContentOffset","offsetTop","mainContentHeight","buttonHidden","buttonAbsoloute","titleContainerGreen","ContainerTip","Organisation","LinkListItem","linkText","linkURL","CollapseItem","buttonText","setShow","transformOrigin","marginInline","Kontigenter","Ok","Medlemsfordele","Materialer","HandshakeFill","gridColumn","ScrollToTop","useLocation","mobileOnly","RoleBasedRoutes","path","App","useIdleTimer","onIdle","fallback","reportWebVitals","onPerfEntry","Function","getCLS","getFID","getFCP","getLCP","getTTFB","render","StrictMode"],"mappings":"wUAKMA,EACSC,yBADTD,EAESC,uCAFTD,EAGYC,+BAKZC,EAAUD,sCAqBhB,IAAME,EAAa,WACf,IAAMC,EAAWC,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KAAD,CACImyB,KAAK,IACLnyB,QAAS,eAAC,KAAD,CAAU9uB,SAAO,EAAC0W,GAAG,2BAK1C,eAAC,GAAD,IAEA,eAAC,GAAD,UCvFDwqC,OA/Bf,WAOI,OAFAC,YAAa,CAAEC,OAJA,WACX/pB,MAGmB9K,QAPL,OAUd,eAAC,IAAD,UACI,eAAC,WAAD,UACI,eAAC,WAAD,CAAU80B,SAAU,eAAC,GAAD,IAApB,SACI,eAAC,GAAD,UACI,eAAC,IAAD,CAAe9nC,MAAOA,GAAtB,SACI,eAAC,GAAD,UACI,gBAAC,GAAD,WACI,eAAC,GAAD,IACA,eAAC,GAAD,UACI,qCACI,eAAC,GAAD,wBCxB7B+nC,GAdS,SAACC,GACjBA,GAAeA,aAAuBC,UACtC,8BAAqB7rB,MACjB,YAAkD,IAA/C8rB,EAA8C,EAA9CA,OAAQC,EAAsC,EAAtCA,OAAQC,EAA8B,EAA9BA,OAAQC,EAAsB,EAAtBA,OAAQC,EAAc,EAAdA,QAC/BJ,EAAOF,GACPG,EAAOH,GACPI,EAAOJ,GACPK,EAAOL,GACPM,EAAQN,OCLxBjlB,IAASwlB,OACL,eAAC,IAAMC,WAAP,UACI,eAAC,GAAD,MAEJloC,SAAS2iB,eAAe,SAM5B8kB,M","file":"static/js/main.3578f5d8.chunk.js","sourcesContent":["import axios from 'axios'\r\nimport qs from 'qs'\r\nimport { IUserData } from '../utils/Auth0'\r\nimport { AuthProfile } from './profile/profile'\r\n\r\nconst oidcSettings = {\r\n authority: process.env.REACT_APP_AUTH_AUTHORITY,\r\n client_id: process.env.REACT_APP_AUTH_CLIENT_ID,\r\n redirect_uri: process.env.REACT_APP_AUTH_REDIRECT_URI,\r\n response_type: process.env.REACT_APP_AUTH_RESPONSE_TYPE,\r\n scope: process.env.REACT_APP_AUTH_REDIRECT_URI_SCOPE,\r\n}\r\n\r\nconst baseURL = process.env.REACT_APP_API_BASE_URL\r\nconst dummyBaseURL = process.env.REACT_APP_API_BASE_URL_DUMMY_USER\r\n\r\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\r\nfunction parseJwt(token) {\r\n const base64Url = token.split('.')[1]\r\n const base64 = base64Url.replace(/-/g, '+').replace(/_/g, '/')\r\n const jsonPayload = decodeURIComponent(\r\n window\r\n .atob(base64)\r\n .split('')\r\n .map(function (c: any) {\r\n return `%${`00${c.charCodeAt(0).toString(16)}`.slice(-2)}`\r\n })\r\n .join('')\r\n )\r\n\r\n return JSON.parse(jsonPayload)\r\n}\r\n\r\n// Function to get baseURL based on userID\r\nconst getBaseURL = (): string => {\r\n const userData = localStorage.getItem('user_data')\r\n\r\n if (!userData) {\r\n return baseURL\r\n }\r\n const user: IUserData = JSON.parse(userData)\r\n const jwt = parseJwt(user.access_token)\r\n const { upn } = jwt\r\n\r\n // If user is dummy user, return dummyBaseURL.\r\n if (upn === '1902pf@foa2test.dk' || upn === '5017zz@mitfoa.dk') {\r\n return dummyBaseURL\r\n }\r\n return baseURL\r\n}\r\n\r\nconst axiosWithAuth = axios.create({\r\n baseURL: getBaseURL(),\r\n})\r\n\r\nexport const doRefreshToken = async (userData: IUserData): Promise => {\r\n axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'\r\n\r\n try {\r\n const response = await axios.post(\r\n `${oidcSettings.authority}/oauth2/token`,\r\n qs.stringify({\r\n grant_type: 'refresh_token',\r\n redirect_uri: oidcSettings.redirect_uri,\r\n client_id: oidcSettings.client_id,\r\n refresh_token: userData.refresh_token,\r\n })\r\n )\r\n\r\n const user: IUserData = response.data\r\n const updatedUserDate = userData\r\n\r\n updatedUserDate.access_token = user.access_token\r\n\r\n localStorage.setItem('user_data', JSON.stringify(updatedUserDate))\r\n } catch {\r\n localStorage.clear()\r\n window.location.href = '/'\r\n }\r\n}\r\n\r\naxiosWithAuth.interceptors.request.use(\r\n async (config) => {\r\n const localUser = localStorage.getItem('user_data')\r\n const isDummyUser = localStorage.getItem('isDummyUser')\r\n\r\n if (isDummyUser) {\r\n // Sett axios base url to dummy url\r\n // eslint-disable-next-line no-param-reassign\r\n // config.baseURL = dummyBaseURL\r\n }\r\n const user: IUserData = JSON.parse(localUser)\r\n // eslint-disable-next-line no-param-reassign\r\n config.headers = {\r\n Authorization: `Bearer ${user.access_token}`,\r\n }\r\n\r\n return config\r\n },\r\n (error) => {\r\n Promise.reject(error)\r\n }\r\n)\r\n\r\naxiosWithAuth.interceptors.response.use(\r\n (response) => {\r\n return response\r\n },\r\n (error) => {\r\n if (error.response.status === 401) {\r\n // try refresh token.\r\n const localUser = localStorage.getItem('user_data')\r\n const user: IUserData = JSON.parse(localUser)\r\n\r\n if (user.access_token && user.refresh_token) {\r\n doRefreshToken(user)\r\n } else {\r\n localStorage.clear()\r\n window.location.href = '/'\r\n }\r\n }\r\n throw error\r\n }\r\n)\r\n\r\nconst axiosWithImitator = axiosWithAuth\r\n\r\naxiosWithImitator.interceptors.request.use(\r\n async (config) => {\r\n const profile = localStorage.getItem('profile_data')\r\n const user: AuthProfile = JSON.parse(profile)\r\n const isDummyUser = localStorage.getItem('isDummyUser')\r\n\r\n // if (isDummyUser) {\r\n // // Set axios base url to dummy url\r\n // // eslint-disable-next-line no-param-reassign\r\n // }\r\n // config.baseURL = dummyBaseURL\r\n\r\n if (\r\n user &&\r\n user.isImitator &&\r\n user.apiProfile &&\r\n user.apiProfile.myProfileId\r\n ) {\r\n if (config.params) {\r\n // eslint-disable-next-line no-param-reassign\r\n config.params['request.imiteretBrugerMedlemIdent'] =\r\n user.apiProfile.myProfileId\r\n } else {\r\n // eslint-disable-next-line no-param-reassign\r\n config.params = {\r\n 'request.imiteretBrugerMedlemIdent':\r\n user.apiProfile.myProfileId,\r\n }\r\n }\r\n }\r\n\r\n return config\r\n },\r\n (error) => {\r\n Promise.reject(error)\r\n }\r\n)\r\n\r\n// Response interceptor for API calls\r\n// axiosApiInstance.interceptors.response.use(\r\n// (response) => {\r\n// return response\r\n// },\r\n// async function (error) {\r\n// const originalRequest = error.config\r\n// const localUser = localStorage.getItem('user_data')\r\n// const user: IUserData = JSON.parse(localUser)\r\n// if (error.response.status === 403 && !originalRequest._retry) {\r\n// // originalRequest._retry = true\r\n// // const access_token = await refreshAccessToken()\r\n// // axios.defaults.headers.common.Authorization =\r\n// `Bearer ${access_token}`\r\n// return axiosApiInstance(originalRequest)\r\n// }\r\n// return Promise.reject(error)\r\n// }\r\n// )\r\n\r\naxiosWithAuth.interceptors.request.use(\r\n async (config) => {\r\n const newConfig = config\r\n // Dynamically get the baseURL on every request\r\n const currentBaseURL = getBaseURL()\r\n if (newConfig.baseURL !== currentBaseURL) {\r\n newConfig.baseURL = currentBaseURL\r\n }\r\n\r\n // Retrieve user data for Authorization header\r\n const localUser = localStorage.getItem('user_data')\r\n if (localUser) {\r\n const user: IUserData = JSON.parse(localUser)\r\n newConfig.headers = {\r\n ...config.headers,\r\n Authorization: `Bearer ${user.access_token}`,\r\n }\r\n }\r\n\r\n return newConfig\r\n },\r\n (error) => {\r\n return Promise.reject(error)\r\n }\r\n)\r\n\r\nexport { axiosWithAuth, axiosWithImitator }\r\n","export type TypeOfRepresentativeData = {\r\n ErAktiv: boolean\r\n KortNavn: string\r\n Navn: string\r\n Sorteringsorden: number\r\n Type: string\r\n Genvalgsdato: string\r\n VisLangtNavnIOversigt: boolean\r\n SupplererMedlemsidentList: []\r\n SuppleresAfHvervsType: string\r\n SuppleresHvervsType: string\r\n}\r\n\r\nexport class TypeOfRepresentative {\r\n isActive = true\r\n\r\n name = ''\r\n\r\n shortName = ''\r\n\r\n sort = 0\r\n\r\n type = ''\r\n\r\n showLongName = true\r\n\r\n electedDate = ''\r\n\r\n alternateRepresentativeList = [] || undefined\r\n\r\n supplementedOfDutyType: string | undefined\r\n\r\n static build(data: TypeOfRepresentativeData): TypeOfRepresentative {\r\n const pos = new TypeOfRepresentative()\r\n\r\n pos.isActive = data.ErAktiv\r\n pos.shortName = data.KortNavn\r\n pos.name = data.Navn\r\n pos.sort = data.Sorteringsorden\r\n pos.type = data.Type\r\n pos.showLongName = data.VisLangtNavnIOversigt\r\n pos.electedDate = data.Genvalgsdato\r\n pos.alternateRepresentativeList = data.SupplererMedlemsidentList\r\n pos.supplementedOfDutyType =\r\n data.SuppleresAfHvervsType || data.SuppleresHvervsType || undefined\r\n\r\n return pos\r\n }\r\n}\r\n\r\nexport function mapTypeOfRepresentatives(\r\n data: TypeOfRepresentativeData[]\r\n): TypeOfRepresentative[] {\r\n return data && data.map((pos) => TypeOfRepresentative.build(pos))\r\n}\r\n","export type IAddressData = {\r\n Adresselinie1: string\r\n Adresselinie2: string\r\n Adresselinie3: string\r\n Postdistrikt: string\r\n Postnummer: string\r\n}\r\n\r\nexport class Address {\r\n id = 0\r\n\r\n addressLine1 = ''\r\n\r\n addressLine2 = ''\r\n\r\n addressLine3 = ''\r\n\r\n postDistrict = ''\r\n\r\n postNumber = ''\r\n\r\n static build(data: IAddressData): Address {\r\n const address = new Address()\r\n\r\n address.addressLine1 = data && data.Adresselinie1\r\n address.addressLine2 = data && data.Adresselinie2\r\n address.addressLine3 = data && data.Adresselinie3\r\n address.postDistrict = data && data.Postdistrikt\r\n address.postNumber = data && data.Postnummer\r\n\r\n return address\r\n }\r\n}\r\n","export interface IGroupData {\r\n Nummer: number\r\n Navn: string\r\n}\r\n\r\nexport class Group {\r\n id = 0\r\n\r\n name = ''\r\n\r\n static build(data: IGroupData): Group {\r\n const group = new Group()\r\n\r\n group.id = data.Nummer\r\n group.name = data.Navn\r\n\r\n return group\r\n }\r\n}\r\n\r\nexport function mapGroups(data: IGroupData[]): Group[] {\r\n return data.map((group) => Group.build(group))\r\n}\r\n","import { Group } from './Group'\r\n\r\nexport type IPositionData = {\r\n Faggruppe: {\r\n Sektor: {\r\n Kode: string\r\n Navn: string\r\n }\r\n Nummer: number\r\n Navn: string\r\n }\r\n Navn: string\r\n Nummer: number\r\n Arbejdsstedsnumre: number[]\r\n}\r\n\r\nexport class Position {\r\n id = 0\r\n\r\n name = ''\r\n\r\n group: Group = new Group()\r\n\r\n number: number\r\n\r\n numbers: number[] = []\r\n\r\n static build(data: IPositionData): Position {\r\n const department = new Position()\r\n\r\n department.id = data.Nummer\r\n department.name = data.Navn\r\n department.group = Group.build(data.Faggruppe)\r\n department.number = data.Nummer\r\n department.numbers = data.Arbejdsstedsnumre\r\n\r\n return department\r\n }\r\n}\r\n\r\nexport function mapPositions(data: IPositionData[]): Position[] {\r\n return data.map((position) => Position.build(position))\r\n}\r\n","import { IWorkplaceData, Workplace } from './Workplace'\r\n\r\nexport type IContactData = {\r\n Email: string\r\n ErTelefonerHemmelige: boolean\r\n KontaktoplysningerType: string\r\n Telefon: string\r\n TelefonVis: string\r\n Mobil: string\r\n MobilVis: string\r\n KontaktoplysningerForArbejdssted: IWorkplaceData\r\n}\r\n\r\nexport class Contact {\r\n id = 0\r\n\r\n name = ''\r\n\r\n email = ''\r\n\r\n telephone = ''\r\n\r\n telephoneShow = ''\r\n\r\n mobile = ''\r\n\r\n mobileShow = ''\r\n\r\n isTelefonPrivate = false\r\n\r\n contactInfoType = ''\r\n\r\n numbers: number[] = []\r\n\r\n // Should refactor Workplace to get only Workplace's contact?\r\n workPlacesContact: Workplace | undefined = undefined\r\n\r\n static build(data: IContactData): Contact {\r\n const contact = new Contact()\r\n\r\n contact.email = data.Email\r\n contact.isTelefonPrivate = data.ErTelefonerHemmelige\r\n contact.contactInfoType = data.KontaktoplysningerType\r\n contact.telephone = data.Telefon\r\n contact.telephoneShow = data.TelefonVis\r\n contact.mobile = data.Mobil\r\n contact.mobileShow = data.MobilVis\r\n contact.workPlacesContact = data.KontaktoplysningerForArbejdssted\r\n ? Workplace.build(data.KontaktoplysningerForArbejdssted)\r\n : undefined\r\n\r\n return contact\r\n }\r\n}\r\n\r\nexport function mapContacts(data: IContactData[]): Contact[] {\r\n return data.map((contact) => Contact.build(contact))\r\n}\r\n","import {\r\n mapTypeOfRepresentatives,\r\n TypeOfRepresentative,\r\n TypeOfRepresentativeData,\r\n} from './TypeOfRepresentative'\r\nimport { IAddressData, Address } from './Address'\r\nimport { IPositionData, mapPositions, Position } from './Position'\r\nimport { Contact } from './Contact'\r\n\r\nexport type ITRhvervMedlemLists = {\r\n AntalIalt: number\r\n KortNavn: string\r\n Medlemsidenter: number[]\r\n Navn: string\r\n Sorteringsorden: number\r\n Type: string\r\n}\r\n\r\nexport type IWorkplaceData = {\r\n Navn: string\r\n ErPrimaertArbejdssted: boolean\r\n ArbejdsstedType: string | null\r\n Nummer: number\r\n OKGruppe: string | null\r\n Stillingsnummer: string\r\n Tillidshverv: TypeOfRepresentativeData[]\r\n Adresse: IAddressData\r\n Timetal: number\r\n Stillinger: IPositionData[]\r\n AntalNoter: number\r\n TRTillidshvervMedlemLister: ITRhvervMedlemLists[]\r\n}\r\n\r\nconst getNumberOfMembers = (workPlace: Workplace): number => {\r\n let numberOfMembers = []\r\n\r\n workPlace.trMemberList.forEach((item) => {\r\n numberOfMembers = [...numberOfMembers, ...item.Medlemsidenter]\r\n })\r\n\r\n return Array.from(new Set(numberOfMembers)).length\r\n}\r\n\r\nexport class Workplace {\r\n name = ''\r\n\r\n isPrimaryWorkplace = false\r\n\r\n type: string | null = null\r\n\r\n okGroup: string | null = null\r\n\r\n number = 0\r\n\r\n postionNumber = ''\r\n\r\n typeOfRepresentatives: TypeOfRepresentative[] = []\r\n\r\n address: Address | undefined\r\n\r\n hoursPerWeek = 0\r\n\r\n positions: Position[]\r\n\r\n contact: Contact | undefined\r\n\r\n numberOfNotes = 0\r\n\r\n trMemberList: ITRhvervMedlemLists[] = []\r\n\r\n numberOfMembers = 0\r\n\r\n // Searchables.\r\n searchable_name = ''\r\n\r\n searchable_address = ''\r\n\r\n public static build = (data: IWorkplaceData): Workplace => {\r\n const workPlace = new Workplace()\r\n\r\n workPlace.name = data.Navn || ''\r\n workPlace.address = data.Adresse && Address.build(data.Adresse)\r\n workPlace.isPrimaryWorkplace = data.ErPrimaertArbejdssted\r\n workPlace.type = data.ArbejdsstedType\r\n workPlace.number = data.Nummer\r\n workPlace.okGroup = data.OKGruppe\r\n workPlace.postionNumber = data.Stillingsnummer\r\n workPlace.hoursPerWeek = data.Timetal || 0\r\n workPlace.typeOfRepresentatives = mapTypeOfRepresentatives(\r\n data.Tillidshverv\r\n )\r\n\r\n if (data.Stillinger) {\r\n workPlace.positions = mapPositions(data.Stillinger)\r\n }\r\n\r\n workPlace.numberOfNotes = data.AntalNoter || 0\r\n\r\n workPlace.trMemberList = data.TRTillidshvervMedlemLister || []\r\n\r\n if (workPlace.trMemberList && workPlace.trMemberList.length) {\r\n workPlace.numberOfMembers = getNumberOfMembers(workPlace)\r\n }\r\n\r\n /**\r\n * Searchables.\r\n */\r\n\r\n workPlace.searchable_name = workPlace.name\r\n\r\n workPlace.searchable_address = workPlace.address\r\n ? `${workPlace.address.addressLine1} ${workPlace.address.postDistrict} ${workPlace.address.postNumber}`\r\n : ''\r\n\r\n return workPlace\r\n }\r\n}\r\n\r\nexport function mapWorkplaces(data: IWorkplaceData[]): Workplace[] {\r\n return data && data.map((workplace) => Workplace.build(workplace))\r\n}\r\n\r\nexport function attachContactInfo(workPlace: Workplace, data: any): Workplace {\r\n const wp = { ...workPlace }\r\n const found = data.KontaktoplysningerList.find((item) => {\r\n return (\r\n item.KontaktoplysningerForArbejdssted !== null &&\r\n item.KontaktoplysningerForArbejdssted.Nummer === workPlace.number\r\n )\r\n })\r\n\r\n if (found) {\r\n wp.contact = Contact.build(found)\r\n }\r\n\r\n return wp\r\n}\r\n","export interface Idata {\r\n Nummer: string\r\n Navn: string\r\n Indmeldelsesdato: string\r\n}\r\n\r\nexport class Department {\r\n id = ''\r\n\r\n name = ''\r\n\r\n registrationDate: Date | undefined = undefined\r\n\r\n static build(data: Idata): Department {\r\n const department = new Department()\r\n\r\n department.id = data.Nummer\r\n department.name = data.Navn\r\n department.registrationDate = data.Indmeldelsesdato\r\n ? new Date(data.Indmeldelsesdato)\r\n : undefined\r\n\r\n return department\r\n }\r\n}\r\n\r\nexport function mapDepartments(data: Idata[]): Department[] {\r\n return data.map((department) => Department.build(department))\r\n}\r\n","export const formatDate = (date: Date): string => {\r\n if (!date) return null\r\n\r\n return `${`0${date.getDate()}`.slice(-2)}.${`0${date.getMonth() + 1}`.slice(\r\n -2\r\n )}.${date.getFullYear()}`\r\n}\r\n\r\nexport const formatPhoneNumber = (\r\n number: string,\r\n defaultGapSize = 2\r\n): string => {\r\n let result = ''\r\n let cloned = number\r\n\r\n // Desired distance between spaces\r\n const gap_size = defaultGapSize\r\n\r\n while (cloned.length > 0) {\r\n // Loop through string\r\n result = `${result} ${cloned.substring(0, gap_size)}` // Insert space character\r\n cloned = cloned.substring(gap_size) // Trim String\r\n }\r\n\r\n return result\r\n}\r\n","import {\r\n attachContactInfo,\r\n IWorkplaceData,\r\n mapWorkplaces,\r\n Workplace,\r\n} from './Workplace'\r\nimport { IPositionData, mapPositions, Position } from './Position'\r\nimport {\r\n mapTypeOfRepresentatives,\r\n TypeOfRepresentative,\r\n TypeOfRepresentativeData,\r\n} from './TypeOfRepresentative'\r\nimport { Department } from './Department'\r\nimport { Contact, IContactData, mapContacts } from './Contact'\r\nimport { formatDate } from '../utils/format'\r\n\r\nexport type FunctionField = 'Ret' | 'Slet' | 'IngenRettelse'\r\n\r\nexport type IMemberData = {\r\n Arbejdssteder: IWorkplaceData[]\r\n ErFavorit: boolean\r\n AntalNoter: number\r\n OpdaterStatus: string\r\n Stillinger: IPositionData[]\r\n Medlemsident: number\r\n Medlemsnummer: string\r\n Fornavn: string\r\n Efternavn: string\r\n FuldeNavn: string\r\n Tillidshverv: TypeOfRepresentativeData[]\r\n ErEgetMedlem: boolean\r\n Alder: number\r\n Afdeling: {\r\n Navn: string\r\n Nummer: string\r\n Indmeldelsesdato: string\r\n }\r\n ProfilBillede: { Content: string; MimeType: string }\r\n KontaktoplysningerList: IContactData[]\r\n FoedselsDato: string\r\n}\r\n\r\nexport type IUpdateMemberData = {\r\n KontaktPrivat?: {\r\n Fastnet?: string\r\n Mobil?: string\r\n Email?: string\r\n OpdaterFunktionFastnet?: FunctionField\r\n OpdaterFunktionMobil?: FunctionField\r\n OpdaterFunktionEmail?: FunctionField\r\n }\r\n KontaktArbejde?: {\r\n Telefon?: string\r\n Email?: string\r\n OpdaterFunktionTelefon?: FunctionField\r\n OpdaterFunktionEmail?: FunctionField\r\n }\r\n Stillingsnummer?: string\r\n Timetal?: number\r\n Aendringsdato?: string\r\n OevrigeOplysninger?: string\r\n Arbejdsstednummer?: number\r\n Medlemsident: number\r\n}\r\n\r\nexport type ICancelWorkplace = {\r\n Aendringsdato?: string\r\n OevrigeOplysninger?: string\r\n Arbejdsstednummer?: number\r\n Medlemsident: number\r\n}\r\n\r\nexport function findPrimaryWorkPlace(member: Member): Workplace {\r\n if (member.allWorkPlaces.length > 1) {\r\n const found = member.allWorkPlaces.find(\r\n (wordPlace) => wordPlace.isPrimaryWorkplace\r\n )\r\n\r\n if (found) {\r\n return found\r\n }\r\n }\r\n\r\n return member.allWorkPlaces[0]\r\n}\r\n\r\nexport function findMyWorkplaces(member: Member): Workplace[] {\r\n let workPlaces: Workplace[] = []\r\n\r\n // eslint-disable-next-line no-restricted-syntax\r\n for (const position of member.positions) {\r\n const wpNumbers = position.numbers\r\n\r\n // eslint-disable-next-line guard-for-in\r\n // eslint-disable-next-line no-restricted-syntax\r\n for (const wpNumber of wpNumbers) {\r\n const wp = member.allWorkPlaces.find((w) => +w.number === +wpNumber)\r\n workPlaces = [...workPlaces, ...[wp]]\r\n }\r\n }\r\n\r\n return workPlaces\r\n}\r\n\r\nexport class Member {\r\n workPlaces: Workplace[] = []\r\n\r\n allWorkPlaces: Workplace[] = []\r\n\r\n isFavorite = false\r\n\r\n numberOfNotes = 0\r\n\r\n status = ''\r\n\r\n memberId = 0\r\n\r\n firstName = ''\r\n\r\n lastName = ''\r\n\r\n fullName = ''\r\n\r\n memberNumber = ''\r\n\r\n birthday: Date | undefined = undefined\r\n\r\n age: number | undefined = undefined\r\n\r\n positions: Position[] = []\r\n\r\n typeOfRepresentatives: TypeOfRepresentative[] = []\r\n\r\n isOwnMember = false\r\n\r\n department: Department | undefined = null\r\n\r\n primaryWorkPlace: Workplace | undefined = undefined\r\n\r\n profilePicture = {\r\n content: '',\r\n mimeType: '',\r\n }\r\n\r\n contactInfoList: Contact[] = []\r\n\r\n privateContact: Contact | undefined = undefined\r\n\r\n workContact: Contact | undefined = undefined\r\n\r\n membershipInfo = {\r\n date: '',\r\n name: '',\r\n number: '',\r\n }\r\n\r\n // Searchables.\r\n searchable_fullName = ''\r\n\r\n searchable_workPlace = ''\r\n\r\n searchable_birthDay = ''\r\n\r\n searchable_age: number | undefined = undefined\r\n\r\n public static build = (data: IMemberData): Member => {\r\n const member = new Member()\r\n\r\n member.allWorkPlaces = mapWorkplaces(data.Arbejdssteder)\r\n member.isFavorite =\r\n data.ErFavorit !== undefined ? data.ErFavorit : false\r\n member.numberOfNotes = data.AntalNoter\r\n member.status = data.OpdaterStatus\r\n member.positions = data.Stillinger ? mapPositions(data.Stillinger) : []\r\n member.memberId = data.Medlemsident\r\n member.memberNumber = data.Medlemsnummer\r\n member.firstName = data.Fornavn\r\n member.lastName = data.Efternavn\r\n member.fullName = data.FuldeNavn\r\n member.membershipInfo.date = data.Afdeling?.Indmeldelsesdato\r\n member.membershipInfo.name = data.Afdeling?.Navn\r\n member.membershipInfo.number = data.Afdeling?.Nummer\r\n member.department = data.Afdeling\r\n ? Department.build(data.Afdeling)\r\n : undefined\r\n member.isOwnMember =\r\n data.ErEgetMedlem !== undefined ? data.ErEgetMedlem : false\r\n member.typeOfRepresentatives = data.Tillidshverv\r\n ? mapTypeOfRepresentatives(data.Tillidshverv)\r\n : []\r\n\r\n // member.primaryWorkPlace = findPrimaryWorkPlace(member)\r\n\r\n member.profilePicture.content = data.ProfilBillede?.Content\r\n\r\n member.age = data.Alder\r\n\r\n member.contactInfoList = data.KontaktoplysningerList\r\n ? mapContacts(data.KontaktoplysningerList)\r\n : []\r\n\r\n // Map Contacts.\r\n member.privateContact = member.contactInfoList.find(\r\n (c) => c.contactInfoType === 'Privat'\r\n )\r\n\r\n member.workContact = member.contactInfoList.find(\r\n (c) => c.contactInfoType === 'Arbejde'\r\n )\r\n\r\n member.birthday = data.FoedselsDato\r\n ? new Date(data.FoedselsDato)\r\n : undefined\r\n\r\n member.workPlaces = findMyWorkplaces(member)\r\n\r\n // member.workPlaces.forEach((entry, index) => {\r\n // member.workPlaces[index] = attachContactInfo(entry, data)\r\n // })\r\n member.primaryWorkPlace = findPrimaryWorkPlace(member)\r\n // member.primaryWorkPlace = attachContactInfo(\r\n // member.primaryWorkPlace,\r\n // data\r\n // )\r\n\r\n if (member.primaryWorkPlace) {\r\n member.searchable_workPlace = member.primaryWorkPlace.name\r\n }\r\n\r\n /**\r\n * Searchables.\r\n */\r\n if (member.primaryWorkPlace) {\r\n member.searchable_workPlace = member.primaryWorkPlace.name\r\n }\r\n\r\n member.searchable_fullName = member.fullName\r\n\r\n member.searchable_age = data.Alder\r\n\r\n const birthday = data.FoedselsDato\r\n ? new Date(data.FoedselsDato)\r\n : undefined\r\n\r\n if (birthday) {\r\n member.searchable_birthDay = formatDate(birthday)\r\n }\r\n\r\n return member\r\n }\r\n}\r\n\r\nexport function mapMembers(data: IMemberData[]): Member[] {\r\n return data.map((member) => Member.build(member))\r\n}\r\n","/* eslint-disable no-restricted-syntax */\r\nimport { IWorkplaceData, mapWorkplaces, Workplace } from './Workplace'\r\nimport { IPositionData, mapPositions, Position } from './Position'\r\nimport { IContactData, mapContacts, Contact } from './Contact'\r\nimport {\r\n mapTypeOfRepresentatives,\r\n TypeOfRepresentative,\r\n TypeOfRepresentativeData,\r\n} from './TypeOfRepresentative'\r\nimport { IMemberData, mapMembers, Member } from './Member'\r\n\r\nexport type IProfileData = {\r\n Arbejdssteder: IWorkplaceData[]\r\n ErFavorit: boolean\r\n AntalNoter: number\r\n TotalAntalKollegaerBrugerDaekker: number\r\n AntalFoaMedlemmerBrugerDaekker: number\r\n OpdaterStatus: string\r\n Stillinger: IPositionData[]\r\n Medlemsident: number\r\n Fornavn: string\r\n Efternavn: string\r\n FuldeNavn: string\r\n FoedselsDato: string\r\n Alder: number\r\n Medlemsnummer: number\r\n Afdeling: { Indmeldelsesdato: string; Navn: string; Nummer: string }\r\n ProfilBillede: { Content: string; MimeType: string }\r\n Tillidshverv: TypeOfRepresentativeData[]\r\n KontaktoplysningerList: IContactData[]\r\n TillidhvervMedlemmerSuppleantForBruger: IMemberData[]\r\n BrugerSuppleantForTillidshvervMedlemmer: IMemberData[]\r\n}\r\n\r\nexport function findPrimaryWorkPlace(member: Profile): Workplace {\r\n if (member.allWorkPlaces.length > 1) {\r\n const found = member.allWorkPlaces.find(\r\n (wordPlace) => wordPlace.isPrimaryWorkplace\r\n )\r\n if (found) {\r\n return found\r\n }\r\n }\r\n return member.workPlaces[0]\r\n}\r\n\r\nexport function findMyWorkplaces(member: Profile): Workplace[] {\r\n let workPlaces: Workplace[] = []\r\n\r\n // eslint-disable-next-line no-restricted-syntax\r\n for (const position of member.positions) {\r\n const wpNumbers = position.numbers\r\n\r\n // eslint-disable-next-line guard-for-in\r\n for (const wpNumber of wpNumbers) {\r\n const wp = member.allWorkPlaces.find((w) => +w.number === +wpNumber)\r\n workPlaces = [...workPlaces, ...[wp]]\r\n }\r\n }\r\n\r\n return workPlaces\r\n}\r\n\r\nexport class Profile {\r\n workPlaces: Workplace[] = []\r\n\r\n allWorkPlaces: Workplace[] = []\r\n\r\n isFavorite = false\r\n\r\n numberOfNotes = 0\r\n\r\n status = ''\r\n\r\n myProfileId = 0\r\n\r\n firstName = ''\r\n\r\n lastName = ''\r\n\r\n fullName = ''\r\n\r\n roles: string[] = []\r\n\r\n personalInfo = {\r\n birthdate: '',\r\n age: 0,\r\n }\r\n\r\n membershipInfo = {\r\n date: '',\r\n name: '',\r\n number: '',\r\n }\r\n\r\n profilePicture = {\r\n content: '',\r\n mimeType: '',\r\n }\r\n\r\n memberNumber = 0\r\n\r\n totalNumberOfPeopleUserCovers = 0\r\n\r\n numberFoaMemberUserCovers = 0\r\n\r\n positions: Position[] = []\r\n\r\n typeOfRepresentatives: TypeOfRepresentative[] = []\r\n\r\n contactInfoList: Contact[] = []\r\n\r\n primaryWorkPlace: Workplace | undefined = undefined\r\n\r\n privateContact: Contact | undefined = undefined\r\n\r\n workContact: Contact | undefined = undefined\r\n\r\n trForSelf: Member[] | undefined\r\n\r\n trForOthers: Member[] | undefined\r\n\r\n public static build = (data: IProfileData): Profile => {\r\n const myProfile = new Profile()\r\n\r\n myProfile.allWorkPlaces = mapWorkplaces(data.Arbejdssteder)\r\n myProfile.isFavorite = data.ErFavorit\r\n myProfile.numberOfNotes = data.AntalNoter\r\n myProfile.status = data.OpdaterStatus\r\n myProfile.positions = mapPositions(data.Stillinger)\r\n myProfile.myProfileId = data.Medlemsident\r\n myProfile.firstName = data.Fornavn\r\n myProfile.lastName = data.Efternavn\r\n myProfile.fullName = data.FuldeNavn\r\n myProfile.memberNumber = data.Medlemsnummer\r\n myProfile.totalNumberOfPeopleUserCovers =\r\n data.TotalAntalKollegaerBrugerDaekker\r\n myProfile.numberFoaMemberUserCovers =\r\n data.AntalFoaMedlemmerBrugerDaekker\r\n myProfile.personalInfo.age = data.Alder\r\n myProfile.personalInfo.birthdate = data.FoedselsDato\r\n myProfile.profilePicture.content = data?.ProfilBillede?.Content\r\n myProfile.profilePicture.mimeType = data?.ProfilBillede?.MimeType\r\n myProfile.membershipInfo.date = data.Afdeling.Indmeldelsesdato\r\n myProfile.membershipInfo.name = data.Afdeling.Navn\r\n myProfile.membershipInfo.number = data.Afdeling.Nummer\r\n myProfile.typeOfRepresentatives = mapTypeOfRepresentatives(\r\n data.Tillidshverv\r\n )\r\n myProfile.contactInfoList = data.KontaktoplysningerList\r\n ? mapContacts(data.KontaktoplysningerList)\r\n : []\r\n\r\n myProfile.workPlaces = findMyWorkplaces(myProfile)\r\n\r\n myProfile.primaryWorkPlace = findPrimaryWorkPlace(myProfile)\r\n\r\n // Map Contacts.\r\n myProfile.privateContact = myProfile.contactInfoList.find(\r\n (c) => c.contactInfoType === 'Privat'\r\n )\r\n\r\n myProfile.workContact = myProfile.contactInfoList.find(\r\n (c) => c.contactInfoType === 'Arbejde'\r\n )\r\n\r\n myProfile.trForOthers = mapMembers(\r\n data.BrugerSuppleantForTillidshvervMedlemmer\r\n )\r\n\r\n myProfile.trForSelf = mapMembers(\r\n data.TillidhvervMedlemmerSuppleantForBruger\r\n )\r\n\r\n return myProfile\r\n }\r\n}\r\n\r\nexport function mapProfiles(data: IProfileData[]): Profile[] {\r\n return data && data.map((myProfile) => Profile.build(myProfile))\r\n}\r\n","import { atomWithQuery } from 'jotai/query'\r\nimport { atom } from 'jotai'\r\nimport { AxiosResponse } from 'axios'\r\nimport { axiosWithAuth, axiosWithImitator } from '../withAuth'\r\nimport { Profile } from '../../models/Profile'\r\nimport { IUpdateMyProfileData } from '../../components/modules/EditMyProfile'\r\n\r\ninterface keyValue {\r\n [id: string]: string\r\n}\r\n\r\ninterface IAuthProfile {\r\n Afdeling: {\r\n Nummer: string\r\n Navn: string\r\n }\r\n AlleTRTillidshvervTypeListe: number[]\r\n BrugerMedlemsident: number\r\n BrugerSagsbehandlerInitialer: null | string\r\n Dagsdato: string\r\n KanBestilleNoteRapport: boolean\r\n ManglerTrKontaktoplysninger: boolean\r\n MinVersionAndroid: null | string\r\n MinVersionIOS: null | string\r\n RolleListe: string[]\r\n ServiceBesked: null | string\r\n SkalVilkaarGodkendes: boolean\r\n}\r\n\r\nexport type AuthProfile = {\r\n data?: IAuthProfile\r\n isImitator: boolean\r\n apiProfile?: Profile | undefined\r\n}\r\n\r\nconst initialValue: AuthProfile = {\r\n data: undefined,\r\n isImitator: false,\r\n apiProfile: undefined,\r\n}\r\n\r\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\r\nconst getProfile = async () => {\r\n const response = await axiosWithAuth.get(`/profil/hentbrugeropstartdata`)\r\n\r\n return response\r\n}\r\n\r\nconst getProfileSupportInfo = async (): Promise => {\r\n const response = await axiosWithAuth.get(\r\n '/profil/hentsupportkontaktoplysninger'\r\n )\r\n\r\n return response\r\n}\r\n\r\nconst updateProfile = async (\r\n values: IUpdateMyProfileData\r\n): Promise => {\r\n const response = await axiosWithAuth.post(\r\n `/profil/opdaterbrugerprofil`,\r\n values\r\n )\r\n\r\n return response\r\n}\r\n\r\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\r\nconst getProfileByIdent = async (ident: number): Promise => {\r\n const response = axiosWithAuth.get(\r\n `/profil/hentbrugerprofil?request.imiteretBrugerMedlemIdent=${ident}`\r\n )\r\n\r\n return response\r\n}\r\n\r\nconst getMemberForImitating = (\r\n departmentNumber: string,\r\n name: string\r\n): Promise => {\r\n return axiosWithAuth.get(\r\n `/profil/soegtrtilimitering?request.afdelingsnummer=${departmentNumber}&request.fuldeNavn=${name}`\r\n )\r\n}\r\n\r\nconst profileAtom = atom(initialValue)\r\n\r\nconst idAtom = atom(1)\r\n\r\nconst getProfileAtom = atomWithQuery((get) => ({\r\n queryKey: ['myProfile', get(idAtom)],\r\n queryFn: async ({ queryKey: [,] }) => {\r\n const response = await axiosWithAuth.get(`/profil/hentbrugerprofil`)\r\n const { data } = response\r\n return Profile.build(data)\r\n },\r\n}))\r\n\r\nexport {\r\n profileAtom,\r\n getProfile,\r\n getProfileAtom,\r\n getProfileByIdent,\r\n getMemberForImitating,\r\n updateProfile,\r\n getProfileSupportInfo,\r\n}\r\n","export const colors = {\r\n green: '#297A71',\r\n white: 'rgba(255, 255, 255)',\r\n gray: '#E5E5E5',\r\n black: 'rgba(0, 0, 0)',\r\n borderColorLight: 'rgba(0, 0, 0, .1)',\r\n borderColor: 'rgba(0, 0, 0, 0.2)',\r\n labelColor: 'rgba(0, 0, 0, 0.4)',\r\n\r\n green200: 'rgba(41, 122 , 113, .1)', // #297A71 , opacity: .1\r\n green400: 'rgba(41, 122 , 113, .3)', // #297A71 , opacity: .3\r\n green500: 'rgb(41, 122 ,113)', // #297A71\r\n green600: 'rgb(24, 90, 81)', // #185A51\r\n\r\n red100: 'rgba(166, 25, 46, .1)',\r\n red500: 'rgb(166, 25, 46)',\r\n red600: 'rgb(140, 21, 61)',\r\n\r\n orange500: 'rgb(220, 107, 47)',\r\n orange600: 'rgba(220, 93, 47)',\r\n\r\n gray500: 'rgba(0, 0, 0, .05)',\r\n gray600: 'rgba(0, 0, 0, .1)',\r\n gray700: 'rgba(0, 0, 0, 0.2)',\r\n gray800: 'rgba(0, 0, 0, 0.4)',\r\n gray900: 'rgba(86, 88, 90, 0.9)',\r\n\r\n blue300: '#E9F4F3',\r\n\r\n error: 'rgb(235, 52, 52)',\r\n errorBg: 'rgb(235, 52, 52, .1)',\r\n}\r\n\r\nconst palette = {\r\n colors,\r\n link: {},\r\n foreground: colors.green,\r\n background: colors.gray,\r\n navBackgroundColor: colors.white,\r\n borderColor: colors.green,\r\n backgroundOpaque: 'rgba(255,255,255,0.9)',\r\n primary: '#464646', // Text\r\n secondary: '#fff', // Text\r\n buttonPrimary: colors.green,\r\n creme: '#dccab8',\r\n CTAhover: '#323232',\r\n}\r\n\r\nexport default palette\r\n","import * as React from 'react'\nimport { SVGProps } from 'react'\nimport PropTypes from 'prop-types'\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nfunction SvgChevronDownFill({\n title,\n titleId,\n ...props\n}: SVGProps & SVGRProps) {\n return (\n \n {title ? {title} : null}\n \n \n \n \n \n )\n}\n\nSvgChevronDownFill.propTypes = {\n title: PropTypes.string,\n fill: PropTypes.string,\n width: PropTypes.string,\n height: PropTypes.string,\n stroke: PropTypes.string,\n color: PropTypes.string,\n}\nexport default SvgChevronDownFill\n","import * as React from 'react'\nimport { SVGProps } from 'react'\nimport PropTypes from 'prop-types'\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nfunction SvgCloseSolid({\n title,\n titleId,\n ...props\n}: SVGProps & SVGRProps) {\n return (\n \n {title ? {title} : null}\n \n \n )\n}\n\nSvgCloseSolid.propTypes = {\n title: PropTypes.string,\n fill: PropTypes.string,\n width: PropTypes.string,\n height: PropTypes.string,\n stroke: PropTypes.string,\n color: PropTypes.string,\n}\nexport default SvgCloseSolid\n","import * as React from 'react'\nimport { SVGProps } from 'react'\nimport PropTypes from 'prop-types'\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nfunction SvgHeart({\n title,\n titleId,\n ...props\n}: SVGProps & SVGRProps) {\n return (\n \n {title ? {title} : null}\n \n \n )\n}\n\nSvgHeart.propTypes = {\n title: PropTypes.string,\n fill: PropTypes.string,\n width: PropTypes.string,\n height: PropTypes.string,\n stroke: PropTypes.string,\n color: PropTypes.string,\n}\nexport default SvgHeart\n","import * as React from 'react'\nimport { SVGProps } from 'react'\nimport PropTypes from 'prop-types'\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nfunction SvgPersonSearch({\n title,\n titleId,\n ...props\n}: SVGProps & SVGRProps) {\n return (\n \n {title ? {title} : null}\n \n \n \n \n )\n}\n\nSvgPersonSearch.propTypes = {\n title: PropTypes.string,\n fill: PropTypes.string,\n width: PropTypes.string,\n height: PropTypes.string,\n stroke: PropTypes.string,\n color: PropTypes.string,\n}\nexport default SvgPersonSearch\n","import * as React from 'react'\nimport { SVGProps } from 'react'\nimport PropTypes from 'prop-types'\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nfunction SvgAddContact({\n title,\n titleId,\n ...props\n}: SVGProps & SVGRProps) {\n return (\n \n {title ? {title} : null}\n \n \n \n \n \n \n \n \n )\n}\n\nSvgAddContact.propTypes = {\n title: PropTypes.string,\n fill: PropTypes.string,\n width: PropTypes.string,\n height: PropTypes.string,\n stroke: PropTypes.string,\n color: PropTypes.string,\n}\nexport default SvgAddContact\n","import * as React from 'react'\nimport { SVGProps } from 'react'\nimport PropTypes from 'prop-types'\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nfunction SvgAftalearkiv({\n title,\n titleId,\n ...props\n}: SVGProps & SVGRProps) {\n return (\n \n {title ? {title} : null}\n \n \n )\n}\n\nSvgAftalearkiv.propTypes = {\n title: PropTypes.string,\n fill: PropTypes.string,\n width: PropTypes.string,\n height: PropTypes.string,\n stroke: PropTypes.string,\n color: PropTypes.string,\n}\nexport default SvgAftalearkiv\n","import * as React from 'react'\nimport { SVGProps } from 'react'\nimport PropTypes from 'prop-types'\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nfunction SvgBookmarkFill({\n title,\n titleId,\n ...props\n}: SVGProps & SVGRProps) {\n return (\n \n {title ? {title} : null}\n \n \n )\n}\n\nSvgBookmarkFill.propTypes = {\n title: PropTypes.string,\n fill: PropTypes.string,\n width: PropTypes.string,\n height: PropTypes.string,\n stroke: PropTypes.string,\n color: PropTypes.string,\n}\nexport default SvgBookmarkFill\n","import * as React from 'react'\nimport { SVGProps } from 'react'\nimport PropTypes from 'prop-types'\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nfunction SvgCalendar({\n title,\n titleId,\n ...props\n}: SVGProps & SVGRProps) {\n return (\n \n {title ? {title} : null}\n \n \n )\n}\n\nSvgCalendar.propTypes = {\n title: PropTypes.string,\n fill: PropTypes.string,\n width: PropTypes.string,\n height: PropTypes.string,\n stroke: PropTypes.string,\n color: PropTypes.string,\n}\nexport default SvgCalendar\n","import * as React from 'react'\nimport { SVGProps } from 'react'\nimport PropTypes from 'prop-types'\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nfunction SvgCheck({\n title,\n titleId,\n ...props\n}: SVGProps & SVGRProps) {\n return (\n \n {title ? {title} : null}\n \n \n )\n}\n\nSvgCheck.propTypes = {\n title: PropTypes.string,\n fill: PropTypes.string,\n width: PropTypes.string,\n height: PropTypes.string,\n stroke: PropTypes.string,\n color: PropTypes.string,\n}\nexport default SvgCheck\n","import * as React from 'react'\nimport { SVGProps } from 'react'\nimport PropTypes from 'prop-types'\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nfunction SvgCheckFill({\n title,\n titleId,\n ...props\n}: SVGProps & SVGRProps) {\n return (\n \n {title ? {title} : null}\n \n \n )\n}\n\nSvgCheckFill.propTypes = {\n title: PropTypes.string,\n fill: PropTypes.string,\n width: PropTypes.string,\n height: PropTypes.string,\n stroke: PropTypes.string,\n color: PropTypes.string,\n}\nexport default SvgCheckFill\n","import * as React from 'react'\nimport { SVGProps } from 'react'\nimport PropTypes from 'prop-types'\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nfunction SvgChevronLeft({\n title,\n titleId,\n ...props\n}: SVGProps & SVGRProps) {\n return (\n \n {title ? {title} : null}\n \n \n )\n}\n\nSvgChevronLeft.propTypes = {\n title: PropTypes.string,\n fill: PropTypes.string,\n width: PropTypes.string,\n height: PropTypes.string,\n stroke: PropTypes.string,\n color: PropTypes.string,\n}\nexport default SvgChevronLeft\n","import * as React from 'react'\nimport { SVGProps } from 'react'\nimport PropTypes from 'prop-types'\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nfunction SvgChevronRight({\n title,\n titleId,\n ...props\n}: SVGProps & SVGRProps) {\n return (\n \n {title ? {title} : null}\n \n \n )\n}\n\nSvgChevronRight.propTypes = {\n title: PropTypes.string,\n fill: PropTypes.string,\n width: PropTypes.string,\n height: PropTypes.string,\n stroke: PropTypes.string,\n color: PropTypes.string,\n}\nexport default SvgChevronRight\n","import * as React from 'react'\nimport { SVGProps } from 'react'\nimport PropTypes from 'prop-types'\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nfunction SvgClose({\n title,\n titleId,\n ...props\n}: SVGProps & SVGRProps) {\n return (\n \n {title ? {title} : null}\n \n \n )\n}\n\nSvgClose.propTypes = {\n title: PropTypes.string,\n fill: PropTypes.string,\n width: PropTypes.string,\n height: PropTypes.string,\n stroke: PropTypes.string,\n color: PropTypes.string,\n}\nexport default SvgClose\n","import * as React from 'react'\nimport { SVGProps } from 'react'\nimport PropTypes from 'prop-types'\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nfunction SvgContactFill({\n title,\n titleId,\n ...props\n}: SVGProps & SVGRProps) {\n return (\n \n {title ? {title} : null}\n \n \n )\n}\n\nSvgContactFill.propTypes = {\n title: PropTypes.string,\n fill: PropTypes.string,\n width: PropTypes.string,\n height: PropTypes.string,\n stroke: PropTypes.string,\n color: PropTypes.string,\n}\nexport default SvgContactFill\n","import * as React from 'react'\nimport { SVGProps } from 'react'\nimport PropTypes from 'prop-types'\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nfunction SvgContactLedger({\n title,\n titleId,\n ...props\n}: SVGProps & SVGRProps) {\n return (\n \n {title ? {title} : null}\n \n \n )\n}\n\nSvgContactLedger.propTypes = {\n title: PropTypes.string,\n fill: PropTypes.string,\n width: PropTypes.string,\n height: PropTypes.string,\n stroke: PropTypes.string,\n color: PropTypes.string,\n}\nexport default SvgContactLedger\n","import * as React from 'react'\nimport { SVGProps } from 'react'\nimport PropTypes from 'prop-types'\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nfunction SvgDelete({\n title,\n titleId,\n ...props\n}: SVGProps & SVGRProps) {\n return (\n \n {title ? {title} : null}\n \n \n )\n}\n\nSvgDelete.propTypes = {\n title: PropTypes.string,\n fill: PropTypes.string,\n width: PropTypes.string,\n height: PropTypes.string,\n stroke: PropTypes.string,\n color: PropTypes.string,\n}\nexport default SvgDelete\n","import * as React from 'react'\nimport { SVGProps } from 'react'\nimport PropTypes from 'prop-types'\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nfunction SvgDeleteFill({\n title,\n titleId,\n ...props\n}: SVGProps & SVGRProps) {\n return (\n \n {title ? {title} : null}\n \n \n )\n}\n\nSvgDeleteFill.propTypes = {\n title: PropTypes.string,\n fill: PropTypes.string,\n width: PropTypes.string,\n height: PropTypes.string,\n stroke: PropTypes.string,\n color: PropTypes.string,\n}\nexport default SvgDeleteFill\n","import * as React from 'react'\nimport { SVGProps } from 'react'\nimport PropTypes from 'prop-types'\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nfunction SvgEdit({\n title,\n titleId,\n ...props\n}: SVGProps & SVGRProps) {\n return (\n \n {title ? {title} : null}\n \n \n )\n}\n\nSvgEdit.propTypes = {\n title: PropTypes.string,\n fill: PropTypes.string,\n width: PropTypes.string,\n height: PropTypes.string,\n stroke: PropTypes.string,\n color: PropTypes.string,\n}\nexport default SvgEdit\n","import * as React from 'react'\nimport { SVGProps } from 'react'\nimport PropTypes from 'prop-types'\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nfunction SvgEditFill({\n title,\n titleId,\n ...props\n}: SVGProps & SVGRProps) {\n return (\n \n {title ? {title} : null}\n \n \n )\n}\n\nSvgEditFill.propTypes = {\n title: PropTypes.string,\n fill: PropTypes.string,\n width: PropTypes.string,\n height: PropTypes.string,\n stroke: PropTypes.string,\n color: PropTypes.string,\n}\nexport default SvgEditFill\n","import * as React from 'react'\nimport { SVGProps } from 'react'\nimport PropTypes from 'prop-types'\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nfunction SvgEmailFill({\n title,\n titleId,\n ...props\n}: SVGProps & SVGRProps) {\n return (\n \n {title ? {title} : null}\n \n \n \n )\n}\n\nSvgEmailFill.propTypes = {\n title: PropTypes.string,\n fill: PropTypes.string,\n width: PropTypes.string,\n height: PropTypes.string,\n stroke: PropTypes.string,\n color: PropTypes.string,\n}\nexport default SvgEmailFill\n","import * as React from 'react'\nimport { SVGProps } from 'react'\nimport PropTypes from 'prop-types'\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nfunction SvgEnvelop({\n title,\n titleId,\n ...props\n}: SVGProps & SVGRProps) {\n return (\n \n {title ? {title} : null}\n \n \n \n \n )\n}\n\nSvgEnvelop.propTypes = {\n title: PropTypes.string,\n fill: PropTypes.string,\n width: PropTypes.string,\n height: PropTypes.string,\n stroke: PropTypes.string,\n color: PropTypes.string,\n}\nexport default SvgEnvelop\n","import * as React from 'react'\nimport { SVGProps } from 'react'\nimport PropTypes from 'prop-types'\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nfunction SvgFlagFill({\n title,\n titleId,\n ...props\n}: SVGProps & SVGRProps) {\n return (\n \n {title ? {title} : null}\n \n \n )\n}\n\nSvgFlagFill.propTypes = {\n title: PropTypes.string,\n fill: PropTypes.string,\n width: PropTypes.string,\n height: PropTypes.string,\n stroke: PropTypes.string,\n color: PropTypes.string,\n}\nexport default SvgFlagFill\n","import * as React from 'react'\nimport { SVGProps } from 'react'\nimport PropTypes from 'prop-types'\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nfunction SvgFoa({\n title,\n titleId,\n ...props\n}: SVGProps & SVGRProps) {\n return (\n \n {title ? {title} : null}\n \n \n \n )\n}\n\nSvgFoa.propTypes = {\n title: PropTypes.string,\n fill: PropTypes.string,\n width: PropTypes.string,\n height: PropTypes.string,\n stroke: PropTypes.string,\n color: PropTypes.string,\n}\nexport default SvgFoa\n","import * as React from 'react'\nimport { SVGProps } from 'react'\nimport PropTypes from 'prop-types'\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nfunction SvgHandshakeFill({\n title,\n titleId,\n ...props\n}: SVGProps & SVGRProps) {\n return (\n \n {title ? {title} : null}\n \n \n )\n}\n\nSvgHandshakeFill.propTypes = {\n title: PropTypes.string,\n fill: PropTypes.string,\n width: PropTypes.string,\n height: PropTypes.string,\n stroke: PropTypes.string,\n color: PropTypes.string,\n}\nexport default SvgHandshakeFill\n","import * as React from 'react'\nimport { SVGProps } from 'react'\nimport PropTypes from 'prop-types'\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nfunction SvgHelp({\n title,\n titleId,\n ...props\n}: SVGProps & SVGRProps) {\n return (\n \n {title ? {title} : null}\n \n \n )\n}\n\nSvgHelp.propTypes = {\n title: PropTypes.string,\n fill: PropTypes.string,\n width: PropTypes.string,\n height: PropTypes.string,\n stroke: PropTypes.string,\n color: PropTypes.string,\n}\nexport default SvgHelp\n","import * as React from 'react'\nimport { SVGProps } from 'react'\nimport PropTypes from 'prop-types'\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nfunction SvgInfo({\n title,\n titleId,\n ...props\n}: SVGProps & SVGRProps) {\n return (\n \n {title ? {title} : null}\n \n \n )\n}\n\nSvgInfo.propTypes = {\n title: PropTypes.string,\n fill: PropTypes.string,\n width: PropTypes.string,\n height: PropTypes.string,\n stroke: PropTypes.string,\n color: PropTypes.string,\n}\nexport default SvgInfo\n","import * as React from 'react'\nimport { SVGProps } from 'react'\nimport PropTypes from 'prop-types'\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nfunction SvgKontigenter({\n title,\n titleId,\n ...props\n}: SVGProps & SVGRProps) {\n return (\n \n {title ? {title} : null}\n \n \n \n \n \n )\n}\n\nSvgKontigenter.propTypes = {\n title: PropTypes.string,\n fill: PropTypes.string,\n width: PropTypes.string,\n height: PropTypes.string,\n stroke: PropTypes.string,\n color: PropTypes.string,\n}\nexport default SvgKontigenter\n","import * as React from 'react'\nimport { SVGProps } from 'react'\nimport PropTypes from 'prop-types'\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nfunction SvgLinkFill({\n title,\n titleId,\n ...props\n}: SVGProps & SVGRProps) {\n return (\n \n {title ? {title} : null}\n \n \n )\n}\n\nSvgLinkFill.propTypes = {\n title: PropTypes.string,\n fill: PropTypes.string,\n width: PropTypes.string,\n height: PropTypes.string,\n stroke: PropTypes.string,\n color: PropTypes.string,\n}\nexport default SvgLinkFill\n","import * as React from 'react'\nimport { SVGProps } from 'react'\nimport PropTypes from 'prop-types'\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nfunction SvgLockFill({\n title,\n titleId,\n ...props\n}: SVGProps & SVGRProps) {\n return (\n \n {title ? {title} : null}\n \n \n )\n}\n\nSvgLockFill.propTypes = {\n title: PropTypes.string,\n fill: PropTypes.string,\n width: PropTypes.string,\n height: PropTypes.string,\n stroke: PropTypes.string,\n color: PropTypes.string,\n}\nexport default SvgLockFill\n","import * as React from 'react'\nimport { SVGProps } from 'react'\nimport PropTypes from 'prop-types'\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nfunction SvgMaterialer({\n title,\n titleId,\n ...props\n}: SVGProps & SVGRProps) {\n return (\n \n {title ? {title} : null}\n \n \n \n \n \n )\n}\n\nSvgMaterialer.propTypes = {\n title: PropTypes.string,\n fill: PropTypes.string,\n width: PropTypes.string,\n height: PropTypes.string,\n stroke: PropTypes.string,\n color: PropTypes.string,\n}\nexport default SvgMaterialer\n","import * as React from 'react'\nimport { SVGProps } from 'react'\nimport PropTypes from 'prop-types'\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nfunction SvgMedlemsfordele({\n title,\n titleId,\n ...props\n}: SVGProps & SVGRProps) {\n return (\n \n {title ? {title} : null}\n \n \n \n \n \n )\n}\n\nSvgMedlemsfordele.propTypes = {\n title: PropTypes.string,\n fill: PropTypes.string,\n width: PropTypes.string,\n height: PropTypes.string,\n stroke: PropTypes.string,\n color: PropTypes.string,\n}\nexport default SvgMedlemsfordele\n","import * as React from 'react'\nimport { SVGProps } from 'react'\nimport PropTypes from 'prop-types'\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nfunction SvgMessageFill({\n title,\n titleId,\n ...props\n}: SVGProps & SVGRProps) {\n return (\n \n {title ? {title} : null}\n \n \n )\n}\n\nSvgMessageFill.propTypes = {\n title: PropTypes.string,\n fill: PropTypes.string,\n width: PropTypes.string,\n height: PropTypes.string,\n stroke: PropTypes.string,\n color: PropTypes.string,\n}\nexport default SvgMessageFill\n","import * as React from 'react'\nimport { SVGProps } from 'react'\nimport PropTypes from 'prop-types'\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nfunction SvgNote({\n title,\n titleId,\n ...props\n}: SVGProps & SVGRProps) {\n return (\n \n {title ? {title} : null}\n \n \n \n )\n}\n\nSvgNote.propTypes = {\n title: PropTypes.string,\n fill: PropTypes.string,\n width: PropTypes.string,\n height: PropTypes.string,\n stroke: PropTypes.string,\n color: PropTypes.string,\n}\nexport default SvgNote\n","import * as React from 'react'\nimport { SVGProps } from 'react'\nimport PropTypes from 'prop-types'\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nfunction SvgNotes({\n title,\n titleId,\n ...props\n}: SVGProps & SVGRProps) {\n return (\n \n {title ? {title} : null}\n \n \n \n \n \n \n )\n}\n\nSvgNotes.propTypes = {\n title: PropTypes.string,\n fill: PropTypes.string,\n width: PropTypes.string,\n height: PropTypes.string,\n stroke: PropTypes.string,\n color: PropTypes.string,\n}\nexport default SvgNotes\n","import * as React from 'react'\nimport { SVGProps } from 'react'\nimport PropTypes from 'prop-types'\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nfunction SvgOk({\n title,\n titleId,\n ...props\n}: SVGProps & SVGRProps) {\n return (\n \n {title ? {title} : null}\n \n \n \n \n \n )\n}\n\nSvgOk.propTypes = {\n title: PropTypes.string,\n fill: PropTypes.string,\n width: PropTypes.string,\n height: PropTypes.string,\n stroke: PropTypes.string,\n color: PropTypes.string,\n}\nexport default SvgOk\n","import * as React from 'react'\nimport { SVGProps } from 'react'\nimport PropTypes from 'prop-types'\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nfunction SvgOrganiseringsprocent({\n title,\n titleId,\n ...props\n}: SVGProps & SVGRProps) {\n return (\n \n {title ? {title} : null}\n \n \n \n \n \n )\n}\n\nSvgOrganiseringsprocent.propTypes = {\n title: PropTypes.string,\n fill: PropTypes.string,\n width: PropTypes.string,\n height: PropTypes.string,\n stroke: PropTypes.string,\n color: PropTypes.string,\n}\nexport default SvgOrganiseringsprocent\n","import * as React from 'react'\nimport { SVGProps } from 'react'\nimport PropTypes from 'prop-types'\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nfunction SvgPersonalInfo({\n title,\n titleId,\n ...props\n}: SVGProps & SVGRProps) {\n return (\n \n {title ? {title} : null}\n \n \n \n )\n}\n\nSvgPersonalInfo.propTypes = {\n title: PropTypes.string,\n fill: PropTypes.string,\n width: PropTypes.string,\n height: PropTypes.string,\n stroke: PropTypes.string,\n color: PropTypes.string,\n}\nexport default SvgPersonalInfo\n","import * as React from 'react'\nimport { SVGProps } from 'react'\nimport PropTypes from 'prop-types'\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nfunction SvgPhotoFill({\n title,\n titleId,\n ...props\n}: SVGProps & SVGRProps) {\n return (\n \n {title ? {title} : null}\n \n \n )\n}\n\nSvgPhotoFill.propTypes = {\n title: PropTypes.string,\n fill: PropTypes.string,\n width: PropTypes.string,\n height: PropTypes.string,\n stroke: PropTypes.string,\n color: PropTypes.string,\n}\nexport default SvgPhotoFill\n","import * as React from 'react'\nimport { SVGProps } from 'react'\nimport PropTypes from 'prop-types'\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nfunction SvgPinFill({\n title,\n titleId,\n ...props\n}: SVGProps & SVGRProps) {\n return (\n \n {title ? {title} : null}\n \n \n )\n}\n\nSvgPinFill.propTypes = {\n title: PropTypes.string,\n fill: PropTypes.string,\n width: PropTypes.string,\n height: PropTypes.string,\n stroke: PropTypes.string,\n color: PropTypes.string,\n}\nexport default SvgPinFill\n","import * as React from 'react'\nimport { SVGProps } from 'react'\nimport PropTypes from 'prop-types'\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nfunction SvgPlus({\n title,\n titleId,\n ...props\n}: SVGProps & SVGRProps) {\n return (\n \n {title ? {title} : null}\n \n \n )\n}\n\nSvgPlus.propTypes = {\n title: PropTypes.string,\n fill: PropTypes.string,\n width: PropTypes.string,\n height: PropTypes.string,\n stroke: PropTypes.string,\n color: PropTypes.string,\n}\nexport default SvgPlus\n","import * as React from 'react'\nimport { SVGProps } from 'react'\nimport PropTypes from 'prop-types'\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nfunction SvgPriority({\n title,\n titleId,\n ...props\n}: SVGProps & SVGRProps) {\n return (\n \n {title ? {title} : null}\n \n \n \n )\n}\n\nSvgPriority.propTypes = {\n title: PropTypes.string,\n fill: PropTypes.string,\n width: PropTypes.string,\n height: PropTypes.string,\n stroke: PropTypes.string,\n color: PropTypes.string,\n}\nexport default SvgPriority\n","import * as React from 'react'\nimport { SVGProps } from 'react'\nimport PropTypes from 'prop-types'\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nfunction SvgQuestion({\n title,\n titleId,\n ...props\n}: SVGProps & SVGRProps) {\n return (\n \n {title ? {title} : null}\n \n \n )\n}\n\nSvgQuestion.propTypes = {\n title: PropTypes.string,\n fill: PropTypes.string,\n width: PropTypes.string,\n height: PropTypes.string,\n stroke: PropTypes.string,\n color: PropTypes.string,\n}\nexport default SvgQuestion\n","import * as React from 'react'\nimport { SVGProps } from 'react'\nimport PropTypes from 'prop-types'\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nfunction SvgRatingStar({\n title,\n titleId,\n ...props\n}: SVGProps & SVGRProps) {\n return (\n \n {title ? {title} : null}\n \n \n )\n}\n\nSvgRatingStar.propTypes = {\n title: PropTypes.string,\n fill: PropTypes.string,\n width: PropTypes.string,\n height: PropTypes.string,\n stroke: PropTypes.string,\n color: PropTypes.string,\n}\nexport default SvgRatingStar\n","import * as React from 'react'\nimport { SVGProps } from 'react'\nimport PropTypes from 'prop-types'\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nfunction SvgSearchPerson({\n title,\n titleId,\n ...props\n}: SVGProps & SVGRProps) {\n return (\n \n {title ? {title} : null}\n \n \n \n \n )\n}\n\nSvgSearchPerson.propTypes = {\n title: PropTypes.string,\n fill: PropTypes.string,\n width: PropTypes.string,\n height: PropTypes.string,\n stroke: PropTypes.string,\n color: PropTypes.string,\n}\nexport default SvgSearchPerson\n","import * as React from 'react'\nimport { SVGProps } from 'react'\nimport PropTypes from 'prop-types'\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nfunction SvgSearch({\n title,\n titleId,\n ...props\n}: SVGProps & SVGRProps) {\n return (\n \n {title ? {title} : null}\n \n \n )\n}\n\nSvgSearch.propTypes = {\n title: PropTypes.string,\n fill: PropTypes.string,\n width: PropTypes.string,\n height: PropTypes.string,\n stroke: PropTypes.string,\n color: PropTypes.string,\n}\nexport default SvgSearch\n","import * as React from 'react'\nimport { SVGProps } from 'react'\nimport PropTypes from 'prop-types'\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nfunction SvgSendFill({\n title,\n titleId,\n ...props\n}: SVGProps & SVGRProps) {\n return (\n \n {title ? {title} : null}\n \n \n )\n}\n\nSvgSendFill.propTypes = {\n title: PropTypes.string,\n fill: PropTypes.string,\n width: PropTypes.string,\n height: PropTypes.string,\n stroke: PropTypes.string,\n color: PropTypes.string,\n}\nexport default SvgSendFill\n","import * as React from 'react'\nimport { SVGProps } from 'react'\nimport PropTypes from 'prop-types'\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nfunction SvgSendToMany({\n title,\n titleId,\n ...props\n}: SVGProps & SVGRProps) {\n return (\n \n {title ? {title} : null}\n \n \n )\n}\n\nSvgSendToMany.propTypes = {\n title: PropTypes.string,\n fill: PropTypes.string,\n width: PropTypes.string,\n height: PropTypes.string,\n stroke: PropTypes.string,\n color: PropTypes.string,\n}\nexport default SvgSendToMany\n","import * as React from 'react'\nimport { SVGProps } from 'react'\nimport PropTypes from 'prop-types'\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nfunction SvgSettings({\n title,\n titleId,\n ...props\n}: SVGProps & SVGRProps) {\n return (\n \n {title ? {title} : null}\n \n \n \n \n \n )\n}\n\nSvgSettings.propTypes = {\n title: PropTypes.string,\n fill: PropTypes.string,\n width: PropTypes.string,\n height: PropTypes.string,\n stroke: PropTypes.string,\n color: PropTypes.string,\n}\nexport default SvgSettings\n","import * as React from 'react'\nimport { SVGProps } from 'react'\nimport PropTypes from 'prop-types'\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nfunction SvgStarYellow({\n title,\n titleId,\n ...props\n}: SVGProps & SVGRProps) {\n return (\n \n {title ? {title} : null}\n \n \n )\n}\n\nSvgStarYellow.propTypes = {\n title: PropTypes.string,\n fill: PropTypes.string,\n width: PropTypes.string,\n height: PropTypes.string,\n stroke: PropTypes.string,\n color: PropTypes.string,\n}\nexport default SvgStarYellow\n","import * as React from 'react'\nimport { SVGProps } from 'react'\nimport PropTypes from 'prop-types'\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nfunction SvgStar({\n title,\n titleId,\n ...props\n}: SVGProps & SVGRProps) {\n return (\n \n {title ? {title} : null}\n \n \n )\n}\n\nSvgStar.propTypes = {\n title: PropTypes.string,\n fill: PropTypes.string,\n width: PropTypes.string,\n height: PropTypes.string,\n stroke: PropTypes.string,\n color: PropTypes.string,\n}\nexport default SvgStar\n","import * as React from 'react'\nimport { SVGProps } from 'react'\nimport PropTypes from 'prop-types'\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nfunction SvgStarFill({\n title,\n titleId,\n ...props\n}: SVGProps & SVGRProps) {\n return (\n \n {title ? {title} : null}\n \n \n )\n}\n\nSvgStarFill.propTypes = {\n title: PropTypes.string,\n fill: PropTypes.string,\n width: PropTypes.string,\n height: PropTypes.string,\n stroke: PropTypes.string,\n color: PropTypes.string,\n}\nexport default SvgStarFill\n","import * as React from 'react'\nimport { SVGProps } from 'react'\nimport PropTypes from 'prop-types'\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nfunction SvgSuitcaseFill({\n title,\n titleId,\n ...props\n}: SVGProps & SVGRProps) {\n return (\n \n {title ? {title} : null}\n \n \n \n )\n}\n\nSvgSuitcaseFill.propTypes = {\n title: PropTypes.string,\n fill: PropTypes.string,\n width: PropTypes.string,\n height: PropTypes.string,\n stroke: PropTypes.string,\n color: PropTypes.string,\n}\nexport default SvgSuitcaseFill\n","import * as React from 'react'\nimport { SVGProps } from 'react'\nimport PropTypes from 'prop-types'\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nfunction SvgTips({\n title,\n titleId,\n ...props\n}: SVGProps & SVGRProps) {\n return (\n \n {title ? {title} : null}\n \n \n \n \n \n )\n}\n\nSvgTips.propTypes = {\n title: PropTypes.string,\n fill: PropTypes.string,\n width: PropTypes.string,\n height: PropTypes.string,\n stroke: PropTypes.string,\n color: PropTypes.string,\n}\nexport default SvgTips\n","import {\r\n Close,\r\n Root,\r\n Trigger,\r\n Overlay,\r\n Content,\r\n Title,\r\n Description,\r\n Portal,\r\n} from '@radix-ui/react-dialog'\r\n\r\nimport React, { ReactNode } from 'react'\r\nimport { createUseStyles, useTheme } from 'react-jss'\r\nimport { colors } from '../../../theme/palette'\r\nimport { Close as CloseIcon } from '../../../assets/icons'\r\n\r\ninterface StyleProps {\r\n iconBGColor?: string\r\n iconBorder?: string\r\n}\r\n\r\ntype RuleNames =\r\n | 'overlayContainer'\r\n | 'container'\r\n | 'overlay'\r\n | 'button'\r\n | 'circleIcon'\r\n | '@keyframes animatetop'\r\n | '@keyframes fadeIn'\r\n\r\nconst useStyles = createUseStyles({\r\n // const useStyles = createUseStyles({\r\n '@keyframes animatetop': {\r\n from: {\r\n top: '20px',\r\n opacity: 0,\r\n },\r\n to: {\r\n top: '50%',\r\n opacity: 1,\r\n },\r\n },\r\n '@keyframes fadeIn': {\r\n from: {\r\n opacity: 0,\r\n },\r\n to: {\r\n opacity: 1,\r\n },\r\n },\r\n overlayContainer: {\r\n position: 'fixed',\r\n top: '0',\r\n left: '0',\r\n width: '100%',\r\n height: '100svh',\r\n zIndex: 6,\r\n },\r\n container: {\r\n backgroundColor: 'white',\r\n borderRadius: '6px',\r\n boxShadow:\r\n // eslint-disable-next-line max-len\r\n 'rgba(14, 18, 22, 0.35) 0px 10px 38px -10px, rgba(14, 18, 22, 0.2) 0px 10px 20px -15px',\r\n position: 'fixed',\r\n top: '50%',\r\n left: '50%',\r\n transform: 'translate(-50%, -50%)',\r\n width: '90vw',\r\n maxWidth: '500px',\r\n maxHeight: '85vh',\r\n padding: '2.75rem',\r\n animation: '.6s $animatetop',\r\n AnimationEffect: 'easeInOut',\r\n pointerEvents: 'auto',\r\n display: 'flex',\r\n flexDirection: 'column',\r\n alignItems: 'center',\r\n textAlign: 'center',\r\n zIndex: 5,\r\n '&.withIcon': {\r\n paddingTop: '80px',\r\n },\r\n },\r\n overlay: {\r\n backgroundColor: 'rgba(0, 0, 0, 0.6)',\r\n position: 'fixed',\r\n inset: '0px',\r\n animation: '.3s $fadeIn',\r\n },\r\n button: {\r\n position: 'absolute',\r\n right: 0,\r\n top: 0,\r\n display: 'inline-block',\r\n padding: '0.75em 1.75em',\r\n margin: '0 0.3em 0.3em 0',\r\n borderRadius: '0.25em',\r\n boxSizing: 'border-box',\r\n textDecoration: 'none',\r\n fontWeight: 400,\r\n textAlign: 'center',\r\n transition: 'all 0.2s',\r\n background: 'transparent',\r\n boxShadow: 0,\r\n '&:hover': {\r\n cursor: 'pointer',\r\n },\r\n '-webkit-appearance': 'none',\r\n '-moz-appearance': 'none',\r\n border: 0,\r\n '&:hover svg': {\r\n fill: colors.gray500,\r\n },\r\n },\r\n circleIcon: {\r\n position: 'absolute',\r\n top: '-40px',\r\n width: '80px',\r\n height: '80px',\r\n borderRadius: '50%',\r\n backgroundColor: ({ iconBGColor }) => {\r\n return iconBGColor || colors.blue300\r\n },\r\n border: ({ iconBorder }) => {\r\n return `2px solid ${iconBorder || colors.white}`\r\n },\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n marginRight: '1rem',\r\n },\r\n})\r\n\r\nconst DialogTrigger: React.FC = ({ children }) => {\r\n return {children}\r\n}\r\n\r\ntype DialogProps = {\r\n title?: string\r\n description?: string\r\n trigger?: ReactNode\r\n defaultOpen?: boolean\r\n hideClose?: boolean\r\n icon?: ReactNode\r\n iconBGColor?: string\r\n iconBorder?: string\r\n}\r\n\r\nconst defaultProps = {\r\n title: '',\r\n description: '',\r\n trigger: <>Trigger,\r\n defaultOpen: false,\r\n hideClose: false,\r\n icon: undefined,\r\n iconBGColor: colors.blue300,\r\n iconBorder: colors.white,\r\n}\r\n\r\nconst Dialog: React.FC = ({\r\n children,\r\n title,\r\n description,\r\n trigger,\r\n defaultOpen,\r\n hideClose,\r\n icon,\r\n iconBGColor,\r\n iconBorder,\r\n}) => {\r\n const handleIsOpen = (): void => {\r\n const documentWidth = document.documentElement.clientWidth\r\n const windowWidth = window.innerWidth\r\n const scrollBarWidth = windowWidth - documentWidth\r\n\r\n document.body.style.overflow = 'hidden'\r\n document.body.style.paddingRight = `${scrollBarWidth}px`\r\n document.body.classList.add('no-scroll')\r\n }\r\n\r\n const handleIsClosed = (): void => {\r\n document.body.style.overflow = 'unset'\r\n document.body.style.paddingRight = 'unset'\r\n document.body.classList.remove('no-scroll')\r\n }\r\n\r\n const theme = useTheme()\r\n const classes = useStyles({\r\n ...{ iconBGColor, iconBorder },\r\n theme,\r\n })\r\n\r\n return (\r\n (open ? handleIsOpen() : handleIsClosed())}\r\n >\r\n {trigger}\r\n \r\n \r\n \r\n \r\n {icon ? (\r\n
{icon}
\r\n ) : null}\r\n {title}\r\n {description}\r\n {!hideClose ? (\r\n \r\n \r\n \r\n ) : null}\r\n {children}\r\n \r\n \r\n
\r\n \r\n )\r\n}\r\n\r\nDialog.defaultProps = defaultProps\r\n\r\nexport { Dialog, DialogTrigger }\r\n","/* eslint-disable react/require-default-props */\r\nimport React from 'react'\r\nimport { createUseStyles, useTheme } from 'react-jss'\r\nimport { colors } from '../../../theme/palette'\r\n\r\n// Define Component\r\ntype RuleNames = 'text'\r\ninterface TypoStyleProps {\r\n weight?: string\r\n size?: TypographyVariants\r\n color?: string\r\n spacing?: string\r\n align?: string\r\n}\r\n\r\nexport type TypographyVariants =\r\n | 'XXXS'\r\n | 'XXS'\r\n | 'XS'\r\n | 'S'\r\n | 'M'\r\n | 'L'\r\n | 'XL'\r\n | 'XXL'\r\n | 'XXXL'\r\n | 'XXXXL'\r\n\r\nconst sizes = {\r\n XXXS: 0.75,\r\n XXS: 0.875,\r\n XS: 1,\r\n S: 1.125,\r\n M: 1.25,\r\n L: 1.5,\r\n XL: 1.75,\r\n XXL: 2.188,\r\n XXXL: 2.5,\r\n XXXXL: 3,\r\n}\r\n\r\nconst getLineheight = (size: number): number => {\r\n const suggested = size * 1.3\r\n return suggested < 3 ? suggested : 3\r\n}\r\n\r\nconst useStyles = createUseStyles({\r\n text: {\r\n fontSize: ({ size }) => {\r\n return size ? `${sizes[size]}rem` : '1rem'\r\n },\r\n fontWeight: ({ weight }) => {\r\n return weight || 'bold'\r\n },\r\n\r\n fontStyle: 'normal',\r\n lineHeight: ({ size }) => `${getLineheight(sizes[size])}rem`,\r\n color: ({ color }) => color || colors.black,\r\n textAlign: ({ align }) => {\r\n return align || 'left'\r\n },\r\n // marginBottom: ({ spacing }) => spacing,\r\n },\r\n})\r\n\r\nconst Typography: React.FC = ({\r\n tag: Tag = 'p',\r\n size = 'XXXL',\r\n weight = 'normal',\r\n color = '#000',\r\n children,\r\n spacing = '0.625rem',\r\n align = 'left',\r\n ...props\r\n}) => {\r\n const theme = useTheme()\r\n const classes = useStyles({\r\n ...{ size, weight, color, spacing, align },\r\n theme,\r\n })\r\n\r\n return (\r\n \r\n {children}\r\n \r\n )\r\n}\r\n\r\ntype TypoProps = {\r\n spacing?: string\r\n\r\n color?: string\r\n\r\n size?: TypographyVariants\r\n\r\n weight?: 'normal' | 'bold'\r\n\r\n align?: 'left' | 'center' | 'right'\r\n\r\n tag?: keyof JSX.IntrinsicElements\r\n} & React.HTMLAttributes\r\n\r\nexport { Typography }\r\n","const breakpoints = {\r\n Desktop: 990,\r\n}\r\n\r\nexport default breakpoints\r\n","import React from 'react'\r\nimport { createUseStyles } from 'react-jss'\r\nimport breakpoints from '../../../theme/breakpoints'\r\n\r\nexport interface Props {\r\n onClick?: () => void\r\n type?: 'primary' | 'secondary' | 'danger' | 'warning' | 'action'\r\n size?: 'medium' | 'large' | 'xlarge'\r\n disabled?: boolean\r\n icon?: JSX.Element\r\n buttonType?: 'button' | 'submit'\r\n style?: React.CSSProperties\r\n}\r\n\r\nexport interface ButtonLinkProps {\r\n type?: 'primary' | 'secondary' | 'danger' | 'warning' | 'action'\r\n href?: string\r\n target?: string\r\n icon?: JSX.Element\r\n size?: 'medium' | 'large' | 'xlarge'\r\n}\r\n\r\nconst BUTTON_CONTAINER = 'button'\r\n\r\nconst useStyles = createUseStyles((theme) => ({\r\n [BUTTON_CONTAINER]: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n padding: '0.5em 1.75em',\r\n margin: '0 0.3em 0.3em 0',\r\n borderRadius: '6px',\r\n boxSizing: 'border-box',\r\n textDecoration: 'none',\r\n fontWeight: 400,\r\n textAlign: 'center',\r\n transition: 'all 0.2s',\r\n boxShadow: 0,\r\n '&:hover': {\r\n cursor: 'pointer',\r\n },\r\n '-webkit-appearance': 'none',\r\n '-moz-appearance': 'none',\r\n border: 0,\r\n },\r\n\r\n medium: {\r\n fontSize: '.875em',\r\n [`@media (min-width: ${breakpoints.Desktop}px)`]: {\r\n '&': {\r\n fontSize: '.875em',\r\n },\r\n },\r\n },\r\n\r\n large: {\r\n fontSize: '.875em',\r\n minHeight: '48px',\r\n [`@media (min-width: ${breakpoints.Desktop}px)`]: {\r\n '&': {\r\n fontSize: '1rem',\r\n },\r\n },\r\n },\r\n xlarge: {\r\n fontSize: '.875em',\r\n [`@media (min-width: ${breakpoints.Desktop}px)`]: {\r\n '&': {\r\n fontSize: '1.125rem',\r\n },\r\n },\r\n },\r\n\r\n action: {\r\n composes: `$${BUTTON_CONTAINER}`,\r\n backgroundColor: theme.colors.white,\r\n color: theme.colors.black,\r\n padding: 0,\r\n margin: 0,\r\n height: 'auto',\r\n width: 'auto',\r\n display: 'block',\r\n },\r\n\r\n primary: () => ({\r\n composes: `$${BUTTON_CONTAINER}`,\r\n backgroundColor: theme.colors.green500,\r\n color: theme.colors.white,\r\n '& > svg': {\r\n fill: theme.colors.white,\r\n },\r\n '&:hover': {\r\n backgroundColor: theme.colors.green600,\r\n },\r\n '&:focus, &:active': {\r\n outline: `2px solid ${theme.colors.white}`,\r\n outlineOffset: '-2px',\r\n },\r\n '&:disabled': {\r\n opacity: 0.3,\r\n },\r\n }),\r\n secondary: {\r\n composes: `$${BUTTON_CONTAINER}`,\r\n backgroundColor: theme.colors.white,\r\n color: theme.colors.black,\r\n border: '1px solid #DDDDDD',\r\n '& > svg': {\r\n fill: theme.colors.green500,\r\n },\r\n '&:hover': {\r\n backgroundColor: theme.colors.green600,\r\n color: theme.colors.white,\r\n '&:hover svg': {\r\n fill: theme.colors.white,\r\n },\r\n },\r\n '&:active': {\r\n outline: `2px solid ${theme.colors.green600}`,\r\n backgroundColor: theme.colors.white,\r\n outlineOffset: '-2px',\r\n color: theme.colors.black,\r\n },\r\n '&:disabled': {\r\n opacity: 0.3,\r\n },\r\n },\r\n danger: {\r\n composes: `$${BUTTON_CONTAINER}`,\r\n backgroundColor: theme.colors.red500,\r\n color: theme.colors.white,\r\n border: '1px solid #DDDDDD',\r\n '&:hover': {\r\n backgroundColor: theme.colors.red600,\r\n color: theme.colors.white,\r\n },\r\n '&:active': {\r\n outline: `2px solid ${theme.colors.red600}`,\r\n backgroundColor: theme.colors.white,\r\n outlineOffset: '-2px',\r\n color: theme.colors.black,\r\n },\r\n '&:disabled': {\r\n opacity: 0.3,\r\n },\r\n },\r\n warning: {\r\n composes: `$${BUTTON_CONTAINER}`,\r\n backgroundColor: theme.colors.orange500,\r\n color: theme.colors.white,\r\n '&:hover': {\r\n backgroundColor: theme.colors.orange600,\r\n color: theme.colors.white,\r\n },\r\n '&:focus, &:active': {\r\n outline: `2px solid ${theme.colors.orange600}`,\r\n backgroundColor: theme.colors.white,\r\n outlineOffset: '-2px',\r\n color: theme.colors.black,\r\n },\r\n '&:disabled': {\r\n opacity: 0.3,\r\n },\r\n },\r\n icon: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n justifyContent: 'center',\r\n marginRight: '.5rem',\r\n '& svg': {\r\n width: '1.75em',\r\n },\r\n },\r\n}))\r\n\r\nconst Button: React.FC = (\r\n {\r\n children,\r\n onClick,\r\n type = 'primary',\r\n size = 'medium',\r\n disabled = false,\r\n icon,\r\n buttonType = 'button',\r\n style,\r\n },\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n ref\r\n) => {\r\n const classes = useStyles()\r\n\r\n return (\r\n \r\n {icon && {icon}}\r\n {children}\r\n \r\n )\r\n}\r\n\r\nconst ButtonLink: React.FC = (\r\n { children, size = 'medium', icon, type, href, target },\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n ref\r\n) => {\r\n const classes = useStyles()\r\n\r\n return (\r\n \r\n {icon && {icon}}\r\n {children}\r\n \r\n )\r\n}\r\n\r\nexport { Button, ButtonLink }\r\n","import { atom } from 'jotai'\r\n\r\nconst isAuthenticatedAtom = atom(false)\r\nconst chooseImitatorAtom = atom(false)\r\nconst authRoles = atom([])\r\n\r\nexport { isAuthenticatedAtom, chooseImitatorAtom, authRoles }\r\n","/* eslint-disable react/require-default-props */\r\nimport React, {\r\n DetailedHTMLProps,\r\n SelectHTMLAttributes,\r\n useEffect,\r\n useState,\r\n} from 'react'\r\nimport { createUseStyles } from 'react-jss'\r\nimport { colors } from '../../../theme/palette'\r\n\r\nexport interface ISelectOptions {\r\n label: string\r\n value: string\r\n}\r\n\r\nexport type SelectProps3 = {\r\n options: ISelectOptions[]\r\n useControlled?: boolean\r\n isOpen?: boolean\r\n hasError?: boolean\r\n} & Omit<\r\n DetailedHTMLProps<\r\n SelectHTMLAttributes,\r\n HTMLSelectElement\r\n >,\r\n 'size'\r\n>\r\n\r\nconst useStyles = createUseStyles({\r\n wrap: {\r\n position: 'relative',\r\n height: '3.125rem',\r\n backgroundColor: colors.white,\r\n border: `1px solid ${colors.borderColor}`,\r\n borderRadius: '6px',\r\n overflow: 'hidden',\r\n },\r\n select: {\r\n position: 'relative',\r\n height: '3.125rem',\r\n border: 0,\r\n width: '100%',\r\n fontSize: '1rem',\r\n paddingTop: '.75rem',\r\n paddingLeft: '.5rem',\r\n paddingRight: '1rem',\r\n cursor: 'pointer',\r\n color: colors.black,\r\n\r\n '&:focus-visible': {\r\n outline: 'none',\r\n },\r\n '&:focus-within + label:not([class^=\"label\"])': {\r\n color: colors.green500,\r\n fontSize: '0.75rem',\r\n height: 'auto',\r\n width: 'auto',\r\n backgroundColor: 'transparent',\r\n },\r\n '&:focus + label + label:not([class^=\"label\"])': {\r\n borderColor: colors.green500,\r\n outlineColor: colors.green500,\r\n paddingTop: '12px',\r\n },\r\n '&:active + label + label:not([class^=\"label\"])': {\r\n borderColor: colors.green500,\r\n outlineColor: colors.green500,\r\n paddingTop: '12px',\r\n },\r\n '&:disabled + label': {\r\n color: colors.labelColor,\r\n '& + span': {\r\n color: colors.labelColor,\r\n },\r\n },\r\n },\r\n hasValue: {\r\n color: colors.green500,\r\n fontSize: '0.75rem',\r\n height: 'auto',\r\n width: 'auto',\r\n\r\n transitionDuration: '300ms',\r\n pointerEvents: 'none',\r\n position: 'absolute',\r\n top: '0',\r\n left: '0',\r\n zIndex: 1,\r\n paddingTop: '0.17rem',\r\n paddingLeft: '.75rem',\r\n paddingRight: '1rem',\r\n cursor: 'pointer',\r\n },\r\n label: {\r\n transitionDuration: '300ms',\r\n pointerEvents: 'none',\r\n position: 'absolute',\r\n top: '0',\r\n left: '0',\r\n width: 'calc(100% - 20px)',\r\n height: '100%',\r\n zIndex: 1,\r\n fontSize: '1rem',\r\n paddingTop: '.75rem',\r\n paddingLeft: '0.75rem',\r\n paddingRight: '1rem',\r\n cursor: 'pointer',\r\n backgroundColor: colors.white,\r\n color: colors.labelColor,\r\n },\r\n})\r\n\r\nconst Select = React.forwardRef(\r\n (\r\n {\r\n options,\r\n onChange,\r\n defaultValue,\r\n name,\r\n placeholder,\r\n isOpen,\r\n useControlled,\r\n hasError,\r\n ...props\r\n },\r\n ref\r\n ) => {\r\n const classes = useStyles()\r\n const [query, setQuery] = useState(\r\n defaultValue\r\n )\r\n\r\n useEffect(() => {\r\n if (useControlled) {\r\n setQuery(props.value)\r\n }\r\n }, [props.value, useControlled])\r\n\r\n useEffect(() => {\r\n if (isOpen !== undefined && !isOpen) {\r\n setQuery('')\r\n }\r\n }, [isOpen])\r\n\r\n return (\r\n \r\n {\r\n setQuery(e.target.value)\r\n onChange(e)\r\n }}\r\n >\r\n {!defaultValue ? (\r\n \r\n ) : null}\r\n {options.map(({ label, value }) => (\r\n \r\n ))}\r\n \r\n\r\n \r\n {placeholder || name}\r\n \r\n \r\n )\r\n }\r\n)\r\n\r\nexport { Select }\r\n","import { mapDepartments } from '../../models/Department'\r\nimport { axiosWithAuth } from '../withAuth'\r\n\r\n// opslagsdata/hentafdelinger\r\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\r\nconst getDepartments = async () => {\r\n const response = await axiosWithAuth.get(`/opslagsdata/hentafdelinger`)\r\n\r\n return mapDepartments(response.data.Afdelinger)\r\n}\r\n\r\nexport { getDepartments }\r\n","import React, {\r\n ChangeEvent,\r\n DetailedHTMLProps,\r\n FC,\r\n forwardRef,\r\n InputHTMLAttributes,\r\n useEffect,\r\n useState,\r\n} from 'react'\r\nimport { createUseStyles, useTheme } from 'react-jss'\r\nimport { colors } from '../../../theme/palette'\r\nimport { LockFill } from '../../../assets/icons'\r\n\r\ntype RuleNames = 'label' | 'input' | 'container' | 'span' | 'lock'\r\n\r\ninterface StyleProps {\r\n query: string\r\n hasError: boolean\r\n isDatePicker?: boolean\r\n}\r\n\r\nexport type InputProps = {\r\n label: string\r\n required: boolean\r\n useDisabled?: boolean\r\n hasError?: boolean\r\n useFloats?: boolean\r\n isDatePicker?: boolean\r\n onChangeHandler?: (v: string) => void\r\n} & Omit<\r\n DetailedHTMLProps, HTMLInputElement>,\r\n 'size'\r\n>\r\n\r\nconst useStyles = createUseStyles({\r\n container: {\r\n position: 'relative',\r\n display: 'block',\r\n },\r\n label: {\r\n position: 'relative',\r\n width: '100%',\r\n '&:focus-within > span': {\r\n color: colors.green500,\r\n transform: 'translateY(-15px)',\r\n fontSize: '0.75rem',\r\n },\r\n color: colors.labelColor,\r\n },\r\n input: {\r\n minHeight: '48px',\r\n // border: ({ hasError }) =>\r\n // `1px solid ${hasError ? colors.error : colors.borderColor}`,\r\n borderRadius: '6px',\r\n width: '100%',\r\n paddingLeft: '0.75rem',\r\n // backgroundColor: ({ hasError }) => (hasError ? colors.errorBg : 'none'),\r\n\r\n paddingTop: ({ isDatePicker }) => (isDatePicker ? '12px' : '0'),\r\n\r\n '& + span': {\r\n transform: ({ isDatePicker }) =>\r\n isDatePicker ? 'translateY(-15px)' : 'none',\r\n color: ({ isDatePicker }) =>\r\n isDatePicker ? colors.green500 : colors.labelColor,\r\n fontSize: ({ isDatePicker }) => (isDatePicker ? '0.75rem' : '1rem'),\r\n },\r\n\r\n '&::placeholder': {\r\n opacity: '0',\r\n },\r\n color: colors.black,\r\n '&:not(:placeholder-shown) + span': {\r\n color: colors.green500,\r\n transform: 'translateY(-15px)',\r\n fontSize: '0.75rem',\r\n },\r\n '&:not(:placeholder-shown)': {\r\n paddingTop: '12px',\r\n },\r\n // backgroundColor: ({ hasError }) => (hasError ? colors.errorBg : 'none'),\r\n '&:focus': {\r\n borderColor: ({ hasError }) =>\r\n hasError ? colors.error : colors.green500,\r\n outlineColor: ({ hasError }) =>\r\n hasError ? colors.error : colors.green500,\r\n paddingTop: '12px',\r\n },\r\n '&:active': {\r\n borderColor: colors.green500,\r\n outlineColor: colors.green500,\r\n paddingTop: '12px',\r\n },\r\n '&:disabled': {\r\n backgroundColor: '#F5F6F8',\r\n color: colors.black,\r\n '& + span': {\r\n color: colors.black,\r\n },\r\n },\r\n },\r\n span: {\r\n position: 'absolute',\r\n top: '0',\r\n left: '.75rem',\r\n fontSize: '1rem',\r\n transitionDuration: '300ms',\r\n color: colors.labelColor,\r\n },\r\n lock: {\r\n position: 'absolute',\r\n top: '0',\r\n right: '10px',\r\n opacity: '.5',\r\n },\r\n})\r\n\r\nexport const Input: FC = forwardRef(\r\n (\r\n {\r\n label,\r\n required,\r\n type,\r\n useDisabled,\r\n hasError,\r\n isDatePicker,\r\n ...props\r\n },\r\n ref\r\n ) => {\r\n const [query] = useState('')\r\n const theme = useTheme()\r\n const [error, setError] = useState(false)\r\n const classes = useStyles({\r\n ...{ query, hasError: error, isDatePicker },\r\n theme,\r\n })\r\n\r\n useEffect(() => {\r\n setError(hasError)\r\n }, [hasError])\r\n\r\n return (\r\n
\r\n \r\n
\r\n )\r\n }\r\n)\r\n\r\nInput.defaultProps = {\r\n useDisabled: true,\r\n useFloats: false,\r\n hasError: false,\r\n isDatePicker: false,\r\n}\r\n\r\nexport const InputNumber: FC = forwardRef<\r\n HTMLInputElement,\r\n InputProps\r\n>(({ label, required, type, onChange, hasError, useFloats, ...props }, ref) => {\r\n const [query] = useState('')\r\n const theme = useTheme()\r\n const [error, setError] = useState(false)\r\n const classes = useStyles({ ...{ query, hasError: error }, theme })\r\n\r\n useEffect(() => {\r\n setError(hasError)\r\n }, [hasError])\r\n\r\n const handleChange = (event: ChangeEvent): void => {\r\n let newValue = event.target.value\r\n const modified = event\r\n if (useFloats) {\r\n newValue = newValue.replace(/[^0-9.,]/g, '')\r\n newValue = newValue\r\n .replace(/\\./, '#')\r\n .replace(/\\./g, '')\r\n .replace(/#/, '.')\r\n modified.target.value = newValue\r\n } else {\r\n modified.target.value = newValue.replace(/[^0-9]/g, '')\r\n }\r\n\r\n if (onChange) {\r\n onChange(modified)\r\n }\r\n }\r\n\r\n return (\r\n
\r\n \r\n
\r\n )\r\n})\r\n\r\nInputNumber.defaultProps = {\r\n useFloats: false,\r\n}\r\n\r\nexport default Input\r\n","import { useState, useEffect } from 'react'\r\nimport { throttle } from 'throttle-debounce'\r\n\r\ninterface WindowSize {\r\n width: number\r\n height: number\r\n}\r\n\r\nconst useWindowResize = (): WindowSize => {\r\n const [windowSize, setWindowSize] = useState({\r\n width: typeof window === 'undefined' ? 0 : window.innerWidth,\r\n height: typeof window === 'undefined' ? 0 : window.innerHeight,\r\n })\r\n\r\n useEffect(() => {\r\n const onResize = (): void => {\r\n setWindowSize({\r\n width: window.innerWidth,\r\n height: window.innerHeight,\r\n })\r\n }\r\n\r\n const resizeHandler = throttle(200, onResize)\r\n\r\n window.addEventListener('resize', resizeHandler)\r\n\r\n onResize()\r\n\r\n return () => window.removeEventListener('resize', resizeHandler)\r\n }, [])\r\n\r\n return windowSize\r\n}\r\n\r\nexport { useWindowResize }\r\n","/* eslint-disable react/require-default-props */\r\nimport React from 'react'\r\nimport { createUseStyles, useTheme } from 'react-jss'\r\nimport { Link } from 'react-router-dom'\r\nimport { colors } from '../../../theme/palette'\r\nimport { useWindowResize } from '../../../hooks/useWindowSize'\r\nimport breakpoints from '../../../theme/breakpoints'\r\nimport { Button } from '../Button/Button'\r\n\r\ntype RuleNames = 'row' | 'withHover' | 'wrapper'\r\n\r\ninterface StyleProps {\r\n gridTemplateColumns?: string\r\n minHeight?: string\r\n}\r\n\r\ntype Props = {\r\n gridTemplateColumns?: string\r\n url?: string | undefined\r\n minHeight?: string\r\n onClick?: () => void\r\n useHover?: boolean\r\n showFooter?: boolean\r\n footer?: any\r\n}\r\n\r\nconst useStyles = createUseStyles(() => ({\r\n row: ({ gridTemplateColumns, minHeight }) => {\r\n return {\r\n position: 'relative',\r\n backgroundColor: colors.white,\r\n width: '100%',\r\n color: 'black',\r\n display: 'grid',\r\n gridTemplateColumns,\r\n minHeight: minHeight || '65px',\r\n }\r\n },\r\n wrapper: {\r\n borderRadius: '4px',\r\n marginBottom: '5px',\r\n backgroundColor: colors.white,\r\n display: 'flex',\r\n flexDirection: 'column',\r\n overflow: 'hidden',\r\n },\r\n withHover: {\r\n transition: '.15s ease-in',\r\n '&:hover': {\r\n cursor: 'pointer',\r\n backgroundColor: '#f5f5f5',\r\n },\r\n },\r\n}))\r\n\r\nconst Card: React.FC = ({\r\n gridTemplateColumns = 'repeat( auto-fit, minmax(1px, 1fr) )',\r\n url,\r\n minHeight,\r\n children,\r\n onClick,\r\n useHover,\r\n showFooter,\r\n footer,\r\n}) => {\r\n const windowSize = useWindowResize()\r\n const theme = useTheme()\r\n const classes = useStyles({ ...{ gridTemplateColumns, minHeight }, theme })\r\n\r\n if (windowSize.width >= breakpoints.Desktop) {\r\n if (url) {\r\n return (\r\n
\r\n \r\n {children}\r\n \r\n
\r\n )\r\n }\r\n\r\n return (\r\n
\r\n \r\n {children}\r\n
\r\n {footer && showFooter ?
{footer}
: null}\r\n \r\n )\r\n }\r\n\r\n return null\r\n}\r\n\r\nCard.defaultProps = {\r\n useHover: false,\r\n}\r\n\r\nexport { Card }\r\n","import React from 'react'\r\nimport { createUseStyles } from 'react-jss'\r\n\r\nconst useStyles = createUseStyles(() => ({\r\n container: {\r\n width: '100%',\r\n },\r\n}))\r\n\r\nconst CardList: React.FC = ({ children }) => {\r\n const classes = useStyles()\r\n\r\n return
{children}
\r\n}\r\n\r\nexport { CardList }\r\n","import React from 'react'\r\nimport { createUseStyles, useTheme } from 'react-jss'\r\nimport { Link } from 'react-router-dom'\r\nimport { colors } from '../../../theme/palette'\r\nimport { useWindowResize } from '../../../hooks/useWindowSize'\r\nimport breakpoints from '../../../theme/breakpoints'\r\n\r\ntype RuleNames = 'row'\r\n\r\ninterface StyleProps {\r\n gridTemplateColumns?: string\r\n}\r\n\r\ninterface CardMobileProps {\r\n url?: string | undefined\r\n gridTemplateColumns?: string\r\n onClick?: () => void\r\n}\r\n\r\nconst useStyles = createUseStyles(() => ({\r\n row: ({ gridTemplateColumns }) => {\r\n return {\r\n position: 'relative',\r\n backgroundColor: colors.white,\r\n width: '100%',\r\n color: 'black',\r\n marginBottom: '1rem',\r\n display: 'grid',\r\n gridTemplateColumns,\r\n padding: '10px',\r\n }\r\n },\r\n}))\r\n\r\nconst CardMobile: React.FC = ({\r\n url,\r\n gridTemplateColumns,\r\n onClick,\r\n children,\r\n}) => {\r\n const theme = useTheme()\r\n const classes = useStyles({ ...{ gridTemplateColumns }, theme })\r\n const windowSize = useWindowResize()\r\n\r\n if (windowSize.width < breakpoints.Desktop) {\r\n if (url) {\r\n return (\r\n \r\n {children}\r\n \r\n )\r\n }\r\n\r\n return (\r\n \r\n {children}\r\n \r\n )\r\n }\r\n\r\n return null\r\n}\r\n\r\nCardMobile.defaultProps = {\r\n gridTemplateColumns: '20% 80%',\r\n}\r\n\r\nexport { CardMobile }\r\n","/* eslint-disable react/require-default-props */\r\nimport React from 'react'\r\nimport { createUseStyles, useTheme } from 'react-jss'\r\nimport { useWindowResize } from '../../../hooks/useWindowSize'\r\nimport breakpoints from '../../../theme/breakpoints'\r\n\r\ntype RuleNames = 'header'\r\n\r\ninterface StyleProps {\r\n gridTemplateColumns?: string\r\n}\r\n\r\nconst useStyles = createUseStyles({\r\n header: {\r\n display: 'grid',\r\n gridTemplateColumns: ({ gridTemplateColumns }) => {\r\n return gridTemplateColumns\r\n },\r\n },\r\n})\r\n\r\nconst cellStyles = createUseStyles({\r\n headerCell: {\r\n padding: '.7rem 1rem',\r\n },\r\n})\r\n\r\nconst CardHeader: React.FC = ({\r\n children,\r\n gridTemplateColumns = 'repeat( auto-fit, minmax(1px, 1fr) )',\r\n}) => {\r\n const theme = useTheme()\r\n const classes = useStyles({ ...{ gridTemplateColumns }, theme })\r\n\r\n return
{children}
\r\n}\r\n\r\nconst CardHeaderCell: React.FC = ({ children }) => {\r\n const windowSize = useWindowResize()\r\n const classes = cellStyles()\r\n\r\n if (windowSize.width >= breakpoints.Desktop) {\r\n return
{children}
\r\n }\r\n\r\n return null\r\n}\r\n\r\ntype Props = {\r\n gridTemplateColumns?: string\r\n}\r\n\r\nexport { CardHeader, CardHeaderCell }\r\n","import React from 'react'\r\nimport { createUseStyles } from 'react-jss'\r\nimport { colors } from '../../../theme/palette'\r\n\r\nconst useStyles = createUseStyles(() => ({\r\n row: {\r\n backgroundColor: colors.white,\r\n width: '100%',\r\n color: 'black',\r\n display: 'flex',\r\n flexDirection: 'column',\r\n },\r\n}))\r\n\r\nconst CardContentMobile: React.FC = ({ children }) => {\r\n const classes = useStyles()\r\n\r\n return
{children}
\r\n}\r\n\r\nexport { CardContentMobile }\r\n","import React from 'react'\r\nimport { createUseStyles } from 'react-jss'\r\n\r\nconst useStyles = createUseStyles(() => ({\r\n container: {\r\n position: 'relative',\r\n display: 'flex',\r\n flexDirection: 'column',\r\n justifyContent: 'center',\r\n flexBasis: 'auto',\r\n padding: '.7rem 1rem',\r\n },\r\n containerOpen: {\r\n position: 'relative',\r\n display: 'flex',\r\n flexDirection: 'column',\r\n justifyContent: 'start',\r\n flexBasis: 'auto',\r\n padding: '.7rem 1rem',\r\n },\r\n overflowHidden: {\r\n overflow: 'hidden',\r\n },\r\n}))\r\n\r\ninterface ICardCell {\r\n overflowHidden?: boolean\r\n onClick?: () => void\r\n isOpen?: boolean\r\n}\r\n\r\nconst CardCell: React.FC = ({\r\n overflowHidden,\r\n isOpen,\r\n onClick,\r\n children,\r\n}) => {\r\n const classes = useStyles()\r\n\r\n return (\r\n \r\n {children}\r\n \r\n )\r\n}\r\n\r\nCardCell.defaultProps = {\r\n overflowHidden: false,\r\n}\r\n\r\nexport { CardCell }\r\n","import { createUseStyles } from 'react-jss'\r\nimport { colors } from '../../../theme/palette'\r\n\r\ntype RuleNames = 'circle' | 'text' | 'image' | 'iconContainer'\r\ntype RuleNamesCirleIcon = 'iconContainer'\r\n\r\ninterface StyleProps {\r\n mWidth?: string\r\n customRight?: string\r\n fontSize?: string\r\n iconWidth?: string\r\n backgroundColor?: string\r\n borderColor?: string\r\n borderWidth?: string\r\n}\r\n\r\ninterface CirleIconStylesProps {\r\n width: string\r\n backgroundColor?: string\r\n withBorder?: boolean\r\n borderWidth: string\r\n}\r\n\r\nexport const cirleIconStyles = createUseStyles<\r\n RuleNamesCirleIcon,\r\n CirleIconStylesProps,\r\n Jss.Theme\r\n>({\r\n iconContainer: {\r\n position: 'relative',\r\n width: ({ width }) => width,\r\n height: ({ width }) => width,\r\n backgroundColor: ({ backgroundColor }) => {\r\n return backgroundColor || colors.blue300\r\n },\r\n border: ({ borderWidth, withBorder }) => {\r\n return withBorder ? `${borderWidth} solid ${colors.white}` : 'none'\r\n },\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n borderRadius: '50%',\r\n overflow: 'hidden',\r\n aspectRatio: '1/1',\r\n },\r\n})\r\n\r\nexport const styles = createUseStyles({\r\n circle: {\r\n position: 'relative',\r\n width: '100%',\r\n borderRadius: '50%',\r\n overflow: 'hidden',\r\n aspectRatio: '1/1',\r\n marginRight: ({ customRight }) => {\r\n return customRight || '1rem'\r\n },\r\n maxWidth: ({ mWidth }) => mWidth || '2.75rem',\r\n },\r\n text: {\r\n backgroundColor: colors.blue300,\r\n height: '100%',\r\n width: '100%',\r\n borderRadius: '50%',\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n fontSize: ({ fontSize }) => fontSize || '1.125rem',\r\n color: colors.green500,\r\n fontWeight: 700,\r\n },\r\n image: {\r\n backgroundColor: colors.black,\r\n height: '100%',\r\n width: '100%',\r\n '& img': {\r\n objectFit: 'cover',\r\n width: '100%',\r\n },\r\n },\r\n iconContainer: {\r\n borderRadius: '50%',\r\n height: '100%',\r\n width: '100%',\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n color: colors.green500,\r\n border: `3px solid ${colors.white}`,\r\n backgroundColor: ({ backgroundColor }) => {\r\n return backgroundColor || colors.blue300\r\n },\r\n borderColor: ({ borderColor }) => {\r\n return borderColor || colors.white\r\n },\r\n borderWidth: ({ borderWidth }) => {\r\n return borderWidth || '3px'\r\n },\r\n\r\n '& > svg': {\r\n width: ({ iconWidth }) => iconWidth || '70%',\r\n },\r\n },\r\n})\r\n","/* eslint-disable react/no-unused-prop-types */\r\nimport React from 'react'\r\nimport { useTheme } from 'react-jss'\r\nimport { styles, cirleIconStyles } from './styles'\r\n\r\ninterface CircleImageProps {\r\n url: string\r\n}\r\ninterface CircleProps {\r\n mWidth?: string\r\n marginRight?: string\r\n fontSize?: string\r\n borderWidth?: string\r\n}\r\n\r\ninterface CircleIconProps {\r\n iconWidth?: string\r\n backgroundColor?: string\r\n borderColor?: string\r\n borderWidth?: string\r\n}\r\n\r\ninterface CircleIcon2Props {\r\n width: string\r\n backgroundColor?: string\r\n withBorder?: boolean\r\n borderWidth?: string\r\n}\r\n\r\n// TODO Add extra icon (over) possibility - for ex. edit profile pic\r\n\r\nconst Circle: React.FC = ({\r\n children,\r\n mWidth = '2.75rem',\r\n marginRight = '1rem',\r\n}) => {\r\n const theme = useTheme()\r\n const classes = styles({\r\n ...{ mWidth, customRight: marginRight },\r\n theme,\r\n })\r\n\r\n return
{children}
\r\n}\r\n\r\nconst CircleText: React.FC = ({\r\n children,\r\n fontSize = '1.125rem',\r\n}) => {\r\n const theme = useTheme()\r\n const classes = styles({\r\n ...{ fontSize },\r\n theme,\r\n })\r\n\r\n return
{children}
\r\n}\r\n\r\nconst CircleIcon: React.FC = ({\r\n children,\r\n iconWidth,\r\n backgroundColor,\r\n borderColor,\r\n borderWidth,\r\n}) => {\r\n const theme = useTheme()\r\n const classes = styles({\r\n ...{ iconWidth, backgroundColor, borderColor, borderWidth },\r\n theme,\r\n })\r\n\r\n return
{children}
\r\n}\r\n\r\nconst CircleIcon2: React.FC = ({\r\n width,\r\n backgroundColor,\r\n children,\r\n withBorder,\r\n borderWidth,\r\n}) => {\r\n const theme = useTheme()\r\n const classes = cirleIconStyles({\r\n ...{\r\n width,\r\n backgroundColor,\r\n withBorder,\r\n borderWidth,\r\n },\r\n theme,\r\n })\r\n\r\n return
{children}
\r\n}\r\n\r\nconst CircleImage: React.FC = ({ url }) => {\r\n const theme = useTheme()\r\n const classes = styles({\r\n ...{},\r\n theme,\r\n })\r\n\r\n return (\r\n
\r\n \"profileimage\"\r\n
\r\n )\r\n}\r\n\r\nCircle.defaultProps = {\r\n mWidth: '2.75rem',\r\n marginRight: '1rem',\r\n}\r\n\r\nCircleIcon2.defaultProps = {\r\n borderWidth: '3px',\r\n}\r\n\r\nexport { Circle, CircleText, CircleImage, CircleIcon, CircleIcon2 }\r\n","import React from 'react'\r\nimport { createUseStyles } from 'react-jss'\r\nimport { ChevronRight } from '../../../assets/icons'\r\nimport { colors } from '../../../theme/palette'\r\nimport { sortProperty, sortProperties } from '../../../utils/sortHelper'\r\n\r\ninterface Props {\r\n onClick: (event: React.MouseEvent) => void\r\n sort: sortProperty\r\n name: sortProperties\r\n}\r\n\r\nconst useStyles = createUseStyles(() => ({\r\n button: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n padding: '0.75em 0',\r\n margin: '0 0.3em 0.3em 0',\r\n borderRadius: '6px',\r\n boxSizing: 'border-box',\r\n textDecoration: 'none',\r\n fontWeight: 400,\r\n textAlign: 'center',\r\n transition: 'all 0.2s',\r\n boxShadow: 0,\r\n '&:hover': {\r\n cursor: 'pointer',\r\n color: colors.black,\r\n fontWeight: '700',\r\n },\r\n '-webkit-appearance': 'none',\r\n '-moz-appearance': 'none',\r\n fontStyle: 'normal',\r\n fontSize: '16px',\r\n lineHeight: '120%',\r\n color: '#000000',\r\n border: 0,\r\n background: 'none',\r\n '&.active': {\r\n textDecoration: 'underline',\r\n fontWeight: '700',\r\n },\r\n },\r\n icon: {\r\n display: 'flex',\r\n transform: 'rotate(-90deg)',\r\n position: 'relative',\r\n marginLeft: '10px',\r\n top: '1px',\r\n '.active &.ascending': {\r\n transform: 'rotate(90deg)',\r\n },\r\n },\r\n}))\r\n\r\nconst SortButton: React.FC = ({ onClick, sort, name, children }) => {\r\n const classes = useStyles()\r\n\r\n return (\r\n \r\n {children}\r\n\r\n \r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport { SortButton }\r\n","export const getInitials = (nameString: string): string => {\r\n const fullName = nameString.split(' ')\r\n const initials = fullName.shift().charAt(0) + fullName.pop().charAt(0)\r\n return initials.toUpperCase()\r\n}\r\n","/* eslint-disable max-classes-per-file */\r\nexport interface Idata {\r\n Nummer: number\r\n Navn: string\r\n KortNavn?: string\r\n Type?: string\r\n}\r\n\r\nexport interface IdataTRfor {\r\n KortNavn: string\r\n Navn: string\r\n Sorteringsorden: number\r\n Type: string\r\n Medlemsidenter: number[]\r\n}\r\n\r\nexport class FilterWorkplace {\r\n name = ''\r\n\r\n id = 0\r\n\r\n static build(data: Idata): FilterWorkplace {\r\n const workPlace = new FilterWorkplace()\r\n\r\n workPlace.id = data.Nummer\r\n workPlace.name = data.Navn\r\n\r\n return workPlace\r\n }\r\n}\r\n\r\nexport class FilterWorkGroup {\r\n name = ''\r\n\r\n id = 0\r\n\r\n static build(data: Idata): FilterWorkGroup {\r\n const workGroup = new FilterWorkGroup()\r\n\r\n workGroup.id = data.Nummer\r\n workGroup.name = data.Navn\r\n\r\n return workGroup\r\n }\r\n}\r\n\r\nexport class FilterPosition {\r\n name = ''\r\n\r\n id = 0\r\n\r\n static build(data: Idata): FilterPosition {\r\n const obj = new FilterPosition()\r\n\r\n obj.id = data.Nummer\r\n obj.name = data.Navn\r\n\r\n return obj\r\n }\r\n}\r\n\r\nexport class FilterUpdateStatus {\r\n name = ''\r\n\r\n id = ''\r\n}\r\n\r\nexport class FilterTypeOfRepresentative {\r\n name = ''\r\n\r\n type = ''\r\n\r\n shortName = ''\r\n\r\n static build(data: Idata): FilterTypeOfRepresentative {\r\n const obj = new FilterTypeOfRepresentative()\r\n\r\n obj.name = data.Navn\r\n obj.type = data.Type ? data.Type : ''\r\n obj.shortName = data.KortNavn ? data.KortNavn : ''\r\n\r\n return obj\r\n }\r\n}\r\n\r\nexport class FilterTRFor {\r\n shortName = ''\r\n\r\n name = ''\r\n\r\n sort = 0\r\n\r\n type = ''\r\n\r\n memberIds: number[]\r\n\r\n displayName = ''\r\n\r\n static build(data: IdataTRfor): FilterTRFor {\r\n const obj = new FilterTRFor()\r\n\r\n obj.name = data.Navn\r\n obj.displayName = `${data.Navn}(${data.KortNavn})`\r\n obj.shortName = data.KortNavn\r\n obj.sort = data.Sorteringsorden\r\n obj.type = data.Type\r\n obj.memberIds = data.Medlemsidenter\r\n\r\n return obj\r\n }\r\n}\r\n\r\nexport interface IFilter {\r\n workplaces: FilterWorkplace[]\r\n groups: FilterWorkGroup[]\r\n positions: FilterPosition[]\r\n typeOfRepresentative: FilterTypeOfRepresentative[]\r\n representing: FilterTRFor[]\r\n updateStatus: FilterUpdateStatus[]\r\n}\r\n\r\nexport const initialFilter: IFilter = {\r\n workplaces: [],\r\n groups: [],\r\n typeOfRepresentative: [],\r\n representing: [],\r\n positions: [],\r\n updateStatus: [],\r\n}\r\n\r\nexport const initialSelectedFilters: IFilter = {\r\n workplaces: [],\r\n groups: [],\r\n typeOfRepresentative: [],\r\n representing: [],\r\n positions: [],\r\n updateStatus: [],\r\n}\r\n","import {\r\n initialFilter,\r\n FilterWorkplace,\r\n IFilter,\r\n FilterWorkGroup,\r\n FilterPosition,\r\n FilterTypeOfRepresentative,\r\n Idata,\r\n IdataTRfor,\r\n FilterTRFor,\r\n FilterUpdateStatus,\r\n} from '../models/Filter'\r\n\r\nimport { Member } from '../models/Member'\r\n\r\nexport type IFilterData = {\r\n UdsoegteArbejdssteder: Idata[]\r\n UdsoegteFaggrupper: Idata[]\r\n UdsoegteStillinger: Idata[]\r\n UdsoegteTillidshverv: Idata[]\r\n TRTillidshvervMedlemLister: IdataTRfor[]\r\n}\r\n\r\nexport function filterTypeOfRepresentative(\r\n pots: FilterTypeOfRepresentative[],\r\n items: Member[]\r\n): Member[] {\r\n const filtered: Member[] = []\r\n\r\n items.forEach((member) => {\r\n return member.typeOfRepresentatives.forEach((pot) => {\r\n const isFound = pots.some((element) => {\r\n if (element.name === pot.name) {\r\n return true\r\n }\r\n\r\n return false\r\n })\r\n\r\n if (isFound) {\r\n filtered.push(member)\r\n }\r\n })\r\n })\r\n\r\n return filtered\r\n}\r\n\r\nexport function filterWorkplaces(\r\n workplaces: FilterWorkplace[],\r\n items: Member[]\r\n): Member[] {\r\n const filtered: Member[] = []\r\n\r\n items.forEach((member) => {\r\n return member.workPlaces.forEach((workPlace) => {\r\n const isFound = workplaces.some((element) => {\r\n if (element.id === workPlace.number) {\r\n return true\r\n }\r\n\r\n return false\r\n })\r\n\r\n if (isFound) {\r\n if (!filtered.find((m) => m.memberId === member.memberId)) {\r\n filtered.push(member)\r\n }\r\n }\r\n })\r\n })\r\n\r\n return filtered\r\n}\r\n\r\nexport function filterWorkgroups(\r\n workgroups: FilterWorkGroup[],\r\n items: Member[]\r\n): Member[] {\r\n const filtered: Member[] = []\r\n\r\n items.forEach((member) => {\r\n return member.positions.forEach((position) => {\r\n const isFound = workgroups.some((element) => {\r\n if (element.id === position.group.id) {\r\n return true\r\n }\r\n\r\n return false\r\n })\r\n\r\n if (isFound) {\r\n if (!filtered.find((m) => m.memberId === member.memberId)) {\r\n filtered.push(member)\r\n }\r\n }\r\n })\r\n })\r\n\r\n return filtered\r\n}\r\n\r\nexport function filterPositions(\r\n positions: FilterPosition[],\r\n items: Member[]\r\n): Member[] {\r\n const filtered: Member[] = []\r\n\r\n items.forEach((member) => {\r\n return member.positions.forEach((position) => {\r\n const isFound = positions.some((element) => {\r\n if (element.id === position.id) {\r\n return true\r\n }\r\n\r\n return false\r\n })\r\n\r\n if (isFound) {\r\n if (!filtered.find((m) => m.memberId === member.memberId)) {\r\n filtered.push(member)\r\n }\r\n }\r\n })\r\n })\r\n\r\n return filtered\r\n}\r\n\r\nexport function filterUpdateStatus(\r\n statuses: FilterUpdateStatus[],\r\n items: Member[]\r\n): Member[] {\r\n const filtered: Member[] = []\r\n\r\n items.forEach((member) => {\r\n const isFound = statuses.some((element) => {\r\n if (element.id === member.status) {\r\n return true\r\n }\r\n\r\n return false\r\n })\r\n\r\n if (isFound) {\r\n filtered.push(member)\r\n }\r\n })\r\n\r\n return filtered\r\n}\r\n\r\nexport function filterTRforHelper(\r\n trFor: FilterTRFor[],\r\n items: Member[]\r\n): Member[] {\r\n const filtered: Member[] = []\r\n\r\n trFor.forEach((filter) => {\r\n filter.memberIds.forEach((id) => {\r\n const m = items.find((mem) => mem.memberId === id)\r\n\r\n if (m) filtered.push(m)\r\n })\r\n })\r\n\r\n return filtered\r\n}\r\n\r\nexport function initFilter(data: IFilterData): IFilter {\r\n const filter = { ...initialFilter }\r\n\r\n if (data.UdsoegteArbejdssteder) {\r\n filter.workplaces = data.UdsoegteArbejdssteder.map((workPlace: Idata) =>\r\n FilterWorkplace.build(workPlace)\r\n )\r\n }\r\n\r\n if (data.UdsoegteFaggrupper) {\r\n filter.groups = data.UdsoegteFaggrupper.map((group: Idata) =>\r\n FilterWorkGroup.build(group)\r\n )\r\n }\r\n\r\n if (data.UdsoegteStillinger) {\r\n filter.positions = data.UdsoegteStillinger.map((position: Idata) =>\r\n FilterPosition.build(position)\r\n )\r\n }\r\n\r\n if (data.UdsoegteTillidshverv) {\r\n filter.typeOfRepresentative = data.UdsoegteTillidshverv.map(\r\n (trust: Idata) => FilterTypeOfRepresentative.build(trust)\r\n )\r\n }\r\n\r\n if (data.TRTillidshvervMedlemLister) {\r\n filter.representing = data.TRTillidshvervMedlemLister.map(\r\n (trfor: IdataTRfor) => FilterTRFor.build(trfor)\r\n )\r\n }\r\n\r\n return filter\r\n}\r\n\r\nexport function filterItems(selected: IFilter, items: Member[]): Member[] {\r\n let filtered = [...items]\r\n\r\n if (selected.representing.length) {\r\n filtered = filterTRforHelper(selected.representing, filtered)\r\n }\r\n\r\n if (selected.workplaces.length) {\r\n filtered = filterWorkplaces(selected.workplaces, filtered)\r\n }\r\n\r\n if (selected.groups.length) {\r\n filtered = filterWorkgroups(selected.groups, filtered)\r\n }\r\n\r\n if (selected.positions.length) {\r\n filtered = filterPositions(selected.positions, filtered)\r\n }\r\n\r\n if (selected.typeOfRepresentative.length) {\r\n filtered = filterTypeOfRepresentative(\r\n selected.typeOfRepresentative,\r\n filtered\r\n )\r\n }\r\n\r\n if (selected.updateStatus.length) {\r\n filtered = filterUpdateStatus(selected.updateStatus, filtered)\r\n }\r\n\r\n return filtered\r\n}\r\n\r\nexport function updateWorkplaces(\r\n workPlace: FilterWorkplace,\r\n selectedItems: IFilter\r\n): IFilter {\r\n const selected = { ...selectedItems }\r\n\r\n const isFound = selected.workplaces.some((item) => item.id === workPlace.id)\r\n const workplaces = [...selectedItems.workplaces]\r\n\r\n if (isFound) {\r\n const indexOf = workplaces.findIndex((w) => w.id === workPlace.id)\r\n workplaces.splice(indexOf, 1)\r\n selected.workplaces = workplaces\r\n } else {\r\n workplaces.push(workPlace)\r\n selected.workplaces = workplaces\r\n }\r\n\r\n return selected\r\n}\r\n\r\nexport function updatePositions(\r\n position: FilterPosition,\r\n selectedItems: IFilter\r\n): IFilter {\r\n const selected = { ...selectedItems }\r\n\r\n const isFound = selected.positions.some((item) => item.id === position.id)\r\n const positions = [...selectedItems.positions]\r\n\r\n if (isFound) {\r\n const indexOf = positions.findIndex((w) => w.id === position.id)\r\n positions.splice(indexOf, 1)\r\n selected.positions = positions\r\n } else {\r\n positions.push(position)\r\n selected.positions = positions\r\n }\r\n\r\n return selected\r\n}\r\n\r\nexport function updateTypeOfRepresentatives(\r\n position: FilterTypeOfRepresentative,\r\n selectedItems: IFilter\r\n): IFilter {\r\n const selected = { ...selectedItems }\r\n\r\n const isFound = selected.typeOfRepresentative.some(\r\n (item) => item.name === position.name\r\n )\r\n const positions = [...selectedItems.typeOfRepresentative]\r\n\r\n if (isFound) {\r\n const indexOf = positions.findIndex((p) => p.name === position.name)\r\n positions.splice(indexOf, 1)\r\n selected.typeOfRepresentative = positions\r\n } else {\r\n positions.push(position)\r\n selected.typeOfRepresentative = positions\r\n }\r\n\r\n return selected\r\n}\r\n\r\nexport function updateTRFor(\r\n duty: FilterTRFor,\r\n selectedItems: IFilter\r\n): IFilter {\r\n const selected = { ...selectedItems }\r\n\r\n const isFound = selected.representing.some(\r\n (item) => item.name === duty.name\r\n )\r\n const trFors = [...selectedItems.representing]\r\n\r\n if (isFound) {\r\n const indexOf = trFors.findIndex((t) => t.name === duty.name)\r\n trFors.splice(indexOf, 1)\r\n selected.representing = trFors\r\n } else {\r\n trFors.push(duty)\r\n selected.representing = trFors\r\n }\r\n\r\n return selected\r\n}\r\n\r\nexport function updateUpdateStatus(\r\n status: FilterUpdateStatus,\r\n selectedItems: IFilter\r\n): IFilter {\r\n const selected = { ...selectedItems }\r\n\r\n const isFound = selected.updateStatus.some(\r\n (item) => item.name === status.name\r\n )\r\n const statuses = [...selectedItems.updateStatus]\r\n\r\n if (isFound) {\r\n const indexOf = statuses.findIndex((s) => s.name === status.name)\r\n statuses.splice(indexOf, 1)\r\n selected.updateStatus = statuses\r\n } else {\r\n statuses.push(status)\r\n selected.updateStatus = statuses\r\n }\r\n\r\n return selected\r\n}\r\n\r\nexport function updateGroups(\r\n group: FilterWorkGroup,\r\n selectedItems: IFilter\r\n): IFilter {\r\n const selected = { ...selectedItems }\r\n const isFound = selected.groups.some((item) => item.id === group.id)\r\n const groups = [...selectedItems.groups]\r\n\r\n if (isFound) {\r\n const indexOf = groups.findIndex((w) => w.id === group.id)\r\n groups.splice(indexOf, 1)\r\n selected.groups = groups\r\n } else {\r\n groups.push(group)\r\n selected.groups = groups\r\n }\r\n\r\n return selected\r\n}\r\n","import { atom, useAtom } from 'jotai'\r\nimport { atomWithQuery } from 'jotai/query'\r\nimport { AxiosResponse } from 'axios'\r\nimport { axiosWithAuth, axiosWithImitator } from '../withAuth'\r\nimport {\r\n mapMembers,\r\n IMemberData,\r\n IUpdateMemberData,\r\n Member,\r\n ICancelWorkplace,\r\n} from '../../models/Member'\r\nimport { IFilterData, initFilter } from '../../utils/filterhelper'\r\nimport { IFilter } from '../../models/Filter'\r\nimport { mapWorkplaces, Workplace } from '../../models/Workplace'\r\n\r\nexport type TypeResponseGetMembers = {\r\n Medlemmer: IMemberData[]\r\n}\r\nexport type TypeResponse = TypeResponseGetMembers & IFilterData\r\nconst idAtom = atom(1)\r\n\r\nconst membersAtom = atomWithQuery((get) => ({\r\n queryKey: ['members', get(idAtom)],\r\n queryFn: async () => {\r\n // const url = `/medlem/hentegnemedlemmer`\r\n const url = '/medlem/hentegnemedlemmerprarbejdsstedprtrhverv'\r\n const response = await axiosWithImitator.get(url)\r\n\r\n const { data } = response\r\n return {\r\n members: mapMembers(data.Medlemmer),\r\n filter: initFilter(data),\r\n }\r\n },\r\n}))\r\n\r\nconst getOwnMembers = async (): Promise<{\r\n members: Member[]\r\n filter: IFilter\r\n}> => {\r\n const response = await axiosWithImitator.get(`/medlem/hentegnemedlemmer`)\r\n\r\n const { data } = response\r\n return {\r\n members: mapMembers(data.Medlemmer),\r\n filter: initFilter(data),\r\n }\r\n}\r\n\r\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\r\nconst searchMembers = async (queryString: string) => {\r\n let error\r\n try {\r\n const response = await axiosWithImitator.get(\r\n `/medlem/soegallemedlemmer?${queryString}`\r\n )\r\n\r\n return response\r\n } catch (err) {\r\n error = err\r\n return error\r\n }\r\n}\r\n\r\nconst getOwnMember = async (id: string): Promise => {\r\n const response = await axiosWithImitator.get(\r\n `/medlem/hentegetmedlem?request.medlemsident=${id}`\r\n )\r\n\r\n return response\r\n}\r\n\r\nconst getMemberAfterSearch = async (id: number): Promise => {\r\n const response = await axiosWithImitator.get(\r\n `/medlem/hentsoegmedlem?request.medlemsident=${id}`\r\n )\r\n\r\n return response\r\n}\r\n\r\nconst updateOwnMember = async (\r\n values: IUpdateMemberData\r\n): Promise => {\r\n const response = await axiosWithImitator.post(\r\n `/opdatering/opdatermedlem`,\r\n values\r\n )\r\n return response\r\n}\r\n\r\n// opdatering/opdaterogtilfoejeksisterendemedlem\r\nconst addMemberToOwnList = async (\r\n values: IUpdateMemberData\r\n): Promise => {\r\n const response = await axiosWithImitator.post(\r\n `/opdatering/opdaterogtilfoejeksisterendemedlem`,\r\n values\r\n )\r\n return response\r\n}\r\n\r\n// opdatering/tilfoejmedlemarbejdssted\r\nconst addMemberToWorkplace = async (\r\n values: IUpdateMemberData\r\n): Promise => {\r\n const response = await axiosWithImitator.post(\r\n `/opdatering/tilfoejmedlemarbejdssted`,\r\n values\r\n )\r\n return response\r\n}\r\n\r\nconst cancelMemberFromWorkplace = async (\r\n values: ICancelWorkplace\r\n): Promise => {\r\n const response = await axiosWithImitator.post(\r\n `/opdatering/medlemophoert`,\r\n values\r\n )\r\n return response\r\n}\r\n\r\n// /medlem/hentegnemedlemmerprarbejdsstedprtrhverv\r\nconst getMemberWorkPlaces = async (): Promise<{\r\n workplaces: Workplace[]\r\n}> => {\r\n const response = await axiosWithImitator.get(\r\n '/medlem/hentegnemedlemmerprarbejdsstedprtrhverv'\r\n )\r\n\r\n return {\r\n workplaces: mapWorkplaces(response.data.ArbejdsstedTRHvervMedlemLister),\r\n }\r\n}\r\n\r\nexport {\r\n membersAtom,\r\n searchMembers,\r\n getMemberAfterSearch,\r\n getOwnMember,\r\n getOwnMembers,\r\n updateOwnMember,\r\n addMemberToOwnList,\r\n addMemberToWorkplace,\r\n cancelMemberFromWorkplace,\r\n getMemberWorkPlaces,\r\n}\r\n","import { Update } from '@reduxjs/toolkit'\r\nimport { Member } from '../models/Member'\r\nimport { Note } from '../models/Note'\r\nimport { UpdateBatch } from '../models/UpdateBatch'\r\nimport { Workplace } from '../models/Workplace'\r\n\r\nexport type sortProperties =\r\n | 'name'\r\n | 'arbejdssted'\r\n | 'status'\r\n | 'notes'\r\n | 'isOwnMember'\r\n | 'department'\r\n | 'birthday'\r\n | 'age'\r\n | 'date'\r\n | 'favorite'\r\n | 'created'\r\n | 'updateType'\r\n | 'updateProfile'\r\n | 'updateUpdated'\r\n | 'numberOfMembers'\r\n | 'isRead'\r\nexport type sortDirectionType = 'ascending' | 'descending '\r\n\r\nexport type sortProperty = {\r\n direction: sortDirectionType\r\n property: sortProperties\r\n}\r\n\r\nexport interface ISortName {\r\n property: Extract\r\n}\r\n\r\nfunction compareName(objectA: T, objectB: T, sorter: ISortName): number {\r\n if (objectA[sorter.property] < objectB[sorter.property]) {\r\n return -1\r\n }\r\n\r\n if (objectA[sorter.property] > objectB[sorter.property]) {\r\n return 1\r\n }\r\n return 0\r\n}\r\n\r\nfunction compareMemberOnUpdateName(a: UpdateBatch, b: UpdateBatch): number {\r\n if (a.member.fullName < b.member.fullName) {\r\n return -1\r\n }\r\n\r\n if (a.member.fullName > b.member.fullName) {\r\n return 1\r\n }\r\n return 0\r\n}\r\n\r\nfunction compareProfileOnUpdateName(a: UpdateBatch, b: UpdateBatch): number {\r\n if (a.profile.fullName < b.profile.fullName) {\r\n return -1\r\n }\r\n\r\n if (a.profile.fullName > b.profile.fullName) {\r\n return 1\r\n }\r\n return 0\r\n}\r\n\r\nfunction sortByNoteFavorite(notes: Note[]): Note[] {\r\n return notes.sort((a: Note, b: Note) => {\r\n if (a.isFavorite) return -1\r\n if (b.isFavorite) return 1\r\n return 0\r\n })\r\n}\r\n\r\nfunction sortByDate(members: Member[]): Member[] {\r\n return members.sort(\r\n (a: Member, b: Member) => b.birthday.getTime() - a.birthday.getTime()\r\n )\r\n}\r\n\r\nfunction sortByNoteDate(notes: Note[]): Note[] {\r\n return notes.sort(\r\n (a: Note, b: Note) => b.updated.getTime() - a.updated.getTime()\r\n )\r\n}\r\n\r\nfunction sortByUpdateCreatedDate(updates: UpdateBatch[]): UpdateBatch[] {\r\n return updates.sort(\r\n (a: UpdateBatch, b: UpdateBatch) =>\r\n new Date(b.created).getTime() - new Date(a.created).getTime()\r\n )\r\n}\r\n\r\nfunction sortByUpdateUpdatedDate(updates: UpdateBatch[]): UpdateBatch[] {\r\n return updates.sort(\r\n (a: UpdateBatch, b: UpdateBatch) =>\r\n new Date(b.updated).getTime() - new Date(a.updated).getTime()\r\n )\r\n}\r\n\r\nfunction compareAge(a: Member, b: Member): number {\r\n if (a.age < b.age) {\r\n return -1\r\n }\r\n if (a.age > b.age) {\r\n return 1\r\n }\r\n return 0\r\n}\r\n\r\nfunction compareWorkplaces(a: Member, b: Member): number {\r\n if (\r\n a.primaryWorkPlace.name.toLowerCase() <\r\n b.primaryWorkPlace.name.toLowerCase()\r\n ) {\r\n return -1\r\n }\r\n if (\r\n a.primaryWorkPlace.name.toLowerCase() >\r\n b.primaryWorkPlace.name.toLowerCase()\r\n ) {\r\n return 1\r\n }\r\n return 0\r\n}\r\n\r\nfunction compareStatus(a: Member): number {\r\n if (a.status === 'AfventerGodkendelse') {\r\n return -1\r\n }\r\n if (a.status === 'IkkeOpdateret ') {\r\n return 1\r\n }\r\n return 0\r\n}\r\n\r\nfunction compareNotes(a: Member | Workplace, b: Member | Workplace): number {\r\n if (a.numberOfNotes < b.numberOfNotes) {\r\n return -1\r\n }\r\n if (a.numberOfNotes > b.numberOfNotes) {\r\n return 1\r\n }\r\n return 0\r\n}\r\n\r\nfunction compareIsRead(a: Note): number {\r\n if (!a.isRead) {\r\n return -1\r\n }\r\n if (a.isRead) {\r\n return 1\r\n }\r\n return 0\r\n}\r\n\r\nfunction compareNumberOfMembersOnWorkplace(a: Workplace, b: Workplace): number {\r\n if (a.numberOfMembers < b.numberOfMembers) {\r\n return -1\r\n }\r\n if (a.numberOfMembers > b.numberOfMembers) {\r\n return 1\r\n }\r\n return 0\r\n}\r\n\r\nfunction compareIsOwnMember(a: Member): number {\r\n if (a.isOwnMember) {\r\n return -1\r\n }\r\n if (!a.isOwnMember) {\r\n return 1\r\n }\r\n return 0\r\n}\r\n\r\nfunction compareDepartments(a: Member, b: Member): number {\r\n if (\r\n a.department.name &&\r\n b.department.name &&\r\n a.department.name.toLowerCase() < b.department.name.toLowerCase()\r\n ) {\r\n return -1\r\n }\r\n if (\r\n a.department.name &&\r\n b.department.name &&\r\n a.department.name.toLowerCase() > b.department.name.toLowerCase()\r\n ) {\r\n return 1\r\n }\r\n return 0\r\n}\r\n\r\nexport const sortWorkplacesBy = (\r\n workplaces: Workplace[],\r\n sort: sortProperty\r\n): Workplace[] => {\r\n let sorted = [...workplaces]\r\n\r\n switch (sort.property) {\r\n case 'name':\r\n sorted = sorted.sort((a, b) =>\r\n compareName(a, b, { property: 'name' })\r\n )\r\n break\r\n case 'numberOfMembers':\r\n sorted = sorted.sort(compareNumberOfMembersOnWorkplace)\r\n break\r\n case 'notes':\r\n sorted = sorted.sort(compareNotes)\r\n break\r\n\r\n default:\r\n break\r\n }\r\n\r\n if (sort.direction === 'descending ') sorted = sorted.reverse()\r\n\r\n return sorted\r\n}\r\n\r\nexport const sortUpdatesBy = (\r\n updates: UpdateBatch[],\r\n sort: sortProperty\r\n): UpdateBatch[] => {\r\n let sorted = [...updates]\r\n\r\n switch (sort.property) {\r\n case 'status': {\r\n const sorted1 = sorted.filter(\r\n (item) => item.status === 'FaerdigBehandlet'\r\n )\r\n const sorted2 = sorted.filter(\r\n (item) => item.status === 'UnderOpdatering'\r\n )\r\n sorted = [...sorted1, ...sorted2]\r\n break\r\n }\r\n\r\n case 'created':\r\n sorted = sortByUpdateCreatedDate(sorted)\r\n break\r\n case 'name':\r\n sorted = sorted.sort((a, b) => compareMemberOnUpdateName(a, b))\r\n break\r\n case 'updateType':\r\n sorted = sorted.sort((a, b) =>\r\n compareName(a, b, { property: 'type' })\r\n )\r\n break\r\n case 'updateProfile':\r\n sorted = sorted.sort((a, b) => compareProfileOnUpdateName(a, b))\r\n break\r\n case 'updateUpdated':\r\n sorted = sortByUpdateUpdatedDate(sorted)\r\n break\r\n\r\n default:\r\n break\r\n }\r\n\r\n if (sort.direction === 'descending ') sorted = sorted.reverse()\r\n\r\n return sorted\r\n}\r\n\r\nexport const sortNotesByDateAndIsRead = (\r\n notes: Note[],\r\n reverse?: boolean\r\n): Note[] => {\r\n // Find all is read.\r\n let isRead = notes.filter((n) => n.isRead)\r\n let isNotRead = notes.filter((n) => !n.isRead)\r\n isRead = sortByNoteDate(isRead)\r\n isNotRead = sortByNoteDate(isNotRead)\r\n\r\n return !reverse ? [...isNotRead, ...isRead] : [...isRead, ...isNotRead]\r\n}\r\n\r\nexport const sortNotesBy = (notes: Note[], sort: sortProperty): Note[] => {\r\n let sortedNotes = [...notes]\r\n\r\n switch (sort.property) {\r\n case 'isRead':\r\n sortedNotes = sortedNotes.sort(compareIsRead)\r\n\r\n sortedNotes = sortNotesByDateAndIsRead(\r\n sortedNotes,\r\n sort.direction === 'descending '\r\n )\r\n\r\n break\r\n case 'name':\r\n sortedNotes = sortedNotes.sort((a, b) =>\r\n compareName(a, b, { property: 'name' })\r\n )\r\n break\r\n case 'date':\r\n sortedNotes = sortByNoteDate(sortedNotes)\r\n break\r\n\r\n case 'favorite':\r\n sortedNotes = sortByNoteFavorite(sortedNotes).sort()\r\n break\r\n\r\n default:\r\n break\r\n }\r\n\r\n if (sort.direction === 'descending ' && sort.property !== 'isRead')\r\n sortedNotes = sortedNotes.reverse()\r\n\r\n return sortedNotes\r\n}\r\n\r\nexport const sortBy = (members: Member[], sort: sortProperty): Member[] => {\r\n let sortedMembers = [...members]\r\n\r\n switch (sort.property) {\r\n case 'name':\r\n sortedMembers = sortedMembers.sort((a, b) =>\r\n compareName(a, b, { property: 'fullName' })\r\n )\r\n break\r\n\r\n case 'arbejdssted':\r\n sortedMembers = sortedMembers.sort(compareWorkplaces)\r\n break\r\n\r\n case 'status':\r\n sortedMembers = sortedMembers.sort(compareStatus)\r\n break\r\n\r\n case 'notes':\r\n sortedMembers = sortedMembers.sort(compareNotes)\r\n break\r\n\r\n case 'isOwnMember':\r\n sortedMembers = sortedMembers.sort(compareIsOwnMember)\r\n break\r\n\r\n case 'department':\r\n sortedMembers = sortedMembers.sort(compareDepartments)\r\n break\r\n\r\n case 'birthday':\r\n sortedMembers = sortByDate(sortedMembers)\r\n break\r\n case 'age':\r\n sortedMembers = sortedMembers.sort(compareAge)\r\n break\r\n\r\n default:\r\n break\r\n }\r\n\r\n if (sort.direction === 'descending ')\r\n sortedMembers = sortedMembers.reverse()\r\n\r\n return sortedMembers\r\n}\r\n","// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\r\nexport const filterByValue = (\r\n array: any[],\r\n value: string,\r\n includes?: string[]\r\n) => {\r\n const searchables = includes\r\n ? includes.map((include) => `searchable_${include}`)\r\n : undefined\r\n\r\n return array.filter((o) =>\r\n Object.keys(o).some((k) => {\r\n if (\r\n searchables &&\r\n searchables.length &&\r\n searchables.indexOf(k) === -1\r\n )\r\n return false\r\n\r\n if (\r\n typeof o[k] === 'string' &&\r\n o[k].toLowerCase().includes(value.toLowerCase())\r\n ) {\r\n return true\r\n }\r\n\r\n if (\r\n typeof o[k] === 'number' &&\r\n o[k].toString().includes(Math.abs(+value))\r\n ) {\r\n return true\r\n }\r\n\r\n return false\r\n })\r\n )\r\n}\r\n","import axios from 'axios'\r\nimport { atom } from 'jotai'\r\nimport { atomWithQuery } from 'jotai/query'\r\n\r\nconst apiKey = process.env.REACT_APP_LOKALISE_API_TOKEN\r\nconst projectId = process.env.REACT_APP_LOKALISE_PROJECT_ID\r\n\r\nexport interface ITranslations {\r\n [id: string]: string\r\n}\r\n\r\nconst idAtom = atom(1)\r\n\r\nconst getLokaliseDataFromApi = async (): Promise => {\r\n // const config = {\r\n // headers: {\r\n // 'x-api-token': apiKey,\r\n // },\r\n // }\r\n\r\n // let base = 'https://murmuring-castle-14887.herokuapp.com/'\r\n\r\n // if (process.env.NODE_ENV !== 'production') {\r\n // base = ''\r\n // }\r\n\r\n // const response = await axios.get(\r\n // `${base}https://api.lokalise.com/api2/projects/${projectId}/translations?limit=1000`,\r\n // config\r\n // )\r\n // const keys = await axios.get(\r\n // `${base}https://api.lokalise.com/api2/projects/${projectId}/keys?limit=1000`,\r\n // config\r\n // )\r\n\r\n // const translations: ITranslations = {}\r\n // // eslint-disable-next-line no-restricted-syntax\r\n // for (const val of keys.data.keys) {\r\n // translations[val.key_name.web] = response.data.translations.find(\r\n // (trans) => trans.key_id === val.key_id\r\n // ).translation\r\n // }\r\n const response = await axios.get(\r\n 'https://lokalise-foa-sandbox.azurewebsites.net/get'\r\n )\r\n return response.data\r\n}\r\n\r\nconst getLokaliseData = atomWithQuery((get) => ({\r\n queryKey: ['lokalise', get(idAtom)],\r\n queryFn: async ({ queryKey: [,] }) => {\r\n const config = {\r\n headers: {\r\n 'x-api-token': apiKey,\r\n },\r\n }\r\n\r\n let base = 'https://murmuring-castle-14887.herokuapp.com/'\r\n\r\n if (process.env.NODE_ENV !== 'production') {\r\n base = ''\r\n }\r\n\r\n const response = await axios.get(\r\n `${base}https://api.lokalise.com/api2/projects/${projectId}/translations`,\r\n config\r\n )\r\n const keys = await axios.get(\r\n `${base}https://api.lokalise.com/api2/projects/${projectId}/keys`,\r\n config\r\n )\r\n\r\n const translations: ITranslations = {}\r\n // eslint-disable-next-line no-restricted-syntax\r\n for (const val of keys.data.keys) {\r\n translations[val.key_name.web] = response.data.translations.find(\r\n (trans) => trans.key_id === val.key_id\r\n ).translation\r\n }\r\n return translations\r\n },\r\n}))\r\n\r\nexport { getLokaliseData, getLokaliseDataFromApi }\r\n","import React from 'react'\r\nimport { createUseStyles } from 'react-jss'\r\n\r\nconst useStyles = createUseStyles(() => ({\r\n loader: {\r\n width: '100vw',\r\n height: '100vh',\r\n display: 'flex',\r\n position: 'fixed',\r\n top: 0,\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n left: '0',\r\n zIndex: 4,\r\n },\r\n}))\r\n\r\nconst Spinner: React.FC = () => {\r\n const classes = useStyles()\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\nexport { Spinner }\r\n","// import axios from 'axios'\r\n// import { atom, useAtom } from 'jotai'\r\n// import { atomWithQuery } from 'jotai/query'\r\nimport React, { useEffect, useState } from 'react'\r\nimport {\r\n ITranslations,\r\n getLokaliseData,\r\n getLokaliseDataFromApi,\r\n} from '../../store/lokalise/lokaliseAtom'\r\nimport { Spinner } from '../ui/Loaders/Spinner'\r\nimport myData from './translations.json'\r\n// const lokaliseAtom = atom({})\r\n\r\n// const lAtom = atom((get) => {\r\n// return get(lokaliseAtom)\r\n// })\r\n\r\ninterface IReplacement {\r\n [id: string]: string\r\n}\r\n\r\nconst setLokalise = (translations: ITranslations): void => {\r\n localStorage.setItem('translations', JSON.stringify(translations))\r\n}\r\n\r\nconst getLokalise = (): ITranslations | undefined => {\r\n const translations = localStorage.getItem('translations')\r\n\r\n return JSON.parse(translations)\r\n}\r\n\r\nconst L = (key: string): string => {\r\n let value = '-'\r\n // const [lData] = useAtom(lAtom)\r\n const lData = getLokalise()\r\n if (lData && lData[key]) {\r\n value = lData[key]\r\n }\r\n\r\n return value\r\n}\r\n\r\nconst L_HTML = (key: string, replacements?: IReplacement): JSX.Element => {\r\n let value = '-'\r\n const lData = getLokalise()\r\n if (lData && lData[key]) {\r\n value = lData[key]\r\n }\r\n let manipulated = value\r\n\r\n if (replacements && Object.keys(replacements).length) {\r\n Object.keys(replacements).forEach((identifier) => {\r\n // eslint-disable-next-line react/destructuring-assignment\r\n const s = replacements[identifier]\r\n manipulated = manipulated.replace(`%${identifier}%`, `${s}`)\r\n })\r\n }\r\n\r\n // eslint-disable-next-line react/no-danger\r\n return \r\n}\r\n\r\nconst Lokalise: React.FC = ({ children }) => {\r\n const [initialized, setInitialized] = useState(false)\r\n const initFallback = (): void => {\r\n if (myData) {\r\n if (!initialized) {\r\n setLokalise(myData)\r\n setInitialized(true)\r\n }\r\n }\r\n }\r\n\r\n const init = async (): Promise => {\r\n initFallback()\r\n const timeout = setTimeout(() => {\r\n initFallback()\r\n }, 10000)\r\n\r\n const response = await getLokaliseDataFromApi()\r\n\r\n if (response) {\r\n setLokalise(response)\r\n clearTimeout(timeout)\r\n setInitialized(true)\r\n }\r\n }\r\n\r\n useEffect(() => {\r\n // initFallback()\r\n init()\r\n }, [])\r\n\r\n if (!initialized) return \r\n\r\n return <>{children}\r\n}\r\n\r\nexport { Lokalise, getLokaliseData, L, L_HTML }\r\n","import { L } from '../components/providers/Lokalise'\r\nimport { Member } from '../models/Member'\r\nimport { Profile } from '../models/Profile'\r\n\r\nexport const getAge = (birthYear: number): number => {\r\n const currentDate = new Date()\r\n const currentYear = currentDate.getFullYear()\r\n return currentYear - birthYear\r\n}\r\n\r\nexport const uniq = (items: Member[], key: string): Member[] => {\r\n const arrayUniqueByKey = [\r\n ...new Map(items.map((item) => [item[key], item])).values(),\r\n ]\r\n\r\n return arrayUniqueByKey\r\n}\r\n\r\nexport const getUpdateTypeLabel = (type: string): string => {\r\n let label = type\r\n\r\n switch (type) {\r\n case 'OpdaterMedlem':\r\n label = L('MINEOPDATERINGER_TYPE_OpdaterMedlem') // 'Redigér medlemsdata'\r\n break\r\n case 'MedlemOphoert':\r\n label = L('MINEOPDATERINGER_TYPE_MedlemOphoert') // 'Stoppet på arbejdsstedet'\r\n break\r\n case 'TilfoejMedlemArbejdssted':\r\n label = L('MINEOPDATERINGER_TYPE_TilfoejMedlemArbejdssted') // 'Tilføj nyt arbejdssted på medlemmet'\r\n break\r\n case 'OpdaterOgTilfoejEksisterendeMedlem':\r\n label = L(\r\n 'MINEOPDATERINGER_TYPE_OpdaterOgTilfoejEksisterendeMedlem'\r\n ) // 'Tilføj kollega til Mine medlemmer'\r\n break\r\n default:\r\n break\r\n }\r\n\r\n return label\r\n}\r\n\r\nexport const getUpdateStatusLabel = (status: string): string => {\r\n let label = status\r\n\r\n switch (status) {\r\n case 'FaerdigBehandlet':\r\n label = L('MINEOPDATERINGER_STATUS_FaerdigBehandlet') // 'Færdig behandlet'\r\n break\r\n case 'UnderOpdatering':\r\n label = L('MINEOPDATERINGER_STATUS_UnderOpdatering') // Afventer opdatering'\r\n break\r\n default:\r\n break\r\n }\r\n\r\n return label\r\n}\r\n\r\n// 02\tFællestillidssuppleant\r\n// 04\tTillidssuppleant\r\n// 08\tMED Hoved.udv.suppleant\r\n// 16\tUdgået Lokal SU-supplean\r\n// 18\tCentralt hoved SU-suppl.\r\n// 24\tDistrikttillidsrep.suppl.\r\n// 31\tArbejdsmiljøudvalgsuppl.\r\n// 36\tSuppl.midlert.HSU(MT HSU)\r\n// 37\tHSIU - suppleant\r\nexport const isSuppleantFor = (type: string): boolean => {\r\n const types: string[] = [\r\n '02',\r\n '04',\r\n '08',\r\n '16',\r\n '18',\r\n '24',\r\n '31',\r\n '36',\r\n '37',\r\n ]\r\n\r\n return types.indexOf(type) !== -1\r\n}\r\n\r\nexport const getSuppleantNamesForTR = (\r\n type: string,\r\n profile: Profile\r\n): string => {\r\n const names = []\r\n\r\n profile.trForOthers.forEach((tfo) => {\r\n tfo.typeOfRepresentatives.forEach((tor) => {\r\n if (tor.supplementedOfDutyType === type) {\r\n names.push(tfo.fullName)\r\n }\r\n })\r\n })\r\n\r\n return names.join(', ')\r\n}\r\n","import { atom, useAtom } from 'jotai'\r\nimport { IMemberData, Member } from '../../models/Member'\r\nimport { filterItems, IFilterData } from '../../utils/filterhelper'\r\nimport {\r\n IFilter,\r\n initialFilter,\r\n initialSelectedFilters,\r\n} from '../../models/Filter'\r\nimport { membersAtom } from '../../api/members/members'\r\nimport {\r\n sortBy,\r\n sortNotesBy,\r\n sortProperty,\r\n sortUpdatesBy,\r\n sortWorkplacesBy,\r\n} from '../../utils/sortHelper'\r\nimport { filterByValue } from '../../utils/searchHelper'\r\nimport { uniq } from '../../utils/utils'\r\nimport { Note } from '../../models/Note'\r\nimport { Workplace } from '../../models/Workplace'\r\nimport { UpdateBatch } from '../../models/UpdateBatch'\r\n\r\nexport interface FilterState {\r\n filter: IFilter\r\n}\r\n\r\nexport type TypeResponseGetMembers = {\r\n Medlemmer: IMemberData[]\r\n}\r\n\r\nconst initSort: sortProperty = {\r\n direction: 'ascending',\r\n property: 'name',\r\n}\r\n\r\nexport type TypeResponse = TypeResponseGetMembers & IFilterData\r\nconst filterAtom = atom(initialFilter)\r\nconst filterSelected = atom(initialSelectedFilters)\r\nconst sortedAtom = atom(initSort)\r\nconst sortLock = atom(false)\r\nconst searchAtom = atom('')\r\nconst searchNoteAtom = atom('')\r\nconst searchWorkplaceAtom = atom('')\r\nconst searchMembersAtom = atom([])\r\nconst showOnlyFavorites = atom(false)\r\nconst allNotes = atom([])\r\nconst allWorkplaces = atom([])\r\nconst allUpdates = atom([])\r\nconst allUpdatesDone = atom([])\r\nconst allUpdatesInProgress = atom([])\r\n\r\nconst searchPageAtom = atom((get) => {\r\n const sorted = get(sortedAtom)\r\n const members = get(searchMembersAtom)\r\n let filteredItems = [...members]\r\n\r\n if (sorted) {\r\n filteredItems = sortBy([...filteredItems], sorted)\r\n }\r\n\r\n return [...filteredItems]\r\n})\r\n\r\nconst workplacesPageAtom = atom((get) => {\r\n const sorted = get(sortedAtom)\r\n const workplaces = get(allWorkplaces)\r\n let sortedWorkplaces = [...workplaces]\r\n const search = get(searchWorkplaceAtom)\r\n\r\n if (sorted) {\r\n sortedWorkplaces = sortWorkplacesBy(sortedWorkplaces, sorted)\r\n }\r\n\r\n if (search) {\r\n sortedWorkplaces = filterByValue([...sortedWorkplaces], search, [\r\n 'name',\r\n 'address',\r\n ])\r\n }\r\n\r\n return sortedWorkplaces\r\n})\r\n\r\nconst updatePageAtom = atom((get) => {\r\n const sorted = get(sortedAtom)\r\n const all = get(allUpdates)\r\n let sortedUpdates = [...all]\r\n if (sorted) {\r\n sortedUpdates = sortUpdatesBy(sortedUpdates, sorted)\r\n }\r\n\r\n return sortedUpdates\r\n})\r\n\r\nconst updatePageDoneAtom = atom((get) => {\r\n const sorted = get(sortedAtom)\r\n const all = get(allUpdatesDone)\r\n let sortedUpdates = [...all]\r\n if (sorted) {\r\n sortedUpdates = sortUpdatesBy(sortedUpdates, sorted)\r\n }\r\n\r\n return sortedUpdates\r\n})\r\n\r\nconst updatePageInProgressAtom = atom((get) => {\r\n const sorted = get(sortedAtom)\r\n const all = get(allUpdatesInProgress)\r\n let sortedUpdates = [...all]\r\n if (sorted) {\r\n sortedUpdates = sortUpdatesBy(sortedUpdates, sorted)\r\n }\r\n\r\n return sortedUpdates\r\n})\r\n\r\nconst notePageAtom = atom((get) => {\r\n const sorted = get(sortedAtom)\r\n const notes = get(allNotes)\r\n let sortedNotes = [...notes]\r\n const search = get(searchNoteAtom)\r\n\r\n if (sorted) {\r\n sortedNotes = sortNotesBy(sortedNotes, sorted)\r\n }\r\n\r\n // search\r\n if (search) {\r\n sortedNotes = filterByValue([...sortedNotes], search, [\r\n 'content',\r\n 'title',\r\n 'member',\r\n ])\r\n }\r\n\r\n return sortedNotes\r\n})\r\n\r\n// FilteredItems\r\nconst filteredAtom = atom((get) => {\r\n const selected = get(filterSelected)\r\n const members = get(membersAtom)\r\n const sorted = get(sortedAtom)\r\n const search = get(searchAtom)\r\n const favoritesOnly = get(showOnlyFavorites)\r\n let filteredItems = filterItems(selected, [...members.members])\r\n\r\n if (sorted) {\r\n filteredItems = sortBy([...filteredItems], sorted)\r\n }\r\n\r\n if (search) {\r\n filteredItems = filterByValue([...filteredItems], search, [\r\n 'fullName',\r\n 'workPlace',\r\n 'birthDay',\r\n 'age',\r\n ])\r\n }\r\n\r\n if (favoritesOnly) {\r\n filteredItems = [...filteredItems].filter((m) => m.isFavorite)\r\n }\r\n\r\n return [...uniq(filteredItems, 'memberId')]\r\n})\r\n\r\nexport {\r\n filterAtom,\r\n filteredAtom,\r\n filterSelected,\r\n sortedAtom,\r\n searchAtom,\r\n searchPageAtom,\r\n searchMembersAtom,\r\n showOnlyFavorites,\r\n notePageAtom,\r\n allNotes,\r\n allWorkplaces,\r\n workplacesPageAtom,\r\n allUpdates,\r\n allUpdatesInProgress,\r\n allUpdatesDone,\r\n updatePageDoneAtom,\r\n updatePageInProgressAtom,\r\n updatePageAtom,\r\n sortLock,\r\n searchWorkplaceAtom,\r\n searchNoteAtom,\r\n}\r\n","/* eslint-disable @typescript-eslint/explicit-function-return-type */\r\nimport { useState } from 'react'\r\nimport { useAtom } from 'jotai'\r\nimport { Member } from '../models/Member'\r\nimport {\r\n sortBy,\r\n sortProperties,\r\n sortProperty,\r\n sortNotesBy,\r\n sortUpdatesBy,\r\n} from '../utils/sortHelper'\r\nimport { sortedAtom, sortLock } from '../store/filter/filterAtom'\r\nimport { Note } from '../models/Note'\r\nimport { UpdateBatch } from '../models/UpdateBatch'\r\n\r\nconst useSortMembersList = () => {\r\n const [, setSortedAtom] = useAtom(sortedAtom)\r\n const [, setLock] = useAtom(sortLock)\r\n const [sortState, setSortState] = useState(\r\n undefined\r\n )\r\n // const [sortedList, _setSortedList] = useState<\r\n // Member[] | Note[] | UpdateBatch[]\r\n // >([])\r\n\r\n const setSort = (property: sortProperties): void => {\r\n setLock(false)\r\n if (sortState && sortState.property === property) {\r\n setSortState({\r\n direction:\r\n sortState.direction === 'ascending'\r\n ? 'descending '\r\n : 'ascending',\r\n property,\r\n })\r\n setSortedAtom({\r\n direction:\r\n sortState.direction === 'ascending'\r\n ? 'descending '\r\n : 'ascending',\r\n property,\r\n })\r\n } else {\r\n setSortState({\r\n direction: 'ascending',\r\n property,\r\n })\r\n setSortedAtom({\r\n direction: 'ascending',\r\n property,\r\n })\r\n }\r\n }\r\n\r\n // const setSortedList = (members: Member[]) => {\r\n // if (sortState) {\r\n // const list = sortBy(members, sortState)\r\n // _setSortedList(list)\r\n // } else {\r\n // _setSortedList(members)\r\n // }\r\n // }\r\n\r\n // const setSortedNoteList = (notes: Note[]) => {\r\n // if (sortState) {\r\n // const list = sortNotesBy(notes, sortState)\r\n // _setSortedList(list)\r\n // } else {\r\n // _setSortedList(notes)\r\n // }\r\n // }\r\n\r\n // const setSortedUpdatePageList = (updates: UpdateBatch[]) => {\r\n // if (sortState) {\r\n // const list = sortUpdatesBy(updates, sortState)\r\n // _setSortedList(list)\r\n // } else {\r\n // _setSortedList(updates)\r\n // }\r\n // }\r\n\r\n return {\r\n // sortedList,\r\n sortState,\r\n setSort,\r\n setSortState,\r\n // setSortedList,\r\n // setSortedNoteList,\r\n // setSortedUpdatePageList,\r\n }\r\n}\r\n\r\nexport default useSortMembersList\r\n","import { createUseStyles } from 'react-jss'\r\nimport breakpoints from './breakpoints'\r\n\r\nconst useContainerStyles = createUseStyles({\r\n container: {\r\n width: '100%',\r\n maxWidth: '1075px',\r\n margin: '0 auto',\r\n padding: '0',\r\n [`@media (min-width: ${breakpoints.Desktop}px)`]: {\r\n '&': {\r\n padding: 0,\r\n },\r\n },\r\n },\r\n})\r\n\r\nexport { useContainerStyles }\r\n","import { JssStyle } from 'jss'\r\nimport breakpoints from './breakpoints'\r\nimport { colors } from './palette'\r\n\r\nexport const baseButton: JssStyle = {\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n padding: '0.5em 1.75em',\r\n margin: '0 0.3em 0.3em 0',\r\n borderRadius: '0.25em',\r\n boxSizing: 'border-box',\r\n textDecoration: 'none',\r\n fontWeight: 400,\r\n textAlign: 'center',\r\n transition: 'all 0.2s',\r\n boxShadow: 0,\r\n background: 'inherit',\r\n '&:hover': {\r\n cursor: 'pointer',\r\n },\r\n '-webkit-appearance': 'none',\r\n '-moz-appearance': 'none',\r\n border: 0,\r\n}\r\n\r\nexport const sortPlaceholder = {\r\n display: 'flex',\r\n alignItems: 'center',\r\n padding: '0.75em 0',\r\n margin: '0 0.3em 0.3em 0',\r\n borderRadius: '6px',\r\n boxSizing: 'border-box',\r\n textDecoration: 'none',\r\n fontWeight: 400,\r\n textAlign: 'left',\r\n transition: 'all 0.2s',\r\n boxShadow: 0,\r\n '-webkit-appearance': 'none',\r\n '-moz-appearance': 'none',\r\n fontStyle: 'normal',\r\n fontSize: '16px',\r\n lineHeight: '120%',\r\n color: '#000000',\r\n border: 0,\r\n background: 'none',\r\n}\r\n","import React from 'react'\r\nimport { createUseStyles } from 'react-jss'\r\n\r\nconst useStyles = createUseStyles(() => ({\r\n control: {\r\n position: 'relative',\r\n marginBottom: '20px',\r\n },\r\n}))\r\n\r\nconst FormControl: React.FC = ({ children }) => {\r\n const classes = useStyles()\r\n\r\n return
{children}
\r\n}\r\n\r\nexport { FormControl }\r\n","import React, { FC, useEffect, useState } from 'react'\r\nimport { useForm } from 'react-hook-form'\r\nimport { createUseStyles } from 'react-jss'\r\nimport { useAtom } from 'jotai'\r\nimport {\r\n getMemberForImitating,\r\n getProfileByIdent,\r\n profileAtom,\r\n} from '../../../api/profile/profile'\r\nimport { isAuthenticatedAtom, authRoles } from '../../../store/auth'\r\nimport { Profile } from '../../../models/Profile'\r\n\r\nimport { Department } from '../../../models/Department'\r\n\r\nimport breakpoints from '../../../theme/breakpoints'\r\nimport { colors } from '../../../theme/palette'\r\n\r\nimport { ISelectOptions, Select } from '../../ui/FormElememts/Select'\r\nimport { getDepartments } from '../../../api/departments'\r\nimport { Input } from '../../ui/FormElememts/Input'\r\nimport {\r\n Card,\r\n CardCell,\r\n CardHeader,\r\n CardHeaderCell,\r\n CardList,\r\n Circle,\r\n CircleText,\r\n} from '../../ui/Card'\r\nimport { SortButton } from '../../ui/SortButton'\r\nimport { Typography } from '../../ui/Typography/Typography'\r\nimport { getInitials } from '../../../utils/initials'\r\nimport useSortMembersList from '../../../hooks/useSortMembersList'\r\nimport { Button } from '../../ui/Button/Button'\r\n\r\nimport { useContainerStyles } from '../../../theme/layout'\r\nimport { L } from '../../providers/Lokalise'\r\nimport { sortPlaceholder } from '../../../theme/reuseables'\r\nimport { FormControl } from '../../ui/FormElememts/FormControl'\r\nimport { Spinner } from '../../ui/Loaders/Spinner'\r\n\r\nexport type RegistrationFormFields = {\r\n fuldeNavn: string\r\n foedselsesdato: string\r\n telefon: string\r\n afdelingsnummer: string\r\n}\r\n\r\nexport interface IMemberSuggestion {\r\n memberId: number\r\n fullName: string\r\n birthDay: string\r\n position: string\r\n role: string\r\n}\r\n\r\nconst useStyles = createUseStyles({\r\n container: {\r\n padding: '0 24px',\r\n [`@media (min-width: ${breakpoints.Desktop}px)`]: {\r\n '&': {\r\n padding: 0,\r\n },\r\n },\r\n },\r\n headerArea: {\r\n display: 'flex',\r\n padding: '.5rem 0',\r\n minHeight: '80px',\r\n },\r\n formArea: {\r\n display: 'grid',\r\n gridTemplateColumns: '3fr 3fr 1fr',\r\n gap: '20px',\r\n marginBottom: '50px',\r\n },\r\n topArea: {\r\n borderBottom: `1px solid ${colors.gray700}`,\r\n // TODO: remove this when this area has been developed.\r\n minHeight: '60px',\r\n },\r\n headerActions: {\r\n marginLeft: 'auto',\r\n flexShrink: 0,\r\n },\r\n members: {\r\n paddingTop: '20px',\r\n },\r\n form: {\r\n display: 'grid',\r\n gridTemplateColumns: '1fr 140px 140px 1fr 140px',\r\n gap: '10px',\r\n },\r\n linkButton: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n padding: '0',\r\n margin: '0',\r\n borderRadius: '6px',\r\n boxSizing: 'border-box',\r\n textDecoration: 'none',\r\n fontWeight: 400,\r\n textAlign: 'center',\r\n transition: 'all 0.2s',\r\n boxShadow: 0,\r\n '&:hover': {\r\n cursor: 'pointer',\r\n },\r\n '-webkit-appearance': 'none',\r\n '-moz-appearance': 'none',\r\n border: 0,\r\n color: colors.green500,\r\n fontSize: '.875rem',\r\n textDecorationLine: 'underline',\r\n },\r\n subArea: {\r\n display: 'flex',\r\n justifyContent: 'flex-end',\r\n padding: '1rem 160px 1rem 1rem',\r\n borderBottom: `1px solid ${colors.borderColor}`,\r\n },\r\n circleIcon: {\r\n width: '62px',\r\n height: '62px',\r\n borderRadius: '50%',\r\n border: `2px solid ${colors.white}`,\r\n backgroundColor: colors.blue300,\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n marginRight: '1rem',\r\n },\r\n sortPlaceholder: {\r\n ...sortPlaceholder,\r\n },\r\n content: {\r\n paddingTop: '1.875rem',\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n },\r\n messageWrapper: {\r\n marginTop: '2.25rem',\r\n },\r\n selectContainer: {\r\n position: 'relative',\r\n },\r\n selectTrigger: {\r\n position: 'relative',\r\n minHeight: '48px',\r\n backgroundColor: colors.white,\r\n border: `1px solid ${colors.borderColor}`,\r\n borderRadius: '6px',\r\n width: '100%',\r\n fontSize: '1.125rem',\r\n paddingLeft: '.75rem',\r\n paddingRight: '.75rem',\r\n cursor: 'pointer',\r\n color: colors.labelColor,\r\n },\r\n selectContent: {\r\n overflow: 'hidden',\r\n backgroundColor: 'white',\r\n borderRadius: '6px',\r\n boxShadow:\r\n // eslint-disable-next-line max-len\r\n '0px 10px 38px -10px rgba(22, 23, 24, 0.35), 0px 10px 20px -15px rgba(22, 23, 24, 0.2)',\r\n },\r\n select: {\r\n position: 'relative',\r\n minHeight: '48px',\r\n backgroundColor: colors.white,\r\n border: `1px solid ${colors.borderColor}`,\r\n borderRadius: '6px',\r\n width: '100%',\r\n fontSize: '1.125rem',\r\n paddingLeft: '.75rem',\r\n paddingRight: '.75rem',\r\n cursor: 'pointer',\r\n color: colors.labelColor,\r\n },\r\n hr: {\r\n opacity: '.4',\r\n margin: '0',\r\n },\r\n})\r\n\r\nconst gridTemplateColumns = '10% 20% 20% 20% 15% 15%'\r\n\r\nconst Imitator: FC = () => {\r\n const [authProfile, _set] = useAtom(profileAtom)\r\n const [departmentNumber, _setDepartmentNumber] = useState('default')\r\n const [name, _setName] = useState(undefined)\r\n const [suggestions, _setSuggestions] = useState([])\r\n const [options, setOptions] = useState([])\r\n const [loading, setLoading] = useState(false)\r\n const classes = useStyles()\r\n const { setSort, sortState } = useSortMembersList()\r\n const [, _setIsAuthenticated] = useAtom(isAuthenticatedAtom)\r\n const layout = useContainerStyles()\r\n const [roles, setAuthRoles] = useAtom(authRoles)\r\n\r\n const search = async (d: string, n: string): Promise => {\r\n setLoading(true)\r\n const response = await getMemberForImitating(d, n)\r\n\r\n if (\r\n response.data &&\r\n response.data.Medlemmer &&\r\n response.data.Medlemmer.length\r\n ) {\r\n const result = response.data.Medlemmer.map((member: any) => {\r\n const splitted = member.FuldeNavn.split(',')\r\n return {\r\n memberId: member.Medlemsident,\r\n fullName: splitted[0],\r\n birthDay: splitted[1],\r\n position: splitted[2],\r\n role: member.Rolle,\r\n }\r\n })\r\n\r\n _setSuggestions(result)\r\n }\r\n\r\n setLoading(false)\r\n }\r\n\r\n // useEffect(() => {\r\n // if (name && name !== '' && departmentNumber) {\r\n // search(departmentNumber, name)\r\n // } else {\r\n // _setSuggestions([])\r\n // }\r\n // }, [departmentNumber, name])\r\n\r\n useEffect(() => {\r\n const getDeps = async (): Promise => {\r\n if (\r\n authProfile.data &&\r\n authProfile.data.RolleListe.indexOf('Imitator') !== -1\r\n ) {\r\n const d: ISelectOptions[] = [\r\n {\r\n label: authProfile.data.Afdeling.Navn,\r\n value: authProfile.data.Afdeling.Nummer,\r\n },\r\n ]\r\n\r\n setOptions(d)\r\n\r\n _setDepartmentNumber(authProfile.data.Afdeling.Nummer)\r\n } else {\r\n const depResponse = await getDepartments()\r\n const opt: ISelectOptions[] = depResponse.map(\r\n (department: Department) => {\r\n return { label: department.name, value: department.id }\r\n }\r\n )\r\n\r\n setOptions(opt)\r\n }\r\n\r\n return true\r\n }\r\n\r\n getDeps()\r\n }, [])\r\n\r\n const chooseImitator = async (member: IMemberSuggestion): Promise => {\r\n const response = await getProfileByIdent(member.memberId)\r\n const profile = Profile.build(response.data)\r\n\r\n authProfile.apiProfile = profile\r\n\r\n localStorage.setItem('profile_data', JSON.stringify(authProfile))\r\n localStorage.setItem('imitator', JSON.stringify(member))\r\n\r\n setAuthRoles([member.role])\r\n _set(authProfile)\r\n _setIsAuthenticated(true)\r\n }\r\n\r\n return (\r\n
\r\n
\r\n
\r\n
\r\n \r\n Søg TR & FTR\r\n \r\n
\r\n
\r\n\r\n
\r\n \r\n {\r\n _setSuggestions([])\r\n _setName('')\r\n _setDepartmentNumber(e.target.value)\r\n }}\r\n options={options}\r\n />\r\n \r\n \r\n {\r\n if (e.key === 'Enter') {\r\n if (name && name !== '' && departmentNumber) {\r\n search(departmentNumber, name)\r\n } else {\r\n _setSuggestions([])\r\n }\r\n }\r\n }}\r\n onChange={(e) => _setName(e.target.value)}\r\n />\r\n \r\n {\r\n if (name && name !== '' && departmentNumber) {\r\n search(departmentNumber, name)\r\n } else {\r\n _setSuggestions([])\r\n }\r\n }}\r\n >\r\n {L('ALLEMEDLEMMER_FORM_SØG_KNAP')}\r\n \r\n
\r\n\r\n
\r\n\r\n {loading ? : null}\r\n\r\n {!suggestions.length ? (\r\n \r\n Vælg afdeling og navn\r\n \r\n ) : null}\r\n\r\n
\r\n {suggestions && suggestions.length ? (\r\n
\r\n \r\n \r\n \r\n \r\n setSort('name')}\r\n sort={sortState}\r\n name=\"name\"\r\n >\r\n Navn\r\n \r\n \r\n \r\n \r\n \r\n setSort('arbejdssted')\r\n }\r\n sort={sortState}\r\n name=\"arbejdssted\"\r\n >\r\n Hverv\r\n \r\n \r\n \r\n \r\n
\r\n Rolle\r\n
\r\n
\r\n \r\n setSort('department')}\r\n sort={sortState}\r\n name=\"department\"\r\n >\r\n Fødselsdato\r\n \r\n \r\n \r\n \r\n {suggestions.map((member) => (\r\n <>\r\n \r\n \r\n \r\n \r\n {getInitials(\r\n member.fullName\r\n )}\r\n \r\n \r\n \r\n \r\n \r\n {member.fullName}\r\n \r\n \r\n \r\n \r\n {member.position}\r\n \r\n \r\n \r\n \r\n {member.role}\r\n \r\n \r\n \r\n \r\n {member.birthDay}\r\n \r\n \r\n\r\n \r\n \r\n chooseImitator(member)\r\n }\r\n >\r\n Vælg\r\n \r\n \r\n \r\n \r\n ))}\r\n
\r\n
\r\n ) : null}\r\n
\r\n
\r\n )\r\n}\r\n\r\nexport { Imitator }\r\n","import { AxiosResponse } from 'axios'\r\nimport { axiosWithAuth, axiosWithImitator } from '../withAuth'\r\nimport { mapWorkplaces, Workplace } from '../../models/Workplace'\r\n\r\n// /opslagsdata/hentstillingfaggruppesektorlister\r\nconst getPositionsAndGroups = async (): Promise => {\r\n const response = await axiosWithImitator.get(\r\n `/opslagsdata/hentstillingfaggruppesektorlister`\r\n )\r\n\r\n const { data } = response\r\n return data\r\n}\r\n\r\n// /opslagsdata/henttrarbejdsstederogstillinger\r\nconst getWorkplacesAndPositions = async (): Promise<{\r\n workPlaces: Workplace[]\r\n}> => {\r\n const response = await axiosWithImitator.get(\r\n `/opslagsdata/henttrarbejdsstederogstillinger`\r\n )\r\n\r\n const { data } = response\r\n return {\r\n workPlaces: mapWorkplaces(data.Arbejdssteder),\r\n }\r\n}\r\n\r\nconst userIsActiveInApp = async (): Promise => {\r\n const response = await axiosWithImitator.post(`/profil/brugeraktiviapp`)\r\n\r\n const { data } = response\r\n return data\r\n}\r\n\r\nexport { getPositionsAndGroups, getWorkplacesAndPositions, userIsActiveInApp }\r\n","import React, { useEffect, useState } from 'react'\r\n/* eslint-disable max-len */\r\nimport axios, { AxiosResponse } from 'axios'\r\nimport { useAtom } from 'jotai'\r\nimport qs from 'qs'\r\nimport * as randomString from 'randomstring'\r\nimport { encode as base64encode } from 'base64-arraybuffer'\r\nimport {\r\n profileAtom,\r\n getProfile,\r\n getProfileByIdent,\r\n} from '../api/profile/profile'\r\nimport { Dialog } from '../components/ui/Dialog/Dialog'\r\nimport { Typography } from '../components/ui/Typography/Typography'\r\nimport { Button } from '../components/ui/Button/Button'\r\nimport { LockFill } from '../assets/icons'\r\nimport { Profile } from '../models/Profile'\r\nimport { Imitator } from '../components/modules/Imitator'\r\nimport {\r\n isAuthenticatedAtom,\r\n chooseImitatorAtom,\r\n authRoles,\r\n} from '../store/auth'\r\nimport { L_HTML } from '../components/providers/Lokalise'\r\nimport { Spinner } from '../components/ui/Loaders/Spinner'\r\nimport { userIsActiveInApp } from '../api/misc'\r\n\r\nconst PERIOD_CHECK_INTERVAL = 60 * 1000 * 5\r\n\r\nconst oidcSettings = {\r\n authority: process.env.REACT_APP_AUTH_AUTHORITY,\r\n client_id: process.env.REACT_APP_AUTH_CLIENT_ID,\r\n redirect_uri: process.env.REACT_APP_AUTH_REDIRECT_URI,\r\n response_type: process.env.REACT_APP_AUTH_RESPONSE_TYPE,\r\n scope: process.env.REACT_APP_AUTH_REDIRECT_URI_SCOPE,\r\n}\r\n\r\n// Disabled for now.\r\n// process.env.REACT_APP_AUTH_SETORIGIN\r\nconst setOriginUrl = undefined\r\n\r\nexport interface IUserData {\r\n access_token: string\r\n expires_in: number\r\n id_token: string\r\n refresh_token: string\r\n refresh_token_expires_in: string\r\n resource: string\r\n scope: string\r\n token_type: string\r\n}\r\n\r\nconst Auth0: React.FC = ({ children }) => {\r\n const [isAuthenticated, setIsAuthenticated] = useAtom(isAuthenticatedAtom)\r\n const [, setProfile] = useAtom(profileAtom)\r\n const [chooseImitator, setChooseImitator] = useAtom(chooseImitatorAtom)\r\n const [loading, _setLoading] = useState(true)\r\n const [, _setRoles] = useAtom(authRoles)\r\n const [periodicCheckInitiated, setPeriodicCheckInitiated] = useState(false)\r\n const [errorMessage, setErrorMessage] = useState(\r\n undefined\r\n )\r\n\r\n const intiatePeriodicCheck = (): void => {\r\n if (!periodicCheckInitiated) {\r\n setPeriodicCheckInitiated(true)\r\n userIsActiveInApp()\r\n setInterval(() => {\r\n getProfile()\r\n }, PERIOD_CHECK_INTERVAL)\r\n }\r\n }\r\n\r\n const validateImitator = async (\r\n profileData: AxiosResponse\r\n ): Promise => {\r\n const authP = {\r\n data: profileData.data,\r\n isImitator: true,\r\n apiProfile: undefined,\r\n }\r\n\r\n const imitatorInStorage = localStorage.getItem('imitator')\r\n\r\n if (imitatorInStorage) {\r\n const member = JSON.parse(imitatorInStorage)\r\n const response = await getProfileByIdent(member.memberId)\r\n const profile = Profile.build(response.data)\r\n\r\n authP.apiProfile = profile\r\n _setRoles([member.role])\r\n setIsAuthenticated(true)\r\n setChooseImitator(false)\r\n _setLoading(false)\r\n setProfile(authP)\r\n } else {\r\n setProfile(authP)\r\n localStorage.setItem('profile_data', JSON.stringify(authP))\r\n setIsAuthenticated(false)\r\n setChooseImitator(true)\r\n _setLoading(false)\r\n }\r\n }\r\n\r\n const setAlreadyAuthenticated = async (profileData: any): Promise => {\r\n const response = await getProfileByIdent(\r\n profileData.data.BrugerMedlemsident\r\n )\r\n\r\n if (response && response.error) {\r\n localStorage.setItem('profile_data', null)\r\n if (response.error && response.error.Message) {\r\n setErrorMessage(response.error.Message)\r\n }\r\n } else {\r\n setErrorMessage(undefined)\r\n const activeProfile = Profile.build(response.data)\r\n const authP = {\r\n data: profileData.data,\r\n isImitator: false,\r\n apiProfile: activeProfile,\r\n }\r\n\r\n _setRoles(profileData.data.RolleListe)\r\n\r\n localStorage.setItem('profile_data', JSON.stringify(authP))\r\n\r\n setProfile(authP)\r\n\r\n if (profileData.data) {\r\n setIsAuthenticated(true)\r\n }\r\n }\r\n\r\n _setLoading(false)\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/explicit-function-return-type\r\n function parseJwt(token) {\r\n const base64Url = token.split('.')[1]\r\n const base64 = base64Url.replace(/-/g, '+').replace(/_/g, '/')\r\n const jsonPayload = decodeURIComponent(\r\n window\r\n .atob(base64)\r\n .split('')\r\n .map(function (c: any) {\r\n return `%${`00${c.charCodeAt(0).toString(16)}`.slice(-2)}`\r\n })\r\n .join('')\r\n )\r\n\r\n return JSON.parse(jsonPayload)\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/explicit-function-return-type\r\n async function getUserInfo(accessToken, id_token) {\r\n try {\r\n const response = await axios.get(\r\n 'https://fs10.foa.dk/adfs/userinfo',\r\n {\r\n headers: {\r\n Authorization: `Bearer ${accessToken}`,\r\n },\r\n params: {\r\n id_token,\r\n scope: oidcSettings.scope,\r\n },\r\n }\r\n )\r\n return response.data\r\n } catch (error) {\r\n console.error(\r\n 'Error fetching user info:',\r\n error.response ? error.response.data : error.message\r\n )\r\n throw error // Re-throw the error to be handled by the calling function\r\n }\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/explicit-function-return-type\r\n const getToken = async (code: string) => {\r\n const code_verifier = localStorage.getItem('code_verifier')\r\n axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'\r\n const response = await axios.post(\r\n `${oidcSettings.authority}/oauth2/token`,\r\n qs.stringify({\r\n grant_type: 'authorization_code',\r\n redirect_uri: oidcSettings.redirect_uri,\r\n client_id: oidcSettings.client_id,\r\n code_verifier,\r\n code,\r\n })\r\n )\r\n\r\n const user: IUserData = response.data\r\n console.log(parseJwt(user.id_token), 'user')\r\n localStorage.setItem('user_data', JSON.stringify(user))\r\n const profileData = await getProfile()\r\n const roleList = profileData.data.RolleListe\r\n\r\n if (\r\n roleList &&\r\n (roleList.indexOf('Supporter') !== -1 ||\r\n roleList.indexOf('Imitator') !== -1)\r\n ) {\r\n validateImitator(profileData)\r\n intiatePeriodicCheck()\r\n } else {\r\n setAlreadyAuthenticated(profileData)\r\n intiatePeriodicCheck()\r\n }\r\n\r\n window.history.replaceState(\r\n {},\r\n document.title,\r\n window.location.pathname\r\n )\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/explicit-function-return-type\r\n const checkUser = async (code: string | undefined) => {\r\n _setLoading(true)\r\n const userData = localStorage.getItem('user_data')\r\n\r\n if (userData && !code) {\r\n const profileData = await getProfile()\r\n const roleList = profileData.data.RolleListe\r\n const user = JSON.parse(userData)\r\n const jwt = parseJwt(user.id_token)\r\n\r\n if (\r\n roleList &&\r\n (roleList.indexOf('Supporter') !== -1 ||\r\n roleList.indexOf('Imitator') !== -1)\r\n ) {\r\n validateImitator(profileData)\r\n intiatePeriodicCheck()\r\n } else {\r\n setAlreadyAuthenticated(profileData)\r\n intiatePeriodicCheck()\r\n }\r\n } else if (code && code !== '') {\r\n getToken(code)\r\n } else if (!userData && !code) {\r\n setIsAuthenticated(false)\r\n _setLoading(false)\r\n }\r\n }\r\n\r\n useEffect(() => {\r\n const queryString = window.location.search\r\n const params = new URLSearchParams(queryString)\r\n const code = params.get('code')\r\n if (code) {\r\n sessionStorage.setItem('testing', JSON.stringify(window.location))\r\n }\r\n\r\n _setLoading(true)\r\n\r\n checkUser(code)\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [])\r\n\r\n // eslint-disable-next-line @typescript-eslint/explicit-function-return-type\r\n const signIn = async () => {\r\n // if (setOriginUrl && setOriginUrl !== '') {\r\n // await axios.get(setOriginUrl)\r\n // }\r\n // eslint-disable-next-line @typescript-eslint/explicit-function-return-type\r\n async function generateCodeChallenge(codeVerifier) {\r\n const encoder = new TextEncoder()\r\n const data = encoder.encode(codeVerifier)\r\n const digest = await window.crypto.subtle.digest('SHA-256', data)\r\n const base64Digest = base64encode(digest)\r\n\r\n // you can extract this replacing code to a function\r\n return base64Digest\r\n .replace(/\\+/g, '-')\r\n .replace(/\\//g, '_')\r\n .replace(/=/g, '')\r\n }\r\n\r\n const code_verifier = randomString.generate(128)\r\n\r\n generateCodeChallenge(code_verifier).then((challenge) => {\r\n localStorage.setItem('code_verifier', code_verifier)\r\n const qParams = [\r\n `redirect_uri=${oidcSettings.redirect_uri}`,\r\n `scope=${oidcSettings.scope}`,\r\n `response_type=${oidcSettings.response_type}`,\r\n `client_id=${oidcSettings.client_id}`,\r\n `code_challenge_method=S256`,\r\n `code_challenge=${challenge}`,\r\n // `${\r\n // process.env.NODE_ENV !== 'production' ? 'prompt=login' : ''\r\n // }`,\r\n 'max_age=1200',\r\n ].join('&')\r\n\r\n window.location.href = `${oidcSettings.authority}/oauth2/authorize?${qParams}`\r\n })\r\n }\r\n\r\n const logout = (): void => {\r\n const localUser = localStorage.getItem('user_data')\r\n const user: IUserData = JSON.parse(localUser)\r\n const token = user.id_token\r\n const redirect_uri = process.env.REACT_APP_AUTH_REDIRECT_URI\r\n\r\n const translations = localStorage.getItem('translations')\r\n localStorage.clear()\r\n localStorage.setItem('translations', translations)\r\n\r\n const qParams = [\r\n `id_token_hint=${token}`,\r\n `post_logout_redirect_uri=${redirect_uri}`,\r\n ].join('&')\r\n\r\n const logoutURL = `https://fs10.foa.dk/adfs/oauth2/logout?${qParams}`\r\n\r\n window.location.href = logoutURL\r\n\r\n axios.get(logoutURL).then(() => {\r\n window.history.replaceState(\r\n {},\r\n document.title,\r\n window.location.pathname\r\n )\r\n })\r\n }\r\n\r\n if (loading) {\r\n return (\r\n
\r\n \r\n
\r\n )\r\n }\r\n\r\n if (!isAuthenticated && chooseImitator) {\r\n return (\r\n <>\r\n \r\n {setOriginUrl ? (\r\n \r\n ) : null}\r\n \r\n )\r\n }\r\n\r\n if (isAuthenticated) {\r\n return (\r\n
\r\n {setOriginUrl ? (\r\n \r\n ) : null}\r\n {children}\r\n
\r\n )\r\n }\r\n\r\n return (\r\n }\r\n >\r\n <>\r\n {setOriginUrl ? (\r\n \r\n ) : null}\r\n {!errorMessage ? (\r\n <>\r\n \r\n {/* {L_HTML('LOGIN_POPUP_OVERSKRIFT')} */}\r\n Log på\r\n \r\n \r\n {/* {L_HTML('LOGIN_POPUP_TEXT')} */}\r\n Du skal logge på for at få adgang til Mine medlemmer\r\n \r\n \r\n \r\n ) : (\r\n <>\r\n \r\n {L_HTML('LOGIN_POPUP_OVERSKRIFT')}\r\n \r\n \r\n {errorMessage ? (\r\n \r\n {errorMessage}\r\n \r\n ) : null}\r\n \r\n \r\n \r\n )}\r\n \r\n \r\n )\r\n}\r\nexport default Auth0\r\n","export const zIndexes = {\r\n topNavigation: 1,\r\n drawer: 2,\r\n}\r\n","import palette, { colors } from './palette'\r\nimport sizes from './sizes'\r\nimport { zIndexes } from './zIndex'\r\n\r\nconst index = { palette, sizes, colors, zIndexes }\r\n\r\nexport default index\r\n","const sizes = {\r\n navbarDesktopHeight: '5.125rem',\r\n}\r\n\r\nexport default sizes\r\n","import React from 'react'\r\nimport { createUseStyles } from 'react-jss'\r\nimport breakpoints from '../../theme/breakpoints'\r\nimport { colors } from '../../theme/palette'\r\n\r\nconst useStyles = createUseStyles((theme) => ({\r\n container: {\r\n position: 'relative',\r\n marginTop: theme.sizes.navbarDesktopHeight,\r\n color: theme.palette.secondary,\r\n minHeight: '100vh',\r\n width: '100%',\r\n backgroundColor: colors.gray500,\r\n [`@media (min-width: ${breakpoints.Desktop}px)`]: {\r\n marginTop: `calc(${theme.sizes.navbarDesktopHeight} + 9rem)`,\r\n },\r\n },\r\n}))\r\n\r\nconst Layout: React.FC = ({ children }) => {\r\n const classes = useStyles()\r\n\r\n return
{children}
\r\n}\r\n\r\nexport default Layout\r\n","import React, { FC } from 'react'\nimport { Dialog } from '../../ui/Dialog/Dialog'\nimport { SendFill } from '../../../assets/icons'\nimport { Typography } from '../../ui/Typography/Typography'\n// import { L_HTML } from '../../providers/Lokalise'\nimport { Button } from '../../ui/Button/Button'\nimport { L } from '../../providers/Lokalise'\n\nexport interface ImitatorNoAccessWarningProps {\n show?: boolean\n onClose?: () => void\n}\n\nconst ImitatorNoAccessWarning: FC = ({\n show,\n onClose,\n}) => {\n if (!show) return null\n\n return (\n }\n >\n \n {L('imitator_restricted_access_title')}\n \n \n {L('imitator_restricted_access_text')}\n \n \n \n )\n}\n\nexport { ImitatorNoAccessWarning }\n","import React, { FC, ReactElement, useState } from 'react'\r\nimport { useAtom } from 'jotai'\r\nimport { createUseStyles } from 'react-jss'\r\nimport { NavLink } from 'react-router-dom'\r\nimport { colors } from '../../../theme/palette'\r\nimport { useContainerStyles } from '../../../theme/layout'\r\nimport breakpoints from '../../../theme/breakpoints'\r\nimport { Button, ButtonLink } from '../Button/Button'\r\nimport { ImitatorNoAccessWarning } from '../../modules/Imitator/ImitatorNoAccessWarning'\r\nimport { profileAtom } from '../../../api/profile/profile'\r\n\r\nexport interface IComponent {\r\n title: string\r\n component: ReactElement\r\n}\r\n\r\nconst useStyles = createUseStyles({\r\n container: {\r\n background: colors.green,\r\n width: '100%',\r\n },\r\n menu: {\r\n display: 'flex',\r\n width: '100%',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n padding: '2rem 0',\r\n listStyle: 'none',\r\n flexWrap: 'wrap',\r\n margin: 0,\r\n [`@media (max-width: ${breakpoints.Desktop}px)`]: {},\r\n },\r\n item: {\r\n background: '#fff',\r\n flexGrow: 1,\r\n padding: '.5rem',\r\n [`@media (min-width: ${breakpoints.Desktop}px)`]: {\r\n '&': {\r\n padding: '1rem',\r\n },\r\n '&:first-child': {\r\n borderRadius: '4px 0 0 4px',\r\n padding: '1rem 0 1rem 1rem',\r\n },\r\n '&:last-child': {\r\n borderRadius: '0 4px 4px 0',\r\n padding: '1rem 1rem 1rem 0',\r\n },\r\n },\r\n },\r\n link: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n textDecoration: 'none',\r\n color: colors.black,\r\n fontSize: '1rem',\r\n padding: '0.75rem',\r\n borderRadius: '6px',\r\n transition: 'all .3s',\r\n '&:hover, &.active': {\r\n cursor: 'pointer',\r\n backgroundColor: colors.green,\r\n color: colors.white,\r\n },\r\n },\r\n})\r\n\r\ninterface TabItemProps {\r\n to: string\r\n label: string\r\n}\r\n\r\nconst TabItem: FC = ({ label, to }) => {\r\n const classes = useStyles()\r\n const [authProfile] = useAtom(profileAtom)\r\n const [showImitatorModal, setShowImitatorModal] = useState(false)\r\n\r\n if (to === '/mine-noter' && authProfile.isImitator) {\r\n return (\r\n <>\r\n
  • \r\n {\r\n e.preventDefault()\r\n setShowImitatorModal(true)\r\n }}\r\n className={({ isActive }) =>\r\n `${classes.link} ${isActive ? 'active' : 'link'}`\r\n }\r\n >\r\n
    {label}
    \r\n \r\n
  • \r\n setShowImitatorModal(false)}\r\n />\r\n \r\n )\r\n }\r\n\r\n return (\r\n
  • \r\n \r\n `${classes.link} ${isActive ? 'active' : 'link'}`\r\n }\r\n >\r\n
    {label}
    \r\n \r\n
  • \r\n )\r\n}\r\n\r\nconst TabbedMenu: FC = ({ children }) => {\r\n const classes = useStyles()\r\n const layout = useContainerStyles()\r\n\r\n return (\r\n
    \r\n
    \r\n
      {children}
    \r\n
    \r\n
    \r\n )\r\n}\r\n\r\nexport { TabbedMenu, TabItem }\r\n","import React, { FC } from 'react'\r\nimport { useAtom } from 'jotai'\r\nimport { TabbedMenu, TabItem } from '../../ui/TabbedMenu'\r\nimport { L } from '../../providers/Lokalise'\r\nimport { profileAtom } from '../../../api/profile/profile'\r\n\r\nexport interface ILinkItem {\r\n to: string\r\n label: string\r\n}\r\n\r\nconst links: ILinkItem[] = [\r\n {\r\n to: '/mine-medlemmer',\r\n label: 'HEADER_FANEBLAD_EGNEMEDLEMMER-TITEL',\r\n },\r\n {\r\n to: '/alle-foas-medlemmer',\r\n label: 'HEADER_FANEBLAD_ALLEMEDLEMMER-TITEL',\r\n },\r\n {\r\n to: '/mine-arbejdsteder',\r\n label: 'HEADER_FANEBLAD_MINEARBEJDSSTEDER-TITEL',\r\n },\r\n {\r\n to: '/mine-noter',\r\n label: 'HEADER_FANEBLAD_MINENOTER-TITEL',\r\n },\r\n {\r\n to: '/mine-opdateringer',\r\n label: 'HEADER_FANEBLAD_MINEOPDATERINGER-TITEL',\r\n },\r\n]\r\n\r\nconst linksForSupporter: ILinkItem[] = [\r\n {\r\n to: '/mine-medlemmer',\r\n label: 'HEADER_FANEBLAD_EGNEMEDLEMMER-TITEL',\r\n },\r\n {\r\n to: '/alle-foas-medlemmer',\r\n label: 'HEADER_FANEBLAD_ALLEMEDLEMMER-TITEL',\r\n },\r\n {\r\n to: '/mine-arbejdsteder',\r\n label: 'HEADER_FANEBLAD_MINEARBEJDSSTEDER-TITEL',\r\n },\r\n {\r\n to: '/mine-opdateringer',\r\n label: 'HEADER_FANEBLAD_MINEOPDATERINGER-TITEL',\r\n },\r\n]\r\n\r\nconst Menu: FC = () => {\r\n const [authProfile] = useAtom(profileAtom)\r\n\r\n const linksToUse = links\r\n\r\n return (\r\n \r\n {linksToUse.map((link: ILinkItem) => {\r\n return (\r\n \r\n )\r\n })}\r\n \r\n )\r\n}\r\n\r\nexport { Menu }\r\n","import axios from 'axios'\r\nimport { IUserData } from './Auth0'\r\n\r\nexport const logout = (): void => {\r\n const localUser = localStorage.getItem('user_data')\r\n const user: IUserData = JSON.parse(localUser)\r\n const token = user.id_token\r\n const redirect_uri = process.env.REACT_APP_AUTH_REDIRECT_URI\r\n\r\n const translations = localStorage.getItem('translations')\r\n\r\n const keep = localStorage.getItem('Login_data')\r\n localStorage.clear()\r\n localStorage.setItem('translations', translations)\r\n if (keep) {\r\n localStorage.setItem('Login_data', keep)\r\n }\r\n\r\n const qParams = [\r\n `id_token_hint=${token}`,\r\n `post_logout_redirect_uri=${redirect_uri}`,\r\n // `state=some random string`,\r\n ].join('&')\r\n\r\n const logoutURL = `${process.env.REACT_APP_AUTH_AUTHORITY}/oauth2/logout?${qParams}`\r\n\r\n window.location.href = logoutURL\r\n\r\n axios.get(logoutURL).then(() => {\r\n window.history.replaceState(\r\n {},\r\n document.title,\r\n window.location.pathname\r\n )\r\n })\r\n}\r\n","import React from 'react'\r\nimport { createUseStyles } from 'react-jss'\r\nimport { Link } from 'react-router-dom'\r\nimport { useAtom } from 'jotai'\r\nimport { useContainerStyles } from '../../../theme/layout'\r\nimport { colors } from '../../../theme/palette'\r\nimport {\r\n Foa,\r\n Help,\r\n HandshakeFill,\r\n Heart,\r\n Archive,\r\n Aftalearkiv,\r\n} from '../../../assets/icons'\r\nimport { Typography } from '../Typography/Typography'\r\nimport { Button } from '../Button/Button'\r\nimport { AuthProfile, profileAtom } from '../../../api/profile/profile'\r\nimport { isAuthenticatedAtom, chooseImitatorAtom } from '../../../store/auth'\r\nimport { Circle, CircleIcon, CircleIcon2 } from '../Circle/Circle'\r\nimport { L } from '../../providers/Lokalise'\r\nimport { Menu } from '../../Navigation/Menu/Menu'\r\nimport breakpoints from '../../../theme/breakpoints'\r\nimport { logout } from '../../../utils/Logout'\r\n\r\nconst useStyles = createUseStyles((theme) => ({\r\n container: {\r\n position: 'fixed',\r\n backgroundColor: theme.palette.navBackgroundColor,\r\n width: '100%',\r\n top: 0,\r\n height: 'max-content',\r\n borderBottom: `1px solid ${theme.palette.borderColor}`,\r\n background: colors.white,\r\n zIndex: 1,\r\n 'body.no-scroll &': {\r\n paddingRight: '17px',\r\n },\r\n },\r\n desktopOnly: {\r\n [`@media (max-width: ${breakpoints.Desktop}px)`]: {\r\n display: 'none',\r\n },\r\n },\r\n inner: {\r\n height: theme.sizes.navbarDesktopHeight,\r\n display: 'flex',\r\n justifyContent: 'space-between',\r\n alignItems: 'center',\r\n },\r\n brandIcon: {\r\n display: 'flex',\r\n height: '100%',\r\n maxWidth: '7.813rem',\r\n },\r\n containerLogin: {\r\n textAlign: 'right',\r\n display: 'flex',\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n color: colors.black,\r\n },\r\n profileLink: {\r\n textDecoration: 'underline',\r\n color: 'inherit',\r\n cursor: 'pointer',\r\n '&:hover, &:focus, &:active': {\r\n opacity: '0.8',\r\n },\r\n },\r\n greenText: {\r\n color: theme.colors.green500,\r\n },\r\n containerProfilePicture: {\r\n padding: '0 1rem',\r\n width: '80px',\r\n },\r\n logo: {},\r\n helpContainer: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n marginRight: '30px',\r\n cursor: 'pointer',\r\n },\r\n}))\r\n\r\nconst NavbarDesktop: React.FC = () => {\r\n const classes = useStyles()\r\n const layout = useContainerStyles()\r\n const [profile, _setProfile] = useAtom(profileAtom)\r\n const [isAuthenticated, _setIsAuthenticated] = useAtom(isAuthenticatedAtom)\r\n const [chooseImitator, setChooseImitator] = useAtom(chooseImitatorAtom)\r\n const changeMember = (): void => {\r\n const localProfileData = localStorage.getItem('profile_data')\r\n const data: AuthProfile = JSON.parse(localProfileData)\r\n data.apiProfile = undefined\r\n localStorage.setItem('profile_data', JSON.stringify(data))\r\n _setProfile(data)\r\n setChooseImitator(true)\r\n _setIsAuthenticated(false)\r\n }\r\n\r\n const scrollToFooter = (): void => {\r\n const footer = document.querySelector('#footer')\r\n if (footer) {\r\n window.scrollTo({\r\n top: footer.getBoundingClientRect().top,\r\n left: 0,\r\n behavior: 'smooth',\r\n })\r\n }\r\n }\r\n\r\n const organizeLink = (): JSX.Element => {\r\n return (\r\n <>\r\n {isAuthenticated || (isAuthenticated && !chooseImitator) ? (\r\n \r\n \r\n \r\n \r\n
    \r\n \r\n\r\n \r\n Organisering\r\n \r\n \r\n ) : null}\r\n \r\n )\r\n }\r\n\r\n function aftaleArkivLink(): React.ReactNode {\r\n return (\r\n \r\n \r\n \r\n \r\n
    \r\n \r\n\r\n \r\n Aftalearkiv for TR\r\n \r\n \r\n )\r\n }\r\n\r\n return (\r\n
    \r\n
    \r\n \r\n \r\n \r\n\r\n
    \r\n {aftaleArkivLink()}\r\n {organizeLink()}\r\n {isAuthenticated ? (\r\n {\r\n scrollToFooter()\r\n }}\r\n >\r\n \r\n \r\n \r\n\r\n \r\n Hjælp\r\n \r\n \r\n ) : null}\r\n\r\n {isAuthenticated || (!isAuthenticated && chooseImitator) ? (\r\n <>\r\n {isAuthenticated && (\r\n <>\r\n \r\n \r\n {L(\r\n 'GENERISK_HEADER_LOGINSOM_TEKST'\r\n )}\r\n \r\n \r\n {profile?.apiProfile?.fullName}\r\n \r\n \r\n {/* \r\n \r\n \r\n \r\n {getInitials(\r\n profile.apiProfile\r\n .fullName\r\n )}\r\n \r\n \r\n \r\n
    */}\r\n \r\n )}\r\n \r\n {L('GENERISK_HEADER_LOGUD_KNAP')}\r\n \r\n \r\n ) : null}\r\n {profile && profile.isImitator && isAuthenticated ? (\r\n \r\n {L('GENERISK_HEADER_SKIFTMEDLEM_KNAP')}\r\n \r\n ) : null}\r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n )\r\n}\r\n\r\nexport { NavbarDesktop }\r\n","import React, { useEffect, useState } from 'react'\r\nimport { axiosWithAuth } from './withAuth'\r\nimport { Dialog } from '../components/ui/Dialog/Dialog'\r\nimport { LockFill } from '../assets/icons'\r\nimport { Typography } from '../components/ui/Typography/Typography'\r\nimport { Button } from '../components/ui/Button/Button'\r\n\r\nconst REDIRECT_TO_FOA_CODES = [455, 456, 482, 483, 484, 490, 491, 494, 495, 503]\r\n\r\nconst Interceptor: React.FC = ({ children }) => {\r\n const [apiError, setApiError] = useState(false)\r\n const [errorMessage, setErrorMessage] = useState(\r\n undefined\r\n )\r\n const [errorStatusCode, setErrorStatusCode] = useState(\r\n undefined\r\n )\r\n\r\n useEffect(() => {\r\n const setError = (): void => {\r\n setApiError(true)\r\n }\r\n const interceptorId = axiosWithAuth.interceptors.response.use(\r\n (response) => {\r\n return response\r\n },\r\n (error) => {\r\n if (error?.response?.status > 401) {\r\n setError()\r\n setErrorMessage(\r\n error.response.data.Message &&\r\n error.response.data.Message !== ''\r\n ? error.response.data.Message\r\n : 'Kontakt din afdeling, hvis fejlen fortsætter'\r\n )\r\n\r\n setErrorStatusCode(error.response.status)\r\n }\r\n\r\n return {\r\n error: error?.response?.data,\r\n }\r\n }\r\n )\r\n return () => {\r\n axiosWithAuth.interceptors.request.eject(interceptorId)\r\n }\r\n }, [])\r\n\r\n const closeDialog = (): void => {\r\n if (errorStatusCode) {\r\n if (REDIRECT_TO_FOA_CODES.indexOf(errorStatusCode) !== -1) {\r\n window.location.href = 'https://www.foa.dk/'\r\n }\r\n }\r\n\r\n setErrorMessage(undefined)\r\n setApiError(false)\r\n setErrorStatusCode(undefined)\r\n }\r\n\r\n return (\r\n <>\r\n <>{children}\r\n\r\n {apiError ? (\r\n }\r\n >\r\n \r\n Der skete en fejl\r\n \r\n \r\n {errorMessage}\r\n \r\n \r\n \r\n ) : null}\r\n \r\n )\r\n}\r\n\r\nexport default Interceptor\r\n","import React from 'react'\r\nimport { createUseStyles } from 'react-jss'\r\n\r\nconst useStyles = createUseStyles({\r\n container: {},\r\n})\r\n\r\nconst Example: React.FC = () => {\r\n const classes = useStyles()\r\n\r\n return (\r\n
    \r\n
    \r\n
    \r\n )\r\n}\r\n\r\nexport default Example\r\n","import React from 'react'\r\nimport { createUseStyles } from 'react-jss'\r\nimport { colors } from '../../../theme/palette'\r\n\r\nconst useStyles = createUseStyles(() => ({\r\n row: {\r\n backgroundColor: 'rgba(41, 122, 113, 0.1)',\r\n width: 'fit-content',\r\n color: colors.green500,\r\n display: 'flex',\r\n borderRadius: '4px',\r\n padding: '0.219rem 0.625rem',\r\n fontSize: '0.875rem',\r\n },\r\n}))\r\n\r\nconst Badge: React.FC = ({ children }) => {\r\n const classes = useStyles()\r\n\r\n return
    {children}
    \r\n}\r\n\r\nexport { Badge }\r\n","import React from 'react'\r\nimport { createUseStyles, useTheme } from 'react-jss'\r\nimport { StarFill, RatingStar } from '../../../assets/icons'\r\nimport breakpoints from '../../../theme/breakpoints'\r\n\r\ntype RuleNames = 'star' | 'span'\r\n\r\ninterface StyleProps {\r\n size: number\r\n useOnClick: boolean\r\n right?: string\r\n bottom?: string\r\n}\r\n\r\ninterface Props {\r\n active: boolean\r\n onClick?: (event: React.MouseEvent) => void\r\n size?: number\r\n right?: string\r\n bottom?: string\r\n}\r\n\r\nconst useStyles = createUseStyles(() => ({\r\n star: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n borderRadius: '50%',\r\n boxSizing: 'border-box',\r\n textDecoration: 'none',\r\n aspectRatio: '1/1',\r\n textAlign: 'center',\r\n transition: 'all 0.2s',\r\n boxShadow: 0,\r\n border: '2px solid #fff',\r\n backgroundColor: '#F5F6F8',\r\n '&:hover': {\r\n cursor: ({ useOnClick }) => (useOnClick ? 'pointer' : 'inherit'),\r\n backgroundColor: '#ffffff',\r\n },\r\n '-webkit-appearance': 'none',\r\n '-moz-appearance': 'none',\r\n position: 'absolute',\r\n right: ({ size, right }) => {\r\n return right || `-${size / 3}px`\r\n },\r\n bottom: ({ size, bottom }) => {\r\n return bottom || `-${size / 2}px`\r\n },\r\n top: 'auto',\r\n // bottom: 0,\r\n [`@media (min-width: ${breakpoints.Desktop}px)`]: {\r\n '&': {\r\n // top: '0',\r\n // bottom: 'auto',\r\n },\r\n },\r\n },\r\n span: {\r\n display: 'none',\r\n },\r\n}))\r\n\r\nconst Favorite: React.FC = ({\r\n active,\r\n onClick,\r\n size = 14,\r\n right,\r\n bottom,\r\n}) => {\r\n const theme = useTheme()\r\n const useOnClick = !!onClick\r\n const classes = useStyles({ ...{ size, useOnClick, right, bottom }, theme })\r\n\r\n const width = size ? `${size}px` : '14px'\r\n\r\n return (\r\n \r\n )\r\n}\r\n\r\nexport { Favorite }\r\n","import { axiosWithAuth } from '../withAuth'\r\n\r\n/**\r\n * /favorit/tilfoejfavorit\r\n */\r\nconst setFavorite = async (id: string, type: string): Promise => {\r\n const url = `/favorit/tilfoejfavorit`\r\n\r\n return axiosWithAuth.post(url, null, {\r\n params: {\r\n 'request.favoritId': id,\r\n 'request.favoritType': type,\r\n },\r\n })\r\n}\r\n\r\nconst removeFavorite = async (id: string, type: string): Promise => {\r\n const url = `/favorit/fjernfavorit`\r\n\r\n return axiosWithAuth.delete(url, {\r\n params: {\r\n 'request.favoritId': id,\r\n 'request.favoritType': type,\r\n },\r\n })\r\n}\r\n\r\nexport { setFavorite, removeFavorite }\r\n","import React from 'react'\r\nimport { createUseStyles } from 'react-jss'\r\nimport { colors } from '../../../theme/palette'\r\nimport { Note } from '../../../assets/icons'\r\n\r\ninterface Props {\r\n onClick: (event: React.MouseEvent) => void\r\n}\r\n\r\nconst useStyles = createUseStyles(() => ({\r\n note: {\r\n width: '53px',\r\n position: 'relative',\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n boxSizing: 'border-box',\r\n textDecoration: 'none',\r\n transition: 'all 0.2s',\r\n boxShadow: 0,\r\n border: '0',\r\n background: 'none',\r\n '&:hover': {\r\n cursor: 'pointer',\r\n },\r\n '-webkit-appearance': 'none',\r\n '-moz-appearance': 'none',\r\n },\r\n noteText: {\r\n position: 'absolute',\r\n color: colors.green500,\r\n fontSize: '14px',\r\n // top: '8px',\r\n // left: '23px',\r\n top: '50%',\r\n left: '50%',\r\n transform: 'translate(-50%, -50%)',\r\n },\r\n}))\r\n\r\nconst NoteButton: React.FC = ({ onClick, children }) => {\r\n const classes = useStyles()\r\n\r\n return (\r\n \r\n )\r\n}\r\n\r\nexport { NoteButton }\r\n","import React from 'react'\r\nimport { createUseStyles } from 'react-jss'\r\nimport * as AccordionPrimitive from '@radix-ui/react-accordion'\r\nimport { ChevronDownFill } from '../../../assets/icons'\r\nimport { colors } from '../../../theme/palette'\r\nimport { Typography } from '../Typography/Typography'\r\n\r\nexport interface Props {\r\n title: string\r\n}\r\n\r\nconst useStyles = createUseStyles({\r\n '@keyframes slideDown': {\r\n from: {\r\n height: 0,\r\n },\r\n to: {\r\n height: 'var(--radix-accordion-content-height)',\r\n },\r\n },\r\n '@keyframes slideUp': {\r\n from: {\r\n height: 'var(--radix-accordion-content-height)',\r\n },\r\n to: {\r\n height: 0,\r\n },\r\n },\r\n accordion: {\r\n position: 'relative',\r\n borderRadius: '6px',\r\n backgroundColor: '#fff',\r\n border: '1px solid rgba(0, 0, 0, 0.2);',\r\n padding: '0 1.25rem',\r\n },\r\n trigger: {\r\n position: 'relative',\r\n all: 'unset',\r\n fontFamily: 'inherit',\r\n backgroundColor: 'transparent',\r\n padding: 0,\r\n height: '45px',\r\n flex: 1,\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'space-between',\r\n fontSize: '15px',\r\n lineHeight: 1,\r\n color: 'hsl(250 43.0% 48.0%)',\r\n boxShadow: '0 1px 0 hsl(278deg 4% 89%)',\r\n width: '100%',\r\n cursor: 'pointer',\r\n },\r\n close: {\r\n width: '8px',\r\n right: '5px',\r\n position: 'absolute',\r\n transform: 'rotate(180deg)',\r\n transition: 'all .1s ease-in',\r\n '[data-state=\"open\"] > &': {\r\n transform: 'rotate(0deg)',\r\n },\r\n },\r\n item: {\r\n overflow: 'hidden',\r\n marginTop: 1,\r\n\r\n '&:first-child': {\r\n marginTop: 0,\r\n borderTopLeftRadius: 4,\r\n borderTopRightRadius: 4,\r\n },\r\n\r\n '&:last-child': {\r\n borderBottomLeftRadius: 4,\r\n borderBottomRightRadius: 4,\r\n },\r\n\r\n '&:focus-within': {\r\n position: 'relative',\r\n zIndex: 1,\r\n },\r\n },\r\n header: {\r\n all: 'unset',\r\n color: colors.green500,\r\n // margin: '0 1.25rem',\r\n },\r\n title: {\r\n color: colors.green500,\r\n },\r\n content: {\r\n overflow: 'hidden',\r\n fontSize: 15,\r\n color: 'black',\r\n paddingBottom: '1.25rem',\r\n '&[data-state=\"open\"]': {\r\n animation: `$slideDown 300ms cubic-bezier(0.87, 0, 0.13, 1)`,\r\n },\r\n '&[data-state=\"closed\"]': {\r\n animation: `$slideUp 300ms cubic-bezier(0.87, 0, 0.13, 1)`,\r\n },\r\n },\r\n formControl: {\r\n padding: '20px',\r\n },\r\n contentWrapper: {\r\n padding: '20px',\r\n },\r\n})\r\n\r\nconst Accordion: React.FC = ({ children, title }) => {\r\n const classes = useStyles()\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n {title}\r\n \r\n \r\n \r\n \r\n \r\n {children}\r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport { Accordion }\r\n","import React, {\r\n InputHTMLAttributes,\r\n DetailedHTMLProps,\r\n forwardRef,\r\n FC,\r\n} from 'react'\r\nimport { createUseStyles, useTheme } from 'react-jss'\r\nimport { colors } from '../../../theme/palette'\r\n\r\ntype RuleNames = 'label' | 'input' | 'container'\r\n\r\ntype InputProps = {\r\n isChecked: boolean\r\n label: string\r\n reversed?: boolean\r\n} & Omit<\r\n DetailedHTMLProps, HTMLInputElement>,\r\n 'size'\r\n>\r\n\r\ninterface StyleProps {\r\n isChecked: boolean\r\n reversed: boolean\r\n}\r\n\r\nconst useStyles = createUseStyles({\r\n container: {\r\n height: '1.5rem',\r\n display: 'flex',\r\n alignItems: 'center',\r\n fontSize: '1rem',\r\n },\r\n input: {\r\n position: 'absolute',\r\n opacity: 0,\r\n '& + label:after': {\r\n content: 'none',\r\n },\r\n '&:checked + label:after': {\r\n content: '\"\"',\r\n },\r\n '&:focus + label::before': {\r\n outline: `${colors.green} auto 5px`,\r\n },\r\n },\r\n label: {\r\n position: 'relative',\r\n display: 'inline-block',\r\n paddingLeft: '2.125rem',\r\n paddingRight: ({ reversed }) => (reversed ? '2.125rem' : 0),\r\n height: '1.5rem',\r\n paddingTop: '.125rem',\r\n color: colors.black,\r\n cursor: 'pointer',\r\n '&:before, &:after': {\r\n position: 'absolute',\r\n content: '\"\"',\r\n display: 'inline-block',\r\n borderRadius: '.25rem',\r\n backgroundColor: ({ isChecked }) =>\r\n isChecked ? colors.green : colors.white,\r\n },\r\n '&:before': {\r\n height: '1.5rem',\r\n width: '1.5rem',\r\n border: `1px solid ${colors.green}`,\r\n left: ({ reversed }) => (!reversed ? 0 : 'auto'),\r\n right: ({ reversed }) => (reversed ? 0 : 'auto'),\r\n top: '0',\r\n },\r\n '&:after': {\r\n height: '0.5rem',\r\n width: '1rem',\r\n borderLeft: `0.2rem solid ${colors.white}`,\r\n borderBottom: `0.2rem solid ${colors.white}`,\r\n borderRadius: '0',\r\n transform: 'rotate(-45deg)',\r\n left: ({ reversed }) => (!reversed ? '0.25rem' : 'auto'),\r\n right: ({ reversed }) => (!reversed ? 'auto' : '4px'),\r\n top: '0.4rem',\r\n },\r\n },\r\n})\r\n\r\nconst Checkbox: FC = forwardRef(\r\n ({ label, required, isChecked, id, reversed = false, ...props }, ref) => {\r\n const theme = useTheme()\r\n const classes = useStyles({ ...{ isChecked, reversed }, theme })\r\n return (\r\n
    \r\n \r\n \r\n
    \r\n )\r\n }\r\n)\r\n\r\nexport default Checkbox\r\n","import React, { FC } from 'react'\r\nimport { createUseStyles } from 'react-jss'\r\nimport Checkbox from '../../ui/FormElememts/Checkbox'\r\n\r\nexport interface IItem {\r\n name: string\r\n}\r\n\r\ntype Props = {\r\n items: IItem[]\r\n isSelected: (item: IItem) => boolean\r\n handleChange: (item: IItem) => void\r\n}\r\n\r\nconst useStyles = createUseStyles({\r\n formControl: {\r\n padding: '20px 0',\r\n },\r\n})\r\n\r\nconst Checkboxes: FC = ({ items, handleChange, isSelected }) => {\r\n const classes = useStyles()\r\n\r\n return (\r\n <>\r\n {items.map((item: IItem) => {\r\n return (\r\n
    \r\n {\r\n handleChange(item)\r\n }}\r\n label={item.name}\r\n isChecked={isSelected(item)}\r\n />\r\n
    \r\n )\r\n })}\r\n \r\n )\r\n}\r\n\r\nexport { Checkboxes }\r\n","/* eslint-disable @typescript-eslint/no-explicit-any */\r\n/* eslint-disable @typescript-eslint/no-use-before-define */\r\nimport React from 'react'\r\nimport ReactDOM from 'react-dom'\r\n\r\n// eslint-disable-next-line import/no-extraneous-dependencies\r\nimport { createUseStyles } from 'react-jss'\r\nimport breakpoints from '../../../theme/breakpoints'\r\nimport { colors } from '../../../theme/palette'\r\nimport { zIndexes } from '../../../theme/zIndex'\r\nimport { Close as CloseIcon } from '../../../assets/icons'\r\n\r\ninterface IProps {\r\n isShowing: boolean\r\n hide: any\r\n hideHeader?: boolean\r\n level?: number\r\n}\r\n\r\nconst useStyles = createUseStyles((theme) => ({\r\n '@keyframes slideRight': {\r\n from: {\r\n transform: 'translateX(100%)',\r\n },\r\n to: {\r\n transform: 'translateX(0)',\r\n },\r\n },\r\n container: {\r\n color: theme.palette.secondary,\r\n height: '100vh',\r\n width: '100%',\r\n maxWidth: '100%',\r\n position: 'fixed',\r\n zIndex: zIndexes.drawer,\r\n top: 0,\r\n backgroundColor: theme.palette.navBackgroundColor,\r\n // animation: `.3s $slideRight forwards`,\r\n visibility: 'hidden',\r\n overflow: 'hidden',\r\n transform: 'translateX(100%)',\r\n transition: '.3s ease-in',\r\n right: 0,\r\n // paddingTop: '82px',\r\n boxShadow: '0px 0px 16px rgba(0, 0, 0, 0.25)',\r\n [`@media (min-width: ${breakpoints.Desktop}px)`]: {\r\n '&': {\r\n width: '500px',\r\n },\r\n },\r\n '&.active': {\r\n transform: 'translateX(0)',\r\n visibility: 'visible',\r\n },\r\n },\r\n button: {\r\n position: 'absolute',\r\n zIndex: zIndexes.drawer + 1,\r\n right: 0,\r\n top: 0,\r\n display: 'inline-block',\r\n margin: '20px 48px 0',\r\n borderRadius: '6px',\r\n boxSizing: 'border-box',\r\n textDecoration: 'none',\r\n fontWeight: 400,\r\n textAlign: 'center',\r\n transition: 'all 0.2s',\r\n background: 'transparent',\r\n boxShadow: 0,\r\n height: '10px',\r\n width: '10px',\r\n '&:hover': {\r\n cursor: 'pointer',\r\n },\r\n '-webkit-appearance': 'none',\r\n '-moz-appearance': 'none',\r\n border: '0',\r\n '&:hover svg': {\r\n fill: colors.gray500,\r\n },\r\n },\r\n medium: {\r\n fontSize: '.875em',\r\n },\r\n large: {\r\n fontSize: '1rem',\r\n },\r\n xlarge: {\r\n fontSize: '1.125rem',\r\n },\r\n overlay: {\r\n position: 'fixed',\r\n left: '0',\r\n top: '0',\r\n height: '100vh',\r\n width: '100vw',\r\n zIndex: '2',\r\n },\r\n}))\r\n\r\nconst Overlay: React.FC = ({ children, isShowing, hide }) => {\r\n const node = React.useRef(null)\r\n const classes = useStyles()\r\n const handleClickOutside = (e: any): void => {\r\n if (node && node.current && node.current.contains(e.target)) {\r\n return\r\n }\r\n\r\n if (\r\n node &&\r\n node.current &&\r\n e.target.classList.contains('ignore-clickoutside')\r\n ) {\r\n return\r\n }\r\n\r\n // outside click\r\n if (isShowing) {\r\n if (hide) hide()\r\n }\r\n }\r\n\r\n React.useEffect(() => {\r\n if (isShowing) {\r\n const documentWidth = document.documentElement.clientWidth\r\n const windowWidth = window.innerWidth\r\n const scrollBarWidth = windowWidth - documentWidth\r\n\r\n document.body.style.overflow = 'hidden'\r\n document.body.style.paddingRight = `${scrollBarWidth}px`\r\n document.body.classList.add('no-scroll')\r\n } else {\r\n document.body.style.overflow = 'unset'\r\n document.body.style.paddingRight = 'unset'\r\n document.body.classList.remove('no-scroll')\r\n }\r\n }, [isShowing])\r\n\r\n React.useEffect(() => {\r\n // add when mounted\r\n document.addEventListener('keydown', onKeyPressed)\r\n document.addEventListener('mousedown', handleClickOutside)\r\n\r\n // return function to be called when unmounted\r\n return () => {\r\n document.removeEventListener('keydown', onKeyPressed)\r\n document.removeEventListener('mousedown', handleClickOutside)\r\n }\r\n })\r\n\r\n const onKeyPressed = (e: any): void => {\r\n if (e.key === 'Escape' && hide && isShowing) {\r\n e.preventDefault()\r\n hide()\r\n }\r\n }\r\n\r\n return ReactDOM.createPortal(\r\n <>\r\n {isShowing ? (\r\n hide()}\r\n tabIndex={-1}\r\n role=\"button\"\r\n aria-label=\"overlay\"\r\n onKeyDown={() => console.log('key down')}\r\n />\r\n ) : null}\r\n \r\n \r\n <>{children && children}\r\n
    \r\n ,\r\n document.getElementById('root') as HTMLElement\r\n )\r\n}\r\n\r\nexport { Overlay }\r\n","import React, { FC, useEffect, useState } from 'react'\r\nimport { createUseStyles } from 'react-jss'\r\nimport { useAtom } from 'jotai'\r\nimport { Drawer } from '../../ui/Drawer/Drawer'\r\nimport { Button } from '../../ui/Button/Button'\r\nimport { Settings } from '../../../assets/icons'\r\nimport {\r\n FilterPosition,\r\n FilterTRFor,\r\n FilterTypeOfRepresentative,\r\n FilterUpdateStatus,\r\n FilterWorkGroup,\r\n FilterWorkplace,\r\n IFilter,\r\n initialSelectedFilters,\r\n} from '../../../models/Filter'\r\nimport {\r\n updateGroups,\r\n updateTypeOfRepresentatives,\r\n updatePositions,\r\n updateWorkplaces,\r\n updateTRFor,\r\n updateUpdateStatus,\r\n} from '../../../utils/filterhelper'\r\nimport { Accordion } from '../../ui/Accordion/Accordion'\r\nimport { Checkboxes } from './Checkboxes'\r\nimport { filterAtom, filterSelected } from '../../../store/filter/filterAtom'\r\nimport { Overlay } from '../../ui/Sidebar'\r\nimport { Typography } from '../../ui/Typography/Typography'\r\nimport { L, L_HTML } from '../../providers/Lokalise'\r\nimport Checkbox from '../../ui/FormElememts/Checkbox'\r\nimport { colors } from '../../../theme/palette'\r\n\r\nconst useStyles = createUseStyles({\r\n contentWrapper: {\r\n padding: '20px',\r\n overflow: 'auto',\r\n height: '100%',\r\n paddingBottom: '160px',\r\n },\r\n formControl: {\r\n padding: '20px 0',\r\n },\r\n accordionWrapper: {\r\n marginBottom: '20px',\r\n },\r\n filterBottom: {\r\n display: 'flex',\r\n position: 'absolute',\r\n bottom: '0',\r\n width: '100%',\r\n padding: '20px',\r\n left: '0',\r\n zIndex: 4,\r\n background: colors.white,\r\n borderTop: `1px solid ${colors.borderColor}`,\r\n '& > button': {\r\n flexGrow: 1,\r\n },\r\n '& > button:last-of-type': {\r\n marginRight: '0',\r\n },\r\n },\r\n})\r\n\r\nexport const Filter: FC = () => {\r\n const [selectedItems, setSelectedItems] = useState({\r\n ...initialSelectedFilters,\r\n })\r\n const classes = useStyles()\r\n const [filter] = useAtom(filterAtom)\r\n const [selected, setSelected] = useAtom(filterSelected)\r\n const [isOpen, setIsOpen] = useState(false)\r\n\r\n const onSubmit = (): void => {\r\n setIsOpen(false)\r\n setSelected(selectedItems)\r\n }\r\n\r\n useEffect(() => {\r\n setSelectedItems(selected)\r\n }, [selected])\r\n\r\n const onUpdateWorkplaces = (workPlace: FilterWorkplace): void => {\r\n const items = updateWorkplaces(workPlace, selectedItems)\r\n setSelectedItems(items)\r\n }\r\n\r\n const onUpdateGroups = (workGroup: FilterWorkGroup): void => {\r\n const items = updateGroups(workGroup, selectedItems)\r\n setSelectedItems(items)\r\n }\r\n\r\n const onUpdatePositions = (position: FilterPosition): void => {\r\n const items = updatePositions(position, selectedItems)\r\n setSelectedItems(items)\r\n }\r\n\r\n const onUpdateTypeOfRepresentatives = (\r\n pot: FilterTypeOfRepresentative\r\n ): void => {\r\n const items = updateTypeOfRepresentatives(pot, selectedItems)\r\n setSelectedItems(items)\r\n }\r\n\r\n const onUpdateTRFor = (trFor: FilterTRFor): void => {\r\n const items = updateTRFor(trFor, selectedItems)\r\n setSelectedItems(items)\r\n }\r\n\r\n const onUpdateStatus = (status: FilterUpdateStatus): void => {\r\n const items = updateUpdateStatus(status, selectedItems)\r\n setSelectedItems(items)\r\n }\r\n\r\n const resetFilter = (): void => {\r\n setSelectedItems(initialSelectedFilters)\r\n setSelected(initialSelectedFilters)\r\n }\r\n\r\n return (\r\n
    \r\n }\r\n onClick={() => setIsOpen(true)}\r\n style={{ paddingLeft: '10px' }}\r\n >\r\n {L('MINEMEDLEMMER_FILTER_KNAP')}\r\n \r\n setIsOpen(false)}>\r\n \r\n {L_HTML('MINEMEDLEMMER_FILTER_TITEL_KNAP')}\r\n \r\n
    \r\n
    \r\n \r\n \r\n !!selectedItems.workplaces.find(\r\n (w) => w.id === workPlace.id\r\n )\r\n }\r\n />\r\n \r\n
    \r\n
    \r\n \r\n \r\n !!selectedItems.groups.find(\r\n (w) => w.id === group.id\r\n )\r\n }\r\n />\r\n \r\n
    \r\n
    \r\n \r\n \r\n !!selectedItems.positions.find(\r\n (w) => w.id === position.id\r\n )\r\n }\r\n />\r\n \r\n
    \r\n
    \r\n \r\n \r\n !!selectedItems.typeOfRepresentative.find(\r\n (t) => t.name === trust.name\r\n )\r\n }\r\n />\r\n \r\n
    \r\n\r\n
    \r\n \r\n <>\r\n {filter.representing.map(\r\n (trfor: FilterTRFor) => {\r\n return (\r\n \r\n {\r\n onUpdateTRFor(trfor)\r\n }}\r\n label={trfor.displayName}\r\n isChecked={\r\n !!selectedItems.representing.find(\r\n (t) =>\r\n t.name ===\r\n trfor.name\r\n )\r\n }\r\n />\r\n
    \r\n )\r\n }\r\n )}\r\n \r\n \r\n
    \r\n\r\n
    \r\n \r\n {filter.updateStatus.map((status) => {\r\n return (\r\n \r\n {\r\n onUpdateStatus(status)\r\n }}\r\n label={status.name}\r\n isChecked={\r\n !!selectedItems.updateStatus.find(\r\n (t) => t.id === status.id\r\n )\r\n }\r\n />\r\n
    \r\n )\r\n })}\r\n \r\n
    \r\n\r\n
    \r\n \r\n {L('MINEMEDLEMMER_FILTER_RYD-FILTRE_KNAP')}\r\n \r\n \r\n
    \r\n
    \r\n \r\n
    \r\n )\r\n}\r\n","import React, { FC } from 'react'\r\nimport { createUseStyles } from 'react-jss'\r\nimport { useAtom } from 'jotai'\r\nimport { colors } from '../../../theme/palette'\r\nimport { Close } from '../../../assets/icons'\r\nimport {\r\n FilterPosition,\r\n FilterTRFor,\r\n FilterTypeOfRepresentative,\r\n FilterWorkGroup,\r\n FilterWorkplace,\r\n FilterUpdateStatus,\r\n initialFilter,\r\n} from '../../../models/Filter'\r\nimport {\r\n updateGroups,\r\n updateTypeOfRepresentatives,\r\n updatePositions,\r\n updateWorkplaces,\r\n updateTRFor,\r\n updateUpdateStatus,\r\n} from '../../../utils/filterhelper'\r\nimport { filteredAtom, filterSelected } from '../../../store/filter/filterAtom'\r\nimport { Typography } from '../../ui/Typography/Typography'\r\nimport { baseButton } from '../../../theme/reuseables'\r\n\r\ninterface IPillProps {\r\n label: string\r\n onClick: (event: React.MouseEvent) => void\r\n}\r\n\r\nconst useStyles = createUseStyles({\r\n pills: {\r\n display: 'flex',\r\n height: 'fit-content',\r\n gap: '10px',\r\n flexWrap: 'wrap',\r\n padding: '.4rem 1rem 0 0',\r\n },\r\n numberOfMembers: {\r\n display: 'flex',\r\n flexShrink: '0',\r\n padding: '.8rem 1rem 0 0',\r\n },\r\n container: {\r\n display: 'flex',\r\n },\r\n button: {\r\n ...baseButton,\r\n ...{\r\n cursor: 'pointer',\r\n margin: 0,\r\n padding: 0,\r\n },\r\n },\r\n})\r\n\r\nconst pillStyles = createUseStyles({\r\n pill: {\r\n display: 'flex',\r\n flexShrink: 0,\r\n border: `1px solid ${colors.gray600}`,\r\n background: '#fff',\r\n color: '#000',\r\n padding: '0.375rem 0.625rem',\r\n borderRadius: '8px',\r\n transition: '.3s',\r\n '&:hover': {\r\n cursor: 'pointer',\r\n backgroundColor: colors.green500,\r\n color: colors.white,\r\n },\r\n },\r\n closeIcon: {\r\n backgroundColor: colors.green500,\r\n borderRadius: '50%',\r\n aspectRatio: '1/1',\r\n padding: '.2rem',\r\n width: 'fit-content',\r\n display: 'flex',\r\n alignItems: 'center',\r\n marginLeft: '5px',\r\n '& path': {\r\n strokeWidth: '6px',\r\n },\r\n },\r\n})\r\nexport const Pill: FC = ({ label, onClick }) => {\r\n const classes = pillStyles()\r\n\r\n return (\r\n \r\n )\r\n}\r\n\r\nexport const FilterSummary: FC = () => {\r\n const [members] = useAtom(filteredAtom)\r\n const classes = useStyles()\r\n const [selected, setSelected] = useAtom(filterSelected)\r\n\r\n const onUpdateWorkplaces = (workPlace: FilterWorkplace): void => {\r\n const items = updateWorkplaces(workPlace, selected)\r\n setSelected(items)\r\n }\r\n\r\n const onUpdateTrFor = (trFor: FilterTRFor): void => {\r\n const items = updateTRFor(trFor, selected)\r\n setSelected(items)\r\n }\r\n\r\n const onUpdateGroups = (workGroup: FilterWorkGroup): void => {\r\n const items = updateGroups(workGroup, selected)\r\n setSelected(items)\r\n }\r\n\r\n const onUpdatePositions = (position: FilterPosition): void => {\r\n const items = updatePositions(position, selected)\r\n setSelected(items)\r\n }\r\n\r\n const onUpdateTypeOfRepresentatives = (\r\n pot: FilterTypeOfRepresentative\r\n ): void => {\r\n const items = updateTypeOfRepresentatives(pot, selected)\r\n setSelected(items)\r\n }\r\n\r\n const onUpdateUpdateStatus = (status: FilterUpdateStatus): void => {\r\n const items = updateUpdateStatus(status, selected)\r\n setSelected(items)\r\n }\r\n\r\n const ifAny = (): boolean => {\r\n const { positions, workplaces, typeOfRepresentative, groups } = selected\r\n return (\r\n positions.length > 0 ||\r\n workplaces.length > 0 ||\r\n typeOfRepresentative.length > 0 ||\r\n groups.length > 0\r\n )\r\n }\r\n\r\n return (\r\n
    \r\n
    \r\n \r\n Viser {members.length} medlemmer\r\n \r\n
    \r\n
    \r\n {selected.groups.map((g) => {\r\n return (\r\n onUpdateGroups(g)}\r\n />\r\n )\r\n })}\r\n {selected.typeOfRepresentative.map((p) => {\r\n return (\r\n onUpdateTypeOfRepresentatives(p)}\r\n />\r\n )\r\n })}\r\n {selected.positions.map((p) => {\r\n return (\r\n onUpdatePositions(p)}\r\n />\r\n )\r\n })}\r\n {selected.workplaces.map((w) => {\r\n return (\r\n onUpdateWorkplaces(w)}\r\n />\r\n )\r\n })}\r\n {selected.representing.map((tr) => {\r\n return (\r\n onUpdateTrFor(tr)}\r\n />\r\n )\r\n })}\r\n {selected.updateStatus.map((status) => {\r\n return (\r\n onUpdateUpdateStatus(status)}\r\n />\r\n )\r\n })}\r\n {ifAny() ? (\r\n setSelected(initialFilter)}\r\n >\r\n \r\n Ryd filtre\r\n \r\n \r\n ) : null}\r\n
    \r\n
    \r\n )\r\n}\r\n","import React, { ReactElement } from 'react'\r\n// eslint-disable-next-line import/no-extraneous-dependencies\r\nimport { Meta } from '@storybook/react'\r\nimport InputComponent from '../Input'\r\n\r\nexport default {\r\n title: 'Components/UI/FormElements/Input',\r\n component: InputComponent,\r\n} as Meta\r\n\r\nexport function Input({ ...args }): ReactElement {\r\n return \r\n}\r\n\r\nexport function InputRequired({ ...args }): ReactElement {\r\n return \r\n}\r\n","import React, { useState } from 'react'\r\nimport { createUseStyles, useTheme } from 'react-jss'\r\nimport { colors } from '../../../theme/palette'\r\nimport { Search as SearchIcon, StarFill, Close } from '../../../assets/icons'\r\nimport { Input } from '../FormElememts/stories/Input.stories'\r\nimport { Button } from '../Button/Button'\r\nimport { baseButton } from '../../../theme/reuseables'\r\n\r\ntype RuleNames =\r\n | 'label'\r\n | 'input'\r\n | 'container'\r\n | 'icon'\r\n | 'searchButton'\r\n | 'button'\r\n\r\ninterface StyleProps {\r\n query: string\r\n handleSearch?: () => void\r\n typeSearch?: string\r\n}\r\n\r\ntype Props = {\r\n label: string\r\n required: boolean\r\n typeSearch: string\r\n searchButtonLabel: string\r\n style?: React.CSSProperties\r\n onSearch?: (search: string) => void\r\n onChange?: (search: string) => void\r\n autoFocus?: boolean\r\n}\r\n\r\nconst useStyles = createUseStyles({\r\n container: {\r\n position: 'relative',\r\n width: '100%',\r\n },\r\n input: {\r\n height: '3.125rem',\r\n border: `1px solid ${colors.borderColor}`,\r\n borderRadius: '6px',\r\n width: '100%',\r\n fontSize: '1.125rem',\r\n paddingLeft: '1.25rem',\r\n '&:focus': {\r\n borderColor: colors.green500,\r\n outlineColor: colors.green500,\r\n },\r\n '&:active': {\r\n borderColor: colors.green500,\r\n outlineColor: colors.green500,\r\n },\r\n '&:focus ~ $label': {\r\n display: 'none',\r\n },\r\n '&:focus ~ $searchButton': {\r\n borderTopColor: colors.green500,\r\n borderBottomColor: colors.green500,\r\n borderRightColor: colors.green500,\r\n },\r\n },\r\n label: {\r\n display: ({ query }) => (query.length === 0 ? 'inline' : 'none'),\r\n position: 'absolute',\r\n pointerEvents: 'none',\r\n left: '1.25rem',\r\n fontSize: ({ query }) => (query.length === 0 ? '1.125rem' : '0.75rem'),\r\n top: ({ query }) => (query.length === 0 ? '50%' : '1.825rem'),\r\n transform: ({ query }) =>\r\n query.length === 0 ? 'translateY(-50%)' : 'unset',\r\n color: colors.labelColor,\r\n transition: '0.2s ease all',\r\n },\r\n button: {\r\n ...baseButton,\r\n ...{\r\n cursor: 'pointer',\r\n width: 'auto',\r\n padding: '3px',\r\n margin: '0',\r\n borderRadius: '50%',\r\n background: colors.gray500,\r\n position: 'absolute',\r\n right: '68px',\r\n top: '13px',\r\n zIndex: '3',\r\n },\r\n },\r\n searchButton: {\r\n borderTopRightRadius: '6px',\r\n borderBottomRightRadius: '6px',\r\n borderLeft: `1px solid ${colors.borderColor}`,\r\n borderRight: 'none',\r\n borderBottom: 'none',\r\n borderTop: 'none',\r\n color: colors.white,\r\n position: 'absolute',\r\n width: '3.75em',\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n height: '44px',\r\n top: '2px',\r\n right: '2px',\r\n '&:hover': {\r\n cursor: 'pointer',\r\n borderColor: colors.green500,\r\n },\r\n '&:active': {\r\n borderColor: colors.green500,\r\n outlineColor: colors.green500,\r\n },\r\n '-webkit-appearance': 'none',\r\n '-moz-appearance': 'none',\r\n\r\n // Primary specifics\r\n backgroundColor: ({ typeSearch }) =>\r\n typeSearch === 'primary' ? colors.white : colors.green500,\r\n\r\n // Secondary specifics\r\n minWidth: ({ typeSearch }) =>\r\n typeSearch === 'secondary' ? '8rem' : 'unset',\r\n },\r\n icon: {\r\n // Primary specifics\r\n display: ({ typeSearch }) =>\r\n typeSearch === 'primary' ? 'block' : 'none',\r\n width: '1.325em',\r\n color: colors.green500,\r\n },\r\n})\r\n\r\nconst SearchField: React.FC = ({\r\n label,\r\n required,\r\n typeSearch = 'primary',\r\n searchButtonLabel,\r\n autoFocus,\r\n onSearch,\r\n onChange,\r\n ...props\r\n}) => {\r\n const [query, setQuery] = useState('')\r\n const theme = useTheme()\r\n const classes = useStyles({ ...{ query, typeSearch }, theme })\r\n const handleSearch = (): void => {\r\n if (onSearch) {\r\n onSearch(query)\r\n }\r\n }\r\n return (\r\n
    \r\n {\r\n setQuery(e.target.value)\r\n\r\n if (onChange) {\r\n onChange(e.target.value)\r\n }\r\n }}\r\n />\r\n {query && (\r\n {\r\n setQuery('')\r\n\r\n if (onChange) {\r\n onChange('')\r\n }\r\n }}\r\n >\r\n \r\n \r\n )}\r\n \r\n {typeSearch === 'primary' ? (\r\n \r\n ) : (\r\n
    {searchButtonLabel}
    \r\n )}\r\n \r\n
    \r\n )\r\n}\r\n\r\nSearchField.defaultProps = {\r\n onSearch: undefined,\r\n onChange: undefined,\r\n style: undefined,\r\n autoFocus: false,\r\n}\r\n\r\nexport default SearchField\r\n","import React from 'react'\r\nimport { createUseStyles } from 'react-jss'\r\nimport { colors } from '../../../theme/palette'\r\n\r\ntype RuleNames =\r\n | 'label'\r\n | 'input'\r\n | 'container'\r\n | 'innerContainer'\r\n | 'groupLabel'\r\n\r\ntype Props = {\r\n labels: string[]\r\n groupLabel: string\r\n activeValue: string\r\n} & React.ComponentPropsWithoutRef<'input'>\r\n\r\nconst useStyles = createUseStyles({\r\n container: {\r\n display: 'flex',\r\n },\r\n innerContainer: {\r\n display: 'flex',\r\n padding: '0 1.5rem',\r\n },\r\n input: {\r\n opacity: 0,\r\n width: 0,\r\n '&:checked + label:before': {\r\n border: `7px solid ${colors.green}`,\r\n },\r\n '&:checked': {\r\n '&::after': {\r\n content: '\"\"',\r\n },\r\n },\r\n },\r\n label: {\r\n position: 'relative',\r\n paddingLeft: '1.7rem',\r\n '&:before': {\r\n content: '\"\"',\r\n position: 'absolute',\r\n display: 'inline-block',\r\n left: 0,\r\n top: '50%',\r\n marginTop: '-0.6rem',\r\n height: '1.2rem',\r\n width: '1.2rem',\r\n border: `1px solid ${colors.green}`,\r\n borderRadius: '3rem',\r\n backgroundColor: colors.white,\r\n fontSize: '1.125rem',\r\n cursor: 'pointer',\r\n },\r\n },\r\n groupLabel: {\r\n fontWeight: 700,\r\n },\r\n})\r\n\r\nconst RadioButtons: React.FC = ({\r\n labels,\r\n groupLabel,\r\n activeValue,\r\n ...props\r\n}) => {\r\n const classes = useStyles()\r\n\r\n return (\r\n
    \r\n

    {groupLabel}

    \r\n {!!labels &&\r\n labels.map((label) => (\r\n
    \r\n \r\n \r\n
    \r\n ))}\r\n
    \r\n )\r\n}\r\n\r\nexport default RadioButtons\r\n","import React, { FC, useEffect, useState } from 'react'\r\nimport { createUseStyles } from 'react-jss'\r\nimport { useNavigate } from 'react-router-dom'\r\nimport { DialogClose } from '@radix-ui/react-dialog'\r\nimport { AddContact } from '../../../assets/icons'\r\nimport { baseButton } from '../../../theme/reuseables'\r\nimport { L, L_HTML } from '../../providers/Lokalise'\r\nimport { Button } from '../../ui/Button/Button'\r\nimport { Circle } from '../../ui/Card'\r\nimport { CircleIcon } from '../../ui/Circle/Circle'\r\nimport Checkbox from '../../ui/FormElememts/Checkbox'\r\nimport { Typography } from '../../ui/Typography/Typography'\r\nimport { Dialog } from '../../ui/Dialog/Dialog'\r\nimport { colors } from '../../../theme/palette'\r\n\r\nconst useStyles = createUseStyles({\r\n button: {\r\n ...baseButton,\r\n ...{\r\n margin: 0,\r\n padding: '0.5rem',\r\n cursor: 'pointer',\r\n },\r\n },\r\n modalButtons: {\r\n display: 'flex',\r\n },\r\n modalCheckbox: {\r\n display: 'flex',\r\n position: 'absolute',\r\n right: '20px',\r\n top: '20px',\r\n },\r\n})\r\n\r\nconst GotoMembrsearchModal: FC = () => {\r\n const [showAgain, setShowAgain] = useState(true)\r\n const [hideMemberDialog, setHideMemberDialog] = useState(false)\r\n const classes = useStyles()\r\n const navigate = useNavigate()\r\n\r\n useEffect(() => {\r\n const localData = localStorage.getItem('dialog1_show')\r\n\r\n if (localData) {\r\n const parsed = JSON.parse(localData)\r\n\r\n if (parsed === false) {\r\n setHideMemberDialog(true)\r\n }\r\n }\r\n }, [])\r\n\r\n if (hideMemberDialog) {\r\n return (\r\n navigate('/alle-foas-medlemmer')}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n \r\n {L('MINEMEDLEMMER_TILFØJKOLLEGA_KNAP')}\r\n \r\n \r\n )\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {L('MINEMEDLEMMER_TILFØJKOLLEGA_KNAP')}\r\n \r\n \r\n }\r\n hideClose\r\n icon={}\r\n >\r\n
    \r\n setShowAgain(!showAgain)}\r\n />\r\n
    \r\n \r\n {L_HTML('TILFØJ-KOLLEGA_POPUP_OVERSKRIFT')}\r\n \r\n \r\n {L_HTML('TILFØJ-KOLLEGA-POPUP-TEXT')}\r\n \r\n
    \r\n \r\n {\r\n if (!showAgain) {\r\n localStorage.setItem(\r\n 'dialog1_show',\r\n JSON.stringify(false)\r\n )\r\n }\r\n }}\r\n >\r\n {L_HTML('TILFØJ-KOLLEGA-POPUP-ANNULER_KNAP')}\r\n \r\n \r\n\r\n {\r\n if (!showAgain) {\r\n localStorage.setItem(\r\n 'dialog1_show',\r\n JSON.stringify(false)\r\n )\r\n }\r\n navigate('/alle-foas-medlemmer')\r\n }}\r\n >\r\n {L_HTML('TILFØJ-KOLLEGA-POPUP-SØG_KNAP')}\r\n \r\n
    \r\n \r\n )\r\n}\r\n\r\nexport { GotoMembrsearchModal }\r\n","import React, { FC, useState } from 'react'\r\nimport { createUseStyles } from 'react-jss'\r\nimport { useAtom } from 'jotai'\r\nimport { Dialog } from '../../ui/Dialog/Dialog'\r\nimport { Foa } from '../../../assets/icons'\r\nimport { baseButton } from '../../../theme/reuseables'\r\nimport { L, L_HTML } from '../../providers/Lokalise'\r\nimport { Circle } from '../../ui/Card'\r\nimport { CircleIcon } from '../../ui/Circle/Circle'\r\nimport { Typography } from '../../ui/Typography/Typography'\r\nimport { Button } from '../../ui/Button/Button'\r\nimport { colors } from '../../../theme/palette'\r\nimport { profileAtom } from '../../../api/profile/profile'\r\nimport { ImitatorNoAccessWarning } from '../Imitator/ImitatorNoAccessWarning'\r\n\r\nconst useStyles = createUseStyles({\r\n button: {\r\n ...baseButton,\r\n ...{\r\n margin: 0,\r\n padding: '0.5rem 0rem 0.5rem 2rem',\r\n cursor: 'pointer',\r\n },\r\n },\r\n linkArea: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n maxWidth: '250px',\r\n width: '100%',\r\n alignItems: 'center',\r\n marginTop: '20px',\r\n '& p': {\r\n margin: '20px 0',\r\n },\r\n '& button': {\r\n width: '100%',\r\n flexGrow: 1,\r\n },\r\n },\r\n})\r\n\r\nconst SignupMemberModal: FC = () => {\r\n const classes = useStyles()\r\n const [authProfile] = useAtom(profileAtom)\r\n const [showImitatorModal, setShowImitatorModal] = useState(false)\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {L_HTML('BLANKETTER_POPUP_ÅBEN_KNAP')}\r\n \r\n \r\n }\r\n icon={}\r\n iconBGColor={colors.white}\r\n iconBorder={colors.borderColor}\r\n >\r\n \r\n {L_HTML('BLANKETTER_POPUP_OVERSKRIFT')}\r\n \r\n \r\n {L_HTML('BLANKETTER_POPUP_TEXT')}\r\n \r\n
    \r\n {/* \r\n {L_HTML('BLANKETTER_POPUP_INDEMELDELSE_TEXT')}\r\n */}\r\n {\r\n if (authProfile.isImitator) {\r\n setShowImitatorModal(true)\r\n } else {\r\n window.open(\r\n // eslint-disable-next-line max-len\r\n process.env.REACT_APP_LINK_INDEMELDELSE,\r\n '_blank'\r\n )\r\n }\r\n }}\r\n >\r\n {L_HTML('BLANKETTER_POPUP_INDEMELDELSE_KNAP')}\r\n \r\n
    \r\n\r\n
    \r\n {/* \r\n {L_HTML('BLANKETTER_POPUP_RINGOP_TEXT')}\r\n */}\r\n {\r\n if (authProfile.isImitator) {\r\n setShowImitatorModal(true)\r\n } else {\r\n window.open(\r\n // eslint-disable-next-line max-len\r\n process.env.REACT_APP_LINK_RING_MIG_OP,\r\n '_blank'\r\n )\r\n }\r\n }}\r\n >\r\n {L_HTML('BLANKETTER_POPUP_RINGOP_KNAP')}\r\n \r\n
    \r\n
    \r\n {/* \r\n {' '}\r\n {L_HTML('BLANKETTER_POPUP_KONTIGENT_TEXT')}\r\n */}\r\n {\r\n window.open(\r\n // eslint-disable-next-line max-len\r\n 'https://www.foa.dk/bliv-medlem/kontingenter?utm_source=MineMedlemmer&utm_medium=web&utm_campaign=tillidsvalgt',\r\n '_blank'\r\n )\r\n }}\r\n >\r\n {L_HTML('BLANKETTER_POPUP_KONTIGENT_KNAP')}\r\n \r\n
    \r\n \r\n setShowImitatorModal(false)}\r\n />\r\n \r\n )\r\n}\r\n\r\nexport { SignupMemberModal }\r\n","import React, { FC } from 'react'\r\nimport { GotoMembrsearchModal } from '../GotoMembrsearchModal'\r\nimport { SignupMemberModal } from '../SignupMemberModal'\r\n\r\ninterface HeaderLinksProps {\r\n showGotoMembrsearchModal?: boolean\r\n}\r\n\r\nconst HeaderLinks: FC = ({ showGotoMembrsearchModal }) => {\r\n return (\r\n <>\r\n {showGotoMembrsearchModal ? : null}\r\n \r\n \r\n )\r\n}\r\n\r\nHeaderLinks.defaultProps = {\r\n showGotoMembrsearchModal: true,\r\n}\r\n\r\nexport { HeaderLinks }\r\n","/* eslint-disable max-len */\r\nimport React, { useCallback, useEffect, useState } from 'react'\r\nimport { useAtom } from 'jotai'\r\nimport { createUseStyles } from 'react-jss'\r\nimport { useSearchParams } from 'react-router-dom'\r\nimport { Member } from '../../../models/Member'\r\nimport { IFilter, initialSelectedFilters } from '../../../models/Filter'\r\nimport { membersAtom } from '../../../api/members/members'\r\nimport {\r\n Card,\r\n CardCell,\r\n CardList,\r\n CardMobile,\r\n CardHeaderCell,\r\n CardHeader,\r\n CardContentMobile,\r\n CircleText,\r\n Circle,\r\n} from '../../ui/Card'\r\nimport { Typography } from '../../ui/Typography/Typography'\r\nimport { getInitials } from '../../../utils/initials'\r\nimport { Badge } from '../../ui/Badge/Badge'\r\nimport { Favorite } from '../../ui/Favorite'\r\nimport { removeFavorite, setFavorite } from '../../../api/favorite'\r\nimport { NoteButton } from '../../ui/NoteButton'\r\nimport { Filter } from './Filter'\r\nimport {\r\n filterAtom,\r\n filteredAtom,\r\n searchAtom,\r\n showOnlyFavorites,\r\n filterSelected,\r\n} from '../../../store/filter/filterAtom'\r\nimport { FilterSummary } from '../../modules/Filter/FiltersSummary'\r\nimport { Button } from '../../ui/Button/Button'\r\nimport { colors } from '../../../theme/palette'\r\nimport { SendFill, SendToMany, Star, StarFill } from '../../../assets/icons'\r\nimport breakpoints from '../../../theme/breakpoints'\r\nimport { SortButton } from '../../ui/SortButton'\r\nimport useSortMembersList from '../../../hooks/useSortMembersList'\r\nimport SearchField from '../../ui/SearchField/SearchField'\r\nimport { formatDate } from '../../../utils/format'\r\nimport Checkbox from '../../ui/FormElememts/Checkbox'\r\nimport RadioButtons from '../../ui/FormElememts/RadioButton'\r\nimport { Dialog } from '../../ui/Dialog/Dialog'\r\nimport { L, L_HTML } from '../../providers/Lokalise'\r\nimport { baseButton } from '../../../theme/reuseables'\r\nimport { HeaderLinks } from '../../modules/Headerlinks'\r\nimport { profileAtom } from '../../../api/profile/profile'\r\nimport { ImitatorNoAccessWarning } from '../../modules/Imitator/ImitatorNoAccessWarning'\r\n\r\nconst getUpdateStatusLabel = (status: string): string => {\r\n let label = status\r\n\r\n switch (status) {\r\n case 'AfsluttetBehandlingSidste30Dage':\r\n label = L('MINEOPDATERINGER_STATUS_FaerdigBehandlet') // 'Færdig behandlet / opdateret'\r\n break\r\n case 'AfventerGodkendelse':\r\n label = L('MINEOPDATERINGER_STATUS_UnderOpdatering') // Afventer opdatering'\r\n break\r\n default:\r\n break\r\n }\r\n\r\n return label\r\n}\r\n\r\ntype IData = {\r\n filter: IFilter\r\n members: Member[]\r\n}\r\n\r\nconst useStyles = createUseStyles({\r\n '@keyframes fadeIn': {\r\n from: {\r\n opacity: 0,\r\n },\r\n to: {\r\n opacity: 1,\r\n },\r\n },\r\n container: {\r\n padding: '0 1.5rem',\r\n [`@media (min-width: ${breakpoints.Desktop}px)`]: {\r\n '&': {\r\n padding: '0',\r\n },\r\n },\r\n },\r\n headerArea: {\r\n display: 'flex',\r\n padding: '.5rem 0',\r\n minHeight: '5rem',\r\n },\r\n headerAreaTop: {\r\n display: 'flex',\r\n padding: '1rem 0 .5rem',\r\n borderBottom: `1px solid ${colors.borderColor}`,\r\n marginBottom: '1rem',\r\n },\r\n topArea: {\r\n borderBottom: `1px solid ${colors.gray700}`,\r\n // TODO: remove this when this area has been developed.\r\n minHeight: '60px',\r\n },\r\n headerActions: {\r\n display: 'flex',\r\n flexGrow: 1,\r\n marginLeft: 'auto',\r\n justifyContent: 'flex-end',\r\n alignItems: 'flex-start',\r\n flexShrink: 0,\r\n },\r\n sendingEmailSettings: {\r\n display: 'flex',\r\n padding: '.5rem 1rem',\r\n minHeight: '5rem',\r\n width: '100%',\r\n backgroundColor: colors.green200,\r\n color: colors.black,\r\n justifyContent: 'space-between',\r\n alignItems: 'center',\r\n '& span': {\r\n fontWeight: 700,\r\n },\r\n animation: '.5s $fadeIn',\r\n },\r\n members: {\r\n paddingTop: '20px',\r\n },\r\n sortPlaceholder: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n padding: '0.75em 1.75em',\r\n margin: '0 0.3em 0.3em 0',\r\n borderRadius: '6px',\r\n boxSizing: 'border-box',\r\n textDecoration: 'none',\r\n fontWeight: 400,\r\n textAlign: 'center',\r\n transition: 'all 0.2s',\r\n boxShadow: 0,\r\n '&:hover': {\r\n cursor: 'pointer',\r\n color: colors.black,\r\n fontWeight: '700',\r\n },\r\n '-webkit-appearance': 'none',\r\n '-moz-appearance': 'none',\r\n fontStyle: 'normal',\r\n fontSize: '16px',\r\n lineHeight: '120%',\r\n color: '#000000',\r\n border: 0,\r\n background: 'none',\r\n },\r\n dialogButtonsContainer: {\r\n display: 'flex',\r\n width: '100%',\r\n justifyContent: 'space-around',\r\n },\r\n button: {\r\n ...baseButton,\r\n ...{\r\n cursor: 'pointer',\r\n },\r\n },\r\n modalButtons: {\r\n display: 'flex',\r\n },\r\n modalCheckbox: {\r\n display: 'flex',\r\n position: 'absolute',\r\n right: '20px',\r\n top: '20px',\r\n },\r\n numberOfMembers: {\r\n display: 'flex',\r\n padding: '30px 0 90px',\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n },\r\n iconWrapper: {\r\n position: 'relative',\r\n },\r\n searchField: {\r\n width: '100%',\r\n marginRight: '20px',\r\n [`@media (min-width: ${breakpoints.Desktop}px)`]: {\r\n '&': {\r\n width: 'auto',\r\n minWidth: '425px',\r\n marginRight: '20px',\r\n },\r\n },\r\n },\r\n})\r\n\r\nconst gridTemplateColumns = '8% 24% 24% 12% 8% 16% 8%'\r\n\r\nconst Members: React.FC = (): JSX.Element => {\r\n const [showImitatorModal, setShowImitatorModal] = useState(false)\r\n const [data, update] = useAtom(membersAtom)\r\n const classes = useStyles()\r\n const [members] = useAtom(filteredAtom)\r\n const [, setFilter] = useAtom(filterAtom)\r\n const [, setSearchAtom] = useAtom(searchAtom)\r\n const [isSendingView, setIsSendingView] = useState(false)\r\n const [isEmailSentView, setIsEmailSentView] = useState(false)\r\n const [AllChosen, setAllChosen] = useState(false)\r\n const [emailType, setEmailType] = useState('Arbejdsmail')\r\n const [chosenMembers, setChosenMembers] = useState([])\r\n const [mailingList, setMailingList] = useState('')\r\n const [showDialog, setShowDialog] = useState(false)\r\n const [invalidEmailsList, setInvalidEmailsList] = useState([])\r\n const [favoritesOnly, setShowOnlyFavorites] = useAtom(showOnlyFavorites)\r\n const [, setFilterSelected] = useAtom(filterSelected)\r\n const [searchParams] = useSearchParams()\r\n const [initialized, setInitialized] = useState(false)\r\n const [authProfile] = useAtom(profileAtom)\r\n const [firstTimeSendingEmail, setfirstTimeSendingEmail] = useState(true)\r\n const [showFirstTimeModal, setHowFirstTimeShowModal] = useState(false)\r\n const FIRST_TIME_EMAIL_KEY = 'first_time_email'\r\n\r\n const { setSort, sortState } = useSortMembersList()\r\n\r\n useEffect(() => {\r\n const localStorageData = localStorage.getItem(FIRST_TIME_EMAIL_KEY)\r\n\r\n if (localStorageData) {\r\n setfirstTimeSendingEmail(false)\r\n }\r\n }, [])\r\n\r\n useEffect(() => {\r\n const d = data as IData\r\n if (d && d.filter && !initialized) {\r\n const wp = searchParams.get('wp')\r\n setInitialized(true)\r\n if (wp) {\r\n const found = d.filter.workplaces.find((w) => w.id === +wp)\r\n\r\n if (found) {\r\n const copy = { ...initialSelectedFilters }\r\n copy.workplaces.push(found)\r\n setFilterSelected(copy)\r\n }\r\n }\r\n\r\n d.filter.updateStatus = [\r\n {\r\n id: 'AfsluttetBehandlingSidste30Dage',\r\n name: 'Opdateret',\r\n },\r\n { id: 'AfventerGodkendelse', name: 'Afventer opdatering' },\r\n ]\r\n\r\n setFilter(d.filter)\r\n\r\n if (!sortState) {\r\n setSort('name')\r\n }\r\n }\r\n }, [data, setFilter])\r\n\r\n const onClickFavorite = async (member: Member): Promise => {\r\n const callback = member.isFavorite ? removeFavorite : setFavorite\r\n\r\n const response = await callback(`${member.memberId}`, 'MedlemIdent')\r\n\r\n if (response) {\r\n update({ type: 'refetch' })\r\n }\r\n }\r\n\r\n const isChecked = (member: Member): boolean =>\r\n chosenMembers.some((element) => element.memberId === member.memberId)\r\n\r\n const handleSendingEmailView = (): void => setIsSendingView((v) => !v)\r\n\r\n const handleChooseAll = (): void => {\r\n if (chosenMembers.length === members.length) {\r\n setChosenMembers([])\r\n setAllChosen(false)\r\n } else {\r\n setChosenMembers([...members])\r\n setAllChosen(true)\r\n }\r\n }\r\n\r\n const checkValids = useCallback(() => {\r\n let isValid = true\r\n if (chosenMembers) {\r\n const invalidEmails = []\r\n const mailingListRaw = chosenMembers\r\n .map((member) => {\r\n const email =\r\n emailType === 'Arbejdsmail'\r\n ? member?.workContact?.email !== '' &&\r\n member?.workContact?.email\r\n : member?.privateContact?.email !== '' &&\r\n member?.privateContact?.email\r\n if (!email || email.length === 0) {\r\n invalidEmails.push(member.fullName)\r\n }\r\n return email\r\n })\r\n .filter(\r\n (validEmail) =>\r\n validEmail !== undefined && validEmail !== null\r\n )\r\n\r\n setInvalidEmailsList(invalidEmails)\r\n const mailingListString =\r\n window.navigator.platform.includes('Win') ||\r\n window.navigator.userAgent.includes('Win')\r\n ? mailingListRaw.join(';')\r\n : mailingListRaw.join(',')\r\n setMailingList(`${mailingListString}`)\r\n isValid = !!mailingListString.length && !invalidEmails.length\r\n\r\n if (isValid) {\r\n window.open(`mailto:?bcc=${mailingListString}`, '_blank')\r\n if (showDialog) {\r\n setShowDialog(false)\r\n }\r\n handleSendingEmailView()\r\n }\r\n }\r\n\r\n return isValid\r\n }, [chosenMembers, emailType, showDialog])\r\n\r\n const sendEmail = (): void => {\r\n window.open(`mailto:?bcc=${mailingList}`, '_blank')\r\n if (showDialog) {\r\n setShowDialog(false)\r\n }\r\n handleSendingEmailView()\r\n setIsEmailSentView(true)\r\n }\r\n\r\n const confirmSendingEmail = (): void => {\r\n sendEmail()\r\n setIsSendingView(false)\r\n setIsEmailSentView(true)\r\n }\r\n\r\n const handleSendingEmailDialog = (): void => {\r\n if (authProfile.isImitator) {\r\n setShowImitatorModal(true)\r\n setIsSendingView(false)\r\n setIsEmailSentView(false)\r\n setChosenMembers([])\r\n setAllChosen(false)\r\n } else {\r\n const isValid = checkValids()\r\n if (!isValid) {\r\n setShowDialog(true)\r\n }\r\n }\r\n }\r\n\r\n const onSearch = (search: string): void => {\r\n setSearchAtom(search)\r\n }\r\n\r\n const useSearch = (search: string): void => {\r\n setSearchAtom(search)\r\n }\r\n\r\n const zeroValidAddresses = (): JSX.Element => {\r\n return (\r\n <>\r\n \r\n Følgende personer mangler en{' '}\r\n {emailType === 'Arbejdsmail'\r\n ? 'arbejdsmail'\r\n : 'privat e-mailadresse'}{' '}\r\n :\r\n \r\n \r\n {invalidEmailsList.join(', ')}\r\n \r\n \r\n Du kan derfor ikke sende mails til dem.\r\n \r\n
    \r\n {\r\n setShowDialog(false)\r\n }}\r\n >\r\n OK\r\n \r\n
    \r\n \r\n )\r\n }\r\n\r\n const multipleInvalidAddresses = (): JSX.Element => {\r\n return (\r\n <>\r\n \r\n {emailType === 'Arbejdsmail'\r\n ? L_HTML(\r\n 'MINEMEDLEMMER_KONTAKTFLERE_ARBEJDSMAIL_FEEDBACKVINDUE_TITEL'\r\n )\r\n : L_HTML(\r\n 'MINEMEDLEMMER_KONTAKTFLERE_PRIVATMAIL_FEEDBACKVINDUE_TITEL'\r\n )}\r\n \r\n \r\n {invalidEmailsList.join(', ')}\r\n \r\n \r\n {L_HTML('MINEMEDLEMMER_KONTAKTFLERE_FEEDBACKVINDUE_TEXT_1')}\r\n \r\n
    \r\n {\r\n setShowDialog(false)\r\n }}\r\n >\r\n {L(\r\n 'MINEMEDLEMMER_KONTAKTFLERE_FEEDBACKVINDUE_ANNULLER_KNAP'\r\n )}\r\n \r\n \r\n {L(\r\n 'MINEMEDLEMMER_KONTAKTFLERE_FEEDBACKVINDUE_SEND_KNAP'\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
    \r\n
    \r\n
    \r\n
    \r\n \r\n {L_HTML('MINEMEDLEMMER_TITEL')}\r\n \r\n
    \r\n\r\n
    \r\n
    \r\n \r\n
    \r\n\r\n \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n {!isSendingView && !isEmailSentView && (\r\n }\r\n onClick={() => {\r\n if (firstTimeSendingEmail) {\r\n setHowFirstTimeShowModal(true)\r\n } else {\r\n handleSendingEmailView()\r\n }\r\n }}\r\n style={{ paddingLeft: '10px' }}\r\n >\r\n {L('MINEMEDLEMMER_KONTAKTFLERE_KNAP')}\r\n \r\n )}\r\n \r\n ) : (\r\n \r\n )\r\n }\r\n onClick={() => setShowOnlyFavorites(!favoritesOnly)}\r\n >\r\n {!favoritesOnly\r\n ? `${L('MINEMEDLEMMER_UDVALGTEMEDLEMMER_KNAP_OFF')}`\r\n : `${L('MINEMEDLEMMER_UDVALGTEMEDLEMMER_KNAP_ON')}`}\r\n \r\n
    \r\n
    \r\n\r\n {isSendingView && (\r\n
    \r\n \r\n
    \r\n {chosenMembers.length}{' '}\r\n {L_HTML(\r\n 'MINEMEDLEMMER_KONTAKTFLERE_MEDLEMMER-VALGT_LABEL'\r\n )}\r\n
    \r\n
    \r\n \r\n setEmailType(e.currentTarget.value)\r\n }\r\n activeValue={emailType}\r\n />\r\n
    \r\n \r\n {L('MINEMEDLEMMER_KONTAKTFLERE_ANNULLER_KNAP')}\r\n \r\n }\r\n onClick={handleSendingEmailDialog}\r\n disabled={chosenMembers.length === 0}\r\n >\r\n {L('MINEMEDLEMMER_KONTAKTFLERE_SEND_KNAP')}\r\n \r\n
    \r\n )}\r\n\r\n {isEmailSentView && (\r\n
    \r\n
    \r\n \r\n {chosenMembers.length - invalidEmailsList.length}\r\n {' '}\r\n {L_HTML(\r\n 'MINEMEDLEMMER_KONTAKTFLERE_FEEDBACK_ANTAL_LABEL'\r\n )}\r\n
    \r\n

    \r\n \r\n {L_HTML(\r\n 'MINEMEDLEMMER_KONTAKTFLERE_FEEDBACK_SENDTIL_LABEL'\r\n )}\r\n :{' '}\r\n {' '}\r\n {emailType}\r\n

    \r\n {\r\n setIsSendingView(false)\r\n setIsEmailSentView(false)\r\n setChosenMembers([])\r\n setAllChosen(false)\r\n }}\r\n >\r\n {L('MINEMEDLEMMER_KONTAKTFLERE_FEEDBACK_AFSLUT_LABEL')}\r\n \r\n
    \r\n )}\r\n
    \r\n {members && members.length ? (\r\n \r\n \r\n \r\n \r\n setSort('name')}\r\n sort={sortState}\r\n name=\"name\"\r\n >\r\n {L('MINEMEDLEMMER_TABEL_KOLONNETITEL_NAVN')}\r\n \r\n \r\n \r\n setSort('arbejdssted')}\r\n sort={sortState}\r\n name=\"arbejdssted\"\r\n >\r\n {L(\r\n 'MINEMEDLEMMER_TABEL_KOLONNETITEL_ARBEJDSSTED'\r\n )}\r\n \r\n \r\n \r\n \r\n setSort('birthday')}\r\n sort={sortState}\r\n name=\"birthday\"\r\n >\r\n {L(\r\n 'MINEMEDLEMMER_TABEL_KOLONNETITEL_FØDSELSDAG'\r\n )}\r\n \r\n \r\n \r\n \r\n \r\n setSort('age')}\r\n sort={sortState}\r\n name=\"age\"\r\n >\r\n {L(\r\n 'MINEMEDLEMMER_TABEL_KOLONNETITEL_ALDER'\r\n )}\r\n \r\n \r\n \r\n \r\n setSort('status')}\r\n sort={sortState}\r\n name=\"status\"\r\n >\r\n {L(\r\n 'MINEMEDLEMMER_TABEL_KOLONNETITEL_STATUS'\r\n )}\r\n \r\n \r\n \r\n setSort('notes')}\r\n sort={sortState}\r\n name=\"notes\"\r\n >\r\n {L(\r\n 'MINEMEDLEMMER_TABEL_KOLONNETITEL_NOTER'\r\n )}\r\n \r\n \r\n \r\n {members.map((member) => (\r\n
    \r\n \r\n \r\n {isSendingView ? (\r\n
    \r\n {\r\n const ml = [\r\n ...chosenMembers,\r\n ]\r\n if (isChecked(member)) {\r\n const idx =\r\n ml.findIndex(\r\n (m) =>\r\n m.memberId ===\r\n member.memberId\r\n )\r\n if (idx !== -1) {\r\n ml.splice(\r\n idx,\r\n 1\r\n )\r\n }\r\n setChosenMembers(ml)\r\n } else {\r\n ml.push(member)\r\n setChosenMembers(ml)\r\n }\r\n }}\r\n />\r\n
    \r\n ) : (\r\n <>\r\n \r\n \r\n {getInitials(\r\n member.fullName\r\n )}\r\n \r\n {\r\n e.stopPropagation()\r\n e.preventDefault()\r\n if (\r\n authProfile.isImitator\r\n ) {\r\n setShowImitatorModal(\r\n true\r\n )\r\n } else {\r\n onClickFavorite(\r\n member\r\n )\r\n }\r\n }}\r\n />\r\n \r\n \r\n )}\r\n {/* \r\n \r\n {getInitials(member.fullName)}\r\n \r\n {\r\n e.stopPropagation()\r\n e.preventDefault()\r\n onClickFavorite(member)\r\n }}\r\n />\r\n */}\r\n
    \r\n \r\n \r\n \r\n {member.fullName}\r\n \r\n \r\n {member?.workPlaces[0]?.name}\r\n \r\n \r\n {member?.workPlaces[0]?.name}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {isSendingView ? (\r\n
    \r\n {\r\n const ml = [\r\n ...chosenMembers,\r\n ]\r\n if (isChecked(member)) {\r\n const idx =\r\n ml.findIndex(\r\n (m) =>\r\n m.memberId ===\r\n member.memberId\r\n )\r\n if (idx !== -1) {\r\n ml.splice(\r\n idx,\r\n 1\r\n )\r\n }\r\n setChosenMembers(ml)\r\n } else {\r\n ml.push(member)\r\n setChosenMembers(ml)\r\n }\r\n }}\r\n />\r\n
    \r\n ) : (\r\n \r\n \r\n \r\n {getInitials(\r\n member.fullName\r\n )}\r\n \r\n \r\n {\r\n e.stopPropagation()\r\n e.preventDefault()\r\n if (\r\n authProfile.isImitator\r\n ) {\r\n setShowImitatorModal(\r\n true\r\n )\r\n } else {\r\n onClickFavorite(\r\n member\r\n )\r\n }\r\n }}\r\n right=\"-10px\"\r\n />\r\n
    \r\n )}\r\n \r\n \r\n \r\n {member.fullName}\r\n \r\n \r\n \r\n \r\n {member?.primaryWorkPlace?.name}\r\n \r\n \r\n \r\n \r\n {formatDate(member.birthday)}\r\n \r\n \r\n \r\n \r\n {member.age}\r\n \r\n \r\n \r\n {member.status.toLocaleLowerCase() !==\r\n 'ikkeopdateret' ? (\r\n \r\n {getUpdateStatusLabel(\r\n member.status\r\n )}\r\n \r\n ) : null}\r\n \r\n \r\n {\r\n return true\r\n }}\r\n >\r\n {member.numberOfNotes}\r\n \r\n \r\n \r\n
    \r\n ))}\r\n \r\n ) : null}\r\n
    \r\n {members.length ? (\r\n
    \r\n \r\n Viser {members.length} medlemmer\r\n \r\n
    \r\n ) : null}\r\n {showDialog && invalidEmailsList.length !== 0 ? (\r\n }\r\n >\r\n \r\n {L_HTML(\r\n 'MINEMEDLEMMER_KONTAKTFLERE_FEEDBACKVINDUE_TITEL'\r\n )}\r\n \r\n {mailingList.length\r\n ? multipleInvalidAddresses()\r\n : zeroValidAddresses()}\r\n \r\n ) : null}\r\n {showFirstTimeModal ? (\r\n }\r\n >\r\n \r\n {L('MINEMEDLEMMER_KONTAKTFLERE_FØRSTE_GANG_TITEL')}\r\n \r\n \r\n {L('MINEMEDLEMMER_KONTAKTFLERE_FØRSTE_GANG_TEXT')}\r\n \r\n
    \r\n {\r\n localStorage.setItem(\r\n FIRST_TIME_EMAIL_KEY,\r\n 'true'\r\n )\r\n setfirstTimeSendingEmail(false)\r\n setHowFirstTimeShowModal(false)\r\n handleSendingEmailView()\r\n }}\r\n >\r\n OK\r\n \r\n
    \r\n \r\n ) : null}\r\n setShowImitatorModal(false)}\r\n />\r\n {/* */}\r\n
    \r\n )\r\n}\r\n\r\nexport default Members\r\n","import React, {\r\n ChangeEvent,\r\n DetailedHTMLProps,\r\n FC,\r\n forwardRef,\r\n TextareaHTMLAttributes,\r\n useEffect,\r\n useRef,\r\n useState,\r\n} from 'react'\r\nimport { createUseStyles, useTheme } from 'react-jss'\r\nimport { LockFill } from '../../../assets/icons'\r\nimport { colors } from '../../../theme/palette'\r\n\r\ntype RuleNames = 'label' | 'textarea' | 'container' | 'span' | 'lock' | 'count'\r\n\r\ninterface StyleProps {\r\n query: string\r\n}\r\n\r\nexport type TextAreaProps = {\r\n label: string\r\n required?: boolean\r\n maxCount?: number\r\n} & Omit<\r\n DetailedHTMLProps<\r\n TextareaHTMLAttributes,\r\n HTMLTextAreaElement\r\n >,\r\n 'size'\r\n>\r\n\r\nconst useStyles = createUseStyles({\r\n container: {\r\n position: 'relative',\r\n display: 'block',\r\n },\r\n label: {\r\n position: 'static',\r\n width: '100%',\r\n '&:focus-within > span': {\r\n color: colors.green500,\r\n fontSize: '0.75rem',\r\n top: '2px',\r\n },\r\n color: colors.labelColor,\r\n },\r\n textarea: {\r\n height: '100%',\r\n minHeight: '3rem',\r\n border: `1px solid ${colors.borderColor}`,\r\n borderRadius: '6px',\r\n width: '100%',\r\n fontSize: '1rem',\r\n paddingLeft: '0.75rem',\r\n paddingTop: '30px',\r\n resize: 'none',\r\n '&::placeholder': {\r\n opacity: '0',\r\n },\r\n color: colors.black,\r\n '&:not(:placeholder-shown) + span': {\r\n color: colors.green500,\r\n fontSize: '0.75rem',\r\n },\r\n '&:not(:placeholder-shown)': {\r\n paddingTop: '30px',\r\n },\r\n '&:focus': {\r\n borderColor: colors.green500,\r\n outlineColor: colors.green500,\r\n paddingTop: '30px',\r\n },\r\n '&:active': {\r\n borderColor: colors.green500,\r\n outlineColor: colors.green500,\r\n paddingTop: '30px',\r\n },\r\n '&:disabled': {\r\n backgroundColor: '#F5F6F8',\r\n color: colors.gray800,\r\n },\r\n },\r\n span: {\r\n position: 'absolute',\r\n top: '2px',\r\n left: '2px',\r\n right: '20px',\r\n fontSize: '1rem',\r\n backgroundColor: 'white',\r\n borderRadius: '8px',\r\n padding: '10px 0.75rem 5px',\r\n transitionDuration: '300ms',\r\n color: colors.labelColor,\r\n },\r\n lock: {\r\n position: 'absolute',\r\n top: '0',\r\n right: '10px',\r\n opacity: '.5',\r\n },\r\n count: {\r\n position: 'relative',\r\n color: colors.black,\r\n fontSize: '15px',\r\n textAlign: 'right',\r\n paddingTop: '5px',\r\n },\r\n})\r\n\r\nconst TextArea: FC = forwardRef<\r\n HTMLTextAreaElement,\r\n TextAreaProps\r\n>(({ label, required, maxCount, onChange, ...props }, ref) => {\r\n const [query] = useState('')\r\n const theme = useTheme()\r\n const classes = useStyles({ ...{ query }, theme })\r\n const [count, setCount] = useState(\r\n props.defaultValue ? String(props.defaultValue).length : 0\r\n )\r\n const containerRef = useRef(null)\r\n\r\n const autoResize = (e: ChangeEvent): void => {\r\n e.currentTarget.style.height = 'auto'\r\n e.currentTarget.style.height = `${e.currentTarget.scrollHeight + 10}px`\r\n\r\n if (containerRef.current) {\r\n containerRef.current.style.height = `${\r\n e.currentTarget.scrollHeight + 10\r\n }px`\r\n }\r\n }\r\n\r\n return (\r\n <>\r\n
    \r\n \r\n
    \r\n
    \r\n {count} / {maxCount}\r\n
    \r\n \r\n )\r\n})\r\n\r\nTextArea.defaultProps = {\r\n maxCount: 300,\r\n}\r\n\r\nexport { TextArea }\r\n","import React from 'react'\r\n\r\nimport {\r\n RegisterOptions,\r\n DeepMap,\r\n FieldError,\r\n UseFormRegister,\r\n Path,\r\n} from 'react-hook-form'\r\nimport Input, { InputNumber, InputProps } from '../../ui/FormElememts/Input'\r\nimport { TextArea, TextAreaProps } from '../../ui/FormElememts/TextArea'\r\nimport {\r\n Select,\r\n ISelectOptions,\r\n SelectProps3,\r\n} from '../../ui/FormElememts/Select'\r\n\r\nexport type FormInputProps = {\r\n name: Path\r\n rules?: RegisterOptions\r\n register?: UseFormRegister\r\n errors?: Partial>\r\n} & Omit\r\n\r\nexport type FormSelectProps = {\r\n name: Path\r\n rules?: RegisterOptions\r\n register?: UseFormRegister\r\n errors?: Partial>\r\n} & Omit\r\n\r\nexport type FormTextAreaProps = {\r\n name: Path\r\n rules?: RegisterOptions\r\n register?: UseFormRegister\r\n errors?: Partial>\r\n} & Omit\r\n\r\nexport const FormInput = >({\r\n name,\r\n register,\r\n rules,\r\n ...props\r\n}: FormInputProps): JSX.Element => {\r\n return (\r\n \r\n )\r\n}\r\n\r\nexport const FormSelect = >({\r\n name,\r\n register,\r\n rules,\r\n ...props\r\n}: FormSelectProps): JSX.Element => {\r\n return (\r\n \r\n )\r\n}\r\n\r\nexport const FormInputNumber = >({\r\n name,\r\n register,\r\n rules,\r\n ...props\r\n}: FormInputProps): JSX.Element => {\r\n return (\r\n \r\n )\r\n}\r\n\r\nexport const FormTextArea = >({\r\n name,\r\n register,\r\n rules,\r\n ...props\r\n}: FormTextAreaProps): JSX.Element => {\r\n return (\r\n \r\n )\r\n}\r\n","/* eslint-disable react/require-default-props */\r\nimport React from 'react'\r\nimport { createUseStyles } from 'react-jss'\r\nimport { colors } from '../../../theme/palette'\r\n\r\ntype Props = {\r\n icon: JSX.Element\r\n message?: string\r\n}\r\n\r\nconst useStyles = createUseStyles(() => ({\r\n row: () => {\r\n return {\r\n position: 'relative',\r\n backgroundColor: colors.white,\r\n color: 'black',\r\n marginBottom: '1rem',\r\n borderRadius: '4px',\r\n width: '700px',\r\n maxWidth: '100%',\r\n padding: '3.375rem',\r\n display: 'flex',\r\n flexDirection: 'column',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n }\r\n },\r\n icon: {\r\n position: 'absolute',\r\n top: '-31px',\r\n },\r\n message: {\r\n fontSize: '1rem',\r\n marginTop: '1.5rem',\r\n maxWidth: '400px',\r\n textAlign: 'center',\r\n },\r\n}))\r\n\r\nconst CardWithIconAndMessge: React.FC = ({\r\n children,\r\n icon,\r\n message,\r\n}) => {\r\n const classes = useStyles()\r\n\r\n return (\r\n
    \r\n
    {icon}
    \r\n {message ?
    {message}
    : null}\r\n {children}\r\n
    \r\n )\r\n}\r\n\r\nexport { CardWithIconAndMessge }\r\n","/* eslint-disable @typescript-eslint/no-explicit-any */\r\nimport moment from 'moment'\r\nimport React, { useEffect, useState } from 'react'\r\nimport DatePicker from 'react-date-picker'\r\nimport 'react-date-picker/dist/DatePicker.css'\r\nimport { createUseStyles } from 'react-jss'\r\nimport Input from './Input'\r\nimport { Calendar as CalendarIcon, Close } from '../../../assets/icons'\r\nimport { baseButton } from '../../../theme/reuseables'\r\nimport { colors } from '../../../theme/palette'\r\n\r\ntype RuleNames =\r\n | 'datepickerWrapper'\r\n | 'datepicker'\r\n | 'button'\r\n | 'trigger'\r\n | 'close'\r\n\r\ntype Props = {\r\n label: string\r\n selected: Date | undefined | null\r\n setSelected: (date: Date | undefined | null) => void\r\n maxDate?: Date\r\n minDate?: Date\r\n disableCalendar?: boolean\r\n hasError?: boolean\r\n}\r\n\r\ninterface StyleProps {\r\n hasValue?: boolean\r\n isDatePicker?: boolean\r\n}\r\n\r\nconst useStyles = createUseStyles({\r\n datepickerWrapper: {\r\n border: 'none',\r\n position: 'relative',\r\n color: colors.black,\r\n '& label > input': {\r\n color: ({ hasValue }) => {\r\n return hasValue ? 'transparent' : 'black'\r\n },\r\n },\r\n },\r\n datepicker: {\r\n position: 'absolute',\r\n zIndex: 3,\r\n height: '100%',\r\n width: '100%',\r\n top: '0',\r\n right: '0',\r\n textAlign: 'right',\r\n border: `none`,\r\n borderRadius: '6px',\r\n },\r\n button: {\r\n ...baseButton,\r\n ...{\r\n cursor: 'pointer',\r\n padding: 0,\r\n margin: 0,\r\n },\r\n },\r\n trigger: {\r\n position: 'absolute',\r\n top: '16px',\r\n right: '10px',\r\n opacity: '.8',\r\n },\r\n close: {\r\n position: 'absolute',\r\n top: '18px',\r\n right: '28px',\r\n },\r\n})\r\n\r\nconst DatePickerComponent: React.FC = ({\r\n label,\r\n selected,\r\n setSelected,\r\n maxDate,\r\n minDate,\r\n disableCalendar,\r\n hasError,\r\n}) => {\r\n const [birthdate, setBirthdate] = useState(undefined)\r\n const [showPicker, setShowPicker] = useState(false)\r\n const [hasValue, setHasValue] = useState(false)\r\n const classes = useStyles({\r\n ...{ hasValue },\r\n })\r\n\r\n useEffect(() => {\r\n if (birthdate && birthdate.length !== 0) {\r\n setHasValue(true)\r\n } else {\r\n setHasValue(false)\r\n }\r\n }, [birthdate])\r\n\r\n useEffect(() => {\r\n if (!selected) {\r\n setBirthdate(undefined)\r\n }\r\n }, [selected])\r\n\r\n const handleOnChangeDate = (val: any): void => {\r\n if (typeof val === 'object') {\r\n const asText = moment(val).format('DD.MM.YYYY')\r\n setBirthdate(asText)\r\n }\r\n setShowPicker(false)\r\n setSelected(val)\r\n }\r\n return (\r\n \r\n \r\n \r\n \r\n }\r\n format=\"dd.MM.y\"\r\n dayPlaceholder=\"dd\"\r\n monthPlaceholder=\"mm\"\r\n yearPlaceholder=\"åååå\"\r\n clearIcon={}\r\n />\r\n
    \r\n
    \r\n )\r\n}\r\n\r\nexport { DatePickerComponent }\r\n","import React from 'react'\r\nimport { createUseStyles } from 'react-jss'\r\nimport { colors } from '../../../theme/palette'\r\n\r\ninterface Props {\r\n text: string\r\n error?: string | undefined\r\n}\r\n\r\nconst useStyles = createUseStyles(() => ({\r\n message: {\r\n position: 'relative',\r\n\r\n fontSize: '15px',\r\n textAlign: 'right',\r\n paddingTop: '5px',\r\n },\r\n text: {\r\n position: 'relative',\r\n color: colors.labelColor,\r\n },\r\n error: {\r\n position: 'relative',\r\n color: colors.error,\r\n },\r\n}))\r\n\r\nconst FormMessage: React.FC = ({ text, error }) => {\r\n const classes = useStyles()\r\n\r\n return (\r\n
    \r\n {/* {!error ? {text} : null} */}\r\n {error ? {error} : null}\r\n
    \r\n )\r\n}\r\n\r\nexport { FormMessage }\r\n","import React, { useEffect, useRef, useState } from 'react'\r\nimport { useForm } from 'react-hook-form'\r\nimport { createUseStyles } from 'react-jss'\r\nimport { useAtom } from 'jotai'\r\nimport moment from 'moment'\r\nimport { Department } from '../../../models/Department'\r\nimport { mapMembers } from '../../../models/Member'\r\nimport { Button } from '../../ui/Button/Button'\r\nimport { FormInputNumber } from '../../modules/FormElements/FormInput'\r\nimport { searchMembers } from '../../../api/members/members'\r\nimport {\r\n searchMembersAtom,\r\n searchPageAtom,\r\n} from '../../../store/filter/filterAtom'\r\n\r\nimport { getInitials } from '../../../utils/initials'\r\nimport { Badge } from '../../ui/Badge/Badge'\r\nimport {\r\n Card,\r\n CardCell,\r\n CardList,\r\n CardMobile,\r\n CardHeaderCell,\r\n CardHeader,\r\n CardContentMobile,\r\n CircleText,\r\n Circle,\r\n} from '../../ui/Card'\r\nimport { Typography } from '../../ui/Typography/Typography'\r\nimport breakpoints from '../../../theme/breakpoints'\r\nimport { colors } from '../../../theme/palette'\r\nimport { PersonSearch } from '../../../assets/icons'\r\nimport { getDepartments } from '../../../api/departments'\r\nimport { ISelectOptions, Select } from '../../ui/FormElememts/Select'\r\nimport { CardWithIconAndMessge } from '../../ui/Card/CardWithIconAndMessge'\r\nimport { SortButton } from '../../ui/SortButton'\r\nimport useSortMembersList from '../../../hooks/useSortMembersList'\r\nimport { DatePickerComponent } from '../../ui/FormElememts/DatePicker'\r\nimport { Loader } from '../../ui/Loaders/Loader'\r\nimport { FormMessage } from '../../ui/FormElememts/FormMessage'\r\nimport { L, L_HTML } from '../../providers/Lokalise'\r\nimport { HeaderLinks } from '../../modules/Headerlinks'\r\nimport Input from '../../ui/FormElememts/Input'\r\nimport { Spinner } from '../../ui/Loaders/Spinner'\r\n\r\nexport type RegistrationFormFields = {\r\n fuldeNavn: string\r\n foedselsesdato: string\r\n telefon: string\r\n afdelingsnummer: string\r\n}\r\n\r\nconst useStyles = createUseStyles({\r\n container: {\r\n padding: '0 24px',\r\n [`@media (min-width: ${breakpoints.Desktop}px)`]: {\r\n '&': {\r\n padding: 0,\r\n },\r\n },\r\n },\r\n headerArea: {\r\n display: 'flex',\r\n padding: '.5rem 0',\r\n minHeight: '80px',\r\n },\r\n topArea: {\r\n borderBottom: `1px solid ${colors.gray700}`,\r\n // TODO: remove this when this area has been developed.\r\n minHeight: '60px',\r\n },\r\n headerActions: {\r\n marginLeft: 'auto',\r\n flexShrink: 0,\r\n },\r\n members: {\r\n paddingTop: '20px',\r\n },\r\n form: {\r\n display: 'grid',\r\n gap: '10px',\r\n [`@media (min-width: ${breakpoints.Desktop}px)`]: {\r\n '&': {\r\n gridTemplateColumns: '1fr 180px 140px 1fr 140px',\r\n },\r\n },\r\n },\r\n linkButton: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n padding: '0',\r\n margin: '0',\r\n borderRadius: '6px',\r\n boxSizing: 'border-box',\r\n textDecoration: 'none',\r\n fontWeight: 400,\r\n textAlign: 'center',\r\n transition: 'all 0.2s',\r\n boxShadow: 0,\r\n background: 'none',\r\n '&:hover': {\r\n cursor: 'pointer',\r\n },\r\n '-webkit-appearance': 'none',\r\n '-moz-appearance': 'none',\r\n border: 0,\r\n color: colors.green500,\r\n fontSize: '.875rem',\r\n textDecorationLine: 'underline',\r\n },\r\n subArea: {\r\n display: 'flex',\r\n justifyContent: 'flex-end',\r\n padding: '1rem 160px 1rem 1rem',\r\n borderBottom: `1px solid ${colors.borderColor}`,\r\n },\r\n circleIcon: {\r\n width: '62px',\r\n height: '62px',\r\n borderRadius: '50%',\r\n border: `2px solid ${colors.white}`,\r\n backgroundColor: colors.white,\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n marginRight: '1rem',\r\n },\r\n content: {\r\n paddingTop: '1.875rem',\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n },\r\n messageWrapper: {\r\n marginTop: '2.25rem',\r\n },\r\n selectContainer: {\r\n position: 'relative',\r\n },\r\n selectTrigger: {\r\n position: 'relative',\r\n minHeight: '48px',\r\n backgroundColor: colors.white,\r\n border: `1px solid ${colors.borderColor}`,\r\n borderRadius: '6px',\r\n width: '100%',\r\n fontSize: '1.125rem',\r\n paddingLeft: '.75rem',\r\n paddingRight: '.75rem',\r\n cursor: 'pointer',\r\n color: colors.labelColor,\r\n },\r\n selectContent: {\r\n overflow: 'hidden',\r\n backgroundColor: 'white',\r\n borderRadius: '6px',\r\n boxShadow:\r\n // eslint-disable-next-line max-len\r\n '0px 10px 38px -10px rgba(22, 23, 24, 0.35), 0px 10px 20px -15px rgba(22, 23, 24, 0.2)',\r\n },\r\n select: {\r\n position: 'relative',\r\n height: '48px',\r\n backgroundColor: colors.white,\r\n border: `1px solid ${colors.borderColor}`,\r\n borderRadius: '6px',\r\n width: '100%',\r\n fontSize: '1.125rem',\r\n paddingLeft: '.75rem',\r\n paddingRight: '.75rem',\r\n cursor: 'pointer',\r\n color: colors.labelColor,\r\n },\r\n numberOfMembers: {\r\n display: 'flex',\r\n padding: '30px 0 90px',\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n },\r\n headerAreaTop: {\r\n display: 'flex',\r\n padding: '1rem 0 .5rem',\r\n borderBottom: `1px solid ${colors.borderColor}`,\r\n marginBottom: '1rem',\r\n },\r\n})\r\n\r\ninterface IQuery {\r\n [key: string]: string\r\n}\r\n\r\nconst gridTemplateColumns = '12% 22% 22% 22% 22%'\r\n\r\ninterface IError {\r\n hasError: boolean\r\n message: string\r\n}\r\n\r\nconst AllMembers: React.FC = () => {\r\n const [departmentNumber, _setDepartmentNumber] = useState(undefined)\r\n const { register, reset, handleSubmit, setValue, formState, getValues } =\r\n useForm()\r\n const classes = useStyles()\r\n const [options, setOptions] = useState([])\r\n const [error, setError] = useState(undefined)\r\n const [selectedDate, _setSelectedDate] = useState(undefined)\r\n const [loading, setLoading] = useState(false)\r\n const [, setResult] = useAtom(searchMembersAtom)\r\n const [members] = useAtom(searchPageAtom)\r\n\r\n const { setSort, sortState } = useSortMembersList()\r\n\r\n const [isValid, setIsValid] = useState(false)\r\n\r\n const inputReference = useRef(null)\r\n\r\n const { isDirty } = formState\r\n\r\n useEffect(() => {\r\n setSort('name')\r\n }, [])\r\n\r\n useEffect(() => {\r\n let valid = false\r\n\r\n if (selectedDate) {\r\n valid = true\r\n }\r\n\r\n if (isDirty) {\r\n valid = true\r\n }\r\n\r\n if (departmentNumber) {\r\n valid = true\r\n }\r\n\r\n setIsValid(valid)\r\n }, [isDirty, selectedDate, departmentNumber])\r\n\r\n useEffect(() => {\r\n const getDeps = async (): Promise => {\r\n const depResponse = await getDepartments()\r\n const opt: ISelectOptions[] = depResponse.map(\r\n (department: Department) => {\r\n return { label: department.name, value: department.id }\r\n }\r\n )\r\n\r\n reset({\r\n fuldeNavn: '',\r\n foedselsesdato: '',\r\n telefon: '',\r\n afdelingsnummer: '',\r\n })\r\n setOptions(opt)\r\n\r\n return true\r\n }\r\n\r\n getDeps()\r\n }, [register])\r\n\r\n const searchMembersApi = async (queryString: string): Promise => {\r\n const start = performance.now()\r\n\r\n const response = await searchMembers(queryString)\r\n\r\n if (response && response.data) {\r\n const result = mapMembers(response.data.Medlemmer)\r\n\r\n if (!result.length) {\r\n setError({\r\n hasError: true,\r\n message: 'Ingen resultater fundet',\r\n })\r\n setResult([])\r\n // setMembers([])\r\n } else {\r\n setResult(result)\r\n // setMembers(result)\r\n setError(undefined)\r\n }\r\n }\r\n\r\n const duration = performance.now() - start\r\n let timeout = 0\r\n\r\n if (duration < 500) {\r\n timeout = 500 - duration\r\n }\r\n\r\n setTimeout(() => {\r\n setLoading(false)\r\n if (inputReference && inputReference.current) {\r\n inputReference.current.focus()\r\n }\r\n }, timeout)\r\n }\r\n\r\n const onSubmit = (data: RegistrationFormFields): void => {\r\n setLoading(true)\r\n\r\n const values = { ...data }\r\n\r\n if (!data.afdelingsnummer) {\r\n delete values.afdelingsnummer\r\n }\r\n\r\n const query: IQuery = {}\r\n Object.keys(values).forEach((value) => {\r\n if (value && value !== '') {\r\n query[`request.${value}`] = data[value]\r\n }\r\n })\r\n const queryString = Object.keys(query)\r\n .map((key) => `${key}=${query[key]}`)\r\n .join('&')\r\n\r\n searchMembersApi(queryString)\r\n }\r\n\r\n const setSelectedDate = (date: Date | undefined | null): void => {\r\n _setSelectedDate(date)\r\n if (date) {\r\n setValue('foedselsesdato', date.toDateString())\r\n } else {\r\n setValue('foedselsesdato', '')\r\n }\r\n }\r\n\r\n const setDepartmentNumber = (value: string | undefined): void => {\r\n setValue('afdelingsnummer', value)\r\n _setDepartmentNumber(value)\r\n }\r\n\r\n const max = new Date()\r\n\r\n const { errors } = formState\r\n\r\n const validateMobile = (number: string | undefined | null): boolean => {\r\n if (!number || number.trim() === '') {\r\n return true\r\n }\r\n\r\n if (number.length > 7) {\r\n return true\r\n }\r\n\r\n return false\r\n }\r\n\r\n const validateName = (name: string | undefined | null): boolean => {\r\n if (!name || name.trim() === '') {\r\n return true\r\n }\r\n\r\n if (name.length > 43) {\r\n return true\r\n }\r\n\r\n return false\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 {L_HTML('ALLEMEDLEMMER_TITEL')}\r\n \r\n
    \r\n
    \r\n \r\n {L_HTML('ALLEMEDLEMMER_TITEL')}\r\n \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n \r\n {L_HTML('ALLEMEDLEMMER_BESKRIVELSE_TITEL')}\r\n \r\n \r\n {L_HTML('ALLEMEDLEMMER_BESKRIVELSE_TEXT')}\r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n\r\n \r\n
    \r\n \r\n validateMobile(value) || 'Min. 8 tegn',\r\n }}\r\n />\r\n \r\n
    \r\n\r\n {options ? (\r\n
    \r\n \r\n setDepartmentNumber(e.target.value)\r\n }\r\n options={options}\r\n />\r\n
    \r\n ) : null}\r\n\r\n \r\n {L('ALLEMEDLEMMER_FORM_SØG_KNAP')}\r\n \r\n \r\n
    \r\n {\r\n setResult([])\r\n reset({\r\n fuldeNavn: '',\r\n foedselsesdato: '',\r\n telefon: '',\r\n afdelingsnummer: '',\r\n })\r\n setSelectedDate(undefined)\r\n setDepartmentNumber('')\r\n setError(undefined)\r\n }}\r\n >\r\n {L('ALLEMEDLEMMER_FILTER_NULSTIL_LABEL')}\r\n \r\n
    \r\n {error && error.hasError && !loading ? (\r\n
    \r\n
    \r\n \r\n \r\n
    \r\n }\r\n message={error.message}\r\n />\r\n
    \r\n
    \r\n ) : null}\r\n {!members.length && !error && !loading ? (\r\n
    \r\n \r\n {L('ALLEMEDLEMMER_HJÆLPETEKST_01')}\r\n \r\n
    \r\n ) : null}\r\n
    \r\n {loading ? : null}\r\n {!loading && members && members.length ? (\r\n
    \r\n \r\n \r\n \r\n \r\n setSort('name')}\r\n sort={sortState}\r\n name=\"name\"\r\n >\r\n {L(\r\n 'MINEMEDLEMMER_TABEL_KOLONNETITEL_NAVN'\r\n )}\r\n \r\n \r\n \r\n \r\n \r\n setSort('arbejdssted')\r\n }\r\n sort={sortState}\r\n name=\"arbejdssted\"\r\n >\r\n {L(\r\n 'MINEMEDLEMMER_TABEL_KOLONNETITEL_ARBEJDSSTED'\r\n )}\r\n \r\n \r\n \r\n \r\n setSort('department')}\r\n sort={sortState}\r\n name=\"department\"\r\n >\r\n {L('GENERISK_FORM_FOAAFDELING_LABEL')}\r\n \r\n \r\n \r\n setSort('isOwnMember')}\r\n sort={sortState}\r\n name=\"isOwnMember\"\r\n >\r\n Status\r\n \r\n \r\n \r\n {members.map((member) => (\r\n <>\r\n \r\n \r\n \r\n \r\n {getInitials(\r\n member.fullName\r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {member.fullName}\r\n \r\n \r\n {\r\n member?.primaryWorkPlace\r\n ?.name\r\n }\r\n \r\n \r\n {\r\n member?.primaryWorkPlace\r\n ?.name\r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {getInitials(\r\n member.fullName\r\n )}\r\n \r\n \r\n \r\n \r\n \r\n {member.fullName}\r\n \r\n \r\n \r\n \r\n {member?.primaryWorkPlace?.name}\r\n \r\n \r\n \r\n {member.department ? (\r\n \r\n {member.department.name}\r\n \r\n ) : null}\r\n \r\n \r\n {member.isOwnMember ? (\r\n \r\n {L(\r\n 'ALLEMEDLEMMER_ALLEREDE-MEDLEM_STATUS_BADGE'\r\n )}\r\n \r\n ) : null}\r\n \r\n \r\n \r\n ))}\r\n \r\n
    \r\n ) : null}\r\n {members.length ? (\r\n
    \r\n \r\n Viser {members.length} medlemmer\r\n \r\n
    \r\n ) : null}\r\n
    \r\n
    \r\n )\r\n}\r\n\r\nexport { AllMembers }\r\n","import { AxiosResponse } from 'axios'\r\nimport { axiosWithImitator } from '../withAuth'\r\n\r\nconst getAllUpdates = async (\r\n type?: 'UnderOpdatering' | 'FaerdigBehandlet'\r\n): Promise => {\r\n let data = {}\r\n\r\n if (type) {\r\n data = {\r\n params: {\r\n 'request.opdateringBatchStatus': type,\r\n },\r\n }\r\n }\r\n\r\n const response = axiosWithImitator.get(\r\n `/opdatering/hentegnemedlemmeropdateringerlist`,\r\n data\r\n )\r\n return response\r\n}\r\n\r\nconst getAllWorkplaces = (): Promise => {\r\n const response = axiosWithImitator.get(\r\n '/medlem/hentegnemedlemmerprarbejdsstedprtrhverv'\r\n )\r\n\r\n return response\r\n}\r\n\r\nconst getUpdateDetails = (batchId: string): Promise => {\r\n const response = axiosWithImitator.get(\r\n '/opdatering/hentopdateringbatchdetalje',\r\n {\r\n params: {\r\n 'request.opdateringBathcId': batchId,\r\n },\r\n }\r\n )\r\n\r\n return response\r\n}\r\n\r\nexport { getAllUpdates, getAllWorkplaces, getUpdateDetails }\r\n","// \"BatchId\": \"00000000-0000-0000-0000-000000000000\",\r\n// \"OpdateringType\": \"OpdaterMedlem\",\r\n// \"Medlem\": {\r\n// \"Medlemsnummer\": 0,\r\n// \"FoedselsDato\": \"2022-05-19T06:07:58.363Z\",\r\n// \"Afdeling\": {\r\n// \"Nummer\": \"string\",\r\n// \"Navn\": \"string\"\r\n// },\r\n// \"ErEgetMedlem\": true,\r\n// \"Medlemsident\": 0,\r\n// \"Fornavn\": \"string\",\r\n// \"Efternavn\": \"string\",\r\n// \"FuldeNavn\": \"string\"\r\n// },\r\n// \"Bruger\": {\r\n// \"Medlemsident\": 0,\r\n// \"Fornavn\": \"string\",\r\n// \"Efternavn\": \"string\",\r\n// \"FuldeNavn\": \"string\"\r\n// },\r\n// \"RegTid\": \"2022-05-19T06:07:58.363Z\",\r\n// \"BehandlingTid\": \"2022-05-19T06:07:58.363Z\",\r\n// \"OpdateringBatchStatus\": \"UnderOpdatering\"\r\n\r\nexport type IUpdateBatchData = {\r\n BatchId: string\r\n OpdateringType: string\r\n Medlem: {\r\n Medlemsnummer: number\r\n FoedselsDato: string\r\n Afdeling: {\r\n Nummer: string\r\n Navn: string\r\n }\r\n ErEgetMedlem: boolean\r\n Medlemsident: number\r\n Fornavn: string\r\n Efternavn: string\r\n FuldeNavn: string\r\n }\r\n Bruger: {\r\n Medlemsident: 0\r\n Fornavn: string\r\n Efternavn: string\r\n FuldeNavn: string\r\n }\r\n RegTid: string\r\n BehandlingTid: string\r\n OpdateringBatchStatus: string\r\n}\r\n\r\nexport type MemberOnUpdate = {\r\n number: number\r\n birthday: string\r\n department: {\r\n number: string\r\n name: string\r\n }\r\n isOwnMember: boolean\r\n id: number\r\n firstName: string\r\n lastName: string\r\n fullName: string\r\n}\r\n\r\nexport type ProfileOnUpdate = {\r\n id: number\r\n firstName: string\r\n lastName: string\r\n fullName: string\r\n}\r\n\r\nexport class UpdateBatch {\r\n batchId = ''\r\n\r\n type = ''\r\n\r\n member: MemberOnUpdate\r\n\r\n profile: ProfileOnUpdate\r\n\r\n created = ''\r\n\r\n updated = ''\r\n\r\n status: string\r\n\r\n public static build = (data: IUpdateBatchData): UpdateBatch => {\r\n const update = new UpdateBatch()\r\n\r\n update.batchId = data.BatchId\r\n update.type = data.OpdateringType\r\n update.created = data.RegTid\r\n update.updated = data.BehandlingTid\r\n update.member = {\r\n birthday: data.Medlem.FoedselsDato,\r\n department: {\r\n name: data.Medlem.Afdeling?.Navn || '',\r\n number: data.Medlem.Afdeling?.Nummer || '',\r\n },\r\n firstName: data.Medlem.Fornavn,\r\n lastName: data.Medlem.Efternavn,\r\n fullName: data.Medlem.FuldeNavn,\r\n id: data.Medlem.Medlemsident,\r\n isOwnMember: data.Medlem.ErEgetMedlem,\r\n number: data.Medlem.Medlemsnummer,\r\n }\r\n update.profile = {\r\n firstName: data.Bruger.Fornavn,\r\n lastName: data.Bruger.Efternavn,\r\n fullName: data.Bruger.FuldeNavn,\r\n id: data.Bruger.Medlemsident,\r\n }\r\n update.status = data.OpdateringBatchStatus\r\n\r\n return update\r\n }\r\n}\r\n\r\nexport function mapUpdates(data: IUpdateBatchData[]): UpdateBatch[] {\r\n return data && data.map((update) => UpdateBatch.build(update))\r\n}\r\n","import React, { FC } from 'react'\r\nimport { createUseStyles } from 'react-jss'\r\nimport { Member } from '../../../models/Member'\r\nimport { Profile } from '../../../models/Profile'\r\nimport { colors } from '../../../theme/palette'\r\nimport { zIndexes } from '../../../theme/zIndex'\r\nimport { formatDate } from '../../../utils/format'\r\nimport { L } from '../../providers/Lokalise'\r\nimport { Typography } from '../../ui/Typography/Typography'\r\n\r\nconst useStyles = createUseStyles(() => ({\r\n control: {\r\n display: 'grid',\r\n position: 'absolute',\r\n alignItems: 'center',\r\n marginBottom: '20px',\r\n gridTemplateColumns: '1fr 1fr',\r\n paddingRight: '57px',\r\n paddingLeft: '20px',\r\n borderBottom: `2px solid ${colors.borderColor}`,\r\n width: 'calc(100% + 40px)',\r\n paddingBottom: '20px',\r\n top: '0',\r\n paddingTop: '20px',\r\n backgroundColor: colors.white,\r\n zIndex: zIndexes.drawer,\r\n },\r\n contentWrapper: {\r\n padding: '100px 20px 20px',\r\n overflow: 'auto',\r\n height: '100%',\r\n paddingBottom: '80px',\r\n },\r\n}))\r\n\r\nexport type DrawerHeaderType = {\r\n member?: Member\r\n profile?: Profile\r\n title?: string\r\n}\r\n\r\nconst DrawerHeader: FC = ({ title }) => {\r\n const classes = useStyles()\r\n return (\r\n
    \r\n
    \r\n {title ? (\r\n \r\n {title}\r\n \r\n ) : null}\r\n
    \r\n
    \r\n )\r\n}\r\n\r\nconst DrawerContent: FC = ({ children }) => {\r\n const classes = useStyles()\r\n return
    {children}
    \r\n}\r\n\r\nconst DrawerHeaderMemberInfo: FC = ({ member, profile }) => {\r\n const classes = useStyles()\r\n\r\n return (\r\n
    \r\n
    \r\n
    \r\n \r\n {L('GENERISK_RETTELSER_MEDLEM_NAVN_LABEL')}\r\n \r\n {member?.fullName ? (\r\n \r\n {member.fullName}\r\n \r\n ) : (\r\n \r\n {profile?.fullName}\r\n \r\n )}\r\n
    \r\n
    \r\n \r\n {L('GENERISK_RETTELSER_MEDLEM_FØDSELSDAG_LABEL')}\r\n \r\n {member || profile ? (\r\n \r\n {formatDate(\r\n member\r\n ? member?.birthday\r\n : new Date(profile.personalInfo.birthdate)\r\n )}\r\n \r\n ) : (\r\n '-'\r\n )}\r\n
    \r\n
    \r\n
    \r\n )\r\n}\r\n\r\nconst DrawerHeaderWorkplaceInfo: FC = ({ title }) => {\r\n const classes = useStyles()\r\n\r\n return (\r\n
    \r\n
    \r\n
    \r\n \r\n {L('MINEMEDLEMMER_TABEL_KOLONNETITEL_ARBEJDSSTED')}\r\n \r\n {title && (\r\n \r\n {title}\r\n \r\n )}\r\n
    \r\n
    \r\n
    \r\n )\r\n}\r\n\r\nexport {\r\n DrawerHeaderMemberInfo,\r\n DrawerHeaderWorkplaceInfo,\r\n DrawerHeader,\r\n DrawerContent,\r\n}\r\n","import React from 'react'\r\nimport { createUseStyles } from 'react-jss'\r\n\r\nconst useStyles = createUseStyles(() => ({\r\n control: {\r\n position: 'relative',\r\n marginBottom: '20px',\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n}))\r\n\r\nconst FormHeader: React.FC = ({ children }) => {\r\n const classes = useStyles()\r\n\r\n return
    {children}
    \r\n}\r\n\r\nexport { FormHeader }\r\n","import React, { FC, useEffect, useState } from 'react'\r\nimport { createUseStyles } from 'react-jss'\r\nimport { Typography } from '../../ui/Typography/Typography'\r\nimport { Member } from '../../../models/Member'\r\nimport { colors } from '../../../theme/palette'\r\nimport { baseButton, sortPlaceholder } from '../../../theme/reuseables'\r\nimport { L } from '../../providers/Lokalise'\r\nimport { MemberOnUpdate, UpdateBatch } from '../../../models/UpdateBatch'\r\nimport { Overlay } from '../../ui/Sidebar'\r\nimport { formatDate } from '../../../utils/format'\r\nimport { Badge } from '../../ui/Badge/Badge'\r\nimport { Card, CardCell, CardMobile, Circle } from '../../ui/Card'\r\nimport breakpoints from '../../../theme/breakpoints'\r\nimport {\r\n DrawerContent,\r\n DrawerHeaderMemberInfo,\r\n} from '../FormElements/DrawerHeader'\r\nimport { getUpdateDetails } from '../../../api/updates'\r\nimport { EditFill, PersonalInfo } from '../../../assets/icons'\r\nimport { getUpdateStatusLabel, getUpdateTypeLabel } from '../../../utils/utils'\r\nimport { CircleIcon } from '../../ui/Circle/Circle'\r\nimport { FormHeader } from '../../ui/FormElememts/FormHeader'\r\nimport { FormControl } from '../../ui/FormElememts/FormControl'\r\n\r\nexport const getLabel = (fieldName: string): string => {\r\n let label = fieldName\r\n switch (fieldName) {\r\n // OPDATERINGER_DETALJER_ARBEJDSSTED_LABEL\r\n case 'Arbejdsstednummer':\r\n label = L('OPDATERINGER_DETALJER_ARBEJDSSTED_LABEL')\r\n break\r\n // OPDATERINGER_DETALJER_PRIVAT-MOBIL_LABEL\r\n case 'PrivatMobil':\r\n label = L('OPDATERINGER_DETALJER_PRIVAT-MOBIL_LABEL')\r\n break\r\n // OPDATERINGER_DETALJER_TIMETAL_LABEL\r\n case 'Timetal':\r\n label = L('OPDATERINGER_DETALJER_TIMETAL_LABEL')\r\n break\r\n // OPDATERINGER_DETALJER_STILLING_LABEL\r\n case 'Stillingsnummer':\r\n label = L('OPDATERINGER_DETALJER_STILLING_LABEL')\r\n break\r\n // OPDATERINGER_DETALJER_TRTELEFON_LABEL\r\n case 'TRTelefon':\r\n label = L('OPDATERINGER_DETALJER_TRTELEFON_LABEL')\r\n break\r\n // OPDATERINGER_DETALJER_TRMAIL_LABEL\r\n case 'TREmail ':\r\n label = L('OPDATERINGER_DETALJER_TRMAIL_LABEL')\r\n break\r\n // OPDATERINGER_DETALJER_ARBEJDSMAIL_LABEL\r\n case 'ArbejdsEmail':\r\n label = L('OPDATERINGER_DETALJER_ARBEJDSMAIL_LABEL')\r\n break\r\n // OPDATERINGER_DETALJER_ARBEJDSTELEFON_LABEL\r\n case 'ArbejdsTelefon':\r\n label = L('OPDATERINGER_DETALJER_ARBEJDSTELEFON_LABEL')\r\n break\r\n // OPDATERINGER_DETALJER_PRIVAT-EMAIL_LABEL\r\n case 'PrivatEmail':\r\n label = L('OPDATERINGER_DETALJER_PRIVAT-EMAIL_LABEL')\r\n break\r\n // OPDATERINGER_DETALJER_PRIVAT-FASTNET-TELEFON_LABEL\r\n case 'PrivatFastnetTelefon':\r\n label = L('OPDATERINGER_DETALJER_PRIVAT-FASTNET-TELEFON_LABEL')\r\n break\r\n default:\r\n break\r\n }\r\n\r\n return label\r\n}\r\n\r\ninterface EditProps {\r\n update: UpdateBatch\r\n gridTemplateColumns: string\r\n showUpdatedColumn?: boolean\r\n}\r\n\r\nconst useStyles = createUseStyles({\r\n '@keyframes fadeIn': {\r\n from: {\r\n opacity: 0,\r\n },\r\n to: {\r\n opacity: 1,\r\n },\r\n },\r\n contentWrapper: {\r\n padding: '100px 20px 20px',\r\n overflow: 'auto',\r\n height: '100%',\r\n paddingBottom: '80px',\r\n },\r\n container: {\r\n padding: '0 1.5rem',\r\n [`@media (min-width: ${breakpoints.Desktop}px)`]: {\r\n '&': {\r\n padding: '0',\r\n },\r\n },\r\n },\r\n headerArea: {\r\n display: 'flex',\r\n padding: '.5rem 0',\r\n minHeight: '5rem',\r\n },\r\n headerAreaTop: {\r\n display: 'flex',\r\n padding: '1rem 0 .5rem',\r\n borderBottom: `1px solid ${colors.borderColor}`,\r\n marginBottom: '1rem',\r\n },\r\n topArea: {\r\n borderBottom: `1px solid ${colors.gray700}`,\r\n // TODO: remove this when this area has been developed.\r\n minHeight: '60px',\r\n },\r\n headerActions: {\r\n display: 'flex',\r\n flexGrow: 1,\r\n marginLeft: 'auto',\r\n justifyContent: 'flex-end',\r\n alignItems: 'flex-start',\r\n flexShrink: 0,\r\n },\r\n sendingEmailSettings: {\r\n display: 'flex',\r\n padding: '.5rem 1rem',\r\n minHeight: '5rem',\r\n width: '100%',\r\n backgroundColor: colors.green200,\r\n color: colors.black,\r\n justifyContent: 'space-between',\r\n alignItems: 'center',\r\n '& span': {\r\n fontWeight: 700,\r\n },\r\n animation: '.5s $fadeIn',\r\n },\r\n dialogButtonsContainer: {\r\n display: 'flex',\r\n width: '100%',\r\n justifyContent: 'space-around',\r\n },\r\n button: {\r\n ...baseButton,\r\n ...{\r\n cursor: 'pointer',\r\n },\r\n },\r\n modalButtons: {\r\n display: 'flex',\r\n },\r\n modalCheckbox: {\r\n display: 'flex',\r\n position: 'absolute',\r\n right: '20px',\r\n top: '20px',\r\n },\r\n iconWrapper: {\r\n position: 'relative',\r\n },\r\n content: {\r\n display: '-webkit-box',\r\n WebkitLineClamp: '2',\r\n WebkitBoxOrient: 'vertical',\r\n overflow: 'hidden',\r\n textOverflow: 'ellipsis',\r\n },\r\n deleteButtons: {\r\n top: '0',\r\n right: '0',\r\n display: 'flex',\r\n zIndex: '1',\r\n position: 'absolute',\r\n flexWrap: 'wrap',\r\n transition: 'all .3s ease-in',\r\n justifyContent: 'end',\r\n width: '100%',\r\n height: '100%',\r\n alignItems: 'center',\r\n background: 'rgba(255,255,255, .7)',\r\n },\r\n sortPlaceholder: {\r\n ...sortPlaceholder,\r\n },\r\n sidebarArea: {\r\n marginBottom: '20px',\r\n },\r\n circleIcon: {\r\n width: '62px',\r\n height: '62px',\r\n borderRadius: '50%',\r\n border: `2px solid ${colors.white}`,\r\n backgroundColor: colors.blue300,\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n marginRight: '1rem',\r\n },\r\n oldName: {\r\n textDecoration: 'line-through',\r\n display: 'block',\r\n },\r\n})\r\n\r\nexport type RegistrationFormFields = {\r\n Titel: string\r\n Indhold: string\r\n ReferenceType: string\r\n}\r\n\r\nexport type UpdateDetailsSidebarContentType = {\r\n memberId: number\r\n update: UpdateBatch\r\n isOpen: boolean\r\n updateDetails: any | undefined\r\n}\r\n\r\nconst UpdateDetailsSidebarContent: FC = ({\r\n memberId,\r\n update,\r\n updateDetails,\r\n isOpen,\r\n}) => {\r\n const classes = useStyles()\r\n const [isFetching, setIsFetching] = useState(false)\r\n // const [updateDetails, setUpdateDetails] = useState(\r\n // undefined\r\n // )\r\n\r\n const renderDate = (dateString: string | null): string => {\r\n if (dateString === null) {\r\n return 'Ingen dato'\r\n }\r\n\r\n const date = new Date(dateString)\r\n const now = new Date()\r\n const nowYear = now.getFullYear()\r\n let isValid = false\r\n\r\n if (Object.prototype.toString.call(date) === '[object Date]') {\r\n if (!Number.isNaN(date.getTime())) {\r\n isValid = true\r\n }\r\n }\r\n\r\n if (\r\n !isValid ||\r\n nowYear - date.getFullYear() > 9 ||\r\n nowYear - date.getFullYear() < -9\r\n ) {\r\n return 'Ikke gyldig dato'\r\n }\r\n\r\n return formatDate(date)\r\n }\r\n\r\n const sortingArr = [\r\n 'Arbejdsstednummer',\r\n 'Stillingsnummer',\r\n 'Timetal',\r\n 'PrivatMobil',\r\n 'PrivatFastnetTelefon',\r\n 'PrivatEmail',\r\n 'ArbejdsTelefon',\r\n 'ArbejdsEmail',\r\n ]\r\n\r\n if (\r\n !updateDetails ||\r\n (updateDetails &&\r\n updateDetails.OpdateringFelter &&\r\n !updateDetails.OpdateringFelter.length)\r\n )\r\n return null\r\n\r\n return (\r\n
    \r\n \r\n \r\n {L('MINEOPDATERINGER_DETALJER_TITEL')}\r\n \r\n \r\n \r\n {updateDetails ? (\r\n <>\r\n {updateDetails.OpdateringFelter.sort(\r\n (a, b) =>\r\n sortingArr.indexOf(a.OpdateringFeltType) -\r\n sortingArr.indexOf(b.OpdateringFeltType)\r\n ).map((field) => {\r\n if (\r\n update.type === 'OpdaterMedlem' &&\r\n field.OpdateringFeltType === 'Arbejdsstednummer'\r\n ) {\r\n return null\r\n }\r\n return (\r\n \r\n \r\n {getLabel(field.OpdateringFeltType)}\r\n \r\n \r\n \r\n {field.NyVaerdiNavn || ' '}\r\n \r\n {update.type === 'OpdaterMedlem' ? (\r\n \r\n {field.GlVaerdiNavn || ' '}\r\n \r\n ) : null}\r\n \r\n \r\n )\r\n })}\r\n \r\n \r\n {L('MINEOPDATERINGER_DETALJER_ÆNDRES-PR_LABEL')}\r\n \r\n \r\n {renderDate(\r\n updateDetails.OpdateringType !== 'MedlemOphoert'\r\n ? updateDetails.FraDato\r\n : updateDetails.OphoertDato\r\n )}\r\n \r\n \r\n {updateDetails.OevrigeOplysninger ? (\r\n \r\n \r\n {L(\r\n 'MINEOPDATERINGER_DETALJER_ØVRIGE_OPL_LABEL'\r\n )}\r\n \r\n \r\n {updateDetails.OevrigeOplysninger}\r\n \r\n \r\n ) : null}\r\n \r\n ) : null}\r\n
    \r\n )\r\n}\r\n\r\ntype overlayProps = {\r\n update: UpdateBatch\r\n onHide?: (boolean: boolean) => void\r\n isOpen?: boolean\r\n}\r\n\r\nconst castAsMember = (memberOnUpdate: MemberOnUpdate): Member => {\r\n const m = new Member()\r\n\r\n m.birthday = new Date(memberOnUpdate.birthday)\r\n m.memberId = memberOnUpdate.id\r\n m.fullName = memberOnUpdate.fullName\r\n\r\n return m\r\n}\r\n\r\nconst DetailsOverlay = ({ update, onHide, isOpen }: overlayProps): any => {\r\n const [isFetching, setIsFetching] = useState(false)\r\n const [updateDetails, setUpdateDetails] = useState(\r\n undefined\r\n )\r\n\r\n const workplace = updateDetails?.OpdateringFelter?.find(\r\n (place) => place.OpdateringFeltType === 'Arbejdsstednummer'\r\n )?.NyVaerdiNavn\r\n\r\n useEffect(() => {\r\n const fetch = async (): Promise => {\r\n setIsFetching(true)\r\n try {\r\n const response2 = await getUpdateDetails(update.batchId)\r\n setUpdateDetails(response2.data)\r\n setIsFetching(false)\r\n } catch {\r\n setIsFetching(false)\r\n }\r\n\r\n setIsFetching(false)\r\n }\r\n\r\n if (!isFetching && !updateDetails && isOpen) {\r\n fetch()\r\n }\r\n }, [isFetching, update.batchId, updateDetails, isOpen])\r\n\r\n return (\r\n {\r\n if (onHide) {\r\n onHide(false)\r\n }\r\n }}\r\n >\r\n
    \r\n \r\n
    \r\n \r\n \r\n {getUpdateTypeLabel(update.type)}\r\n \r\n {update.type === 'OpdaterOgTilfoejEksisterendeMedlem' && (\r\n \r\n \r\n {update.member.fullName}\r\n \r\n \r\n )}\r\n {update.type === 'OpdaterMedlem' && (\r\n \r\n {`${update.member.fullName || ' '}, ${\r\n workplace !== undefined ? workplace : ' '\r\n }`}\r\n \r\n )}\r\n {update.type === 'MedlemOphoert' && (\r\n \r\n {update.member.fullName || ' '}\r\n \r\n )}\r\n \r\n
    \r\n \r\n \r\n {L('MINEOPDATERINGER_DETALJER_INFO_LABEL')}\r\n \r\n \r\n \r\n \r\n \r\n {L('MINEOPDATERINGER_DETALJER_INDSENDT-AF')}\r\n \r\n \r\n {update.profile.fullName}\r\n \r\n \r\n {/* \r\n \r\n Fødseldag\r\n \r\n \r\n {formatDate(new Date(update.member.birthday))}\r\n \r\n */}\r\n\r\n \r\n \r\n {L('MINEOPDATERINGER_DETALJER_INDSENDT-DATO')}\r\n \r\n \r\n {formatDate(new Date(update.created))}\r\n \r\n \r\n {/* \r\n \r\n {L('MINEOPDATERINGER_DETALJER_MEDLEM')}\r\n \r\n \r\n {update.member.fullName}\r\n \r\n */}\r\n\r\n \r\n \r\n {L('MINEOPDATERINGER_DETALJER_INDSENDT-TIL_LABEL')}\r\n \r\n \r\n {update.member.department.name}\r\n \r\n \r\n\r\n \r\n \r\n {L('MINEOPDATERINGER_DETALJER_STATUS')}\r\n \r\n \r\n {getUpdateStatusLabel(update.status)}\r\n \r\n \r\n {update.status === 'FaerdigBehandlet' ? (\r\n \r\n \r\n Opdateret\r\n \r\n \r\n {formatDate(new Date(update.updated))}\r\n \r\n \r\n ) : null}\r\n
    \r\n
    \r\n \r\n )\r\n}\r\n\r\nexport const UpdateDetails: FC = ({\r\n update,\r\n gridTemplateColumns,\r\n showUpdatedColumn,\r\n}) => {\r\n const classes = useStyles()\r\n const [isOpen, setIsOpen] = useState(false)\r\n\r\n if (update.type === 'OpdaterTR_FTR') {\r\n return null\r\n }\r\n\r\n return (\r\n <>\r\n setIsOpen(!isOpen)}\r\n key={update.batchId + new Date().toDateString()}\r\n >\r\n \r\n \r\n {L('MINEOPDATERINGER_INDSENDT_KOLONNE_OVERSKRIFT')}\r\n \r\n \r\n {formatDate(new Date(update.created))}\r\n \r\n \r\n \r\n \r\n {L('MINEOPDATERINGER_MEDLEM_KOLONNE_OVERSKRIFT')}\r\n \r\n {update.member.fullName}\r\n \r\n \r\n \r\n {L('MINEOPDATERINGER_MEDLEM_KOLONNE_OVERSKRIFT')}\r\n \r\n \r\n \r\n {getUpdateTypeLabel(update.type)}\r\n \r\n \r\n \r\n \r\n \r\n {L('MINEOPDATERINGER_INDSENDT-AF_KOLONNE_OVERSKRIFT')}\r\n \r\n \r\n \r\n {update.profile.fullName}\r\n \r\n \r\n \r\n {showUpdatedColumn ? (\r\n \r\n \r\n {L('MINEOPDATERINGER_OPDATERET_KOLONNE_OVERSKRIFT')}\r\n \r\n \r\n {formatDate(new Date(update.updated))}\r\n \r\n \r\n ) : null}\r\n \r\n \r\n \r\n {getUpdateStatusLabel(update.status)}\r\n \r\n \r\n \r\n \r\n {\r\n setIsOpen(!isOpen)\r\n }}\r\n >\r\n \r\n \r\n {formatDate(new Date(update.created))}\r\n \r\n \r\n \r\n {update.member.fullName}\r\n \r\n \r\n \r\n \r\n {getUpdateTypeLabel(update.type)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {update.profile.fullName}\r\n \r\n \r\n \r\n {showUpdatedColumn ? (\r\n \r\n \r\n {formatDate(new Date(update.updated))}\r\n \r\n \r\n ) : null}\r\n \r\n \r\n \r\n {getUpdateStatusLabel(update.status)}\r\n \r\n \r\n \r\n \r\n setIsOpen(boolean)}\r\n isOpen={isOpen}\r\n />\r\n \r\n )\r\n}\r\n","import React, { FC, useEffect, useState } from 'react'\r\nimport { createUseStyles } from 'react-jss'\r\nimport { useAtom } from 'jotai'\r\nimport { Archive, Note as NoteIcon } from '../../../assets/icons'\r\nimport useSortMembersList from '../../../hooks/useSortMembersList'\r\nimport breakpoints from '../../../theme/breakpoints'\r\nimport { colors } from '../../../theme/palette'\r\nimport { baseButton, sortPlaceholder } from '../../../theme/reuseables'\r\nimport { CardHeader, CardHeaderCell, CardList } from '../../ui/Card'\r\nimport { SortButton } from '../../ui/SortButton'\r\nimport { Typography } from '../../ui/Typography/Typography'\r\nimport {\r\n allUpdatesDone,\r\n allUpdatesInProgress,\r\n updatePageDoneAtom,\r\n updatePageInProgressAtom,\r\n allUpdates,\r\n updatePageAtom,\r\n} from '../../../store/filter/filterAtom'\r\nimport { Button } from '../../ui/Button/Button'\r\nimport { L, L_HTML } from '../../providers/Lokalise'\r\nimport { getAllUpdates } from '../../../api/updates'\r\nimport { mapUpdates } from '../../../models/UpdateBatch'\r\nimport { Loader } from '../../ui/Loaders/Loader'\r\nimport { UpdateDetails } from '../../modules/Updates/UpdateDetails'\r\nimport { HeaderLinks } from '../../modules/Headerlinks'\r\nimport { Spinner } from '../../ui/Loaders/Spinner'\r\n\r\nconst useStyles = createUseStyles({\r\n '@keyframes fadeIn': {\r\n from: {\r\n opacity: 0,\r\n },\r\n to: {\r\n opacity: 1,\r\n },\r\n },\r\n container: {\r\n padding: '0 1.5rem',\r\n [`@media (min-width: ${breakpoints.Desktop}px)`]: {\r\n '&': {\r\n padding: '0',\r\n },\r\n },\r\n },\r\n headerArea: {\r\n display: 'flex',\r\n padding: '.5rem 0',\r\n minHeight: '5rem',\r\n },\r\n headerAreaTop: {\r\n display: 'flex',\r\n padding: '1rem 0 .5rem',\r\n borderBottom: `1px solid ${colors.borderColor}`,\r\n marginBottom: '1rem',\r\n },\r\n topArea: {\r\n borderBottom: `1px solid ${colors.gray700}`,\r\n // TODO: remove this when this area has been developed.\r\n minHeight: '60px',\r\n },\r\n headerActions: {\r\n display: 'flex',\r\n flexGrow: 1,\r\n marginLeft: 'auto',\r\n justifyContent: 'flex-end',\r\n alignItems: 'flex-start',\r\n flexShrink: 0,\r\n },\r\n sendingEmailSettings: {\r\n display: 'flex',\r\n padding: '.5rem 1rem',\r\n minHeight: '5rem',\r\n width: '100%',\r\n backgroundColor: colors.green200,\r\n color: colors.black,\r\n justifyContent: 'space-between',\r\n alignItems: 'center',\r\n '& span': {\r\n fontWeight: 700,\r\n },\r\n animation: '.5s $fadeIn',\r\n },\r\n updateList: {\r\n paddingTop: '20px',\r\n },\r\n dialogButtonsContainer: {\r\n display: 'flex',\r\n width: '100%',\r\n justifyContent: 'space-around',\r\n },\r\n button: {\r\n ...baseButton,\r\n ...{\r\n cursor: 'pointer',\r\n },\r\n },\r\n modalButtons: {\r\n display: 'flex',\r\n },\r\n modalCheckbox: {\r\n display: 'flex',\r\n position: 'absolute',\r\n right: '20px',\r\n top: '20px',\r\n },\r\n numberOfUpdate: {\r\n display: 'flex',\r\n padding: '30px 0 90px',\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n },\r\n iconWrapper: {\r\n position: 'relative',\r\n },\r\n content: {\r\n display: '-webkit-box',\r\n WebkitLineClamp: '2',\r\n WebkitBoxOrient: 'vertical',\r\n overflow: 'hidden',\r\n textOverflow: 'ellipsis',\r\n },\r\n deleteButtons: {\r\n top: '0',\r\n right: '0',\r\n display: 'flex',\r\n zIndex: '1',\r\n position: 'absolute',\r\n flexWrap: 'wrap',\r\n transition: 'all .3s ease-in',\r\n justifyContent: 'end',\r\n width: '100%',\r\n height: '100%',\r\n alignItems: 'center',\r\n background: 'rgba(255,255,255, .7)',\r\n },\r\n sortPlaceholder: {\r\n ...sortPlaceholder,\r\n },\r\n customIcon: {\r\n backgroundColor: colors.green500,\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n color: colors.white,\r\n padding: '2px 5px',\r\n borderRadius: '4px',\r\n },\r\n})\r\n\r\nconst gridTemplateColumns = '16% 23% 23% 21% 18%'\r\nconst gridTemplateColumnsUpdated = '16% 19% 21% 17% auto 18%'\r\n\r\nconst Updates: FC = () => {\r\n const [loading, setLoading] = useState(true)\r\n const classes = useStyles()\r\n const { setSort, sortState } = useSortMembersList()\r\n\r\n const [showDone, setShowDone] = useState(false)\r\n const [sortedUpdateDone] = useAtom(updatePageDoneAtom)\r\n const [sortedUpdateInProgress] = useAtom(updatePageInProgressAtom)\r\n const [updates, setAllUpdates] = useAtom(allUpdates)\r\n const [sortedUpdates] = useAtom(updatePageAtom)\r\n\r\n const [, _setAllUpdatesDone] = useAtom(allUpdatesDone)\r\n const [, _setUpdatesInProgress] = useAtom(allUpdatesInProgress)\r\n\r\n const init = (): void => {\r\n async function fetchData(): Promise {\r\n setLoading(true)\r\n const today = new Date()\r\n\r\n // Set the target date to 30 days ago\r\n const targetDate = new Date()\r\n targetDate.setDate(today.getDate() - 30)\r\n const resZero = await getAllUpdates()\r\n const mapped = mapUpdates(resZero.data.OpdateringBatches)\r\n const filtered = mapped.filter((item) => {\r\n if (item.status === 'UnderOpdatering') {\r\n return true\r\n }\r\n\r\n // Filter for items created within the last 30 days\r\n if (item.status === 'FaerdigBehandlet') {\r\n return new Date(item.created) > targetDate\r\n }\r\n\r\n return false\r\n })\r\n\r\n setAllUpdates(\r\n filtered.filter((item) => item.type !== 'OpdaterTR_FTR')\r\n )\r\n setLoading(false)\r\n }\r\n\r\n fetchData()\r\n }\r\n\r\n useEffect(() => {\r\n if (!sortState) {\r\n setSort('created')\r\n }\r\n init()\r\n }, [])\r\n\r\n if (loading) return \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 {showDone\r\n ? L_HTML('MINEOPDATERINGER_UDFØRT_OVERSKRIFT')\r\n : L_HTML('MINEOPDATERINGER_AFVENTER_OVERSKRIFT')}\r\n \r\n
    \r\n
    \r\n
    \r\n \r\n {!showDone\r\n ? L_HTML('MINEOPDATERINGER_AFVENTER_TEKST')\r\n : L_HTML('MINEOPDATERINGER_UDFØRT_TEKST')}\r\n \r\n
    \r\n
    \r\n
    \r\n \r\n {L_HTML(\r\n 'MINEOPDATERINGER_VISER-ANTAL_OPDATERINGER_TEXT',\r\n {\r\n antal: String(sortedUpdates.length),\r\n }\r\n )}\r\n \r\n
    \r\n
    \r\n\r\n
    \r\n {updates && updates.length ? (\r\n \r\n \r\n \r\n setSort('created')}\r\n sort={sortState}\r\n name=\"created\"\r\n >\r\n {L(\r\n 'MINEOPDATERINGER_INDSENDT_KOLONNE_OVERSKRIFT'\r\n )}\r\n \r\n \r\n \r\n setSort('name')}\r\n sort={sortState}\r\n name=\"name\"\r\n >\r\n {L(\r\n 'MINEOPDATERINGER_MEDLEM_KOLONNE_OVERSKRIFT'\r\n )}\r\n \r\n \r\n \r\n setSort('updateType')}\r\n sort={sortState}\r\n name=\"updateType\"\r\n >\r\n {L(\r\n 'MINEOPDATERINGER_TYPE_KOLONNE_OVERSKRIFT'\r\n )}\r\n \r\n \r\n \r\n setSort('updateProfile')}\r\n sort={sortState}\r\n name=\"updateProfile\"\r\n >\r\n {L(\r\n 'MINEOPDATERINGER_INDSENDT-AF_KOLONNE_OVERSKRIFT'\r\n )}\r\n \r\n \r\n {showDone ? (\r\n \r\n setSort('updateUpdated')}\r\n sort={sortState}\r\n name=\"updateUpdated\"\r\n >\r\n {L(\r\n 'MINEOPDATERINGER_OPDATERET_KOLONNE_OVERSKRIFT'\r\n )}\r\n \r\n \r\n ) : null}\r\n \r\n setSort('status')}\r\n sort={sortState}\r\n name=\"status\"\r\n >\r\n {L(\r\n 'MINEOPDATERINGER_STATUS_KOLONNE_OVERSKRIFT'\r\n )}\r\n \r\n \r\n \r\n \r\n ) : null}\r\n {sortedUpdates.map((update) => (\r\n \r\n ))}\r\n
    \r\n
    \r\n \r\n {L_HTML('MINEOPDATERINGER_VISER-ANTAL_TEXT', {\r\n antal: String(sortedUpdates.length),\r\n })}\r\n \r\n
    \r\n
    \r\n )\r\n}\r\n\r\nexport { Updates }\r\n","import { AxiosResponse } from 'axios'\r\nimport {\r\n NoteResponse,\r\n CreateNewNoteType,\r\n UpdateNoteType,\r\n DeleteNoteType,\r\n} from '../../models/Note'\r\nimport { axiosWithImitator } from '../withAuth'\r\n\r\nexport type NoteTypes = 'MedlemIdent' | 'ArbejdsstedNr'\r\n\r\nexport type getNotesReponse = {\r\n Noter: NoteResponse[]\r\n AntalIalt: number\r\n}\r\n\r\nconst getMemberNotes = async (\r\n id: number,\r\n type: NoteTypes\r\n): Promise => {\r\n const response = await axiosWithImitator.get(`/note/hentnoter`, {\r\n params: {\r\n 'request.referenceId': id,\r\n 'request.referenceType': type,\r\n },\r\n })\r\n\r\n const { data } = response\r\n return data\r\n}\r\n\r\n// /note/hentbrugersnoter\r\nconst getAllNotes = async (type = 'MedlemIdent'): Promise => {\r\n const response = await axiosWithImitator.get(`/note/hentbrugersnoter`, {\r\n params: {\r\n 'request.referenceType': type,\r\n },\r\n })\r\n return response\r\n}\r\n\r\nconst addNewNote = async (\r\n values: CreateNewNoteType\r\n): Promise => {\r\n const response = await axiosWithImitator.post(`/note/opretnote`, values)\r\n\r\n return response\r\n}\r\n\r\nconst updateNote = async (values: UpdateNoteType): Promise => {\r\n const response = await axiosWithImitator.post(`/note/opdaternote`, values)\r\n\r\n return response\r\n}\r\n\r\nconst updateNoteIsArchived = async (\r\n id: number,\r\n isRead: boolean\r\n): Promise => {\r\n const response = await axiosWithImitator.post(\r\n `/note/opdaternoteerlaest`,\r\n null,\r\n {\r\n params: {\r\n 'request.noteId': id,\r\n 'request.erLaest': isRead,\r\n },\r\n }\r\n )\r\n\r\n return response\r\n}\r\n\r\nconst deleteNote = async (id: number): Promise => {\r\n const response = await axiosWithImitator.delete(`/note/sletnote`, {\r\n params: {\r\n 'request.noteId': id,\r\n },\r\n })\r\n\r\n return response\r\n}\r\n\r\nexport {\r\n getMemberNotes,\r\n addNewNote,\r\n updateNote,\r\n deleteNote,\r\n getAllNotes,\r\n updateNoteIsArchived,\r\n}\r\n","// ErFavorit: false\r\n// ErLaest: false\r\n// Indhold: \"Havde også vagt sidste år..\\nVend tilbage\"\r\n// NoteId: 114\r\n// OpdaterTid: \"2022-01-31T11:19:11.3827028\"\r\n// OpretTid: \"2022-01-20T10:23:44.3796811\"\r\n// ReferenceId: 1000156792\r\n// ReferenceType: \"MedlemIdent\"\r\n// Titel: \"Vagt 24 dec. Hvad gælder?\"\r\n\r\nexport type NoteResponse = {\r\n ErFavorit: boolean\r\n ErLaest: boolean\r\n Indhold: string\r\n NoteId: number\r\n OpdaterTid: string\r\n OpretTid: string\r\n ReferenceId: number\r\n ReferenceType: string\r\n Titel: string\r\n ReferenceNavn: string\r\n}\r\n\r\nexport interface INote {\r\n referenceId?: string\r\n referenceType: string\r\n title: string\r\n content: string\r\n NoteId: number\r\n}\r\n\r\nexport type CreateNewNoteType = {\r\n ReferenceId?: number\r\n ReferenceType?: string\r\n Titel?: string\r\n Indhold?: string\r\n}\r\n\r\nexport type UpdateNoteType = {\r\n NoteId: number\r\n Titel?: string\r\n Indhold?: string\r\n}\r\n\r\nexport type DeleteNoteType = {\r\n NoteId: number\r\n}\r\n\r\nexport class Note {\r\n referenceId = ''\r\n\r\n referenceType = ''\r\n\r\n title = ''\r\n\r\n content = ''\r\n\r\n id: number | undefined = undefined\r\n\r\n created: Date | undefined = undefined\r\n\r\n updated: Date | undefined = undefined\r\n\r\n name = ''\r\n\r\n isFavorite = false\r\n\r\n archived = false\r\n\r\n isRead = false\r\n\r\n // Searchables.\r\n searchable_title = ''\r\n\r\n searchable_content = ''\r\n\r\n searchable_member = ''\r\n\r\n static build(data: NoteResponse): Note {\r\n const note = new Note()\r\n\r\n note.referenceId = String(data.ReferenceId)\r\n note.content = data.Indhold\r\n note.title = data.Titel\r\n note.referenceType = data.ReferenceType\r\n note.id = data.NoteId\r\n note.updated = new Date(data.OpdaterTid)\r\n note.created = new Date(data.OpretTid)\r\n note.name = data.ReferenceNavn || ''\r\n note.isFavorite = data.ErFavorit\r\n note.archived = data.ErLaest\r\n note.isRead = data.ErLaest\r\n\r\n // Searchables.\r\n note.searchable_content = note.content\r\n\r\n note.searchable_title = note.title\r\n\r\n note.searchable_member = note.name\r\n\r\n return note\r\n }\r\n}\r\n\r\nexport function mapNotes(data: NoteResponse[]): Note[] {\r\n return data.map((note) => Note.build(note))\r\n}\r\n","import React, { FC, useEffect, useState } from 'react'\r\nimport { createUseStyles } from 'react-jss'\r\nimport { useForm } from 'react-hook-form'\r\nimport { useAtom } from 'jotai'\r\nimport { Button } from '../../ui/Button/Button'\r\nimport { Typography } from '../../ui/Typography/Typography'\r\nimport { Member } from '../../../models/Member'\r\nimport { colors } from '../../../theme/palette'\r\nimport { FormInput, FormTextArea } from '../FormElements/FormInput'\r\nimport { FormControl } from '../../ui/FormElememts/FormControl'\r\nimport { baseButton } from '../../../theme/reuseables'\r\nimport { addNewNote } from '../../../api/notes'\r\nimport { CreateNewNoteType } from '../../../models/Note'\r\nimport { L, L_HTML } from '../../providers/Lokalise'\r\nimport { Workplace } from '../../../models/Workplace'\r\nimport { ImitatorNoAccessWarning } from '../Imitator/ImitatorNoAccessWarning'\r\nimport { profileAtom } from '../../../api/profile/profile'\r\n\r\ninterface EditProps {\r\n member?: Member\r\n workPlace?: Workplace\r\n type: 'member' | 'workplace'\r\n onUpdated?: () => void\r\n onClickCancel?: () => void\r\n hasNotes?: boolean\r\n}\r\n\r\nconst useStyles = createUseStyles({\r\n contentWrapper: {\r\n padding: '100px 20px 20px',\r\n overflow: 'auto',\r\n height: 'calc(100% - 100px)',\r\n paddingBottom: '80px',\r\n },\r\n accordionWrapper: {\r\n marginBottom: '20px',\r\n },\r\n select: {\r\n position: 'relative',\r\n height: '3.125rem',\r\n backgroundColor: colors.white,\r\n border: `1px solid ${colors.borderColor}`,\r\n borderRadius: '6px',\r\n width: '100%',\r\n fontSize: '1.125rem',\r\n paddingLeft: '.75rem',\r\n paddingRight: '.75rem',\r\n cursor: 'pointer',\r\n color: colors.labelColor,\r\n },\r\n button: {\r\n ...baseButton,\r\n ...{\r\n cursor: 'pointer',\r\n },\r\n },\r\n bottom: {\r\n display: 'flex',\r\n position: 'absolute',\r\n bottom: '0',\r\n width: '100%',\r\n padding: '20px',\r\n left: '0',\r\n background: colors.white,\r\n zIndex: 4,\r\n borderTop: `1px solid ${colors.borderColor}`,\r\n '& > button': {\r\n flexGrow: 1,\r\n },\r\n '& > button:last-of-type': {\r\n marginRight: '0',\r\n },\r\n },\r\n})\r\n\r\nexport type RegistrationFormFields = {\r\n Titel: string\r\n Indhold: string\r\n ReferenceType: string\r\n}\r\n\r\nexport const AddNewNote: FC = ({\r\n member,\r\n type,\r\n workPlace,\r\n onUpdated,\r\n onClickCancel,\r\n hasNotes,\r\n}) => {\r\n const [authProfile] = useAtom(profileAtom)\r\n const [showImitatorModal, setShowImitatorModal] = useState(false)\r\n const { register, handleSubmit, formState, reset } =\r\n useForm()\r\n const classes = useStyles()\r\n const [isValid, setIsValid] = useState(false)\r\n\r\n const resetForm = (): void => {\r\n reset()\r\n }\r\n\r\n const { isDirty, dirtyFields } = formState\r\n\r\n const onSubmit = async (data: RegistrationFormFields): Promise => {\r\n if (authProfile.isImitator) {\r\n setShowImitatorModal(true)\r\n return\r\n }\r\n const fieldsToEdit: CreateNewNoteType = {\r\n ReferenceId: type === 'member' ? member.memberId : workPlace.number,\r\n ReferenceType: type === 'member' ? 'MedlemIdent' : 'ArbejdsstedNr',\r\n }\r\n\r\n if (isDirty) {\r\n if (dirtyFields.Indhold) {\r\n fieldsToEdit.Indhold = data.Indhold\r\n }\r\n\r\n if (dirtyFields.Titel) {\r\n fieldsToEdit.Titel = data.Titel\r\n }\r\n\r\n const response = await addNewNote(fieldsToEdit)\r\n\r\n if (onUpdated && response) {\r\n onUpdated()\r\n }\r\n }\r\n }\r\n\r\n const checkIsValid = (): void => {\r\n // setIsValid(isDirty && dirtyFields.Indhold && dirtyFields.Indhold)\r\n setIsValid(isDirty)\r\n }\r\n\r\n useEffect(() => {\r\n checkIsValid()\r\n })\r\n\r\n return (\r\n <>\r\n \r\n \r\n {L_HTML('NOTER_NY-NOTE_FORM_TITEL')}\r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n
    \r\n {\r\n resetForm()\r\n onClickCancel()\r\n }}\r\n type=\"secondary\"\r\n size=\"large\"\r\n >\r\n {L('NOTER_REDIGER_FORM_ANNULLER_KNAP')}\r\n \r\n \r\n {L('NOTER_REDIGER_FORM_GEM_KNAP')}\r\n \r\n
    \r\n\r\n
    \r\n \r\n setShowImitatorModal(false)}\r\n />\r\n \r\n )\r\n}\r\n\r\nAddNewNote.defaultProps = {\r\n hasNotes: false,\r\n}\r\n","import React, { FC, useEffect, useRef, useState } from 'react'\r\nimport { createUseStyles } from 'react-jss'\r\nimport { useForm } from 'react-hook-form'\r\nimport moment from 'moment'\r\nimport { Button } from '../../ui/Button/Button'\r\nimport { Typography } from '../../ui/Typography/Typography'\r\nimport { colors } from '../../../theme/palette'\r\nimport { FormTextArea } from '../FormElements/FormInput'\r\nimport { FormControl } from '../../ui/FormElememts/FormControl'\r\nimport { baseButton } from '../../../theme/reuseables'\r\nimport { updateNote } from '../../../api/notes'\r\nimport { Note, UpdateNoteType } from '../../../models/Note'\r\nimport { L } from '../../providers/Lokalise'\r\nimport Input from '../../ui/FormElememts/Input'\r\n\r\ninterface EditProps {\r\n note: Note\r\n onUpdated?: (note: Note) => void\r\n onCancel?: () => void\r\n}\r\n\r\nconst useStyles = createUseStyles({\r\n contentWrapper: {\r\n padding: '100px 20px 20px',\r\n overflow: 'auto',\r\n height: 'calc(100% - 100px)',\r\n paddingBottom: '80px',\r\n },\r\n accordionWrapper: {\r\n marginBottom: '20px',\r\n },\r\n select: {\r\n position: 'relative',\r\n height: '3.125rem',\r\n backgroundColor: colors.white,\r\n border: `1px solid ${colors.borderColor}`,\r\n borderRadius: '6px',\r\n width: '100%',\r\n fontSize: '1.125rem',\r\n paddingLeft: '.75rem',\r\n paddingRight: '.75rem',\r\n cursor: 'pointer',\r\n color: colors.labelColor,\r\n },\r\n button: {\r\n ...baseButton,\r\n ...{\r\n cursor: 'pointer',\r\n },\r\n },\r\n bottom: {\r\n display: 'flex',\r\n position: 'absolute',\r\n bottom: '0',\r\n width: '100%',\r\n padding: '20px',\r\n left: '0',\r\n background: colors.white,\r\n zIndex: 4,\r\n borderTop: `1px solid ${colors.borderColor}`,\r\n '& > button': {\r\n flexGrow: 1,\r\n },\r\n '& > button:last-of-type': {\r\n marginRight: '0',\r\n },\r\n },\r\n date: {\r\n position: 'relative',\r\n marginTop: '20px',\r\n },\r\n datePlaceholder: {\r\n position: 'absolute',\r\n top: '-38px',\r\n zIndex: '1',\r\n },\r\n})\r\n\r\nexport type RegistrationFormFields = {\r\n Titel: string\r\n Indhold: string\r\n ReferenceType: string\r\n}\r\n\r\nexport const EditNote: FC = ({ note, onUpdated, onCancel }) => {\r\n const { register, handleSubmit, reset, setValue } =\r\n useForm()\r\n const classes = useStyles()\r\n const inputReference = useRef(null)\r\n\r\n useEffect(() => {\r\n if (inputReference && inputReference.current) {\r\n setTimeout(() => {\r\n inputReference.current.focus()\r\n }, 500)\r\n }\r\n }, [note])\r\n\r\n const resetForm = (): void => {\r\n reset()\r\n }\r\n\r\n const onSubmit = async (data: RegistrationFormFields): Promise => {\r\n const fieldsToEdit: UpdateNoteType = {\r\n NoteId: note.id,\r\n }\r\n\r\n fieldsToEdit.Indhold = data.Indhold || undefined\r\n fieldsToEdit.Titel = data.Titel || note.title\r\n\r\n const response = await updateNote(fieldsToEdit)\r\n\r\n if (response) {\r\n if (onUpdated) {\r\n onUpdated(note)\r\n }\r\n }\r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n {L('NOTER_REDIGER-NOTE_FORM_TITEL')}\r\n \r\n\r\n \r\n {\r\n setValue('Titel', e.target.value)\r\n }}\r\n />\r\n \r\n\r\n \r\n \r\n \r\n
    \r\n \r\n \r\n Sidst ændret{' '}\r\n {`${moment(note.updated).format(\r\n 'DD.MM.YYYY'\r\n )}, kl.${moment(note.updated).format('HH:mm')}`}\r\n \r\n \r\n
    \r\n\r\n
    \r\n {\r\n if (onCancel) {\r\n onCancel()\r\n }\r\n resetForm()\r\n }}\r\n type=\"secondary\"\r\n size=\"large\"\r\n >\r\n {L('NOTER_REDIGER_FORM_ANNULLER_KNAP')}\r\n \r\n \r\n
    \r\n\r\n
    \r\n \r\n \r\n )\r\n}\r\n","import React, { FC } from 'react'\r\nimport { createUseStyles } from 'react-jss'\r\nimport { Note as NoteIcon, Plus } from '../../../assets/icons'\r\nimport { Note } from '../../../models/Note'\r\nimport { colors } from '../../../theme/palette'\r\nimport { baseButton } from '../../../theme/reuseables'\r\nimport { L } from '../../providers/Lokalise'\r\nimport { Circle } from '../../ui/Card'\r\nimport { CircleIcon } from '../../ui/Circle/Circle'\r\n\r\ninterface EditMemberNoteButtonProps {\r\n onClickCreate?: () => void\r\n onClickView?: () => void\r\n notes: Note[]\r\n withBorder?: boolean\r\n firstNoteLabel?: string\r\n}\r\n\r\nconst useStyles = createUseStyles({\r\n wrapper: {\r\n display: 'flex',\r\n },\r\n button: {\r\n ...baseButton,\r\n ...{\r\n backgroundColor: colors.white,\r\n height: '56px',\r\n fontSize: '18px',\r\n padding: '16px',\r\n borderRadius: '0.5rem',\r\n cursor: 'pointer',\r\n textAlign: 'left',\r\n justifyContent: 'start',\r\n },\r\n },\r\n withBorder: {\r\n border: `1px solid ${colors.borderColor}`,\r\n },\r\n})\r\n\r\nconst EditMemberNoteButton: FC = ({\r\n onClickCreate,\r\n onClickView,\r\n notes,\r\n withBorder,\r\n firstNoteLabel,\r\n}) => {\r\n const classes = useStyles()\r\n\r\n if (notes.length > 0) {\r\n return (\r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n Noter\r\n {notes.length}\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 \r\n \r\n {firstNoteLabel}\r\n \r\n \r\n \r\n \r\n )\r\n}\r\n\r\nEditMemberNoteButton.defaultProps = {\r\n firstNoteLabel: L('PROFIL_NOTER_FORM_FØRSTE-NOTE_KNAP'),\r\n}\r\n\r\nexport { EditMemberNoteButton }\r\n","import moment from 'moment'\r\nimport React, { FC, useEffect, useRef, useState } from 'react'\r\nimport { createUseStyles } from 'react-jss'\r\nimport { Delete, DeleteFill, Edit, EditFill } from '../../../assets/icons'\r\nimport { Note } from '../../../models/Note'\r\nimport { colors } from '../../../theme/palette'\r\nimport { L, L_HTML } from '../../providers/Lokalise'\r\nimport { Button } from '../../ui/Button/Button'\r\nimport { CircleIcon2 } from '../../ui/Circle/Circle'\r\nimport { Typography } from '../../ui/Typography/Typography'\r\n\r\ninterface NoteSidebarCardProps {\r\n note: Note\r\n onClickEdit?: (note: Note) => void\r\n onClickDelete?: (note: Note) => void\r\n}\r\n\r\nconst useStyles = createUseStyles({\r\n card: {\r\n position: 'relative',\r\n backgroundColor: colors.white,\r\n width: '100%',\r\n color: 'black',\r\n marginBottom: '10px',\r\n borderRadius: '4px',\r\n border: `1px solid ${colors.borderColor}`,\r\n padding: '1rem',\r\n transition: 'all 0.5s linear',\r\n },\r\n actions: {\r\n position: 'absolute',\r\n top: '10px',\r\n right: '10px',\r\n display: 'flex',\r\n gap: '10px',\r\n },\r\n date: {\r\n position: 'relative',\r\n display: 'flex',\r\n justifyContent: 'space-between',\r\n marginTop: '20px',\r\n },\r\n deleteButtons: {\r\n display: 'flex',\r\n transition: 'all .3s ease-in',\r\n marginTop: '20px',\r\n },\r\n title: {\r\n display: '-webkit-box',\r\n WebkitLineClamp: '1',\r\n WebkitBoxOrient: 'vertical',\r\n overflow: 'hidden',\r\n textOverflow: 'ellipsis',\r\n },\r\n titleOpen: {\r\n display: '-webkit-box',\r\n // WebkitLineClamp: '1',\r\n WebkitBoxOrient: 'vertical',\r\n overflow: 'hidden',\r\n // textOverflow: 'ellipsis',\r\n },\r\n content: {\r\n marginTop: '10px',\r\n display: '-webkit-box',\r\n WebkitLineClamp: '2',\r\n WebkitBoxOrient: 'vertical',\r\n overflow: 'hidden',\r\n whiteSpace: 'pre-wrap',\r\n textOverflow: 'ellipsis',\r\n },\r\n contentOpen: {\r\n marginTop: '10px',\r\n display: '-webkit-box',\r\n whiteSpace: 'pre-wrap',\r\n // WebkitLineClamp: '2',\r\n WebkitBoxOrient: 'vertical',\r\n overflow: 'hidden',\r\n // textOverflow: 'ellipsis',\r\n },\r\n})\r\n\r\nconst NoteSidebarCard: FC = ({\r\n note,\r\n onClickEdit,\r\n onClickDelete,\r\n}) => {\r\n const classes = useStyles()\r\n const [showDelete, setShowDelete] = useState(false)\r\n const [readMore, setReadMore] = useState(false)\r\n const [isMore, setIsMore] = useState(false)\r\n const contentRef = useRef()\r\n const titleRef = useRef()\r\n\r\n const onHandleEdit = (): void => {\r\n if (onClickEdit) {\r\n onClickEdit(note)\r\n }\r\n }\r\n\r\n const onHandleDelete = (): void => {\r\n setShowDelete(false)\r\n if (onClickDelete) {\r\n onClickDelete(note)\r\n }\r\n }\r\n\r\n const checkLines = (ref, lines: number): void => {\r\n // eslint-disable-next-line no-unused-expressions\r\n const lineHeight = window\r\n .getComputedStyle(ref.current)\r\n .getPropertyValue('line-height')\r\n\r\n // eslint-disable-next-line no-unused-expressions\r\n ref.current &&\r\n Math.round(ref.current.scrollHeight / parseFloat(lineHeight)) >\r\n lines &&\r\n setIsMore(true)\r\n }\r\n useEffect(() => {\r\n checkLines(contentRef, 2)\r\n }, [contentRef, note])\r\n useEffect(() => {\r\n checkLines(titleRef, 1)\r\n }, [titleRef, note])\r\n return (\r\n
    \r\n {/* --------- headline -------- */}\r\n \r\n \r\n {note.title}\r\n \r\n \r\n {/* ------- text content --------- */}\r\n \r\n \r\n {note.content}\r\n \r\n \r\n {/* ---------- date -------- */}\r\n
    \r\n \r\n {`${moment(note.updated).format('DD.MM.YYYY')}, kl.${moment(\r\n note.updated\r\n ).format('HH:mm')}`}\r\n \r\n {isMore && (\r\n setReadMore((prev) => !prev)}\r\n >\r\n {readMore\r\n ? L_HTML('NOTER_SIDEBAR_VIS_MINDRE')\r\n : L_HTML('NOTER_SIDEBAR_VIS_MERE')}\r\n \r\n )}\r\n
    \r\n\r\n
    \r\n \r\n \r\n
    \r\n {showDelete ? (\r\n
    \r\n setShowDelete(false)}\r\n size=\"xlarge\"\r\n type=\"secondary\"\r\n style={{ flexGrow: 1 }}\r\n >\r\n {L('NOTER_REDIGER_FORM_ANNULLER_KNAP')}\r\n \r\n \r\n {L('NOTER_SIDEBAR_SLET-NOTE_KNAP')}\r\n \r\n
    \r\n ) : null}\r\n
    \r\n )\r\n}\r\n\r\nexport { NoteSidebarCard }\r\n","import React, { FC } from 'react'\r\nimport { createUseStyles } from 'react-jss'\r\nimport { Note } from '../../../models/Note'\r\nimport { L, L_HTML } from '../../providers/Lokalise'\r\nimport { Button } from '../../ui/Button/Button'\r\nimport { Typography } from '../../ui/Typography/Typography'\r\nimport { EditMemberNoteButton } from './EditMemberNoteButton'\r\nimport { NoteSidebarCard } from './NoteSidebarCard'\r\nimport { colors } from '../../../theme/palette'\r\n\r\ninterface NoteOverviewSidebarProps {\r\n notes: Note[]\r\n onClickEdit: (note: Note) => void\r\n onClickDelete: (note: Note) => void\r\n onClickCreate: () => void\r\n}\r\n\r\nconst useStyles = createUseStyles({\r\n contentWrapper: {\r\n padding: '100px 20px 20px',\r\n overflow: 'auto',\r\n height: '100%',\r\n paddingBottom: '80px',\r\n },\r\n createNote: {\r\n marginBottom: '20px',\r\n },\r\n})\r\n\r\nconst NoteOverviewSidebar: FC = ({\r\n notes,\r\n onClickEdit,\r\n onClickDelete,\r\n onClickCreate,\r\n}) => {\r\n const classes = useStyles()\r\n\r\n return (\r\n
    \r\n \r\n {L_HTML('NOTER_SIDEBAR_OVERSIGT_TITEL')}\r\n \r\n
    \r\n \r\n
    \r\n {notes\r\n .sort(\r\n (a: Note, b: Note) =>\r\n b.updated.getTime() - a.updated.getTime()\r\n )\r\n .map((note) => {\r\n return (\r\n \r\n )\r\n })}\r\n
    \r\n )\r\n}\r\n\r\nexport { NoteOverviewSidebar }\r\n","import React, { FC, useEffect, useState } from 'react'\r\nimport { useAtom } from 'jotai'\r\nimport { createUseStyles } from 'react-jss'\r\nimport { deleteNote, getMemberNotes } from '../../../api/notes'\r\nimport { Member } from '../../../models/Member'\r\nimport { Note, mapNotes } from '../../../models/Note'\r\nimport { Workplace } from '../../../models/Workplace'\r\nimport { colors } from '../../../theme/palette'\r\nimport { baseButton } from '../../../theme/reuseables'\r\nimport { Circle } from '../../ui/Card'\r\nimport { CircleIcon } from '../../ui/Circle/Circle'\r\nimport { NoteButton } from '../../ui/NoteButton'\r\nimport { Overlay } from '../../ui/Sidebar'\r\nimport { DrawerHeaderWorkplaceInfo } from '../FormElements/DrawerHeader'\r\nimport { AddNewNote } from './AddNewNote'\r\nimport { EditMemberNoteButton } from './EditMemberNoteButton'\r\nimport { EditNote } from './EditNote'\r\nimport { NoteOverviewSidebar } from './NoteOverviewSidebar'\r\nimport { Note as NoteIcon, Plus } from '../../../assets/icons'\r\nimport { Button } from '../../ui/Button/Button'\r\nimport breakpoints from '../../../theme/breakpoints'\r\nimport { ImitatorNoAccessWarning } from '../Imitator/ImitatorNoAccessWarning'\r\n\r\nimport { profileAtom } from '../../../api/profile/profile'\r\n\r\ntype ViewStates = 'default' | 'create' | 'edit' | 'delete'\r\n\r\ninterface EditWorkplaceNotesProps {\r\n workplace: Workplace\r\n}\r\n\r\nconst useStyles = createUseStyles({\r\n button: {\r\n ...baseButton,\r\n ...{\r\n backgroundColor: colors.white,\r\n fontSize: '16px',\r\n padding: '16px',\r\n borderRadius: '0.5rem',\r\n cursor: 'pointer',\r\n textAlign: 'left',\r\n justifyContent: 'start',\r\n },\r\n },\r\n link: {\r\n fontWeight: 400,\r\n fontSize: '16px',\r\n textDecoration: 'underline',\r\n },\r\n buttons: {\r\n display: 'flex',\r\n [`@media (min-width: ${breakpoints.Desktop}px)`]: {\r\n '&': {\r\n display: 'grid',\r\n gridTemplateColumns: '2fr 1fr 1fr',\r\n // justifyContent: 'start',\r\n },\r\n },\r\n },\r\n addNote: {\r\n position: 'relative',\r\n top: '6px',\r\n },\r\n noteButton: {\r\n position: 'relative',\r\n top: '4px',\r\n },\r\n})\r\n\r\nconst EditWorkplaceNotes: FC = ({ workplace }) => {\r\n const [authProfile] = useAtom(profileAtom)\r\n const [showImitatorModal, setShowImitatorModal] = useState(false)\r\n const [notes, setNotes] = useState([])\r\n const [isOpen, setIsOpen] = useState(false)\r\n const [viewState, setViewState] = useState('default')\r\n const [loading, setLoading] = useState(true)\r\n const [editNote, setEditNote] = useState(undefined)\r\n const classes = useStyles()\r\n\r\n const init = (): void => {\r\n async function fetchData(): Promise {\r\n const response = await getMemberNotes(\r\n workplace.number,\r\n 'ArbejdsstedNr'\r\n )\r\n const notesMapped = mapNotes(response.Noter)\r\n\r\n setNotes(notesMapped)\r\n\r\n setLoading(false)\r\n }\r\n\r\n fetchData()\r\n }\r\n\r\n const onClickDelete = async (note: Note): Promise => {\r\n setViewState('default')\r\n const response = await deleteNote(note.id)\r\n if (response) {\r\n setViewState('default')\r\n if (notes.length === 1) {\r\n setIsOpen(false)\r\n }\r\n init()\r\n }\r\n }\r\n\r\n useEffect(() => {\r\n if (isOpen) {\r\n init()\r\n }\r\n }, [isOpen])\r\n\r\n // if (loading) return null\r\n\r\n return (\r\n <>\r\n
    \r\n {\r\n if (!authProfile.isImitator) {\r\n setIsOpen(true)\r\n if (workplace.numberOfNotes > 0) {\r\n setViewState('default')\r\n } else {\r\n setViewState('create')\r\n }\r\n } else {\r\n setShowImitatorModal(true)\r\n }\r\n }}\r\n >\r\n {workplace.numberOfNotes > 0 ? 'Vis noter' : 'Tilføj note'}\r\n \r\n
    \r\n {\r\n if (authProfile.isImitator) {\r\n setShowImitatorModal(true)\r\n } else if (notes.length > 0) {\r\n setIsOpen(true)\r\n setViewState('default')\r\n }\r\n }}\r\n >\r\n {workplace.numberOfNotes}\r\n \r\n
    \r\n\r\n {\r\n if (authProfile.isImitator) {\r\n setShowImitatorModal(true)\r\n } else {\r\n setIsOpen(true)\r\n setViewState('create')\r\n }\r\n }}\r\n >\r\n
    \r\n \r\n
    \r\n \r\n
    \r\n\r\n {\r\n setIsOpen(false)\r\n }}\r\n >\r\n \r\n\r\n {viewState === 'create' ? (\r\n 0}\r\n type=\"workplace\"\r\n onClickCancel={() => {\r\n setViewState('default')\r\n if (notes.length === 0) {\r\n setIsOpen(false)\r\n }\r\n }}\r\n onUpdated={() => {\r\n setViewState('default')\r\n init()\r\n }}\r\n />\r\n ) : null}\r\n\r\n {viewState === 'edit' && editNote ? (\r\n setViewState('default')}\r\n onUpdated={() => {\r\n init()\r\n setViewState('default')\r\n }}\r\n />\r\n ) : null}\r\n\r\n {viewState === 'default' ? (\r\n {\r\n setIsOpen(true)\r\n setEditNote(note)\r\n setViewState('edit')\r\n }}\r\n onClickDelete={onClickDelete}\r\n onClickCreate={() => setViewState('create')}\r\n />\r\n ) : null}\r\n \r\n setShowImitatorModal(false)}\r\n />\r\n \r\n )\r\n}\r\n\r\nexport { EditWorkplaceNotes }\r\n","import React, { FC, useEffect, useState } from 'react'\nimport { createUseStyles } from 'react-jss'\nimport { PinFill } from '../../../assets/icons'\nimport breakpoints from '../../../theme/breakpoints'\nimport { colors } from '../../../theme/palette'\nimport { baseButton, sortPlaceholder } from '../../../theme/reuseables'\nimport { Card, CardCell, Circle, CircleText } from '../../ui/Card'\nimport { Typography } from '../../ui/Typography/Typography'\nimport { Button } from '../../ui/Button/Button'\nimport { Workplace } from '../../../models/Workplace'\nimport { EditWorkplaceNotes } from '../../modules/notes/EditWorkplaceNotes'\nimport { Member } from '../../../models/Member'\nimport { getInitials } from '../../../utils/initials'\nimport { Favorite } from '../../ui/Favorite'\nimport { NoteButton } from '../../ui/NoteButton'\n\nconst useStyles = createUseStyles({\n '@keyframes fadeIn': {\n from: {\n opacity: 0,\n },\n to: {\n opacity: 1,\n },\n },\n container: {\n padding: '0 1.5rem',\n [`@media (min-width: ${breakpoints.Desktop}px)`]: {\n '&': {\n padding: '0',\n },\n },\n },\n headerArea: {\n display: 'flex',\n padding: '.5rem 0',\n minHeight: '5rem',\n },\n headerAreaTop: {\n display: 'flex',\n padding: '1rem 0 .5rem',\n borderBottom: `1px solid ${colors.borderColor}`,\n marginBottom: '1rem',\n },\n topArea: {\n borderBottom: `1px solid ${colors.gray700}`,\n // TODO: remove this when this area has been developed.\n minHeight: '60px',\n },\n headerActions: {\n display: 'flex',\n flexGrow: 1,\n marginLeft: 'auto',\n justifyContent: 'flex-end',\n alignItems: 'flex-start',\n flexShrink: 0,\n },\n sendingEmailSettings: {\n display: 'flex',\n padding: '.5rem 1rem',\n minHeight: '5rem',\n width: '100%',\n backgroundColor: colors.green200,\n color: colors.black,\n justifyContent: 'space-between',\n alignItems: 'center',\n '& span': {\n fontWeight: 700,\n },\n animation: '.5s $fadeIn',\n },\n notes: {\n paddingTop: '20px',\n },\n dialogButtonsContainer: {\n display: 'flex',\n width: '100%',\n justifyContent: 'space-around',\n },\n button: {\n ...baseButton,\n ...{\n cursor: 'pointer',\n },\n },\n modalButtons: {\n display: 'flex',\n },\n modalCheckbox: {\n display: 'flex',\n position: 'absolute',\n right: '20px',\n top: '20px',\n },\n numnerOfNotes: {\n display: 'flex',\n padding: '30px 0 90px',\n justifyContent: 'center',\n alignItems: 'center',\n },\n iconWrapper: {\n position: 'relative',\n },\n noteContent: {\n display: '-webkit-box',\n WebkitLineClamp: '2',\n WebkitBoxOrient: 'vertical',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n },\n noteButton: {\n position: 'relative',\n },\n deleteButtons: {\n top: '0',\n right: '0',\n display: 'flex',\n zIndex: '1',\n position: 'absolute',\n flexWrap: 'wrap',\n transition: 'all .3s ease-in',\n justifyContent: 'end',\n width: '100%',\n height: '100%',\n alignItems: 'center',\n background: 'rgba(255,255,255, .7)',\n },\n sortPlaceholder: {\n ...sortPlaceholder,\n },\n googleLink: {\n marginLeft: 'auto',\n },\n showMembers: {\n display: 'flex',\n },\n link: {\n fontWeight: '400',\n fontSize: '16px',\n textDecoration: 'underline',\n color: colors.black,\n '&:visited, &:active, &:focus': {\n color: colors.black,\n },\n '&:hover': {\n color: colors.green500,\n },\n },\n numberOfMembers: {\n fontSize: '16px',\n color: colors.black,\n marginRight: '20px',\n },\n contentMobile: {\n padding: '20px',\n },\n searchField: {\n width: '100%',\n marginRight: '20px',\n [`@media (min-width: ${breakpoints.Desktop}px)`]: {\n '&': {\n width: 'auto',\n minWidth: '425px',\n marginRight: '20px',\n },\n },\n },\n})\n\nconst gridTemplateColumns = '23% 20% auto 230px'\nconst gridTemplateColumnsMembers = '8% 92%'\n\ntype WorkplaceCardCellProps = {\n wp: Workplace\n allMembers: Member[]\n}\n\nconst WorkplaceCardCell: FC = ({ wp, allMembers }) => {\n const classes = useStyles()\n const [membersForWorkplace, setMembersForWorkplace] = useState()\n const [open, setOpen] = useState(false)\n\n const onClickMapLink = (workplace: Workplace): void => {\n // eslint-disable-next-line max-len\n const link = `https://www.google.com/maps/search/?api=1&query=${workplace.address.addressLine1}+${workplace.address.addressLine2}+${workplace.address.addressLine3}%2C+${workplace.address.postNumber}+${workplace.address.postDistrict}`\n\n window.open(link, '_blank')\n }\n\n useEffect(() => {\n let numberOfMembers = []\n\n wp.trMemberList.forEach((item) => {\n numberOfMembers = [...numberOfMembers, ...item.Medlemsidenter]\n })\n\n const wpMembersIdents = Array.from(new Set(numberOfMembers))\n const wpMembers: Member[] = []\n wpMembersIdents.forEach((item) => {\n const found = allMembers.find((m) => m.memberId === item)\n\n if (found) {\n wpMembers.push(found)\n }\n })\n\n setMembersForWorkplace(wpMembers)\n }, [wp])\n return (\n \n \n \n Medlemmer på arbejdssted:\n \n
    \n\n {membersForWorkplace\n ? membersForWorkplace.map((member) => {\n return (\n <>\n \n \n \n \n \n {getInitials(\n member.fullName\n )}\n \n \n \n
    \n \n \n \n \n {member.fullName}\n \n \n {\n console.log(\n 'click'\n )\n }}\n >\n {member.numberOfNotes}\n \n
    \n
    \n \n \n \n )\n })\n : null}\n \n }\n >\n \n {wp.name}\n \n \n
    \n
    \n {membersForWorkplace && membersForWorkplace.length}{' '}\n
    \n\n {membersForWorkplace && membersForWorkplace.length ? (\n setOpen(!open)}\n >\n {!open ? 'Vis medlemmer' : 'Skjul medlemmer'}\n \n ) : null}\n
    \n
    \n \n
    \n \n {wp.address.addressLine1}, {wp.address.postNumber}{' '}\n {wp.address.postDistrict}\n \n onClickMapLink(wp)}\n >\n
    \n \n Vis vej\n \n \n
    \n \n
    \n
    \n \n \n \n \n )\n}\n\nexport { WorkplaceCardCell }\n","import React, { FC, useEffect, useState } from 'react'\r\nimport { createUseStyles } from 'react-jss'\r\nimport { useAtom } from 'jotai'\r\nimport { Link } from 'react-router-dom'\r\nimport { PinFill } from '../../../assets/icons'\r\nimport useSortMembersList from '../../../hooks/useSortMembersList'\r\nimport breakpoints from '../../../theme/breakpoints'\r\nimport { colors } from '../../../theme/palette'\r\nimport { baseButton, sortPlaceholder } from '../../../theme/reuseables'\r\nimport { membersAtom, getMemberWorkPlaces } from '../../../api/members/members'\r\n\r\nimport {\r\n Card,\r\n CardCell,\r\n CardContentMobile,\r\n CardHeader,\r\n CardHeaderCell,\r\n CardList,\r\n CardMobile,\r\n} from '../../ui/Card'\r\nimport { SortButton } from '../../ui/SortButton'\r\nimport { Typography } from '../../ui/Typography/Typography'\r\nimport {\r\n workplacesPageAtom,\r\n allWorkplaces,\r\n filterSelected,\r\n searchWorkplaceAtom,\r\n} from '../../../store/filter/filterAtom'\r\nimport { Button } from '../../ui/Button/Button'\r\nimport { Workplace } from '../../../models/Workplace'\r\n\r\nimport { NoteButton } from '../../ui/NoteButton'\r\nimport { EditWorkplaceNotes } from '../../modules/notes/EditWorkplaceNotes'\r\nimport { initialSelectedFilters } from '../../../models/Filter'\r\nimport { HeaderLinks } from '../../modules/Headerlinks'\r\nimport { Spinner } from '../../ui/Loaders/Spinner'\r\nimport { L, L_HTML } from '../../providers/Lokalise'\r\nimport SearchField from '../../ui/SearchField/SearchField'\r\nimport { WorkplaceCardCell } from './WorkplaceCardCell'\r\n\r\nconst useStyles = createUseStyles({\r\n '@keyframes fadeIn': {\r\n from: {\r\n opacity: 0,\r\n },\r\n to: {\r\n opacity: 1,\r\n },\r\n },\r\n container: {\r\n padding: '0 1.5rem',\r\n [`@media (min-width: ${breakpoints.Desktop}px)`]: {\r\n '&': {\r\n padding: '0',\r\n },\r\n },\r\n },\r\n headerArea: {\r\n display: 'flex',\r\n padding: '.5rem 0',\r\n minHeight: '5rem',\r\n },\r\n headerAreaTop: {\r\n display: 'flex',\r\n padding: '1rem 0 .5rem',\r\n borderBottom: `1px solid ${colors.borderColor}`,\r\n marginBottom: '1rem',\r\n },\r\n topArea: {\r\n borderBottom: `1px solid ${colors.gray700}`,\r\n // TODO: remove this when this area has been developed.\r\n minHeight: '60px',\r\n },\r\n headerActions: {\r\n display: 'flex',\r\n flexGrow: 1,\r\n marginLeft: 'auto',\r\n justifyContent: 'flex-end',\r\n alignItems: 'flex-start',\r\n flexShrink: 0,\r\n },\r\n sendingEmailSettings: {\r\n display: 'flex',\r\n padding: '.5rem 1rem',\r\n minHeight: '5rem',\r\n width: '100%',\r\n backgroundColor: colors.green200,\r\n color: colors.black,\r\n justifyContent: 'space-between',\r\n alignItems: 'center',\r\n '& span': {\r\n fontWeight: 700,\r\n },\r\n animation: '.5s $fadeIn',\r\n },\r\n notes: {\r\n paddingTop: '20px',\r\n },\r\n dialogButtonsContainer: {\r\n display: 'flex',\r\n width: '100%',\r\n justifyContent: 'space-around',\r\n },\r\n button: {\r\n ...baseButton,\r\n ...{\r\n cursor: 'pointer',\r\n },\r\n },\r\n modalButtons: {\r\n display: 'flex',\r\n },\r\n modalCheckbox: {\r\n display: 'flex',\r\n position: 'absolute',\r\n right: '20px',\r\n top: '20px',\r\n },\r\n numnerOfNotes: {\r\n display: 'flex',\r\n padding: '30px 0 90px',\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n },\r\n iconWrapper: {\r\n position: 'relative',\r\n },\r\n noteContent: {\r\n display: '-webkit-box',\r\n WebkitLineClamp: '2',\r\n WebkitBoxOrient: 'vertical',\r\n overflow: 'hidden',\r\n textOverflow: 'ellipsis',\r\n },\r\n deleteButtons: {\r\n top: '0',\r\n right: '0',\r\n display: 'flex',\r\n zIndex: '1',\r\n position: 'absolute',\r\n flexWrap: 'wrap',\r\n transition: 'all .3s ease-in',\r\n justifyContent: 'end',\r\n width: '100%',\r\n height: '100%',\r\n alignItems: 'center',\r\n background: 'rgba(255,255,255, .7)',\r\n },\r\n sortPlaceholder: {\r\n ...sortPlaceholder,\r\n },\r\n googleLink: {\r\n marginLeft: 'auto',\r\n },\r\n showMembers: {\r\n display: 'flex',\r\n },\r\n link: {\r\n fontWeight: '400',\r\n fontSize: '16px',\r\n textDecoration: 'underline',\r\n color: colors.black,\r\n '&:visited, &:active, &:focus': {\r\n color: colors.black,\r\n },\r\n '&:hover': {\r\n color: colors.green500,\r\n },\r\n },\r\n numberOfMembers: {\r\n fontSize: '16px',\r\n color: colors.black,\r\n marginRight: '20px',\r\n },\r\n contentMobile: {\r\n padding: '20px',\r\n },\r\n searchField: {\r\n width: '100%',\r\n marginRight: '20px',\r\n [`@media (min-width: ${breakpoints.Desktop}px)`]: {\r\n '&': {\r\n width: 'auto',\r\n minWidth: '425px',\r\n marginRight: '20px',\r\n },\r\n },\r\n },\r\n})\r\n\r\nconst gridTemplateColumns = '23% 20% auto 230px'\r\n\r\nconst Workplaces: FC = () => {\r\n const [loading, setLoading] = useState(true)\r\n const classes = useStyles()\r\n const { setSort, sortState } = useSortMembersList()\r\n const [sortedWorkplaces] = useAtom(workplacesPageAtom)\r\n const [, setSearchAtom] = useAtom(searchWorkplaceAtom)\r\n const [, setAllWorkplaces] = useAtom(allWorkplaces)\r\n const [, setFilterSelected] = useAtom(filterSelected)\r\n const [membersData] = useAtom(membersAtom)\r\n\r\n const init = (): void => {\r\n async function fetchData(): Promise {\r\n setSort('name')\r\n const res = await getMemberWorkPlaces()\r\n setAllWorkplaces(res.workplaces)\r\n\r\n setLoading(false)\r\n }\r\n\r\n fetchData()\r\n }\r\n\r\n useEffect(() => {\r\n if (!sortState) {\r\n setSort('date')\r\n }\r\n init()\r\n\r\n return () => {\r\n setFilterSelected(initialSelectedFilters)\r\n }\r\n }, [])\r\n\r\n const getNumberOfMembers = (workPlace: Workplace): number => {\r\n let numberOfMembers = []\r\n\r\n workPlace.trMemberList.forEach((item) => {\r\n numberOfMembers = [...numberOfMembers, ...item.Medlemsidenter]\r\n })\r\n\r\n const members = Array.from(new Set(numberOfMembers))\r\n\r\n return members.length\r\n }\r\n\r\n const onClickMapLink = (wp: Workplace): void => {\r\n // eslint-disable-next-line max-len\r\n const link = `https://www.google.com/maps/search/?api=1&query=${wp.address.addressLine1}+${wp.address.addressLine2}+${wp.address.addressLine3}%2C+${wp.address.postNumber}+${wp.address.postDistrict}`\r\n\r\n window.open(link, '_blank')\r\n }\r\n\r\n const onSearch = (search: string): void => {\r\n setSearchAtom(search)\r\n }\r\n\r\n const useSearch = (search: string): void => {\r\n setSearchAtom(search)\r\n }\r\n\r\n if (loading) return \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 Mine arbejdssteder\r\n \r\n
    \r\n
    \r\n
    \r\n \r\n {L_HTML('MINEARBEJDSSTEDER_ARKIVEREDE_OVERSKRIFT_TEXT')}\r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n {sortedWorkplaces && sortedWorkplaces.length ? (\r\n \r\n \r\n \r\n setSort('name')}\r\n sort={sortState}\r\n name=\"name\"\r\n >\r\n Arbejdssted\r\n \r\n \r\n \r\n setSort('numberOfMembers')}\r\n sort={sortState}\r\n name=\"numberOfMembers\"\r\n >\r\n Medlemmer\r\n \r\n \r\n \r\n
    \r\n Adresse\r\n
    \r\n
    \r\n \r\n setSort('notes')}\r\n sort={sortState}\r\n name=\"notes\"\r\n >\r\n \r\n Noter\r\n \r\n \r\n \r\n
    \r\n {sortedWorkplaces.map((wp) => (\r\n
    \r\n \r\n
    \r\n \r\n \r\n {wp.name}\r\n \r\n \r\n \r\n {wp.address.addressLine1},{' '}\r\n {wp.address.postNumber}{' '}\r\n {wp.address.postDistrict}\r\n \r\n \r\n \r\n onClickMapLink(wp)\r\n }\r\n >\r\n \r\n \r\n Vis vej\r\n \r\n \r\n
    \r\n \r\n \r\n \r\n
    \r\n \r\n \r\n
    \r\n ))}\r\n \r\n ) : null}\r\n
    \r\n
    \r\n \r\n Viser {sortedWorkplaces.length} arbejdssteder\r\n \r\n
    \r\n
    \r\n )\r\n}\r\n\r\nexport { Workplaces }\r\n","/* eslint-disable react/require-default-props */\r\nimport React from 'react'\r\nimport { createUseStyles, useTheme } from 'react-jss'\r\nimport { colors } from '../../../theme/palette'\r\nimport { useWindowResize } from '../../../hooks/useWindowSize'\r\nimport breakpoints from '../../../theme/breakpoints'\r\nimport { CircleIcon, Circle, CircleImage } from '../Circle/Circle'\r\nimport { Typography } from '../Typography/Typography'\r\n\r\ntype RuleNames = 'column' | 'titleContainer' | 'rowContainer' | 'hr'\r\n\r\ninterface StyleProps {\r\n gridTemplateColumns?: string\r\n iconWidth?: string\r\n}\r\n\r\nexport type Row = {\r\n label: string\r\n value: string | number\r\n profilePicture?: {\r\n content: string\r\n mimeType: string\r\n }\r\n useContent?: boolean\r\n content?: JSX.Element\r\n mailToLinkIcon?: JSX.Element\r\n}\r\n\r\ntype Props = {\r\n gridTemplateColumns?: string\r\n titleLabel?: string\r\n titleIcon?: JSX.Element\r\n rows?: Row[]\r\n iconWidth?: string\r\n hideTitle?: boolean\r\n}\r\n\r\nconst useStyles = createUseStyles(() => ({\r\n column: ({ gridTemplateColumns }) => {\r\n return {\r\n backgroundColor: colors.white,\r\n width: '100%',\r\n gridTemplateColumns,\r\n borderRadius: '.5rem',\r\n height: 'fit-content',\r\n marginBottom: '20px',\r\n minWidth: 0,\r\n }\r\n },\r\n titleContainer: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'flex-start',\r\n padding: '1rem',\r\n },\r\n rowContainer: {\r\n padding: '.75rem 1rem .75rem 1rem',\r\n display: 'flex',\r\n justifyContent: 'space-between',\r\n alignItems: 'center',\r\n wordBreak: 'break-word',\r\n\r\n '& a': {\r\n display: 'inline-flex',\r\n },\r\n },\r\n hr: {\r\n opacity: '.4',\r\n margin: '0',\r\n },\r\n}))\r\n\r\n// TODO add possibility to have a tooltip - ? icon\r\nconst CardColumn: React.FC = ({\r\n gridTemplateColumns,\r\n titleIcon,\r\n titleLabel,\r\n iconWidth,\r\n hideTitle,\r\n rows = [\r\n {\r\n label: '',\r\n value: '',\r\n profilePicture: {\r\n content: null,\r\n mimeType: null,\r\n },\r\n mailToLinkIcon: null,\r\n },\r\n ],\r\n}) => {\r\n const windowSize = useWindowResize()\r\n const theme = useTheme()\r\n const classes = useStyles({ ...{ gridTemplateColumns }, theme })\r\n return (\r\n
    \r\n {!hideTitle ? (\r\n
    \r\n \r\n \r\n {titleIcon}\r\n \r\n \r\n\r\n \r\n {titleLabel}\r\n \r\n
    \r\n ) : null}\r\n {rows.map((row, index) => {\r\n if (row.label.length === 0 && !row.useContent) {\r\n return <>\r\n }\r\n\r\n if (row.useContent && row.content) {\r\n return (\r\n <>\r\n
    \r\n
    \r\n {row.content}\r\n
    \r\n \r\n )\r\n }\r\n\r\n return (\r\n <>\r\n {!hideTitle || (hideTitle && index !== 0) ? (\r\n
    \r\n ) : null}\r\n
    \r\n <>\r\n {row?.profilePicture?.content &&\r\n row?.profilePicture?.mimeType && (\r\n \r\n )}\r\n \r\n
    \r\n \r\n {row.label}\r\n \r\n \r\n {row.value}\r\n \r\n
    \r\n {row?.mailToLinkIcon && row.mailToLinkIcon}\r\n
    \r\n \r\n )\r\n })}\r\n
    \r\n )\r\n}\r\n\r\nexport { CardColumn }\r\n","/* eslint-disable react/require-default-props */\r\nimport React from 'react'\r\nimport { createUseStyles, useTheme } from 'react-jss'\r\nimport { useWindowResize } from '../../../hooks/useWindowSize'\r\nimport breakpoints from '../../../theme/breakpoints'\r\n\r\ntype RuleNames = 'container'\r\n\r\ninterface StyleProps {\r\n gridTemplateColumns?: string\r\n}\r\n\r\ntype Props = {\r\n gridTemplateColumns?: string\r\n}\r\n\r\nconst useStyles = createUseStyles(() => ({\r\n container: {\r\n width: '100%',\r\n display: 'grid',\r\n gridGap: '1.5rem',\r\n [`@media (min-width: ${breakpoints.Desktop}px)`]: {\r\n '&': {\r\n gridTemplateColumns: '1fr 1fr 1fr',\r\n },\r\n },\r\n },\r\n}))\r\n\r\nconst CardColumnContainer: React.FC = ({\r\n gridTemplateColumns,\r\n children,\r\n}) => {\r\n const windowSize = useWindowResize()\r\n const theme = useTheme()\r\n const classes = useStyles({ ...{ gridTemplateColumns }, theme })\r\n\r\n // if (windowSize.width >= breakpoints.Desktop) {\r\n // return
    {children}
    \r\n // }\r\n\r\n return
    {children}
    \r\n}\r\n\r\nexport { CardColumnContainer }\r\n","import React, { FC, useState } from 'react'\r\nimport { createUseStyles } from 'react-jss'\r\nimport { useForm } from 'react-hook-form'\r\nimport { useAtom } from 'jotai'\r\nimport { Button } from '../../ui/Button/Button'\r\nimport {\r\n ContactLedger,\r\n Edit,\r\n PersonalInfo,\r\n LockFill,\r\n CheckFill,\r\n SuitcaseFill,\r\n} from '../../../assets/icons'\r\nimport { Circle } from '../../ui/Card'\r\nimport { CircleIcon } from '../../ui/Circle/Circle'\r\nimport { Typography } from '../../ui/Typography/Typography'\r\nimport { Input } from '../../ui/FormElememts/stories/Input.stories'\r\nimport { colors } from '../../../theme/palette'\r\nimport { formatDate } from '../../../utils/format'\r\nimport { FormInput, FormInputNumber } from '../FormElements/FormInput'\r\nimport { FormControl } from '../../ui/FormElememts/FormControl'\r\nimport { FormHeader } from '../../ui/FormElememts/FormHeader'\r\nimport { baseButton } from '../../../theme/reuseables'\r\nimport { Overlay } from '../../ui/Sidebar'\r\nimport { Dialog } from '../../ui/Dialog/Dialog'\r\nimport { DrawerHeaderMemberInfo } from '../FormElements/DrawerHeader'\r\nimport { Profile } from '../../../models/Profile'\r\nimport {\r\n getProfileAtom,\r\n updateProfile,\r\n profileAtom,\r\n} from '../../../api/profile/profile'\r\nimport { FormMessage } from '../../ui/FormElememts/FormMessage'\r\nimport { L, L_HTML } from '../../providers/Lokalise'\r\nimport { ImitatorNoAccessWarning } from '../Imitator/ImitatorNoAccessWarning'\r\n\r\ninterface EditProps {\r\n profile: Profile\r\n}\r\n\r\nconst useStyles = createUseStyles({\r\n contentWrapper: {\r\n padding: '100px 20px 20px',\r\n overflow: 'auto',\r\n height: '100%',\r\n paddingBottom: '80px',\r\n },\r\n accordionWrapper: {\r\n marginBottom: '20px',\r\n },\r\n select: {\r\n position: 'relative',\r\n height: '3.125rem',\r\n backgroundColor: colors.white,\r\n border: `1px solid ${colors.borderColor}`,\r\n borderRadius: '6px',\r\n width: '100%',\r\n fontSize: '1.125rem',\r\n paddingLeft: '.75rem',\r\n paddingRight: '.75rem',\r\n cursor: 'pointer',\r\n color: colors.labelColor,\r\n },\r\n button: {\r\n ...baseButton,\r\n ...{\r\n cursor: 'pointer',\r\n },\r\n },\r\n bottom: {\r\n display: 'flex',\r\n position: 'absolute',\r\n bottom: '0',\r\n width: '100%',\r\n padding: '20px',\r\n left: '0',\r\n background: colors.white,\r\n zIndex: 4,\r\n borderTop: `1px solid ${colors.borderColor}`,\r\n '& > button': {\r\n flexGrow: 1,\r\n },\r\n '& > button:last-of-type': {\r\n marginRight: '0',\r\n },\r\n },\r\n})\r\n\r\nexport type RegistrationFormFields = {\r\n KontaktTR: {\r\n Mobil: string\r\n Email: string\r\n }\r\n TotalAntalKollegaerBrugerDaekker: number\r\n}\r\n\r\nexport interface IUpdateMyProfileData {\r\n KontaktTR?: {\r\n Mobil?: string\r\n Email?: string\r\n }\r\n TotalAntalKollegaerBrugerDaekker?: number\r\n}\r\n\r\nexport const EditMyProfile: FC = ({ profile }) => {\r\n const { register, handleSubmit, formState, reset } =\r\n useForm()\r\n const classes = useStyles()\r\n const [isOpen, setIsOpen] = useState(false)\r\n const [showDialog, setShowDialog] = useState(false)\r\n const [, update] = useAtom(getProfileAtom)\r\n const { isDirty, dirtyFields, errors } = formState\r\n const [authProfile] = useAtom(profileAtom)\r\n const [showImitatorModal, setShowImitatorModal] = useState(false)\r\n\r\n const resetForm = (): void => {\r\n reset()\r\n }\r\n\r\n const onSubmit = async (data: RegistrationFormFields): Promise => {\r\n if (authProfile.isImitator) {\r\n setShowImitatorModal(true)\r\n return\r\n }\r\n\r\n if (Object.keys(dirtyFields).length) {\r\n const fieldsToEdit: IUpdateMyProfileData = {}\r\n\r\n if (dirtyFields.KontaktTR) {\r\n fieldsToEdit.KontaktTR = {}\r\n if (\r\n dirtyFields.KontaktTR.Mobil &&\r\n data.KontaktTR.Mobil !== ''\r\n ) {\r\n fieldsToEdit.KontaktTR.Mobil = data.KontaktTR.Mobil\r\n }\r\n if (\r\n dirtyFields.KontaktTR.Email &&\r\n data.KontaktTR.Email !== ''\r\n ) {\r\n fieldsToEdit.KontaktTR.Email = data.KontaktTR.Email\r\n }\r\n }\r\n\r\n try {\r\n const response = updateProfile(fieldsToEdit)\r\n if (response) {\r\n update({ type: 'refetch' })\r\n setIsOpen(false)\r\n setShowDialog(true)\r\n resetForm()\r\n }\r\n } catch (err) {\r\n console.log('fetch failed', err)\r\n }\r\n }\r\n }\r\n\r\n return (\r\n <>\r\n setIsOpen(true)}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n \r\n {L('TRPROFIL_DETALJE_REDIGERMEDLEM_KNAP')}\r\n \r\n \r\n {\r\n reset()\r\n setIsOpen(false)\r\n }}\r\n >\r\n \r\n \r\n \r\n {L('TR-PROFIL_REDIGER_DATA_OVERSKRIFT')}\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Kontakt\r\n \r\n \r\n \r\n \r\n value.length > 7 ||\r\n !value ||\r\n L('GENERISK_FORM_MOBIL_VALIDERINGS_TEKST'),\r\n }}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n
    \r\n {\r\n setIsOpen(false)\r\n reset()\r\n }}\r\n type=\"secondary\"\r\n size=\"large\"\r\n >\r\n Luk\r\n \r\n \r\n {L('TR-PROFIL_REDIGER_DATA_INDSEND_KNAP')}\r\n \r\n
    \r\n\r\n
    \r\n \r\n \r\n {showDialog ? (\r\n }\r\n >\r\n \r\n {L_HTML('EGEN-PROFIL-REDIGER_POPUP_OVERSKRIFT')}\r\n \r\n \r\n {L_HTML('EGEN-PROFIL-REDIGER_POPUP_TEXT')}\r\n \r\n \r\n \r\n ) : null}\r\n setShowImitatorModal(false)}\r\n />\r\n \r\n )\r\n}\r\n","import React, { useState, useEffect } from 'react'\r\nimport { createUseStyles } from 'react-jss'\r\nimport { useInView } from 'react-intersection-observer'\r\nimport CountUp from 'react-countup'\r\nimport { colors } from '../../../theme/palette'\r\nimport { Typography } from '../Typography/Typography'\r\n\r\ninterface PercentCircleProps {\r\n size: number\r\n strokeWidth: number\r\n percentage: number\r\n}\r\n\r\nconst useStyles = createUseStyles({\r\n container: {\r\n position: 'relative',\r\n backgroundColor: colors.green500,\r\n borderRadius: '.5rem',\r\n display: 'flex',\r\n height: 'fit-content',\r\n flexDirection: 'column',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n padding: '2rem',\r\n textAlign: 'center',\r\n },\r\n svgContainer: {\r\n padding: '2rem',\r\n },\r\n text: {\r\n position: 'absolute',\r\n top: '50%',\r\n left: '50%',\r\n transform: 'translate(-50%, -50%)',\r\n color: colors.white,\r\n },\r\n percentage: {\r\n fontWeight: 700,\r\n },\r\n})\r\n\r\nconst PercentCircle: React.FC = ({\r\n size,\r\n strokeWidth,\r\n percentage,\r\n}) => {\r\n const classes = useStyles()\r\n const [progress, setProgress] = useState(0)\r\n const { ref, inView } = useInView()\r\n\r\n useEffect(() => {\r\n if (inView) {\r\n setProgress(percentage)\r\n } else {\r\n setProgress(0)\r\n }\r\n }, [inView, percentage])\r\n\r\n const viewBox = `0 0 ${size} ${size}`\r\n const radius = (size - strokeWidth) / 2\r\n const circumference = radius * Math.PI * 2\r\n const dash = (progress * circumference) / 100\r\n\r\n return (\r\n
    \r\n {/* \r\n Organiseringsprocent\r\n */}\r\n
    \r\n \r\n \r\n \r\n \r\n
    \r\n \r\n {inView && (\r\n <>\r\n \r\n %\r\n \r\n )}\r\n \r\n
    \r\n
    \r\n {/* \r\n \r\n {inView && (\r\n <>\r\n \r\n %\r\n \r\n )}\r\n {' '}\r\n af dine kollegaer er organiseret\r\n */}\r\n
    \r\n )\r\n}\r\n\r\nexport { PercentCircle }\r\n","export default __webpack_public_path__ + \"static/media/gmapsBgImage.08e42bea.png\";","import React from 'react'\r\nimport { createUseStyles } from 'react-jss'\r\nimport GmapsImage from '../../../assets/img/gmapsBgImage.png'\r\nimport { L } from '../../providers/Lokalise'\r\nimport { ButtonLink } from '../Button/Button'\r\n\r\ninterface Props {\r\n customedGmapsUrl: string\r\n}\r\n\r\nconst useStyles = createUseStyles(() => ({\r\n gmapsContainer: {\r\n position: 'relative',\r\n },\r\n gmapsImage: {\r\n objectFit: 'cover',\r\n width: '100%',\r\n height: '100%',\r\n },\r\n gmapsButton: {\r\n position: 'absolute',\r\n bottom: '.75rem',\r\n right: '.75rem',\r\n },\r\n}))\r\n\r\nconst GmapsLink: React.FC = ({ customedGmapsUrl }) => {\r\n const classes = useStyles()\r\n return (\r\n
    \r\n \r\n
    \r\n \r\n {L('GENERISK_VISVEJ_KNAP')}\r\n \r\n
    \r\n
    \r\n )\r\n}\r\n\r\nexport { GmapsLink }\r\n","import React, { FC, useState } from 'react'\r\nimport { createUseStyles } from 'react-jss'\r\nimport { Check, ChevronLeft, SuitcaseFill } from '../../../assets/icons'\r\nimport { Member } from '../../../models/Member'\r\nimport { Profile } from '../../../models/Profile'\r\nimport { Workplace } from '../../../models/Workplace'\r\nimport { colors } from '../../../theme/palette'\r\nimport { buildRow } from '../../pages/MyProfile'\r\nimport { L, L_HTML } from '../../providers/Lokalise'\r\nimport { Button } from '../../ui/Button/Button'\r\nimport { Circle } from '../../ui/Card'\r\nimport { Row } from '../../ui/Card/CardColumn'\r\nimport { CircleIcon } from '../../ui/Circle/Circle'\r\nimport { GmapsLink } from '../../ui/GmapsLink/GmapsLink'\r\nimport { Typography } from '../../ui/Typography/Typography'\r\n\r\ninterface WorkPlaceProps {\r\n selectedWorkplace: Workplace\r\n setSelectedWorkplace: (workplace: Workplace) => void\r\n workplaces: Workplace[]\r\n profile: Profile | Member\r\n beforContent?: JSX.Element\r\n afterContent?: JSX.Element\r\n showHo?: boolean\r\n}\r\n\r\nconst useStyles = createUseStyles({\r\n column: {\r\n backgroundColor: colors.white,\r\n width: '100%',\r\n borderRadius: '.5rem',\r\n height: 'fit-content',\r\n marginBottom: '20px',\r\n },\r\n titleContainer: {\r\n position: 'relative',\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'flex-start',\r\n padding: '1rem',\r\n },\r\n rowContainer: {\r\n padding: '.75rem 1rem .75rem 1rem',\r\n display: 'flex',\r\n justifyContent: 'space-between',\r\n alignItems: 'center',\r\n\r\n '& a': {\r\n display: 'inline-flex',\r\n },\r\n },\r\n hr: {\r\n opacity: '.4',\r\n margin: '0',\r\n },\r\n dropdownIcon: {\r\n transform: 'rotate(90deg)',\r\n position: 'absolute',\r\n right: '27px',\r\n top: '29px',\r\n transition: 'all .15s',\r\n '&.active': {\r\n transform: 'rotate(-90deg)',\r\n },\r\n },\r\n dropdownItem: {\r\n position: 'relative',\r\n display: 'flex',\r\n border: 'none',\r\n padding: '0 0 10px',\r\n },\r\n dropdownItems: {\r\n width: '100%',\r\n // display: 'flex',\r\n flexDirection: 'column',\r\n padding: '10px 20px 20px 22px',\r\n display: 'none',\r\n height: 0,\r\n transition: 'height .15s',\r\n '&.active': {\r\n display: 'flex',\r\n height: 'auto',\r\n },\r\n },\r\n check: {\r\n position: 'relative',\r\n marginLeft: '5px',\r\n top: '-1px',\r\n },\r\n})\r\n\r\nconst WorkplaceDropdown: FC = ({\r\n workplaces,\r\n selectedWorkplace,\r\n setSelectedWorkplace,\r\n profile,\r\n beforContent,\r\n afterContent,\r\n showHo,\r\n}) => {\r\n const classes = useStyles()\r\n const [isOpen, setIsOpen] = useState(false)\r\n\r\n const getPositionName = (\r\n workPlace: Workplace,\r\n member: Profile | Member\r\n ): string => {\r\n const id = workPlace.postionNumber\r\n const group = member.positions.find((pos) => +pos.id === +id)\r\n return group.name || '-'\r\n }\r\n\r\n const getGroupName = (member: Profile | Member): string => {\r\n const id = member.primaryWorkPlace.postionNumber\r\n const group = member.positions.find((pos) => +pos.id === +id)\r\n return group.group.name || '-'\r\n }\r\n\r\n const getPositionInfoRows = (workplace: Workplace): Row[] => {\r\n return [\r\n buildRow(\r\n getPositionName(workplace, profile),\r\n L('GENERISK_FORM_STILLING_LABEL')\r\n ),\r\n buildRow(workplace?.hoursPerWeek, L('GENERISK_FORM_TIMETAL_LABEL')),\r\n buildRow(getGroupName(profile), L('GENERISK_FORM_FAGGRUPPE_LABEL')),\r\n ]\r\n }\r\n\r\n let customedGmapsUrl = ''\r\n if (selectedWorkplace?.address) {\r\n const {\r\n addressLine1,\r\n addressLine2,\r\n addressLine3,\r\n postDistrict,\r\n postNumber,\r\n } = selectedWorkplace?.address\r\n customedGmapsUrl = `https://www.google.com/maps/search/?api=1&query=${addressLine1}+${addressLine2}+${addressLine3}%2C+${postNumber}+${postDistrict}`\r\n }\r\n\r\n return (\r\n
    \r\n 1 ? 'pointer' : 'auto',\r\n }}\r\n onClick={() => {\r\n if (workplaces.length > 1) {\r\n setIsOpen(!isOpen)\r\n }\r\n }}\r\n >\r\n
    \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n {L_HTML('GENERISK_FORM_ANSÆTTELSE_TITEL')}\r\n \r\n\r\n {workplaces.length > 1 ? (\r\n \r\n \r\n
    \r\n ) : null}\r\n
    \r\n \r\n\r\n {workplaces.length > 1 ? (\r\n \r\n {workplaces.map((w) => {\r\n return (\r\n {\r\n setIsOpen(false)\r\n setSelectedWorkplace(w)\r\n }}\r\n >\r\n
    \r\n \r\n {w.name}\r\n \r\n {selectedWorkplace.number === w.number ? (\r\n
    \r\n \r\n
    \r\n ) : null}\r\n
    \r\n \r\n )\r\n })}\r\n
    \r\n ) : null}\r\n\r\n
    \r\n\r\n {beforContent ? (\r\n
    {beforContent}
    \r\n ) : null}\r\n\r\n <>\r\n
    \r\n \r\n \r\n Arbejdssted\r\n \r\n \r\n {selectedWorkplace.name}\r\n \r\n \r\n
    \r\n \r\n {getPositionInfoRows(selectedWorkplace).map((row) => {\r\n return (\r\n <>\r\n {row.label === 'Timetal' && !showHo ? null : (\r\n <>\r\n
    \r\n
    \r\n
    \r\n \r\n {row.label}\r\n \r\n \r\n {row.value}\r\n \r\n
    \r\n
    \r\n \r\n )}\r\n \r\n )\r\n })}\r\n \r\n\r\n {afterContent ? (\r\n
    {afterContent}
    \r\n ) : null}\r\n \r\n )\r\n}\r\n\r\nexport { WorkplaceDropdown }\r\n","import { useAtom } from 'jotai'\r\nimport React, { useEffect, useState } from 'react'\r\nimport { createUseStyles } from 'react-jss'\r\n\r\nimport { Profile } from '../../../models/Profile'\r\nimport { getInitials } from '../../../utils/initials'\r\n\r\nimport {\r\n getProfileAtom,\r\n profileAtom,\r\n updateProfile,\r\n} from '../../../api/profile/profile'\r\nimport { colors } from '../../../theme/palette'\r\nimport { CircleText, CircleIcon2 } from '../../ui/Circle/Circle'\r\nimport { CardColumn, Row } from '../../ui/Card/CardColumn'\r\nimport { Typography } from '../../ui/Typography/Typography'\r\nimport { baseButton } from '../../../theme/reuseables'\r\nimport {\r\n CheckFill,\r\n Foa,\r\n PersonalInfo,\r\n ContactLedger,\r\n Envelop,\r\n Close,\r\n} from '../../../assets/icons'\r\nimport { CardColumnContainer } from '../../ui/Card/CardColumnContainer'\r\nimport { formatDate } from '../../../utils/format'\r\nimport {\r\n EditMyProfile,\r\n IUpdateMyProfileData,\r\n} from '../../modules/EditMyProfile'\r\nimport { Workplace } from '../../../models/Workplace'\r\nimport { PercentCircle } from '../../ui/PercentLevel/PercentLevel'\r\nimport { TypeOfRepresentative } from '../../../models/TypeOfRepresentative'\r\nimport { L, L_HTML } from '../../providers/Lokalise'\r\nimport { Button } from '../../ui/Button/Button'\r\nimport { Member } from '../../../models/Member'\r\nimport { WorkplaceDropdown } from '../../modules/WorkplaceDropdown'\r\nimport { Input } from '../../ui/FormElememts/Input'\r\nimport breakpoints from '../../../theme/breakpoints'\r\nimport { getSuppleantNamesForTR, isSuppleantFor } from '../../../utils/utils'\r\nimport { ImitatorNoAccessWarning } from '../../modules/Imitator/ImitatorNoAccessWarning'\r\n\r\nconst useStyles = createUseStyles({\r\n container: {\r\n color: colors.black,\r\n padding: '0 1.5rem',\r\n [`@media (min-width: ${breakpoints.Desktop}px)`]: {\r\n '&': {\r\n gridTemplateColumns: '1fr 1fr 1fr',\r\n padding: '0 0 5rem',\r\n },\r\n },\r\n },\r\n profileHeader: {\r\n display: 'flex',\r\n justifyContent: 'space-between',\r\n alignItems: 'center',\r\n padding: '3rem 0',\r\n },\r\n nameContainer: {\r\n display: 'flex',\r\n flexBasis: '50%',\r\n alignItems: 'center',\r\n justifyContent: 'flex-start',\r\n },\r\n edit: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'flex-end',\r\n ...baseButton,\r\n ...{\r\n cursor: 'pointer',\r\n margin: '0',\r\n },\r\n },\r\n section: {\r\n marginBottom: '3rem',\r\n\r\n '& > hr': {\r\n opacity: '0.2',\r\n margin: '1.25rem 0',\r\n },\r\n },\r\n iconWrapper: {\r\n position: 'relative',\r\n width: '90px',\r\n marginRight: '30px',\r\n },\r\n buttons: {\r\n width: '100%',\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n flexDirection: 'column',\r\n '& button': {\r\n margin: '10px 0',\r\n width: '100%',\r\n },\r\n },\r\n editIconWrapper: {\r\n top: '0',\r\n width: '100%',\r\n height: '100%',\r\n position: 'absolute',\r\n display: 'flex',\r\n alignContent: 'center',\r\n justifyContent: 'end',\r\n },\r\n confirmButtons: {\r\n display: 'flex',\r\n zIndex: '1',\r\n position: 'relative',\r\n flexWrap: 'wrap',\r\n transition: 'all .3s ease-in',\r\n justifyContent: 'end',\r\n width: '100%',\r\n height: '100%',\r\n alignItems: 'center',\r\n padding: '20px 0 0',\r\n },\r\n})\r\n\r\nexport const buildRow = (\r\n value: string | number,\r\n label: string,\r\n mailToLinkIcon?: JSX.Element\r\n): Row => {\r\n return {\r\n label,\r\n value,\r\n mailToLinkIcon,\r\n }\r\n}\r\n\r\nconst MyProfile: React.FC = () => {\r\n const classes = useStyles()\r\n const [data, update] = useAtom(getProfileAtom)\r\n const [authProfile] = useAtom(profileAtom)\r\n const [selectedWorkplace, setSelectedWorkplace] = useState<\r\n Workplace | undefined\r\n >(undefined)\r\n const [percentageShowEdit, setPercentageShowEdit] = useState(false)\r\n const [percentageEditValue, setPercentageEditValue] = useState<\r\n number | undefined\r\n >(undefined)\r\n const [percentageOfMembersCovered, setPercentageOfMembersCovered] =\r\n useState(0)\r\n const [showImitatorModal, setShowImitatorModal] = useState(false)\r\n\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n const calcPercentageCovered = (\r\n numberFoaMemberUserCovers: number,\r\n totalNumberOfPeopleUserCovers: number\r\n ): number => {\r\n return (numberFoaMemberUserCovers / totalNumberOfPeopleUserCovers) * 100\r\n }\r\n\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n const calcPercentageCoveredInEditMode = (): number => {\r\n if (percentageEditValue < data.numberFoaMemberUserCovers || 0)\r\n return 100\r\n return (data.numberFoaMemberUserCovers / percentageEditValue) * 100\r\n }\r\n\r\n // TODO add Labels from sitecore\r\n const getPersonalInfoRows = (d: Profile): Row[] => {\r\n return [\r\n buildRow(\r\n formatDate(new Date(d.personalInfo.birthdate)),\r\n L('GENERISK_FORM_FØDSELDAG_LABEL')\r\n ),\r\n buildRow(\r\n d.personalInfo.age ? `${d.personalInfo.age} år` : '-',\r\n L('GENERISK_FORM_ALDER_LABEL')\r\n ),\r\n ]\r\n }\r\n\r\n const getMembershipInfoRows = (d: Profile): Row[] => {\r\n return [\r\n buildRow(d.memberNumber, L('GENERISK_FORM_MEDLEMSNUMMER_LABEL')),\r\n buildRow(\r\n d.membershipInfo.name,\r\n L('GENERISK_FORM_FOAAFDELING_LABEL')\r\n ),\r\n buildRow(\r\n formatDate(new Date(d.membershipInfo.date)),\r\n L('GENERISK_FORM_INDMELDELSESDATO_LABEL')\r\n ),\r\n ]\r\n }\r\n\r\n const getContactInfoRows = (d: Profile): Row[] => {\r\n const noShowMessage = d.privateContact?.isTelefonPrivate\r\n ? 'Hemmeligt nummer'\r\n : '-'\r\n return [\r\n buildRow(\r\n d.privateContact ? d.privateContact.mobileShow : noShowMessage,\r\n L('TRPROFIL_MOBIL_LABEL')\r\n ),\r\n buildRow(\r\n d.privateContact ? d.privateContact.email : 'N/A',\r\n L('TRPROFIL_EMAIL_LABEL'),\r\n d.privateContact && d.privateContact.email && (\r\n \r\n \r\n \r\n )\r\n ),\r\n ]\r\n }\r\n\r\n const getDuties = (member: Member, profile: Profile): string => {\r\n const duties = []\r\n\r\n member.allWorkPlaces.forEach((w) => {\r\n if (w.typeOfRepresentatives && w.typeOfRepresentatives.length) {\r\n w.typeOfRepresentatives.forEach((t) => {\r\n const found = profile.typeOfRepresentatives.find(\r\n (tor) => tor.type === t.supplementedOfDutyType\r\n )\r\n\r\n if (found) {\r\n duties.push(found.name)\r\n }\r\n })\r\n }\r\n })\r\n return [...new Set(duties)].join(',') || ''\r\n }\r\n\r\n const getSuppleantForTRRows = (d: Profile): JSX.Element => {\r\n if (d.trForSelf.length === 1) {\r\n return (\r\n }\r\n titleLabel={L('TRPROFIL_MINE-SUPPLEANTER_TITEL')}\r\n rows={[\r\n buildRow(\r\n d.trForSelf[0].fullName,\r\n L('TRPROFIL_MINE-SUPPLEANTER_NAVN')\r\n ),\r\n buildRow(\r\n getDuties(d.trForSelf[0], d),\r\n L('TRPROFIL_MINE-SUPPLEANTER_TILLIDHVERV')\r\n ),\r\n ]}\r\n key=\"Mine suppleanter\"\r\n />\r\n )\r\n }\r\n\r\n return (\r\n <>\r\n }\r\n titleLabel=\"Mine suppleanter\"\r\n rows={[]}\r\n key=\"Mine suppleanter\"\r\n />\r\n {d.trForSelf.map((tr) => {\r\n return (\r\n }\r\n titleLabel={L('TRPROFIL_HVERV_TITEL')}\r\n rows={[\r\n buildRow(tr.fullName, L('TRPROFIL_HVERV_NAVN')),\r\n buildRow(\r\n getDuties(tr, d),\r\n L('TRPROFIL_HVERV_TILLIDSHVERV')\r\n ),\r\n ]}\r\n key={`${tr.memberId}${tr.memberNumber}`}\r\n />\r\n )\r\n })}\r\n \r\n )\r\n }\r\n\r\n // const getAlternateRepresentativeRows = (d: Profile): JSX.Element => {\r\n // if (d.trForOthers.length === 1) {\r\n // return (\r\n // }\r\n // titleLabel={L('TRPROFIL_SUPPLEANT-FOR_TITEL')}\r\n // rows={[\r\n // buildRow(\r\n // d.trForOthers[0].fullName,\r\n // L('TRPROFIL_SUPPLEANT-FOR_NAVN')\r\n // ),\r\n // buildRow(\r\n // getDuties(d.trForOthers[0], d),\r\n // L('TRPROFIL_SUPPLEANT-FOR_TILLIDSHVERV')\r\n // ),\r\n // ]}\r\n // key=\"Jeg er suppleant for\"\r\n // />\r\n // )\r\n // }\r\n\r\n // return (\r\n // <>\r\n // }\r\n // titleLabel=\"Jeg er suppleant for\"\r\n // rows={[]}\r\n // key=\"Jeg er suppleant for\"\r\n // />\r\n // {d.trForOthers.map((tr) => {\r\n // return (\r\n // }\r\n // titleLabel=\"Hverv\"\r\n // rows={[\r\n // buildRow(tr.fullName, 'Navn'),\r\n // buildRow(getDuties(tr, d), 'Tillidshverv'),\r\n // ]}\r\n // key={`${tr.memberId}${tr.memberNumber}`}\r\n // />\r\n // )\r\n // })}\r\n // \r\n // )\r\n // }\r\n\r\n const getTypeOfRepresentativeRows = (d: TypeOfRepresentative): Row[] => {\r\n const rows = [\r\n buildRow(\r\n // eslint-disable-next-line max-len\r\n `${d?.name}(${d?.shortName})`,\r\n L('GENERISK_FORM_TILLIDSHVERV_LABEL')\r\n ),\r\n buildRow(\r\n d ? formatDate(new Date(d.electedDate)) : 'N/A',\r\n L('GENERISK_FORM_GENVALGSDATO_LABEL')\r\n ),\r\n ]\r\n\r\n if (isSuppleantFor(d.type)) {\r\n rows.push(\r\n buildRow(\r\n getSuppleantNamesForTR(d.type, data),\r\n L('GENERISK_FORM_SUPPLEANT_FOR_LABEL')\r\n )\r\n )\r\n }\r\n\r\n return rows\r\n }\r\n\r\n const buildTor = (tors: TypeOfRepresentative[]): JSX.Element => {\r\n return (\r\n <>\r\n {tors\r\n .sort((a, b) => {\r\n if (a.sort > b.sort) return 1\r\n if (a.sort < b.sort) return -1\r\n return 0\r\n })\r\n .map((tor) => {\r\n return (\r\n }\r\n titleLabel=\"Hverv\"\r\n rows={getTypeOfRepresentativeRows(tor)}\r\n key={`${tor.type}${tor.sort}`}\r\n />\r\n )\r\n })}\r\n \r\n )\r\n }\r\n\r\n useEffect(() => {\r\n setSelectedWorkplace(data.primaryWorkPlace)\r\n }, [])\r\n\r\n useEffect(() => {\r\n setPercentageOfMembersCovered(\r\n data.totalNumberOfPeopleUserCovers !== null\r\n ? calcPercentageCovered(\r\n data.numberFoaMemberUserCovers,\r\n data.totalNumberOfPeopleUserCovers\r\n )\r\n : 0\r\n )\r\n setPercentageShowEdit(false)\r\n\r\n setPercentageEditValue(undefined)\r\n }, [data])\r\n\r\n useEffect(() => {\r\n if (percentageShowEdit) {\r\n setPercentageOfMembersCovered(calcPercentageCoveredInEditMode())\r\n }\r\n }, [\r\n calcPercentageCovered,\r\n calcPercentageCoveredInEditMode,\r\n percentageOfMembersCovered,\r\n percentageShowEdit,\r\n ])\r\n\r\n if (!data) return null\r\n\r\n return (\r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n {getInitials(data.fullName)}\r\n \r\n \r\n
    \r\n \r\n {data.fullName}\r\n \r\n
    \r\n {data ? : null}\r\n
    \r\n
    \r\n {/* \r\n Profil\r\n */}\r\n
    \r\n \r\n
    \r\n }\r\n titleLabel={L(\r\n 'TRPROFIL_DETALJE_PERSONLIGEOPLYSNINGER-TITEL'\r\n )}\r\n rows={getPersonalInfoRows(data)}\r\n key=\"Personlige oplysninger\"\r\n />\r\n }\r\n titleLabel={L(\r\n 'TRPROFIL_DETALJE_FOAMEDLEMSSKAB-TITEL'\r\n )}\r\n rows={getMembershipInfoRows(data)}\r\n key=\"FOA medlemsskab\"\r\n />\r\n
    \r\n {selectedWorkplace ? (\r\n \r\n \r\n {L_HTML(\r\n 'TRPROFIL_BLANKET_RET_PERSONOPL_TEXT'\r\n )}\r\n \r\n \r\n window.open(\r\n // eslint-disable-next-line max-len\r\n process.env\r\n .REACT_APP_LINK_RET_PERSONOPLYSINGER,\r\n '_blank'\r\n )\r\n }\r\n >\r\n {L_HTML(\r\n 'TRPROFIL_BLANKET_RET_PERSONOPL_LABEL'\r\n )}\r\n \r\n
    \r\n }\r\n />\r\n ) : null}\r\n {data.contactInfoList && data.contactInfoList.length ? (\r\n }\r\n titleLabel={L('TRPROFIL_DETALJE_KONTAKT-TITEL')}\r\n rows={getContactInfoRows(data)}\r\n key=\"Kontakt\"\r\n />\r\n ) : null}\r\n \r\n
    \r\n
    \r\n {/* \r\n {L('GENERISK_FORM_TILLIDSHVERV_LABEL')}\r\n */}\r\n
    \r\n \r\n
    \r\n }\r\n titleLabel=\"Hverv\"\r\n rows={[\r\n {\r\n label: '',\r\n value: '',\r\n useContent: true,\r\n content: (\r\n <>\r\n {\r\n \r\n \r\n window.open(\r\n // eslint-disable-next-line max-len\r\n process.env\r\n .REACT_APP_LINK_BLANKET_OPHØR_TRHVERV,\r\n '_blank'\r\n )\r\n }\r\n >\r\n {L_HTML(\r\n 'TRPROFIL_BLANKET_RET_OPHØR-HVERV_LABEL'\r\n )}\r\n \r\n \r\n window.open(\r\n // eslint-disable-next-line max-len\r\n process.env\r\n .REACT_APP_LINK_BLANKET_OPDATER_TRHVERV,\r\n '_blank'\r\n )\r\n }\r\n >\r\n {L_HTML(\r\n 'TRPROFIL_BLANKET_RET_OPDATER-HVERV_LABEL'\r\n )}\r\n \r\n
    \r\n }\r\n \r\n ),\r\n },\r\n ]}\r\n />\r\n {buildTor(data.typeOfRepresentatives)}\r\n
    \r\n\r\n <>\r\n {data.trForSelf.length ? (\r\n
    {getSuppleantForTRRows(data)}
    \r\n ) : null}\r\n {/* {data.trForOthers.length ? (\r\n
    {getAlternateRepresentativeRows(data)}
    \r\n ) : null} */}\r\n {/* {data.trForSelf.length\r\n ? getSuppleantForTRRows(data)\r\n : null} */}\r\n \r\n }\r\n titleLabel={L(\r\n 'TRPROFIL_ORGANISERINGSWIDGET_OVERSKRIFT'\r\n )}\r\n rows={[\r\n {\r\n label: '',\r\n value: '',\r\n useContent: true,\r\n content: (\r\n
    \r\n \r\n {L(\r\n 'TRPROFIL_ORGANISERINGSWIDGET_TEKST_1'\r\n )}\r\n \r\n <>\r\n {\r\n \r\n {!percentageShowEdit ? (\r\n <>\r\n \r\n \r\n {\r\n if (\r\n authProfile.isImitator\r\n ) {\r\n setShowImitatorModal(\r\n true\r\n )\r\n return\r\n }\r\n setPercentageShowEdit(\r\n true\r\n )\r\n }}\r\n >\r\n \r\n \r\n \r\n \r\n
    \r\n \r\n ) : null}\r\n\r\n {percentageShowEdit ? (\r\n
    \r\n
    \r\n {\r\n const val =\r\n e\r\n .target\r\n .value\r\n setPercentageEditValue(\r\n +val\r\n )\r\n\r\n setPercentageOfMembersCovered(\r\n calcPercentageCoveredInEditMode()\r\n )\r\n }}\r\n />\r\n
    \r\n \r\n {\r\n // setShowDelete(false)\r\n setPercentageShowEdit(\r\n false\r\n )\r\n setPercentageEditValue(\r\n undefined\r\n )\r\n }}\r\n size=\"xlarge\"\r\n type=\"secondary\"\r\n style={{\r\n flexGrow: 1,\r\n }}\r\n >\r\n Annuller\r\n \r\n =\r\n data.numberFoaMemberUserCovers\r\n ) ||\r\n !percentageEditValue ||\r\n percentageEditValue >=\r\n 3000\r\n }\r\n onClick={() => {\r\n if (\r\n authProfile.isImitator\r\n ) {\r\n setShowImitatorModal(\r\n true\r\n )\r\n return\r\n }\r\n if (\r\n percentageEditValue\r\n ) {\r\n // Try to set value.\r\n const fieldsToEdit: IUpdateMyProfileData =\r\n {}\r\n fieldsToEdit.TotalAntalKollegaerBrugerDaekker =\r\n percentageEditValue\r\n const response =\r\n updateProfile(\r\n fieldsToEdit\r\n )\r\n if (\r\n response\r\n ) {\r\n setTimeout(\r\n () =>\r\n update(\r\n {\r\n type: 'refetch',\r\n }\r\n ),\r\n 100\r\n )\r\n }\r\n }\r\n }}\r\n style={{\r\n flexGrow: 1,\r\n }}\r\n size=\"xlarge\"\r\n >\r\n Gem\r\n \r\n
    \r\n \r\n ) : null}\r\n \r\n }\r\n \r\n\r\n \r\n \r\n {L_HTML(\r\n 'TRPROFIL_ORGANISERINGSWIDGET_TEKST_2',\r\n {\r\n ProcentDaekker: String(\r\n Math.round(\r\n percentageOfMembersCovered\r\n ) || 0\r\n ),\r\n AntalFoaMedlemmerBrugerDaekker:\r\n String(\r\n data.numberFoaMemberUserCovers\r\n ),\r\n TotalAntalKollegaerBrugerDaekker:\r\n String(\r\n percentageShowEdit\r\n ? percentageEditValue ||\r\n 0\r\n : data.totalNumberOfPeopleUserCovers\r\n ),\r\n }\r\n )}\r\n \r\n \r\n ),\r\n },\r\n ]}\r\n />\r\n \r\n \r\n setShowImitatorModal(false)}\r\n />\r\n \r\n )\r\n}\r\n\r\nexport { MyProfile }\r\n","import React, { FC, useEffect, useRef, useState } from 'react'\r\nimport { createUseStyles } from 'react-jss'\r\nimport { useForm } from 'react-hook-form'\r\nimport moment from 'moment'\r\nimport { useAtom } from 'jotai'\r\nimport { Button } from '../../ui/Button/Button'\r\nimport {\r\n ContactLedger,\r\n Info,\r\n LockFill,\r\n EditFill,\r\n SuitcaseFill,\r\n} from '../../../assets/icons'\r\nimport { Circle } from '../../ui/Card'\r\nimport { CircleIcon } from '../../ui/Circle/Circle'\r\nimport { Typography } from '../../ui/Typography/Typography'\r\nimport {\r\n FunctionField,\r\n IUpdateMemberData,\r\n Member,\r\n} from '../../../models/Member'\r\nimport { Input } from '../../ui/FormElememts/stories/Input.stories'\r\nimport { Position } from '../../../models/Position'\r\nimport { getWorkplacesAndPositions } from '../../../api/misc'\r\nimport { colors } from '../../../theme/palette'\r\nimport { DatePickerComponent } from '../../ui/FormElememts/DatePicker'\r\nimport {\r\n FormInput,\r\n FormInputNumber,\r\n FormTextArea,\r\n} from '../FormElements/FormInput'\r\nimport { FormControl } from '../../ui/FormElememts/FormControl'\r\nimport { FormHeader } from '../../ui/FormElememts/FormHeader'\r\nimport { baseButton } from '../../../theme/reuseables'\r\nimport { Overlay } from '../../ui/Sidebar'\r\nimport { Dialog } from '../../ui/Dialog/Dialog'\r\nimport { updateOwnMember } from '../../../api/members/members'\r\nimport { DrawerHeaderMemberInfo } from '../FormElements/DrawerHeader'\r\nimport { FormMessage } from '../../ui/FormElememts/FormMessage'\r\nimport { Workplace } from '../../../models/Workplace'\r\nimport { Contact } from '../../../models/Contact'\r\nimport { L, L_HTML } from '../../providers/Lokalise'\r\nimport { ISelectOptions, Select } from '../../ui/FormElememts/Select'\r\nimport { profileAtom } from '../../../api/profile/profile'\r\nimport { ImitatorNoAccessWarning } from '../Imitator/ImitatorNoAccessWarning'\r\n\r\ninterface EditProps {\r\n member: Member\r\n onUpdated?: (member: Member) => void\r\n}\r\n\r\ninterface IError {\r\n hasError: boolean\r\n message: JSX.Element\r\n}\r\n\r\nconst useStyles = createUseStyles({\r\n contentWrapper: {\r\n padding: '100px 20px 20px',\r\n overflow: 'auto',\r\n height: 'calc(100% - 100px)',\r\n paddingBottom: '80px',\r\n },\r\n accordionWrapper: {\r\n marginBottom: '20px',\r\n },\r\n select: {\r\n position: 'relative',\r\n height: '3.125rem',\r\n backgroundColor: colors.white,\r\n border: `1px solid ${colors.borderColor}`,\r\n borderRadius: '6px',\r\n width: '100%',\r\n fontSize: '1.125rem',\r\n paddingLeft: '.75rem',\r\n paddingRight: '.75rem',\r\n cursor: 'pointer',\r\n color: colors.black,\r\n },\r\n button: {\r\n ...baseButton,\r\n ...{\r\n padding: '2.5rem 0 0',\r\n cursor: 'pointer',\r\n },\r\n },\r\n bottom: {\r\n display: 'flex',\r\n position: 'absolute',\r\n bottom: '0',\r\n width: '100%',\r\n padding: '20px',\r\n left: '0',\r\n background: colors.white,\r\n zIndex: 4,\r\n borderTop: `1px solid ${colors.borderColor}`,\r\n '& > button': {\r\n flexGrow: 1,\r\n },\r\n '& > button:last-of-type': {\r\n marginRight: '0',\r\n },\r\n },\r\n})\r\n\r\nexport type RegistrationFormFields = {\r\n KontaktPrivat: {\r\n Fastnet: string\r\n Mobil: string\r\n Email: string\r\n }\r\n KontaktArbejde: {\r\n Telefon: string\r\n Email: string\r\n OpdaterFunktionFastnet: FunctionField\r\n }\r\n Stillingsnummer: string\r\n Timetal: number\r\n OevrigeOplysninger: string\r\n Arbejdsstednummer: number\r\n}\r\n\r\nexport type CustomErrors = {\r\n Aendringsdato?: boolean\r\n}\r\n\r\nexport const EditMemberProfile: FC = ({ member, onUpdated }) => {\r\n const [error, setError] = useState(undefined)\r\n const { register, handleSubmit, formState, reset, setValue } =\r\n useForm()\r\n const classes = useStyles()\r\n const [positions, setPositions] = useState([])\r\n const [selectedDate, _setSelectedDate] = useState(undefined)\r\n const [isOpen, setIsOpen] = useState(false)\r\n const [showDialog, setShowDialog] = useState(false)\r\n const [isValid, setIsValid] = useState(false)\r\n const [isFetching, setIsFetching] = useState(false)\r\n const [workPlaces, setWorkplaces] = useState([])\r\n const [customErrors, setCustomErrors] = useState({})\r\n const [selectedPostion, setSelectedPosition] = useState(\r\n undefined\r\n )\r\n const [workContact, setWorkContact] = useState(\r\n undefined\r\n )\r\n const [showImitatorModal, setShowImitatorModal] = useState(false)\r\n const [authProfile] = useAtom(profileAtom)\r\n\r\n const [options, setOptions] = useState([])\r\n\r\n const [selectedWorkplace, setSelectedWorkplace] = useState<\r\n string | undefined\r\n >(undefined)\r\n\r\n const formRef = useRef(null)\r\n\r\n const setWP = (wp: string): void => {\r\n const found = member.workPlaces.find((wpp) => String(wpp.number) === wp)\r\n setSelectedWorkplace(wp)\r\n\r\n const wco = member.contactInfoList.find(\r\n (wc) =>\r\n wc.contactInfoType === 'Arbejde' &&\r\n String(wc.workPlacesContact.number) === wp\r\n )\r\n\r\n if (wco) {\r\n setValue('KontaktArbejde.Telefon', wco.telephone || undefined)\r\n setValue('KontaktArbejde.Email', wco.email || undefined)\r\n } else {\r\n setValue('KontaktArbejde.Telefon', undefined)\r\n setValue('KontaktArbejde.Email', undefined)\r\n }\r\n\r\n setSelectedPosition(found.postionNumber)\r\n\r\n if (found && found.positions) {\r\n setPositions(found.positions)\r\n }\r\n }\r\n\r\n const getPositions = async (): Promise => {\r\n const response = await getWorkplacesAndPositions()\r\n setWorkplaces(response.workPlaces)\r\n\r\n if (member) {\r\n const found = response.workPlaces.find(\r\n (wpp) => wpp.number === member.primaryWorkPlace.number\r\n )\r\n\r\n setSelectedWorkplace(String(member.primaryWorkPlace.number))\r\n\r\n const wco = member.contactInfoList.find(\r\n (wc) =>\r\n wc.contactInfoType === 'Arbejde' &&\r\n String(wc.workPlacesContact.number) ===\r\n String(member.primaryWorkPlace.number)\r\n )\r\n\r\n if (wco) {\r\n setValue('KontaktArbejde.Telefon', wco.telephone)\r\n setValue('KontaktArbejde.Email', wco.email)\r\n } else {\r\n setValue('KontaktArbejde.Telefon', undefined)\r\n setValue('KontaktArbejde.Email', undefined)\r\n }\r\n\r\n setSelectedPosition(member.primaryWorkPlace.postionNumber)\r\n\r\n if (found && found.positions) {\r\n setPositions(found.positions)\r\n\r\n const positionssss = found.positions.map((pos) => {\r\n return { label: String(pos.name), value: String(pos.id) }\r\n })\r\n\r\n setOptions(positionssss)\r\n }\r\n }\r\n }\r\n\r\n const init = (): void => {\r\n if (member.primaryWorkPlace) {\r\n setValue('Timetal', member.primaryWorkPlace.hoursPerWeek)\r\n }\r\n getPositions()\r\n\r\n if (formRef && formRef.current) {\r\n const input = formRef.current.querySelector('[name=\"Timetal\"]')\r\n if (input) {\r\n input.setAttribute('autofocus', '')\r\n }\r\n }\r\n }\r\n\r\n useEffect(() => {\r\n init()\r\n }, [member])\r\n\r\n const resetForm = (): void => {\r\n _setSelectedDate(undefined)\r\n setSelectedPosition(undefined)\r\n setWP(String(member.primaryWorkPlace.number))\r\n setCustomErrors({})\r\n reset()\r\n setValue('Timetal', member.primaryWorkPlace.hoursPerWeek)\r\n }\r\n\r\n const { isDirty, dirtyFields, errors } = formState\r\n\r\n const onSubmit = async (data: RegistrationFormFields): Promise => {\r\n if (authProfile.isImitator) {\r\n setShowImitatorModal(true)\r\n return\r\n }\r\n\r\n if (isDirty && selectedDate) {\r\n const workPlace = member.workPlaces.find(\r\n (wp) => wp.number === +selectedWorkplace\r\n )\r\n\r\n const fieldsToEdit: IUpdateMemberData = {\r\n Medlemsident: member.memberId,\r\n Aendringsdato: moment(selectedDate).format(\r\n 'YYYY-MM-DD HH:mm:ss'\r\n ),\r\n Arbejdsstednummer: workPlace.number,\r\n Stillingsnummer: selectedPostion,\r\n }\r\n\r\n if (dirtyFields.Timetal) {\r\n fieldsToEdit.Timetal = Number(\r\n String(data.Timetal).replace(',', '.')\r\n )\r\n }\r\n\r\n if (dirtyFields.KontaktPrivat) {\r\n fieldsToEdit.KontaktPrivat = {}\r\n if (dirtyFields.KontaktPrivat.Mobil) {\r\n fieldsToEdit.KontaktPrivat.Mobil = data.KontaktPrivat.Mobil\r\n fieldsToEdit.KontaktPrivat.OpdaterFunktionMobil =\r\n data.KontaktPrivat.Mobil.length === 0 ? 'Slet' : 'Ret'\r\n\r\n if (data.KontaktPrivat.Mobil.length === 0) {\r\n delete fieldsToEdit.KontaktPrivat.Mobil\r\n }\r\n }\r\n if (dirtyFields.KontaktPrivat.Email) {\r\n fieldsToEdit.KontaktPrivat.Email = data.KontaktPrivat.Email\r\n fieldsToEdit.KontaktPrivat.OpdaterFunktionEmail =\r\n data.KontaktPrivat.Email.length === 0 ? 'Slet' : 'Ret'\r\n\r\n if (data.KontaktPrivat.Email.length === 0) {\r\n delete fieldsToEdit.KontaktPrivat.Email\r\n }\r\n }\r\n }\r\n\r\n if (dirtyFields.KontaktArbejde) {\r\n fieldsToEdit.KontaktArbejde = {}\r\n if (dirtyFields.KontaktArbejde.Telefon) {\r\n fieldsToEdit.KontaktArbejde.Telefon =\r\n data.KontaktArbejde.Telefon\r\n fieldsToEdit.KontaktArbejde.OpdaterFunktionTelefon =\r\n data.KontaktArbejde.Telefon.length === 0\r\n ? 'Slet'\r\n : 'Ret'\r\n\r\n if (data.KontaktArbejde.Telefon.length === 0) {\r\n delete fieldsToEdit.KontaktArbejde.Telefon\r\n }\r\n }\r\n if (dirtyFields.KontaktArbejde.Email) {\r\n fieldsToEdit.KontaktArbejde.Email =\r\n data.KontaktArbejde.Email\r\n\r\n fieldsToEdit.KontaktArbejde.OpdaterFunktionEmail =\r\n data.KontaktArbejde.Email.length === 0 ? 'Slet' : 'Ret'\r\n\r\n if (data.KontaktArbejde.Email.length === 0) {\r\n delete fieldsToEdit.KontaktArbejde.Email\r\n }\r\n }\r\n }\r\n\r\n if (dirtyFields.OevrigeOplysninger) {\r\n fieldsToEdit.OevrigeOplysninger = data.OevrigeOplysninger\r\n }\r\n\r\n const response: any = await updateOwnMember(fieldsToEdit)\r\n\r\n if (response.error) {\r\n // setError({\r\n // hasError: true,\r\n // message: (\r\n //
    \r\n // {response.error.ModelState &&\r\n // Object.keys(response.error.ModelState).map(\r\n // (i) => (\r\n //

    \r\n // {response.error.ModelState[i]}\r\n //

    \r\n // )\r\n // )}\r\n //
    \r\n // ),\r\n // })\r\n // resetForm()\r\n } else if (response) {\r\n setIsOpen(false)\r\n setShowDialog(true)\r\n resetForm()\r\n\r\n if (onUpdated) {\r\n onUpdated(member)\r\n }\r\n }\r\n }\r\n }\r\n\r\n const checkIsValid = (): void => {\r\n if (isDirty && selectedDate) {\r\n setIsValid(true)\r\n }\r\n }\r\n\r\n useEffect(() => {\r\n checkIsValid()\r\n })\r\n\r\n return (\r\n <>\r\n setIsOpen(true)}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n \r\n {L('MINEMEDLEMMER_DETALJE_REDIGERMEDLEM_KNAP')}\r\n \r\n \r\n {\r\n resetForm()\r\n setIsOpen(false)\r\n }}\r\n >\r\n \r\n \r\n \r\n {L_HTML('MINEMEDLEMMER_RETMEDLEMSDETALJE_TITEL')}\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {L_HTML('GENERISK_FORM_ANSÆTTELSE_TITEL')}\r\n \r\n \r\n {member && selectedWorkplace && (\r\n \r\n {member.workPlaces.length > 1 ? (\r\n {\r\n setValue(\r\n 'Arbejdsstednummer',\r\n Number(e.target.value)\r\n )\r\n setWP(e.target.value)\r\n }}\r\n options={member.workPlaces.map((wp) => {\r\n const o = {\r\n label: wp.name,\r\n value: String(wp.number),\r\n }\r\n\r\n return o\r\n })}\r\n />\r\n ) : (\r\n \r\n wp.number === +selectedWorkplace\r\n ).name\r\n }\r\n />\r\n )}\r\n \r\n )}\r\n \r\n {options.length ? (\r\n {\r\n setValue(\r\n 'Stillingsnummer',\r\n String(e.target.value)\r\n )\r\n setSelectedPosition(e.target.value)\r\n }}\r\n options={options}\r\n placeholder={L(\r\n 'MINEMEDLEMMER_RETMEDLEMSDETALJE_STILLING_LABEL'\r\n )}\r\n />\r\n ) : null}\r\n \r\n \r\n \r\n (Number(String(value).replace(',', '.')) >=\r\n 0.5 &&\r\n Number(\r\n String(value).replace(',', '.')\r\n ) <= 99) ||\r\n L(\r\n 'GENERISK_FORM_TIMETAL_VALIDERINGS_TEKST'\r\n ),\r\n }}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {L('GENERISK_FORM_KONTAKT_TITEL')}\r\n \r\n \r\n \r\n \r\n value.length > 7 ||\r\n !value ||\r\n L('GENERISK_FORM_MOBIL_VALIDERINGS_TEKST'),\r\n }}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n (value && value.length > 7) ||\r\n !value ||\r\n L('GENERISK_FORM_MOBIL_VALIDERINGS_TEKST'),\r\n }}\r\n />\r\n \r\n \r\n \r\n {/* \r\n setSelectedWorkmail(e.target.value)\r\n }\r\n /> */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {L_HTML(\r\n 'GENERISK_FORM_YDERLIGERE-OPLYSNINGER_TITEL'\r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n {\r\n setIsOpen(false)\r\n resetForm()\r\n }}\r\n type=\"secondary\"\r\n size=\"large\"\r\n >\r\n {L('MINEMEDLEMMER_RETMEDLEMSDETALJE_LUK_KNAP')}\r\n \r\n \r\n {L('MINEMEDLEMMER_RETMEDLEMSDETALJE_GEM_KNAP')}\r\n \r\n
    \r\n\r\n
    \r\n \r\n \r\n {showDialog ? (\r\n }\r\n >\r\n \r\n {L_HTML(\r\n 'MINEMEDLEMMER_RETMEDLEMSDETALJE_INDSENDT-FEEDBACK_TITEL'\r\n )}\r\n \r\n \r\n {L_HTML(\r\n 'MINEMEDLEMMER_RETMEDLEMSDETALJE_INDSENDT-FEEDBACK_TEKST'\r\n )}\r\n \r\n \r\n \r\n ) : null}\r\n setShowImitatorModal(false)}\r\n />\r\n {/* {error && error.hasError ? (\r\n }\r\n >\r\n \r\n Fejl\r\n \r\n \r\n {error.message}\r\n \r\n \r\n \r\n ) : null} */}\r\n \r\n )\r\n}\r\n","import React, { FC, useEffect, useState } from 'react'\r\nimport { createUseStyles } from 'react-jss'\r\nimport { useForm } from 'react-hook-form'\r\nimport moment from 'moment'\r\nimport { useAtom } from 'jotai'\r\nimport { Button } from '../../ui/Button/Button'\r\nimport { SendFill, SuitcaseFill } from '../../../assets/icons'\r\nimport { Circle } from '../../ui/Card'\r\nimport { CircleIcon } from '../../ui/Circle/Circle'\r\nimport { Typography } from '../../ui/Typography/Typography'\r\nimport { IUpdateMemberData, Member } from '../../../models/Member'\r\nimport { getWorkplacesAndPositions } from '../../../api/misc'\r\nimport { colors } from '../../../theme/palette'\r\nimport { DatePickerComponent } from '../../ui/FormElememts/DatePicker'\r\nimport { FormControl } from '../../ui/FormElememts/FormControl'\r\nimport { FormHeader } from '../../ui/FormElememts/FormHeader'\r\nimport { baseButton } from '../../../theme/reuseables'\r\nimport { Overlay } from '../../ui/Sidebar'\r\nimport { Dialog } from '../../ui/Dialog/Dialog'\r\nimport { cancelMemberFromWorkplace } from '../../../api/members/members'\r\nimport { Workplace } from '../../../models/Workplace'\r\nimport { DrawerHeaderMemberInfo } from '../FormElements/DrawerHeader'\r\nimport { FormTextArea } from '../FormElements/FormInput'\r\nimport { L, L_HTML } from '../../providers/Lokalise'\r\nimport Input from '../../ui/FormElememts/Input'\r\nimport { Select } from '../../ui/FormElememts/Select'\r\nimport { ImitatorNoAccessWarning } from '../Imitator/ImitatorNoAccessWarning'\r\nimport { profileAtom } from '../../../api/profile/profile'\r\n\r\ninterface EditProps {\r\n member: Member\r\n}\r\n\r\nconst useStyles = createUseStyles({\r\n contentWrapper: {\r\n padding: '100px 20px 20px',\r\n overflow: 'auto',\r\n height: 'calc(100% - 100px)',\r\n paddingBottom: '80px',\r\n },\r\n accordionWrapper: {\r\n marginBottom: '20px',\r\n },\r\n select: {\r\n position: 'relative',\r\n height: '3.125rem',\r\n backgroundColor: colors.white,\r\n border: `1px solid ${colors.borderColor}`,\r\n borderRadius: '6px',\r\n width: '100%',\r\n fontSize: '1.125rem',\r\n paddingLeft: '.75rem',\r\n paddingRight: '.75rem',\r\n cursor: 'pointer',\r\n color: colors.labelColor,\r\n },\r\n button: {\r\n ...baseButton,\r\n ...{\r\n cursor: 'pointer',\r\n },\r\n },\r\n bottom: {\r\n display: 'flex',\r\n position: 'absolute',\r\n bottom: '0',\r\n width: '100%',\r\n padding: '20px',\r\n left: '0',\r\n background: colors.white,\r\n zIndex: 4,\r\n borderTop: `1px solid ${colors.borderColor}`,\r\n '& > button': {\r\n flexGrow: 1,\r\n },\r\n '& > button:last-of-type': {\r\n marginRight: '0',\r\n },\r\n },\r\n})\r\n\r\nexport type RegistrationFormFields = {\r\n OevrigeOplysninger?: string\r\n}\r\n\r\nexport const CancelWorkplace: FC = ({ member }) => {\r\n const { register, reset, formState, handleSubmit } =\r\n useForm()\r\n const classes = useStyles()\r\n const [, setWorkplaces] = useState([])\r\n const [selectedDate, _setSelectedDate] = useState(null)\r\n const [isOpen, setIsOpen] = useState(false)\r\n const [showDialog, setShowDialog] = useState(false)\r\n const [isValid, setIsValid] = useState(false)\r\n const [authProfile] = useAtom(profileAtom)\r\n const [showImitatorModal, setShowImitatorModal] = useState(false)\r\n // const [values, setValues] = useState({\r\n // OevrigeOplysninger: undefined,\r\n // })\r\n const [addInfo, setAddInfo] = useState(undefined)\r\n const [selectedWorkplace, setSelectedWorkplace] = useState<\r\n string | undefined\r\n >(undefined)\r\n\r\n const getPositions = async (): Promise => {\r\n // if (member.workPlaces.length && member.workPlaces.length === 1) {\r\n // setSelectedWorkplace(String(member.workPlaces[0].number))\r\n // }\r\n\r\n const response = await getWorkplacesAndPositions()\r\n\r\n let workplaces = response.workPlaces\r\n\r\n workplaces = workplaces.filter((place) => {\r\n return member.workPlaces.some(\r\n (work) => work.number !== place.number\r\n )\r\n })\r\n setWorkplaces(workplaces)\r\n }\r\n\r\n useEffect(() => {\r\n getPositions()\r\n\r\n if (member.workPlaces.length === 1) {\r\n setSelectedWorkplace(String(member.primaryWorkPlace.number))\r\n }\r\n }, [])\r\n\r\n useEffect(() => {\r\n let valid = false\r\n\r\n valid = !!selectedDate && !!selectedWorkplace\r\n setIsValid(valid)\r\n }, [selectedWorkplace, selectedDate])\r\n\r\n const resetForm = (): void => {\r\n if (member.workPlaces.length && member.workPlaces.length === 1) {\r\n setSelectedWorkplace(String(member.workPlaces[0].number))\r\n } else {\r\n setSelectedWorkplace(undefined)\r\n }\r\n\r\n _setSelectedDate(null)\r\n setAddInfo(undefined)\r\n reset()\r\n }\r\n\r\n const { isDirty, dirtyFields } = formState\r\n\r\n const submitHandler = async (\r\n data: RegistrationFormFields\r\n ): Promise => {\r\n if (authProfile.isImitator) {\r\n setShowImitatorModal(true)\r\n return Promise.resolve('OK')\r\n }\r\n const fieldsToEdit: IUpdateMemberData = {\r\n Medlemsident: member.memberId,\r\n Aendringsdato: moment(selectedDate).format('YYYY-MM-DD HH:mm:ss'),\r\n Arbejdsstednummer: Number(selectedWorkplace),\r\n }\r\n\r\n if (dirtyFields.OevrigeOplysninger) {\r\n fieldsToEdit.OevrigeOplysninger = data.OevrigeOplysninger\r\n }\r\n\r\n const response = await cancelMemberFromWorkplace(fieldsToEdit)\r\n\r\n if (response) {\r\n setIsOpen(false)\r\n setShowDialog(true)\r\n resetForm()\r\n }\r\n\r\n return Promise.resolve('OK')\r\n }\r\n\r\n return (\r\n <>\r\n \r\n {\r\n setIsOpen(false)\r\n resetForm()\r\n }}\r\n >\r\n \r\n \r\n \r\n {L_HTML(\r\n 'MINEMEDLEMMER_DETALJE_STOPPET-PÅ-ARBEDJSPLADS_TITEL'\r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {L_HTML('GENERISK_FORM_ANSÆTTELSE_TITEL')}\r\n \r\n \r\n {/* \r\n {\r\n setSelectedWorkplace(e.target.value)\r\n }}\r\n >\r\n \r\n {member.workPlaces.map((work) => {\r\n return (\r\n \r\n )\r\n })}\r\n \r\n */}\r\n {member && (\r\n \r\n {member.workPlaces.length > 1 ? (\r\n {\r\n setSelectedWorkplace(e.target.value)\r\n }}\r\n options={member.workPlaces.map((wp) => {\r\n const o = {\r\n label: wp.name,\r\n value: String(wp.number),\r\n }\r\n\r\n return o\r\n })}\r\n />\r\n ) : (\r\n \r\n )}\r\n \r\n )}\r\n \r\n {\r\n _setSelectedDate(e)\r\n }}\r\n />\r\n \r\n \r\n \r\n \r\n
    \r\n {\r\n setIsOpen(false)\r\n resetForm()\r\n }}\r\n type=\"secondary\"\r\n size=\"large\"\r\n >\r\n Annuller\r\n \r\n \r\n
    \r\n\r\n
    \r\n \r\n \r\n {showDialog ? (\r\n }\r\n >\r\n \r\n {L_HTML('STOPPET-PÅ-ARBEJDSPLADS_POPUP_OVERSKRIFT')}\r\n \r\n \r\n {L_HTML('STOPPET-PÅ-ARBEJDSPLADS_POPUP_TEXT')}\r\n \r\n \r\n \r\n ) : null}\r\n setShowImitatorModal(false)}\r\n />\r\n \r\n )\r\n}\r\n","import React, { FC, useEffect, useState } from 'react'\r\nimport { createUseStyles } from 'react-jss'\r\nimport { useForm } from 'react-hook-form'\r\nimport moment from 'moment'\r\nimport { useAtom } from 'jotai'\r\nimport { Button } from '../../ui/Button/Button'\r\nimport { SendFill, Info, SuitcaseFill } from '../../../assets/icons'\r\nimport { Circle } from '../../ui/Card'\r\nimport { CircleIcon } from '../../ui/Circle/Circle'\r\nimport { Typography } from '../../ui/Typography/Typography'\r\nimport { IUpdateMemberData, Member } from '../../../models/Member'\r\nimport { Position } from '../../../models/Position'\r\nimport { getWorkplacesAndPositions } from '../../../api/misc'\r\nimport { colors } from '../../../theme/palette'\r\nimport { DatePickerComponent } from '../../ui/FormElememts/DatePicker'\r\nimport { FormControl } from '../../ui/FormElememts/FormControl'\r\nimport { FormHeader } from '../../ui/FormElememts/FormHeader'\r\nimport { baseButton } from '../../../theme/reuseables'\r\nimport { Overlay } from '../../ui/Sidebar'\r\nimport { Dialog } from '../../ui/Dialog/Dialog'\r\nimport { addMemberToWorkplace } from '../../../api/members/members'\r\nimport { Workplace } from '../../../models/Workplace'\r\nimport { DrawerHeaderMemberInfo } from '../FormElements/DrawerHeader'\r\nimport {\r\n FormInputNumber,\r\n FormTextArea,\r\n FormSelect,\r\n} from '../FormElements/FormInput'\r\nimport { FormMessage } from '../../ui/FormElememts/FormMessage'\r\nimport { L, L_HTML } from '../../providers/Lokalise'\r\nimport { Select } from '../../ui/FormElememts/Select'\r\nimport Checkbox from '../../ui/FormElememts/Checkbox'\r\nimport { ImitatorNoAccessWarning } from '../Imitator/ImitatorNoAccessWarning'\r\nimport { profileAtom } from '../../../api/profile/profile'\r\n\r\ninterface EditProps {\r\n member: Member\r\n}\r\n\r\nconst useStyles = createUseStyles({\r\n contentWrapper: {\r\n padding: '100px 20px 20px',\r\n overflow: 'auto',\r\n height: 'calc(100% - 100px)',\r\n paddingBottom: '80px',\r\n },\r\n accordionWrapper: {\r\n marginBottom: '20px',\r\n },\r\n select: {\r\n position: 'relative',\r\n height: '3.125rem',\r\n backgroundColor: colors.white,\r\n border: `1px solid ${colors.borderColor}`,\r\n borderRadius: '6px',\r\n width: '100%',\r\n fontSize: '1.125rem',\r\n paddingLeft: '.75rem',\r\n paddingRight: '.75rem',\r\n cursor: 'pointer',\r\n color: colors.labelColor,\r\n },\r\n button: {\r\n ...baseButton,\r\n ...{\r\n cursor: 'pointer',\r\n },\r\n },\r\n bottom: {\r\n display: 'flex',\r\n position: 'absolute',\r\n bottom: '0',\r\n width: '100%',\r\n padding: '20px',\r\n left: '0',\r\n background: colors.white,\r\n zIndex: 4,\r\n borderTop: `1px solid ${colors.borderColor}`,\r\n '& > button': {\r\n flexGrow: 1,\r\n },\r\n '& > button:last-of-type': {\r\n marginRight: '0',\r\n },\r\n },\r\n})\r\n\r\nexport type RegistrationFormFields = {\r\n Timetal?: string\r\n OevrigeOplysninger?: string\r\n Arbejdsstednummer?: string\r\n Stillingsnummer?: string\r\n}\r\n\r\nexport type CustomErrors = {\r\n Aendringsdato?: boolean\r\n}\r\n\r\nexport const AddMemberToWorkplace: FC = ({ member }) => {\r\n const { register, formState, reset, handleSubmit, setValue } =\r\n useForm()\r\n const classes = useStyles()\r\n const [authProfile] = useAtom(profileAtom)\r\n const [showImitatorModal, setShowImitatorModal] = useState(false)\r\n const [workPlaces, setWorkplaces] = useState([])\r\n const [positions, setPositions] = useState([])\r\n const [selectedDate, _setSelectedDate] = useState(null)\r\n const [isOpen, setIsOpen] = useState(false)\r\n const [showDialog, setShowDialog] = useState(false)\r\n const [isValid, setIsValid] = useState(false)\r\n const [onCallSubstitute, setOnCallSubstitute] = useState(false)\r\n const [customErrors, setCustomErrors] = useState({})\r\n const [values, setValues] = useState({\r\n Timetal: undefined,\r\n OevrigeOplysninger: undefined,\r\n })\r\n const [selectedPostion, setSelectedPosition] = useState(\r\n undefined\r\n )\r\n const [selectedWorkplace, setSelectedWorkplace] = useState<\r\n string | undefined\r\n >(undefined)\r\n\r\n const getPositions = async (): Promise => {\r\n const response = await getWorkplacesAndPositions()\r\n\r\n let workplaces = response.workPlaces\r\n\r\n workplaces = workplaces.filter((place) => {\r\n return member.workPlaces.some(\r\n (work) => work.number !== place.number\r\n )\r\n })\r\n\r\n setWorkplaces(workplaces)\r\n }\r\n\r\n useEffect(() => {\r\n getPositions()\r\n }, [])\r\n\r\n useEffect(() => {\r\n let valid = false\r\n\r\n valid =\r\n !!selectedDate &&\r\n !!selectedPostion &&\r\n selectedPostion !== 'default' &&\r\n !!selectedWorkplace\r\n setIsValid(valid)\r\n }, [values, selectedPostion, selectedWorkplace, selectedDate, formState])\r\n\r\n const setWP = (wp: string): void => {\r\n const found = workPlaces.find((wpp) => String(wpp.number) === wp)\r\n\r\n setSelectedWorkplace(wp)\r\n setSelectedPosition('default')\r\n\r\n if (found && found.positions) {\r\n setPositions(found.positions)\r\n }\r\n }\r\n\r\n const resetForm = (): void => {\r\n _setSelectedDate(null)\r\n setSelectedWorkplace('default')\r\n setSelectedPosition('default')\r\n setCustomErrors({})\r\n reset()\r\n }\r\n\r\n const { dirtyFields, errors } = formState\r\n\r\n const submitHandler = async (\r\n data: RegistrationFormFields\r\n ): Promise => {\r\n if (authProfile.isImitator) {\r\n setShowImitatorModal(true)\r\n return Promise.resolve('OK')\r\n }\r\n const fieldsToEdit: IUpdateMemberData = {\r\n Medlemsident: member.memberId,\r\n Aendringsdato: moment(selectedDate).format('YYYY-MM-DD HH:mm:ss'),\r\n Arbejdsstednummer: Number(selectedWorkplace),\r\n Stillingsnummer: selectedPostion || String(member.positions[0].id),\r\n }\r\n if (dirtyFields.Timetal) {\r\n fieldsToEdit.Timetal = Number(\r\n String(data.Timetal).replace(',', '.')\r\n )\r\n }\r\n\r\n if (dirtyFields.OevrigeOplysninger) {\r\n fieldsToEdit.OevrigeOplysninger = data.OevrigeOplysninger\r\n }\r\n\r\n if (onCallSubstitute) {\r\n if (fieldsToEdit.OevrigeOplysninger) {\r\n fieldsToEdit.OevrigeOplysninger = `${fieldsToEdit.OevrigeOplysninger} - Tilkaldevikar`\r\n } else {\r\n fieldsToEdit.OevrigeOplysninger = 'Tilkaldevikar'\r\n }\r\n }\r\n\r\n const response = await addMemberToWorkplace(fieldsToEdit)\r\n\r\n if (response) {\r\n setIsOpen(false)\r\n setShowDialog(true)\r\n resetForm()\r\n }\r\n\r\n return Promise.resolve('OK')\r\n }\r\n\r\n return (\r\n <>\r\n \r\n {\r\n setIsOpen(false)\r\n resetForm()\r\n }}\r\n >\r\n \r\n \r\n \r\n {L_HTML(\r\n 'MINEMEDLEMMER_TILFØJ-ARBEJDSSTED_OVERSKRIFT_LABEL'\r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {L_HTML('GENERISK_FORM_ANSÆTTELSE_TITEL')}\r\n \r\n \r\n \r\n {\r\n setWP(e.target.value)\r\n setValue(\r\n 'Arbejdsstednummer',\r\n e.target.value\r\n )\r\n },\r\n }}\r\n isOpen={isOpen}\r\n placeholder=\"Arbejdssted *\"\r\n onChange={(e) => {\r\n setWP(e.target.value)\r\n setValue('Arbejdsstednummer', e.target.value)\r\n }}\r\n options={workPlaces.map((wp) => {\r\n const o = {\r\n label: wp.name,\r\n value: String(wp.number),\r\n }\r\n\r\n return o\r\n })}\r\n />\r\n \r\n \r\n \r\n {\r\n setSelectedPosition(e.target.value)\r\n setValue('Stillingsnummer', e.target.value)\r\n },\r\n }}\r\n isOpen={isOpen}\r\n disabled={!selectedWorkplace}\r\n placeholder=\"Stilling *\"\r\n options={positions.map((pos) => {\r\n const o = {\r\n label: pos.name,\r\n value: String(pos.id),\r\n }\r\n\r\n return o\r\n })}\r\n />\r\n \r\n \r\n \r\n \r\n (Number(String(value).replace(',', '.')) >=\r\n 0.5 &&\r\n Number(\r\n String(value).replace(',', '.')\r\n ) <= 99) ||\r\n L(\r\n 'GENERISK_FORM_TIMETAL_VALIDERINGS_TEKST'\r\n ),\r\n }}\r\n />\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {L_HTML(\r\n 'GENERISK_FORM_YDERLIGERE-OPLYSNINGER_TITEL'\r\n )}\r\n \r\n \r\n \r\n {\r\n _setSelectedDate(e)\r\n setCustomErrors({})\r\n }}\r\n hasError={!!customErrors?.Aendringsdato}\r\n minDate={moment().subtract(1, 'year').toDate()}\r\n maxDate={moment().add(1, 'year').toDate()}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n setOnCallSubstitute(!onCallSubstitute)\r\n }}\r\n />\r\n \r\n
    \r\n {\r\n setIsOpen(false)\r\n resetForm()\r\n }}\r\n type=\"secondary\"\r\n size=\"large\"\r\n >\r\n Annuller\r\n \r\n {\r\n if (!selectedDate) {\r\n setCustomErrors({\r\n Aendringsdato: true,\r\n })\r\n }\r\n }}\r\n >\r\n {L_HTML(\r\n 'MINEMEDLEMMER_TILFØJ-ARBEJDSSTED_TILFØJ_LABEL'\r\n )}\r\n \r\n
    \r\n\r\n
    \r\n \r\n \r\n {showDialog ? (\r\n }\r\n >\r\n \r\n {L_HTML(\r\n 'TILFØJ-MEDLEM-TIL-ARBEJDSPLADS_POPUP_OVERSKRIFT'\r\n )}\r\n \r\n \r\n {L_HTML('TILFØJ-MEDLEM-TIL-ARBEJDSPLADS_POPUP_TEXT')}\r\n \r\n \r\n \r\n ) : null}\r\n setShowImitatorModal(false)}\r\n />\r\n \r\n )\r\n}\r\n","import React from 'react'\r\nimport { createUseStyles } from 'react-jss'\r\nimport { Link } from 'react-router-dom'\r\nimport { ChevronRight } from '../../../assets/icons'\r\nimport { colors } from '../../../theme/palette'\r\n\r\ninterface BackLinkInterface {\r\n to: string\r\n label: string\r\n}\r\n\r\nconst useStyles = createUseStyles(() => ({\r\n BackLink: {\r\n padding: '20px 0',\r\n display: 'flex',\r\n fontSize: '1.125rem',\r\n color: colors.black,\r\n fontWeight: '700',\r\n '&:hover': {\r\n color: colors.labelColor,\r\n '& svg': {\r\n color: colors.labelColor,\r\n },\r\n },\r\n },\r\n span: {\r\n display: 'block',\r\n marginLeft: '12px',\r\n },\r\n}))\r\n\r\nconst BackLink: React.FC = ({ to, label }) => {\r\n const classes = useStyles()\r\n\r\n return (\r\n \r\n \r\n {label}\r\n \r\n )\r\n}\r\n\r\nexport { BackLink }\r\n","import React, { FC, useEffect, useState } from 'react'\r\nimport { useAtom } from 'jotai'\r\nimport { deleteNote, getMemberNotes } from '../../../api/notes'\r\nimport { Member } from '../../../models/Member'\r\nimport { Note, mapNotes } from '../../../models/Note'\r\nimport { Overlay } from '../../ui/Sidebar'\r\nimport { DrawerHeaderMemberInfo } from '../FormElements/DrawerHeader'\r\nimport { AddNewNote } from './AddNewNote'\r\nimport { EditMemberNoteButton } from './EditMemberNoteButton'\r\nimport { EditNote } from './EditNote'\r\nimport { NoteOverviewSidebar } from './NoteOverviewSidebar'\r\nimport { profileAtom } from '../../../api/profile/profile'\r\n\r\ntype ViewStates = 'default' | 'create' | 'edit' | 'delete'\r\n\r\ninterface EditMemberNotesProps {\r\n member: Member\r\n}\r\n\r\nconst EditMemberNotes: FC = ({ member }) => {\r\n const [notes, setNotes] = useState([])\r\n const [isOpen, setIsOpen] = useState(false)\r\n const [viewState, setViewState] = useState('default')\r\n const [loading, setLoading] = useState(true)\r\n const [editNote, setEditNote] = useState(undefined)\r\n const [authProfile] = useAtom(profileAtom)\r\n\r\n const init = (): void => {\r\n async function fetchData(): Promise {\r\n if (authProfile.isImitator) {\r\n setLoading(false)\r\n } else {\r\n try {\r\n const response = await getMemberNotes(\r\n member.memberId,\r\n 'MedlemIdent'\r\n )\r\n const notesMapped = mapNotes(response.Noter)\r\n\r\n setNotes(notesMapped)\r\n\r\n setLoading(false)\r\n } catch {\r\n setLoading(false)\r\n }\r\n }\r\n }\r\n\r\n fetchData()\r\n }\r\n\r\n const onClickDelete = async (note: Note): Promise => {\r\n setViewState('default')\r\n const response = await deleteNote(note.id)\r\n if (response) {\r\n setViewState('default')\r\n if (notes.length === 1) {\r\n setIsOpen(false)\r\n }\r\n init()\r\n }\r\n }\r\n\r\n useEffect(() => {\r\n init()\r\n }, [])\r\n\r\n if (loading) return null\r\n\r\n return (\r\n <>\r\n
    \r\n {\r\n setIsOpen(true)\r\n setViewState('create')\r\n }}\r\n onClickView={() => {\r\n setIsOpen(true)\r\n setViewState('default')\r\n }}\r\n notes={notes}\r\n />\r\n
    \r\n\r\n {\r\n setIsOpen(false)\r\n }}\r\n >\r\n \r\n\r\n {viewState === 'create' ? (\r\n 0}\r\n onClickCancel={() => {\r\n setViewState('default')\r\n if (notes.length === 0) {\r\n setIsOpen(false)\r\n }\r\n }}\r\n onUpdated={() => {\r\n setViewState('default')\r\n init()\r\n }}\r\n />\r\n ) : null}\r\n\r\n {viewState === 'edit' && editNote ? (\r\n setViewState('default')}\r\n onUpdated={() => {\r\n init()\r\n setViewState('default')\r\n }}\r\n />\r\n ) : null}\r\n\r\n {viewState === 'default' ? (\r\n {\r\n setIsOpen(true)\r\n setEditNote(note)\r\n setViewState('edit')\r\n }}\r\n onClickDelete={onClickDelete}\r\n onClickCreate={() => setViewState('create')}\r\n />\r\n ) : null}\r\n \r\n \r\n )\r\n}\r\n\r\nexport { EditMemberNotes }\r\n","import React, { useEffect, useState } from 'react'\r\nimport { createUseStyles } from 'react-jss'\r\nimport { useParams, useSearchParams } from 'react-router-dom'\r\nimport { AxiosResponse } from 'axios'\r\nimport { useAtom } from 'jotai'\r\nimport { getInitials } from '../../../utils/initials'\r\nimport { colors } from '../../../theme/palette'\r\nimport { CircleText, CircleIcon2 } from '../../ui/Circle/Circle'\r\nimport { CardColumn, Row } from '../../ui/Card/CardColumn'\r\nimport { Typography } from '../../ui/Typography/Typography'\r\nimport {\r\n SuitcaseFill,\r\n Foa,\r\n PersonalInfo,\r\n ContactLedger,\r\n Envelop,\r\n} from '../../../assets/icons'\r\nimport { CardColumnContainer } from '../../ui/Card/CardColumnContainer'\r\nimport { getOwnMember } from '../../../api/members/members'\r\nimport { Member } from '../../../models/Member'\r\nimport { Loader } from '../../ui/Loaders/Loader'\r\nimport { buildRow } from '../MyProfile'\r\nimport { formatDate } from '../../../utils/format'\r\nimport { EditMemberProfile } from '../../modules/EditMemberProfile'\r\nimport { CancelWorkplace } from '../../modules/CancelWorkplace'\r\nimport { AddMemberToWorkplace } from '../../modules/AddMemberToWorkplace'\r\nimport { baseButton } from '../../../theme/reuseables'\r\nimport { GmapsLink } from '../../ui/GmapsLink/GmapsLink'\r\nimport { Workplace } from '../../../models/Workplace'\r\nimport { Favorite } from '../../ui/Favorite'\r\nimport { BackLink } from '../../ui/BackLink'\r\nimport { L } from '../../providers/Lokalise'\r\nimport { EditMemberNotes } from '../../modules/notes/EditMemberNotes'\r\nimport { AuthProfile, profileAtom } from '../../../api/profile/profile'\r\nimport { WorkplaceDropdown } from '../../modules/WorkplaceDropdown'\r\nimport breakpoints from '../../../theme/breakpoints'\r\nimport { Spinner } from '../../ui/Loaders/Spinner'\r\nimport { Contact } from '../../../models/Contact'\r\nimport { removeFavorite, setFavorite } from '../../../api/favorite'\r\nimport { ImitatorNoAccessWarning } from '../../modules/Imitator/ImitatorNoAccessWarning'\r\n\r\nexport const buildEmailRow = (\r\n email: string | undefined,\r\n label: string,\r\n isImitator?: boolean,\r\n showModal?: boolean,\r\n setShowImitatorModal?: (show: boolean) => void\r\n): Row => {\r\n return {\r\n label: '',\r\n value: '',\r\n useContent: true,\r\n content: email ? (\r\n <>\r\n {\r\n if (isImitator) {\r\n e.preventDefault()\r\n setShowImitatorModal(true)\r\n }\r\n }}\r\n style={{\r\n display: 'flex',\r\n width: '100%',\r\n justifyContent: 'space-between',\r\n }}\r\n >\r\n
    \r\n \r\n {label}\r\n \r\n \r\n {email || '-'}\r\n \r\n
    \r\n \r\n \r\n setShowImitatorModal(false)}\r\n />\r\n \r\n ) : (\r\n <>\r\n
    \r\n \r\n {label}\r\n \r\n \r\n {email || '-'}\r\n \r\n
    \r\n \r\n \r\n ),\r\n }\r\n}\r\n\r\nconst useStyles = createUseStyles({\r\n container: {\r\n color: colors.black,\r\n padding: '0 1.5rem',\r\n [`@media (min-width: ${breakpoints.Desktop}px)`]: {\r\n '&': {\r\n gridTemplateColumns: '1fr 1fr 1fr',\r\n padding: '0 0 5rem',\r\n },\r\n },\r\n },\r\n profileHeader: {\r\n display: 'flex',\r\n justifyContent: 'space-between',\r\n alignItems: 'center',\r\n padding: '1.5rem 0',\r\n },\r\n nameContainer: {\r\n position: 'relative',\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'flex-start',\r\n },\r\n headerArea: {\r\n display: 'flex',\r\n padding: '.5rem 0',\r\n minHeight: '5rem',\r\n },\r\n header: {\r\n display: 'grid',\r\n gridTemplateColumns: '2fr 1fr',\r\n gap: '1.5rem',\r\n },\r\n headerActions: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n },\r\n edit: {\r\n display: 'flex',\r\n flexBasis: '50%',\r\n alignItems: 'center',\r\n justifyContent: 'flex-end',\r\n },\r\n section: {\r\n marginBottom: '3rem',\r\n\r\n '& > hr': {\r\n opacity: '0.2',\r\n margin: '1.25rem 0',\r\n },\r\n },\r\n button: {\r\n ...baseButton,\r\n ...{\r\n cursor: 'pointer',\r\n },\r\n },\r\n buttons: {\r\n width: '100%',\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n flexDirection: 'column',\r\n '& button': {\r\n margin: '10px 0',\r\n width: '100%',\r\n },\r\n },\r\n editButton: {\r\n display: 'flex',\r\n justifyContent: 'flex-end',\r\n },\r\n iconWrapper: {\r\n position: 'relative',\r\n width: '90px',\r\n marginRight: '30px',\r\n },\r\n notes: {\r\n marginTop: 'auto',\r\n },\r\n})\r\n\r\nconst MemberProfile: React.FC = () => {\r\n const classes = useStyles()\r\n const params = useParams()\r\n const [data, _setData] = useState(undefined)\r\n const [showImitatorModal, setShowImitatorModal] = useState(false)\r\n const [backurl, setbackUrl] = useState('/')\r\n const [selectedWorkplace, setSelectedWorkplace] = useState<\r\n Workplace | undefined\r\n >(undefined)\r\n const [searchParams] = useSearchParams()\r\n const [authProfile] = useAtom(profileAtom)\r\n\r\n const init = async (id: string): Promise => {\r\n const response = await getOwnMember(id)\r\n const { data: profileData } = response\r\n const profile = Member.build(profileData)\r\n _setData(profile)\r\n return response\r\n }\r\n\r\n useEffect(() => {\r\n const { id } = params\r\n\r\n if (id) {\r\n init(id)\r\n\r\n if (searchParams.get('backUrl')) {\r\n setbackUrl(searchParams.get('backUrl'))\r\n }\r\n }\r\n }, [params, searchParams])\r\n\r\n useEffect(() => {\r\n if (data && data.primaryWorkPlace && !selectedWorkplace) {\r\n setSelectedWorkplace(data.primaryWorkPlace)\r\n }\r\n }, [data])\r\n\r\n const getPositionName = (): string => {\r\n const id = data.primaryWorkPlace.postionNumber\r\n const group = data.positions.find((pos) => +pos.id === +id)\r\n return group.name || '-'\r\n }\r\n\r\n const getGroupName = (): string => {\r\n const id = data.primaryWorkPlace.postionNumber\r\n const group = data.positions.find((pos) => +pos.id === +id)\r\n return group.group.name || '-'\r\n }\r\n\r\n const getPersonalInfoRows = (member: Member): Row[] => {\r\n return [\r\n buildRow(\r\n formatDate(member.birthday),\r\n L('GENERISK_FORM_FØDSELDAG_LABEL')\r\n ),\r\n buildRow(\r\n member.age ? `${member.age} år` : '-',\r\n L('GENERISK_FORM_ALDER_LABEL')\r\n ),\r\n ]\r\n }\r\n\r\n const getWorkInfo = (workplace: Workplace): Row[] => {\r\n let customedGmapsUrl = ''\r\n if (workplace && workplace.address) {\r\n const {\r\n addressLine1,\r\n addressLine2,\r\n addressLine3,\r\n postDistrict,\r\n postNumber,\r\n } = workplace?.address\r\n\r\n customedGmapsUrl = `https://www.google.com/maps/search/?api=1&query=${addressLine1}+${addressLine2}+${addressLine3}%2C+${postNumber}+${postDistrict}`\r\n }\r\n\r\n const rows: Row[] = []\r\n\r\n if (customedGmapsUrl !== '') {\r\n rows.push({\r\n label: '',\r\n value: '',\r\n useContent: !!customedGmapsUrl,\r\n content: !!customedGmapsUrl && (\r\n \r\n \r\n Arbejdssted\r\n \r\n \r\n {workplace.name}\r\n \r\n \r\n
    \r\n ),\r\n })\r\n } else {\r\n rows.push(buildRow(workplace?.name, 'Arbejdssted'))\r\n }\r\n\r\n const defaults = [\r\n ...rows,\r\n ...[\r\n buildRow(getPositionName(), L('GENERISK_FORM_STILLING_LABEL')),\r\n buildRow(\r\n workplace?.hoursPerWeek,\r\n L('GENERISK_FORM_TIMETAL_LABEL')\r\n ),\r\n buildRow(getGroupName(), L('GENERISK_FORM_FAGGRUPPE_LABEL')),\r\n ],\r\n ]\r\n defaults.push({\r\n label: '',\r\n value: '',\r\n useContent: true,\r\n content: (\r\n
    \r\n {data ? : null}\r\n {data ? : null}\r\n
    \r\n ),\r\n })\r\n\r\n return defaults\r\n }\r\n\r\n const getContactInfoRows = (member: Member): Row[] => {\r\n let workContact: Contact | undefined\r\n\r\n if (selectedWorkplace) {\r\n workContact = member.contactInfoList.find(\r\n (wc) =>\r\n wc.contactInfoType === 'Arbejde' &&\r\n wc.workPlacesContact.number === selectedWorkplace.number\r\n )\r\n }\r\n\r\n return [\r\n buildRow(\r\n member.privateContact?.mobileShow ||\r\n (member.privateContact?.isTelefonPrivate\r\n ? 'Hemmeligt nummer'\r\n : '-'),\r\n 'Privat mobil'\r\n ),\r\n buildEmailRow(\r\n member.privateContact?.email,\r\n L('GENERISK_FORM_PRIVAT-EMAIL_LABEL'),\r\n authProfile.isImitator,\r\n showImitatorModal,\r\n setShowImitatorModal\r\n ),\r\n buildRow(\r\n workContact?.telephone ||\r\n (workContact?.isTelefonPrivate ? 'Hemmeligt nummer' : '-'),\r\n L('GENERISK_FORM_ARBEDJSPLADS-MOBIL_LABEL')\r\n ),\r\n buildEmailRow(\r\n workContact?.email,\r\n L('GENERISK_FORM_ARBEJDSMAIL_LABEL'),\r\n authProfile.isImitator,\r\n showImitatorModal,\r\n setShowImitatorModal\r\n ),\r\n ]\r\n }\r\n\r\n const buildTOR = (member: Member): JSX.Element => {\r\n return (\r\n
    \r\n \r\n {L('GENERISK_FORM_TILLIDSHVERV_LABEL')}\r\n \r\n <>\r\n {member.typeOfRepresentatives.map((type) => {\r\n return (\r\n \r\n {type.name}\r\n \r\n )\r\n })}\r\n \r\n
    \r\n )\r\n }\r\n\r\n const getMembershipInfoRows = (member: Member): Row[] => {\r\n return [\r\n buildRow(\r\n member.memberNumber,\r\n L('GENERISK_FORM_MEDLEMSNUMMER_LABEL')\r\n ),\r\n buildRow(\r\n member.membershipInfo.name,\r\n L('GENERISK_FORM_FOAAFDELING_LABEL')\r\n ),\r\n buildRow(\r\n formatDate(new Date(member.membershipInfo.date)),\r\n L('GENERISK_FORM_INDMELDELSESDATO_LABEL')\r\n ),\r\n {\r\n label: '',\r\n value: '',\r\n useContent: true,\r\n content: buildTOR(member),\r\n },\r\n ]\r\n }\r\n\r\n const onClickFavorite = async (member: Member): Promise => {\r\n const callback = member.isFavorite ? removeFavorite : setFavorite\r\n\r\n const response = await callback(`${member.memberId}`, 'MedlemIdent')\r\n\r\n if (response) {\r\n const { id } = params\r\n if (id) {\r\n init(id)\r\n }\r\n }\r\n }\r\n\r\n if (!data) return \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 {getInitials(data.fullName)}\r\n \r\n \r\n {\r\n e.stopPropagation()\r\n e.preventDefault()\r\n onClickFavorite(data)\r\n }}\r\n active={data.isFavorite}\r\n size={24}\r\n right=\"-15px\"\r\n bottom=\"-2px\"\r\n />\r\n
    \r\n\r\n \r\n {data.fullName}\r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n {data ? (\r\n
    \r\n \r\n init(String(member.memberId))\r\n }\r\n />\r\n
    \r\n ) : null}\r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n }\r\n titleLabel={L(\r\n 'MINEMEDLEMMER_DETALJE_PERSONLIGEOPLYSNINGER-TITEL'\r\n )}\r\n rows={getPersonalInfoRows(data)}\r\n key=\"Personlige oplysninger\"\r\n />\r\n }\r\n titleLabel={L(\r\n 'MINEMEDLEMMER_DETALJE_FOAMEDLEMSSKAB-TITEL'\r\n )}\r\n rows={getMembershipInfoRows(data)}\r\n key=\"FOA medlemsskab\"\r\n />\r\n
    \r\n {/* }\r\n titleLabel={L('GENERISK_FORM_ANSÆTTELSE_TITEL')}\r\n rows={getWorkInfo(data.primaryWorkPlace)}\r\n key={data.primaryWorkPlace?.address?.id}\r\n /> */}\r\n\r\n {selectedWorkplace ? (\r\n \r\n
    \r\n {data ? (\r\n \r\n ) : null}\r\n {data ? (\r\n \r\n ) : null}\r\n
    \r\n \r\n }\r\n />\r\n ) : null}\r\n }\r\n titleLabel={L('MINEMEDLEMMER_DETALJE_KONTAKT-TITEL')}\r\n rows={getContactInfoRows(data)}\r\n key=\"Kontakt\"\r\n />\r\n
    \r\n
    \r\n
    \r\n )\r\n}\r\n\r\nexport { MemberProfile }\r\n","import React, { FC, useEffect, useState } from 'react'\r\nimport { createUseStyles } from 'react-jss'\r\nimport { useForm } from 'react-hook-form'\r\nimport moment from 'moment'\r\nimport { useAtom } from 'jotai'\r\nimport { Button } from '../../ui/Button/Button'\r\nimport { SendFill, Info, SuitcaseFill, AddContact } from '../../../assets/icons'\r\nimport { Circle } from '../../ui/Card'\r\nimport { CircleIcon } from '../../ui/Circle/Circle'\r\nimport { Typography } from '../../ui/Typography/Typography'\r\nimport { IUpdateMemberData, Member } from '../../../models/Member'\r\nimport { Position } from '../../../models/Position'\r\nimport { getWorkplacesAndPositions } from '../../../api/misc'\r\nimport { colors } from '../../../theme/palette'\r\nimport { DatePickerComponent } from '../../ui/FormElememts/DatePicker'\r\nimport { FormControl } from '../../ui/FormElememts/FormControl'\r\nimport { FormHeader } from '../../ui/FormElememts/FormHeader'\r\nimport { baseButton } from '../../../theme/reuseables'\r\nimport { Overlay } from '../../ui/Sidebar'\r\nimport { Dialog } from '../../ui/Dialog/Dialog'\r\nimport { addMemberToOwnList } from '../../../api/members/members'\r\nimport { Workplace } from '../../../models/Workplace'\r\nimport { DrawerHeaderMemberInfo } from '../FormElements/DrawerHeader'\r\nimport {\r\n FormInputNumber,\r\n FormTextArea,\r\n FormSelect,\r\n} from '../FormElements/FormInput'\r\nimport { FormMessage } from '../../ui/FormElememts/FormMessage'\r\nimport { L, L_HTML } from '../../providers/Lokalise'\r\nimport { Select } from '../../ui/FormElememts/Select'\r\nimport Checkbox from '../../ui/FormElememts/Checkbox'\r\nimport { ImitatorNoAccessWarning } from '../Imitator/ImitatorNoAccessWarning'\r\nimport { profileAtom } from '../../../api/profile/profile'\r\n\r\ninterface EditProps {\r\n member: Member\r\n}\r\n\r\nconst useStyles = createUseStyles({\r\n contentWrapper: {\r\n padding: '100px 20px 20px',\r\n overflow: 'auto',\r\n height: 'calc(100% - 100px)',\r\n paddingBottom: '80px',\r\n },\r\n accordionWrapper: {\r\n marginBottom: '20px',\r\n },\r\n select: {\r\n position: 'relative',\r\n height: '3.125rem',\r\n backgroundColor: colors.white,\r\n border: `1px solid ${colors.borderColor}`,\r\n borderRadius: '6px',\r\n width: '100%',\r\n fontSize: '1.125rem',\r\n paddingLeft: '.75rem',\r\n paddingRight: '.75rem',\r\n cursor: 'pointer',\r\n color: colors.labelColor,\r\n },\r\n button: {\r\n ...baseButton,\r\n ...{\r\n cursor: 'pointer',\r\n },\r\n },\r\n bottom: {\r\n display: 'flex',\r\n position: 'absolute',\r\n bottom: '0',\r\n width: '100%',\r\n padding: '20px',\r\n left: '0',\r\n background: colors.white,\r\n zIndex: 4,\r\n borderTop: `1px solid ${colors.borderColor}`,\r\n '& > button': {\r\n flexGrow: 1,\r\n },\r\n '& > button:last-of-type': {\r\n marginRight: '0',\r\n },\r\n },\r\n})\r\n\r\nexport type RegistrationFormFields = {\r\n Timetal?: string\r\n OevrigeOplysninger?: string\r\n Arbejdsstednummer?: string\r\n Stillingsnummer?: string\r\n Aendringsdato?: string\r\n}\r\n\r\nexport type CustomErrors = {\r\n Aendringsdato?: boolean\r\n}\r\n\r\nexport const AddMemberToOwnList: FC = ({ member }) => {\r\n const { register, formState, reset, handleSubmit, setValue } =\r\n useForm()\r\n const classes = useStyles()\r\n const [authProfile] = useAtom(profileAtom)\r\n const [workPlaces, setWorkplaces] = useState([])\r\n const [positions, setPositions] = useState([])\r\n const [selectedDate, _setSelectedDate] = useState(null)\r\n const [customErrors, setCustomErrors] = useState({})\r\n const [isOpen, setIsOpen] = useState(false)\r\n const [showDialog, setShowDialog] = useState(false)\r\n const [isValid, setIsValid] = useState(false)\r\n const [onCallSubstitute, setOnCallSubstitute] = useState(false)\r\n const [values, setValues] = useState({\r\n Timetal: undefined,\r\n OevrigeOplysninger: undefined,\r\n Arbejdsstednummer: undefined,\r\n Stillingsnummer: undefined,\r\n })\r\n\r\n const [selectedPostion, setSelectedPosition] = useState(\r\n undefined\r\n )\r\n const [selectedWorkplace, setSelectedWorkplace] = useState<\r\n string | undefined\r\n >(undefined)\r\n\r\n const getPositions = async (): Promise => {\r\n const response = await getWorkplacesAndPositions()\r\n setWorkplaces(response.workPlaces)\r\n }\r\n\r\n const { dirtyFields, errors } = formState\r\n const [showImitatorModal, setShowImitatorModal] = useState(false)\r\n const resetForm = (): void => {\r\n _setSelectedDate(null)\r\n setSelectedWorkplace('default')\r\n setSelectedPosition('default')\r\n setCustomErrors({})\r\n reset()\r\n }\r\n\r\n useEffect(() => {\r\n console.log(errors, 'errors')\r\n }, [errors])\r\n\r\n useEffect(() => {\r\n register('Timetal')\r\n getPositions()\r\n }, [])\r\n\r\n useEffect(() => {\r\n let valid = false\r\n\r\n valid =\r\n !!selectedDate &&\r\n !!selectedPostion &&\r\n selectedPostion !== 'default' &&\r\n !!selectedWorkplace\r\n setIsValid(valid)\r\n }, [values, selectedPostion, selectedWorkplace, selectedDate, formState])\r\n\r\n const setWP = (wp: string): void => {\r\n const found = workPlaces.find(\r\n (wpp) => Number(wpp.number) === Number(wp)\r\n )\r\n setSelectedWorkplace(wp)\r\n setSelectedPosition('default')\r\n\r\n if (found && found.positions) {\r\n setPositions(found.positions)\r\n }\r\n }\r\n\r\n const submitHandler = async (\r\n data: RegistrationFormFields\r\n ): Promise => {\r\n if (authProfile.isImitator) {\r\n setShowImitatorModal(true)\r\n return Promise.resolve('OK')\r\n }\r\n\r\n const fieldsToEdit: IUpdateMemberData = {\r\n Medlemsident: member.memberId,\r\n Aendringsdato: moment(selectedDate).format('YYYY-MM-DD HH:mm:ss'),\r\n Arbejdsstednummer: Number(selectedWorkplace),\r\n Stillingsnummer: selectedPostion || String(member.positions[0].id),\r\n }\r\n\r\n if (dirtyFields.Timetal) {\r\n fieldsToEdit.Timetal = Number(\r\n String(data.Timetal).replace(',', '.')\r\n )\r\n }\r\n\r\n if (dirtyFields.OevrigeOplysninger) {\r\n fieldsToEdit.OevrigeOplysninger = data.OevrigeOplysninger\r\n }\r\n\r\n if (onCallSubstitute) {\r\n if (fieldsToEdit.OevrigeOplysninger) {\r\n fieldsToEdit.OevrigeOplysninger = `${fieldsToEdit.OevrigeOplysninger} - Tilkaldevikar`\r\n } else {\r\n fieldsToEdit.OevrigeOplysninger = 'Tilkaldevikar'\r\n }\r\n }\r\n\r\n if (!selectedDate) {\r\n return Promise.resolve('OK')\r\n }\r\n\r\n const response = await addMemberToOwnList(fieldsToEdit)\r\n\r\n if (response) {\r\n setIsOpen(false)\r\n setShowDialog(true)\r\n resetForm()\r\n }\r\n\r\n return Promise.resolve('OK')\r\n }\r\n\r\n return (\r\n <>\r\n setIsOpen(true)}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n \r\n {L('ALLEMEDLEMMER_TILFØJ-TIL-MIN-ARBEJDSPLADS_TEKST')}\r\n \r\n \r\n {\r\n setIsOpen(false)\r\n resetForm()\r\n }}\r\n >\r\n \r\n \r\n \r\n {L('ALLEMEDLEMMER_TILFØJ-TIL-MIN-ARBEJDSPLADS_TEKST')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {L_HTML('GENERISK_FORM_ANSÆTTELSE_TITEL')}\r\n \r\n \r\n \r\n \r\n {\r\n setWP(e.target.value)\r\n setValue(\r\n 'Arbejdsstednummer',\r\n e.target.value\r\n )\r\n },\r\n }}\r\n options={workPlaces.map((wp) => {\r\n const o = {\r\n label: wp.name,\r\n value: String(wp.number),\r\n }\r\n\r\n return o\r\n })}\r\n />\r\n \r\n \r\n \r\n {\r\n setSelectedPosition(e.target.value)\r\n setValue('Stillingsnummer', e.target.value)\r\n },\r\n }}\r\n options={positions.map((pos) => {\r\n const o = {\r\n label: pos.name,\r\n value: String(pos.id),\r\n }\r\n\r\n return o\r\n })}\r\n />\r\n \r\n \r\n \r\n \r\n (Number(String(value).replace(',', '.')) >=\r\n 0.5 &&\r\n Number(\r\n String(value).replace(',', '.')\r\n ) <= 99) ||\r\n L(\r\n 'GENERISK_FORM_TIMETAL_VALIDERINGS_TEKST'\r\n ),\r\n }}\r\n />\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {L_HTML(\r\n 'GENERISK_FORM_YDERLIGERE-OPLYSNINGER_TITEL'\r\n )}\r\n \r\n \r\n \r\n {\r\n setCustomErrors({})\r\n _setSelectedDate(e)\r\n }}\r\n minDate={moment().subtract(1, 'year').toDate()}\r\n maxDate={moment().add(1, 'year').toDate()}\r\n hasError={!!customErrors?.Aendringsdato}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n setOnCallSubstitute(!onCallSubstitute)\r\n }}\r\n />\r\n \r\n
    \r\n {\r\n setIsOpen(false)\r\n resetForm()\r\n }}\r\n type=\"secondary\"\r\n size=\"large\"\r\n >\r\n Annuller\r\n \r\n {\r\n if (!selectedDate) {\r\n setCustomErrors({\r\n Aendringsdato: true,\r\n })\r\n }\r\n }}\r\n >\r\n {L(\r\n 'ALLEMEDLEMMER_TILFØJ-TIL-MIN-ARBEJDSPLADS_KNAP'\r\n )}\r\n \r\n
    \r\n\r\n
    \r\n \r\n \r\n {showDialog ? (\r\n }\r\n >\r\n \r\n {L_HTML(\r\n 'TILFØJ-MEDLEM-TIL-EGEN-LISTE_POPUP_OVERSKRIFT'\r\n )}\r\n \r\n \r\n {L_HTML('TILFØJ-MEDLEM-TIL-EGEN-LISTE_POPUP_TEXT')}\r\n \r\n \r\n \r\n ) : null}\r\n setShowImitatorModal(false)}\r\n />\r\n \r\n )\r\n}\r\n","import React, { useEffect, useState } from 'react'\r\nimport { createUseStyles } from 'react-jss'\r\n\r\nimport { useParams } from 'react-router-dom'\r\nimport { useAtom } from 'jotai'\r\nimport { getInitials } from '../../../utils/initials'\r\n\r\nimport { colors } from '../../../theme/palette'\r\nimport { CircleText, CircleIcon2 } from '../../ui/Circle/Circle'\r\nimport { CardColumn, Row } from '../../ui/Card/CardColumn'\r\nimport { Typography } from '../../ui/Typography/Typography'\r\nimport {\r\n SuitcaseFill,\r\n Foa,\r\n PersonalInfo,\r\n ContactLedger,\r\n} from '../../../assets/icons'\r\nimport { CardColumnContainer } from '../../ui/Card/CardColumnContainer'\r\nimport { getMemberAfterSearch } from '../../../api/members/members'\r\nimport { Member } from '../../../models/Member'\r\nimport { Loader } from '../../ui/Loaders/Loader'\r\n// import { EditMemberProfile } from '../../modules/EditMemberProfile'\r\nimport { AddMemberToOwnList } from '../../modules/AddMemberToOwnList'\r\nimport { buildRow } from '../MyProfile'\r\nimport { formatDate } from '../../../utils/format'\r\nimport { GmapsLink } from '../../ui/GmapsLink/GmapsLink'\r\nimport { Workplace } from '../../../models/Workplace'\r\nimport { BackLink } from '../../ui/BackLink'\r\nimport { getAge } from '../../../utils/utils'\r\nimport { L } from '../../providers/Lokalise'\r\nimport { profileAtom } from '../../../api/profile/profile'\r\nimport breakpoints from '../../../theme/breakpoints'\r\nimport { Spinner } from '../../ui/Loaders/Spinner'\r\nimport { buildEmailRow } from '../MemberProfile'\r\n\r\nconst useStyles = createUseStyles({\r\n container: {\r\n color: colors.black,\r\n padding: '0 24px',\r\n [`@media (min-width: ${breakpoints.Desktop}px)`]: {\r\n '&': {\r\n padding: 0,\r\n },\r\n },\r\n },\r\n profileHeader: {\r\n display: 'flex',\r\n justifyContent: 'space-between',\r\n alignItems: 'center',\r\n padding: '3rem 0',\r\n },\r\n nameContainer: {\r\n display: 'flex',\r\n flexBasis: '50%',\r\n alignItems: 'center',\r\n justifyContent: 'flex-start',\r\n },\r\n edit: {\r\n display: 'flex',\r\n flexBasis: '50%',\r\n alignItems: 'center',\r\n justifyContent: 'flex-end',\r\n },\r\n section: {\r\n marginBottom: '3rem',\r\n\r\n '& > hr': {\r\n opacity: '0.2',\r\n margin: '1.25rem 0',\r\n },\r\n },\r\n iconWrapper: {\r\n position: 'relative',\r\n width: '90px',\r\n marginRight: '30px',\r\n },\r\n})\r\n\r\nconst MemberProfileFromSearch: React.FC = () => {\r\n const classes = useStyles()\r\n const params = useParams()\r\n const [authProfile] = useAtom(profileAtom)\r\n const [showImitatorModal, setShowImitatorModal] = useState(false)\r\n\r\n const [data, _setData] = useState(undefined)\r\n const init = async (id: string): Promise => {\r\n const response = await getMemberAfterSearch(+id)\r\n const { data: profileData } = response\r\n const profile = Member.build(profileData)\r\n _setData(profile)\r\n return response\r\n }\r\n\r\n useEffect(() => {\r\n const { id } = params\r\n\r\n if (id) {\r\n init(id)\r\n }\r\n }, [params])\r\n\r\n const getPositionName = (): string => {\r\n const id = data.primaryWorkPlace.postionNumber\r\n const group = data.positions.find((pos) => +pos.id === +id)\r\n return group.name || '-'\r\n }\r\n\r\n const getGroupName = (): string => {\r\n const id = data.primaryWorkPlace.postionNumber\r\n const group = data.positions.find((pos) => +pos.id === +id)\r\n return group.group.name || '-'\r\n }\r\n\r\n const getPersonalInfoRows = (member: Member): Row[] => {\r\n return [\r\n buildRow(formatDate(member.birthday), 'Fødselsdag'),\r\n // buildRow(member.age ? `${member.age} år` : '-', 'Alder'),\r\n buildRow(\r\n member.birthday\r\n ? `${getAge(member.birthday.getFullYear())} år`\r\n : null,\r\n L('GENERISK_FORM_ALDER_LABEL')\r\n ),\r\n ]\r\n }\r\n\r\n const getWorkInfo = (workplace: Workplace): Row[] => {\r\n let customedGmapsUrl = ''\r\n if (workplace?.address) {\r\n const {\r\n addressLine1,\r\n addressLine2,\r\n addressLine3,\r\n postDistrict,\r\n postNumber,\r\n } = workplace?.address\r\n customedGmapsUrl = `https://www.google.com/maps/search/?api=1&query=${addressLine1}+${addressLine2}+${addressLine3}%2C+${postNumber}+${postDistrict}`\r\n }\r\n\r\n const rows: Row[] = []\r\n\r\n if (customedGmapsUrl !== '') {\r\n rows.push({\r\n label: '',\r\n value: '',\r\n useContent: !!customedGmapsUrl,\r\n content: !!customedGmapsUrl && (\r\n \r\n \r\n {L('GENERISK_FORM_ARBEJDSSTED_LABEL')}\r\n \r\n \r\n {workplace.name}\r\n \r\n \r\n
    \r\n ),\r\n })\r\n } else {\r\n rows.push(buildRow(workplace?.name, 'Arbejdssted'))\r\n }\r\n\r\n return [\r\n ...rows,\r\n ...[\r\n buildRow(getPositionName(), L('GENERISK_FORM_STILLING_LABEL')),\r\n buildRow(\r\n workplace?.hoursPerWeek,\r\n L('GENERISK_FORM_TIMETAL_LABEL')\r\n ),\r\n buildRow(getGroupName(), 'Faggruppe'),\r\n ],\r\n ]\r\n }\r\n\r\n const getContactInfoRows = (member: Member): Row[] => {\r\n return [\r\n buildRow(\r\n member.privateContact?.mobileShow || '-',\r\n L('GENERISK_FORM_PRIVAT-MOBIL_LABEL')\r\n ),\r\n buildEmailRow(\r\n member.privateContact?.email,\r\n L('GENERISK_FORM_PRIVAT-EMAIL_LABEL'),\r\n authProfile.isImitator,\r\n showImitatorModal,\r\n setShowImitatorModal\r\n ),\r\n ]\r\n }\r\n\r\n const buildTOR = (member: Member): JSX.Element => {\r\n return (\r\n
    \r\n \r\n {L('GENERISK_FORM_TILLIDSHVERV_LABEL')}\r\n \r\n <>\r\n {member.typeOfRepresentatives.map((type) => {\r\n return (\r\n \r\n {type.name}\r\n \r\n )\r\n })}\r\n \r\n
    \r\n )\r\n }\r\n\r\n const getMembershipInfoRows = (member: Member): Row[] => {\r\n const rows = [\r\n buildRow(\r\n member.memberNumber,\r\n L('GENERISK_FORM_MEDLEMSNUMMER_LABEL')\r\n ),\r\n buildRow(\r\n member.membershipInfo.name,\r\n L('GENERISK_FORM_FOAAFDELING_LABEL')\r\n ),\r\n ]\r\n\r\n if (member.typeOfRepresentatives.length) {\r\n rows.push({\r\n label: '',\r\n value: '',\r\n useContent: true,\r\n content: buildTOR(member),\r\n })\r\n }\r\n\r\n return rows\r\n }\r\n\r\n if (!data) return \r\n\r\n return (\r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n {getInitials(data.fullName)}\r\n \r\n \r\n
    \r\n \r\n {data.fullName}\r\n \r\n
    \r\n
    \r\n {data ? : null}\r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n }\r\n titleLabel={L(\r\n 'ALLEMEDLEMMER_DETALJE_PERSONLIGE-OPLYSNINGER_TITEL'\r\n )}\r\n rows={getPersonalInfoRows(data)}\r\n key=\"Personlige oplysninger\"\r\n />\r\n\r\n }\r\n titleLabel={L(\r\n 'ALLEMEDLEMMER_DETALJE_FOAMEDLEMSSKAB-TITEL'\r\n )}\r\n rows={getMembershipInfoRows(data)}\r\n key=\"FOA medlemsskab\"\r\n />\r\n
    \r\n\r\n }\r\n titleLabel={L('GENERISK_FORM_ANSÆTTELSE_TITEL')}\r\n rows={getWorkInfo(data.primaryWorkPlace)}\r\n key={data.primaryWorkPlace?.address?.id}\r\n />\r\n\r\n }\r\n titleLabel={L('ALLEMEDLEMMER_DETALJE_KONTAKT_TITEL')}\r\n rows={getContactInfoRows(data)}\r\n key=\"Kontakt\"\r\n />\r\n
    \r\n
    \r\n
    \r\n )\r\n}\r\n\r\nexport { MemberProfileFromSearch }\r\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/no-use-before-define */\nimport React, { useEffect } from 'react'\nimport ReactDOM from 'react-dom'\n\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport { createUseStyles } from 'react-jss'\nimport moment from 'moment'\nimport breakpoints from '../../../theme/breakpoints'\nimport { colors } from '../../../theme/palette'\nimport { zIndexes } from '../../../theme/zIndex'\nimport { Close as CloseIcon, Tips as TipsIcon } from '../../../assets/icons'\nimport { baseButton } from '../../../theme/reuseables'\nimport { L_HTML } from '../../providers/Lokalise'\n\nconst useStyles = createUseStyles(() => ({\n '@keyframes slideRight': {\n from: {\n transform: 'translateY(20px)',\n opacity: 0,\n },\n to: {\n transform: 'translateY(0)',\n opacity: 1,\n },\n },\n containerBG: {\n position: 'fixed',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n left: '0',\n top: '0',\n height: '100vh',\n width: '100%',\n zIndex: zIndexes.drawer,\n backgroundColor: 'rgba(0, 0, 0, 0.5)',\n padding: '1rem',\n visibility: 'hidden',\n '&.active': {\n visibility: 'visible',\n },\n },\n container: {\n display: 'flex',\n borderRadius: '10px',\n flexDirection: 'column',\n width: '1200px',\n maxWidth: '100%',\n minHeight: '65vh',\n maxHeight: '100%',\n animation: `.3s $slideRight forwards`,\n visibility: 'visible',\n overflow: 'auto',\n right: 0,\n boxShadow: '0px 0px 16px rgba(0, 0, 0, 0.25)',\n [`@media (min-width: ${breakpoints.Desktop}px)`]: {\n '&': {\n flexDirection: 'row',\n },\n },\n },\n left: {\n backgroundColor: colors.white,\n padding: '2rem',\n paddingTop: '2.5rem',\n [`@media (min-width: ${breakpoints.Desktop}px)`]: {\n '&': {\n paddingRight: '5rem',\n },\n },\n },\n right: {\n backgroundColor: colors.gray,\n color: colors.gray900,\n padding: '2rem',\n paddingTop: '3rem',\n flexGrow: 1,\n },\n headline: {\n fontSize: '2rem',\n [`@media (min-width: ${breakpoints.Desktop}px)`]: {\n '&': {\n fontSize: '2.5rem',\n },\n },\n },\n headlines: {\n fontWeight: 'normal',\n marginBottom: '2rem',\n },\n leftText: {\n fontWeight: 'normal',\n marginBottom: '1rem',\n },\n list: {\n position: 'relative',\n },\n listItem: {\n position: 'relative',\n listStyle: 'none',\n marginBottom: '2rem',\n },\n\n listItemBold: {\n fontWeight: 'bold',\n marginBottom: '0.5rem',\n },\n listItemSpan: {\n position: 'absolute',\n left: '-28px',\n },\n video: {\n [`@media (max-width: ${breakpoints.Desktop}px)`]: {\n '&': {\n maxWidth: '100%',\n height: 'auto',\n aspectRatio: '16 / 9',\n },\n },\n },\n button: {\n position: 'absolute',\n zIndex: zIndexes.drawer + 1,\n right: 0,\n top: 0,\n display: 'inline-block',\n margin: '10px 10px 0',\n borderRadius: '6px',\n boxSizing: 'border-box',\n textDecoration: 'none',\n fontWeight: 400,\n textAlign: 'center',\n transition: 'all 0.2s',\n background: 'transparent',\n boxShadow: 0,\n padding: 0,\n height: '40px',\n width: '40px',\n '&:hover': {\n cursor: 'pointer',\n },\n '-webkit-appearance': 'none',\n '-moz-appearance': 'none',\n border: '0',\n '&:hover svg': {\n fill: colors.gray500,\n },\n },\n primaryButton: {\n ...baseButton,\n backgroundColor: colors.green500,\n color: colors.white,\n marginLeft: 'auto',\n marginTop: '5rem',\n '&:hover': {\n backgroundColor: colors.green600,\n },\n },\n}))\n\nconst FirstLoginInfo: React.FC<{\n showVideo: boolean\n setClose: () => void\n}> = ({ showVideo, setClose }) => {\n const node = React.useRef(null)\n const classes = useStyles()\n\n const [isShowing, setIsShowing] = React.useState(false)\n\n useEffect(() => {\n const loginData = localStorage.getItem('Login_data')\n const today = moment()\n if (loginData) {\n const loginJson = JSON.parse(loginData)\n const isMoreThanSixMonths = today.diff(loginJson.date, 'months') > 6\n\n if (!loginJson.agreed || isMoreThanSixMonths) {\n setIsShowing(true)\n }\n } else {\n const data = {\n date: today.format('YYYYMMDD'),\n agreed: false,\n }\n localStorage.setItem('Login_data', JSON.stringify(data))\n setIsShowing(true)\n }\n }, [])\n\n useEffect(() => {\n if (showVideo) {\n setIsShowing(true)\n }\n }, [showVideo])\n\n const closeInfo = (): void => {\n const today = moment()\n const data = {\n date: today.format('YYYYMMDD'),\n agreed: true,\n }\n localStorage.setItem('Login_data', JSON.stringify(data))\n setIsShowing(false)\n }\n\n React.useEffect(() => {\n if (isShowing) {\n document.body.style.overflow = 'hidden'\n } else {\n document.body.style.overflow = 'unset'\n }\n }, [isShowing])\n\n if (!isShowing) {\n return null\n }\n return ReactDOM.createPortal(\n \n
    \n {\n setIsShowing(false)\n setClose()\n }}\n >\n \n \n
    \n

    \n {L_HTML('first_login_welcome_text')}\n

    \n

    \n {L_HTML('first_login_video_text')}\n

    \n \n {/* text needed */}\n

    {L_HTML('first_login_help_text')}

    \n
    \n
    \n

    \n {L_HTML('first_login_list_heading')}\n

    \n
      \n
    • \n \n \n \n

      \n {L_HTML('first_login_listitem_1_heading')}\n

      \n

      {L_HTML('first_login_listitem_1_text')}

      \n
    • \n
    • \n \n \n \n

      \n {L_HTML('first_login_listitem_2_heading')}\n

      \n

      {L_HTML('first_login_listitem_2_text')}

      \n
    • \n
    \n {\n closeInfo()\n setClose()\n }}\n >\n {L_HTML('first_login_button_text')}\n \n
    \n
    \n
    ,\n document.getElementById('root') as HTMLElement\n )\n}\n\nexport { FirstLoginInfo }\n","import React, { useEffect, useState } from 'react'\r\nimport { createUseStyles } from 'react-jss'\r\nimport { useContainerStyles } from '../../../theme/layout'\r\nimport { colors } from '../../../theme/palette'\r\nimport { Typography } from '../Typography/Typography'\r\nimport { getProfileSupportInfo } from '../../../api/profile/profile'\r\nimport breakpoints from '../../../theme/breakpoints'\r\nimport { formatPhoneNumber } from '../../../utils/format'\r\nimport { FirstLoginInfo } from '../../modules/FirstLoginModal/FirstLoginModal'\r\nimport { L_HTML } from '../../providers/Lokalise'\r\n\r\nconst useStyles = createUseStyles(() => ({\r\n container: {\r\n backgroundColor: colors.green500,\r\n width: '100%',\r\n minHeight: '20rem',\r\n zIndex: 1,\r\n padding: '20px',\r\n [`@media (min-width: ${breakpoints.Desktop}px)`]: {\r\n '&': {\r\n padding: '40px 0 0',\r\n },\r\n },\r\n },\r\n inner: {\r\n display: 'grid',\r\n gridTemplateColumns: '1fr',\r\n gap: '40px',\r\n height: '100%',\r\n [`@media (min-width: ${breakpoints.Desktop}px)`]: {\r\n '&': {\r\n gridTemplateColumns: '1fr 1fr 1fr',\r\n gap: '20%',\r\n },\r\n },\r\n },\r\n contactLink: {\r\n textDecoration: 'underline',\r\n color: 'inherit',\r\n cursor: 'pointer',\r\n '&:hover, &:focus, &:active': {\r\n opacity: '0.8',\r\n },\r\n },\r\n column: {},\r\n videoLink: {\r\n backgroundColor: 'transparent',\r\n color: 'inherit',\r\n border: 'none',\r\n fontSize: '1rem',\r\n textDecoration: 'underline',\r\n padding: '0',\r\n margin: '0',\r\n textAlign: 'start',\r\n cursor: 'pointer',\r\n '&:hover': {\r\n opacity: '0.8',\r\n },\r\n },\r\n}))\r\n\r\nconst Footer: React.FC = () => {\r\n const classes = useStyles()\r\n const layout = useContainerStyles()\r\n const [info, setInfo] = useState(undefined)\r\n const [showVideo, setShowVideo] = useState(false)\r\n const [col1, setCol1] = useState(undefined)\r\n\r\n useEffect(() => {\r\n const getInfo = async (): Promise => {\r\n const response = await getProfileSupportInfo()\r\n\r\n const found = response.data.KontaktoplysningerList.find(\r\n (item: any) => item.KontaktoplysningerType === 'Afdeling'\r\n )\r\n\r\n const firstColumn = response.data.KontaktoplysningerList.find(\r\n (item: any) => item.KontaktoplysningerType === 'TRHotline'\r\n )\r\n if (found) {\r\n setInfo(found)\r\n }\r\n if (firstColumn) {\r\n setCol1(firstColumn)\r\n }\r\n }\r\n\r\n getInfo()\r\n }, [])\r\n\r\n const closeVideo = (): void => {\r\n setShowVideo(false)\r\n }\r\n\r\n return (\r\n
    \r\n
    \r\n
    \r\n \r\n Tekniske udfordringer\r\n \r\n
    \r\n \r\n Kontakt hotline for tillidsvalgte:\r\n \r\n
    \r\n \r\n Tlf:{' '}\r\n {col1 && col1.Telefon\r\n ? formatPhoneNumber(col1.Telefon)\r\n : ''}\r\n \r\n
    \r\n \r\n \r\n {(col1 && col1.Email) || ''}\r\n \r\n \r\n
    \r\n
    \r\n \r\n Fejl i medlemsdata\r\n \r\n
    \r\n \r\n Kontakt din FOA-afdeling:\r\n \r\n
    \r\n \r\n Tlf:{' '}\r\n {info && info.Telefon\r\n ? formatPhoneNumber(info.Telefon)\r\n : ''}\r\n \r\n
    \r\n {info && info.Email ? (\r\n \r\n \r\n {(info && info.Email) || ''}\r\n \r\n \r\n ) : null}\r\n
    \r\n
    \r\n \r\n Andet\r\n \r\n
    \r\n \r\n setShowVideo(true)}\r\n className={classes.videoLink}\r\n >\r\n {L_HTML('first_login_footer_link_text')}\r\n \r\n \r\n
    \r\n \r\n \r\n Quick guide\r\n \r\n \r\n
    \r\n \r\n \r\n Brugervejledning\r\n \r\n \r\n
    \r\n \r\n \r\n Ideer/forslag?\r\n \r\n \r\n
    \r\n
    \r\n \r\n
    \r\n )\r\n}\r\n\r\nexport { Footer }\r\n","import React, { FC, useEffect, useRef, useState } from 'react'\r\nimport { useAtom } from 'jotai'\r\nimport { createUseStyles } from 'react-jss'\r\nimport { Member } from '../../../models/Member'\r\nimport { Note } from '../../../models/Note'\r\nimport { Overlay } from '../../ui/Sidebar'\r\nimport { DrawerHeaderMemberInfo } from '../FormElements/DrawerHeader'\r\nimport { AddNewNote } from './AddNewNote'\r\nimport { EditNote } from './EditNote'\r\nimport { getOwnMember, membersAtom } from '../../../api/members/members'\r\nimport { Button } from '../../ui/Button/Button'\r\nimport { CircleIcon2 } from '../../ui/Circle/Circle'\r\nimport { Archive, DeleteFill, EditFill } from '../../../assets/icons'\r\nimport { colors } from '../../../theme/palette'\r\n// import { L } from '../../providers/Lokalise'\r\n\r\nconst useStyles = createUseStyles({\r\n actions: {\r\n display: 'flex',\r\n position: 'relative',\r\n justifyContent: 'flex-end',\r\n },\r\n})\r\n\r\ntype ViewStates = 'default' | 'create' | 'edit' | 'delete'\r\n\r\ninterface EditMemberNotesProps {\r\n note: Note\r\n onUpdated?: () => void\r\n setShowDelete: (note: Note) => void\r\n}\r\n\r\nconst EditNoteFromPage: FC = ({\r\n note,\r\n onUpdated,\r\n setShowDelete,\r\n}) => {\r\n const [notes] = useState([])\r\n const [isOpen, setIsOpen] = useState(false)\r\n const [viewState, setViewState] = useState('edit')\r\n const [members] = useAtom(membersAtom)\r\n const [member, _setMember] = useState(undefined)\r\n\r\n const classes = useStyles()\r\n\r\n const setMember = async (id: number): Promise => {\r\n const response = await getOwnMember(String(id))\r\n\r\n _setMember(Member.build(response.data))\r\n }\r\n\r\n useEffect(() => {\r\n const findMember = (): void => {\r\n // init()\r\n const found = members.members.find(\r\n (m) => m.memberId === +note.referenceId\r\n )\r\n\r\n if (found && !member) {\r\n setMember(found.memberId)\r\n }\r\n }\r\n if (isOpen) {\r\n findMember()\r\n }\r\n }, [isOpen, member, members.members, note.referenceId])\r\n\r\n return (\r\n <>\r\n
    \r\n setShowDelete(note)}\r\n style={{ marginLeft: '20px' }}\r\n >\r\n \r\n \r\n \r\n \r\n {\r\n setViewState('edit')\r\n setIsOpen(true)\r\n }}\r\n >\r\n \r\n \r\n \r\n {' '}\r\n
    \r\n\r\n {\r\n setIsOpen(false)\r\n }}\r\n >\r\n \r\n\r\n {viewState === 'create' ? (\r\n 0}\r\n onClickCancel={() => {\r\n setViewState('default')\r\n if (notes.length === 0) {\r\n setIsOpen(false)\r\n }\r\n }}\r\n onUpdated={() => {\r\n setViewState('default')\r\n }}\r\n />\r\n ) : null}\r\n\r\n {viewState === 'edit' && note && isOpen ? (\r\n {\r\n setIsOpen(false)\r\n }}\r\n onUpdated={() => {\r\n setIsOpen(false)\r\n if (onUpdated) {\r\n onUpdated()\r\n }\r\n }}\r\n />\r\n ) : null}\r\n \r\n \r\n )\r\n}\r\n\r\nexport { EditNoteFromPage }\r\n","import React, { FC, useEffect, useState } from 'react'\r\nimport { createUseStyles } from 'react-jss'\r\nimport { useAtom } from 'jotai'\r\nimport {\r\n deleteNote,\r\n getAllNotes,\r\n updateNoteIsArchived,\r\n} from '../../../api/notes'\r\nimport { Priority } from '../../../assets/icons'\r\nimport useSortMembersList from '../../../hooks/useSortMembersList'\r\nimport { mapNotes, Note } from '../../../models/Note'\r\nimport breakpoints from '../../../theme/breakpoints'\r\nimport { colors } from '../../../theme/palette'\r\nimport { baseButton, sortPlaceholder } from '../../../theme/reuseables'\r\nimport { formatDate } from '../../../utils/format'\r\nimport {\r\n Card,\r\n CardCell,\r\n CardContentMobile,\r\n CardHeader,\r\n CardHeaderCell,\r\n CardList,\r\n CardMobile,\r\n} from '../../ui/Card'\r\nimport { SortButton } from '../../ui/SortButton'\r\nimport { Typography } from '../../ui/Typography/Typography'\r\nimport {\r\n notePageAtom,\r\n allNotes,\r\n sortLock,\r\n searchNoteAtom,\r\n} from '../../../store/filter/filterAtom'\r\nimport { EditNoteFromPage } from '../../modules/notes/EditNoteFromPage'\r\nimport { Button } from '../../ui/Button/Button'\r\nimport { L, L_HTML } from '../../providers/Lokalise'\r\nimport { Loader } from '../../ui/Loaders/Loader'\r\nimport { HeaderLinks } from '../../modules/Headerlinks'\r\nimport { Spinner } from '../../ui/Loaders/Spinner'\r\nimport SearchField from '../../ui/SearchField/SearchField'\r\n\r\nconst useStyles = createUseStyles({\r\n '@keyframes fadeIn': {\r\n from: {\r\n opacity: 0,\r\n },\r\n to: {\r\n opacity: 1,\r\n },\r\n },\r\n container: {\r\n padding: '0 1.5rem',\r\n [`@media (min-width: ${breakpoints.Desktop}px)`]: {\r\n '&': {\r\n padding: '0',\r\n },\r\n },\r\n },\r\n headerArea: {\r\n display: 'flex',\r\n padding: '.5rem 0',\r\n minHeight: '5rem',\r\n },\r\n headerAreaTop: {\r\n display: 'flex',\r\n padding: '1rem 0 .5rem',\r\n borderBottom: `1px solid ${colors.borderColor}`,\r\n marginBottom: '1rem',\r\n },\r\n topArea: {\r\n borderBottom: `1px solid ${colors.gray700}`,\r\n // TODO: remove this when this area has been developed.\r\n minHeight: '60px',\r\n },\r\n headerActions: {\r\n display: 'flex',\r\n flexGrow: 1,\r\n marginLeft: 'auto',\r\n justifyContent: 'flex-end',\r\n alignItems: 'flex-start',\r\n flexShrink: 0,\r\n },\r\n sendingEmailSettings: {\r\n display: 'flex',\r\n padding: '.5rem 1rem',\r\n minHeight: '5rem',\r\n width: '100%',\r\n backgroundColor: colors.green200,\r\n color: colors.black,\r\n justifyContent: 'space-between',\r\n alignItems: 'center',\r\n '& span': {\r\n fontWeight: 700,\r\n },\r\n animation: '.5s $fadeIn',\r\n },\r\n notes: {\r\n paddingTop: '20px',\r\n },\r\n dialogButtonsContainer: {\r\n display: 'flex',\r\n width: '100%',\r\n justifyContent: 'space-around',\r\n },\r\n button: {\r\n ...baseButton,\r\n ...{\r\n cursor: 'pointer',\r\n },\r\n },\r\n modalButtons: {\r\n display: 'flex',\r\n },\r\n modalCheckbox: {\r\n display: 'flex',\r\n position: 'absolute',\r\n right: '20px',\r\n top: '20px',\r\n },\r\n numberOfNotes: {\r\n display: 'flex',\r\n padding: '30px 0 90px',\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n },\r\n iconWrapper: {\r\n position: 'relative',\r\n },\r\n noteContent: {\r\n display: '-webkit-box',\r\n WebkitLineClamp: '2',\r\n WebkitBoxOrient: 'vertical',\r\n overflow: 'hidden',\r\n textOverflow: 'ellipsis',\r\n whiteSpace: 'pre-wrap',\r\n },\r\n noteContentOpen: {\r\n display: '-webkit-box',\r\n // WebkitLineClamp: '2',\r\n WebkitBoxOrient: 'vertical',\r\n overflow: 'hidden',\r\n // textOverflow: 'ellipsis',\r\n whiteSpace: 'pre-wrap',\r\n },\r\n deleteButtons: {\r\n top: '0',\r\n right: '0',\r\n display: 'flex',\r\n zIndex: '1',\r\n position: 'absolute',\r\n flexWrap: 'wrap',\r\n transition: 'all .3s ease-in',\r\n justifyContent: 'end',\r\n width: '100%',\r\n height: '100%',\r\n alignItems: 'center',\r\n background:\r\n 'linear-gradient(90deg, rgba(255,255,255,0.7) 0%, rgba(255,255,255,1) 62%, rgba(255,255,255,1) 100%)',\r\n },\r\n sortPlaceholder: {\r\n ...sortPlaceholder,\r\n },\r\n readIcon: {\r\n background: colors.gray,\r\n borderRadius: '50%',\r\n width: '25px',\r\n height: '25px',\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n cursor: 'pointer',\r\n '& svg': {\r\n color: colors.white,\r\n width: '20px',\r\n },\r\n '&.active': {\r\n background: colors.green500,\r\n },\r\n },\r\n searchField: {\r\n width: '100%',\r\n marginRight: '20px',\r\n [`@media (min-width: ${breakpoints.Desktop}px)`]: {\r\n '&': {\r\n width: 'auto',\r\n minWidth: '425px',\r\n marginRight: '20px',\r\n },\r\n },\r\n },\r\n})\r\n\r\nexport const useIsOverflow = (ref, callback?): boolean => {\r\n const [isOverflow, setIsOverflow] = React.useState(undefined)\r\n\r\n React.useLayoutEffect(() => {\r\n const { current } = ref\r\n\r\n const trigger = (): void => {\r\n const hasOverflow = current.scrollHeight > current.clientHeight\r\n\r\n setIsOverflow(hasOverflow)\r\n\r\n if (callback) callback(hasOverflow)\r\n }\r\n\r\n if (current) {\r\n if ('ResizeObserver' in window) {\r\n new ResizeObserver(trigger).observe(current)\r\n }\r\n\r\n trigger()\r\n }\r\n }, [callback, ref])\r\n\r\n return isOverflow\r\n}\r\n\r\nconst ClampContent: FC<{\r\n content: string\r\n checkNote: () => void\r\n}> = ({ content, checkNote }) => {\r\n const [showMore, setShowMore] = useState(false)\r\n const [hasOverflow, setHasOverflow] = React.useState(false)\r\n const [touched, setStouched] = useState(false)\r\n const [isMore, setIsMore] = useState(false)\r\n\r\n const ref = React.useRef(null)\r\n const isOverflow = useIsOverflow(ref, (val) => {\r\n if (isOverflow && !hasOverflow) {\r\n setHasOverflow(isOverflow)\r\n }\r\n })\r\n\r\n const classes = useStyles()\r\n\r\n const checkLines = (\r\n contentRef: React.MutableRefObject,\r\n lines: number\r\n ): void => {\r\n if (!window) {\r\n return\r\n }\r\n if (!contentRef.current) {\r\n return\r\n }\r\n // eslint-disable-next-line no-unused-expressions\r\n const lineHeight = window\r\n .getComputedStyle(contentRef.current)\r\n .getPropertyValue('line-height')\r\n\r\n // eslint-disable-next-line no-unused-expressions\r\n Math.round(contentRef.current.scrollHeight / parseFloat(lineHeight)) >\r\n lines && setIsMore(true)\r\n }\r\n\r\n useEffect(() => {\r\n setTimeout(() => {\r\n checkLines(ref, 2)\r\n }, 500)\r\n }, [ref, content])\r\n\r\n if (!content || content === '') return null\r\n\r\n return (\r\n \r\n \r\n \r\n {content}\r\n \r\n \r\n {isMore ? (\r\n {\r\n setShowMore(!showMore)\r\n checkNote()\r\n }}\r\n >\r\n {!showMore ? 'Vis mere' : 'Vis mindre'}\r\n \r\n ) : null}\r\n
    \r\n )\r\n}\r\n\r\nconst gridTemplateColumns = '7% 10% 15% 15% auto 10%'\r\n\r\nconst NotePage: FC = () => {\r\n const [notes, setNotes] = useState([])\r\n const [loading, setLoading] = useState(true)\r\n const classes = useStyles()\r\n const { setSort, sortState } = useSortMembersList()\r\n const [sortedNotes] = useAtom(notePageAtom)\r\n const [, setAllNotes] = useAtom(allNotes)\r\n const [showDelete, setShowDelete] = useState(false)\r\n const [showMore, setShowMore] = useState(false)\r\n const [editNote, setEditNote] = useState(undefined)\r\n const [lock, _setSortLock] = useAtom(sortLock)\r\n const [freezedNotes, setFreezedNotes] = useState([])\r\n const [, setSearchAtom] = useAtom(searchNoteAtom)\r\n\r\n const onSearch = (search: string): void => {\r\n setSearchAtom(search)\r\n }\r\n\r\n const useSearch = (search: string): void => {\r\n setSearchAtom(search)\r\n }\r\n\r\n const init = (): void => {\r\n async function fetchData(): Promise {\r\n const response = await getAllNotes()\r\n const notesMapped = mapNotes(response.data.Noter)\r\n setNotes(notesMapped)\r\n setAllNotes(notesMapped)\r\n setLoading(false)\r\n }\r\n\r\n fetchData()\r\n }\r\n\r\n const onClickDelete = async (note: Note): Promise => {\r\n const response = await deleteNote(note.id)\r\n if (response) {\r\n setShowDelete(false)\r\n init()\r\n }\r\n }\r\n\r\n const onClickSetArchived = async (note: Note): Promise => {\r\n const response = await updateNoteIsArchived(note.id, !note.archived)\r\n\r\n const res = await getAllNotes()\r\n const notesMapped = mapNotes(res.data.Noter)\r\n const sorted: Note[] = []\r\n\r\n const notesToIterate = lock ? freezedNotes : sortedNotes\r\n\r\n notesToIterate.forEach((item) => {\r\n const found = notesMapped.find((n) => n.id === item.id)\r\n\r\n if (found) {\r\n sorted.push(found)\r\n }\r\n })\r\n _setSortLock(true)\r\n setFreezedNotes(sorted)\r\n\r\n if (response) {\r\n init()\r\n }\r\n }\r\n\r\n const checkNote = (note: Note): void => {\r\n if (editNote === note) {\r\n setEditNote(undefined)\r\n setShowMore(false)\r\n } else {\r\n setEditNote(note)\r\n setShowMore(true)\r\n }\r\n }\r\n\r\n useEffect(() => {\r\n if (!sortState) {\r\n setSort('isRead')\r\n }\r\n init()\r\n }, [])\r\n\r\n if (loading) return \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 {L_HTML('MINENOTER_OVERSKRIFT')}\r\n \r\n
    \r\n
    \r\n
    \r\n \r\n {L_HTML('MINENOTER_ARKIVEREDE_OVERSKRIFT_TEXT')}\r\n \r\n
    \r\n
    \r\n \r\n Viser {`${notes.length} `} noter\r\n \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n {notes && notes.length ? (\r\n \r\n \r\n \r\n setSort('isRead')}\r\n sort={sortState}\r\n name=\"isRead\"\r\n >\r\n {L('MINENOTER_TABEL_KOLONNETITEL_STATUS')}\r\n \r\n \r\n \r\n setSort('date')}\r\n sort={sortState}\r\n name=\"date\"\r\n >\r\n {L('MINENOTER_TABEL_KOLONNETITEL_DATO')}\r\n \r\n \r\n \r\n setSort('name')}\r\n sort={sortState}\r\n name=\"name\"\r\n >\r\n {L('MINENOTER_TABEL_KOLONNETITEL_NAVN')}\r\n \r\n \r\n \r\n
    \r\n {L(\r\n 'MINENOTER_TABEL_KOLONNETITEL_OVERSKRIFT'\r\n )}\r\n
    \r\n
    \r\n \r\n
    \r\n {L('MINENOTER_TABEL_KOLONNETITEL_NOTE')}\r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n ) : null}\r\n {(lock ? freezedNotes : sortedNotes).map((note) => (\r\n
    \r\n \r\n \r\n onClickSetArchived(note)}\r\n >\r\n \r\n \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n {note.title}\r\n \r\n \r\n \r\n \r\n {note.content}\r\n \r\n \r\n \r\n {note.name}\r\n \r\n \r\n {formatDate(note.updated)}\r\n \r\n \r\n \r\n init()}\r\n setShowDelete={(n) => {\r\n setEditNote(n)\r\n setShowDelete(true)\r\n }}\r\n />\r\n \r\n {showDelete &&\r\n editNote &&\r\n editNote.id === note.id ? (\r\n \r\n {\r\n setShowDelete(false)\r\n }}\r\n size=\"xlarge\"\r\n type=\"secondary\"\r\n >\r\n {L('NOTER_REDIGER_FORM_ANNULLER_KNAP')}\r\n \r\n {\r\n onClickDelete(note)\r\n }}\r\n type=\"danger\"\r\n size=\"xlarge\"\r\n >\r\n {L('NOTER_SIDEBAR_SLET-NOTE_KNAP')}\r\n \r\n
    \r\n ) : null}\r\n \r\n \r\n \r\n onClickSetArchived(note)}\r\n >\r\n \r\n \r\n
    \r\n \r\n \r\n {\r\n if (editNote === note) {\r\n setEditNote(undefined)\r\n setShowMore(false)\r\n } else {\r\n setEditNote(note)\r\n setShowMore(true)\r\n }\r\n }}\r\n isOpen={editNote === note && showMore}\r\n >\r\n \r\n {formatDate(note.updated)}\r\n \r\n \r\n {\r\n // if (editNote === note) {\r\n // setEditNote(undefined)\r\n // setShowMore(false)\r\n // } else {\r\n // setEditNote(note)\r\n // setShowMore(true)\r\n // }\r\n // }}\r\n isOpen={editNote === note && showMore}\r\n >\r\n {note.name}\r\n \r\n {\r\n // if (editNote === note) {\r\n // setEditNote(undefined)\r\n // setShowMore(false)\r\n // } else {\r\n // setEditNote(note)\r\n // setShowMore(true)\r\n // }\r\n // }}\r\n isOpen={editNote === note && showMore}\r\n >\r\n \r\n {/* \r\n {note.title}\r\n */}\r\n {note.title}\r\n \r\n \r\n {\r\n // if (editNote === note) {\r\n // setEditNote(undefined)\r\n // setShowMore(false)\r\n // } else {\r\n // setEditNote(note)\r\n // setShowMore(true)\r\n // }\r\n // }}\r\n overflowHidden\r\n // isOpen={editNote === note && showMore}\r\n >\r\n {/* */}\r\n {/* \r\n {note.content}\r\n */}\r\n {\r\n checkNote(note)\r\n }}\r\n // onClick={() => {\r\n // if (editNote === note) {\r\n // setEditNote(undefined)\r\n // setShowMore(false)\r\n // } else {\r\n // setEditNote(note)\r\n // setShowMore(true)\r\n // }\r\n // }}\r\n />\r\n {/* */}\r\n {/* \r\n {editNote === note && showMore\r\n ? ''\r\n : 'vis mere'}\r\n */}\r\n \r\n \r\n init()}\r\n setShowDelete={(n) => {\r\n setEditNote(n)\r\n setShowDelete(true)\r\n }}\r\n />\r\n \r\n {showDelete &&\r\n editNote &&\r\n editNote.id === note.id ? (\r\n \r\n {\r\n setShowDelete(false)\r\n }}\r\n size=\"xlarge\"\r\n type=\"secondary\"\r\n >\r\n {L('NOTER_REDIGER_FORM_ANNULLER_KNAP')}\r\n \r\n {\r\n onClickDelete(note)\r\n }}\r\n type=\"danger\"\r\n size=\"xlarge\"\r\n >\r\n {L('NOTER_SIDEBAR_SLET-NOTE_KNAP')}\r\n \r\n \r\n ) : null}\r\n \r\n \r\n ))}\r\n \r\n {notes.length ? (\r\n
    \r\n \r\n Viser {`${notes.length} `} noter\r\n \r\n
    \r\n ) : null}\r\n \r\n )\r\n}\r\n\r\nexport { NotePage }\r\n","import React, { useEffect, useState } from 'react'\r\nimport { createUseStyles } from 'react-jss'\r\nimport { L } from '../../providers/Lokalise'\r\nimport { Button } from '../Button/Button'\r\n\r\nconst ScrollToTopButton: React.FC = (\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n ref\r\n) => {\r\n const [offset, setOffset] = useState(0)\r\n\r\n useEffect(() => {\r\n // eslint-disable-next-line @typescript-eslint/explicit-function-return-type\r\n const onScroll = () => setOffset(window.pageYOffset)\r\n // clean up code\r\n window.removeEventListener('scroll', onScroll)\r\n window.addEventListener('scroll', onScroll, { passive: true })\r\n return () => window.removeEventListener('scroll', onScroll)\r\n }, [])\r\n\r\n const scrollToTop = (): void => {\r\n window.scrollTo({ top: 0, left: 0, behavior: 'smooth' })\r\n }\r\n\r\n const mainContent = document.getElementById('main-content')\r\n const viewportHeight = window.innerHeight\r\n const mainContentOffset = mainContent?.offsetTop\r\n const mainContentHeight = mainContent?.clientHeight\r\n const buttonHidden =\r\n (mainContentOffset && offset < mainContentOffset) ?? true\r\n const buttonAbsoloute =\r\n offset + viewportHeight > mainContentOffset + mainContentHeight\r\n\r\n return (\r\n \r\n {L('GENERISK_TIL-TOPPEN_LABEL')}\r\n \r\n )\r\n}\r\n\r\nexport { ScrollToTopButton }\r\n","import { useAtom } from 'jotai'\nimport React, { useEffect, useState } from 'react'\nimport { createUseStyles } from 'react-jss'\n\nimport { Link } from 'react-router-dom'\n\nimport {\n getProfileAtom,\n profileAtom,\n updateProfile,\n} from '../../../api/profile/profile'\nimport { colors } from '../../../theme/palette'\nimport { Circle, CircleIcon, CircleIcon2 } from '../../ui/Circle/Circle'\nimport { CardColumn, Row } from '../../ui/Card/CardColumn'\nimport { Typography } from '../../ui/Typography/Typography'\nimport { baseButton } from '../../../theme/reuseables'\nimport {\n PersonalInfo,\n Close,\n HandshakeFill,\n ChevronLeft,\n Kontigenter,\n Ok,\n Tips,\n Organiseringsprocent,\n Medlemsfordele,\n Materialer,\n Heart,\n} from '../../../assets/icons'\nimport { IUpdateMyProfileData } from '../../modules/EditMyProfile'\nimport { PercentCircle } from '../../ui/PercentLevel/PercentLevel'\nimport { L, L_HTML } from '../../providers/Lokalise'\nimport { Button } from '../../ui/Button/Button'\nimport { Input } from '../../ui/FormElememts/Input'\nimport breakpoints from '../../../theme/breakpoints'\nimport { ImitatorNoAccessWarning } from '../../modules/Imitator/ImitatorNoAccessWarning'\nimport { HeaderLinks } from '../../modules/Headerlinks'\n\nconst useStyles = createUseStyles({\n container: {\n color: colors.black,\n padding: '0 1.5rem',\n [`@media (min-width: ${breakpoints.Desktop}px)`]: {\n '&': {\n gridTemplateColumns: '1fr 1fr 1fr',\n padding: '0 0 5rem',\n },\n },\n },\n profileHeader: {\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n padding: '3rem 0',\n },\n nameContainer: {\n display: 'flex',\n flexBasis: '50%',\n alignItems: 'center',\n justifyContent: 'flex-start',\n },\n edit: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'flex-end',\n ...baseButton,\n ...{\n cursor: 'pointer',\n margin: '0',\n },\n },\n section: {\n marginBottom: '3rem',\n\n '& > hr': {\n opacity: '0.2',\n margin: '1.25rem 0',\n },\n },\n iconWrapper: {\n position: 'relative',\n width: '90px',\n marginRight: '30px',\n },\n buttons: {\n width: '100%',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n flexDirection: 'column',\n '& button': {\n margin: '10px 0',\n width: '100%',\n },\n },\n editIconWrapper: {\n top: '0',\n width: '100%',\n height: '100%',\n position: 'absolute',\n display: 'flex',\n alignContent: 'center',\n justifyContent: 'end',\n },\n confirmButtons: {\n display: 'flex',\n zIndex: '1',\n position: 'relative',\n flexWrap: 'wrap',\n transition: 'all .3s ease-in',\n justifyContent: 'end',\n width: '100%',\n height: '100%',\n alignItems: 'center',\n padding: '20px 0 0',\n },\n headerAreaTop: {\n display: 'flex',\n padding: '1rem 0 .5rem',\n borderBottom: `1px solid ${colors.borderColor}`,\n marginBottom: '1rem',\n },\n headerActions: {\n marginLeft: 'auto',\n flexShrink: 0,\n },\n titleContainer: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'flex-start',\n fontWeight: 400,\n backgroundColor: colors.white,\n borderRadius: '.5rem',\n marginBottom: '1rem',\n padding: '1rem',\n },\n titleContainerGreen: {\n display: 'flex',\n color: colors.white,\n alignItems: 'center',\n justifyContent: 'flex-start',\n marginBottom: '1rem',\n },\n ContainerTip: {\n color: colors.white,\n justifyContent: 'flex-start',\n backgroundColor: colors.green,\n borderRadius: '.5rem',\n padding: '1rem',\n },\n})\n\nexport const buildRow = (\n value: string | number,\n label: string,\n mailToLinkIcon?: JSX.Element\n): Row => {\n return {\n label,\n value,\n mailToLinkIcon,\n }\n}\n\nconst Organisation: React.FC = () => {\n const classes = useStyles()\n const [data, update] = useAtom(getProfileAtom)\n const [authProfile] = useAtom(profileAtom)\n const [percentageShowEdit, setPercentageShowEdit] = useState(false)\n const [percentageEditValue, setPercentageEditValue] = useState<\n number | undefined\n >(undefined)\n const [percentageOfMembersCovered, setPercentageOfMembersCovered] =\n useState(0)\n const [showImitatorModal, setShowImitatorModal] = useState(false)\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const calcPercentageCovered = (\n numberFoaMemberUserCovers: number,\n totalNumberOfPeopleUserCovers: number\n ): number => {\n return (numberFoaMemberUserCovers / totalNumberOfPeopleUserCovers) * 100\n }\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const calcPercentageCoveredInEditMode = (): number => {\n if (percentageEditValue < data.numberFoaMemberUserCovers || 0)\n return 100\n return (data.numberFoaMemberUserCovers / percentageEditValue) * 100\n }\n\n type linkItemProps = {\n linkText: string\n linkURL: string\n icon?: JSX.Element\n }\n type collapseProps = {\n buttonText: string\n icon?: JSX.Element\n links: linkItemProps[]\n }\n\n const LinkListItem = ({ linkText, linkURL, icon }: linkItemProps): any => {\n return (\n \n \n \n {icon || }\n \n \n\n \n {linkText}\n \n \n )\n }\n const CollapseItem = ({ buttonText, icon, links }: collapseProps): any => {\n const [show, setShow] = useState(false)\n const ref = React.useRef(null)\n\n const toggleCollapse = (): void => {\n if (ref.current) {\n if (show) {\n ref.current.style.height = '0'\n } else {\n const height = ref.current.scrollHeight\n ref.current.style.height = `${height}`\n }\n }\n setShow(!show)\n }\n return (\n \n \n \n \n {icon || }\n \n \n \n {buttonText}\n \n \n \n \n \n \n \n\n {links.map((link) => {\n return (\n \n \n {link.linkText}\n \n \n )\n })}\n \n \n )\n }\n useEffect(() => {\n setPercentageOfMembersCovered(\n data.totalNumberOfPeopleUserCovers !== null\n ? calcPercentageCovered(\n data.numberFoaMemberUserCovers,\n data.totalNumberOfPeopleUserCovers\n )\n : 0\n )\n setPercentageShowEdit(false)\n\n setPercentageEditValue(undefined)\n }, [data])\n\n useEffect(() => {\n if (percentageShowEdit) {\n setPercentageOfMembersCovered(calcPercentageCoveredInEditMode())\n }\n }, [\n calcPercentageCovered,\n calcPercentageCoveredInEditMode,\n percentageOfMembersCovered,\n percentageShowEdit,\n ])\n\n if (!data) return null\n\n return (\n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n \n {L('organisering_titel')}\n \n
    \n
    \n
    \n \n {L('organisering_subtitel')}\n \n
    \n
    \n
    \n \n \n }\n />\n }\n />\n }\n />\n }\n links={[\n {\n linkText: L(\n 'organisering_button_4_sublink_1_text'\n ),\n linkURL: L(\n 'organisering_button_4_sublink_1_url'\n ),\n },\n {\n linkText: L(\n 'organisering_button_4_sublink_2_text'\n ),\n linkURL: L(\n 'organisering_button_4_sublink_2_url'\n ),\n },\n {\n linkText: L(\n 'organisering_button_4_sublink_3_text'\n ),\n linkURL: L(\n 'organisering_button_4_sublink_3_url'\n ),\n },\n {\n linkText: L(\n 'organisering_button_4_sublink_4_text'\n ),\n linkURL: L(\n 'organisering_button_4_sublink_4_url'\n ),\n },\n ]}\n />\n }\n />\n
    \n }\n titleLabel={L(\n 'TRPROFIL_ORGANISERINGSWIDGET_OVERSKRIFT'\n )}\n rows={[\n {\n label: '',\n value: '',\n useContent: true,\n content: (\n <>\n
    \n \n {L(\n 'TRPROFIL_ORGANISERINGSWIDGET_TEKST_1'\n )}\n \n <>\n {\n \n {!percentageShowEdit ? (\n <>\n \n \n {\n if (\n authProfile.isImitator\n ) {\n setShowImitatorModal(\n true\n )\n return\n }\n setPercentageShowEdit(\n true\n )\n }}\n >\n \n \n \n \n
    \n \n ) : null}\n\n {percentageShowEdit ? (\n
    \n
    \n {\n const val =\n e\n .target\n .value\n setPercentageEditValue(\n +val\n )\n\n setPercentageOfMembersCovered(\n calcPercentageCoveredInEditMode()\n )\n }}\n />\n
    \n \n {\n // setShowDelete(false)\n setPercentageShowEdit(\n false\n )\n setPercentageEditValue(\n undefined\n )\n }}\n size=\"xlarge\"\n type=\"secondary\"\n style={{\n flexGrow: 1,\n }}\n >\n Annuller\n \n =\n data.numberFoaMemberUserCovers\n ) ||\n !percentageEditValue ||\n percentageEditValue >=\n 3000\n }\n onClick={() => {\n if (\n authProfile.isImitator\n ) {\n setShowImitatorModal(\n true\n )\n return\n }\n if (\n percentageEditValue\n ) {\n // Try to set value.\n const fieldsToEdit: IUpdateMyProfileData =\n {}\n fieldsToEdit.TotalAntalKollegaerBrugerDaekker =\n percentageEditValue\n const response =\n updateProfile(\n fieldsToEdit\n )\n if (\n response\n ) {\n setTimeout(\n () =>\n update(\n {\n type: 'refetch',\n }\n ),\n 100\n )\n }\n }\n }}\n style={{\n flexGrow: 1,\n }}\n size=\"xlarge\"\n >\n Gem\n \n
    \n
    \n ) : null}\n \n }\n \n\n \n \n {L_HTML(\n 'TRPROFIL_ORGANISERINGSWIDGET_TEKST_2',\n {\n ProcentDaekker: String(\n Math.round(\n percentageOfMembersCovered\n ) || 0\n ),\n AntalFoaMedlemmerBrugerDaekker:\n String(\n data.numberFoaMemberUserCovers\n ),\n TotalAntalKollegaerBrugerDaekker:\n String(\n percentageShowEdit\n ? percentageEditValue ||\n 0\n : data.totalNumberOfPeopleUserCovers\n ),\n }\n )}\n \n \n \n ),\n },\n ]}\n />\n \n
    \n \n \n \n \n \n\n \n {L('organisering_tips_titel')}\n \n
    \n \n {L('organisering_tips_text')}\n \n \n \n \n setShowImitatorModal(false)}\n />\n \n )\n}\n\nexport { Organisation }\n","/* eslint-disable default-case */\r\nimport React, { FC, useEffect } from 'react'\r\nimport { createUseStyles } from 'react-jss'\r\nimport { useAtom } from 'jotai'\r\nimport { Routes, Route, Navigate, useLocation } from 'react-router-dom'\r\nimport Example from './components/Example'\r\nimport { Menu } from './components/Navigation/Menu/Menu'\r\nimport Members from './components/pages/Members'\r\nimport { AllMembers } from './components/pages/AllMembers'\r\nimport { Updates } from './components/pages/Updates'\r\nimport { Workplaces } from './components/pages/Workplaces'\r\nimport './theme/global.css'\r\nimport { useContainerStyles } from './theme/layout'\r\nimport { MyProfile } from './components/pages/MyProfile'\r\nimport { MemberProfile } from './components/pages/MemberProfile'\r\nimport { MemberProfileFromSearch } from './components/pages/MemberProfileFromSearch'\r\nimport { Footer } from './components/ui/Footer/Footer'\r\nimport { authRoles } from './store/auth'\r\nimport { CardWithIconAndMessge } from './components/ui/Card/CardWithIconAndMessge'\r\nimport { LockFill } from './assets/icons'\r\nimport { colors } from './theme/palette'\r\nimport { NotePage } from './components/pages/MyNotes/NotePage'\r\nimport { ScrollToTopButton } from './components/ui/ScrollToTopButton/ScrollToTopButton'\r\nimport breakpoints from './theme/breakpoints'\r\nimport { Organisation } from './components/pages/Organization'\r\n\r\nconst ScrollToTop: FC = ({ children }) => {\r\n const location = useLocation()\r\n useEffect(() => {\r\n window.scrollTo(0, 0)\r\n }, [location])\r\n\r\n return <>{children}\r\n}\r\n\r\nconst useStyles = createUseStyles({\r\n circleIcon: {\r\n width: '62px',\r\n height: '62px',\r\n borderRadius: '50%',\r\n border: `2px solid ${colors.white}`,\r\n backgroundColor: colors.blue300,\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n marginRight: '1rem',\r\n },\r\n content: {\r\n paddingTop: '5rem',\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n },\r\n messageWrapper: {\r\n marginTop: '2.25rem',\r\n },\r\n mobileOnly: {\r\n [`@media (min-width: ${breakpoints.Desktop}px)`]: {\r\n display: 'none',\r\n },\r\n },\r\n})\r\n\r\nconst RoleBasedRoutes: React.FC = (): JSX.Element => {\r\n const [roles] = useAtom(authRoles)\r\n const layout = useContainerStyles()\r\n const classes = useStyles()\r\n\r\n if (roles.indexOf('AktivBruger') === -1) {\r\n return (\r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n }\r\n message=\"Siden er begrænset af profilen. Vælg en anden rolle på knappen til højre øverst.\"\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 \r\n
    \r\n \r\n \r\n } />\r\n }\r\n />\r\n }\r\n />\r\n }\r\n />\r\n } />\r\n }\r\n />\r\n } />\r\n } />\r\n }\r\n />\r\n\r\n }\r\n />\r\n }\r\n />\r\n \r\n \r\n\r\n \r\n\r\n