store/resources/js/pages/admin/master/customers/table/data-table-actions.vue
Yoga Pangestu 15e2b7ec5b
Some checks are pending
linter / quality (push) Waiting to run
tests / ci (8.3) (push) Waiting to run
tests / ci (8.4) (push) Waiting to run
tests / ci (8.5) (push) Waiting to run
feat: add material_result field to CuttingMaterial and CuttingMaterialCombination; update validation rules and service logic to handle new material result calculations; enhance frontend components for displaying material results in cutting management
2026-07-04 23:14:37 +07:00

26 lines
899 B
Vue

<script setup lang="ts">
import { RowDeleteAction, RowEditAction } from '@/components/button';
import { useCan } from '@/composables/useCan';
import { destroy } from '@/routes/admin/master/customers';
import type { CustomerListItem } from '@/types/customer';
defineProps<{
customer: CustomerListItem;
}>();
const emit = defineEmits<{
edit: [customer: CustomerListItem];
}>();
const { can } = useCan();
</script>
<template>
<div class="flex items-center justify-end gap-1">
<RowEditAction v-if="can('customers.update')" @click="emit('edit', customer)" />
<RowDeleteAction v-if="can('customers.delete')" :action-url="destroy.url(customer.id)" title="Hapus customer?"
:description="`Customer ${customer.name} akan dihapus secara permanen. Tindakan ini tidak dapat dibatalkan.`"
error-message="Gagal menghapus customer." />
</div>
</template>