Skip to content

Commit

Permalink
Merge branch 'master' into lending-system
Browse files Browse the repository at this point in the history
  • Loading branch information
eikhr committed Jul 6, 2024
2 parents 0af454b + 41aca4f commit 2bbf7f5
Show file tree
Hide file tree
Showing 52 changed files with 181 additions and 178 deletions.
4 changes: 2 additions & 2 deletions app/actions/CompanyActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ export function deleteSemesterStatus(
});
}

export function fetchCompanyContacts({ companyId }: { companyId: EntityId }) {
return callAPI<CompanyContact[]>({
export function fetchCompanyContacts(companyId: EntityId) {
return callAPI<{ results: CompanyContact[] }>({
types: Company.FETCH_COMPANY_CONTACT,
endpoint: `/companies/${companyId}/company-contacts/`,
method: 'GET',
Expand Down
6 changes: 3 additions & 3 deletions app/components/EventItem/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ const EventItem = ({
<Flex className={styles.companyLogoExtraCompact}>
{event.cover && (
<Image
alt="Event cover image"
alt="Forsidebilde"
src={event.cover}
placeholder={event.coverPlaceholder}
/>
Expand All @@ -185,7 +185,7 @@ const EventItem = ({
<Image
src={event.cover}
placeholder={event.coverPlaceholder}
alt={`Event cover image - ${event.title}`}
alt={`Forsidebildet til ${event.title}`}
/>
</Link>
)}
Expand Down Expand Up @@ -236,7 +236,7 @@ const EventItem = ({
<Flex className={styles.companyLogo}>
{event.cover && (
<Image
alt="Event cover"
alt="Forsidebilde"
src={event.cover}
placeholder={event.coverPlaceholder}
/>
Expand Down
7 changes: 3 additions & 4 deletions app/components/Feed/activity.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
.header {
display: flex;
align-items: center;
padding: 10px 20px;
border-bottom: 1px solid
rgba(var(--rgb-min), var(--rgb-min), var(--rgb-min), 9%);
padding: var(--spacing-sm) var(--spacing-md);
border-bottom: 1px solid var(--border-gray);
word-break: break-word;
white-space: pre-line;
}
Expand All @@ -13,7 +12,7 @@
align-items: center;
justify-content: space-between;
flex-direction: row;
padding: 10px 20px;
padding: var(--spacing-sm) var(--spacing-md);
}

.activityHeaderItem {
Expand Down
2 changes: 1 addition & 1 deletion app/components/Footer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ const Footer = () => {
<Image
className={styles.cooperator}
src={netcompany}
alt="netcompany"
alt="Netcompany sin logo"
/>
<Link to="/pages/personvern/114-informasjonskapsler">
Informasjonskapsler (cookies)
Expand Down
2 changes: 1 addition & 1 deletion app/components/GroupMember/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const GroupMember = ({ user, role, leader, co_leader, groupName }: Props) => {
)}
>
<Image
alt="profilePicture"
alt={`${user.fullName} sitt profilbilde`}
src={user.profilePicture}
placeholder={user.profilePicturePlaceholder}
/>
Expand Down
12 changes: 10 additions & 2 deletions app/components/Header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,16 @@ const HeaderLogo = () => {
<Link to="/">
<LoadingIndicator loading={loading}>
<div className={styles.logo}>
<Image src={logoLightMode} className={styles.logoLightMode} alt="" />
<Image src={logoDarkMode} className={styles.logoDarkMode} alt="" />
<Image
src={logoLightMode}
className={styles.logoLightMode}
alt="Abakus sin logo"
/>
<Image
src={logoDarkMode}
className={styles.logoDarkMode}
alt="Abakus sin logo"
/>
</div>
</LoadingIndicator>
</Link>
Expand Down
2 changes: 1 addition & 1 deletion app/components/Image/ProfilePicture.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const ProfilePicture = ({
user,
size = 100,
className,
alt = `${user.username}'s profile picture`,
alt = `${user.username} sitt profilbilde`,
style,
...props
}: Props) => (
Expand Down
2 changes: 1 addition & 1 deletion app/components/JoblistingItem/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const JoblistingItem = ({ joblisting }: JobListingItemProps) => (
className={styles.companyLogo}
src={joblisting.company.logo}
placeholder={joblisting.company.logoPlaceholder}
alt={`${joblisting.company.name} logo`}
alt={`${joblisting.company.name} sin logo`}
/>
)}
<div className={styles.listItem}>
Expand Down
2 changes: 1 addition & 1 deletion app/components/Reactions/ReactionPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ const ReactionPicker = ({ emojis, contentTarget }: Props) => {
/>
{isLoading ? (
<div className={styles.emojiLoading}>
<Image src={emojiLoading} alt="Emoji loading indicator" />
<Image src={emojiLoading} alt="Lasteindikator" />
</div>
) : (
<ReactionPickerContent
Expand Down
6 changes: 5 additions & 1 deletion app/components/Search/SearchPageResults.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ const SearchResult = ({ result, onSelect, isSelected }: SearchResultProps) => {

{result.picture && result.picture !== 'cover' && (
<Flex className={styles.picture}>
<Image src={result.picture} alt="search" role="presentation" />
<Image
src={result.picture}
alt={`Bilde fra ${result.label}`}
role="presentation"
/>
</Flex>
)}
</Flex>
Expand Down
8 changes: 6 additions & 2 deletions app/components/Upload/ImageUpload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ const FilePreview = ({ file, onRemove }: FilePreviewProps) => {
justifyContent="space-between"
className={styles.previewRow}
>
<img alt="preview" className={styles.previewImage} src={previewUrl} />
<img
alt="Forhåndsvisning av bilde"
className={styles.previewImage}
src={previewUrl}
/>
<div className={styles.fileName}>{file.name}</div>
<Icon onClick={onRemove} name="trash" danger />
</Flex>
Expand Down Expand Up @@ -133,7 +137,7 @@ const UploadArea = ({ multiple, onDrop, image, accept }: UploadAreaProps) => {
)}
</Flex>
{image && (
<Image alt="presentation" className={styles.image} src={image} />
<Image alt="Opplastet bilde" className={styles.image} src={image} />
)}
<input {...getInputProps()} />
</div>
Expand Down
9 changes: 5 additions & 4 deletions app/components/UserAttendance/AttendanceModalContent.css
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,13 @@
.row > img {
width: 50px;
height: 50px;
margin: 0 10px;
margin: 0 var(--spacing-md);
}

.nav {
margin: 5px auto;
height: 40px;
margin: var(--spacing-sm) auto;
min-height: 40px;
height: fit-content;
border: 1px solid var(--border-gray);
border-radius: var(--border-radius-md);
font-size: var(--font-size-sm);
Expand All @@ -84,7 +85,7 @@
height: 100%;
border-radius: inherit;
text-align: center;
padding: 5px 15px;
padding: var(--spacing-sm) var(--spacing-md);
font-weight: 500;
}

Expand Down
4 changes: 2 additions & 2 deletions app/components/UserAttendance/AttendanceStatus.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
min-height: 72px;
text-align: center;
border-radius: var(--border-radius-md);
margin: 10px 0;
margin: var(--spacing-sm) 0;
overflow: hidden;
}

Expand All @@ -15,6 +15,6 @@
min-width: 25%;
flex-direction: column;
align-items: center;
padding: 7px 0;
padding: var(--spacing-sm);
background-color: var(--additive-background);
}
2 changes: 1 addition & 1 deletion app/routes/admin/email/components/EmailLists.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ const EmailLists = () => {
eller grupper. Lister kan ikke slettes, men mottakere kan endres. Delen
av adressen som kommer før @abakus.no er unik og kan ikke brukes andre
steder på abakus.no. Lister er åpne og alle kan sende e-post til disse.
Ønsker brukere å sende e-post fra en @abakus.no adresse må de få
Ønsker brukere å sende e-post fra en @abakus.no-adresse må de få
opprettet en personlig adresse under Brukere.
</p>
<Flex
Expand Down
2 changes: 1 addition & 1 deletion app/routes/articles/components/ArticleList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const ArticleListItem = ({ article }: { article: PublicArticle }) => {
<Link to={`/articles/${article.slug}`} className={styles.imageLink}>
<Image
src={article.cover}
alt="Article cover"
alt="Forsidebilde"
placeholder={article.coverPlaceholder}
/>
</Link>
Expand Down
2 changes: 1 addition & 1 deletion app/routes/bdb/components/BdbDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ const BdbDetail = () => {
<Page
cover={
company.logo && (
<PageCover image={company.logo} alt={`Logo for ${company.name}`} />
<PageCover image={company.logo} alt={`${company.name} sin logo`} />
)
}
title={[
Expand Down
2 changes: 1 addition & 1 deletion app/routes/bdb/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ export const getContactStatuses = (

export const BdbTabs = () => (
<>
<NavigationTab href="/companyInterest">Interesseskjema</NavigationTab>
<NavigationTab href="/company-interest">Interesseskjema</NavigationTab>
<NavigationTab href="/bdb">BDB</NavigationTab>
</>
);
14 changes: 11 additions & 3 deletions app/routes/brand/components/BrandPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const BrandPage = () => (
Hei, vi i PR har laget noen retningslinjer for å hjelpe deg å bruke
vårt brand og design. For å bruke logoen og designet på en måte som
ikke er dekket av disse retningslinjene kontakt oss på{' '}
<a className={styles.inlineLink} href="mailto:abakus@abakus.no">
<a className={styles.inlineLink} href="mailto:pr@abakus.no">
[email protected]
</a>
og legg ved en mockup av hvordan du har tenkt til å bruke det.
Expand Down Expand Up @@ -40,7 +40,11 @@ const BrandPage = () => (
</p>
</Flex>
<Flex column className={styles.colRight}>
<Image src={logosDos} alt="Allowed examples" width={200} />
<Image
src={logosDos}
alt="Eksempler på tillatte versjoner av logo"
width={200}
/>
</Flex>
</Flex>

Expand Down Expand Up @@ -70,7 +74,11 @@ const BrandPage = () => (
</ul>
</Flex>
<Flex column className={styles.colRight}>
<Image src={logosDonts} alt="Not allowed examples" width={200} />
<Image
src={logosDonts}
alt="Eksempler på ikke tillatte versjoner av logo"
width={200}
/>
</Flex>
</Flex>
<div>
Expand Down
8 changes: 2 additions & 6 deletions app/routes/companyInterest/components/CompanyInterest.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@
margin-left: 20px;
}

.guiWrapper {
margin-right: 30px;
flex-wrap: wrap;
}

.guiBoxes {
justify-content: flex-end;
margin: 10px 0;
Expand Down Expand Up @@ -53,7 +48,8 @@
.heading {
font-weight: 500;
font-size: var(--font-size-lg);
margin-top: 0.7rem;
line-height: 1.3;
margin: var(--spacing-sm) 0;
}

.topline {
Expand Down
6 changes: 3 additions & 3 deletions app/routes/companyInterest/components/CompanyInterestList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ const CompanyInterestList = () => {
title: 'Bedriftsnavn',
dataIndex: 'companyName',
render: (companyName: string, companyInterest: Record<string, any>) => (
<Link to={`/companyInterest/${companyInterest.id}/edit`}>
<Link to={`/company-interest/${companyInterest.id}/edit`}>
{companyInterest.company ? companyInterest.company.name : companyName}
</Link>
),
Expand Down Expand Up @@ -209,7 +209,7 @@ const CompanyInterestList = () => {
<Page
title="Bedriftsinteresser"
actionButtons={
<LinkButton href="/companyInterest/create">
<LinkButton href="/company-interest/create">
Ny bedriftsinteresse
</LinkButton>
}
Expand All @@ -231,7 +231,7 @@ const CompanyInterestList = () => {
isClearable={false}
/>
</Flex>
<LinkButton href="/companyInterest/semesters">
<LinkButton href="/company-interest/semesters">
Endre aktive semestre
</LinkButton>
</Flex>
Expand Down
19 changes: 13 additions & 6 deletions app/routes/companyInterest/components/CompanyInterestPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ const CollaborationBox = ({
</Flex>
);

const LanguageFlag = ({ language }: { language: string }) => {
const LanguageFlag = ({ language }: { language: 'english' | 'norwegian' }) => {
let flag;

switch (language) {
Expand All @@ -232,7 +232,13 @@ const LanguageFlag = ({ language }: { language: string }) => {
break;
}

return <img src={flag} className={styles.flag} alt="Country flag" />;
return (
<img
src={flag}
className={styles.flag}
alt={language === 'english' ? 'Flag of Britain' : 'Norges flagg'}
/>
);
};

type CompanyInterestFormEntity = {
Expand Down Expand Up @@ -461,7 +467,7 @@ const CompanyInterestPage = () => {
: createCompanyInterest(newData, isEnglish),
).then(() => {
navigate(
allowedBdb ? '/companyInterest/' : '/pages/bedrifter/for-bedrifter',
allowedBdb ? '/company-interest' : '/pages/bedrifter/for-bedrifter',
);
});
};
Expand Down Expand Up @@ -525,13 +531,14 @@ const CompanyInterestPage = () => {
},
];

const title = edit
? 'Redigerer bedriftsinteresse'
: FORM_LABELS.mainHeading[language];
const title = edit ? 'Bedriftsinteresse' : FORM_LABELS.mainHeading[language];

return (
<Page
title={title}
back={{
href: '/company-interest',
}}
actionButtons={
!edit && (
<Link to={isEnglish ? '/interesse' : '/register-interest'}>
Expand Down
11 changes: 3 additions & 8 deletions app/routes/companyInterest/components/CompanySemesterGUI.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,9 @@ const validate = createValidator({

const CompanySemesterGUI = () => {
return (
<Page title="Endre aktive semestre" back={{ href: '/companyInterest/' }}>
<Flex className={styles.guiWrapper}>
<Flex
column
style={{
marginRight: '50px',
}}
>
<Page title="Endre aktive semestre" back={{ href: '/company-interest' }}>
<Flex wrap gap="var(--spacing-xl)">
<Flex column>
<AddSemesterForm />
</Flex>
<Flex column>
Expand Down
2 changes: 1 addition & 1 deletion app/routes/events/components/EventDetail/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ const EventDetail = () => {
>
<img
className={styles.mazemapImg}
alt="MazeMap-logo"
alt="MazeMap sin logo"
src={mazemapLogo}
/>
{mapIsOpen ? 'Skjul kart' : 'Vis kart'}
Expand Down
Loading

0 comments on commit 2bbf7f5

Please sign in to comment.