coloured live orders and rearranged customer list
This commit is contained in:
parent
7b61ccf99b
commit
2c5457673c
3 changed files with 30 additions and 20 deletions
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<h3>Comments <v-btn v-if="customer != null" color="warning" size="smaller" variant="text" icon="mdi-plus" @click="showAddNote"></v-btn></h3>
|
||||
<h3>Comments <v-btn v-if="customer.id != ''" color="warning" size="smaller" variant="text" icon="mdi-plus" @click="showAddNote" :loading="comments_loading"></v-btn></h3>
|
||||
<v-progress-linear color="yellow" :active="comments_loading" indeterminate>
|
||||
</v-progress-linear>
|
||||
<v-list>
|
||||
|
|
|
@ -1,29 +1,32 @@
|
|||
<template>
|
||||
<h3>{{ doc_types[doc_status] }} Orders - {{ customer.acc_no }} {{ customer.name }}</h3>
|
||||
<h3>{{ doc_types[doc_status] }} Orders - {{ customer.acc_no }} {{ customer.name }}
|
||||
<v-btn v-if="customer.id != ''" size="smaller" icon="mdi-refresh" variant="text" color="green" @click="getCustomerRecentOrders" :loading="orders_loading"></v-btn>
|
||||
</h3>
|
||||
<v-progress-linear color="blue" :active="orders_loading" indeterminate>
|
||||
</v-progress-linear>
|
||||
<v-container>
|
||||
<v-row >
|
||||
<v-row>
|
||||
<v-col cols=12 v-for="item in sortedOrders" :key="item.doc_no">
|
||||
<v-card>
|
||||
<v-card :class="{ 'bg-green-lighten-5' : item.doc_status == 'Live' }">
|
||||
<v-row>
|
||||
<v-col cols=4>
|
||||
<v-card-title>
|
||||
Order: {{ item.doc_no }}
|
||||
</v-card-title>
|
||||
<v-card-subtitle>
|
||||
{{ formatDate(item.doc_date,"DD/MM/YYYY") }}
|
||||
<v-icon v-if="item.doc_status == 'Completed'" icon="mdi-check"></v-icon>
|
||||
{{ item.doc_status }}
|
||||
</v-card-subtitle>
|
||||
<v-card-text>
|
||||
<h5>Address :</h5>
|
||||
<template v-for="(k,v, index) in item.del_addr" :key="index">
|
||||
<v-caption v-if="k != '' || k != 0">
|
||||
{{ k }} <br/>
|
||||
</v-caption>
|
||||
</template>
|
||||
</v-card-text>
|
||||
<v-card-subtitle>
|
||||
{{ formatDate(item.doc_date,"DD/MM/YYYY") }}
|
||||
<v-icon v-if="item.doc_status == 'Completed'" icon="mdi-check"></v-icon>
|
||||
<v-icon v-if="item.doc_status == 'Live'" icon="mdi-play"></v-icon>
|
||||
{{ item.doc_status }}
|
||||
</v-card-subtitle>
|
||||
<v-card-text>
|
||||
<h5>Address :</h5>
|
||||
<template v-for="(k,v, index) in item.del_addr" :key="index">
|
||||
<v-caption v-if="k != '' || k != 0">
|
||||
{{ k }} <br/>
|
||||
</v-caption>
|
||||
</template>
|
||||
</v-card-text>
|
||||
</v-col>
|
||||
<v-col cols=8>
|
||||
<v-card-text>
|
||||
|
@ -58,10 +61,17 @@ export default {
|
|||
return {
|
||||
orders_loading: false,
|
||||
orders: [],
|
||||
doc_types: ["Live","","Completed"]
|
||||
doc_types: ["Live","","Completed"],
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
prog_col(){
|
||||
if (this.doc_status == 2){
|
||||
return "green"
|
||||
} else {
|
||||
return "blue"
|
||||
}
|
||||
},
|
||||
sortedOrders() {
|
||||
let sorted = this.orders
|
||||
sorted.sort((a, b) => {
|
||||
|
|
|
@ -43,11 +43,11 @@
|
|||
</v-list-item>
|
||||
</RecycleScroller>
|
||||
</v-list>
|
||||
<CustomerComments :customer="selected_cust"></CustomerComments>
|
||||
<RecentOrders :customer="selected_cust" doc_status="0"></RecentOrders>
|
||||
</v-col>
|
||||
<v-col cols="12" sm=12 lg=6>
|
||||
<CustomerComments :customer="selected_cust"></CustomerComments>
|
||||
<RecentOrders :customer="selected_cust" doc_status="2"></RecentOrders>
|
||||
<RecentOrders :customer="selected_cust" doc_status="0"></RecentOrders>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</template>
|
||||
|
|
Loading…
Reference in a new issue