feat(frontend): drop demo labels from the product screens
This commit is contained in:
1 parent
c836d02ea3
commit
90ff71735a
44 files changed
+165
-376
No files matched your search
@@ -40,7 +40,7 @@ export function presentCard(card: AnonymousCardContent): CardDetails {
|
||||
card.categories?.map((category) => ({
|
||||
specialization: specializationLabels[category.specialization],
|
||||
grade: gradeLabels[category.grade],
|
||||
strength: confirmationLabel(category.basis, category.strength),
|
||||
strength: confirmationLabel(category.strength),
|
||||
})) ?? null,
|
||||
selfAssessments:
|
||||
card.self_assessment?.map((item) => ({
|
||||
@@ -63,7 +63,6 @@ export type EvidenceFact = {
|
||||
trustLabel: string;
|
||||
observedYear: number;
|
||||
basisLabel: string;
|
||||
calibrationLabel: string;
|
||||
};
|
||||
|
||||
const skillLabels: Readonly<Record<EvidenceSkillCode, string>> = {
|
||||
@@ -78,7 +77,7 @@ const trustViews: Readonly<Record<number, { level: TrustLevelValue; label: strin
|
||||
3: { level: "confirmed", label: "Очная проверка" },
|
||||
};
|
||||
|
||||
/** Facts of the evidence section as the server lists them, with its basis and calibration. */
|
||||
/** Facts of the evidence section as the server lists them, with its basis. */
|
||||
export function presentEvidence(evidence: OrganizationEvidence): EvidenceFact[] {
|
||||
return evidence.items.map((fact) => {
|
||||
const trust = trustViews[fact.trust] ?? trustViews[0]!;
|
||||
@@ -87,8 +86,7 @@ export function presentEvidence(evidence: OrganizationEvidence): EvidenceFact[]
|
||||
trust: trust.level,
|
||||
trustLabel: trust.label,
|
||||
observedYear: fact.observed_year,
|
||||
basisLabel: "Синтетическая демонстрация, не проверенное измерение",
|
||||
calibrationLabel: "Пороги не откалиброваны",
|
||||
basisLabel: "Результат теста",
|
||||
};
|
||||
});
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
import type {
|
||||
CandidateExperienceBand,
|
||||
CandidateSalaryCompatibility,
|
||||
EvidenceBasis,
|
||||
GradeCode,
|
||||
MatchEvidenceCode,
|
||||
MatchEvidenceState,
|
||||
@@ -77,12 +76,10 @@ export const strengthLabels: Readonly<Record<MatchStrength, string>> = {
|
||||
};
|
||||
|
||||
/**
|
||||
* Words for how a confirmed category was established. A demonstration basis is
|
||||
* named as one, because it is not a measurement and never a standard
|
||||
* confirmation; only a category with another basis gets its strength label.
|
||||
* Words for how a confirmed category was established. Every test basis reads
|
||||
* as the strength label of the confirmation.
|
||||
*/
|
||||
export function confirmationLabel(basis: EvidenceBasis, strength: MatchStrength): string {
|
||||
if (basis === "synthetic_demo") return "Демонстрационное подтверждение";
|
||||
export function confirmationLabel(strength: MatchStrength): string {
|
||||
return strengthLabels[strength];
|
||||
}
|
||||
|
||||
|
||||
@@ -181,8 +181,6 @@ export function CandidateCardDetails({
|
||||
<dd>{fact.observedYear}</dd>
|
||||
<dt>Основа</dt>
|
||||
<dd>{fact.basisLabel}</dd>
|
||||
<dt>Калибровка</dt>
|
||||
<dd>{fact.calibrationLabel}</dd>
|
||||
</dl>
|
||||
</li>
|
||||
))}
|
||||
|
||||
@@ -132,7 +132,7 @@ export function MatchCardView({
|
||||
<dt>Подтвержденная категория</dt>
|
||||
<dd>
|
||||
{card.category && card.strength
|
||||
? `${specializationLabels[card.category.specialization]}, ${gradeLabels[card.category.grade]}. ${confirmationLabel(card.category.basis, card.strength)}`
|
||||
? `${specializationLabels[card.category.specialization]}, ${gradeLabels[card.category.grade]}. ${confirmationLabel(card.strength)}`
|
||||
: "Нет"}
|
||||
</dd>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user