Skip to content
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/applications/legacy/.env.template
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@ PROCONNECT_ACCOUNT=https://identite-sandbox.proconnect.gouv.fr/
ELASTICSEARCH_URL=

# FEATURES
FEATURES=page-projet
FEATURES=
2 changes: 1 addition & 1 deletion packages/applications/ssr/.env.template
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ PROCONNECT_ACCOUNT=https://identite-sandbox.proconnect.gouv.fr/
ELASTICSEARCH_URL=

# FEATURES
FEATURES=page-projet
FEATURES=

# DÉMARCHES SIMPLIFIÉES
DS_API_URL=https://demarche.numerique.gouv.fr/api/v2/graphql
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,12 @@ import { decodeParameter } from '@/utils/decodeParameter';
import { IdentifiantParameter } from '@/utils/identifiantParameter';
import { PageWithErrorHandling } from '@/utils/PageWithErrorHandling';

import { checkFeatureFlag } from '../_helpers/checkFeatureFlag';

import { ÉvaluationCarbonePage } from './ÉvaluationCarbone.page';

type PageProps = IdentifiantParameter & {
searchParams?: Record<string, string>;
};

export default async function Page({ params: { identifiant }, searchParams }: PageProps) {
export default async function Page({ params: { identifiant } }: IdentifiantParameter) {
return PageWithErrorHandling(async () => {
const identifiantProjet = IdentifiantProjet.convertirEnValueType(decodeParameter(identifiant));

checkFeatureFlag(identifiantProjet, searchParams);

return <ÉvaluationCarbonePage identifiantProjet={identifiantProjet.formatter()} />;
});
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,11 @@ import { decodeParameter } from '@/utils/decodeParameter';
import { IdentifiantParameter } from '@/utils/identifiantParameter';
import { PageWithErrorHandling } from '@/utils/PageWithErrorHandling';

import { checkFeatureFlag } from '../_helpers/checkFeatureFlag';
import { getCahierDesCharges } from '../../../../_helpers';

import { ImprimerPage } from './Imprimer.page';

type PageProps = IdentifiantParameter & {
searchParams?: Record<string, string>;
};

export default async function Page({ params: { identifiant }, searchParams }: PageProps) {
export default async function Page({ params: { identifiant } }: IdentifiantParameter) {
return PageWithErrorHandling(async () => {
const identifiantProjet = IdentifiantProjet.convertirEnValueType(decodeParameter(identifiant));

Expand All @@ -27,8 +22,6 @@ export default async function Page({ params: { identifiant }, searchParams }: Pa
champsSupplémentaires.autorisationDUrbanisme
);

checkFeatureFlag(identifiantProjet, searchParams);

return (
<ImprimerPage
identifiantProjet={identifiantProjet.formatter()}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,12 @@ import { decodeParameter } from '@/utils/decodeParameter';
import { IdentifiantParameter } from '@/utils/identifiantParameter';
import { PageWithErrorHandling } from '@/utils/PageWithErrorHandling';

import { checkFeatureFlag } from '../_helpers/checkFeatureFlag';

import { InformationsGénéralesPage } from './InformationsGénérales.page';

type PageProps = IdentifiantParameter & {
searchParams?: Record<string, string>;
};

export default async function Page({ params: { identifiant }, searchParams }: PageProps) {
export default async function Page({ params: { identifiant } }: IdentifiantParameter) {
return PageWithErrorHandling(async () => {
const identifiantProjet = IdentifiantProjet.convertirEnValueType(decodeParameter(identifiant));

checkFeatureFlag(identifiantProjet, searchParams);

return <InformationsGénéralesPage identifiantProjet={identifiantProjet.formatter()} />;
});
}
Original file line number Diff line number Diff line change
@@ -1,23 +1,15 @@
import { IdentifiantProjet } from '@potentiel-domain/projet';

import { decodeParameter } from '@/utils/decodeParameter';
import { IdentifiantParameter } from '@/utils/identifiantParameter';
import { PageWithErrorHandling } from '@/utils/PageWithErrorHandling';

import { checkFeatureFlag } from '../_helpers/checkFeatureFlag';
import { IdentifiantParameter } from '@/utils/identifiantParameter';

import { InstallationPage } from './Installation.page';

type PageProps = IdentifiantParameter & {
searchParams?: Record<string, string>;
};

export default async function Page({ params: { identifiant }, searchParams }: PageProps) {
export default async function Page({ params: { identifiant } }: IdentifiantParameter) {
return PageWithErrorHandling(async () => {
const identifiantProjet = IdentifiantProjet.convertirEnValueType(decodeParameter(identifiant));

checkFeatureFlag(identifiantProjet, searchParams);

return <InstallationPage identifiantProjet={identifiantProjet.formatter()} />;
});
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { getContext } from '@potentiel-applications/request-context';
import { IdentifiantProjet } from '@potentiel-domain/projet';

import { decodeParameter } from '@/utils/decodeParameter';
Expand All @@ -18,12 +17,6 @@ export default async function LauréatDétailsLayout({ children, params }: Layou
decodeParameter(params.identifiant),
);

const { features } = getContext() ?? {};

if (!features?.includes('page-projet')) {
return children;
}

const items = await getLauréatMenuItems({ identifiantProjet, utilisateur });

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,11 @@ import { IdentifiantParameter } from '@/utils/identifiantParameter';
import { PageWithErrorHandling } from '@/utils/PageWithErrorHandling';

import { TableauDeBordPage } from './TableauDeBord.page';
import { checkFeatureFlag } from './_helpers/checkFeatureFlag';

type PageProps = IdentifiantParameter & {
searchParams?: Record<string, string>;
};

export default async function Page({ params: { identifiant }, searchParams }: PageProps) {
export default async function Page({ params: { identifiant } }: IdentifiantParameter) {
return PageWithErrorHandling(async () => {
const identifiantProjet = IdentifiantProjet.convertirEnValueType(decodeParameter(identifiant));

checkFeatureFlag(identifiantProjet, searchParams);

return <TableauDeBordPage identifiantProjet={identifiantProjet.formatter()} />;
});
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,16 @@ import { IdentifiantParameter } from '@/utils/identifiantParameter';
import { PageWithErrorHandling } from '@/utils/PageWithErrorHandling';
import { withUtilisateur } from '@/utils/withUtilisateur';

import { checkFeatureFlag } from '../_helpers/checkFeatureFlag';

import { getTâches } from './_helpers/getTâches';
import { TâchesPage } from './Tâches.page';

type PageProps = IdentifiantParameter & {
searchParams?: Record<string, string>;
};

export default async function Page({ params: { identifiant }, searchParams }: PageProps) {
export default async function Page({ params: { identifiant } }: IdentifiantParameter) {
return PageWithErrorHandling(async () =>
withUtilisateur(async (utilisateur) => {
const identifiantProjet = IdentifiantProjet.convertirEnValueType(
decodeParameter(identifiant),
);

checkFeatureFlag(identifiantProjet, searchParams);

const tâches = await getTâches(
identifiantProjet.formatter(),
utilisateur.identifiantUtilisateur.email,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
'user client';
'use client';

import { createContext, useContext } from 'react';

Expand Down
2 changes: 1 addition & 1 deletion packages/applications/subscribers/.env.template
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ ORE_ENDPOINT=https://opendata.agenceore.fr
ELASTICSEARCH_URL=

# FEATURES
FEATURES=page-projet
FEATURES=
Loading