feat: add candidate profile, questionnaire and company forms

This commit is contained in:
TakuyaYagam1 committed 2026-10-07 16:07:02 +03:00
1 parent 3a61a8e8bb
commit f81cd0ae09
68 files changed
+9517 -54

No files matched your search

@@ -0,0 +1,70 @@
import type { Organization } from "../../../shared/api/schemas";
import { Section, TrustLevel } from "../../../shared/ui";
import { candidateCardLevelLabels, organizationTrustLevel } from "../model/verification-labels";
import styles from "./candidate-card-preview.module.css";
type CandidateCard = Organization["candidate_card"];
type CandidateCardPreviewProps = {
card: CandidateCard;
};
const contactLabels = {
website: "Сайт",
email: "Почта для связи",
phone: "Телефон компании",
telegram: "Telegram компании",
} as const;
export function CandidateCardPreview({ card }: CandidateCardPreviewProps) {
const contacts = (Object.keys(contactLabels) as (keyof typeof contactLabels)[]).flatMap((key) => {
const value = card.contacts[key];
return value ? [{ label: contactLabels[key], value }] : [];
});
return (
<Section
title="Так карточку увидит кандидат"
description="Проверьте описание и контакты, которые увидит кандидат."
>
<article className={styles.card} aria-label="Предпросмотр карточки компании">
<header className={styles.header}>
<div>
<h3 className={styles.name}>{card.name}</h3>
<p className={styles.level}>
<TrustLevel
level={organizationTrustLevel[card.verification_level]}
label={candidateCardLevelLabels[card.verification_level]}
/>
</p>
</div>
{card.sphere ? <p className={styles.sphere}>{card.sphere}</p> : null}
</header>
{card.description ? <p className={styles.description}>{card.description}</p> : null}
{contacts.length > 0 ? (
<dl className={styles.contacts}>
{contacts.map(({ label, value }) => (
<div className={styles.contact} key={label}>
<dt>{label}</dt>
<dd>{value}</dd>
</div>
))}
</dl>
) : null}
{card.representatives && card.representatives.length > 0 ? (
<div className={styles.representatives}>
<h4>Представители компании</h4>
<ul>
{card.representatives.map((representative, index) => (
<li key={`${representative.name}-${index}`}>
<span>{representative.name}</span>
<span>{representative.job_title}</span>
</li>
))}
</ul>
</div>
) : null}
</article>
</Section>
);
}