diff --git a/backend/root/management/commands/seed_scripts/recruitment.py b/backend/root/management/commands/seed_scripts/recruitment.py index 2ee206233..6a91f60cb 100644 --- a/backend/root/management/commands/seed_scripts/recruitment.py +++ b/backend/root/management/commands/seed_scripts/recruitment.py @@ -14,6 +14,7 @@ 'actual_application_deadline': timezone.now() + timezone.timedelta(days=10), 'reprioritization_deadline_for_applicant': timezone.now() + timezone.timedelta(days=11), 'reprioritization_deadline_for_groups': timezone.now() + timezone.timedelta(days=12), + 'promo_media': 'x4dzJ8z1j5M', }, { 'name_nb': 'Tidligere opptak', @@ -23,6 +24,7 @@ 'actual_application_deadline': timezone.now() - timezone.timedelta(days=50), 'reprioritization_deadline_for_applicant': timezone.now() - timezone.timedelta(days=52), 'reprioritization_deadline_for_groups': timezone.now() - timezone.timedelta(days=53), + 'promo_media': 'x4dzJ8z1j5M', }, { 'name_nb': 'Framtidig opptak', @@ -32,6 +34,7 @@ 'actual_application_deadline': timezone.now() - timezone.timedelta(days=50), 'reprioritization_deadline_for_applicant': timezone.now() - timezone.timedelta(days=52), 'reprioritization_deadline_for_groups': timezone.now() - timezone.timedelta(days=53), + 'promo_media': 'x4dzJ8z1j5M', }, ] diff --git a/backend/root/management/commands/seed_scripts/textitems.py b/backend/root/management/commands/seed_scripts/textitems.py index 2cd476807..4a927ad86 100644 --- a/backend/root/management/commands/seed_scripts/textitems.py +++ b/backend/root/management/commands/seed_scripts/textitems.py @@ -57,6 +57,11 @@ def seed(): 'text_nb': 'Studentersamfundet i Trondhjem er en organisasjon for studenter i Trondheim som eies og drives av sine rundt 16 100 medlemmer. Formålsparagrafen vår sier at ”Studentersamfundet skal være det naturlige samlingsstedet for studenter i Trondhjem”. Vårt røde runde huser konserter, ulike kulturarrangementer, utallige barer, en kafé og en restaurant. Mest sagnomsust er Samfundsmøtene, viet til debatt om politikk og aktuelle spørsmål, eller til underholdning og moro. Samfundet har også tre av Trondheims beste konsertscener.', 'text_en': "Samfundet is an organization for students in Trondheim that is owned and run by its approximately 16100 members. Our mission statement is Samfundet will be the natural meeting place for students in Trondheim. In our red, round building we regularly host concerts and various cultural events, and have countless bars, a café and a restaurant. The Society Meetings are perhaps our most famous events. These meetings serve as a place for debating politics and current events, and but also for entertainment and fun. Samfundet also has three of Trondheim's best music venues.", }, + { + 'key': 'samf_recruitment_description', + 'text_nb': 'Studentersamfundet i Trondhjem har opptak ved starten av hvert semester. Vi ønsker at du søker til oss som frivillig! Studentersamfundet i Trondhjem er Norges største studentersamfund og vi har et tilbud andre byer bare kan drømme om.', + 'text_en': 'Studentersamfundet in Trondheim has recruitments at the start of each semester. We would like you to apply to us as a volunteer! Studentersamfundet in Trondheim is Norways largest student society and we have an offer that other cities can only dream of.', + }, { 'key': 'no_recruitment_samf_header', 'text_nb': 'Det er for tiden ingen opptak på Samfundet', @@ -72,6 +77,11 @@ def seed(): 'text_nb': 'Studentersamfundet i Trondhjem er Norges største studentersamfund og vi har et tilbud andre byer bare kan drømme om.', 'text_en': 'Studentersamfundet in Trondhjem is Norways largest student society and we have an offer that other cities can only dream of.', }, + { + 'key': 'isfit_recruitment_description', + 'text_nb': 'ISFIT har opptak ved starten av hvert semester. Vi ønsker at du søker til oss som frivillig! Som frivillig i ISFIT får du muligheten til å være med på å arrangere verdens største studentfestival.', + 'text_en': 'ISFIT has recruitments at the start of each semester. We would like you to apply to us as a volunteer! As a volunteer in ISFIT, you get the opportunity to help organize the worlds largest student festival.', + }, { 'key': 'no_recruitment_isfit_header', 'text_nb': 'Det er for tiden ingen opptak på Samfundet', @@ -87,6 +97,11 @@ def seed(): 'text_nb': 'Studentersamfundet i Trondhjem er Norges største studentersamfund og vi har et tilbud andre byer bare kan drømme om.', 'text_en': 'Studentersamfundet in Trondhjem is Norways largest student society and we have an offer that other cities can only dream of.', }, + { + 'key': 'uka_recruitment_description', + 'text_nb': 'UKA har opptak ved starten av hvert semester. Vi ønsker at du søker til oss som frivillig! Som frivillig i UKA får du muligheten til å være med på å arrangere Norges største kulturfestival.', + 'text_en': 'UKA has recruitments at the start of each semester. We would like you to apply to us as a volunteer! As a volunteer in UKA, you get the opportunity to help organize Norway\'s largest cultural festival.', + }, { 'key': 'no_recruitment_uka_header', 'text_nb': 'Det er for tiden ingen opptak på Samfundet', diff --git a/frontend/src/Pages/OrganizationRecruitmentPage/OrganizationRecruitmentPage.module.scss b/frontend/src/Pages/OrganizationRecruitmentPage/OrganizationRecruitmentPage.module.scss index 7aa3aabe3..c1a19bf9c 100644 --- a/frontend/src/Pages/OrganizationRecruitmentPage/OrganizationRecruitmentPage.module.scss +++ b/frontend/src/Pages/OrganizationRecruitmentPage/OrganizationRecruitmentPage.module.scss @@ -3,14 +3,20 @@ @import 'src/mixins'; .recruitmentPage { - @include flex-column-center; + @include flex-column; + padding: 2rem; + + @include for-tablet-down { + padding: 1rem 0.5rem; + } + gap: 1rem; } .container { - @include flex-column-center; - width: 85%; + @include flex-column; + align-items: flex-start; + width: 100%; gap: 2rem; - margin: 1rem; } .organizationHeader { @@ -24,11 +30,11 @@ } .video { - width: 50%; + width: 70%; aspect-ratio: 16 / 9; border: none; @include for-tablet-down { - width: 80%; + width: 100%; } } @@ -47,7 +53,9 @@ } .optionsContainer { - @include flex-row-center; + @include flex-row; + justify-content: space-between; + align-self: stretch; gap: 1rem; } @@ -74,9 +82,7 @@ .viewModeControll { display: flex; - width: 100%; - gap: 2rem; - background-color: $grey-4; + gap: 1rem; padding: 0.25rem; border-radius: 0.25rem; } diff --git a/frontend/src/Pages/OrganizationRecruitmentPage/OrganizationRecruitmentPage.tsx b/frontend/src/Pages/OrganizationRecruitmentPage/OrganizationRecruitmentPage.tsx index f567826df..4ce566d40 100644 --- a/frontend/src/Pages/OrganizationRecruitmentPage/OrganizationRecruitmentPage.tsx +++ b/frontend/src/Pages/OrganizationRecruitmentPage/OrganizationRecruitmentPage.tsx @@ -1,15 +1,14 @@ -import classNames from 'classnames'; import { useEffect, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { useParams } from 'react-router-dom'; -import { Button, Logo, OccupiedFormModal, Page, SamfundetLogoSpinner, Text, Video } from '~/Components'; +import { IconButton, Page, SamfundetLogoSpinner, Text, Video } from '~/Components'; import { PersonalRow } from '~/Pages/RecruitmentPage'; import { getOrganization, getRecruitment } from '~/api'; +import { TextItem } from '~/constants'; import { useOrganizationContext } from '~/context/OrgContextProvider'; import type { RecruitmentDto } from '~/dto'; -import { useDesktop, useTitle } from '~/hooks'; -import { KEY } from '~/i18n/constants'; -import { OrgNameType, type OrgNameTypeValue } from '~/types'; +import { useDesktop, useTextItem, useTitle } from '~/hooks'; +import { COLORS, OrgNameType, type OrgNameTypeValue } from '~/types'; import { dbT, getObjectFieldOrNumber } from '~/utils'; import { GangSeparatePositions, GangTypeContainer, RecruitmentTabs } from './Components'; import styles from './OrganizationRecruitmentPage.module.scss'; @@ -21,7 +20,7 @@ export function OrganizationRecruitmentPage() { const { recruitmentId } = useParams<{ recruitmentId: string }>(); const [viewAllPositions, setViewAllPositions] = useState(true); const { t } = useTranslation(); - const { changeOrgTheme, organizationTheme } = useOrganizationContext(); + const { changeOrgTheme } = useOrganizationContext(); const [recruitment, setRecruitment] = useState(); const [organizationName, setOrganizationName] = useState(OrgNameType.FALLBACK); const [loading, setLoading] = useState(true); @@ -63,72 +62,61 @@ export function OrganizationRecruitmentPage() { } }, [organizationName, changeOrgTheme]); - function toggleViewAll() { - const toggledValue = !viewAllPositions; - setViewAllPositions(toggledValue); + const descriptionText = (() => { + switch (organizationName) { + case OrgNameType.SAMFUNDET_NAME: + return useTextItem(TextItem.samf_recruitment_description); + case OrgNameType.UKA_NAME: + return useTextItem(TextItem.uka_recruitment_description); + case OrgNameType.ISFIT_NAME: + return useTextItem(TextItem.isfit_recruitment_description); + default: + return useTextItem(TextItem.uka_recruitment_description); + } + })(); + + if (loading) { + return ; } return ( - {loading ? ( - - ) : ( -
-
- - - {dbT(recruitment, 'name')} - -
- {recruitment?.promo_media &&