Implement Site Builder Metadata and Enhance Wizard Functionality
- Introduced new models for Site Builder options, including BusinessType, AudienceProfile, BrandPersonality, and HeroImageryDirection. - Added serializers and views to handle metadata for dropdowns in the Site Builder wizard. - Updated the SiteBuilderWizard component to load and display metadata, improving user experience with dynamic options. - Enhanced BusinessDetailsStep and StyleStep components to utilize new metadata for business types and brand personalities. - Refactored state management in builderStore to include metadata loading and error handling. - Updated API service to fetch Site Builder metadata, ensuring seamless integration with the frontend.
This commit is contained in:
@@ -8,6 +8,7 @@ import type {
|
||||
PageBlueprint,
|
||||
SiteStructure,
|
||||
BuilderFormData,
|
||||
SiteBuilderMetadata,
|
||||
} from '../types/siteBuilder';
|
||||
|
||||
export interface CreateBlueprintPayload {
|
||||
@@ -121,5 +122,12 @@ export const siteBuilderApi = {
|
||||
// Handle unified response format
|
||||
return response?.data || response;
|
||||
},
|
||||
|
||||
/**
|
||||
* Load dropdown metadata for wizard fields
|
||||
*/
|
||||
async getMetadata(): Promise<SiteBuilderMetadata> {
|
||||
return fetchAPI('/v1/site-builder/metadata/');
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user