feat: activity page

This commit is contained in:
ext.jeremy.guillot@maxicoffee.domains
2026-03-11 20:54:55 +01:00
parent f418b36167
commit 19395b4869
21 changed files with 625 additions and 35 deletions

View File

@@ -23,8 +23,6 @@ export class ApiJobRepository extends JobRepositoryInterface {
url += `&status=${status.join(',')}`;
}
console.log('Fetching jobs from URL:', url);
const response = await fetch(url);
if (!response.ok) {
@@ -32,7 +30,6 @@ export class ApiJobRepository extends JobRepositoryInterface {
}
const data = await response.json();
console.log('API Response:', data);
// Gérer différents formats de réponse API
let jobs, total, currentPage, limit_returned, hasNext, hasPrev;
@@ -63,15 +60,6 @@ export class ApiJobRepository extends JobRepositoryInterface {
hasPrev = !!data.hasPreviousPage;
}
console.log('Processed data:', {
jobs: jobs.length,
total,
currentPage,
limit_returned,
hasNext,
hasPrev
});
return new JobCollection(
jobs,
total,
@@ -81,7 +69,6 @@ export class ApiJobRepository extends JobRepositoryInterface {
hasPrev
);
} catch (error) {
console.error('API Error:', error);
throw error;
}
}
@@ -102,7 +89,6 @@ export class ApiJobRepository extends JobRepositoryInterface {
const data = await response.json();
return Job.create(data);
} catch (error) {
console.error('API Error:', error);
throw error;
}
}
@@ -124,7 +110,6 @@ export class ApiJobRepository extends JobRepositoryInterface {
return true;
} catch (error) {
console.error('API Error:', error);
throw error;
}
}
@@ -158,7 +143,6 @@ export class ApiJobRepository extends JobRepositoryInterface {
const data = await response.json();
return data.deleted || 0;
} catch (error) {
console.error('API Error:', error);
throw error;
}
}

View File

@@ -11,16 +11,6 @@
</div>
<div v-else class="container mx-auto p-2">
<!-- Debug pagination - À supprimer plus tard -->
<div class="bg-yellow-100 border border-yellow-400 text-yellow-700 px-4 py-3 rounded mb-4" v-if="true">
<strong>Debug Pagination:</strong>
Total: {{ activityStore.total }},
Limit: {{ activityStore.limit }},
Pages: {{ activityStore.totalPages }},
Page courante: {{ activityStore.currentPage }},
Condition: {{ activityStore.total > activityStore.limit }}
</div>
<div class="bg-white overflow-hidden shadow rounded-lg">
<div class="overflow-x-auto">
<table class="min-w-full bg-white">