@@ -119,6 +119,7 @@ import SelectableParticipant from './SelectableParticipant.vue'
119119import BreakoutRoomItem from ' ../RightSidebar/BreakoutRooms/BreakoutRoomItem.vue'
120120
121121import { ATTENDEE , CONVERSATION , PARTICIPANT } from ' ../../constants.js'
122+ import { useBreakoutRoomsStore } from ' ../../stores/breakoutRooms.js'
122123
123124export default {
124125 name: ' BreakoutRoomsParticipantsEditor' ,
@@ -149,12 +150,18 @@ export default {
149150
150151 breakoutRooms: {
151152 type: Array ,
152- default: undefined ,
153+ default : () => [] ,
153154 },
154155 },
155156
156157 emits: [' back' , ' close' ],
157158
159+ setup () {
160+ return {
161+ breakoutRoomsStore: useBreakoutRoomsStore (),
162+ }
163+ },
164+
158165 data () {
159166 return {
160167 selectedParticipants: [],
@@ -207,7 +214,7 @@ export default {
207214 // If the breakoutRooms prop is populated it means that this component is
208215 // being used to reorganize the attendees of an existing breakout room.
209216 isReorganizingAttendees () {
210- return this .breakoutRooms ? .length
217+ return this .breakoutRooms .length
211218 },
212219
213220 confirmButtonLabel () {
@@ -316,7 +323,7 @@ export default {
316323 },
317324
318325 createRooms () {
319- this .$store . dispatch ( ' configureBreakoutRoomsAction ' , {
326+ this .breakoutRoomsStore . configureBreakoutRooms ( {
320327 token: this .token ,
321328 mode: 2 ,
322329 amount: this .roomNumber ,
@@ -326,7 +333,7 @@ export default {
326333 },
327334
328335 reorganizeAttendees () {
329- this .$store . dispatch ( ' reorganizeAttendeesAction ' , {
336+ this .breakoutRoomsStore . reorganizeAttendees ( {
330337 token: this .token ,
331338 attendeeMap: this .createAttendeeMap (),
332339 })
@@ -338,9 +345,7 @@ export default {
338345 },
339346
340347 deleteBreakoutRooms () {
341- this .$store .dispatch (' deleteBreakoutRoomsAction' , {
342- token: this .token ,
343- })
348+ this .breakoutRoomsStore .deleteBreakoutRooms (this .token )
344349 },
345350 },
346351}
0 commit comments