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

@ -20,19 +20,23 @@
{{ 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/>
<!--<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>