fix: type errors
This commit is contained in:
		@@ -189,6 +189,17 @@ const fetchData = async (
 | 
			
		||||
            handleFetchSuccess(responseData);
 | 
			
		||||
        } else {
 | 
			
		||||
            if (projectId == -1) {
 | 
			
		||||
                const errorCell = new SectionCell({
 | 
			
		||||
                    idSectionCell: -1,
 | 
			
		||||
                    sectionId: -1,
 | 
			
		||||
                    contentSectionCell: "Échec du chargement des données.",
 | 
			
		||||
                    modificationDate: new Date().toISOString(),
 | 
			
		||||
                });
 | 
			
		||||
 | 
			
		||||
                currentDescriptions.value = [errorCell];
 | 
			
		||||
                editedDescriptions.value = [errorCell];
 | 
			
		||||
                isEditing.value = [false];
 | 
			
		||||
 | 
			
		||||
                console.error(
 | 
			
		||||
                    "No sections to show because no project was found."
 | 
			
		||||
                );
 | 
			
		||||
 
 | 
			
		||||
@@ -78,7 +78,7 @@ function addSectionCell(
 | 
			
		||||
 | 
			
		||||
function modifySectionCell(
 | 
			
		||||
    sectionCellId: number,
 | 
			
		||||
    sectionCellDetails: SectionCell, // Replace 'any' with a proper type for section cell details if available
 | 
			
		||||
    sectionCellDetails: SectionCell,
 | 
			
		||||
    onSuccessHandler?: (response: AxiosResponse) => void,
 | 
			
		||||
    onErrorHandler?: (error: AxiosError) => void
 | 
			
		||||
): void {
 | 
			
		||||
 
 | 
			
		||||
@@ -91,14 +91,14 @@ const fetchAdminData = (projectId: number, useMock = IS_MOCK_MODE) => {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (projectId === -1) {
 | 
			
		||||
        admin.value = {
 | 
			
		||||
        admin.value = new UserAdmin({
 | 
			
		||||
            idUser: 0,
 | 
			
		||||
            userSurname: "Erreur",
 | 
			
		||||
            userName: "Chargement",
 | 
			
		||||
            primaryMail: "N/A",
 | 
			
		||||
            secondaryMail: "N/A",
 | 
			
		||||
            phoneNumber: "N/A",
 | 
			
		||||
        };
 | 
			
		||||
        });
 | 
			
		||||
        return;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -112,14 +112,15 @@ const fetchAdminData = (projectId: number, useMock = IS_MOCK_MODE) => {
 | 
			
		||||
                "Erreur lors de la récupération des données de l'administrateur :",
 | 
			
		||||
                error
 | 
			
		||||
            );
 | 
			
		||||
            admin.value = {
 | 
			
		||||
            
 | 
			
		||||
            admin.value = new UserAdmin({
 | 
			
		||||
                idUser: 0,
 | 
			
		||||
                userSurname: "Erreur",
 | 
			
		||||
                userName: "Chargement",
 | 
			
		||||
                primaryMail: "N/A",
 | 
			
		||||
                secondaryMail: "N/A",
 | 
			
		||||
                phoneNumber: "N/A",
 | 
			
		||||
            };
 | 
			
		||||
            });
 | 
			
		||||
        }
 | 
			
		||||
    );
 | 
			
		||||
};
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user