Rates, Build
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 12s
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 12s
This commit is contained in:
@@ -25,6 +25,12 @@ const ccountry_filter = ref([['Country'],]);
|
||||
const ccountry_list = ref(['TEST']);
|
||||
const selected = ref(null);
|
||||
const article = ref('');
|
||||
const hrates = ref([
|
||||
{ text: "Currency", value: "currency", sortable: true},
|
||||
{ text: "Country", value: "country_name", sortable: true},
|
||||
{ text: "Rate", value: "rate", sortable: true}
|
||||
]);
|
||||
const rates = ref([]);
|
||||
|
||||
const options = {
|
||||
region: 150,
|
||||
@@ -72,6 +78,24 @@ const fetch = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
const fetch_rates = async () => {
|
||||
try {
|
||||
const response = await axios.get(route('rates.index'))
|
||||
rates.value = response.data;
|
||||
console.log("RATE=", rates.value);
|
||||
} catch (e) {
|
||||
const response = await Swal.fire({
|
||||
title: __('are you want to try again') + '?',
|
||||
text: __(`${e}`),
|
||||
icon: 'question',
|
||||
showCancelButton: true,
|
||||
showCloseButton: true,
|
||||
})
|
||||
|
||||
response.isConfirmed && fetch()
|
||||
}
|
||||
}
|
||||
|
||||
const headers = ref([
|
||||
{ text: "Id", value: "id", sortable: true },
|
||||
{ text: "Country", value: "country", sortable: true },
|
||||
@@ -88,6 +112,7 @@ function selectCountry(item, id) {
|
||||
}
|
||||
|
||||
onMounted(fetch);
|
||||
onMounted(fetch_rates);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -138,7 +163,9 @@ onMounted(fetch);
|
||||
<div class="mt-5">
|
||||
<EasyTable :rows-per-page=10 :headers="headers" :items="items"></EasyTable>
|
||||
</div>
|
||||
|
||||
<div class="mt-5">
|
||||
<EasyTable :rows-per-page=15 :headers="hrates" :items="rates"></EasyTable>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user