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

feat: Ajout des dates de contrôles du pôle C au niveau de la fiche établissement #342

Merged
merged 14 commits into from
Aug 8, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ const interactionsQuery = gql`
libellecommune2etablissement
}
}
interactions_C: fce_interactions_pole_c(where: { siren: { _eq: $siren } }) {
siret
date
unite
interactions_C: fce_interactions_pole_c(where: { SIRNE: { _eq: $siren } }) {
siret: SIRET
date: DATE_DERNIER_CONTROLE
unite: LIB_UC
etablissement: interactions_pole_c_siret {
etatadministratifetablissement
siret
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ const dashboardQuery = gql`
siret
}
fce_interactions_pole_c(
where: { siret: { _eq: $siret } }
order_by: { mois: desc }
where: { SIRET: { _eq: $siret } }
order_by: { DATE_DERNIER_CONTROLE: desc }
limit: 1
) {
date
date: DATE_DERNIER_CONTROLE
}
fce_interactions_pole_t(
where: { siret: { _eq: $siret } }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ import { mapQueryResult } from "../../../../../utils/graphql/graphql";
import {
// normalizeInteractions3E,
// normalizeInteractions3ESRC,
// normalizeInteractionsC,
normalizeInteractionsC,
normalizeInteractionsT,
} from "../../../../../utils/interactions/interactions";

const controlesQuery = gql`
query getControles($siret: String!) {
# fce_interactions_pole_c(where: { siret: { _eq: $siret } }) {
# unite
# siret
# date
# interactions_pole_c_siret {
# denominationusuelleetablissement
# }
# }
fce_interactions_pole_c(where: { SIRET: { _eq: $siret } }) {
siret: SIRET
date: DATE_DERNIER_CONTROLE
unite: LIB_UC
interactions_pole_c_siret {
denominationusuelleetablissement
}
}
fce_interactions_pole_t(where: { siret: { _eq: $siret } }) {
date
intervenant
Expand Down Expand Up @@ -49,14 +49,14 @@ const controlesQuery = gql`
const normalizeResponsesToInteraction = ({
// fce_interactions_pole_3e,
// fce_interactions_pole_3e_src,
// fce_interactions_pole_c,
fce_interactions_pole_c,
fce_interactions_pole_t,
}) => ({
// interactions_pole_3e: normalizeInteractions3E(fce_interactions_pole_3e),
// interactions_pole_3e_src: normalizeInteractions3ESRC(
// fce_interactions_pole_3e_src
// ),
// interactions_pole_c: normalizeInteractionsC(fce_interactions_pole_c),
interactions_pole_c: normalizeInteractionsC(fce_interactions_pole_c),
interactions_pole_t: normalizeInteractionsT(fce_interactions_pole_t),
});

Expand Down
Loading