standardization of policies/permissions
This commit is contained in:
@@ -2,22 +2,26 @@
|
||||
import { Head, useForm } from '@inertiajs/vue3';
|
||||
import { route } from 'ziggy-js';
|
||||
|
||||
defineOptions({
|
||||
layout: {
|
||||
breadcrumbs: [
|
||||
{
|
||||
title: 'Dynamics',
|
||||
href: route('dynamics.index'),
|
||||
},
|
||||
{
|
||||
title: 'Create',
|
||||
href: route('dynamics.create'),
|
||||
},
|
||||
],
|
||||
},
|
||||
});
|
||||
|
||||
const form = useForm({
|
||||
name: '',
|
||||
rules: '',
|
||||
});
|
||||
|
||||
const breadcrumbs = [
|
||||
{
|
||||
name: 'Dynamics',
|
||||
href: route('dynamics.index'),
|
||||
},
|
||||
{
|
||||
name: 'Create',
|
||||
href: route('dynamics.create'),
|
||||
},
|
||||
];
|
||||
|
||||
function submit() {
|
||||
form.post(route('dynamics.store'));
|
||||
}
|
||||
|
||||
@@ -2,6 +2,17 @@
|
||||
import { Head, Link } from '@inertiajs/vue3';
|
||||
import { route } from 'ziggy-js';
|
||||
|
||||
defineOptions({
|
||||
layout: {
|
||||
breadcrumbs: [
|
||||
{
|
||||
title: 'Dynamics',
|
||||
href: route('dynamics.index'),
|
||||
},
|
||||
],
|
||||
},
|
||||
});
|
||||
|
||||
defineProps<{
|
||||
dynamics: Array<{
|
||||
id: string;
|
||||
@@ -9,13 +20,6 @@ defineProps<{
|
||||
rules: string;
|
||||
}>;
|
||||
}>();
|
||||
|
||||
const breadcrumbs = [
|
||||
{
|
||||
name: 'Dynamics',
|
||||
href: route('dynamics.index'),
|
||||
},
|
||||
];
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
@@ -1,7 +1,25 @@
|
||||
<script setup lang="ts">
|
||||
import { Head, useForm } from '@inertiajs/vue3';
|
||||
import { route } from 'ziggy-js';
|
||||
import AppLayout from '@/layouts/AppLayout.vue';
|
||||
|
||||
defineOptions({
|
||||
layout: (props: any) => ({
|
||||
breadcrumbs: [
|
||||
{
|
||||
title: 'Dynamics',
|
||||
href: route('dynamics.index'),
|
||||
},
|
||||
{
|
||||
title: props.dynamic.name,
|
||||
href: route('dynamics.show', props.dynamic.id),
|
||||
},
|
||||
{
|
||||
title: 'Invite User',
|
||||
href: route('dynamics.invitations.create', props.dynamic.id),
|
||||
},
|
||||
],
|
||||
}),
|
||||
});
|
||||
|
||||
const props = defineProps<{
|
||||
dynamic: {
|
||||
@@ -15,21 +33,6 @@ const form = useForm({
|
||||
role: 'participant',
|
||||
});
|
||||
|
||||
const breadcrumbs = [
|
||||
{
|
||||
name: 'Dynamics',
|
||||
href: route('dynamics.index'),
|
||||
},
|
||||
{
|
||||
name: props.dynamic.name,
|
||||
href: route('dynamics.show', props.dynamic.id),
|
||||
},
|
||||
{
|
||||
name: 'Invite User',
|
||||
href: route('dynamics.invitations.create', props.dynamic.id),
|
||||
},
|
||||
];
|
||||
|
||||
function submit() {
|
||||
form.post(route('dynamics.invitations.store', props.dynamic.id), {
|
||||
onSuccess: () => form.reset(),
|
||||
|
||||
@@ -1,7 +1,25 @@
|
||||
<script setup lang="ts">
|
||||
import { Head, useForm, Link as InertiaLink } from '@inertiajs/vue3';
|
||||
import { route } from 'ziggy-js';
|
||||
import AppLayout from '@/layouts/AppLayout.vue';
|
||||
|
||||
defineOptions({
|
||||
layout: (props: any) => ({
|
||||
breadcrumbs: [
|
||||
{
|
||||
title: 'Dynamics',
|
||||
href: route('dynamics.index'),
|
||||
},
|
||||
{
|
||||
title: props.dynamic.name,
|
||||
href: route('dynamics.show', props.dynamic.id),
|
||||
},
|
||||
{
|
||||
title: 'Settings',
|
||||
href: route('dynamics.edit', props.dynamic.id),
|
||||
},
|
||||
],
|
||||
}),
|
||||
});
|
||||
|
||||
const props = defineProps<{
|
||||
dynamic: {
|
||||
@@ -16,21 +34,6 @@ const form = useForm({
|
||||
rules: props.dynamic.rules,
|
||||
});
|
||||
|
||||
const breadcrumbs = [
|
||||
{
|
||||
name: 'Dynamics',
|
||||
href: route('dynamics.index'),
|
||||
},
|
||||
{
|
||||
name: props.dynamic.name,
|
||||
href: route('dynamics.show', props.dynamic.id),
|
||||
},
|
||||
{
|
||||
name: 'Settings',
|
||||
href: route('dynamics.edit', props.dynamic.id),
|
||||
},
|
||||
];
|
||||
|
||||
function submit() {
|
||||
form.patch(route('dynamics.update', props.dynamic.id));
|
||||
}
|
||||
|
||||
@@ -43,18 +43,6 @@ const props = defineProps<{
|
||||
update: boolean;
|
||||
}
|
||||
}>();
|
||||
|
||||
|
||||
const breadcrumbs = [
|
||||
{
|
||||
name: 'Dynamics',
|
||||
href: route('dynamics.index'),
|
||||
},
|
||||
{
|
||||
name: props.dynamic.name,
|
||||
href: route('dynamics.show', props.dynamic.id),
|
||||
},
|
||||
];
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
Reference in New Issue
Block a user