first pass of promotions list view

This commit is contained in:
2025-12-17 17:14:22 -05:00
parent 43763853f8
commit 6d83a2d342
3 changed files with 53 additions and 6 deletions

View File

@@ -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<BatchPromotionMember[]> {
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");
}
}