fix: [approval] 카드/계좌 1개일 때 자동 선택
This commit is contained in:
@@ -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]);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user