yale-user-access/packages/frontend/components/PeopleListRow.vue
Liam Pietralla f577617b4d
All checks were successful
Build and Publish / Build Yale Access Backend (push) Successful in 28s
Build and Publish / Build Yale Access Frontend (push) Successful in 47s
Build and Publish / Push Yale Access Backend Docker Image (push) Successful in 9s
Build and Publish / Push Yale Access Frontend Docker Image (push) Successful in 10s
initial commit
2025-01-10 08:37:18 +11:00

34 lines
814 B
Vue

<script setup lang='ts'>
import { type Person } from '~/types/yale';
import { type PropType } from 'vue';
const props = defineProps({
person: {
type: Object as PropType<Person>,
required: true
}
});
const emit = defineEmits<{
(e: "delete-person", id: number): void
}>();
// Handle the clear code button click
const handleDeletePersonClick = () => {
// Emit the event to the parent component
emit("delete-person", props.person.id);
}
</script>
<template>
<tr scope="row">
<td>{{ person.id }}</td>
<td>{{ person.name }}</td>
<td>{{ person.phoneNumber }}</td>
<td class="flex">
<YaleButton type="button" @click="handleDeletePersonClick">
<IconTrash />
</YaleButton>
</td>
</tr>
</template>