diff --git a/backend/Pipfile.lock b/backend/Pipfile.lock
index 114bf8e88..c063fca08 100644
--- a/backend/Pipfile.lock
+++ b/backend/Pipfile.lock
@@ -30,17 +30,15 @@
"sha256:f90578b8a3177f7552f4e1a6e535e84293cd5da421fcce0642d49c0d7bdf8df2"
],
"index": "pypi",
- "markers": "python_version >= '3.7' and python_version < '4.0'",
"version": "==0.6.4"
},
"django": {
"hashes": [
- "sha256:8c8659665bc6e3a44fefe1ab0a291e5a3fb3979f9a8230be29de975e57e8f854",
- "sha256:f47a37a90b9bbe2c8ec360235192c7fddfdc832206fcf618bb849b39256affc1"
+ "sha256:56ab63a105e8bb06ee67381d7b65fe6774f057e41a8bab06c8020c8882d8ecd4",
+ "sha256:b5bb1d11b2518a5f91372a282f24662f58f66749666b0a286ab057029f728080"
],
"index": "pypi",
- "markers": "python_version >= '3.10'",
- "version": "==5.0.1"
+ "version": "==5.0.2"
},
"django-admin-autocomplete-filter": {
"hashes": [
@@ -56,7 +54,6 @@
"sha256:0bf65ef45e606aff1994d35503e6b677c0b26cafff6506f8fd7187f3be840207"
],
"index": "pypi",
- "markers": "python_version >= '3.8'",
"version": "==4.3.1"
},
"django-environ": {
@@ -65,7 +62,6 @@
"sha256:f32a87aa0899894c27d4e1776fa6b477e8164ed7f6b3e410a62a6d72caaf64be"
],
"index": "pypi",
- "markers": "python_version >= '3.6' and python_version < '4'",
"version": "==0.11.2"
},
"django-extensions": {
@@ -74,7 +70,6 @@
"sha256:9600b7562f79a92cbf1fde6403c04fee314608fefbb595502e34383ae8203401"
],
"index": "pypi",
- "markers": "python_version >= '3.6'",
"version": "==3.2.3"
},
"django-guardian": {
@@ -83,7 +78,6 @@
"sha256:c58a68ae76922d33e6bdc0e69af1892097838de56e93e78a8361090bcd9f89a0"
],
"index": "pypi",
- "markers": "python_version >= '3.5'",
"version": "==2.4.0"
},
"django-model-utils": {
@@ -107,7 +101,6 @@
"sha256:eb63f58c9f218e1a7d064d17a70751f528ed4e1d35547fdade9aaf4cd103fd08"
],
"index": "pypi",
- "markers": "python_version >= '3.6'",
"version": "==3.14.0"
},
"gunicorn": {
@@ -116,7 +109,6 @@
"sha256:88ec8bff1d634f98e61b9f65bc4bf3cd918a90806c6f5c48bc5603849ec81033"
],
"index": "pypi",
- "markers": "python_version >= '3.5'",
"version": "==21.2.0"
},
"jsonfield": {
@@ -223,7 +215,6 @@
"sha256:fe4c15f6c9285dc54ce6553a3ce908ed37c8f3825b5a51a15c91442bb955b868"
],
"index": "pypi",
- "markers": "python_version >= '3.8'",
"version": "==10.2.0"
},
"psycopg": {
@@ -231,17 +222,17 @@
"c"
],
"hashes": [
- "sha256:437e7d7925459f21de570383e2e10542aceb3b9cb972ce957fdd3826ca47edc6",
- "sha256:96b7b13af6d5a514118b759a66b2799a8a4aa78675fa6bb0d3f7d52d67eff002"
+ "sha256:31144d3fb4c17d78094d9e579826f047d4af1da6a10427d91dfcfb6ecdf6f12b",
+ "sha256:4d5a0a5a8590906daa58ebd5f3cfc34091377354a1acced269dd10faf55da60e"
],
- "markers": "python_version >= '3.7'",
- "version": "==3.1.17"
+ "index": "pypi",
+ "version": "==3.1.18"
},
"psycopg-c": {
"hashes": [
- "sha256:5cc4d544d552b8ab92a9e3a9dbe3b4f46ce0a86338654d26387fc076e0c97977"
+ "sha256:ffff0c4a9c0e0b7aadb1acb7b61eb8f886365dd8ef00120ce14676235846ba73"
],
- "version": "==3.1.17"
+ "version": "==3.1.18"
},
"pytz": {
"hashes": [
@@ -279,6 +270,14 @@
"sha256:b23fc42ff6f6ef6954e4852c1fb512cdd18dbea03134f91f856a95ccc9461f78"
],
"version": "==0.9.0"
+ },
+ "tzdata": {
+ "hashes": [
+ "sha256:aa3ace4329eeacda5b7beb7ea08ece826c28d761cda36e747cfbf97996d39bf3",
+ "sha256:dd54c94f294765522c77399649b4fefd95522479a664a0cec87f41bebc6148c9"
+ ],
+ "markers": "sys_platform == 'win32'",
+ "version": "==2023.4"
}
},
"develop": {
@@ -288,7 +287,6 @@
"sha256:527906bec6088cb499aae31bc962864b4e77569e9d529ee51df3a93b4b8ab28a"
],
"index": "pypi",
- "markers": "python_version >= '3.8'",
"version": "==1.7.7"
},
"certifi": {
@@ -395,6 +393,14 @@
"markers": "python_full_version >= '3.7.0'",
"version": "==3.3.2"
},
+ "colorama": {
+ "hashes": [
+ "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44",
+ "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"
+ ],
+ "markers": "platform_system == 'Windows'",
+ "version": "==0.4.6"
+ },
"debugpy": {
"hashes": [
"sha256:125b9a637e013f9faac0a3d6a82bd17c8b5d2c875fb6b7e2772c5aba6d082332",
@@ -417,7 +423,6 @@
"sha256:ef9ab7df0b9a42ed9c878afd3eaaff471fce3fa73df96022e1f5c9f8f8c87ada"
],
"index": "pypi",
- "markers": "python_version >= '3.8'",
"version": "==1.8.0"
},
"idna": {
@@ -491,7 +496,6 @@
"sha256:f5ac9a4eeb1ec0f1ccdc6f326bcdb464de5f80eb07fb38b5ddd7b0de6bc61e55"
],
"index": "pypi",
- "markers": "python_version >= '3.8'",
"version": "==1.8.0"
},
"mypy-extensions": {
@@ -590,7 +594,6 @@
"sha256:fe4c15f6c9285dc54ce6553a3ce908ed37c8f3825b5a51a15c91442bb955b868"
],
"index": "pypi",
- "markers": "python_version >= '3.8'",
"version": "==10.2.0"
},
"platformdirs": {
@@ -623,7 +626,6 @@
"sha256:50fb9cbe836c3f20f0dfa99c565201fb75dc54c8d76373cd1bde06b06657bdb6"
],
"index": "pypi",
- "markers": "python_version >= '3.8'",
"version": "==8.0.0"
},
"pytest-django": {
@@ -632,7 +634,6 @@
"sha256:ca1ddd1e0e4c227cf9e3e40a6afc6d106b3e70868fd2ac5798a22501271cd0c7"
],
"index": "pypi",
- "markers": "python_version >= '3.8'",
"version": "==4.8.0"
},
"pyyaml": {
@@ -698,7 +699,6 @@
"sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1"
],
"index": "pypi",
- "markers": "python_version >= '3.7'",
"version": "==2.31.0"
},
"rich": {
@@ -711,27 +711,26 @@
},
"ruff": {
"hashes": [
- "sha256:30ad74687e1f4a9ff8e513b20b82ccadb6bd796fe5697f1e417189c5cde6be3e",
- "sha256:3826fb34c144ef1e171b323ed6ae9146ab76d109960addca730756dc19dc7b22",
- "sha256:3d3c641f95f435fc6754b05591774a17df41648f0daf3de0d75ad3d9f099ab92",
- "sha256:3fbaff1ba9564a2c5943f8f38bc221f04bac687cc7485e45237579fee7ccda79",
- "sha256:3ff35433fcf4dff6d610738712152df6b7d92351a1bde8e00bd405b08b3d5759",
- "sha256:63856b91837606c673537d2889989733d7dffde553828d3b0f0bacfa6def54be",
- "sha256:638ea3294f800d18bae84a492cb5a245c8d29c90d19a91d8e338937a4c27fca0",
- "sha256:6d232f99d3ab00094ebaf88e0fb7a8ccacaa54cc7fa3b8993d9627a11e6aed7a",
- "sha256:8153a3e4128ed770871c47545f1ae7b055023e0c222ff72a759f5a341ee06483",
- "sha256:87057dd2fdde297130ff99553be8549ca38a2965871462a97394c22ed2dfc19d",
- "sha256:a7e3818698f8460bd0f8d4322bbe99db8327e9bc2c93c789d3159f5b335f47da",
- "sha256:ba918e01cdd21e81b07555564f40d307b0caafa9a7a65742e98ff244f5035c59",
- "sha256:bf9faafbdcf4f53917019f2c230766da437d4fd5caecd12ddb68bb6a17d74399",
- "sha256:e155147199c2714ff52385b760fe242bb99ea64b240a9ffbd6a5918eb1268843",
- "sha256:e8a75a98ae989a27090e9c51f763990ad5bbc92d20626d54e9701c7fe597f399",
- "sha256:eceab7d85d09321b4de18b62d38710cf296cb49e98979960a59c6b9307c18cfe",
- "sha256:edf23041242c48b0d8295214783ef543847ef29e8226d9f69bf96592dba82a83"
+ "sha256:0034d5b6323e6e8fe91b2a1e55b02d92d0b582d2953a2b37a67a2d7dedbb7acc",
+ "sha256:00a818e2db63659570403e44383ab03c529c2b9678ba4ba6c105af7854008105",
+ "sha256:0a725823cb2a3f08ee743a534cb6935727d9e47409e4ad72c10a3faf042ad5ba",
+ "sha256:13471684694d41ae0f1e8e3a7497e14cd57ccb7dd72ae08d56a159d6c9c3e30e",
+ "sha256:3b42b5d8677cd0c72b99fcaf068ffc62abb5a19e71b4a3b9cfa50658a0af02f1",
+ "sha256:6b95ac9ce49b4fb390634d46d6ece32ace3acdd52814671ccaf20b7f60adb232",
+ "sha256:7022d66366d6fded4ba3889f73cd791c2d5621b2ccf34befc752cb0df70f5fad",
+ "sha256:a11567e20ea39d1f51aebd778685582d4c56ccb082c1161ffc10f79bebe6df35",
+ "sha256:be60592f9d218b52f03384d1325efa9d3b41e4c4d55ea022cd548547cc42cd2b",
+ "sha256:c92db7101ef5bfc18e96777ed7bc7c822d545fa5977e90a585accac43d22f18a",
+ "sha256:dc586724a95b7d980aa17f671e173df00f0a2eef23f8babbeee663229a938fec",
+ "sha256:dd81b911d28925e7e8b323e8d06951554655021df8dd4ac3045d7212ac4ba080",
+ "sha256:e3affdcbc2afb6f5bd0eb3130139ceedc5e3f28d206fe49f63073cb9e65988e0",
+ "sha256:e5cb5526d69bb9143c2e4d2a115d08ffca3d8e0fddc84925a7b54931c96f5c02",
+ "sha256:efababa8e12330aa94a53e90a81eb6e2d55f348bc2e71adbf17d9cad23c03ee6",
+ "sha256:f3ef052283da7dec1987bba8d8733051c2325654641dfe5877a4022108098683",
+ "sha256:fbd2288890b88e8aab4499e55148805b58ec711053588cc2f0196a44f6e3d855"
],
"index": "pypi",
- "markers": "python_version >= '3.7'",
- "version": "==0.2.0"
+ "version": "==0.2.1"
},
"stevedore": {
"hashes": [
@@ -771,7 +770,6 @@
"sha256:adc8b5dd02c0143108878c499284205adb258aad6db6634e5b869e7ee2bd548b"
],
"index": "pypi",
- "markers": "python_version >= '3.7'",
"version": "==0.40.2"
},
"zipp": {
diff --git a/backend/root/constants.py b/backend/root/constants.py
index a2bff54a4..a2290f974 100644
--- a/backend/root/constants.py
+++ b/backend/root/constants.py
@@ -44,4 +44,4 @@ class Environment:
# Phone number regex
-PHONE_NUMBER_REGEX = r'^(\+?\(?\d{3}\)?[-\s\.]?)?\d{3}[-\s\.]?\d{4,6}$'
+PHONE_NUMBER_REGEX = r'^\+?\s*(\d\s*){8,15}$'
diff --git a/backend/root/management/commands/seed_scripts/recruitment_position.py b/backend/root/management/commands/seed_scripts/recruitment_position.py
index 9d8e145db..2be5b7954 100644
--- a/backend/root/management/commands/seed_scripts/recruitment_position.py
+++ b/backend/root/management/commands/seed_scripts/recruitment_position.py
@@ -28,8 +28,8 @@ def seed():
position_data = POSITION_DATA.copy()
position_data.update(
{
- 'name_nb': f'Stilling {i}',
- 'name_en': f'Position {i}',
+ 'name_nb': f'{gang.abbreviation} stilling {i}',
+ 'name_en': f'{gang.abbreviation} position {i}',
'gang': gang,
'recruitment': recruitment,
}
diff --git a/backend/root/management/commands/seed_scripts/textitems.py b/backend/root/management/commands/seed_scripts/textitems.py
index 81c7ce8a1..22788957b 100644
--- a/backend/root/management/commands/seed_scripts/textitems.py
+++ b/backend/root/management/commands/seed_scripts/textitems.py
@@ -37,13 +37,65 @@ def seed():
'text_nb': 'Har du spørsmål eller ønsker å komme i kontakt med oss? Ikke nøl med å ta kontakt!',
'text_en': 'Do you have any questions or want to get in touch with us? Don"t hesitate to contact us!',
},
+ {
+ 'key': 'festivals',
+ 'text_nb': 'Annenhvert år arrangeres Norges største kulturfestival UKA og verdens største internasjonale tematiske studentfestival under Studentersamfundets paraply.',
+ 'text_en': "Every other year, Norway's largest cultural festival UKA and the world's largest international thematic student festival are organized under Studentersamfundet's umbrella.",
+ },
+ {
+ 'key': 'volunteering',
+ 'text_nb': 'Det meste av arbeid på Studentersamfundet i Trondhjem gjøres gjennom dugnad av studenter. Arbeidet er organisert i enheter som kalles gjenger. Potensielle nye medlemmer må søke den aktuelle gjengen om opptak, og gjengen vurderer hver enkelt søker. Med sine omtrent 1700 frivillige utgjør det indre miljøet i Studentersamfundet en betydelig del av det organiserte fritidstilbudet til studenter i Trondheim.',
+ 'text_en': 'Most of the work at Samfundet is done on a voluntary basis by students. The work is organized into units called groups. Prospective new members must apply to the appropriate group for admission and the group reviews each applicant. With around 1700 volunteers, the internal environment of Samfundet constitutes a significant part of organized leisure activities for students in Trondheim.',
+ },
+ {
+ 'key': 'the_society_meeting',
+ 'text_nb': 'Samfundsmøtet er Studentersamfundets høyeste organ. Her velges leder samt medlemmer til Finansstyret og Rådet. Lederen velger ut sitt eget styre, som utformer den politiske profilen og representer medlemmene og foreningen Samfundet. Finansstyret administrerer forretningsdriften. Rådet kontrollerer at all virksomhet i Samfundet foregår i henhold til norske og interne lover. Samfundet har en daglig leder, økonomiansvarlig, husøkonom, vaktmester og renholdspersonell som er ansatte.',
+ 'text_en': "The Society Meeting is our highest organ. We elect the leader here, as well as members of the Finance Board and the Council. The leader, elected politically, chooses his or her own Board, which forms the House's political profile and represents all of Samfundet's members. The Finance Board manages the business. The Council ensures that all activities at Samfundet take place according to Norwegian and internal laws. Samfundet has a general manager, financial manager, house-economist, caretaker and cleaning staff who are employees.",
+ },
+ {
+ 'key': 'about_samfundet',
+ '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': 'no_recruitment_text',
+ 'text_nb': 'Det er for tiden ingen opptak på Samfundet',
+ 'text_en': 'There are currently no recruitments at Samfundet',
+ },
+ {
+ 'key': 'no_recruitment_text_0',
+ 'text_nb': 'Vi har opptak på starten av hvert semester og ønsker at du søker til oss som frivillig!',
+ 'text_en': 'We have recruitments at the start of each semester and would like you to apply to us as a volunteer!',
+ },
+ {
+ 'key': 'no_recruitment_text_1',
+ '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': 'no_recruitment_text_2',
+ 'text_nb': 'Nesten uansett hvilken studiebakgrunn eller interesser du har, så finnes det en frivillig gjeng som søker nettopp deg!',
+ 'text_en': 'Almost regardless of your study background or interests, there is a group of volunteers looking for you!',
+ },
+ {
+ 'key': 'no_recruitment_text_3',
+ 'text_nb': 'Omtrent 2000 studenter bidrar allerede frivillig! Du kan være med å jobbe med blant annet lyd, lys, teater, snekring, IT, artistbooking, korsang, musikk og mye annet. Du kan lære mye av å jobbe på Samfundet, og du blir garantert kjent med mange andre studenter.',
+ 'text_en': 'Approximately 2,000 students are already contributing voluntarily! You can help work with, among other things, sound, lighting, theatre, carpentry, IT, artist booking, choir singing, music and much more. You can learn a lot from working at Samfundet, and you are guaranteed to get to know many other students.',
+ },
+ {
+ 'key': 'no_recruitment_text_4',
+ 'text_nb': 'For mer informasjon om samfundets gjenger ',
+ 'text_en': 'For more information about the groups ',
+ },
+ {
+ 'key': 'no_recruitment_text_5',
+ 'text_nb': 'Hvis du allerede har søkt kan du logge inn som søker for å prioritere og følge med på dine søknader.',
+ 'text_en': 'If you have already applied, you can log in as an applicant to prioritize and monitor your applications.',
+ },
{
'key': 'sulten_reservation_help',
- 'text_nb': """Bord må reserveres minst en dag i forveien. Mat kan forhåndsbestilles slik at dere ikke trenger å vente når dere kommer.
- Merk at flertallet av personer må være medlem for å reservere og at alle må være over 20 år etter kl 20:00 i helger.""",
- 'text_en': """Tables must be reserved at least one day in advance. Food can be pre-ordered so you do not have to wait when you arrive.
- Note that the majority of people must be a member of the Student Society to reserve
- and that all must be over 20 years after 20:00 on weekends.""",
+ 'text_nb': 'Bord må reserveres minst en dag i forveien. Mat kan forhåndsbestilles slik at dere ikke trenger å vente når dere kommer. Merk at flertallet av personer må være medlem for å reservere og at alle må være over 20 år etter kl 20:00 i helger.',
+ 'text_en': 'Tables must be reserved at least one day in advance. Food can be pre-ordered so you do not have to wait when you arrive. Note that the majority of people must be a member of the Student Society to reserve and that all must be over 20 years after 20:00 on weekends.',
},
{
'key': 'sulten_reservation_contact',
diff --git a/backend/samfundet/admin.py b/backend/samfundet/admin.py
index c49b79d8f..69b2cf515 100644
--- a/backend/samfundet/admin.py
+++ b/backend/samfundet/admin.py
@@ -587,19 +587,16 @@ def admissions_count(self, obj: RecruitmentPosition) -> int:
@admin.register(RecruitmentAdmission)
class RecruitmentAdmissionAdmin(CustomBaseAdmin):
sortable_by = [
- 'id',
'recruitment_position',
'recruitment',
'user',
]
list_display = [
- 'id',
'recruitment_position',
'recruitment',
'user',
]
search_fields = [
- 'id',
'recruitment_position',
'recruitment',
'user',
diff --git a/backend/samfundet/conftest.py b/backend/samfundet/conftest.py
index 55239111d..67d609670 100644
--- a/backend/samfundet/conftest.py
+++ b/backend/samfundet/conftest.py
@@ -31,7 +31,6 @@
https://docs.pytest.org/en/7.1.x/how-to/fixtures.html
"""
-
TestCase.databases = {'default', 'billig'}
diff --git a/backend/samfundet/migrations/0008_alter_recruitmentadmission_id.py b/backend/samfundet/migrations/0008_alter_recruitmentadmission_id.py
new file mode 100644
index 000000000..1c3d0d851
--- /dev/null
+++ b/backend/samfundet/migrations/0008_alter_recruitmentadmission_id.py
@@ -0,0 +1,20 @@
+# Generated by Django 5.0 on 2024-02-08 17:15
+
+import uuid
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+ dependencies = [
+ ("samfundet", "0007_recruitmentadmission_withdrawn_and_more"),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name="recruitmentadmission",
+ name="id",
+ field=models.UUIDField(
+ default=uuid.uuid4, editable=False, primary_key=True, serialize=False
+ ),
+ ),
+ ]
diff --git a/backend/samfundet/models/recruitment.py b/backend/samfundet/models/recruitment.py
index 936b0f97e..7b7ef6f7a 100644
--- a/backend/samfundet/models/recruitment.py
+++ b/backend/samfundet/models/recruitment.py
@@ -1,18 +1,18 @@
#
# This file contains models spesific to the recruitment system
#
-
from __future__ import annotations
+import uuid
+
from django.db import models
from django.utils import timezone
from django.core.exceptions import ValidationError
from root.utils.mixins import CustomBaseModel, FullCleanSaveMixin
-from samfundet.models.model_choices import RecruitmentStatusChoices, RecruitmentPriorityChoices
-
from .general import Gang, User, Organization
+from .model_choices import RecruitmentStatusChoices, RecruitmentPriorityChoices
class Recruitment(CustomBaseModel):
@@ -155,6 +155,7 @@ class Interview(CustomBaseModel):
class RecruitmentAdmission(CustomBaseModel):
+ id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
admission_text = models.TextField(help_text='Admission text for the admission')
recruitment_position = models.ForeignKey(
RecruitmentPosition, on_delete=models.CASCADE, help_text='The recruitment position that is recruiting', related_name='admissions'
@@ -184,6 +185,11 @@ def __str__(self) -> str:
def save(self, *args: tuple, **kwargs: dict) -> None:
"""If the admission is saved without an interview, try to find an interview from a shared position."""
+ if not self.applicant_priority:
+ current_applications_count = RecruitmentAdmission.objects.filter(user=self.user).count()
+ # Set the applicant_priority to the number of applications + 1 (for the current application)
+ self.applicant_priority = current_applications_count + 1
+ """If the admission is saved without an interview, try to find an interview from a shared position."""
if self.withdrawn:
self.recruiter_priority = RecruitmentPriorityChoices.NOT_WANTED
self.recruiter_status = RecruitmentStatusChoices.AUTOMATIC_REJECTION
diff --git a/backend/samfundet/serializers.py b/backend/samfundet/serializers.py
index d5a1f7115..3b53535d9 100644
--- a/backend/samfundet/serializers.py
+++ b/backend/samfundet/serializers.py
@@ -589,12 +589,47 @@ def update(self, instance: RecruitmentPosition, validated_data: dict) -> Recruit
return updated_instance
+class ApplicantInterviewSerializer(serializers.ModelSerializer):
+ class Meta:
+ model = Interview
+ fields = [
+ 'id',
+ 'interview_time',
+ 'interview_location',
+ ]
+
+
+class RecruitmentPositionForApplicantSerializer(serializers.ModelSerializer):
+ class Meta:
+ model = RecruitmentPosition
+ fields = [
+ 'id',
+ 'name_nb',
+ 'name_en',
+ 'short_description_nb',
+ 'short_description_en',
+ 'long_description_nb',
+ 'long_description_en',
+ 'is_funksjonaer_position',
+ 'default_admission_letter_nb',
+ 'default_admission_letter_en',
+ 'gang',
+ 'recruitment',
+ ]
+
+
class RecruitmentAdmissionForApplicantSerializer(serializers.ModelSerializer):
+ interview = ApplicantInterviewSerializer(read_only=True)
+ recruitment_position = RecruitmentPositionForApplicantSerializer(read_only=True)
+
class Meta:
model = RecruitmentAdmission
fields = [
+ 'id',
'admission_text',
'recruitment_position',
+ 'applicant_priority',
+ 'interview',
'created_at',
'withdrawn',
]
@@ -656,6 +691,7 @@ def update(self, instance: RecruitmentAdmission, validated_data: dict) -> Recrui
interview_instance = instance.interview
interview_instance.interview_location = interview_data.get('interview_location', interview_instance.interview_location)
interview_instance.interview_time = interview_data.get('interview_time', interview_instance.interview_time)
+ interview_instance.notes = interview_data.get('notes', interview_instance.notes)
interview_instance.save()
# Update other fields of RecruitmentAdmission instance
diff --git a/backend/samfundet/tests/test_views.py b/backend/samfundet/tests/test_views.py
index 69331c193..94f93838e 100644
--- a/backend/samfundet/tests/test_views.py
+++ b/backend/samfundet/tests/test_views.py
@@ -678,4 +678,4 @@ def test_recruitment_admission_for_applicant(
# Assert the returned data based on the logic in the view
assert len(response.data) == 1
assert response.data[0]['admission_text'] == fixture_recruitment_admission.admission_text
- assert response.data[0]['recruitment_position'] == fixture_recruitment_admission.recruitment_position.id
+ assert response.data[0]['recruitment_position']['id'] == fixture_recruitment_admission.recruitment_position.id
diff --git a/frontend/src/AppRoutes.tsx b/frontend/src/AppRoutes.tsx
index 2becb28a8..0e5f30bb3 100644
--- a/frontend/src/AppRoutes.tsx
+++ b/frontend/src/AppRoutes.tsx
@@ -3,6 +3,7 @@ import {
AboutPage,
AdminPage,
ApiTestingPage,
+ ApplicantApplicationOverviewPage,
ComponentPage,
EventPage,
EventsPage,
@@ -85,6 +86,8 @@ export function AppRoutes() {
} />
} />
} />
+ } />
+ >} />
{/*
ADMIN ROUTES
diff --git a/frontend/src/Components/MenuItem/MenuItem.module.scss b/frontend/src/Components/MenuItem/MenuItem.module.scss
index 03a069961..c3de3f001 100644
--- a/frontend/src/Components/MenuItem/MenuItem.module.scss
+++ b/frontend/src/Components/MenuItem/MenuItem.module.scss
@@ -7,7 +7,7 @@
max-width: 600px;
margin: 0 auto;
color: white;
-
+ margin-bottom: 2em;
}
.item_name {
@@ -19,28 +19,23 @@
font-size: 1.25em;
margin-bottom: 5px;
text-transform: uppercase;
- font-family: 'LemonMilkLight', sans-serif;
+ font-family: $lyche-title-font;
}
.item_price {
- font-size: .75em;
+ font-size: 0.75em;
margin-left: 20px;
- margin-top: .25em;
- font-family: 'Lora', sans-serif;
- color: white;
+ margin-top: 0.25em;
}
.item_description {
color: dimgray;
- font-family: 'Lora', sans-serif;
}
.item_allergens {
color: dimgray;
- font-family: 'Lora', sans-serif;
}
.item_recommendations {
color: dimgray;
- font-family: 'Lora', sans-serif;
}
diff --git a/frontend/src/Components/Navbar/Navbar.tsx b/frontend/src/Components/Navbar/Navbar.tsx
index 03ee777cc..2e9df7a36 100644
--- a/frontend/src/Components/Navbar/Navbar.tsx
+++ b/frontend/src/Components/Navbar/Navbar.tsx
@@ -81,7 +81,7 @@ export function Navbar() {
className={styles.navbar_dropdown_link}
onAfterClick={() => setExpandedDropdown('')}
>
- {t(KEY.common_about_samfundet)}
+ {t(KEY.common_general)}
setExpandedDropdown('')}>
{t(KEY.common_membership)}
diff --git a/frontend/src/Components/SultenPage/SultenPage.module.scss b/frontend/src/Components/SultenPage/SultenPage.module.scss
index f080559c7..72977d4b5 100644
--- a/frontend/src/Components/SultenPage/SultenPage.module.scss
+++ b/frontend/src/Components/SultenPage/SultenPage.module.scss
@@ -16,10 +16,11 @@
min-width: 100%;
min-height: calc(100vh - 200px);
z-index: 10;
- padding: calc($sulten-navbar-height / 2) 0 calc($sulten-navbar-height / 2) 0;
+ padding-top: $sulten-navbar-height;
@include for-mobile-down {
flex-direction: column;
padding: 0%;
+ padding-top: $sulten-navbar-height;
}
}
diff --git a/frontend/src/Components/Table/Table.tsx b/frontend/src/Components/Table/Table.tsx
index 5ba9762e8..123e67411 100644
--- a/frontend/src/Components/Table/Table.tsx
+++ b/frontend/src/Components/Table/Table.tsx
@@ -32,10 +32,11 @@ type TableProps = {
// Data can either be a table cell with separated value and content, or just the raw value
// For instance ["a", "b"] or [ {value: "a", content: