mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-01-29 16:03:21 +00:00
feat: Champ de recherche de l'élève [#16]
This commit is contained in:
@ -5,6 +5,7 @@ import {
|
||||
BE_SUBSCRIPTION_LAST_GUARDIAN_ID_URL,
|
||||
BE_SUBSCRIPTION_ABSENCES_URL,
|
||||
BE_SUBSCRIPTION_STUDENT_COMPETENCIES_URL,
|
||||
BE_SUBSCRIPTION_SEARCH_STUDENTS_URL,
|
||||
} from '@/utils/Url';
|
||||
|
||||
import { CURRENT_YEAR_FILTER } from '@/utils/constants';
|
||||
@ -128,6 +129,18 @@ export const archiveRegisterForm = (id) => {
|
||||
.catch(errorHandler);
|
||||
};
|
||||
|
||||
export const searchStudents = (establishmentId, query) => {
|
||||
const url = `${BE_SUBSCRIPTION_SEARCH_STUDENTS_URL}/?establishment_id=${establishmentId}&q=${encodeURIComponent(query)}`;
|
||||
return fetch(url, {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
})
|
||||
.then(requestResponseHandler)
|
||||
.catch(errorHandler);
|
||||
};
|
||||
|
||||
export const fetchStudents = (establishment, id = null, status = null) => {
|
||||
let url;
|
||||
if (id) {
|
||||
|
||||
Reference in New Issue
Block a user