Integrasi API: Admin Event & Event user ui

Fix:
Metode konfirmasi pada event menggunakan QR Code
Perbaikan file pada:
- app/(application)/(user)/event/(tabs)/index.tsx
- app/(application)/(user)/event/[id]/confirmation.tsx
- app/(application)/(user)/event/[id]/publish.tsx
- app/(application)/admin/event/[id]/[status]/index.tsx
- app/(application)/admin/event/[id]/reject-input.tsx
- app/(application)/admin/event/[status]/status.tsx
- service/api-admin/api-admin-event.ts
- service/api-client/api-event.ts

### Issue: Belum menyertakan fungsi konfrimasu kehadiran
This commit is contained in:
2025-10-23 17:47:36 +08:00
parent 966e55597c
commit 36dbfa3296
8 changed files with 533 additions and 20 deletions

View File

@@ -47,3 +47,4 @@ export async function apiAdminEventUpdateStatus({
throw error;
}
}

View File

@@ -138,3 +138,42 @@ export async function apiEventCheckParticipants({
throw error;
}
}
export async function apiEventGetConfirmation({
id,
userId,
}: {
id: string;
userId?: string;
}) {
try {
const response = await apiConfig.get(`/mobile/event/${id}/confirmation?userId=${userId}`);
return response.data;
} catch (error) {
throw error;
}
}
export async function apiEventConfirmationAction({
id,
userId,
category,
}: {
id: string;
userId?: string;
category?: "join_and_confirm" | "confirmation";
}) {
try {
const response = await apiConfig.post(
`/mobile/event/${id}/confirmation?category=${category}`,
{
data: {
userId: userId,
},
}
);
return response.data;
} catch (error) {
throw error;
}
}