inertialinks
This commit is contained in:
parent
ae6a4304f9
commit
ef00a73daa
@ -2,8 +2,7 @@
|
||||
import Chat from '@/components/Chat.vue';
|
||||
import ParticipantsList from '@/components/ParticipantsList.vue';
|
||||
import LedgerList from '@/components/LedgerList.vue';
|
||||
import CreateLedgerForm from '@/components/CreateLedgerForm.vue';
|
||||
import { Head, useForm } from '@inertiajs/vue3';
|
||||
import { Head, Link as InertiaLink } from '@inertiajs/vue3';
|
||||
import { route } from 'ziggy-js';
|
||||
|
||||
const props = defineProps<{
|
||||
@ -34,17 +33,6 @@ const breadcrumbs = [
|
||||
href: route('dynamics.show', props.dynamic.id),
|
||||
},
|
||||
];
|
||||
|
||||
const inviteForm = useForm({
|
||||
email: '',
|
||||
role: 'participant',
|
||||
});
|
||||
|
||||
function submitInvite() {
|
||||
inviteForm.post(route('dynamics.invitations.store', props.dynamic.id), {
|
||||
onSuccess: () => inviteForm.reset(),
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@ -61,9 +49,9 @@ function submitInvite() {
|
||||
{{ dynamic.rules }}
|
||||
</p>
|
||||
</div>
|
||||
<Link v-if="isOwner" :href="route('dynamics.edit', dynamic.id)" class="c-dynamic-show__settings-btn">
|
||||
<InertiaLink v-if="isOwner" :href="route('dynamics.edit', dynamic.id)" class="c-dynamic-show__settings-btn">
|
||||
Settings
|
||||
</Link>
|
||||
</InertiaLink>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -78,12 +66,12 @@ function submitInvite() {
|
||||
<LedgerList :dynamic-id="dynamic.id" :ledgers="dynamic.ledgers" />
|
||||
|
||||
<div v-if="isOwner" class="mt-8 flex gap-4">
|
||||
<Link :href="route('dynamics.invitations.create', dynamic.id)" class="c-dynamic-show__action-btn">
|
||||
<InertiaLink :href="route('dynamics.invitations.create', dynamic.id)" class="c-dynamic-show__action-btn">
|
||||
Invite User
|
||||
</Link>
|
||||
<Link :href="route('dynamics.ledgers.create', dynamic.id)" class="c-dynamic-show__action-btn">
|
||||
</InertiaLink>
|
||||
<InertiaLink :href="route('dynamics.ledgers.create', dynamic.id)" class="c-dynamic-show__action-btn">
|
||||
Create Ledger
|
||||
</Link>
|
||||
</InertiaLink>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user