( async function(){ Vue.prototype.$accounts = window.ctp.accounts; Vue.component('finished-item-table',{ props : [ 'items' ], methods: { getFormattedDateTime: function (dateTime) { if (!!dateTime) { return dateTime.split('T')[0] + ' ' + dateTime.split('T')[1]; } return luxon.DateTime.now().toFormat('yyyy-MM-dd HH:mm:ss'); }, removeItem: function (index) { this.$emit('remove-item', index) } }, template : `
ID | Item ID | Sku | Created By | Created At | Job Card ID | Barcode | Status | Account | Action |
---|---|---|---|---|---|---|---|---|---|
{{item.id}} | {{item.itemId}} | {{item.sku}} | {{item.createdBy}} | {{ getFormattedDateTime( item.createdAt) }} | {{item.jobCardId}} | {{item.barcode}} |
|