Entry.vue 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <script setup>
  2. import { useForm } from '@inertiajs/inertia-vue3'
  3. import AppPagination from '@/components/AppPagination.vue'
  4. import { InTable } from './TableHeader'
  5. defineProps({
  6. data: Object,
  7. dataCount: Number,
  8. })
  9. const form = useForm({})
  10. const submit = () => {
  11. form.post(route('test-transactions.store'))
  12. }
  13. </script>
  14. <template>
  15. <Card>
  16. <template #title> <h1>Entry</h1> </template>
  17. <template #content>
  18. <DataTable
  19. responsiveLayout="scroll"
  20. columnResizeMode="expand"
  21. :value="data.data"
  22. :rowHover="true"
  23. :stripedRows="true"
  24. >
  25. <template #header> <span style="color: var(--primary-color)">Car Entry :</span> {{ dataCount }} </template>
  26. <Column v-for="inTable in InTable" :field="inTable.field" :header="inTable.header" :key="inTable.field" />
  27. </DataTable>
  28. <AppPagination :links="data.links" />
  29. </template>
  30. <template #footer>
  31. <div class="flex flex-column md:flex-row justify-content-end">
  32. <Button
  33. label="Car Entry"
  34. icon="pi pi-check"
  35. class="p-button-outlined"
  36. :disabled="form.processing"
  37. @click="submit"
  38. />
  39. </div>
  40. </template>
  41. </Card>
  42. </template>