From dce2114a7940310e2c4241c2cdbd7e3fd060fb60 Mon Sep 17 00:00:00 2001 From: Luc SORIGNET Date: Sat, 1 Mar 2025 10:30:44 +0100 Subject: [PATCH] fix: correction fileGroup lors de l'enregistrement d'un nouveau responsable --- Front-End/docker/entrypoint.sh | 14 +++++++++----- Front-End/next.config.mjs | 1 + Front-End/prod.env | 3 ++- .../app/[locale]/admin/subscriptions/page.js | 19 ++----------------- 4 files changed, 14 insertions(+), 23 deletions(-) diff --git a/Front-End/docker/entrypoint.sh b/Front-End/docker/entrypoint.sh index 5105beb..7f6499e 100644 --- a/Front-End/docker/entrypoint.sh +++ b/Front-End/docker/entrypoint.sh @@ -14,11 +14,15 @@ replace_value() { find . -type f -exec sed -i "s|_${key}_|${value}|g" {} \; } +# Lire les clés et valeurs depuis un fichier .env +if [ -f .env ]; then + while IFS='=' read -r key value; do + # Ignorer les lignes vides et les commentaires + [ -z "$key" ] && continue + [ "${key#\#}" != "$key" ] && continue -printenv | while read -r line ; do - key=$(echo $line | cut -d "=" -f1) - value=$(echo $line | cut -d "=" -f2) + replace_value $key $value /app/ + done < .env +fi - replace_value $key $value /app/ -done exec "$@" \ No newline at end of file diff --git a/Front-End/next.config.mjs b/Front-End/next.config.mjs index bc67c6e..371cd51 100644 --- a/Front-End/next.config.mjs +++ b/Front-End/next.config.mjs @@ -24,6 +24,7 @@ const nextConfig = { NEXT_PUBLIC_USE_FAKE_DATA: process.env.NEXT_PUBLIC_USE_FAKE_DATA || 'false', AUTH_SECRET: process.env.AUTH_SECRET || 'false', NEXTAUTH_URL: process.env.NEXTAUTH_URL || "http://localhost:3000", + DOCUSEAL_API_KEY: process.env.DOCUSEAL_API_KEY, }, async rewrites() { return [ diff --git a/Front-End/prod.env b/Front-End/prod.env index 687be24..70fb338 100644 --- a/Front-End/prod.env +++ b/Front-End/prod.env @@ -1,4 +1,5 @@ NEXT_PUBLIC_API_URL=_NEXT_PUBLIC_API_URL_ NEXT_PUBLIC_USE_FAKE_DATA=_NEXT_PUBLIC_USE_FAKE_DATA_ AUTH_SECRET=_AUTH_SECRET_ -NEXTAUTH_URL=_NEXTAUTH_URL_ \ No newline at end of file +NEXTAUTH_URL=_NEXTAUTH_URL_ +DOCUSEAL_API_KEY=_DOCUSEAL_API_KEY_ \ No newline at end of file diff --git a/Front-End/src/app/[locale]/admin/subscriptions/page.js b/Front-End/src/app/[locale]/admin/subscriptions/page.js index ef82b52..41d35d3 100644 --- a/Front-End/src/app/[locale]/admin/subscriptions/page.js +++ b/Front-End/src/app/[locale]/admin/subscriptions/page.js @@ -414,6 +414,7 @@ useEffect(()=>{ }, fees: allFeesIds, discounts: allDiscountsds, + fileGroup: selectedFileGroup, establishment: ESTABLISHMENT_ID }; @@ -432,6 +433,7 @@ useEffect(()=>{ }) .catch((error) => { logger.error('Error:', error); + //deleteProfile(response.id, csrfToken); }); } }) @@ -569,23 +571,6 @@ const columnsSubscribed = [ ]; - const tabs = [ - { - id: 'pending', - label: t('pending'), - count: totalPending - }, - { - id: 'subscribed', - label: t('subscribed'), - count: totalSubscribed - }, - { - id: 'archived', - label: t('archived'), - count: totalArchives - } - ]; if (isLoading) { return ;