different names in different dynamics
linter / quality (push) Failing after 1m9s
tests / ci (8.3) (push) Failing after 51s
tests / ci (8.4) (push) Failing after 1m7s
tests / ci (8.5) (push) Failing after 1m9s

This commit is contained in:
Daan Meijer
2026-06-17 09:38:54 +02:00
parent 3c414e1ef1
commit 0fee3c1972
15 changed files with 283 additions and 11 deletions
+19 -2
View File
@@ -2,8 +2,10 @@
import Chat from '@/components/Chat.vue';
import ParticipantsList from '@/components/ParticipantsList.vue';
import LedgerList from '@/components/LedgerList.vue';
import { Head, Link as InertiaLink } from '@inertiajs/vue3';
import DisplayNameForm from '@/components/DisplayNameForm.vue';
import { Head, Link as InertiaLink, usePage } from '@inertiajs/vue3';
import { route } from 'ziggy-js';
import { computed } from 'vue';
const props = defineProps<{
dynamic: {
@@ -11,7 +13,7 @@ const props = defineProps<{
name: string;
rules: string;
chat: any;
participants: Array<{ id: number; name: string }>;
participants: Array<{ id: number; name: string, pivot: { display_name: string | null } }>;
ledgers: Array<{
id: number;
name: string;
@@ -23,6 +25,18 @@ const props = defineProps<{
isOwner: boolean;
}>();
const currentUser = computed(() => {
const page = usePage();
const authUser = page.props.auth.user;
const participant = props.dynamic.participants.find(p => p.id === authUser.id);
return {
id: authUser.id,
name: authUser.name,
display_name: participant?.pivot?.display_name ?? null,
};
});
const breadcrumbs = [
{
name: 'Dynamics',
@@ -65,6 +79,9 @@ const breadcrumbs = [
<!-- Ledgers List Component -->
<LedgerList :dynamic-id="dynamic.id" :ledgers="dynamic.ledgers" />
<!-- Display Name Form -->
<DisplayNameForm :dynamic-id="dynamic.id" :participant="currentUser" />
<div v-if="isOwner" class="mt-8 flex gap-4">
<InertiaLink :href="route('dynamics.invitations.create', dynamic.id)" class="c-dynamic-show__action-btn">
Invite User