Break the monolithic admin dialog component into a thin dispatcher plus one component per dialog type under admin/dialogs/, with a shared AdminDialog frame (Modal wrapper, title, error and Cancel/Save actions). No functional change. Also drop two unused input refs (nameInput, displayNameInput).
24 lines
466 B
Vue
24 lines
466 B
Vue
<script setup>
|
|
import AdminDialog from './AdminDialog.vue'
|
|
|
|
defineProps({
|
|
dialog: { type: Object, required: true }
|
|
})
|
|
|
|
defineEmits(['submit', 'close'])
|
|
</script>
|
|
|
|
<template>
|
|
<AdminDialog
|
|
title="Create Role"
|
|
:busy="dialog.busy"
|
|
:error="dialog.error"
|
|
@submit="$emit('submit')"
|
|
@close="$emit('close')"
|
|
>
|
|
<label>Role Name
|
|
<input v-model="dialog.data.name" placeholder="Role name" required />
|
|
</label>
|
|
</AdminDialog>
|
|
</template>
|