feat(builder): visual footer builder with drag-and-drop columns
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> P0 user feedback: footer static pages were comma-separated text; no way to add extra phones/emails for different countries. - New FooterColumnConfig/FooterLinkConfig model (footer-config.model.ts): columns of links, each link pointing at an existing static page (resolved by key, so it survives route renames) or a custom URL - Footer Builder UI: add/remove columns and links, per-link toggle between 'existing page' (dropdown of real static pages) and 'custom URL', drag-and-drop reordering of both columns and links via @angular/cdk/drag-drop (same primitive already used by the homepage section builder) - Wired FooterResolverService (the service the real storefront footer actually renders through) to read footer.columns as the primary source when present - without this the builder would have saved data nobody ever displayed. Falls back to the existing legacy static-page auto-grouping when no columns are configured, so existing sites are unaffected - CompanyContactConfig gains additionalPhones/additionalEmails (primary phone/email field unchanged) with add/remove UI for country-specific support lines - Old comma-separated staticPageKeys input removed from the UI; field kept on the model as deprecated/read-compat only - New builder.* i18n keys (en/ru/hy); fixed an accidental duplicate-key collision with pre-existing navigation-section addLink/removeLink keys during the rename pass - Verified in browser: added column, added link, switched link source page->custom, added phone number - all reactive and error-free
This commit is contained in:
@@ -11,6 +11,10 @@ export interface CompanyContactConfig {
|
||||
phone?: string;
|
||||
telegram?: string;
|
||||
website?: string;
|
||||
/** Extra phone numbers, e.g. for country-specific support lines. `phone` stays the primary/default one. */
|
||||
additionalPhones?: string[];
|
||||
/** Extra email addresses. `email` stays the primary/default one. */
|
||||
additionalEmails?: string[];
|
||||
}
|
||||
|
||||
export interface CompanyConfig {
|
||||
|
||||
@@ -14,11 +14,29 @@ export interface FooterSocialLinkConfig {
|
||||
icon?: string;
|
||||
}
|
||||
|
||||
export interface FooterLinkConfig {
|
||||
id: string;
|
||||
label: string;
|
||||
/** Key of an existing static page (features/content-management ContentPage.id) - preferred over a raw URL so the link stays correct if the page's route ever changes. */
|
||||
pageKey?: string;
|
||||
/** Used only when pageKey is empty - an external or custom URL. */
|
||||
url?: string;
|
||||
}
|
||||
|
||||
export interface FooterColumnConfig {
|
||||
id: string;
|
||||
title: string;
|
||||
links: FooterLinkConfig[];
|
||||
}
|
||||
|
||||
export interface FooterConfig {
|
||||
logoUrl?: string;
|
||||
paymentIcons?: FooterPaymentIconConfig[];
|
||||
copyrightText?: string | LocalizedTextContent;
|
||||
/** @deprecated superseded by `columns` - kept so already-saved configs still resolve until re-saved through the Footer Builder. */
|
||||
legalPageKeys?: string[];
|
||||
/** @deprecated superseded by `columns` - kept so already-saved configs still resolve until re-saved through the Footer Builder. */
|
||||
staticPageKeys?: string[];
|
||||
columns?: FooterColumnConfig[];
|
||||
socialLinks?: FooterSocialLinkConfig[];
|
||||
}
|
||||
Reference in New Issue
Block a user