feat: include agent IDs in ProfessionalItem and FeaturedAgentItem interfaces and dashboard updates
This commit is contained in:
@@ -326,7 +326,7 @@ export default function CmsPage() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const newItem: ProfessionalItem = { name, subtitle, location, experience, expertise, imageUrl };
|
const newItem: ProfessionalItem = { id: agent?.id, name, subtitle, location, experience, expertise, imageUrl };
|
||||||
onChange([...currentItems, newItem]);
|
onChange([...currentItems, newItem]);
|
||||||
setAgentSearchQuery('');
|
setAgentSearchQuery('');
|
||||||
setAgentSearchResults([]);
|
setAgentSearchResults([]);
|
||||||
@@ -383,7 +383,7 @@ export default function CmsPage() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const newAgent: FeaturedAgentItem = { name, role, rating, location, experience, imageUrl };
|
const newAgent: FeaturedAgentItem = { id: agent?.id, name, role, rating, location, experience, imageUrl };
|
||||||
setEditContent({ ...data, featuredAgents: [...(data.featuredAgents || []), newAgent] });
|
setEditContent({ ...data, featuredAgents: [...(data.featuredAgents || []), newAgent] });
|
||||||
setAgentSearchQuery('');
|
setAgentSearchQuery('');
|
||||||
setAgentSearchResults([]);
|
setAgentSearchResults([]);
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ export interface FeatureItem {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface FeaturedAgentItem {
|
export interface FeaturedAgentItem {
|
||||||
|
id?: string;
|
||||||
name: string;
|
name: string;
|
||||||
role: string;
|
role: string;
|
||||||
rating: string;
|
rating: string;
|
||||||
@@ -31,6 +32,7 @@ export interface FeaturesContent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface ProfessionalItem {
|
export interface ProfessionalItem {
|
||||||
|
id?: string;
|
||||||
name: string;
|
name: string;
|
||||||
subtitle: string;
|
subtitle: string;
|
||||||
location: string;
|
location: string;
|
||||||
|
|||||||
Reference in New Issue
Block a user