ready panel now works with external resume json instead of local

This commit is contained in:
DaKheera47
2026-01-23 11:40:34 +00:00
parent 7a358db317
commit 9dfb862649
12 changed files with 250 additions and 164 deletions
+16 -4
View File
@@ -176,6 +176,19 @@ export async function getProfileProjects(): Promise<ResumeProjectCatalogItem[]>
return fetchApi<ResumeProjectCatalogItem[]>('/profile/projects');
}
export async function getResumeProjectsCatalog(): Promise<ResumeProjectCatalogItem[]> {
try {
const settings = await getSettings();
if (settings.rxresumeBaseResumeId) {
return await getRxResumeProjects(settings.rxresumeBaseResumeId);
}
} catch {
// fall through to profile-based projects
}
return getProfileProjects();
}
export async function getProfile(): Promise<ResumeProfile> {
return fetchApi<ResumeProfile>('/profile');
}
@@ -184,10 +197,9 @@ export async function getProfileStatus(): Promise<ProfileStatusResponse> {
return fetchApi<ProfileStatusResponse>('/profile/status');
}
export async function uploadProfile(profile: ResumeProfile): Promise<ProfileStatusResponse> {
return fetchApi<ProfileStatusResponse>('/profile/upload', {
export async function refreshProfile(): Promise<ResumeProfile> {
return fetchApi<ResumeProfile>('/profile/refresh', {
method: 'POST',
body: JSON.stringify({ profile }),
});
}
@@ -205,7 +217,7 @@ export async function validateRxresume(email?: string, password?: string): Promi
});
}
export async function validateResumeJson(): Promise<ValidationResult> {
export async function validateResumeConfig(): Promise<ValidationResult> {
return fetchApi<ValidationResult>('/onboarding/validate/resume');
}
@@ -79,7 +79,7 @@ export const ReadyPanel: React.FC<ReadyPanelProps> = ({
// Load project catalog once
useEffect(() => {
api.getProfileProjects().then(setCatalog).catch(console.error);
api.getResumeProjectsCatalog().then(setCatalog).catch(console.error);
}, []);
// Reset mode when job changes
@@ -55,7 +55,7 @@ export const TailoringEditor: React.FC<TailoringEditorProps> = ({
useEffect(() => {
// Load project catalog
api.getProfileProjects().then(setCatalog).catch(console.error);
api.getResumeProjectsCatalog().then(setCatalog).catch(console.error);
// Set initial selection
if (job.selectedProjectIds) {
@@ -41,7 +41,7 @@ export const TailorMode: React.FC<TailorModeProps> = ({
const [showDescription, setShowDescription] = useState(false);
useEffect(() => {
api.getProfileProjects().then(setCatalog).catch(console.error);
api.getResumeProjectsCatalog().then(setCatalog).catch(console.error);
}, []);
useEffect(() => {