fix(frontend): refresh the landing page, keep the employer sidebar full height, and align the candidate home
This commit is contained in:
1 parent
ac57c05aca
commit
a5990d3fc6
12 files changed
+460
-51
No files matched your search
@@ -104,6 +104,10 @@ function describeNextStep(journey: CandidateJourney, step: NextStep): StepView {
|
||||
|
||||
function NextStepCard({ journey }: { journey: CandidateJourney }) {
|
||||
const view = describeNextStep(journey, journey.nextStep);
|
||||
// The stored onboarding step is not advanced after the first saves, so it
|
||||
// describes progress only until a real result exists. Once a test has
|
||||
// produced a result, showing "consents" would contradict the result blocks.
|
||||
const showSavedStep = !journey.hasResults;
|
||||
return (
|
||||
<section className={styles.card} aria-labelledby="next-step-title">
|
||||
<p className={styles["card-eyebrow"]}>Следующий шаг</p>
|
||||
@@ -119,12 +123,18 @@ function NextStepCard({ journey }: { journey: CandidateJourney }) {
|
||||
</ButtonLink>
|
||||
) : null}
|
||||
</div>
|
||||
<p className={styles.note}>
|
||||
Сохраненный шаг аккаунта: <strong>{onboardingStepLabels[journey.savedStep]}</strong>.
|
||||
{view.mentionsOptionalFsp
|
||||
? " Привязка ФСП ID необязательна: путь до категории проходит через анкету и тест."
|
||||
: null}
|
||||
</p>
|
||||
{showSavedStep || view.mentionsOptionalFsp ? (
|
||||
<p className={styles.note}>
|
||||
{showSavedStep ? (
|
||||
<>
|
||||
Сохраненный шаг аккаунта: <strong>{onboardingStepLabels[journey.savedStep]}</strong>.
|
||||
</>
|
||||
) : null}
|
||||
{view.mentionsOptionalFsp
|
||||
? " Привязка ФСП ID необязательна: путь до категории проходит через анкету и тест."
|
||||
: null}
|
||||
</p>
|
||||
) : null}
|
||||
</section>
|
||||
);
|
||||
}
|
||||
@@ -192,7 +202,9 @@ function sectionLinks(journey: CandidateJourney): SectionLink[] {
|
||||
? "Есть подтвержденная категория"
|
||||
: hasActiveAttempt
|
||||
? "Есть незавершенная попытка"
|
||||
: "Еще не пройден";
|
||||
: journey.hasResults
|
||||
? "Пройден, категории пока нет"
|
||||
: "Еще не пройден";
|
||||
|
||||
return [
|
||||
{
|
||||
@@ -215,7 +227,11 @@ function sectionLinks(journey: CandidateJourney): SectionLink[] {
|
||||
},
|
||||
{
|
||||
label: "Результаты",
|
||||
status: hasConfirmed ? "Есть категория" : "Появятся после теста",
|
||||
status: hasConfirmed
|
||||
? "Есть категория"
|
||||
: journey.hasResults
|
||||
? "Есть результат, категории пока нет"
|
||||
: "Появятся после теста",
|
||||
to: paths.candidate.results,
|
||||
linkLabel: "Результаты и история",
|
||||
},
|
||||
@@ -255,8 +271,9 @@ function AvailableActions({ journey }: { journey: CandidateJourney }) {
|
||||
/**
|
||||
* The main block of the candidate home: the next step, the declared and the
|
||||
* confirmed level side by side, and links to the available actions. Everything
|
||||
* comes from one read of the profile, the questionnaire, and the assessment
|
||||
* availability; a failed read shows an error instead of a guessed step.
|
||||
* comes from one read of the profile, the questionnaire, the assessment
|
||||
* availability, and the results; a failed read shows an error instead of a
|
||||
* guessed step.
|
||||
*/
|
||||
export function CandidateNextStep() {
|
||||
const session = useGetCurrentSession();
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
/* Desktop first: base rules target 1024px and wider; narrow screens adapt. */
|
||||
|
||||
/* The graphite rail is painted by the container, not by the sidebar alone:
|
||||
* the sidebar is sticky and only one viewport tall, while the container spans
|
||||
* the whole page, so the rail stays dark on long pages. */
|
||||
.shell {
|
||||
display: grid;
|
||||
grid-template-columns: 17rem minmax(0, 1fr);
|
||||
min-height: 100vh;
|
||||
background: linear-gradient(var(--palette-graphite), var(--palette-graphite)) left top / 17rem
|
||||
100% no-repeat;
|
||||
}
|
||||
|
||||
/* Dark region: violet fails on graphite (2.49:1), so text, links, and the
|
||||
@@ -46,6 +52,7 @@
|
||||
.shell {
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
grid-template-rows: auto 1fr;
|
||||
background: none;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
|
||||
Reference in new issue
Block a user