refactor: request list => display invoice code & payment code

This commit is contained in:
puriphatt 2024-11-29 11:17:35 +07:00
parent 3d48cd1140
commit 7147ed1819
2 changed files with 20 additions and 8 deletions

View file

@ -1,6 +1,6 @@
<script setup lang="ts">
// NOTE: Library
import { onMounted, reactive, ref, watch } from 'vue';
import { onMounted, reactive, ref, watch, computed, nextTick } from 'vue';
import { useI18n } from 'vue-i18n';
// NOTE: Components
@ -36,7 +36,7 @@ import {
PropOptions,
PropString,
} from 'src/stores/product-service/types';
import { computed, nextTick } from 'vue';
import { Invoice } from 'src/stores/payment/types';
const { locale } = useI18n();
@ -443,8 +443,13 @@ const successAll = computed(() => {
<DataDisplay
class="col"
icon="mdi-file-document-outline"
tooltip
:label="$t('requestList.invoiceCode')"
:value="'-'"
:value="
data.quotation?.invoice
?.map((i: Invoice) => i.code)
.join(', ') || '-'
"
/>
<span class="col"></span>
</div>
@ -455,8 +460,13 @@ const successAll = computed(() => {
<DataDisplay
class="col"
icon="mdi-file-document-outline"
tooltip
:label="$t('requestList.receiptCode')"
:value="'-'"
:value="
data.quotation?.invoice
?.flatMap((i: Invoice) => i.payment?.code || [])
.join(', ') || '-'
"
/>
<DataDisplay
class="col"