hedera-web/forms/ecomerce/pending/index.js

22 lines
446 B
JavaScript

import './style.scss';
export default new Class({
Extends: Hedera.Form,
Template: require('./ui.xml'),
activate() {
this.basket = new Hedera.Basket(this.app);
this.$.orders.setInfo('o', 'myOrder', 'hedera', ['id'], 'id');
},
async onRemoveOrderClick(form) {
if (confirm(_('AreYouSureDeleteOrder')))
await form.deleteRow();
},
async loadOrder(id) {
const basket = new Hedera.Basket(this.app);
await basket.load(id);
}
});