refactor: derive payment-system options from schema tuple (#58) #75

Merged
codex-bot merged 1 commits from refactor/58-payment-system-tuple into develop 2026-10-13 21:05:08 +03:00
Owner

Что

Схема bank-card владеет единственным runtime-списком payment systems; Zod enum и options в BankCardFields.vm.ts производны от него. Draft-sentinel "" остаётся отдельным элементом enum.

  • form.schema.ts: paymentSystemValues tuple, z.enum(["", ...paymentSystemValues])
  • BankCardFields.vm.ts: options строятся через paymentSystemValues.map(...)

Проверки

  • npx tsc -b --noEmit — ok
  • npx eslint <2 changed files> --fix --max-warnings=0 — 0
  • npx vitest run src/entities/bank-card/model src/entities/bank-card/ui/BankCardForm — 47 passed (в т.ч. loads and saves the selected payment system)
  • npm run verify — exit 0

Refs WealthLedger/frontend#58

## Что Схема bank-card владеет единственным runtime-списком payment systems; Zod enum и options в `BankCardFields.vm.ts` производны от него. Draft-sentinel `""` остаётся отдельным элементом enum. - `form.schema.ts`: `paymentSystemValues` tuple, `z.enum(["", ...paymentSystemValues])` - `BankCardFields.vm.ts`: options строятся через `paymentSystemValues.map(...)` ## Проверки - `npx tsc -b --noEmit` — ok - `npx eslint <2 changed files> --fix --max-warnings=0` — 0 - `npx vitest run src/entities/bank-card/model src/entities/bank-card/ui/BankCardForm` — 47 passed (в т.ч. `loads and saves the selected payment system`) - `npm run verify` — exit 0 Refs WealthLedger/frontend#58
codex-bot added 1 commit 2026-10-13 20:47:30 +03:00
refactor: derive payment-system options from schema tuple (#58)
Frontend verify / commits (pull_request) Successful in 42s
Frontend verify / security (pull_request) Successful in 11s
Frontend verify / verify (pull_request) Successful in 6m45s
001ad2e723
codex-bot merged commit e67c47b102 into develop 2026-10-13 21:05:08 +03:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: WealthLedger/frontend#75