From 3da65f0434d2dc2af3efb962a50b302082c91d53 Mon Sep 17 00:00:00 2001 From: Jeremy DUCOURTHIAL Date: Wed, 18 Jan 2023 21:02:29 +0100 Subject: [PATCH 1/4] =?UTF-8?q?ajout=20s=C3=A9curit=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Dashboard.js | 16 ++++++++++++++-- src/styles/settings.scss | 2 +- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/pages/Dashboard.js b/src/pages/Dashboard.js index 44e3efb..0091d1c 100644 --- a/src/pages/Dashboard.js +++ b/src/pages/Dashboard.js @@ -28,12 +28,24 @@ function Dashboard(){ const apiString = '/Contact/LastAdd3/' + Session.get("idUser"); api.get(apiString).then((response) => { - setInfoContactRecent(response.data); + const data = response.data; + if (data.length > 0){ + setInfoContactRecent(response.data[0]); + } + else{ + setInfoContactRecent(""); + } }); const apiStringKey = '/Sale/KeyNumber/' + Session.get("idUser") + "/" + month + "/" + year; api.get(apiStringKey).then((response) => { - setDataKey(response.data[0]); + const data = response.data; + if (data.length > 0){ + setDataKey(response.data[0]); + } + else{ + setDataKey(""); + } }); const apiStringBestCustomer = '/Sale/BestCustomer/' + Session.get("idUser"); diff --git a/src/styles/settings.scss b/src/styles/settings.scss index 01c4180..18ac002 100644 --- a/src/styles/settings.scss +++ b/src/styles/settings.scss @@ -11,7 +11,7 @@ $alice-blue: #e8eef2ff; $blue-munsell: #0088a3ff; $malachite: #32e875ff; $rufous: #9b2915ff; -$xiketic: #020114ff; +$xiketic: #020114; $beau-blue: #b1c5d2; From cc4722a57b6f0bcf6d27055e696787a3718cd565 Mon Sep 17 00:00:00 2001 From: Maxence LANONE Date: Fri, 10 Mar 2023 18:35:56 +0100 Subject: [PATCH 2/4] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 8c44310..f6231f2 100644 --- a/.drone.yml +++ b/.drone.yml @@ -9,5 +9,4 @@ steps: - name: start image: node commands: - - npm install - - find -name "*.js"| grep -v "node_modules" | xargs node -c + - npm run build \ No newline at end of file From fffad4d9d11dde10bf4726173b7df71acda53b16 Mon Sep 17 00:00:00 2001 From: Maxence LANONE Date: Fri, 10 Mar 2023 20:08:22 +0100 Subject: [PATCH 3/4] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index f6231f2..0c771d1 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,5 +1,7 @@ kind: pipeline -name: JTT_CRM_Pipeline +type: docker +name: default + trigger: event: @@ -9,4 +11,5 @@ steps: - name: start image: node commands: + - cd src/ - npm run build \ No newline at end of file From 87fd7d81f0118837cb7b902b755462f727e3c8e3 Mon Sep 17 00:00:00 2001 From: Maxence LANONE Date: Fri, 10 Mar 2023 20:09:25 +0100 Subject: [PATCH 4/4] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.drone.yml b/.drone.yml index 0c771d1..af6d47c 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,15 +1,15 @@ kind: pipeline -type: docker -name: default - +type: docker +name: default trigger: event: - push + steps: -- name: start - image: node - commands: - - cd src/ - - npm run build \ No newline at end of file + - name: build + image: node:alpine + commands: + - cd src/ + - npm run build \ No newline at end of file