Skip to content

Commit

Permalink
refactor to use recruitmentId
Browse files Browse the repository at this point in the history
  • Loading branch information
Snorre98 committed Nov 3, 2024
1 parent 460ebc8 commit 03f4040
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export function GangPosition({ type, recruitmentPositions }: GangItemProps) {
<Link
url={reverse({
pattern: ROUTES.frontend.recruitment_application,
urlParams: { positionId: pos.id, gangId: gang.id },
urlParams: { positionId: pos.id, recruitmentId: pos.recruitment },
})}
className={styles.position_short_desc}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export function GangPositionDropdown({ type, recruitmentPositions, recruitmentId
<Link
url={reverse({
pattern: ROUTES.frontend.recruitment_application,
urlParams: { positionId: pos.id, gangId: gang.id, recruitmentId: recruitmentId },
urlParams: { positionId: pos.id, recruitmentId: recruitmentId },
})}
className={styles.position_name}
>
Expand All @@ -40,7 +40,7 @@ export function GangPositionDropdown({ type, recruitmentPositions, recruitmentId
<Link
url={reverse({
pattern: ROUTES.frontend.recruitment_application,
urlParams: { positionId: pos.id, gangId: gang.id, recruitmentId: recruitmentId },
urlParams: { positionId: pos.id, recruitmentId: recruitmentId },
})}
className={styles.position_short_desc}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export function PositionsTable({ currentSelectedGang, setLoading, loading }: Pos
const tableData = positions.map((item) => {
const positionPageURL = reverse({
pattern: ROUTES.frontend.recruitment_application,
urlParams: { positionId: item.id, gangId: item.id, recruitmentId: recruitmentId },
urlParams: { positionId: item.id, recruitmentId: recruitmentId },
});
return {
cells: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export function RecruitmentApplicationFormPage() {

const [loading, setLoading] = useState(true);

const { positionId } = useParams();
const { positionId, recruitmentId } = useParams();

useTitle(recruitmentPosition ? (dbT(recruitmentPosition, 'name') as string) : '');

Expand Down Expand Up @@ -175,7 +175,7 @@ export function RecruitmentApplicationFormPage() {
navigate({
url: reverse({
pattern: ROUTES.frontend.recruitment_application,
urlParams: { positionId: pos.id, gangId: pos.gang.id },
urlParams: { positionId: pos.id, recruitmentId: recruitmentId },
}),
});
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export function RecruitmentApplicationsOverviewPage() {
pattern: ROUTES.frontend.recruitment_application,
urlParams: {
positionId: application.recruitment_position.id,
gangId: application.recruitment_position.gang.id,
recruitmentId: recruitmentId,
},
})}
className={styles.position_name}
Expand Down Expand Up @@ -131,7 +131,7 @@ export function RecruitmentApplicationsOverviewPage() {
pattern: ROUTES.frontend.recruitment_application,
urlParams: {
positionId: application.recruitment_position.id,
gangId: application.recruitment_position.gang.id,
recruitmentId: recruitmentId,
},
})}
className={styles.withdrawnLink}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ export function RecruitmentGangAdminPage() {
pattern: ROUTES.frontend.recruitment_application,
urlParams: {
positionId: recruitmentPosition.id,
recruitmentId: recruitmentId,
},
}),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ export function RecruitmentRecruiterDashboardPage() {
pattern: ROUTES.frontend.recruitment_application,
urlParams: {
positionId: application.recruitment_position.id,
recruitmentId: recruitmentId,
},
})}
>
Expand Down

0 comments on commit 03f4040

Please sign in to comment.