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>
|
<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 color="yellow" :active="comments_loading" indeterminate>
|
||||||
</v-progress-linear>
|
</v-progress-linear>
|
||||||
<v-list>
|
<v-list>
|
||||||
|
|
|
@ -1,29 +1,32 @@
|
||||||
<template>
|
<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 color="blue" :active="orders_loading" indeterminate>
|
||||||
</v-progress-linear>
|
</v-progress-linear>
|
||||||
<v-container>
|
<v-container>
|
||||||
<v-row >
|
<v-row>
|
||||||
<v-col cols=12 v-for="item in sortedOrders" :key="item.doc_no">
|
<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-row>
|
||||||
<v-col cols=4>
|
<v-col cols=4>
|
||||||
<v-card-title>
|
<v-card-title>
|
||||||
Order: {{ item.doc_no }}
|
Order: {{ item.doc_no }}
|
||||||
</v-card-title>
|
</v-card-title>
|
||||||
<v-card-subtitle>
|
<v-card-subtitle>
|
||||||
{{ formatDate(item.doc_date,"DD/MM/YYYY") }}
|
{{ 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 == 'Completed'" icon="mdi-check"></v-icon>
|
||||||
{{ item.doc_status }}
|
<v-icon v-if="item.doc_status == 'Live'" icon="mdi-play"></v-icon>
|
||||||
</v-card-subtitle>
|
{{ item.doc_status }}
|
||||||
<v-card-text>
|
</v-card-subtitle>
|
||||||
<h5>Address :</h5>
|
<v-card-text>
|
||||||
<template v-for="(k,v, index) in item.del_addr" :key="index">
|
<h5>Address :</h5>
|
||||||
<v-caption v-if="k != '' || k != 0">
|
<template v-for="(k,v, index) in item.del_addr" :key="index">
|
||||||
{{ k }} <br/>
|
<v-caption v-if="k != '' || k != 0">
|
||||||
</v-caption>
|
{{ k }} <br/>
|
||||||
</template>
|
</v-caption>
|
||||||
</v-card-text>
|
</template>
|
||||||
|
</v-card-text>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col cols=8>
|
<v-col cols=8>
|
||||||
<v-card-text>
|
<v-card-text>
|
||||||
|
@ -58,10 +61,17 @@ export default {
|
||||||
return {
|
return {
|
||||||
orders_loading: false,
|
orders_loading: false,
|
||||||
orders: [],
|
orders: [],
|
||||||
doc_types: ["Live","","Completed"]
|
doc_types: ["Live","","Completed"],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
prog_col(){
|
||||||
|
if (this.doc_status == 2){
|
||||||
|
return "green"
|
||||||
|
} else {
|
||||||
|
return "blue"
|
||||||
|
}
|
||||||
|
},
|
||||||
sortedOrders() {
|
sortedOrders() {
|
||||||
let sorted = this.orders
|
let sorted = this.orders
|
||||||
sorted.sort((a, b) => {
|
sorted.sort((a, b) => {
|
||||||
|
|
|
@ -43,11 +43,11 @@
|
||||||
</v-list-item>
|
</v-list-item>
|
||||||
</RecycleScroller>
|
</RecycleScroller>
|
||||||
</v-list>
|
</v-list>
|
||||||
<CustomerComments :customer="selected_cust"></CustomerComments>
|
<RecentOrders :customer="selected_cust" doc_status="0"></RecentOrders>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col cols="12" sm=12 lg=6>
|
<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="2"></RecentOrders>
|
||||||
<RecentOrders :customer="selected_cust" doc_status="0"></RecentOrders>
|
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
Loading…
Reference in a new issue