37 lines
977 B
Vue
37 lines
977 B
Vue
<script setup lang="ts">
|
|
import { Head, Link } from '@inertiajs/vue3';
|
|
import AdminLayout from '@/layouts/AdminLayout.vue';
|
|
import RoleForm from './form/RoleForm.vue';
|
|
import BackButton from '@/components/button/BackButton.vue';
|
|
import { index, store } from '@/routes/admin/system/roles';
|
|
|
|
interface PermissionOption {
|
|
value: string;
|
|
label: string;
|
|
group: string;
|
|
}
|
|
|
|
defineProps<{
|
|
permissions: PermissionOption[];
|
|
}>();
|
|
</script>
|
|
|
|
<template>
|
|
|
|
<Head title="Tambah Role" />
|
|
|
|
<AdminLayout>
|
|
<div class="flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between">
|
|
<div class="space-y-1">
|
|
<h2 class="text-2xl font-bold tracking-tight">
|
|
Tambah Role
|
|
</h2>
|
|
</div>
|
|
|
|
<BackButton :href="index.url()" />
|
|
</div>
|
|
|
|
<RoleForm :submit-url="store.url()" method="post" submit-label="Simpan" :permissions="permissions" />
|
|
</AdminLayout>
|
|
</template>
|