diff --git a/.vscode/settings.json b/.vscode/settings.json index d18fa1229769668f170360c3e9c1a885f7ecaa89..ce5597bb6c78fa4bf35605a1c3a43cc9609bae17 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -41,6 +41,8 @@ "backoffice", "barchart", "CONSO", + "cozycloud", + "dacc", "Datachart", "Dataload", "Dataloads", @@ -68,6 +70,7 @@ "grdfgrandlyon", "Konnected", "konnector", + "konnectors", "luxon", "matomo", "Matomo", diff --git a/src/components/Challenge/challengeCard.scss b/src/components/Challenge/challengeCard.scss index 17ca524a3559185768f0969a217df639a0a3bfb8..8088fe285dec927eb17a824e23342866fcc29239 100644 --- a/src/components/Challenge/challengeCard.scss +++ b/src/components/Challenge/challengeCard.scss @@ -1,7 +1,7 @@ @import '../../styles/base/color'; .slide { - margin: 1rem 1rem 1rem 0; + margin: 0 1rem 0 0; box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.55); border-radius: 4px; transition: all 300ms ease; @@ -19,7 +19,7 @@ width: 100%; height: inherit; box-sizing: border-box; - padding: 5% 10%; + padding: 1rem; transition: all 300ms ease; border-radius: 4px; } diff --git a/src/components/Challenge/challengeCardDone.scss b/src/components/Challenge/challengeCardDone.scss index 2a31e78e55fb7db7e719b575e83b98d1848258e7..1b7fd3ba8d9e505f853c63afce38cf8ecf4a6718 100644 --- a/src/components/Challenge/challengeCardDone.scss +++ b/src/components/Challenge/challengeCardDone.scss @@ -8,16 +8,14 @@ display: flex; flex-direction: column; justify-content: space-between; + gap: 1rem; align-items: center; - padding: 5% !important; .challengeName { - margin: 0.5rem 0rem; text-align: center; } .iconResult { display: flex; - margin: 1rem 0rem; @media all and(max-height: 700px) { width: 55%; margin: auto; @@ -45,6 +43,7 @@ } .review-btn { padding: 0.625rem; + margin: 0; border: 1px solid $grey-bright; } } diff --git a/src/components/Challenge/challengeCardOnGoing.scss b/src/components/Challenge/challengeCardOnGoing.scss index d86d01acafe11d67fc9f1df36201c91f94ce1c19..ce9b54f8b2aab96d482f758dffae3f82c2d7fff2 100644 --- a/src/components/Challenge/challengeCardOnGoing.scss +++ b/src/components/Challenge/challengeCardOnGoing.scss @@ -13,6 +13,7 @@ display: flex; flex-direction: column; justify-content: center; + gap: 1rem; } .titleBlock { position: absolute; @@ -33,8 +34,7 @@ background: $grey-linear-gradient-background; height: 24%; max-height: 90px; - margin: 0.5rem 0; - padding: 8%; + padding: 1rem; box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.55); border-radius: 4px; color: $grey-bright; diff --git a/src/services/queryRunner.service.ts b/src/services/queryRunner.service.ts index 5c5e91866ca356039084959118180b298aced9f9..044708f409d169f07a339ea2774a9e17ec241121 100644 --- a/src/services/queryRunner.service.ts +++ b/src/services/queryRunner.service.ts @@ -106,9 +106,13 @@ export default class QueryRunner { return result } - private filterDataList(data: any, timePeriod: TimePeriod) { + private filterDataList( + data: any, + timePeriod: TimePeriod, + timeStep: TimeStep + ) { // increase timeperiod range because the last data for a day is actually stored the next day at 00:00 - if (timePeriod.endDate.day === timePeriod.startDate.day) { + if (timeStep === TimeStep.HALF_AN_HOUR) { timePeriod.startDate = timePeriod.startDate.plus({ minutes: 30 }) timePeriod.endDate = timePeriod.endDate.plus({ minutes: 30 }) } @@ -332,7 +336,7 @@ export default class QueryRunner { const result = await this.fetchData(query) if (result?.data) { - const filteredResult = this.filterDataList(result, timePeriod) + const filteredResult = this.filterDataList(result, timePeriod, timeStep) const mappedResult: Dataload[] = this.mapDataList( filteredResult, timeStep @@ -391,7 +395,11 @@ export default class QueryRunner { ) } if (result?.data) { - const filteredResult = this.filterDataList(result, maxTimePeriod) + const filteredResult = this.filterDataList( + result, + maxTimePeriod, + timeStep + ) const mappedResult = this.mapDataList(filteredResult, timeStep) if (withDate) { return mappedResult && mappedResult[0] && mappedResult[0]