Commit Graph

2 Commits

Author SHA1 Message Date
Дмитрий e746b3c9a4 chore(cleanup): dead code removal + DemoSeeder env-conditional + schema header drift
Closes Audit #3 P2 batch (knip dead exports/components, DemoSeeder
hygiene, schema header drift).

- Remove app/resources/js/views/admin/AdminPlaceholderView.vue
  (unreferenced placeholder view — confirmed via repo-wide grep, only
  doc references remain)
- npm uninstall concurrently (no script invoked it; --legacy-peer-deps
  for Histoire 1.0-beta.1 peerDep quirk)
- 12 unused exports → internal types (remove `export` keyword):
  - api/admin.ts: AdminTenantsStats, ApiTenantMetrics,
    ApiAdminBillingSummary, ApiAdminIncidentsSummary
  - api/notifications.ts: NotificationEvent
  - api/reports.ts: ApiReportType, ApiReportFormat, ApiReportParameters,
    ReportCounts, ReportQuota
  - composables/mockBilling.ts: TxType
  - composables/useStatusPill.ts: StatusPillSlug
  All 12 are used INSIDE their own file (response shapes), just not
  exported externally — converting to internal types satisfies knip
  without losing type-checking inside the file.
- DatabaseSeeder::run() — DemoSeeder runs only in local+testing envs
  (`migrate:fresh --seed` in dev now produces demo tenant + admin@demo.local
  + 3 projects + ~14 demo deals; prod environments skip)
- db/schema.sql header line 4: «62 базовые таблицы» → «63 базовые
  таблицы (61 regular + 2 partitioned parents: deals + supplier_lead_costs)»
  Closes schema header drift finding from Phase 3.

Verification:
- vue-tsc --noEmit: 0 errors
- ESLint on touched files: 0 errors
- Pest --parallel: 742/739/3sk/0 failed (identical to baseline, no regressions)
- 2243 assertions / 34.46s

Plan: docs/superpowers/plans/2026-05-14-audit3-deferred-fixes.md Task 2.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 08:28:44 +03:00
Дмитрий c8012896e3 phase2(billing): BillingView - финансовый экран биллинга и тарифов
- BillingView (/billing): page-head со stats (кошелёк/лиды/runway-дни) + pending
  banner v-alert info («1 платёж в обработке через ЮKassa, auto-cancel 30 мин»)
  + 3 wallet-cards (Кошелёк ₽ primary card теало-нуар + LIVE; Баланс лидов
  ГЦК; Тариф «Команда» 990₽/мес + 3 фичи) + transactions panel (4 tabs +
  v-data-table 5 колонок: Дата/Операция/ID/Статус-chip/Сумма ± JBM tnum) +
  invoices list (PDF + 1С 8.3 XML).
- composables/mockBilling.ts соответствует схеме v8.7 §4.4-4.5: 8 mock
  транзакций (types: topup/lead_charge/refund/tariff_charge; statuses:
  pending/completed/rejected) + 4 invoices (pdf/xml_1c83) + pending payment.
- Маршрут /billing (meta.layout=app) в router + web.php.

Format helpers: «+ N ₽» / «− N ₽» / «— 0 ₽» rejected; Intl.NumberFormat ru-RU.

Vitest +11 (всего 90/90 за 7.96s):
- заголовок + page-stats nbsp regex + pending banner + 3 wallet-cards + 3 фичи
  тарифа + 4 tabs + дефолт «Все» 8 строк + format «+/−» + rejected «— 0 ₽» +
  4 invoice rows + PDF/1С 8.3 XML labels.

Регресс: lint+type+format OK; vitest 90/90; vite build (BillingView lazy-chunk;
VDataTable вынесен в общий chunk 79.84KB - shared с DealsView); story:build
16/23 за 32.16s; Pest 48/48 за 4.89s.

CLAUDE.md v1.26->v1.27, реестр Открытых_вопросов v1.35->v1.36.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 18:39:49 +03:00