2023-01-30 10:08:26 +00:00
|
|
|
import './style.scss';
|
|
|
|
|
|
|
|
export default new Class({
|
|
|
|
Extends: Hedera.Form,
|
|
|
|
Template: require('./ui.xml'),
|
|
|
|
|
|
|
|
activate() {
|
2023-02-15 13:07:09 +00:00
|
|
|
this.basket = new Hedera.Basket(this.app);
|
2023-01-30 10:08:26 +00:00
|
|
|
this.$.orders.setInfo('o', 'myOrder', 'hedera', ['id'], 'id');
|
|
|
|
},
|
|
|
|
|
|
|
|
async onRemoveOrderClick(form) {
|
|
|
|
if (confirm(_('AreYouSureDeleteOrder')))
|
|
|
|
await form.deleteRow();
|
|
|
|
},
|
|
|
|
|
2023-02-15 13:07:09 +00:00
|
|
|
async loadOrder(id) {
|
|
|
|
const basket = new Hedera.Basket(this.app);
|
|
|
|
await basket.load(id);
|
2023-01-30 10:08:26 +00:00
|
|
|
}
|
|
|
|
});
|