Skip to content

Commit

Permalink
fix up merge
Browse files Browse the repository at this point in the history
  • Loading branch information
magsyg committed Dec 22, 2024
1 parent 4845fa0 commit 5a471e3
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Generated by Django 5.1.1 on 2024-12-22 00:13
# Generated by Django 5.1.1 on 2024-12-22 01:25

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("samfundet", "0007_alter_infobox_color_alter_infobox_image_and_more"),
("samfundet", "0011_recruitmentposition_file_description_en_and_more"),
]

operations = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import { useEffect, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { useParams } from 'react-router-dom';
import { Button, Link, ProgressBar, SamfundetLogoSpinner } from '~/Components';
import { Table, type TableRow } from '~/Components/Table';
import { Table } from '~/Components/Table';
import { Text } from '~/Components/Text/Text';
import { getRecruitmentStats } from '~/api';
import { GangStatsDto, type RecruitmentForRecruiterDto, type RecruitmentGangStatDto, RecruitmentStatsDto } from '~/dto';
import type { RecruitmentForRecruiterDto, RecruitmentGangStatDto } from '~/dto';
import { useCustomNavigate } from '~/hooks';
import { KEY } from '~/i18n/constants';
import { reverse } from '~/named-urls';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import { useQuery } from '@tanstack/react-query';
import { useCallback, useRef, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { useParams } from 'react-router-dom';
import { toast } from 'react-toastify';
import { Chart, SamfundetLogoSpinner } from '~/Components';
import { Table } from '~/Components/Table';
import { Text } from '~/Components/Text/Text';
import { getRecruitmentStats } from '~/api';
import type { RecruitmentStatsDto } from '~/dto';
import { useCustomNavigate, useParentElementWidth } from '~/hooks';
import { KEY } from '~/i18n/constants';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ import { TabView } from '~/Components';
import type { Tab } from '~/Components/TabBar/TabBar';
import { AdminPageLayout } from '~/PagesAdmin/AdminPageLayout/AdminPageLayout';
import { getRecruitmentForRecruiter } from '~/api';
import { RecruitmentDto, type RecruitmentForRecruiterDto } from '~/dto';
import type { RecruitmentForRecruiterDto } from '~/dto';
import { useTitle } from '~/hooks';
import { KEY } from '~/i18n/constants';
import { dbT } from '~/utils';
import { RecruitmentProgression } from './Components/RecruitmentProgression';
import { RecruitmentStatistics } from './Components/RecruitmentStatistics';

export function RecruitmentOverviewPage() {
const { t } = useTranslation();
const { recruitmentId } = useParams();
const RECRUITMENT_TITLE_PLACEHOLDER: string = 'PLACEHOLDER-RECRUITMENT-TITLE';

const { data, isLoading, error } = useQuery<RecruitmentForRecruiterDto>({
queryKey: ['recruitmentStats', recruitmentId],
Expand All @@ -29,10 +29,11 @@ export function RecruitmentOverviewPage() {
{ key: 2, label: t(KEY.recruitment_statistics), value: <RecruitmentStatistics statistics={data?.statistics} /> },
];
}, [data, t]);

useTitle(t(KEY.recruitment_overview));

return (
<AdminPageLayout title={`${t(KEY.recruitment_overview)}: ${RECRUITMENT_TITLE_PLACEHOLDER}`}>
<AdminPageLayout title={`${t(KEY.recruitment_overview)}: ${dbT(data, 'name')}`}>
<TabView tabs={tabs} />
</AdminPageLayout>
);
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ export type RecruitmentForRecruiterDto = RecruitmentDto & {

export type RecruitmentWriteDto = RecruitmentDto & {
organization: number;
}
};

export type RecruitmentSeparatePositionDto = {
id?: number;
Expand Down Expand Up @@ -582,8 +582,8 @@ export type RecruitmentCampusStatDto = {

export type RecruitmentGangStatDto = {
gang: GangDto;
total_applications: number;
total_applicants: number;
application_count: number;
applicant_count: number;
average_priority: number;
total_accepted: number;
total_rejected: number;
Expand Down

0 comments on commit 5a471e3

Please sign in to comment.