Skip to content

Commit

Permalink
typescript updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jongrim committed Feb 11, 2024
1 parent c647207 commit bb5835b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/pages/Game/NewSessions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ const { showSuccess, showError } = useToast();
const newSessionModalOpen = ref(false);
const isCreating = ref(false);
const sessionsToCreate = ref<Session[]>([]);
const sessionsToCreate = ref<Omit<Session, "created_at">[]>([]);
const preSeatAssignments = ref<{ [id: string]: { members: Member[] } }>({});
const preSeatMemberModalOpen = ref(false);
const accessLevels = ref<number[]>([]);
Expand Down Expand Up @@ -167,20 +167,20 @@ async function createSessions() {
isCreating.value = true;
const levels = gameStore.game.community_events
? getLevelsFromStore(
gameStore.game.community_events?.event_access_levels ?? [],
gameStore.game.community_events?.event_access_levels ?? []
)
: getLevelsFromStore(accessLevels.value);
const times = rsvpTimes(
levels,
gameStore.game.community_events?.fixed_access_time ?? undefined,
gameStore.game.community_events?.event_access_levels ? "policy" : "global",
gameStore.game.community_events?.event_access_levels ? "policy" : "global"
);
const toCreate = sessionsToCreate.value.map((session) => {
// remove the local ID
const partial = R.omit(["id"], session);
if (preSeatAssignments.value[session.id]?.members.length > 0) {
partial.rsvps = preSeatAssignments.value[session.id]?.members.map(
(member) => member.id,
(member) => member.id
);
}
partial.access_times = JSON.stringify(times);
Expand Down Expand Up @@ -209,7 +209,7 @@ async function createSessions() {
function deleteSession(id: string) {
sessionsToCreate.value = sessionsToCreate.value.filter(
(session) => session.id !== id,
(session) => session.id !== id
);
}
Expand Down
4 changes: 2 additions & 2 deletions src/pages/GamesBrowse.vue
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ async function loadGames() {
system: system.value,
});
if (data) {
games.value = data;
games.value = data as GameListing[];
}
isLoading.value = false;
}
Expand Down Expand Up @@ -282,7 +282,7 @@ const filteredByTimeRange = computed(() => {
return filterGameSessionsByTimeRange(
game,
starttime.value ?? "",
endtime.value ?? "",
endtime.value ?? ""
);
});
return byTimeRange;
Expand Down

0 comments on commit bb5835b

Please sign in to comment.