76 lines
3.0 KiB
PHP
76 lines
3.0 KiB
PHP
<x-app-layout>
|
|
<x-slot name="header">
|
|
<h2 class="font-semibold text-xl text-gray-800 dark:text-gray-200 leading-tight">
|
|
{{ __('configuration.Taxrates') }}
|
|
</h2>
|
|
</x-slot>
|
|
|
|
<div class="py-12">
|
|
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8 space-y-6">
|
|
|
|
<div class="p-4 sm:p-8 bg-white dark:bg-gray-800 shadow sm:rounded-lg">
|
|
<div class="max-w-xl">
|
|
<section>
|
|
<header>
|
|
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-100">
|
|
{{ __('configuration.Add new taxrate') }}
|
|
</h2>
|
|
|
|
<p class="mt-1 text-sm text-gray-600 dark:text-gray-400">
|
|
{{ __("configuration.Add new taxrate by clicking add") }}
|
|
</p>
|
|
|
|
</header>
|
|
<a class="mt-6 inline-block" href="{{ route('taxrate.create') }}"><x-primary-button>{{ __('form.Add') }}</x-primary-button></a>
|
|
</section>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="p-4 sm:p-8 bg-white dark:bg-gray-800 shadow sm:rounded-lg">
|
|
<div class="max-w" x-data="tax">
|
|
<section>
|
|
<header>
|
|
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-100">
|
|
{{ __('configuration.Existing taxrates') }}
|
|
</h2>
|
|
</header>
|
|
|
|
<div class="grid grid-cols-3 mt-4">
|
|
<div class="font-bold border-b-2">{{ __('common.Name') }}</div>
|
|
<div class="font-bold border-b-2">{{ __('configuration.Taxrate') }}</div>
|
|
<div class="font-bold border-b-2">{{ __('common.Is active') }}</div>
|
|
</div>
|
|
|
|
<template x-for="tax in taxrates">
|
|
<a class="cursor-pointer grid grid-cols-3 even:bg-gray-100 odd:bg-white" x-data="{url: '/taxrate/' + tax.id + '/edit'}" x-bind:href="url">
|
|
<div x-text="tax.name"></div>
|
|
<div x-text="tax.rate_percentage"></div>
|
|
<div x-text="tax.active ? '{{ __('common.Yes') }}' : '{{ __('common.No') }}'"></div>
|
|
</a>
|
|
</template>
|
|
</section>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</x-app-layout>
|
|
|
|
<script>
|
|
function tax() {
|
|
return {
|
|
taxrates: {},
|
|
|
|
init() {
|
|
let vm = this;
|
|
axios.get('/taxrate')
|
|
.then(function (response) {
|
|
console.log(response.data);
|
|
vm.taxrates = response.data;
|
|
})
|
|
}
|
|
}
|
|
}
|
|
</script>
|