feat(interviews): add durable debrief loop
This commit is contained in:
@@ -91,6 +91,14 @@ export function ApplicationInterviewPrep({ jobId }: { jobId: number }) {
|
||||
return mutate(() => interviewPrepApi.add(jobId, { category, title: value }));
|
||||
};
|
||||
|
||||
const startDebrief = () => mutate(() => interviewPrepApi.add(jobId, {
|
||||
category: "debrief",
|
||||
title: t("interviewDebriefDefaultTitle"),
|
||||
content: t("interviewDebriefTemplate"),
|
||||
}));
|
||||
|
||||
const hasDebrief = board?.groups.some((group) => group.category === "debrief") ?? false;
|
||||
|
||||
return (
|
||||
<Stack spacing={2}>
|
||||
<Shell
|
||||
@@ -151,6 +159,18 @@ export function ApplicationInterviewPrep({ jobId }: { jobId: number }) {
|
||||
))
|
||||
)}
|
||||
|
||||
{board?.isInterviewStage && !hasDebrief ? (
|
||||
<Paper variant="outlined" sx={{ p: 2, bgcolor: "action.hover" }}>
|
||||
<Stack direction={{ xs: "column", sm: "row" }} spacing={1.5} alignItems={{ sm: "center" }} justifyContent="space-between">
|
||||
<Box>
|
||||
<Typography variant="subtitle2" sx={{ fontWeight: 800 }}>{t("interviewDebriefTitle")}</Typography>
|
||||
<Typography variant="body2" color="text.secondary">{t("interviewDebriefHelp")}</Typography>
|
||||
</Box>
|
||||
<Button variant="outlined" disabled={busy} onClick={() => void startDebrief()}>{t("interviewDebriefStart")}</Button>
|
||||
</Stack>
|
||||
</Paper>
|
||||
) : null}
|
||||
|
||||
<Box component="form" onSubmit={add}>
|
||||
<Stack direction={{ xs: "column", sm: "row" }} spacing={1}>
|
||||
<TextField
|
||||
@@ -485,6 +505,7 @@ function interviewCategoryLabel(t: (key: any) => string, category: string) {
|
||||
star: "interviewCategoryStar",
|
||||
question: "interviewCategoryQuestions",
|
||||
note: "interviewCategoryNotes",
|
||||
debrief: "interviewCategoryDebrief",
|
||||
};
|
||||
return keys[category] ? t(keys[category]) : category;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user