fix: [approval] 카드/계좌 1개일 때 자동 선택

This commit is contained in:
김보곤
2026-03-04 20:54:03 +09:00
parent bfb7302f9c
commit f4c08de0e4

View File

@@ -370,9 +370,12 @@ function makeItem(data) {
},
initAutoSelect() {
if (this.formData.expense_type === 'transfer' && !this.formData.selected_account) {
if (this.formData.expense_type === 'transfer' && !this.formData.selected_account && this.accounts.length > 0) {
const primary = this.accounts.find(a => a.is_primary);
if (primary) this.selectAccount(primary);
this.selectAccount(primary || this.accounts[0]);
}
if (this.formData.expense_type === 'corporate_card' && !this.formData.selected_card && this.cards.length === 1) {
this.selectCard(this.cards[0]);
}
},