Fixes AXO module.

This commit is contained in:
Pedro Silva 2024-04-11 12:03:31 +01:00
parent 995621ba21
commit 2f1c36af40
No known key found for this signature in database
GPG key ID: E2EE20C0669D24B3
7 changed files with 55 additions and 22 deletions

View file

@ -14,6 +14,11 @@ class BillingView {
return '';
}
const selectElement = document.querySelector(selectSelector);
if (!selectElement) {
return ${key};
}
const option = selectElement.querySelector(`option[value="${key}"]`);
return option ? option.textContent : key;
}
@ -37,7 +42,6 @@ class BillingView {
<div>${data.value('postCode')} ${data.value('city')}</div>
<div>${valueOfSelect('#billing_state', data.value('stateCode'))}</div>
<div>${valueOfSelect('#billing_country', data.value('countryCode'))}</div>
<div>${data.value('phone')}</div>
</div>
`;
},
@ -80,11 +84,7 @@ class BillingView {
company: {
'selector': '#billing_company_field',
'valuePath': null,
},
// phone: {
// 'selector': '#billing_phone_field',
// 'valuePath': null,
// },
}
}
});
}