Files
marketplaces/src/app/features/admin/shell/admin-nav.model.ts
sdarbinyan a4f44dbb58 feat: Phase 7 frontend - Refund/Reconciliation core + Payments & Finance section
New core/finance (Refund/ReconciliationRecord/Settlement models + gateway/
token, mock backed, seeded empty) and features/admin/finance (facade +
page: reconciliation queue with resolve action, settlements placeholder).
New /backoffice/finance route + nav entry, nav i18n key in all 3 languages.
Against docs/backend/PHASE-7-PAYMENTS-RECONCILIATION-CONTRACT.md.

Note: does not wire AdminOrdersLocalGateway's existing mock
requestRefund(id) method into this new Refund flow yet - that's a small
follow-up once Phase 2's real Order backend exists to refund against.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-17 23:56:59 +04:00

79 lines
4.1 KiB
TypeScript

import { AppIconName } from '../../../shared/ui/icon/icon-registry';
export interface AdminNavLink {
type: 'link';
id: string;
icon: AppIconName;
labelKey: string;
/** Segments appended to /:lang/backoffice/. Mutually exclusive with absolutePath. */
path?: string[];
/** Segments appended to /:lang/ directly (routes outside /backoffice, e.g. the project editor). */
absolutePath?: string[];
/** No route exists yet - rendered as a disabled item with a "coming soon" badge. */
comingSoon?: boolean;
/** External URL (mailto: or https:). Mutually exclusive with path/absolutePath/comingSoon. */
externalHref?: string;
}
export interface AdminNavGroup {
type: 'group';
labelKey: string;
}
export interface AdminNavAction {
type: 'action';
id: string;
icon: AppIconName;
labelKey: string;
}
export type AdminNavEntry = AdminNavLink | AdminNavGroup | AdminNavAction;
export const ADMIN_NAV_PRIMARY: AdminNavEntry[] = [
{ type: 'link', id: 'dashboard', icon: 'home', labelKey: 'adminShell.nav.dashboard', path: ['dashboard'] },
{ type: 'group', labelKey: 'adminShell.nav.catalogGroup' },
{ type: 'link', id: 'products', icon: 'package', labelKey: 'adminShell.nav.products', path: ['products'] },
{ type: 'link', id: 'categories', icon: 'tags', labelKey: 'adminShell.nav.categories', path: ['categories'] },
{ type: 'link', id: 'orders', icon: 'cart', labelKey: 'adminShell.nav.orders', path: ['orders'] },
{ type: 'link', id: 'customers', icon: 'user', labelKey: 'adminShell.nav.customers', path: ['customers'] },
{ type: 'link', id: 'transactions', icon: 'creditCard', labelKey: 'adminShell.nav.transactions', path: ['transactions'] },
{ type: 'link', id: 'moderation', icon: 'star', labelKey: 'adminShell.nav.moderation', path: ['moderation'] },
{ type: 'link', id: 'notifications', icon: 'bell', labelKey: 'adminShell.nav.notifications', path: ['notifications'] },
{ type: 'link', id: 'integrations', icon: 'network', labelKey: 'adminShell.nav.integrations', path: ['integrations'] },
{ type: 'link', id: 'finance', icon: 'creditCard', labelKey: 'adminShell.nav.finance', path: ['finance'] },
{ type: 'link', id: 'reports', icon: 'chartBar', labelKey: 'adminShell.nav.reports', path: ['reports'] },
{ type: 'group', labelKey: 'adminShell.nav.partnersGroup' },
{ type: 'link', id: 'seller-management', icon: 'store', labelKey: 'adminShell.nav.sellerManagement', path: ['partners', 'seller-management'] },
{ type: 'link', id: 'content', icon: 'edit', labelKey: 'adminShell.nav.content', absolutePath: ['edit', 'static-pages'] },
{ type: 'link', id: 'media', icon: 'images', labelKey: 'adminShell.nav.mediaLibrary', path: ['media'] },
{ type: 'link', id: 'marketplace-builder', icon: 'network', labelKey: 'adminShell.nav.marketplaceBuilder', absolutePath: ['edit'] },
{ type: 'link', id: 'users', icon: 'users', labelKey: 'adminShell.nav.users', path: ['users'] },
{ type: 'link', id: 'settings', icon: 'settings', labelKey: 'adminShell.nav.settings', path: ['settings'] },
{ type: 'link', id: 'monitoring', icon: 'monitor', labelKey: 'adminShell.nav.monitoring', path: ['monitoring'] },
{ type: 'link', id: 'analytics', icon: 'chartLine', labelKey: 'adminShell.nav.analytics', path: ['analytics'] },
];
/**
* `documentation`/`help` externalHref is resolved at runtime from bootstrap
* config (tenant.documentationUrl / branding.supportEmail) — see
* `AdminLayoutComponent.navBottom`. Static comingSoon here is the fallback
* when that data is absent.
*/
export const ADMIN_NAV_BOTTOM: AdminNavEntry[] = [
{ type: 'link', id: 'documentation', icon: 'book', labelKey: 'adminShell.nav.documentation', comingSoon: true },
{ type: 'link', id: 'help', icon: 'help', labelKey: 'adminShell.nav.help', comingSoon: true },
{ type: 'action', id: 'logout', icon: 'logOut', labelKey: 'adminShell.nav.logout' },
];
export interface AdminBreadcrumbEntry {
labelKey: string;
/** Segments appended to /:lang/backoffice/. Omitted on the last (current) crumb. */
path?: string[];
}
export interface AdminPageData {
titleKey: string;
descriptionKey: string;
breadcrumb: AdminBreadcrumbEntry[];
}