From 2cb327403dafd79cf8e2564791cf02a701b6a0f4 Mon Sep 17 00:00:00 2001 From: Kirisu <56469224+rubenkristian@users.noreply.github.com> Date: Fri, 9 Dec 2022 13:56:03 +0700 Subject: [PATCH] fix: filter order list (#602) * fix filter * remove console log Co-authored-by: Hildegard Lydia <37687466+hilyds@users.noreply.github.com> --- src/components/OrderList.vue | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/components/OrderList.vue b/src/components/OrderList.vue index db1f00a0..42a19add 100644 --- a/src/components/OrderList.vue +++ b/src/components/OrderList.vue @@ -104,13 +104,13 @@ export default { this.isLoading = true try { const orderList = [] - const listStatus = ["Refunded", "Fulfilled"] const orders = await this.dispatch(getOrdersData, this.pair.address, this.page, this.pageSize, keyword) for (let order of orders.data) { const dna = await queryDnaSamples(this.api, order._source.dna_sample_tracking_id) if (this.isDashboard && dna?.status === "Rejected") continue + if (!this.isDashboard && dna?.status === "ResultReady") continue const dnaTestResult = await queryDnaTestResults(this.api, order._source.dna_sample_tracking_id) const data = { @@ -126,12 +126,7 @@ export default { }) } } - - if (this.isDashboard) { - if (!listStatus.includes(data._source.status)) orderList.push(data) - } else { - if (listStatus.includes(data._source.status)) orderList.push(data) - } + orderList.push(data) } this.orders = orderList