chore: remove orphaned backoffice/builder dead code

Sprint 2 high-priority cleanup: backoffice-dashboard.component.ts and
builder-sandbox.component.ts were not routed anywhere, superseded by
features/backoffice and features/project-editor. Their sole facades
(BackofficeFacade, BuilderConfigFacade) had no other consumers.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
sdarbinyan
2026-07-15 02:43:46 +04:00
parent 2b52965f2f
commit 96a338ef6f
8 changed files with 0 additions and 247 deletions

View File

@@ -1,40 +0,0 @@
import { Injectable, signal } from '@angular/core';
import { ProductCardConfig, CategoryCardConfig } from '../../shared/models/ui';
import { BackofficeDataService } from '../../core/backoffice/backoffice-data.service';
@Injectable({ providedIn: 'root' })
export class BackofficeFacade {
readonly products = signal<ProductCardConfig[]>([]);
readonly categories = signal<CategoryCardConfig[]>([]);
readonly loading = signal(false);
constructor(private readonly backofficeDataService: BackofficeDataService) {}
load(): void {
this.loading.set(true);
this.backofficeDataService.loadProducts().subscribe({
next: (products) => {
this.products.set(products ?? []);
this.loadCategories();
},
error: () => {
this.products.set([]);
this.loadCategories();
}
});
}
private loadCategories(): void {
this.backofficeDataService.loadCategories().subscribe({
next: (categories) => {
this.categories.set(categories ?? []);
this.loading.set(false);
},
error: () => {
this.categories.set([]);
this.loading.set(false);
}
});
}
}

View File

@@ -1,52 +0,0 @@
import { Injectable, computed, signal } from '@angular/core';
import { take } from 'rxjs/operators';
import { BootstrapConfig } from '../../shared/models/config';
import { ConfigService } from '../../core/config/config.service';
@Injectable({ providedIn: 'root' })
export class BuilderConfigFacade {
private readonly bootstrapState = signal<BootstrapConfig | null>(null);
readonly bootstrap = this.bootstrapState.asReadonly();
readonly branding = computed(() => this.bootstrapState()?.branding ?? null);
readonly featureFlags = computed(() => this.bootstrapState()?.featureFlags ?? null);
constructor(private readonly configService: ConfigService) {}
load(): void {
this.configService.loadBootstrap().pipe(take(1)).subscribe({
next: (config) => this.bootstrapState.set(JSON.parse(JSON.stringify(config)) as BootstrapConfig),
error: () => this.bootstrapState.set(null)
});
}
updateBrandName(nextBrandName: string): void {
const current = this.bootstrapState();
if (!current) {
return;
}
this.bootstrapState.set({
...current,
branding: {
...current.branding,
brandName: nextBrandName
}
});
}
setFeatureFlag(flag: string, enabled: boolean): void {
const current = this.bootstrapState();
if (!current) {
return;
}
this.bootstrapState.set({
...current,
featureFlags: {
...current.featureFlags,
[flag]: enabled
}
});
}
}