feat(cv): qualify templates and reliable local import processing
This commit is contained in:
@@ -344,7 +344,10 @@ export default function CareerProfilePage() {
|
||||
await loadExtractionRuns();
|
||||
toast(t("profileCvQueuedUpload", { id: res.data.extractionRunId }), "info");
|
||||
} catch (error) {
|
||||
const message = getApiErrorMessage(error, t("profileCvUploadFailed"));
|
||||
const response = (error as { response?: { status?: number; data?: { code?: string } } }).response;
|
||||
const message = response?.status === 503 && response.data?.code === "cv_worker_disabled"
|
||||
? translationRef.current("cvImportWorkerDisabled")
|
||||
: getApiErrorMessage(error, t("profileCvUploadFailed"));
|
||||
setUploadError(message);
|
||||
toast(message, "error");
|
||||
} finally {
|
||||
|
||||
@@ -10,7 +10,7 @@ import PublicIcon from "@mui/icons-material/Public";
|
||||
|
||||
import { api, getApiErrorMessage } from "../api";
|
||||
import { useToast } from "../toast";
|
||||
import { CvOutline, CvTheme, CvVariantSummary, cvBuilderApi, emptyCvVariantSettings, getCvExportFailureKey } from "../cvBuilder";
|
||||
import { CvOutline, CvTheme, CvVariantSummary, cvBuilderApi, newCvVariantSettings, getCvExportFailureKey } from "../cvBuilder";
|
||||
import { useDialogActions } from "../dialogs";
|
||||
import CvTemplateGallery from "../components/CvTemplateGallery";
|
||||
import CvTemplateThumbnail from "../components/CvTemplateThumbnail";
|
||||
@@ -92,7 +92,7 @@ export default function CvBuilderPage() {
|
||||
setCreating(true);
|
||||
try {
|
||||
const variant = await cvBuilderApi.create({ name: newName.trim(), settings: {
|
||||
...emptyCvVariantSettings(newTheme),
|
||||
...newCvVariantSettings(newTheme),
|
||||
sectionsExplicit: true,
|
||||
includeProfileContact: contentSource === "profile" && includeContact,
|
||||
sections: contentSource === "profile" ? selectedSections.map((key) => ({ key })) : [],
|
||||
|
||||
Reference in New Issue
Block a user