feat(frontend): add Run now button and matching runs list on event details page

- New adminAPI for run-now and runs listing
- MatchingRunsSection with refresh and run controls
- Integrate into EventDetailsPage under matching configuration
This commit is contained in:
Radosław Gierwiało
2025-11-30 13:20:33 +01:00
parent 537dd112ff
commit 7e2a196f99
4 changed files with 168 additions and 0 deletions

View File

@@ -441,4 +441,20 @@ export const matchingAPI = {
},
};
// Admin API (matching control)
export const adminAPI = {
async runMatchingNow(slug) {
const data = await fetchAPI(`/admin/events/${slug}/run-now`, {
method: 'POST',
});
return data.data;
},
async getMatchingRuns(slug, limit = 20) {
const params = new URLSearchParams({ limit: String(limit) });
const data = await fetchAPI(`/admin/events/${slug}/matching-runs?${params.toString()}`);
return data;
},
};
export { ApiError };