Skip to content
Snippets Groups Projects
Commit f4195f00 authored by Rémi PAILHAREY's avatar Rémi PAILHAREY :fork_knife_plate:
Browse files

Merge branch '344-retours-canary-2-0-1' into 'dev'

Resolve "Retours canary 2.0.1"

See merge request !778
parents 139f4253 7cc6bb42
No related branches found
No related tags found
2 merge requests!778Resolve "Retours canary 2.0.1",!777Update master to V2.0
......@@ -41,6 +41,8 @@
"backoffice",
"barchart",
"CONSO",
"cozycloud",
"dacc",
"Datachart",
"Dataload",
"Dataloads",
......@@ -68,6 +70,7 @@
"grdfgrandlyon",
"Konnected",
"konnector",
"konnectors",
"luxon",
"matomo",
"Matomo",
......
@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;
}
......
......@@ -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;
}
}
......
......@@ -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;
......
......@@ -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]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment