better del addr and comments displays

This commit is contained in:
Paul Wilde 2023-03-24 11:35:15 +00:00
parent 2c5457673c
commit 68c2109438
2 changed files with 24 additions and 17 deletions

View file

@ -1,9 +1,12 @@
<template>
<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>
<h3>Comments
<v-btn v-if="customer.id != ''" color="warning" size="smaller" variant="text" icon="mdi-plus" @click="showAddNote"></v-btn>
<v-btn v-if="customer.id != ''" color="green" size="smaller" variant="text" icon="mdi-refresh" @click="getCustomerComments" :loading="comments_loading"></v-btn>
</h3>
<v-progress-linear color="yellow" :active="comments_loading" indeterminate>
</v-progress-linear>
<v-list>
<v-list-item v-for="item in comments" :key="item.id">
<v-list-item v-for="item in comments" :key="item.id" :class="{ inactive : !item.active }">
{{ item.comment }}
<template v-slot:append>
<v-icon v-if="item.actioned" icon="mdi-tick" color="green" title="Actioned"></v-icon>

View file

@ -13,26 +13,30 @@
<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>
<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-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-if="item.del_addr.id != 0 && item.del_addr.postal_name != ''">
<h5>Delivery Address :</h5>
<template v-for="(v, k , index) in item.del_addr" :key="index">
<v-caption v-if="k != 'id' && (v != '' || v != 0)">
{{ v }}<br/>
</v-caption>
</template>
</template>
</v-card-text>
</v-col>
<v-col cols=8>
<v-card-text>
<h5>Items :</h5>
<v-caption v-for="(i, index) in item.products" :key="index" style="border-bottom: 1px dotted #000;">
{{ i.code }} - {{ i.name }} x {{ i.quantity }}<br/>
{{ i.code }} - {{ i.name }}
<span v-if="i.quantity != 0">x {{ i.quantity }}</span><br/>
</v-caption>
</v-card-text>
</v-col>