diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 71825d6..04a15aa 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -15,4 +15,4 @@ jobs: run: | ls /var/www/html - run: echo "🍏 This job's status is ${{ job.status }}." - - uses: actions/checkout@v3 + - uses: actions/checkout@v2 diff --git a/app/Http/Controllers/CurrencyRatesController.php b/app/Http/Controllers/CurrencyRatesController.php new file mode 100644 index 0000000..5afbd84 --- /dev/null +++ b/app/Http/Controllers/CurrencyRatesController.php @@ -0,0 +1,13 @@ +get(); + } +} diff --git a/lang/id.json b/lang/id.json index 80a7b51..6f7ec76 100644 --- a/lang/id.json +++ b/lang/id.json @@ -96,5 +96,6 @@ "referenceerror: ccount is not defined": "ReferenceError: ccount is not defined", "referenceerror: currency_code is not defined": "ReferenceError: currency_code is not defined", "referenceerror: assignment to undeclared variable acntry": "ReferenceError: assignment to undeclared variable aCntry", - "referenceerror: _code is not defined": "ReferenceError: _code is not defined" + "referenceerror: _code is not defined": "ReferenceError: _code is not defined", + "referenceerror: acntry is not defined": "ReferenceError: aCntry is not defined" } \ No newline at end of file diff --git a/resources/js/Components/SearchInput.vue b/resources/js/Components/SearchInput.vue index 145fe20..fe989a7 100644 --- a/resources/js/Components/SearchInput.vue +++ b/resources/js/Components/SearchInput.vue @@ -19,20 +19,19 @@ defineExpose({ focus: () => input.value.focus() }); \ No newline at end of file diff --git a/resources/js/Pages/IkeaRoot.vue b/resources/js/Pages/IkeaRoot.vue index de28f66..3cc4556 100644 --- a/resources/js/Pages/IkeaRoot.vue +++ b/resources/js/Pages/IkeaRoot.vue @@ -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);