Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: lint frontend #511

Merged
merged 1 commit into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/backend/src/services/DemandeSejour.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ LEFT JOIN front.demande_sejour_message dsm ON dsm.declaration_id = ds.id AND dsm
WHERE
o.id IN ($1)
`,
[organismeIds],
[organismeIds],
],
getAdminStats: (departements, territoireCode) => [
`
Expand Down
5 changes: 3 additions & 2 deletions packages/frontend-bo/src/components/demandes-sejour/liste.vue
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,6 @@
import { defineProps } from "vue";
import messageEtat from "@vao/shared/src/utils/messageUtils";


definePageMeta({
middleware: ["is-connected", "check-role"],
roles: ["DemandeSejour_Lecture", "DemandeSejour_Ecriture"],
Expand Down Expand Up @@ -302,7 +301,7 @@
offset: defaultOffset,
search: searchParams.value,
});
} catch (error) {

Check warning on line 304 in packages/frontend-bo/src/components/demandes-sejour/liste.vue

View workflow job for this annotation

GitHub Actions / lint-and-format

'error' is defined but never used
toaster.error({
titleTag: "h2",
description: "Une erreur est survenue lors de la récupération des demandes",
Expand All @@ -320,7 +319,7 @@
offset: currentPageValue * limitValue,
search: searchParams.value,
});
} catch (error) {

Check warning on line 322 in packages/frontend-bo/src/components/demandes-sejour/liste.vue

View workflow job for this annotation

GitHub Actions / lint-and-format

'error' is defined but never used
toaster.error({
titleTag: "h2",
description:
Expand All @@ -340,7 +339,7 @@
offset: currentPageState.value * limitState.value,
search,
});
} catch (error) {

Check warning on line 342 in packages/frontend-bo/src/components/demandes-sejour/liste.vue

View workflow job for this annotation

GitHub Actions / lint-and-format

'error' is defined but never used
toaster.error({
titleTag: "h2",
description:
Expand Down Expand Up @@ -468,7 +467,9 @@
];

const headers = computed(() =>
props.display === displayType.Organisme ? headersOrganisme : headersMessagerie,
props.display === displayType.Organisme
? headersOrganisme
: headersMessagerie,
);

const tabIndexSejour = computed(() =>
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend-bo/src/pages/comptes/[[userId]].vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ onMounted(async () => {
}
log.i("Mounted - DONE");
});
</script>
</script>
1 change: 0 additions & 1 deletion packages/frontend-bo/src/pages/sejours/[declarationId].vue
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,6 @@ onMounted(async () => {
} catch (e) {
navigateTo("/sejours");
}

});

const isSendingMessage = ref(false);
Expand Down
3 changes: 2 additions & 1 deletion packages/frontend-usagers/src/components/DS/Eigs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,9 @@ const deleteEig = async () => {
try {
await eigStore.delete(eigToDelete.value);
await props.fetchEig();
} catch (e) {
} catch (error) {
toaster.error("Une erreur est survenue de la suppression de l'EIG");
throw error;
} finally {
closeEigModal();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,6 @@
import { DeclarationSejour } from "#imports";
import { defineProps } from "vue";


const NuxtLink = resolveComponent("NuxtLink");
const DsfrBadge = resolveComponent("DsfrBadge");
const DsfrButtonGroup = resolveComponent("DsfrButtonGroup");
Expand All @@ -241,7 +240,6 @@
display: { type: String, required: true },
});


definePageMeta({
middleware: ["is-connected", "check-organisme-is-complet"],
});
Expand Down Expand Up @@ -640,7 +638,6 @@
},
];


const headersMessagerie = [
{
column: "idFonctionnelle",
Expand Down Expand Up @@ -791,7 +788,7 @@
description: `Une erreur est survenue lors de la suppression de la déclaration de séjour`,
});
}
} catch (error) {

Check warning on line 791 in packages/frontend-usagers/src/components/demande-sejour/liste.vue

View workflow job for this annotation

GitHub Actions / lint-and-format

'error' is defined but never used
log.w("Erreur durant la suppression de la declaration de sejour : ");
return toaster.error({
titleTag: "h2",
Expand Down Expand Up @@ -822,7 +819,7 @@
description: `Une erreur est survenue lors de l'annulation' de la déclaration de séjour`,
});
}
} catch (error) {

Check warning on line 822 in packages/frontend-usagers/src/components/demande-sejour/liste.vue

View workflow job for this annotation

GitHub Actions / lint-and-format

'error' is defined but never used
log.w("Erreur durant l'annulation de la declaration de sejour : ");
return toaster.error({
titleTag: "h2",
Expand All @@ -839,6 +836,5 @@
demandeSejourStore.fetchDemandes({
sortBy: defaultSort.value,
});
})

});
</script>
26 changes: 15 additions & 11 deletions packages/frontend-usagers/src/pages/eig/liste.vue
Original file line number Diff line number Diff line change
Expand Up @@ -129,16 +129,6 @@ const searchState = reactive({
type: null,
});

try {
await eigStore.get({
limit: defaultLimit,
offset: defaultOffset,
search: searchState,
});
} catch (error) {
toaster.error("Une erreur est survenue lors de la récupération des demandes");
}

const paginateResults = async (sortValue, limitValue, currentPageValue) => {
try {
await eigStore.get({
Expand All @@ -152,6 +142,7 @@ const paginateResults = async (sortValue, limitValue, currentPageValue) => {
toaster.error(
"Une erreur est survenue lors de la récupération de la demande",
);
throw error;
}
};

Expand All @@ -168,6 +159,7 @@ const fetchDemandesDebounce = debounce(async (search) => {
toaster.error(
"Une erreur est survenue lors de la récupération de la demande",
);
throw error;
}
});

Expand Down Expand Up @@ -315,10 +307,22 @@ const deleteEig = async () => {
try {
await eigStore.delete(eigToDelete.value);
await eigStore.get();
} catch (e) {
} catch (error) {
toaster.error("Une erreur est survenue de la suppression de l'EIG");
throw error;
} finally {
closeEigModal();
}
};

try {
await eigStore.get({
limit: defaultLimit,
offset: defaultOffset,
search: searchState,
});
} catch (error) {
toaster.error("Une erreur est survenue lors de la récupération des demandes");
throw error;
}
</script>
2 changes: 1 addition & 1 deletion packages/frontend-usagers/src/stores/demande-sejour.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const useDemandeSejourStore = defineStore("demandeSejour", {
credentials: "include",
params: {
sortBy,
}
},
});
if (demandes) {
log.i("fetchDemandes - DONE");
Expand Down
Loading