diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index e063d7d4..9f9dae6b 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -41,7 +41,7 @@ FR-0,FR-1: <ОБЩЕЕ НАЗВАНИЕ> или <НАЗВАНИЕ 1>; <НАЗВ ### 🔗 Страницы с изменениями либо как их воспроизвести -- http://localhost:8000/ +- http://localhost:7000/ ### 🖼 Скриншоты diff --git a/src/app/shared/components/party-modification-forms/contract/payout-tool-info/payout-tool-info.component.ts b/src/app/shared/components/party-modification-forms/contract/payout-tool-info/payout-tool-info.component.ts index 3de9c077..d639e618 100644 --- a/src/app/shared/components/party-modification-forms/contract/payout-tool-info/payout-tool-info.component.ts +++ b/src/app/shared/components/party-modification-forms/contract/payout-tool-info/payout-tool-info.component.ts @@ -8,6 +8,7 @@ enum Type { RussianBankAccount = 'russian_bank_account', InternationalBankAccount = 'international_bank_account', WalletInfo = 'wallet_info', + PaymentInstitutionAccount = 'payment_institution_account', } @Component({ @@ -23,16 +24,26 @@ export class PayoutToolInfoComponent implements OnInit { selected: Type; - types = [Type.RussianBankAccount, Type.InternationalBankAccount, Type.WalletInfo]; + types = [ + Type.RussianBankAccount, + Type.InternationalBankAccount, + Type.WalletInfo, + Type.PaymentInstitutionAccount, + ]; t = Type; constructor(private fb: FormBuilder) {} - ngOnInit() { + ngOnInit(): void { const russianBankAccount = get(this, 'initialValue.russian_bank_account', null); const internationalBankAccount = get(this, 'initialValue.international_bank_account', null); const walletInfo = get(this, 'initialValue.wallet_info', null); + const paymentInstitutionAccount = get( + this, + `initialValue.${Type.PaymentInstitutionAccount}`, + null + ); if (russianBankAccount) { this.selected = Type.RussianBankAccount; } @@ -42,26 +53,31 @@ export class PayoutToolInfoComponent implements OnInit { if (walletInfo) { this.selected = Type.WalletInfo; } + if (paymentInstitutionAccount) { + this.selected = Type.PaymentInstitutionAccount; + } this.select(); this.form.updateValueAndValidity(); } - select() { + select(): void { + this.clearControl(); switch (this.selected) { case Type.RussianBankAccount: - this.clearControl(); this.form.registerControl(Type.RussianBankAccount, this.fb.group({})); break; case Type.InternationalBankAccount: - this.clearControl(); this.form.registerControl(Type.InternationalBankAccount, this.fb.group({})); break; case Type.WalletInfo: { - this.clearControl(); const walletInfo = get(this, 'initialValue.wallet_info', {}); this.form.registerControl(Type.WalletInfo, this.fb.group(walletInfo)); break; } + case Type.PaymentInstitutionAccount: + this.form.registerControl(Type.PaymentInstitutionAccount, this.fb.control({})); + this.form.patchValue({}); + break; } }