feat: enhance dynamic forms and popups for About, Contact, and Resume sections; add project detail popup

This commit is contained in:
2026-02-15 05:27:23 +05:30
parent 55b436c7d2
commit 58929ae6d4
21 changed files with 605 additions and 87 deletions
+10 -14
View File
@@ -13,15 +13,11 @@ export class AdminStateService {
private store = inject(AdminStore);
private api = inject(AdminService);
setCandidateId(id: number) {
this.store.update({ candidateId: id });
}
// ── About ──────────────────────────────────────────────
loadAbout(candidateId: number) {
loadAbout() {
this.store.setSectionLoading('about', true);
return this.api.getHobbies(candidateId).pipe(
return this.api.getHobbies().pipe(
tap({
next: (about: IAbout) => {
this.store.update({ about });
@@ -40,9 +36,9 @@ export class AdminStateService {
this.store.update({ about });
}
upsertHobbies(resumeId: number, hobbies: IHobby[]) {
upsertHobbies(hobbies: IHobby[]) {
this.store.setSectionLoading('about', true);
return this.api.upsertHobbies(resumeId, hobbies).pipe(
return this.api.upsertHobbies(hobbies).pipe(
tap({
next: (updatedHobbies: IHobby[]) => {
this.store.update(state => ({
@@ -61,9 +57,9 @@ export class AdminStateService {
// ── Contact ────────────────────────────────────────────
loadContact(candidateId: number) {
loadContact() {
this.store.setSectionLoading('contact', true);
return this.api.getCandidateWithSocialLinks(candidateId).pipe(
return this.api.getCandidateWithSocialLinks().pipe(
tap({
next: (contact: IContactModel) => {
this.store.update({ contact });
@@ -84,9 +80,9 @@ export class AdminStateService {
// ── Projects ───────────────────────────────────────────
loadProjects(candidateId: number) {
loadProjects() {
this.store.setSectionLoading('projects', true);
return this.api.getProjects(candidateId).pipe(
return this.api.getProjects().pipe(
tap({
next: (projects: IProjects) => {
this.store.update({ projects });
@@ -107,9 +103,9 @@ export class AdminStateService {
// ── Resume ─────────────────────────────────────────────
loadResume(candidateId: number) {
loadResume() {
this.store.setSectionLoading('resume', true);
return this.api.getResume(candidateId).pipe(
return this.api.getResume().pipe(
tap({
next: (resume: IResume) => {
this.store.update({ resume });