Skip to content

Commit

Permalink
fix up comments
Browse files Browse the repository at this point in the history
  • Loading branch information
magsyg committed Nov 12, 2024
1 parent 657a223 commit 4f42bea
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export function RecruitmentGangOverviewPage() {
},
{
key: 3,
label: t(KEY.recruitment_interview_groups),
label: t(KEY.recruitment_interview_group_create_header),
value: (
<>
<Button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ type RecruitmentSharedInterviewPositionsComponentProps = {
interviewGroup: RecruitmentSharedInterviewPositionsDto;
};

export function RecruitmentSharedInterviewPositionsComponent({ interviewGroup }: RecruitmentSharedInterviewPositionsComponentProps) {
export function RecruitmentSharedInterviewPositionsComponent({
interviewGroup,
}: RecruitmentSharedInterviewPositionsComponentProps) {
const interviewGroupHeader = dbT(interviewGroup, 'name') ?? 'N/A';
const { t } = useTranslation();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ interface FormProps {
recruitmentId?: string;
}

export function RecruitmentSharedInterviewPositionsForm({ initialData, recruitmentId, sharedInterviewGroupId }: FormProps) {
export function RecruitmentSharedInterviewPositionsForm({
initialData,
recruitmentId,
sharedInterviewGroupId,
}: FormProps) {
const { t } = useTranslation();
const navigate = useNavigate();

Expand All @@ -59,7 +63,6 @@ export function RecruitmentSharedInterviewPositionsForm({ initialData, recruitme

const submitText = sharedInterviewGroupId ? t(KEY.common_save) : t(KEY.common_create);


useEffect(() => {
if (recruitmentId) {
getRecruitmentPositions(recruitmentId).then((response) => {
Expand Down Expand Up @@ -146,7 +149,7 @@ export function RecruitmentSharedInterviewPositionsForm({ initialData, recruitme
name="positions"
render={({ field }) => (
<FormItem className={styles.item}>
<FormLabel>{`${t(KEY.common_name)} ${t(KEY.common_english)}`}</FormLabel>
<FormLabel>{t(KEY.recruitment_positions)}</FormLabel>
<FormControl>
<MultiSelect {...field} options={positionOptions} />
</FormControl>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ export function RecruitmentSharedInterviewPositionsFormAdminPage() {
};

const title = sharedInterviewGroupId
? `${t(KEY.common_edit)} ${dbT(sharedInterview, 'name')}`
: `${t(KEY.common_create)} ${t(KEY.recruitment_interview_group)}`;
? t(KEY.recruitment_interview_group_edit_header)
: t(KEY.recruitment_interview_group_create_header);

useTitle(title);

Expand Down
3 changes: 3 additions & 0 deletions frontend/src/i18n/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,9 @@ export const KEY = {
recruitment_interview_set: 'recruitment_interview_set',
recruitment_interview_groups: 'recruitment_interview_groups',
recruitment_interview_group: 'recruitment_interview_group',
recruitment_interview_group_create_header: 'recruitment_interview_group_create_header',
recruitment_interview_group_edit_header: 'recruitment_interview_group_edit_header',
recruitment_search_position: 'recruitment_search_position',
recruitment_applicants: 'recruitment_applicants',
recruitment_interview_time: 'recruitment_interview_time',
recruitment_interview_location: 'recruitment_interview_location',
Expand Down
6 changes: 6 additions & 0 deletions frontend/src/i18n/translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,9 @@ export const nb = prepareTranslations({
[KEY.recruitment_interview_set]: 'Sett intervju',
[KEY.recruitment_interview_groups]: 'Intervjugrupper',
[KEY.recruitment_interview_group]: 'Intervjugruppe',
[KEY.recruitment_interview_group_create_header]: 'Opprett stillingsgruppe for felles intervju',
[KEY.recruitment_interview_group_edit_header]: 'Endre stillingsgruppe for felles intervju',
[KEY.recruitment_search_position]: 'Søk på stillingstittel',
[KEY.recruitment_interview_time]: 'Intervjutid',
[KEY.recruitment_interview_location]: 'Intervjusted',
[KEY.recruitment_no_positions]: 'Ingen verv',
Expand Down Expand Up @@ -755,6 +758,9 @@ export const en = prepareTranslations({
[KEY.recruitment_interview_set]: 'Set Interview',
[KEY.recruitment_interview_groups]: 'Interview groups',
[KEY.recruitment_interview_group]: 'Interview group',
[KEY.recruitment_interview_group_create_header]: 'Create group for shared interview',
[KEY.recruitment_interview_group_edit_header]: 'Edit group for shared interview',
[KEY.recruitment_search_position]: 'Search for position',
[KEY.recruitment_interview_time]: 'Interview Time',
[KEY.recruitment_interview_location]: 'Interview Location',
[KEY.recruitment_interview_notes]: 'Interview notes',
Expand Down
16 changes: 15 additions & 1 deletion frontend/src/router/router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ import {
RecruitmentGangAdminPage,
RecruitmentGangAllApplicantsAdminPage,
RecruitmentGangOverviewPage,
RecruitmentSharedInterviewPositionsFormAdminPage,
RecruitmentOpenToOtherPositionsPage,
RecruitmentOverviewPage,
RecruitmentPositionFormAdminPage,
RecruitmentPositionOverviewPage,
RecruitmentSeparatePositionFormAdminPage,
RecruitmentSharedInterviewPositionsFormAdminPage,
RecruitmentUnprocessedApplicantsPage,
RecruitmentUsersWithoutInterviewGangPage,
RecruitmentUsersWithoutThreeInterviewCriteriaPage,
Expand Down Expand Up @@ -378,10 +378,24 @@ export const router = createBrowserRouter(
/>
<Route
path={ROUTES.frontend.admin_recruitment_sharedinterviewgroup_create}
handle={{
crumb: ({ pathname }: UIMatch) => (
<Link url={pathname}>
{t(KEY.common_create)} {t(KEY.recruitment_interview_group)}
</Link>
),
}}
element={<PermissionRoute required={[]} element={<RecruitmentSharedInterviewPositionsFormAdminPage />} />}
/>
<Route
path={ROUTES.frontend.admin_recruitment_sharedinterviewgroup_edit}
handle={{
crumb: ({ pathname }: UIMatch) => (
<Link url={pathname}>
{t(KEY.common_edit)} {t(KEY.recruitment_interview_group)}
</Link>
),
}}
element={<PermissionRoute required={[]} element={<RecruitmentSharedInterviewPositionsFormAdminPage />} />}
/>
<Route
Expand Down

0 comments on commit 4f42bea

Please sign in to comment.