resaults table redesign
This commit is contained in:
@@ -95,7 +95,7 @@ const hrates = ref([
|
||||
// { "country": "AT", "code": "50161321", "url": "https://www.ikea.com/at/de/p/hol-aufbewahrungstisch-akazie-50161321/", "name": "HOL", "typeName": "Aufbewahrungstisch", "mainImageUrl": "https://www.ikea.com/at/de/images/products/hol-aufbewahrungstisch-akazie__0104310_pe251255_s5.jpg", "itemNoGlobal": "50161321", "salesPrice": "80.99", "tag": "FAMILY_PRICE", "last_mod": "2023-12-03 16:44:24" },
|
||||
const hproducts = ref([
|
||||
{ text: "Country", value: "countryName", sortable: true },
|
||||
{ text: "Name", value: "name", sortable: true },
|
||||
// { text: "Name", value: "name", sortable: true },
|
||||
{ text: "Local Price", value: "salesPrice", sortable: true },
|
||||
{ text: "Cur", value: "currency", sortable: false},
|
||||
{ text: "Rate", value: "rate" },
|
||||
@@ -112,7 +112,7 @@ const hresults = ref([
|
||||
])
|
||||
const rates = ref([]);
|
||||
const options_items = ref([]);
|
||||
const selected_item = ref(null);
|
||||
const itemCode = ref(null);
|
||||
|
||||
const options = {
|
||||
region: 150,
|
||||
@@ -261,7 +261,7 @@ onMounted(fetch_ccodes);
|
||||
const showRow = async (item) => {
|
||||
console.log('ITEM=', item);
|
||||
console.log('FORM=', form);
|
||||
|
||||
itemCode.value = item.code;
|
||||
try {
|
||||
const response = await axios.post(route('products.compare'), { codes: item.code, countries: form.countries, currency: form.currency })
|
||||
|
||||
@@ -318,12 +318,12 @@ const submit = () => {
|
||||
:searchable="true" :options="currency" @select="onSelectCurrency" />
|
||||
</div>
|
||||
<div class="flex flex-col start-0">
|
||||
<span class="font-extrabold font-mono">Results</span>
|
||||
<span class="font-extrabold font-mono">Results <b v-if="itemCode">for {{ itemCode }}</b> </span>
|
||||
</div>
|
||||
<div>
|
||||
<EasyTable :rows-per-page=15 :headers="hproducts" :items="tproducts" alternating>
|
||||
<template #item-name="{ name, url }">
|
||||
<a class="underline" target="_blank" :href="url">{{ name }}</a>
|
||||
<EasyTable :rows-per-page=25 :headers="hproducts" :items="tproducts" alternating>
|
||||
<template #item-countryName="{ countryName, url }">
|
||||
<a class="underline" target="_blank" :href="url">{{ countryName }}</a>
|
||||
</template>
|
||||
</EasyTable>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user