Entry.vue 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. })
  8. const form = useForm({})
  9. const submit = () => {
  10. form.post(route('test-transactions.store'))
  11. }
  12. </script>
  13. <template>
  14. <Card>
  15. <template #title> <h1>Entry</h1> </template>
  16. <template #content>
  17. <DataTable
  18. responsiveLayout="scroll"
  19. columnResizeMode="expand"
  20. :value="data.data"
  21. :rowHover="true"
  22. :stripedRows="true"
  23. >
  24. <template #header>
  25. <span style="color: var(--primary-color)">Maksimal ditampilkan :</span> 5
  26. <br />
  27. <span style="color: var(--primary-color)">Ditampilkan :</span>
  28. {{ Object.keys(data.data).length }}
  29. </template>
  30. <Column v-for="inTable in InTable" :field="inTable.field" :header="inTable.header" :key="inTable.field" />
  31. </DataTable>
  32. <AppPagination :links="data.links" />
  33. </template>
  34. <template #footer>
  35. <div class="flex flex-column md:flex-row justify-content-end">
  36. <Button
  37. label="Car Entry"
  38. icon="pi pi-check"
  39. class="p-button-outlined"
  40. :disabled="form.processing"
  41. @click="submit"
  42. />
  43. </div>
  44. </template>
  45. </Card>
  46. </template>