fix: type errors
This commit is contained in:
parent
92696c3e16
commit
8154814805
@ -189,6 +189,17 @@ const fetchData = async (
|
|||||||
handleFetchSuccess(responseData);
|
handleFetchSuccess(responseData);
|
||||||
} else {
|
} else {
|
||||||
if (projectId == -1) {
|
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(
|
console.error(
|
||||||
"No sections to show because no project was found."
|
"No sections to show because no project was found."
|
||||||
);
|
);
|
||||||
|
@ -78,7 +78,7 @@ function addSectionCell(
|
|||||||
|
|
||||||
function modifySectionCell(
|
function modifySectionCell(
|
||||||
sectionCellId: number,
|
sectionCellId: number,
|
||||||
sectionCellDetails: SectionCell, // Replace 'any' with a proper type for section cell details if available
|
sectionCellDetails: SectionCell,
|
||||||
onSuccessHandler?: (response: AxiosResponse) => void,
|
onSuccessHandler?: (response: AxiosResponse) => void,
|
||||||
onErrorHandler?: (error: AxiosError) => void
|
onErrorHandler?: (error: AxiosError) => void
|
||||||
): void {
|
): void {
|
||||||
|
@ -91,14 +91,14 @@ const fetchAdminData = (projectId: number, useMock = IS_MOCK_MODE) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (projectId === -1) {
|
if (projectId === -1) {
|
||||||
admin.value = {
|
admin.value = new UserAdmin({
|
||||||
idUser: 0,
|
idUser: 0,
|
||||||
userSurname: "Erreur",
|
userSurname: "Erreur",
|
||||||
userName: "Chargement",
|
userName: "Chargement",
|
||||||
primaryMail: "N/A",
|
primaryMail: "N/A",
|
||||||
secondaryMail: "N/A",
|
secondaryMail: "N/A",
|
||||||
phoneNumber: "N/A",
|
phoneNumber: "N/A",
|
||||||
};
|
});
|
||||||
return;
|
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 :",
|
"Erreur lors de la récupération des données de l'administrateur :",
|
||||||
error
|
error
|
||||||
);
|
);
|
||||||
admin.value = {
|
|
||||||
|
admin.value = new UserAdmin({
|
||||||
idUser: 0,
|
idUser: 0,
|
||||||
userSurname: "Erreur",
|
userSurname: "Erreur",
|
||||||
userName: "Chargement",
|
userName: "Chargement",
|
||||||
primaryMail: "N/A",
|
primaryMail: "N/A",
|
||||||
secondaryMail: "N/A",
|
secondaryMail: "N/A",
|
||||||
phoneNumber: "N/A",
|
phoneNumber: "N/A",
|
||||||
};
|
});
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user