-
+
{{packingList.packages.reduce((total, obj) => obj.quantity + total, 0)}}
{{(Math.ceil((packingList.packages.reduce((total, obj) => obj.cbm + total, 0)) * 10000) / 10000).toFixed(3)}}
{{packingList.status === 5 ? 'On Hold' : 'Release'}}
{{packingList.order.address.street_one+' '+(packingList.order.address.street_two ? packingList.order.address.street_two : '')+', '+ packingList.order.address.district.name+', '+packingList.order.address.post_code+' '+packingList.order.address.state.name+', '+packingList.order.address.country.name}}
-
Release
-
Hold
+
Release
+
Hold
@@ -76,12 +76,22 @@
export default {
data(){
return {
- expanded: false
+ expanded: false,
+ index: null,
}
},
methods: {
- successHandler(){
- this.$store.dispatch('reloadList', {'name': 'containerListSection'});
+ updateStatus(index, status){
+ this.index = index;
+ this.submit(this.route('api.packing_list.status.update', this.item.packing_lists[index].id, status), 'put', 'containerListSection', true, true)
+ },
+ successHandler(response){
+ this.item.packing_lists[this.index] = response.payload.data;
+ this.$forceUpdate();
+ this.index = null;
+ },
+ errorHandler(){
+ this.index = null;
}
},
mixins: [componentHandler]