diff --git a/ui/src/api/rank.ts b/ui/src/api/rank.ts index d1e4eae..1c86d9e 100644 --- a/ui/src/api/rank.ts +++ b/ui/src/api/rank.ts @@ -1,4 +1,4 @@ -import { BatchPromotion } from '@shared/schemas/promotionSchema'; +import { BatchPromotion, BatchPromotionMember } from '@shared/schemas/promotionSchema'; import { PagedData } from '@shared/types/pagination'; import { PromotionSummary, Rank } from '@shared/types/rank' @@ -58,4 +58,16 @@ export async function getPromoHistory(page?: number, pageSize?: number): Promise return []; } }); +} + +export async function getPromotionsOnDay(day: Date): Promise { + const res = await fetch(`${addr}/memberRanks/${day}`, { + credentials: 'include', + }) + + if (res.ok) { + return await res.json(); + } else { + throw new Error("Failed to submit rank change: Server error"); + } } \ No newline at end of file diff --git a/ui/src/components/promotions/promotionList.vue b/ui/src/components/promotions/promotionList.vue index f0d651f..2112718 100644 --- a/ui/src/components/promotions/promotionList.vue +++ b/ui/src/components/promotions/promotionList.vue @@ -104,7 +104,7 @@ function formatDate(date: Date): string { :class="{ 'bg-muted/50 border-t-0': hoverID === index }">
- +
diff --git a/ui/src/components/promotions/promotionListDay.vue b/ui/src/components/promotions/promotionListDay.vue index c33b362..bd3d8c8 100644 --- a/ui/src/components/promotions/promotionListDay.vue +++ b/ui/src/components/promotions/promotionListDay.vue @@ -1,17 +1,52 @@ \ No newline at end of file