66 <slot >
77 <div class =" rateTalkView" >
88 <div class =" rateTalkView-head" >
9- <schedule-talk :conf-descriptor =" confDescriptorRef" :is-highlighted =" () => false" :talk =" labelledTimeslotWithTalkRef.talk" >
9+ <schedule-talk :conf-descriptor =" confDescriptorRef" :is-highlighted =" () => false"
10+ :talk =" labelledTimeslotWithTalkRef.talk"
11+ :talk-notes =" userEventTalkNotesRef.get(labelledTimeslotWithTalkRef.talk.id.value)" >
1012 </schedule-talk >
1113 </div >
1214
6567
6668<script setup lang="ts">
6769import {EventId } from " @/models/VoxxrinEvent" ;
68- import {getRouteParamsValue } from " @/views/vue-utils" ;
70+ import {getRouteParamsValue , toManagedRef as toRef } from " @/views/vue-utils" ;
6971import {useRoute } from " vue-router" ;
7072import {useSharedConferenceDescriptor } from " @/state/useConferenceDescriptor" ;
71- import {computed , reactive , unref , watch } from " vue" ;
73+ import {computed , reactive , toValue , unref , watch } from " vue" ;
7274import {managedRef as ref } from " @/views/vue-utils" ;
7375import {typesafeI18n } from " @/i18n/i18n-vue" ;
7476import {TalkId } from " @/models/VoxxrinTalk" ;
@@ -88,12 +90,13 @@ import VoxDivider from "@/components/ui/VoxDivider.vue";
8890import FeedbackFooter from " @/components/feedbacks/FeedbackFooter.vue" ;
8991import {goBackOrNavigateTo } from " @/router" ;
9092import LabelledLinearRating from " @/components/ratings/LabelledLinearRating.vue" ;
93+ import {useUserEventTalkNotes } from " @/state/useUserTalkNotes" ;
9194
9295const { LL } = typesafeI18n ()
9396
9497const route = useRoute ();
9598const eventIdRef = computed (() => new EventId (getRouteParamsValue (route , ' eventId' )));
96- const talkId = new TalkId (getRouteParamsValue (route , ' talkId' ));
99+ const talkIdRef = ref ( new TalkId (getRouteParamsValue (route , ' talkId' ) ));
97100const {conferenceDescriptor : confDescriptorRef } = useSharedConferenceDescriptor (eventIdRef );
98101
99102const labelledTimeslotWithTalkRef = ref <undefined | DailyLabelledTimeslotWithTalk >(undefined );
@@ -104,7 +107,7 @@ const dayIdRef = computed(() => {
104107
105108const feedback: UnwrapNestedRefs <Omit <ProvidedUserFeedback , ' createdOn' | ' lastUpdatedOn' >> = reactive ({
106109 timeslotId: ' ' ,
107- talkId: talkId .value ,
110+ talkId: talkIdRef . value .value ,
108111 alsoConcernsOverlappingTimeslotIds: [],
109112 status: ' provided' ,
110113 ratings: {
@@ -115,7 +118,7 @@ const feedback: UnwrapNestedRefs<Omit<ProvidedUserFeedback, 'createdOn'|'lastUpd
115118 comment: null
116119})
117120
118- watch ([confDescriptorRef ], async ([confDescriptor ]) => {
121+ watch ([confDescriptorRef , talkIdRef ], async ([confDescriptor , talkId ]) => {
119122 if (! confDescriptor ) {
120123 labelledTimeslotWithTalkRef .value = undefined ;
121124 return ;
@@ -162,6 +165,12 @@ const feedbackCanBeSubmitted = computed(() => {
162165
163166const {updateTimeslotFeedback} = useUserFeedbacks (eventIdRef , dayIdRef );
164167
168+ const { userEventTalkNotesRef } = useUserEventTalkNotes (eventIdRef , toRef (() => talkIdRef ? [talkIdRef .value ] : undefined ))
169+ const talkNotes = toRef (() => {
170+ const userEventTalkNotes = toValue (userEventTalkNotesRef )
171+ return Array .from (userEventTalkNotes .values ())[0 ];
172+ })
173+
165174async function submitFeedback() {
166175 const labelledTimeslotWithTalk = unref (labelledTimeslotWithTalkRef );
167176 if (! labelledTimeslotWithTalk ) {
0 commit comments