feat(cv): prioritize ATS template choices
This commit is contained in:
@@ -197,6 +197,12 @@ export function applyCvTheme(settings: CvVariantSettings, themeId: string): CvVa
|
||||
};
|
||||
}
|
||||
|
||||
export function getVisibleCvThemes(themes: CvTheme[], atsOnly: boolean, selectedId?: string): CvTheme[] {
|
||||
return themes
|
||||
.filter((theme) => !atsOnly || theme.atsFriendly || theme.id === selectedId)
|
||||
.sort((left, right) => Number(right.atsFriendly) - Number(left.atsFriendly));
|
||||
}
|
||||
|
||||
export function normalizeCvLanguage(language?: string | null): string {
|
||||
const normalized = language?.trim().toLowerCase();
|
||||
return normalized === "no" || normalized === "nb" || normalized === "nb-no" ? "nb-NO" : normalized || "en";
|
||||
|
||||
Reference in New Issue
Block a user