currentEventCalculation
This commit is contained in:
@@ -10,6 +10,7 @@ import type { IRegistration } from '@/shared/model/registration.model';
|
||||
import RegistrationService from '@/entities/registration/registration.service';
|
||||
import UserService from '@/entities/user/user.service';
|
||||
import type AccountService from '@/account/account.service';
|
||||
import { useStore } from '@/store';
|
||||
// import type EventService from '@/account/account.service';
|
||||
|
||||
export default defineComponent({
|
||||
@@ -33,10 +34,18 @@ export default defineComponent({
|
||||
const event: Ref<IEvent> = ref({});
|
||||
const sortedAndIndexedRegistrations: Ref<IRegistration[]> = ref([]);
|
||||
|
||||
let store = useStore();
|
||||
|
||||
const retrieveEvent = async (eventId: string) => {
|
||||
try {
|
||||
console.log('event' + eventId);
|
||||
let currentEventId = '' + store.currentEventId;
|
||||
if (eventId == 'useCurrentEventId') {
|
||||
eventId = currentEventId;
|
||||
console.log('event2' + eventId);
|
||||
}
|
||||
const res = await eventService().find(eventId);
|
||||
isCurrentEvent.value = eventId == '2601';
|
||||
isCurrentEvent.value = eventId == currentEventId;
|
||||
event.value = res;
|
||||
// sortedAndIndexedRegistrations.value = res.registrations;
|
||||
sortedAndIndexedRegistrations.value = res.registrations.sort(
|
||||
|
||||
Reference in New Issue
Block a user