<template>
  <AdminLayout>
    <Breadcrumb current-page-text="Sistem Günlüğü" />
    <section class="section-list">
      <list-table-content
        :tableHeader="tableHeader"
        icon="logs"
        title="Sistem Günlüğü"
        listText="Log"
        apiList="Auth/GetOperationLogs"
        apiText="Sistem Günlüğü Listesi"
        isUseRoute />
    </section>
  </AdminLayout>
</template>
<script setup lang="ts">
  import AdminLayout from '@/layouts/AdminLayout.vue'
  import { ref } from 'vue'
  import { useDateStore } from '@/stores/dateStore'
  const dateStore = useDateStore()

  const tableHeader = ref<Record<string, any>[]>([
    {
      name: 'tarih',
      title: 'İşlem Tarihi',
      compute: (v: Record<string, any>): string => {
        return dateStore.dateFormat({ date: v.timestamp })
      },
      sort: true,
      style: { width: '10%' }
    },
    {
      name: 'userName',
      title: 'İşlemi yapan',
      sort: true,
      style: { width: '20%' }
    },
    {
      name: 'operationType',
      title: 'Bölüm',
      sort: true,
      style: { width: '15%' }
    },
    {
      name: 'description',
      title: 'İşlem',
      sort: true
    }
  ])
</script>
