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,87 +0,0 @@
import { CommonModule } from '@angular/common';
import { ChangeDetectionStrategy, Component, inject } from '@angular/core';
import { BackofficeFacade } from '../../facades/backoffice/backoffice.facade';
import { TranslatePipe } from '../../i18n/translate.pipe';
@Component({
selector: 'app-backoffice-dashboard',
standalone: true,
imports: [CommonModule, TranslatePipe],
template: `
<main class="backoffice-dashboard">
<h1>{{ 'backoffice.title' | translate }}</h1>
<p>{{ 'backoffice.subtitle' | translate }}</p>
@if (loading()) {
<section class="card">{{ 'backoffice.loading' | translate }}</section>
} @else {
<section class="card">
<h2>{{ 'backoffice.products' | translate }}</h2>
<table>
<thead>
<tr>
<th>{{ 'backoffice.sku' | translate }}</th>
<th>{{ 'backoffice.titleColumn' | translate }}</th>
<th>{{ 'backoffice.price' | translate }}</th>
<th>{{ 'backoffice.status' | translate }}</th>
</tr>
</thead>
<tbody>
@for (product of products(); track product.id) {
<tr>
<td>{{ product.sku }}</td>
<td>{{ product.title }}</td>
<td>{{ product.price.amount }} {{ product.price.currency }}</td>
<td>{{ product.stockStatus ?? ('backoffice.notAvailable' | translate) }}</td>
</tr>
}
</tbody>
</table>
</section>
<section class="card">
<h2>{{ 'backoffice.categories' | translate }}</h2>
<ul>
@for (category of categories(); track category.id) {
<li>{{ category.title }} ({{ category.itemsCount ?? 0 }} {{ 'backoffice.itemsCount' | translate }})</li>
}
</ul>
</section>
<section class="card placeholders">
<h2>{{ 'backoffice.otherDomains' | translate }}</h2>
<div class="chips">
<span>{{ 'backoffice.orders' | translate }}</span>
<span>{{ 'backoffice.customers' | translate }}</span>
<span>{{ 'backoffice.inventory' | translate }}</span>
<span>{{ 'backoffice.media' | translate }}</span>
<span>{{ 'backoffice.settings' | translate }}</span>
</div>
</section>
}
</main>
`,
styles: [
`
.backoffice-dashboard { padding: 1.5rem; display: grid; gap: 1rem; }
.card { border: 1px solid var(--border-color, #d3dad9); border-radius: 12px; padding: 1rem; background: #fff; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.5rem; border-bottom: 1px solid #ececec; }
ul { margin: 0; padding-left: 1rem; }
.chips { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.chips span { padding: 0.25rem 0.5rem; border-radius: 999px; background: var(--bg-secondary, #f5f5f5); }
`
],
changeDetection: ChangeDetectionStrategy.OnPush
})
export class BackofficeDashboardComponent {
private readonly facade = inject(BackofficeFacade);
readonly products = this.facade.products;
readonly categories = this.facade.categories;
readonly loading = this.facade.loading;
constructor() {
this.facade.load();
}
}

View File

@@ -1,68 +0,0 @@
import { CommonModule } from '@angular/common';
import { ChangeDetectionStrategy, Component, computed, inject } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { BuilderConfigFacade } from '../../facades/builder/builder-config.facade';
import { TranslatePipe } from '../../i18n/translate.pipe';
@Component({
selector: 'app-builder-sandbox',
standalone: true,
imports: [CommonModule, FormsModule, TranslatePipe],
template: `
<main class="builder-sandbox">
<h1>{{ 'builder.title' | translate }}</h1>
<p>{{ 'builder.subtitle' | translate }}</p>
@if (branding(); as brand) {
<section class="builder-card">
<h2>{{ 'builder.branding' | translate }}</h2>
<label>
{{ 'builder.brandName' | translate }}
<input type="text" [ngModel]="brand.brandName" (ngModelChange)="onBrandNameChange($event)" />
</label>
</section>
}
@if (featureFlags(); as flags) {
<section class="builder-card">
<h2>{{ 'builder.featureFlags' | translate }}</h2>
@for (flag of featureFlagKeys(); track flag) {
<label class="flag-row">
<input type="checkbox" [checked]="flags[flag]" (change)="onFlagToggle(flag, $event)" />
<span>{{ flag }}</span>
</label>
}
</section>
}
</main>
`,
styles: [
`
.builder-sandbox { padding: 1.5rem; display: grid; gap: 1rem; }
.builder-card { border: 1px solid var(--border-color, #d3dad9); border-radius: 12px; padding: 1rem; display: grid; gap: 0.75rem; }
input[type='text'] { width: 100%; max-width: 420px; padding: 0.5rem; border-radius: 8px; border: 1px solid var(--border-color, #d3dad9); }
.flag-row { display: flex; align-items: center; gap: 0.5rem; }
`
],
changeDetection: ChangeDetectionStrategy.OnPush
})
export class BuilderSandboxComponent {
private readonly facade = inject(BuilderConfigFacade);
readonly branding = this.facade.branding;
readonly featureFlags = this.facade.featureFlags;
readonly featureFlagKeys = computed(() => Object.keys(this.featureFlags() ?? {}).sort());
constructor() {
this.facade.load();
}
onBrandNameChange(value: string): void {
this.facade.updateBrandName(value);
}
onFlagToggle(flag: string, event: Event): void {
const input = event.target as HTMLInputElement;
this.facade.setFeatureFlag(flag, input.checked);
}
}