Skip to content

Commit

Permalink
Simplifie et répare une condition
Browse files Browse the repository at this point in the history
  • Loading branch information
marc-rutkowski committed May 21, 2024
1 parent 3d818a7 commit af66e04
Showing 1 changed file with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,17 +99,12 @@ export const useIndicateurValeursEtCommentaires = ({
.not('valeur', 'is', null)
.order('annee', {ascending: false});

if (type === 'objectif') {
query.is('source_id', null);
query.eq('type', type);
if (importSource && importSource !== SOURCE_COLLECTIVITE) {
query.eq('source_id', importSource);
query.eq('type', 'import');
} else {
if (importSource && importSource !== SOURCE_COLLECTIVITE) {
query.eq('source_id', importSource);
query.eq('type', 'import');
} else {
query.is('source_id', null);
query.neq('type', 'import');
}
query.is('source_id', null);
query.eq('type', type === 'objectif' ? type : 'resultat');
}

const {data} = await query.returns<TIndicateurValeurEtCommentaires[]>();
Expand Down

0 comments on commit af66e04

Please sign in to comment.