Refactor AXO module

This commit is contained in:
Pedro Silva 2024-03-14 10:54:15 +00:00
parent a9d2f97a80
commit 578a5426dc
No known key found for this signature in database
GPG key ID: E2EE20C0669D24B3
7 changed files with 337 additions and 121 deletions

View file

@ -21,14 +21,14 @@ class BillingView {
if (data.isEmpty()) {
return `
<div style="margin-bottom: 20px;">
<h3>Billing details <a href="javascript:void(0)" ${this.el.changeBillingAddressLink.attributes} style="margin-left: 20px;">Edit</a></h3>
<h3>Billing <a href="javascript:void(0)" ${this.el.changeBillingAddressLink.attributes} style="margin-left: 20px;">Edit</a></h3>
<div>Please fill in your billing details.</div>
</div>
`;
}
return `
<div style="margin-bottom: 20px;">
<h3>Billing details <a href="javascript:void(0)" ${this.el.changeBillingAddressLink.attributes} style="margin-left: 20px;">Edit</a></h3>
<h3>Billing <a href="javascript:void(0)" ${this.el.changeBillingAddressLink.attributes} style="margin-left: 20px;">Edit</a></h3>
<div>${data.value('email')}</div>
<div>${data.value('company')}</div>
<div>${data.value('firstName')} ${data.value('lastName')}</div>
@ -89,6 +89,10 @@ class BillingView {
});
}
isActive() {
return this.billingFormFields.active;
}
activate() {
this.billingFormFields.activate();
}
@ -97,6 +101,10 @@ class BillingView {
this.billingFormFields.deactivate();
}
refresh() {
this.billingFormFields.refresh();
}
setData(data) {
this.billingFormFields.setData(data);
}