From 274c285aa85a307986ba4a686393da967e9da928 Mon Sep 17 00:00:00 2001 From: Vins Date: Tue, 21 May 2024 10:08:06 +0200 Subject: [PATCH 01/28] Phone number showed with dot --- package.json | 2 +- .../DesignSystem/UserFolder/UserFolderHeader/index.tsx | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index bdad1366..b4dee7df 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.1.0", "private": true, "scripts": { - "dev": "PORT=5005 next dev", + "dev": "next dev", "build": "next build", "start": "next start", "lint": "next lint", diff --git a/src/front/Components/DesignSystem/UserFolder/UserFolderHeader/index.tsx b/src/front/Components/DesignSystem/UserFolder/UserFolderHeader/index.tsx index bcb21637..6824c99d 100644 --- a/src/front/Components/DesignSystem/UserFolder/UserFolderHeader/index.tsx +++ b/src/front/Components/DesignSystem/UserFolder/UserFolderHeader/index.tsx @@ -101,10 +101,11 @@ export default class UserFolderHeader extends React.Component { return phoneNumber; } const output = phoneNumber.split("").map((char, index) => { - if (index % 2) return char + " "; + if (index % 2) return char + "."; return char; }); - return output.join(""); + const joinedOutput = output.join(""); + return joinedOutput.substring(0, joinedOutput.length - 1); } private onEditClick(): void {} From 724b29f944006d8ab1ed06b14694cdcba199aa17 Mon Sep 17 00:00:00 2001 From: Vins Date: Thu, 23 May 2024 00:26:51 +0200 Subject: [PATCH 02/28] Password regex accept _ and - --- src/front/Components/Layouts/LoginCustomer/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/front/Components/Layouts/LoginCustomer/index.tsx b/src/front/Components/Layouts/LoginCustomer/index.tsx index 78c8af2e..6138b1f8 100644 --- a/src/front/Components/Layouts/LoginCustomer/index.tsx +++ b/src/front/Components/Layouts/LoginCustomer/index.tsx @@ -118,7 +118,7 @@ export default function Login() { return; } - const passwordRegex = new RegExp(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[A-Za-z\d@$!%*?&]{8,}$/); + const passwordRegex = new RegExp(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[A-Za-z\d@$!%*?&_\\-]{8,}$/); if (!passwordRegex.test(values["password"])) { setValidationErrors([ { From 65366379292d19200be4a7b06e3a83682c5910c0 Mon Sep 17 00:00:00 2001 From: Vins Date: Thu, 23 May 2024 10:49:46 +0200 Subject: [PATCH 03/28] Phone number input with dot ok --- src/front/Components/Layouts/Folder/AddClientToFolder/index.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/front/Components/Layouts/Folder/AddClientToFolder/index.tsx b/src/front/Components/Layouts/Folder/AddClientToFolder/index.tsx index e40e08a9..13f4719d 100644 --- a/src/front/Components/Layouts/Folder/AddClientToFolder/index.tsx +++ b/src/front/Components/Layouts/Folder/AddClientToFolder/index.tsx @@ -231,6 +231,7 @@ class AddClientToFolderClass extends BasePage { try { // remove every space from the phone number values["cell_phone_number"] = values["cell_phone_number"].replace(/\s/g, ""); + values["cell_phone_number"] = values["cell_phone_number"].replace(/\./g, ""); if (values["cell_phone_number"] && values["cell_phone_number"].length === 10) { // get the first digit of the phone number const firstDigit = values["cell_phone_number"].charAt(0); From c97625a462149f64475ca86df2f2c8032acbc492 Mon Sep 17 00:00:00 2001 From: Vins Date: Thu, 23 May 2024 11:27:22 +0200 Subject: [PATCH 04/28] Switched front display version --- src/front/version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/front/version.json b/src/front/version.json index beb42336..00ef013b 100644 --- a/src/front/version.json +++ b/src/front/version.json @@ -1,3 +1,3 @@ { - "version": "v0.5.0" + "version": "v2.1.0" } From 298a47188c8a6b9055399cdf73019cd1745644b8 Mon Sep 17 00:00:00 2001 From: Vins Date: Thu, 23 May 2024 11:27:38 +0200 Subject: [PATCH 05/28] v2.2 --- src/front/version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/front/version.json b/src/front/version.json index 00ef013b..1d72ac1a 100644 --- a/src/front/version.json +++ b/src/front/version.json @@ -1,3 +1,3 @@ { - "version": "v2.1.0" + "version": "v2.2.0" } From aff7d5e67e04bfcefefde584e41b456ecb4de837 Mon Sep 17 00:00:00 2001 From: Yanis JEDRZEJCZAK Date: Thu, 23 May 2024 11:44:24 +0200 Subject: [PATCH 06/28] Adding tags to images --- .github/workflows/ppd.yml | 9 ++++++--- .github/workflows/prd.yml | 9 ++++++--- .github/workflows/stg.yml | 11 ++++++----- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ppd.yml b/.github/workflows/ppd.yml index 2864eeb6..1c410bcb 100644 --- a/.github/workflows/ppd.yml +++ b/.github/workflows/ppd.yml @@ -33,10 +33,13 @@ jobs: username: nologin password: ${{ secrets.SCW_SECRET_KEY_LECOFFRE }} registry: ${{ env.CONTAINER_REGISTRY_ENDPOINT_LECOFFRE }} + - name: Get Git Commit SHA + id: vars + run: echo "COMMIT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV - name: Build the Docker Image - run: docker build . -t ${{ env.CONTAINER_REGISTRY_ENDPOINT_LECOFFRE }}/${{ env.IMAGE_NAME }} + run: docker build . -t ${{ env.CONTAINER_REGISTRY_ENDPOINT_LECOFFRE }}/${{ env.IMAGE_NAME }}:${{ env.COMMIT_SHA }} - name: Push the Docker Image to Scaleway Container Registry - run: docker push ${{ env.CONTAINER_REGISTRY_ENDPOINT_LECOFFRE }}/${{ env.IMAGE_NAME }} + run: docker push ${{ env.CONTAINER_REGISTRY_ENDPOINT_LECOFFRE }}/${{ env.IMAGE_NAME }}:${{ env.COMMIT_SHA }} deploy-to-scaleway-lecoffre: needs: build-and-push-image-lecoffre runs-on: ubuntu-latest @@ -65,7 +68,7 @@ jobs: fi done <<< "$ENV_VARS" env_string=$(echo $env_string | sed 's/ $//') - scw container container update ${{ env.CONTAINER_ID }} $env_string + scw container container update ${{ env.CONTAINER_ID }} $env_string registry-image ${{ env.CONTAINER_REGISTRY_ENDPOINT_LECOFFRE }}/${{ env.IMAGE_NAME }}:${{ env.COMMIT_SHA }} env: ENV_VARS: ${{ secrets.ENV }} SCW_ACCESS_KEY: ${{ secrets.SCW_ACCESS_KEY_LECOFFRE }} diff --git a/.github/workflows/prd.yml b/.github/workflows/prd.yml index e9102294..b412540a 100644 --- a/.github/workflows/prd.yml +++ b/.github/workflows/prd.yml @@ -34,10 +34,13 @@ jobs: username: nologin password: ${{ secrets.SCW_SECRET_KEY_LECOFFRE }} registry: ${{ env.CONTAINER_REGISTRY_ENDPOINT_LECOFFRE }} + - name: Get Git Commit SHA + id: vars + run: echo "COMMIT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV - name: Build the Docker Image - run: docker build . -t ${{ env.CONTAINER_REGISTRY_ENDPOINT_LECOFFRE }}/${{ env.IMAGE_NAME }} + run: docker build . -t ${{ env.CONTAINER_REGISTRY_ENDPOINT_LECOFFRE }}/${{ env.IMAGE_NAME }}:${{ env.COMMIT_SHA }} - name: Push the Docker Image to Scaleway Container Registry - run: docker push ${{ env.CONTAINER_REGISTRY_ENDPOINT_LECOFFRE }}/${{ env.IMAGE_NAME }} + run: docker push ${{ env.CONTAINER_REGISTRY_ENDPOINT_LECOFFRE }}/${{ env.IMAGE_NAME }}:${{ env.COMMIT_SHA }} deploy-to-scaleway-lecoffre: needs: build-and-push-image-lecoffre runs-on: ubuntu-latest @@ -66,7 +69,7 @@ jobs: fi done <<< "$ENV_VARS" env_string=$(echo $env_string | sed 's/ $//') - scw container container update ${{ env.CONTAINER_ID }} $env_string + scw container container update ${{ env.CONTAINER_ID }} $env_string registry-image ${{ env.CONTAINER_REGISTRY_ENDPOINT_LECOFFRE }}/${{ env.IMAGE_NAME }}:${{ env.COMMIT_SHA }} env: ENV_VARS: ${{ secrets.ENV }} SCW_ACCESS_KEY: ${{ secrets.SCW_ACCESS_KEY_LECOFFRE }} diff --git a/.github/workflows/stg.yml b/.github/workflows/stg.yml index 703da63b..5276f1dd 100644 --- a/.github/workflows/stg.yml +++ b/.github/workflows/stg.yml @@ -5,11 +5,9 @@ on: branches: [staging] env: - PROJECT_ID_LECOFFRE: 72d08499-37c2-412b-877e-f8af0471654a NAMESPACE_ID_LECOFFRE: f8137e85-47ad-46a5-9e2e-18af5de829c5 CONTAINER_REGISTRY_ENDPOINT_LECOFFRE: rg.fr-par.scw.cloud/funcscwlecoffrestgbqbfhtv6 - IMAGE_NAME: front CONTAINER_NAME: front @@ -34,10 +32,13 @@ jobs: username: nologin password: ${{ secrets.SCW_SECRET_KEY_LECOFFRE }} registry: ${{ env.CONTAINER_REGISTRY_ENDPOINT_LECOFFRE }} + - name: Get Git Commit SHA + id: vars + run: echo "COMMIT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV - name: Build the Docker Image - run: docker build . -t ${{ env.CONTAINER_REGISTRY_ENDPOINT_LECOFFRE }}/${{ env.IMAGE_NAME }} + run: docker build . -t ${{ env.CONTAINER_REGISTRY_ENDPOINT_LECOFFRE }}/${{ env.IMAGE_NAME }}:${{ env.COMMIT_SHA }} - name: Push the Docker Image to Scaleway Container Registry - run: docker push ${{ env.CONTAINER_REGISTRY_ENDPOINT_LECOFFRE }}/${{ env.IMAGE_NAME }} + run: docker push ${{ env.CONTAINER_REGISTRY_ENDPOINT_LECOFFRE }}/${{ env.IMAGE_NAME }}:${{ env.COMMIT_SHA }} deploy-to-scaleway-lecoffre: needs: build-and-push-image-lecoffre runs-on: ubuntu-latest @@ -66,7 +67,7 @@ jobs: fi done <<< "$ENV_VARS" env_string=$(echo $env_string | sed 's/ $//') - scw container container update ${{ env.CONTAINER_ID }} $env_string + scw container container update ${{ env.CONTAINER_ID }} $env_string registry-image ${{ env.CONTAINER_REGISTRY_ENDPOINT_LECOFFRE }}/${{ env.IMAGE_NAME }}:${{ env.COMMIT_SHA }} env: ENV_VARS: ${{ secrets.ENV }} SCW_ACCESS_KEY: ${{ secrets.SCW_ACCESS_KEY_LECOFFRE }} From c0b977b319b9104b6dc6049d4730ed4a1143df00 Mon Sep 17 00:00:00 2001 From: Yanis JEDRZEJCZAK Date: Thu, 23 May 2024 11:52:27 +0200 Subject: [PATCH 07/28] Adding tags to images --- .github/workflows/ppd.yml | 2 +- .github/workflows/prd.yml | 2 +- .github/workflows/stg.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ppd.yml b/.github/workflows/ppd.yml index 1c410bcb..154b6324 100644 --- a/.github/workflows/ppd.yml +++ b/.github/workflows/ppd.yml @@ -68,7 +68,7 @@ jobs: fi done <<< "$ENV_VARS" env_string=$(echo $env_string | sed 's/ $//') - scw container container update ${{ env.CONTAINER_ID }} $env_string registry-image ${{ env.CONTAINER_REGISTRY_ENDPOINT_LECOFFRE }}/${{ env.IMAGE_NAME }}:${{ env.COMMIT_SHA }} + scw container container update ${{ env.CONTAINER_ID }} $env_string registry-image=${{ env.CONTAINER_REGISTRY_ENDPOINT_LECOFFRE }}/${{ env.IMAGE_NAME }}:${{ env.COMMIT_SHA }} env: ENV_VARS: ${{ secrets.ENV }} SCW_ACCESS_KEY: ${{ secrets.SCW_ACCESS_KEY_LECOFFRE }} diff --git a/.github/workflows/prd.yml b/.github/workflows/prd.yml index b412540a..b0d89773 100644 --- a/.github/workflows/prd.yml +++ b/.github/workflows/prd.yml @@ -69,7 +69,7 @@ jobs: fi done <<< "$ENV_VARS" env_string=$(echo $env_string | sed 's/ $//') - scw container container update ${{ env.CONTAINER_ID }} $env_string registry-image ${{ env.CONTAINER_REGISTRY_ENDPOINT_LECOFFRE }}/${{ env.IMAGE_NAME }}:${{ env.COMMIT_SHA }} + scw container container update ${{ env.CONTAINER_ID }} $env_string registry-image=${{ env.CONTAINER_REGISTRY_ENDPOINT_LECOFFRE }}/${{ env.IMAGE_NAME }}:${{ env.COMMIT_SHA }} env: ENV_VARS: ${{ secrets.ENV }} SCW_ACCESS_KEY: ${{ secrets.SCW_ACCESS_KEY_LECOFFRE }} diff --git a/.github/workflows/stg.yml b/.github/workflows/stg.yml index 5276f1dd..4be103f4 100644 --- a/.github/workflows/stg.yml +++ b/.github/workflows/stg.yml @@ -67,7 +67,7 @@ jobs: fi done <<< "$ENV_VARS" env_string=$(echo $env_string | sed 's/ $//') - scw container container update ${{ env.CONTAINER_ID }} $env_string registry-image ${{ env.CONTAINER_REGISTRY_ENDPOINT_LECOFFRE }}/${{ env.IMAGE_NAME }}:${{ env.COMMIT_SHA }} + scw container container update ${{ env.CONTAINER_ID }} $env_string registry-image=${{ env.CONTAINER_REGISTRY_ENDPOINT_LECOFFRE }}/${{ env.IMAGE_NAME }}:${{ env.COMMIT_SHA }} env: ENV_VARS: ${{ secrets.ENV }} SCW_ACCESS_KEY: ${{ secrets.SCW_ACCESS_KEY_LECOFFRE }} From fa1036a0dde82882076d04b4456c949ce71233aa Mon Sep 17 00:00:00 2001 From: Yanis JEDRZEJCZAK Date: Thu, 23 May 2024 12:06:21 +0200 Subject: [PATCH 08/28] Adding tags to images --- .github/workflows/stg.yml | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/.github/workflows/stg.yml b/.github/workflows/stg.yml index 4be103f4..8f791730 100644 --- a/.github/workflows/stg.yml +++ b/.github/workflows/stg.yml @@ -34,11 +34,15 @@ jobs: registry: ${{ env.CONTAINER_REGISTRY_ENDPOINT_LECOFFRE }} - name: Get Git Commit SHA id: vars - run: echo "COMMIT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV + run: | + COMMIT_SHA=$(git rev-parse --short HEAD) + echo "COMMIT_SHA=${COMMIT_SHA}" >> $GITHUB_ENV + echo "Commit SHA is: ${COMMIT_SHA}" - name: Build the Docker Image run: docker build . -t ${{ env.CONTAINER_REGISTRY_ENDPOINT_LECOFFRE }}/${{ env.IMAGE_NAME }}:${{ env.COMMIT_SHA }} - name: Push the Docker Image to Scaleway Container Registry run: docker push ${{ env.CONTAINER_REGISTRY_ENDPOINT_LECOFFRE }}/${{ env.IMAGE_NAME }}:${{ env.COMMIT_SHA }} + deploy-to-scaleway-lecoffre: needs: build-and-push-image-lecoffre runs-on: ubuntu-latest @@ -46,9 +50,14 @@ jobs: steps: - name: Install CLI uses: scaleway/action-scw@v0 + - name: Verify Commit SHA + run: | + echo "Deploying image with Commit SHA: ${{ env.COMMIT_SHA }}" - name: Get container ID run: | - echo "CONTAINER_ID=$(scw container container list namespace-id=${{env.NAMESPACE_ID_LECOFFRE}} -o json | jq -r '.[] | select(.name == "${{ env.CONTAINER_NAME }}") | .id')" >> $GITHUB_ENV + CONTAINER_ID=$(scw container container list namespace-id=${{ env.NAMESPACE_ID_LECOFFRE }} -o json | jq -r '.[] | select(.name == "${{ env.CONTAINER_NAME }}") | .id') + echo "CONTAINER_ID=${CONTAINER_ID}" >> $GITHUB_ENV + echo "Container ID is: ${CONTAINER_ID}" env: SCW_ACCESS_KEY: ${{ secrets.SCW_ACCESS_KEY_LECOFFRE }} SCW_SECRET_KEY: ${{ secrets.SCW_SECRET_KEY_LECOFFRE }} @@ -56,18 +65,19 @@ jobs: SCW_DEFAULT_ORGANIZATION_ID: ${{ secrets.SCW_ORGANIZATION_ID_LECOFFRE }} - name: Deploy the container based on the new image run: | - env_string="" - while IFS= read -r line; do - if [[ "$line" == *"="* ]]; then - key=$(echo "$line" | cut -d '=' -f 1) - value=$(echo "$line" | cut -d '=' -f 2-) - if [[ -n "$key" ]]; then - env_string+="environment-variables.$key=$value " - fi + env_string="" + while IFS= read -r line; do + if [[ "$line" == *"="* ]]; then + key=$(echo "$line" | cut -d '=' -f 1) + value=$(echo "$line" | cut -d '=' -f 2-) + if [[ -n "$key" ]]; then + env_string+="environment-variables.$key=$value " fi - done <<< "$ENV_VARS" - env_string=$(echo $env_string | sed 's/ $//') - scw container container update ${{ env.CONTAINER_ID }} $env_string registry-image=${{ env.CONTAINER_REGISTRY_ENDPOINT_LECOFFRE }}/${{ env.IMAGE_NAME }}:${{ env.COMMIT_SHA }} + fi + done <<< "$ENV_VARS" + env_string=$(echo $env_string | sed 's/ $//') + echo "Updating container with ID: ${{ env.CONTAINER_ID }} using image: ${{ env.CONTAINER_REGISTRY_ENDPOINT_LECOFFRE }}/${{ env.IMAGE_NAME }}:${{ env.COMMIT_SHA }}" + scw container container update ${{ env.CONTAINER_ID }} $env_string registry-image=${{ env.CONTAINER_REGISTRY_ENDPOINT_LECOFFRE }}/${{ env.IMAGE_NAME }}:${{ env.COMMIT_SHA }} env: ENV_VARS: ${{ secrets.ENV }} SCW_ACCESS_KEY: ${{ secrets.SCW_ACCESS_KEY_LECOFFRE }} From c9929ac353a4cd6d440683c42fd855cba95b3227 Mon Sep 17 00:00:00 2001 From: Yanis JEDRZEJCZAK Date: Thu, 23 May 2024 12:17:09 +0200 Subject: [PATCH 09/28] Adding tags to images --- .github/workflows/stg.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/stg.yml b/.github/workflows/stg.yml index 8f791730..66eee834 100644 --- a/.github/workflows/stg.yml +++ b/.github/workflows/stg.yml @@ -33,15 +33,16 @@ jobs: password: ${{ secrets.SCW_SECRET_KEY_LECOFFRE }} registry: ${{ env.CONTAINER_REGISTRY_ENDPOINT_LECOFFRE }} - name: Get Git Commit SHA - id: vars - run: | - COMMIT_SHA=$(git rev-parse --short HEAD) - echo "COMMIT_SHA=${COMMIT_SHA}" >> $GITHUB_ENV - echo "Commit SHA is: ${COMMIT_SHA}" + id: get_commit_sha + run: echo "COMMIT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV - name: Build the Docker Image run: docker build . -t ${{ env.CONTAINER_REGISTRY_ENDPOINT_LECOFFRE }}/${{ env.IMAGE_NAME }}:${{ env.COMMIT_SHA }} + env: + COMMIT_SHA: ${{ steps.get_commit_sha.outputs.COMMIT_SHA }} - name: Push the Docker Image to Scaleway Container Registry run: docker push ${{ env.CONTAINER_REGISTRY_ENDPOINT_LECOFFRE }}/${{ env.IMAGE_NAME }}:${{ env.COMMIT_SHA }} + env: + COMMIT_SHA: ${{ steps.get_commit_sha.outputs.COMMIT_SHA }} deploy-to-scaleway-lecoffre: needs: build-and-push-image-lecoffre @@ -51,8 +52,10 @@ jobs: - name: Install CLI uses: scaleway/action-scw@v0 - name: Verify Commit SHA - run: | + run: | echo "Deploying image with Commit SHA: ${{ env.COMMIT_SHA }}" + env: + COMMIT_SHA: ${{ steps.get_commit_sha.outputs.COMMIT_SHA }} - name: Get container ID run: | CONTAINER_ID=$(scw container container list namespace-id=${{ env.NAMESPACE_ID_LECOFFRE }} -o json | jq -r '.[] | select(.name == "${{ env.CONTAINER_NAME }}") | .id') @@ -83,4 +86,5 @@ jobs: SCW_ACCESS_KEY: ${{ secrets.SCW_ACCESS_KEY_LECOFFRE }} SCW_SECRET_KEY: ${{ secrets.SCW_SECRET_KEY_LECOFFRE }} SCW_DEFAULT_PROJECT_ID: ${{ env.PROJECT_ID_LECOFFRE }} - SCW_DEFAULT_ORGANIZATION_ID: ${{ secrets.SCW_ORGANIZATION_ID_LECOFFRE }} \ No newline at end of file + SCW_DEFAULT_ORGANIZATION_ID: ${{ secrets.SCW_ORGANIZATION_ID_LECOFFRE }} + COMMIT_SHA: ${{ steps.get_commit_sha.outputs.COMMIT_SHA }} \ No newline at end of file From 7382a91a667c90d05804dbc9aa509b465c34e2ab Mon Sep 17 00:00:00 2001 From: Yanis JEDRZEJCZAK Date: Thu, 23 May 2024 12:20:11 +0200 Subject: [PATCH 10/28] Adding tags to images --- .github/workflows/stg.yml | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/.github/workflows/stg.yml b/.github/workflows/stg.yml index 66eee834..3a0b7343 100644 --- a/.github/workflows/stg.yml +++ b/.github/workflows/stg.yml @@ -33,16 +33,12 @@ jobs: password: ${{ secrets.SCW_SECRET_KEY_LECOFFRE }} registry: ${{ env.CONTAINER_REGISTRY_ENDPOINT_LECOFFRE }} - name: Get Git Commit SHA - id: get_commit_sha + id: vars run: echo "COMMIT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV - name: Build the Docker Image run: docker build . -t ${{ env.CONTAINER_REGISTRY_ENDPOINT_LECOFFRE }}/${{ env.IMAGE_NAME }}:${{ env.COMMIT_SHA }} - env: - COMMIT_SHA: ${{ steps.get_commit_sha.outputs.COMMIT_SHA }} - name: Push the Docker Image to Scaleway Container Registry run: docker push ${{ env.CONTAINER_REGISTRY_ENDPOINT_LECOFFRE }}/${{ env.IMAGE_NAME }}:${{ env.COMMIT_SHA }} - env: - COMMIT_SHA: ${{ steps.get_commit_sha.outputs.COMMIT_SHA }} deploy-to-scaleway-lecoffre: needs: build-and-push-image-lecoffre @@ -51,21 +47,17 @@ jobs: steps: - name: Install CLI uses: scaleway/action-scw@v0 - - name: Verify Commit SHA - run: | - echo "Deploying image with Commit SHA: ${{ env.COMMIT_SHA }}" - env: - COMMIT_SHA: ${{ steps.get_commit_sha.outputs.COMMIT_SHA }} - name: Get container ID run: | - CONTAINER_ID=$(scw container container list namespace-id=${{ env.NAMESPACE_ID_LECOFFRE }} -o json | jq -r '.[] | select(.name == "${{ env.CONTAINER_NAME }}") | .id') - echo "CONTAINER_ID=${CONTAINER_ID}" >> $GITHUB_ENV - echo "Container ID is: ${CONTAINER_ID}" + echo "CONTAINER_ID=$(scw container container list namespace-id=${{ env.NAMESPACE_ID_LECOFFRE }} -o json | jq -r '.[] | select(.name == \"${{ env.CONTAINER_NAME }}\") | .id')" >> $GITHUB_ENV env: SCW_ACCESS_KEY: ${{ secrets.SCW_ACCESS_KEY_LECOFFRE }} SCW_SECRET_KEY: ${{ secrets.SCW_SECRET_KEY_LECOFFRE }} SCW_DEFAULT_PROJECT_ID: ${{ env.PROJECT_ID_LECOFFRE }} SCW_DEFAULT_ORGANIZATION_ID: ${{ secrets.SCW_ORGANIZATION_ID_LECOFFRE }} + - name: Get Git Commit SHA + id: vars + run: echo "COMMIT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV - name: Deploy the container based on the new image run: | env_string="" @@ -79,12 +71,10 @@ jobs: fi done <<< "$ENV_VARS" env_string=$(echo $env_string | sed 's/ $//') - echo "Updating container with ID: ${{ env.CONTAINER_ID }} using image: ${{ env.CONTAINER_REGISTRY_ENDPOINT_LECOFFRE }}/${{ env.IMAGE_NAME }}:${{ env.COMMIT_SHA }}" scw container container update ${{ env.CONTAINER_ID }} $env_string registry-image=${{ env.CONTAINER_REGISTRY_ENDPOINT_LECOFFRE }}/${{ env.IMAGE_NAME }}:${{ env.COMMIT_SHA }} env: ENV_VARS: ${{ secrets.ENV }} SCW_ACCESS_KEY: ${{ secrets.SCW_ACCESS_KEY_LECOFFRE }} SCW_SECRET_KEY: ${{ secrets.SCW_SECRET_KEY_LECOFFRE }} SCW_DEFAULT_PROJECT_ID: ${{ env.PROJECT_ID_LECOFFRE }} - SCW_DEFAULT_ORGANIZATION_ID: ${{ secrets.SCW_ORGANIZATION_ID_LECOFFRE }} - COMMIT_SHA: ${{ steps.get_commit_sha.outputs.COMMIT_SHA }} \ No newline at end of file + SCW_DEFAULT_ORGANIZATION_ID: ${{ secrets.SCW_ORGANIZATION_ID_LECOFFRE }} \ No newline at end of file From 88187884afe493229418b6c88044d0f6614e0929 Mon Sep 17 00:00:00 2001 From: Yanis JEDRZEJCZAK Date: Thu, 23 May 2024 15:02:20 +0200 Subject: [PATCH 11/28] Revert image tags --- .github/workflows/ppd.yml | 6 +++--- .github/workflows/prd.yml | 6 +++--- .github/workflows/stg.yml | 9 +++------ 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ppd.yml b/.github/workflows/ppd.yml index 154b6324..2929890d 100644 --- a/.github/workflows/ppd.yml +++ b/.github/workflows/ppd.yml @@ -37,9 +37,9 @@ jobs: id: vars run: echo "COMMIT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV - name: Build the Docker Image - run: docker build . -t ${{ env.CONTAINER_REGISTRY_ENDPOINT_LECOFFRE }}/${{ env.IMAGE_NAME }}:${{ env.COMMIT_SHA }} + run: docker build . -t ${{ env.CONTAINER_REGISTRY_ENDPOINT_LECOFFRE }}/${{ env.IMAGE_NAME }} - name: Push the Docker Image to Scaleway Container Registry - run: docker push ${{ env.CONTAINER_REGISTRY_ENDPOINT_LECOFFRE }}/${{ env.IMAGE_NAME }}:${{ env.COMMIT_SHA }} + run: docker push ${{ env.CONTAINER_REGISTRY_ENDPOINT_LECOFFRE }}/${{ env.IMAGE_NAME }} deploy-to-scaleway-lecoffre: needs: build-and-push-image-lecoffre runs-on: ubuntu-latest @@ -68,7 +68,7 @@ jobs: fi done <<< "$ENV_VARS" env_string=$(echo $env_string | sed 's/ $//') - scw container container update ${{ env.CONTAINER_ID }} $env_string registry-image=${{ env.CONTAINER_REGISTRY_ENDPOINT_LECOFFRE }}/${{ env.IMAGE_NAME }}:${{ env.COMMIT_SHA }} + scw container container update ${{ env.CONTAINER_ID }} $env_string env: ENV_VARS: ${{ secrets.ENV }} SCW_ACCESS_KEY: ${{ secrets.SCW_ACCESS_KEY_LECOFFRE }} diff --git a/.github/workflows/prd.yml b/.github/workflows/prd.yml index b0d89773..e9e670c8 100644 --- a/.github/workflows/prd.yml +++ b/.github/workflows/prd.yml @@ -38,9 +38,9 @@ jobs: id: vars run: echo "COMMIT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV - name: Build the Docker Image - run: docker build . -t ${{ env.CONTAINER_REGISTRY_ENDPOINT_LECOFFRE }}/${{ env.IMAGE_NAME }}:${{ env.COMMIT_SHA }} + run: docker build . -t ${{ env.CONTAINER_REGISTRY_ENDPOINT_LECOFFRE }}/${{ env.IMAGE_NAME }} - name: Push the Docker Image to Scaleway Container Registry - run: docker push ${{ env.CONTAINER_REGISTRY_ENDPOINT_LECOFFRE }}/${{ env.IMAGE_NAME }}:${{ env.COMMIT_SHA }} + run: docker push ${{ env.CONTAINER_REGISTRY_ENDPOINT_LECOFFRE }}/${{ env.IMAGE_NAME }} deploy-to-scaleway-lecoffre: needs: build-and-push-image-lecoffre runs-on: ubuntu-latest @@ -69,7 +69,7 @@ jobs: fi done <<< "$ENV_VARS" env_string=$(echo $env_string | sed 's/ $//') - scw container container update ${{ env.CONTAINER_ID }} $env_string registry-image=${{ env.CONTAINER_REGISTRY_ENDPOINT_LECOFFRE }}/${{ env.IMAGE_NAME }}:${{ env.COMMIT_SHA }} + scw container container update ${{ env.CONTAINER_ID }} $env_string env: ENV_VARS: ${{ secrets.ENV }} SCW_ACCESS_KEY: ${{ secrets.SCW_ACCESS_KEY_LECOFFRE }} diff --git a/.github/workflows/stg.yml b/.github/workflows/stg.yml index 3a0b7343..71b0f9b1 100644 --- a/.github/workflows/stg.yml +++ b/.github/workflows/stg.yml @@ -36,9 +36,9 @@ jobs: id: vars run: echo "COMMIT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV - name: Build the Docker Image - run: docker build . -t ${{ env.CONTAINER_REGISTRY_ENDPOINT_LECOFFRE }}/${{ env.IMAGE_NAME }}:${{ env.COMMIT_SHA }} + run: docker build . -t ${{ env.CONTAINER_REGISTRY_ENDPOINT_LECOFFRE }}/${{ env.IMAGE_NAME }} - name: Push the Docker Image to Scaleway Container Registry - run: docker push ${{ env.CONTAINER_REGISTRY_ENDPOINT_LECOFFRE }}/${{ env.IMAGE_NAME }}:${{ env.COMMIT_SHA }} + run: docker push ${{ env.CONTAINER_REGISTRY_ENDPOINT_LECOFFRE }}/${{ env.IMAGE_NAME }} deploy-to-scaleway-lecoffre: needs: build-and-push-image-lecoffre @@ -55,9 +55,6 @@ jobs: SCW_SECRET_KEY: ${{ secrets.SCW_SECRET_KEY_LECOFFRE }} SCW_DEFAULT_PROJECT_ID: ${{ env.PROJECT_ID_LECOFFRE }} SCW_DEFAULT_ORGANIZATION_ID: ${{ secrets.SCW_ORGANIZATION_ID_LECOFFRE }} - - name: Get Git Commit SHA - id: vars - run: echo "COMMIT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV - name: Deploy the container based on the new image run: | env_string="" @@ -71,7 +68,7 @@ jobs: fi done <<< "$ENV_VARS" env_string=$(echo $env_string | sed 's/ $//') - scw container container update ${{ env.CONTAINER_ID }} $env_string registry-image=${{ env.CONTAINER_REGISTRY_ENDPOINT_LECOFFRE }}/${{ env.IMAGE_NAME }}:${{ env.COMMIT_SHA }} + scw container container update ${{ env.CONTAINER_ID }} $env_string registry-image=${{ env.CONTAINER_REGISTRY_ENDPOINT_LECOFFRE }}/${{ env.IMAGE_NAME }} env: ENV_VARS: ${{ secrets.ENV }} SCW_ACCESS_KEY: ${{ secrets.SCW_ACCESS_KEY_LECOFFRE }} From 76a29b878642e6e0014c1fc6304c83a7a6d5d085 Mon Sep 17 00:00:00 2001 From: Vins Date: Wed, 29 May 2024 23:21:25 +0200 Subject: [PATCH 12/28] Remove customer finished --- package-lock.json | 279 +++++++++--------- package.json | 2 +- .../DesignSystem/UserFolder/index.tsx | 27 +- 3 files changed, 158 insertions(+), 150 deletions(-) diff --git a/package-lock.json b/package-lock.json index 19fe455d..0a493de8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,7 +24,7 @@ "eslint-config-next": "13.2.4", "form-data": "^4.0.0", "jwt-decode": "^3.1.2", - "le-coffre-resources": "git@github.com:smart-chain-fr/leCoffre-resources.git#v2.136", + "le-coffre-resources": "git@github.com:smart-chain-fr/leCoffre-resources.git#v2.139", "next": "^14.2.3", "prettier": "^2.8.7", "react": "18.2.0", @@ -42,20 +42,12 @@ "@types/react-gtm-module": "^2.0.3" } }, - "node_modules/@aashutoshrathi/word-wrap": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", - "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/@babel/code-frame": { - "version": "7.24.2", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.2.tgz", - "integrity": "sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==", + "version": "7.24.6", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.6.tgz", + "integrity": "sha512-ZJhac6FkEd1yhG2AHOmfcXG4ceoLltoCVJjN5XsWN9BifBQr+cHJbWi0h68HZuSORq+3WtJ2z0hwF2NG1b5kcA==", "dependencies": { - "@babel/highlight": "^7.24.2", + "@babel/highlight": "^7.24.6", "picocolors": "^1.0.0" }, "engines": { @@ -63,38 +55,38 @@ } }, "node_modules/@babel/helper-module-imports": { - "version": "7.24.3", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.3.tgz", - "integrity": "sha512-viKb0F9f2s0BCS22QSF308z/+1YWKV/76mwt61NBzS5izMzDPwdq1pTrzf+Li3npBWX9KdQbkeCt1jSAM7lZqg==", + "version": "7.24.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.6.tgz", + "integrity": "sha512-a26dmxFJBF62rRO9mmpgrfTLsAuyHk4e1hKTUkD/fcMfynt8gvEKwQPQDVxWhca8dHoDck+55DFt42zV0QMw5g==", "dependencies": { - "@babel/types": "^7.24.0" + "@babel/types": "^7.24.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-string-parser": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.1.tgz", - "integrity": "sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ==", + "version": "7.24.6", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.6.tgz", + "integrity": "sha512-WdJjwMEkmBicq5T9fm/cHND3+UlFa2Yj8ALLgmoSQAJZysYbBjw+azChSGPN4DSPLXOcooGRvDwZWMcF/mLO2Q==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", - "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", + "version": "7.24.6", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.6.tgz", + "integrity": "sha512-4yA7s865JHaqUdRbnaxarZREuPTHrjpDT+pXoAZ1yhyo6uFnIEpS8VMu16siFOHDpZNKYv5BObhsB//ycbICyw==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.24.2", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.2.tgz", - "integrity": "sha512-Yac1ao4flkTxTteCDZLEvdxg2fZfz1v8M4QpaGypq/WPDqg3ijHYbDfs+LG5hvzSoqaSZ9/Z9lKSP3CjZjv+pA==", + "version": "7.24.6", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.6.tgz", + "integrity": "sha512-2YnuOp4HAk2BsBrJJvYCbItHx0zWscI1C3zgWkz+wDyD9I7GIVrfnLyrR4Y1VR+7p+chAEcrgRQYZAGIKMV7vQ==", "dependencies": { - "@babel/helper-validator-identifier": "^7.22.20", + "@babel/helper-validator-identifier": "^7.24.6", "chalk": "^2.4.2", "js-tokens": "^4.0.0", "picocolors": "^1.0.0" @@ -168,9 +160,9 @@ } }, "node_modules/@babel/runtime": { - "version": "7.24.4", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.4.tgz", - "integrity": "sha512-dkxf7+hn8mFBwKjs9bvBlArzLVxVbS8usaPUDd5p2a9JCL9tB8OaOVN1isD4+Xyk4ns89/xeOmbQvgdK7IIVdA==", + "version": "7.24.6", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.6.tgz", + "integrity": "sha512-Ja18XcETdEl5mzzACGd+DKgaGJzPTCow7EglgwTmHdwokzDFYh/MHua6lU6DV/hjF2IaOJ4oX2nqnjG7RElKOw==", "dependencies": { "regenerator-runtime": "^0.14.0" }, @@ -179,12 +171,12 @@ } }, "node_modules/@babel/types": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.0.tgz", - "integrity": "sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==", + "version": "7.24.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.6.tgz", + "integrity": "sha512-WaMsgi6Q8zMgMth93GvWPXkhAIEobfsIkLTacoVZoK1J0CevIPGYY2Vo5YvJGqyHqXM6P4ppOYGsIRU8MM9pFQ==", "dependencies": { - "@babel/helper-string-parser": "^7.23.4", - "@babel/helper-validator-identifier": "^7.22.20", + "@babel/helper-string-parser": "^7.24.6", + "@babel/helper-validator-identifier": "^7.24.6", "to-fast-properties": "^2.0.0" }, "engines": { @@ -377,28 +369,28 @@ } }, "node_modules/@floating-ui/core": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.6.0.tgz", - "integrity": "sha512-PcF++MykgmTj3CIyOQbKA/hDzOAiqI3mhuoN44WRCopIs1sgoDoU4oty4Jtqaj/y3oDU6fnVSm4QG0a3t5i0+g==", + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.6.2.tgz", + "integrity": "sha512-+2XpQV9LLZeanU4ZevzRnGFg2neDeKHgFLjP6YLW+tly0IvrhqT4u8enLGjLH3qeh85g19xY5rsAusfwTdn5lg==", "dependencies": { - "@floating-ui/utils": "^0.2.1" + "@floating-ui/utils": "^0.2.0" } }, "node_modules/@floating-ui/dom": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.6.3.tgz", - "integrity": "sha512-RnDthu3mzPlQ31Ss/BTwQ1zjzIhr3lk1gZB1OC56h/1vEtaXkESrOqL5fQVMfXpwGtRwX+YsZBdyHtJMQnkArw==", + "version": "1.6.5", + "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.6.5.tgz", + "integrity": "sha512-Nsdud2X65Dz+1RHjAIP0t8z5e2ff/IRbei6BqFrl1urT8sDVzM1HMQ+R0XcU5ceRfyO3I6ayeqIfh+6Wb8LGTw==", "dependencies": { "@floating-ui/core": "^1.0.0", "@floating-ui/utils": "^0.2.0" } }, "node_modules/@floating-ui/react-dom": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.0.8.tgz", - "integrity": "sha512-HOdqOt3R3OGeTKidaLvJKcgg75S6tibQ3Tif4eyd91QnIJWr0NLvoXFpJA/j8HqkFSL68GDca9AuyWEHlhyClw==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.1.0.tgz", + "integrity": "sha512-lNzj5EQmEKn5FFKc04+zasr09h/uX8RtJRNj5gUXsSQIXHVWTVh+hVAg1vOMCexkX8EgvemMvIFpQfkosnVNyA==", "dependencies": { - "@floating-ui/dom": "^1.6.1" + "@floating-ui/dom": "^1.0.0" }, "peerDependencies": { "react": ">=16.8.0", @@ -406,9 +398,9 @@ } }, "node_modules/@floating-ui/utils": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.1.tgz", - "integrity": "sha512-9TANp6GPoMtYzQdt54kfAyMmz1+osLlXdg2ENroU7zzrtflTLrrC/lgrIfaSe+Wu0b89GKccT7vxXA0MoAIO+Q==" + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.2.tgz", + "integrity": "sha512-J4yDIIthosAsRZ5CPYP/jQvUAQtlZTTD/4suA08/FEnlxqW3sKS9iAhgsa9VYLZ6vDHn/ixJgIqRQPotoBjxIw==" }, "node_modules/@heroicons/react": { "version": "2.1.3", @@ -480,22 +472,22 @@ } }, "node_modules/@mui/core-downloads-tracker": { - "version": "5.15.15", - "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.15.15.tgz", - "integrity": "sha512-aXnw29OWQ6I5A47iuWEI6qSSUfH6G/aCsW9KmW3LiFqr7uXZBK4Ks+z8G+qeIub8k0T5CMqlT2q0L+ZJTMrqpg==", + "version": "5.15.18", + "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.15.18.tgz", + "integrity": "sha512-/9pVk+Al8qxAjwFUADv4BRZgMpZM4m5E+2Q/20qhVPuIJWqKp4Ie4tGExac6zu93rgPTYVQGgu+1vjiT0E+cEw==", "funding": { "type": "opencollective", "url": "https://opencollective.com/mui-org" } }, "node_modules/@mui/material": { - "version": "5.15.15", - "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.15.15.tgz", - "integrity": "sha512-3zvWayJ+E1kzoIsvwyEvkTUKVKt1AjchFFns+JtluHCuvxgKcLSRJTADw37k0doaRtVAsyh8bz9Afqzv+KYrIA==", + "version": "5.15.18", + "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.15.18.tgz", + "integrity": "sha512-n+/dsiqux74fFfcRUJjok+ieNQ7+BEk6/OwX9cLcLvriZrZb+/7Y8+Fd2HlUUbn5N0CDurgAHm0VH1DqyJ9HAw==", "dependencies": { "@babel/runtime": "^7.23.9", "@mui/base": "5.0.0-beta.40", - "@mui/core-downloads-tracker": "^5.15.15", + "@mui/core-downloads-tracker": "^5.15.18", "@mui/system": "^5.15.15", "@mui/types": "^7.2.14", "@mui/utils": "^5.15.14", @@ -870,9 +862,9 @@ } }, "node_modules/@rushstack/eslint-patch": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.10.2.tgz", - "integrity": "sha512-hw437iINopmQuxWPSUEvqE56NCPsiU8N4AYtfHmJFckclktzK9YQJieD3XkDCDH4OjL+C7zgPUh73R/nrcHrqw==" + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.10.3.tgz", + "integrity": "sha512-qC/xYId4NMebE6w/V33Fh9gWxLgURiNYgVNObbJl2LZv0GUUItCcCqC5axQSwRaAgaxl2mELq1rMzlswaQ0Zxg==" }, "node_modules/@swc/counter": { "version": "0.1.3", @@ -951,9 +943,9 @@ "integrity": "sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw==" }, "node_modules/@types/validator": { - "version": "13.11.9", - "resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.11.9.tgz", - "integrity": "sha512-FCTsikRozryfayPuiI46QzH3fnrOoctTjvOYZkho9BTFLCOZ2rgZJHMOVgCOfttjPJcgOx52EpkY0CMfy87MIw==" + "version": "13.11.10", + "resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.11.10.tgz", + "integrity": "sha512-e2PNXoXLr6Z+dbfx5zSh9TRlXJrELycxiaXznp4S5+D2M3b9bqJEitNHA5923jhnB2zzFiZHa2f0SI1HoIahpg==" }, "node_modules/@typescript-eslint/parser": { "version": "5.62.0", @@ -1378,9 +1370,9 @@ "optional": true }, "node_modules/bare-path": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/bare-path/-/bare-path-2.1.2.tgz", - "integrity": "sha512-o7KSt4prEphWUHa3QUwCxUI00R86VdjiuxmJK0iNVDHYPGo+HsDaVCnqCmPbf/MiW1ok8F4p3m8RTHlWk8K2ig==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/bare-path/-/bare-path-2.1.3.tgz", + "integrity": "sha512-lh/eITfU8hrj9Ru5quUp0Io1kJWIk1bTjzo7JH1P5dWmQ2EL4hFUlfI8FonAhSlgIfhn63p84CDY/x+PisgcXA==", "optional": true, "dependencies": { "bare-os": "^2.1.0" @@ -1445,11 +1437,11 @@ } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -1516,9 +1508,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001612", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001612.tgz", - "integrity": "sha512-lFgnZ07UhaCcsSZgWW0K5j4e69dK1u/ltrL9lTUiFOwNHs12S3UMIEYgBV0Z6C6hRDev7iRnMzzYmKabYdXF9g==", + "version": "1.0.30001623", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001623.tgz", + "integrity": "sha512-X/XhAVKlpIxWPpgRTnlgZssJrF0m6YtRA0QDWgsBNT12uZM6LPRydR7ip405Y3t1LamD8cP2TZFEDZFBf5ApcA==", "funding": [ { "type": "opencollective", @@ -1934,9 +1926,9 @@ } }, "node_modules/enhanced-resolve": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.16.0.tgz", - "integrity": "sha512-O+QWCviPNSSLAD9Ucn8Awv+poAkqn3T1XY5/N7kR7rQO9yfSGWkYZDwpJ+iKF7B8rxaQKWngSqACpgzeapSyoA==", + "version": "5.16.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.16.1.tgz", + "integrity": "sha512-4U5pNsuDl0EhuZpq46M5xPslstkviJuhrdobaRDBk2Jy2KO37FDAJl4lb2KlNabxT0m4MTK2UHNrsAcphE8nyw==", "dependencies": { "graceful-fs": "^4.2.4", "tapable": "^2.2.0" @@ -2379,9 +2371,9 @@ } }, "node_modules/eslint-plugin-react-hooks": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.1.tgz", - "integrity": "sha512-Ck77j8hF7l9N4S/rzSLOWEKpn994YH6iwUK8fr9mXIaQvGpQYmOnQLbiue1u5kI5T1y+gdgqosnEAO9NCz0DBg==", + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.2.tgz", + "integrity": "sha512-QzliNJq4GinDBcD8gPB5v0wh6g8q3SUi6EFF0x8N/BL9PoVs0atuGc47ozMRyOWAKdwaZ5OnbOEa3WR+dSGKuQ==", "engines": { "node": ">=10" }, @@ -2578,9 +2570,9 @@ } }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -2738,9 +2730,9 @@ } }, "node_modules/get-tsconfig": { - "version": "4.7.3", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.3.tgz", - "integrity": "sha512-ZvkrzoUA0PQZM6fy6+/Hce561s+faD1rsNwhnO5FelNjyy7EMGJ3Rz1AQ8GYDWjhRs/7dBLOEJvhK8MiEJOAFg==", + "version": "4.7.5", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.5.tgz", + "integrity": "sha512-ZCuZCnlqNzjb4QprAzXKdpp/gh6KTxSJuw3IBsPnV/7fV4NxC9ckB+vPTt8w7fJA0TaSD7c55BR47JD6MEDyDw==", "dependencies": { "resolve-pkg-maps": "^1.0.0" }, @@ -2757,6 +2749,7 @@ "version": "7.1.7", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "deprecated": "Glob versions prior to v9 are no longer supported", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -2809,11 +2802,12 @@ } }, "node_modules/globalthis": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", - "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", + "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", "dependencies": { - "define-properties": "^1.1.3" + "define-properties": "^1.2.1", + "gopd": "^1.0.1" }, "engines": { "node": ">= 0.4" @@ -2977,9 +2971,9 @@ } }, "node_modules/immutable": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.5.tgz", - "integrity": "sha512-8eabxkth9gZatlwl5TBuJnCsoTADlL6ftEr7A4qgdaTsPyreilDSnUk57SO+jfKcNtxPa22U5KK6DSeAYhpBJw==" + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.6.tgz", + "integrity": "sha512-Ju0+lEMyzMVZarkTn/gqRpdqd5dOPaz1mCZ0SH3JV6iFw81PldE/PEB1hWVEA288HPt4WXW8O7AWxB10M+03QQ==" }, "node_modules/import-fresh": { "version": "3.3.0", @@ -3008,6 +3002,7 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -3478,9 +3473,9 @@ } }, "node_modules/language-subtag-registry": { - "version": "0.3.22", - "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.22.tgz", - "integrity": "sha512-tN0MCzyWnoz/4nHS6uxdlFWoUZT7ABptwKPQ52Ea7URk6vll88bWBVhodtnlfEuCcKWNGoc+uGbw1cwa9IKh/w==" + "version": "0.3.23", + "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.23.tgz", + "integrity": "sha512-0K65Lea881pHotoGEa5gDlMxt3pctLi2RplBb7Ezh4rRdLEOtgi7n4EwK9lamnUCkKBqaeKRVebTq6BAxSkpXQ==" }, "node_modules/language-tags": { "version": "1.0.9", @@ -3494,7 +3489,7 @@ } }, "node_modules/le-coffre-resources": { - "resolved": "git+ssh://git@github.com/smart-chain-fr/leCoffre-resources.git#14df7a44f4e8f339725ce6b0eb931372a95e1650", + "resolved": "git+ssh://git@github.com/smart-chain-fr/leCoffre-resources.git#f45dc562f3eabfa91e11d56b870e2e053c486135", "license": "MIT", "dependencies": { "class-transformer": "^0.5.1", @@ -3515,9 +3510,9 @@ } }, "node_modules/libphonenumber-js": { - "version": "1.10.61", - "resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.10.61.tgz", - "integrity": "sha512-TsQsyzDttDvvzWNkbp/i0fVbzTGJIG0mUu/uNalIaRQEYeJxVQ/FPg+EJgSqfSXezREjM0V3RZ8cLVsKYhhw0Q==" + "version": "1.11.2", + "resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.11.2.tgz", + "integrity": "sha512-V9mGLlaXN1WETzqQvSu6qf6XVAr3nFuJvWsHcuzCCCo6xUKawwSxOPTpan5CGOSKTn5w/bQuCZcLPJkyysgC3w==" }, "node_modules/lines-and-columns": { "version": "1.2.4", @@ -3554,17 +3549,6 @@ "loose-envify": "cli.js" } }, - "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/memoize-one": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-6.0.0.tgz", @@ -3579,11 +3563,11 @@ } }, "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz", + "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==", "dependencies": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" }, "engines": { @@ -3874,16 +3858,16 @@ } }, "node_modules/optionator": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", - "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", "dependencies": { - "@aashutoshrathi/word-wrap": "^1.2.3", "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", "levn": "^0.4.1", "prelude-ls": "^1.2.1", - "type-check": "^0.4.0" + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" }, "engines": { "node": ">= 0.8.0" @@ -3983,9 +3967,9 @@ } }, "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==" }, "node_modules/picomatch": { "version": "2.3.1", @@ -4218,9 +4202,9 @@ "integrity": "sha512-EwMqL+ROSlKzatMhT/aqRq7XWWfzlnHynSBSTJh5M2O78mBiPohiSl4Ysls3HOQkkD9y6L22BW0c9bxK2JguwQ==" }, "node_modules/react-is": { - "version": "18.3.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.0.tgz", - "integrity": "sha512-wRiUsea88TjKDc4FBEn+sLvIDesp6brMbGWnJGjew2waAc9evdhja/2LvePc898HJbHw0L+MTWy7NhpnELAvLQ==" + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==" }, "node_modules/react-select": { "version": "5.8.0", @@ -4393,6 +4377,7 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", "dependencies": { "glob": "^7.1.3" }, @@ -4478,9 +4463,9 @@ } }, "node_modules/sass": { - "version": "1.75.0", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.75.0.tgz", - "integrity": "sha512-ShMYi3WkrDWxExyxSZPst4/okE9ts46xZmJDSawJQrnte7M1V9fScVB+uNXOVKRBt0PggHOwoZcn8mYX4trnBw==", + "version": "1.77.2", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.77.2.tgz", + "integrity": "sha512-eb4GZt1C3avsX3heBNlrc7I09nyT00IUuo4eFhAbeXWU2fvA7oXI53SxODVAA+zgZCk9aunAZgO+losjR3fAwA==", "dependencies": { "chokidar": ">=3.0.0 <4.0.0", "immutable": "^4.0.0", @@ -4494,20 +4479,17 @@ } }, "node_modules/scheduler": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.1.tgz", - "integrity": "sha512-5GKS5JGfiah1O38Vfa9srZE4s3wdHbwjlCrvIookrg2FO9aIwKLOJXuJQFlEfNcVSOXuaL2hzDeY20uVXcUtrw==", + "version": "0.23.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", + "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", "dependencies": { "loose-envify": "^1.1.0" } }, "node_modules/semver": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", - "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", - "dependencies": { - "lru-cache": "^6.0.0" - }, + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", + "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", "bin": { "semver": "bin/semver.js" }, @@ -4870,9 +4852,9 @@ } }, "node_modules/tar-fs": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.5.tgz", - "integrity": "sha512-JOgGAmZyMgbqpLwct7ZV8VzkEB6pxXFBVErLtb+XCOqzc6w1xiWKI9GVd6bwk68EX7eJ4DWmfXVmq8K2ziZTGg==", + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.6.tgz", + "integrity": "sha512-iokBDQQkUyeXhgPYaZxmczGPhnhXZ0CmrqI+MOb/WFGS9DW5wnfrLgtjUJBvz50vQ3qfRwJ62QVoCFu8mPVu5w==", "dependencies": { "pump": "^3.0.0", "tar-stream": "^3.1.5" @@ -5128,9 +5110,9 @@ } }, "node_modules/validator": { - "version": "13.11.0", - "resolved": "https://registry.npmjs.org/validator/-/validator-13.11.0.tgz", - "integrity": "sha512-Ii+sehpSfZy+At5nPdnyMhx78fEoPDkR2XW/zimHEL3MyGJQOCQ7WeP20jPYRz7ZCpcKLB21NxuXHF3bxjStBQ==", + "version": "13.12.0", + "resolved": "https://registry.npmjs.org/validator/-/validator-13.12.0.tgz", + "integrity": "sha512-c1Q0mCiPlgdTVVVIJIrBuxNicYE+t/7oKeI9MWLj3fh/uq2Pxh/3eeWbVZ4OcGW1TUf53At0njHw5SMdA3tmMg==", "engines": { "node": ">= 0.10" } @@ -5224,16 +5206,19 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - }, "node_modules/yaml": { "version": "1.10.2", "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", diff --git a/package.json b/package.json index b4dee7df..146d5210 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "eslint-config-next": "13.2.4", "form-data": "^4.0.0", "jwt-decode": "^3.1.2", - "le-coffre-resources": "git@github.com:smart-chain-fr/leCoffre-resources.git#v2.136", + "le-coffre-resources": "git@github.com:smart-chain-fr/leCoffre-resources.git#v2.139", "next": "^14.2.3", "prettier": "^2.8.7", "react": "18.2.0", diff --git a/src/front/Components/DesignSystem/UserFolder/index.tsx b/src/front/Components/DesignSystem/UserFolder/index.tsx index f7f1df6d..6e2b3b3c 100644 --- a/src/front/Components/DesignSystem/UserFolder/index.tsx +++ b/src/front/Components/DesignSystem/UserFolder/index.tsx @@ -18,6 +18,9 @@ import DocumentList from "./DocumentList"; import UserFolderHeader from "./UserFolderHeader"; import { AnchorStatus } from "@Front/Components/Layouts/Folder/FolderInformation"; +import Trash from "@Assets/Icons/trash.svg"; +import Folders from "@Front/Api/LeCoffreApi/Notary/Folders/Folders"; + type IProps = { customer: Customer; animationDelay?: number; @@ -28,6 +31,7 @@ type IProps = { anchorStatus: AnchorStatus; getFolderCallback: () => Promise; }; + type IState = { isOpenDeletionModal: boolean; selectedDocumentToDelete: string; @@ -74,6 +78,7 @@ export default class UserFolder extends React.Component { } return (
+ - )} +
+ +

+ {contact?.first_name} {contact?.last_name} +

+

{contact?.phone_number ?? contact?.cell_phone_number}

+

{contact?.email}

+
+
+ {!folder?.office?.rib_name && ( + //Div to avoid the button to be on the same line as the text + + )} +
); }, [ From 5f51fd07a979aa6dbbeb90bdde85a11e2cc9b5a3 Mon Sep 17 00:00:00 2001 From: Vins Date: Fri, 31 May 2024 15:08:11 +0200 Subject: [PATCH 17/28] Fixed delete folder condition --- .../Components/Layouts/Folder/FolderInformation/index.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/front/Components/Layouts/Folder/FolderInformation/index.tsx b/src/front/Components/Layouts/Folder/FolderInformation/index.tsx index 173836e8..86b5d635 100644 --- a/src/front/Components/Layouts/Folder/FolderInformation/index.tsx +++ b/src/front/Components/Layouts/Folder/FolderInformation/index.tsx @@ -176,7 +176,7 @@ class FolderInformationClass extends BasePage { )} )} - {!this.doesFolderHaveCustomer() && ( + {this.canDeleteFolder() && ( @@ -405,6 +405,10 @@ class FolderInformationClass extends BasePage { return this.props.selectedFolder?.customers!.length > 0; } + private canDeleteFolder(): boolean { + return (this.props.selectedFolder?.customers?.length ?? 0) === 0 && (this.props.selectedFolder?.documents?.length ?? 0) === 0; + } + private openArchivedModal(): void { if (this.everyDocumentValidated() && this.props.isAnchored === AnchorStatus.VERIFIED_ON_CHAIN) { this.setState({ isArchivedModalOpen: true }); From 6dba349c94065fc2a5bd621d65fc8cc77fcd6d52 Mon Sep 17 00:00:00 2001 From: Vins Date: Fri, 31 May 2024 15:16:05 +0200 Subject: [PATCH 18/28] Mooved delete customer icon --- .../UserFolder/UserFolderHeader/index.tsx | 34 +++++++++++++++++++ .../DesignSystem/UserFolder/index.tsx | 24 ------------- 2 files changed, 34 insertions(+), 24 deletions(-) diff --git a/src/front/Components/DesignSystem/UserFolder/UserFolderHeader/index.tsx b/src/front/Components/DesignSystem/UserFolder/UserFolderHeader/index.tsx index 6824c99d..1feab63f 100644 --- a/src/front/Components/DesignSystem/UserFolder/UserFolderHeader/index.tsx +++ b/src/front/Components/DesignSystem/UserFolder/UserFolderHeader/index.tsx @@ -1,4 +1,6 @@ import PenIcon from "@Assets/Icons/pen.svg"; +import Trash from "@Assets/Icons/trash.svg"; + import { OfficeFolder } from "le-coffre-resources/dist/Notary"; import Module from "@Front/Config/Module"; import { Customer } from "le-coffre-resources/dist/Notary"; @@ -10,6 +12,7 @@ import Typography, { ITypo } from "../../Typography"; import WarningBadge from "../../WarningBadge"; import classes from "./classes.module.scss"; import { EDocumentStatus } from "le-coffre-resources/dist/Customer/Document"; +import Folders from "@Front/Api/LeCoffreApi/Notary/Folders/Folders"; type IProps = { customer: Customer; @@ -23,6 +26,9 @@ export default class UserFolderHeader extends React.Component { isArchived: false, }; public override render(): JSX.Element | null { + const redirectCurrent = Module.getInstance() + .get() + .modules.pages.Folder.pages.FolderInformation.props.path.replace("[folderUid]", this.props.folder.uid ?? ""); const redirectPath = Module.getInstance() .get() .modules.pages.Folder.pages.EditClient.props.path.replace("[folderUid]", this.props.folder.uid ?? "") @@ -60,6 +66,14 @@ export default class UserFolderHeader extends React.Component { edit + + delete this.removeCustomer(this.props.customer.uid!)} + /> + )} @@ -73,6 +87,26 @@ export default class UserFolderHeader extends React.Component { return notAskedDocuments.length > 0; } + private async removeCustomer(uid: string) { + try { + //use folder put to remove customer from folder + const query = { + q: { + customers: "true", + }, + }; + const folder = await Folders.getInstance().getByUid(this.props.folder.uid!, query); + if (!folder.customers) return; + const customers = folder.customers.filter((customer) => customer.uid !== uid); + folder.customers = customers; + await Folders.getInstance().put(this.props.folder.uid!, folder); + //redirect on the same page + window.location.reload(); + } catch (e) { + console.error(e); + } + } + private formatPhoneNumber(phoneNumber: string): string { if (!phoneNumber) return ""; phoneNumber = phoneNumber.replace(/ /g, ""); diff --git a/src/front/Components/DesignSystem/UserFolder/index.tsx b/src/front/Components/DesignSystem/UserFolder/index.tsx index 6e2b3b3c..790da0c5 100644 --- a/src/front/Components/DesignSystem/UserFolder/index.tsx +++ b/src/front/Components/DesignSystem/UserFolder/index.tsx @@ -18,9 +18,6 @@ import DocumentList from "./DocumentList"; import UserFolderHeader from "./UserFolderHeader"; import { AnchorStatus } from "@Front/Components/Layouts/Folder/FolderInformation"; -import Trash from "@Assets/Icons/trash.svg"; -import Folders from "@Front/Api/LeCoffreApi/Notary/Folders/Folders"; - type IProps = { customer: Customer; animationDelay?: number; @@ -78,7 +75,6 @@ export default class UserFolder extends React.Component { } return (
- + + +
+ + + + ); + } + + public override async componentDidMount() { + // const note = await Notes.getInstance().getByUid(this.props.noteUid, query); + const folder = await Folders.getInstance().getByUid(this.props.folderUid, { note: true }); + const customer = await Customers.getInstance().getByUid(this.props.customerUid); + + //get the note of the folder that has customer_uid = this.props.customer.uid + // const folderNote = folder.notes?.find((note) => note.customer?.uid === this.props.customerUid); + // this.setState({ note, folder: note.office_folder || null, customer: note.customer || null }); + this.setState({ note: null, folder: folder, customer: customer }); + } + + private async onFormSubmit(e: React.FormEvent | null, values: { [key: string]: string }) { + try { + if (!this.state.folder || !this.state.customer) { + throw new Error("Folder or customer not found"); + } + const note = { + content: values["content"], + office_folder: this.state.folder, + customer: this.state.customer, + }; + + await Notes.getInstance().post(note); + this.props.router.push(this.backwardPath); + } catch (error) { + console.error(error); + } + } +} + +export default function UpdateCustomerNote(props: IProps) { + const router = useRouter(); + let { folderUid, customerUid } = router.query; + + folderUid = folderUid as string; + customerUid = customerUid as string; + + return ; +} diff --git a/src/front/Components/Layouts/Folder/FolderInformation/index.tsx b/src/front/Components/Layouts/Folder/FolderInformation/index.tsx index 86b5d635..097f2d11 100644 --- a/src/front/Components/Layouts/Folder/FolderInformation/index.tsx +++ b/src/front/Components/Layouts/Folder/FolderInformation/index.tsx @@ -489,6 +489,11 @@ export default function FolderInformation(props: IProps) { }, }, folder_anchor: true, + notes: { + include: { + customer: true, + }, + }, }, }; diff --git a/src/front/Components/Layouts/Folder/UpdateCustomerNote/classes.module.scss b/src/front/Components/Layouts/Folder/UpdateCustomerNote/classes.module.scss new file mode 100644 index 00000000..cd3ceba2 --- /dev/null +++ b/src/front/Components/Layouts/Folder/UpdateCustomerNote/classes.module.scss @@ -0,0 +1,56 @@ +@import "@Themes/constants.scss"; + +.root { + display: flex; + flex-direction: column; + min-height: 100%; + align-items: flex-start; + width: fit-content; + + .back-arrow { + margin-bottom: 24px; + } + + .form { + width: 100%; + + .content { + margin-top: 32px; + + >:not(:last-child) { + margin-bottom: 24px; + } + + } + + .button-container { + width: 100%; + display: flex; + text-align: center; + margin-top: 24px; + + .cancel-button { + display: flex; + margin-right: 32px; + } + + @media (max-width: $screen-m) { + display: flex; + flex-direction: column-reverse; + + .cancel-button { + margin-left: 0; + margin-top: 12px; + + >* { + flex: 1; + } + } + + >* { + width: 100%; + } + } + } + } +} \ No newline at end of file diff --git a/src/front/Components/Layouts/Folder/UpdateCustomerNote/index.tsx b/src/front/Components/Layouts/Folder/UpdateCustomerNote/index.tsx new file mode 100644 index 00000000..dde3dabc --- /dev/null +++ b/src/front/Components/Layouts/Folder/UpdateCustomerNote/index.tsx @@ -0,0 +1,109 @@ +import Button, { EButtonVariant } from "@Front/Components/DesignSystem/Button"; +import Form from "@Front/Components/DesignSystem/Form"; +import TextAreaField from "@Front/Components/DesignSystem/Form/TextareaField"; +import Typography, { ITypo } from "@Front/Components/DesignSystem/Typography"; +import BackArrow from "@Front/Components/Elements/BackArrow"; +import DefaultNotaryDashboard from "@Front/Components/LayoutTemplates/DefaultNotaryDashboard"; +import Module from "@Front/Config/Module"; +import Link from "next/link"; +import { NextRouter, useRouter } from "next/router"; + +import BasePage from "../../Base"; +import classes from "./classes.module.scss"; +import Note from "le-coffre-resources/dist/Customer/Note"; +import Notes from "@Front/Api/LeCoffreApi/Customer/Notes/Notes"; + +type IProps = {}; + +type IPropsClass = IProps & { + noteUid: string; + router: NextRouter; +}; + +type IState = { + note: Note | null; + backwardPath: string; +}; +class UpdateCustomerNoteClass extends BasePage { + constructor(props: IPropsClass) { + super(props); + this.state = { + note: null, + backwardPath: "", + }; + this.onFormSubmit = this.onFormSubmit.bind(this); + } + public override render(): JSX.Element { + return ( + +
+
+ +
+ Modifier la note du client + +
+
+ +
+ +
+ + + + +
+
+
+
+ ); + } + + public override async componentDidMount() { + const query = { + q: { + customer: "true", + folder: "true", + }, + }; + const note = await Notes.getInstance().getByUid(this.props.noteUid, query); + // const folder = await Folders.getInstance().getByUid(this.props.folderUid, { note: true }); + //get the note of the folder that has customer_uid = this.props.customer.uid + // const folderNote = folder.notes?.find((note) => note.customer?.uid === this.props.customerUid); + this.setState({ + note, + backwardPath: Module.getInstance() + .get() + .modules.pages.Folder.pages.FolderInformation.props.path.replace("[folderUid]", note.folder?.uid!), + }); + } + + private async onFormSubmit(e: React.FormEvent | null, values: { [key: string]: string }) { + try { + const note = { + content: values["content"], + }; + + await Notes.getInstance().put(this.props.noteUid, note); + this.props.router.push(this.state.backwardPath); + + // await Folders.getInstance().put(this.props.folderUid, values); + // this.props.router.push(this.backwardPath); + } catch (error) { + console.error(error); + } + } +} + +export default function UpdateCustomerNote(props: IProps) { + const router = useRouter(); + let { noteUid } = router.query; + + noteUid = noteUid as string; + + return ; +} diff --git a/src/front/Components/Layouts/FolderArchived/FolderInformation/index.tsx b/src/front/Components/Layouts/FolderArchived/FolderInformation/index.tsx index 9e06a63c..ef018df8 100644 --- a/src/front/Components/Layouts/FolderArchived/FolderInformation/index.tsx +++ b/src/front/Components/Layouts/FolderArchived/FolderInformation/index.tsx @@ -215,6 +215,7 @@ class FolderInformationClass extends BasePage { deed: { include: { deed_type: "true" } }, office: "true", customers: { include: { contact: true } }, + notes: "true", }, }; const folder = await Folders.getInstance().getByUid(this.props.selectedFolderUid, query); diff --git a/src/front/Config/Module/development.json b/src/front/Config/Module/development.json index 224c6033..2e7e5c5c 100644 --- a/src/front/Config/Module/development.json +++ b/src/front/Config/Module/development.json @@ -360,6 +360,29 @@ } } } + }, + "Notes": { + "enabled": true, + "props": { + "path": "/notes", + "labelKey": "notes" + }, + "pages": { + "EditNote": { + "enabled": true, + "props": { + "path": "/notes/[noteUid]/edit", + "labelKey": "edit_note" + } + }, + "CreateNote": { + "enabled": true, + "props": { + "path": "/notes/folder/[folderUid]/customer/[customerUid]/create", + "labelKey": "create_note" + } + } + } } } } diff --git a/src/pages/notes/[noteUid]/edit.tsx b/src/pages/notes/[noteUid]/edit.tsx new file mode 100644 index 00000000..26f5c657 --- /dev/null +++ b/src/pages/notes/[noteUid]/edit.tsx @@ -0,0 +1,5 @@ +import UpdateCustomerNote from "@Front/Components/Layouts/Folder/UpdateCustomerNote"; + +export default function Route() { + return ; +} diff --git a/src/pages/notes/folder/[folderUid]/customer/[customerUid]/create.tsx b/src/pages/notes/folder/[folderUid]/customer/[customerUid]/create.tsx new file mode 100644 index 00000000..9765dea1 --- /dev/null +++ b/src/pages/notes/folder/[folderUid]/customer/[customerUid]/create.tsx @@ -0,0 +1,5 @@ +import CreateCustomerNote from "@Front/Components/Layouts/Folder/CreateCustomerNote"; + +export default function Route() { + return ; +} From 9e43abf7034eebfdc7bcd022e6ade198f54857a9 Mon Sep 17 00:00:00 2001 From: Vins Date: Wed, 5 Jun 2024 09:48:33 +0200 Subject: [PATCH 24/28] Front pages module --- src/front/Config/Module/preprod.json | 23 +++++++++++++++++++++++ src/front/Config/Module/production.json | 23 +++++++++++++++++++++++ src/front/Config/Module/staging.json | 23 +++++++++++++++++++++++ 3 files changed, 69 insertions(+) diff --git a/src/front/Config/Module/preprod.json b/src/front/Config/Module/preprod.json index 224c6033..2e7e5c5c 100644 --- a/src/front/Config/Module/preprod.json +++ b/src/front/Config/Module/preprod.json @@ -360,6 +360,29 @@ } } } + }, + "Notes": { + "enabled": true, + "props": { + "path": "/notes", + "labelKey": "notes" + }, + "pages": { + "EditNote": { + "enabled": true, + "props": { + "path": "/notes/[noteUid]/edit", + "labelKey": "edit_note" + } + }, + "CreateNote": { + "enabled": true, + "props": { + "path": "/notes/folder/[folderUid]/customer/[customerUid]/create", + "labelKey": "create_note" + } + } + } } } } diff --git a/src/front/Config/Module/production.json b/src/front/Config/Module/production.json index 224c6033..2e7e5c5c 100644 --- a/src/front/Config/Module/production.json +++ b/src/front/Config/Module/production.json @@ -360,6 +360,29 @@ } } } + }, + "Notes": { + "enabled": true, + "props": { + "path": "/notes", + "labelKey": "notes" + }, + "pages": { + "EditNote": { + "enabled": true, + "props": { + "path": "/notes/[noteUid]/edit", + "labelKey": "edit_note" + } + }, + "CreateNote": { + "enabled": true, + "props": { + "path": "/notes/folder/[folderUid]/customer/[customerUid]/create", + "labelKey": "create_note" + } + } + } } } } diff --git a/src/front/Config/Module/staging.json b/src/front/Config/Module/staging.json index 224c6033..2e7e5c5c 100644 --- a/src/front/Config/Module/staging.json +++ b/src/front/Config/Module/staging.json @@ -360,6 +360,29 @@ } } } + }, + "Notes": { + "enabled": true, + "props": { + "path": "/notes", + "labelKey": "notes" + }, + "pages": { + "EditNote": { + "enabled": true, + "props": { + "path": "/notes/[noteUid]/edit", + "labelKey": "edit_note" + } + }, + "CreateNote": { + "enabled": true, + "props": { + "path": "/notes/folder/[folderUid]/customer/[customerUid]/create", + "labelKey": "create_note" + } + } + } } } } From 7fa311041d1ad41372655efe532594b27effaaea Mon Sep 17 00:00:00 2001 From: Vins Date: Wed, 5 Jun 2024 10:20:09 +0200 Subject: [PATCH 25/28] Fix create note --- .../Components/Layouts/Folder/CreateCustomerNote/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/front/Components/Layouts/Folder/CreateCustomerNote/index.tsx b/src/front/Components/Layouts/Folder/CreateCustomerNote/index.tsx index 5ef9d77d..f9a71ccd 100644 --- a/src/front/Components/Layouts/Folder/CreateCustomerNote/index.tsx +++ b/src/front/Components/Layouts/Folder/CreateCustomerNote/index.tsx @@ -91,7 +91,7 @@ class CreateCustomerNoteClass extends BasePage { } const note = { content: values["content"], - office_folder: this.state.folder, + folder: this.state.folder, customer: this.state.customer, }; From 5e2d1315dd22ad329a18af9a19fb34674df9589a Mon Sep 17 00:00:00 2001 From: Vins Date: Wed, 5 Jun 2024 23:42:38 +0200 Subject: [PATCH 26/28] Tooltip anchor before download --- .../Folder/ViewDocuments/classes.module.scss | 17 +++++++++++------ .../Layouts/Folder/ViewDocuments/index.tsx | 4 ++++ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/front/Components/Layouts/Folder/ViewDocuments/classes.module.scss b/src/front/Components/Layouts/Folder/ViewDocuments/classes.module.scss index a3576e56..6fa29d2d 100644 --- a/src/front/Components/Layouts/Folder/ViewDocuments/classes.module.scss +++ b/src/front/Components/Layouts/Folder/ViewDocuments/classes.module.scss @@ -16,16 +16,16 @@ justify-content: space-between; align-items: center; - .arrow-container{ + .arrow-container { cursor: pointer; - &[data-disabled="true"]{ + &[data-disabled="true"] { opacity: 0.3; cursor: not-allowed; } } - .file-container{ + .file-container { max-width: 1000px; margin: auto; min-height: 700px; @@ -33,12 +33,17 @@ } } - .footer{ - width: fit-content; + .footer { margin: auto; - .ocr-container{ + .ocr-container { margin-top: 42px; } + + .alert { + margin-top: 24px; + width: 100%; + } + .buttons-container { display: flex; gap: 24px; diff --git a/src/front/Components/Layouts/Folder/ViewDocuments/index.tsx b/src/front/Components/Layouts/Folder/ViewDocuments/index.tsx index d6d36e58..f4ed6804 100644 --- a/src/front/Components/Layouts/Folder/ViewDocuments/index.tsx +++ b/src/front/Components/Layouts/Folder/ViewDocuments/index.tsx @@ -17,6 +17,7 @@ import BasePage from "../../Base"; import classes from "./classes.module.scss"; import Files from "@Front/Api/LeCoffreApi/Notary/Files/Files"; import TextAreaField from "@Front/Components/DesignSystem/Form/TextareaField"; +import MessageBox from "@Front/Components/Elements/MessageBox"; type IProps = {}; type IPropsClass = { @@ -104,6 +105,9 @@ class ViewDocumentsClass extends BasePage { )}
+
+ Veuillez valider le document afin de pouvoir le télécharger. +
{/* {this.state.document?.document_type?.name === "Document d'identité" && (
From 07653d614596debad311d0494639163beaf309b7 Mon Sep 17 00:00:00 2001 From: Vins Date: Wed, 5 Jun 2024 23:45:54 +0200 Subject: [PATCH 27/28] Header fix --- .../DesignSystem/Header/HeaderSubmenu/classes.module.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/front/Components/DesignSystem/Header/HeaderSubmenu/classes.module.scss b/src/front/Components/DesignSystem/Header/HeaderSubmenu/classes.module.scss index e4ac3d3d..c631e11e 100644 --- a/src/front/Components/DesignSystem/Header/HeaderSubmenu/classes.module.scss +++ b/src/front/Components/DesignSystem/Header/HeaderSubmenu/classes.module.scss @@ -35,7 +35,7 @@ left: 0; transform: translateX(-25%); width: 300px; - top: 112px; + top: 84px; display: flex; flex-direction: column; background: white; From a9b74a57166ae5c0ff1b769947d0ea4ab734d8ca Mon Sep 17 00:00:00 2001 From: Vins Date: Wed, 12 Jun 2024 10:02:18 +0200 Subject: [PATCH 28/28] Fixed client dashboard when no notes --- .../Components/Layouts/ClientDashboard/index.tsx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/front/Components/Layouts/ClientDashboard/index.tsx b/src/front/Components/Layouts/ClientDashboard/index.tsx index 186e40da..6f080624 100644 --- a/src/front/Components/Layouts/ClientDashboard/index.tsx +++ b/src/front/Components/Layouts/ClientDashboard/index.tsx @@ -57,8 +57,15 @@ export default function ClientDashboard(props: IProps) { const actualCustomer = folder?.customers?.find((customer) => customer.contact?.email === jwt?.email); if (!actualCustomer) throw new Error("Customer not found"); - const note = folder.notes?.find((note) => note.customer?.uid === actualCustomer.uid); - if (!note) throw new Error("Note not found"); + let note = folder.notes?.find((note) => note.customer?.uid === actualCustomer.uid); + // if (!note) throw new Error("Note not found"); + if (!note) { + note = { + content: "Aucune note", + created_at: new Date(), + updated_at: new Date(), + }; + } const query: IGetDocumentsparams = { where: { depositor: { uid: actualCustomer.uid }, folder_uid: folderUid as string },