Skip to content

Commit

Permalink
Merge pull request #172 from CropWatchDevelopment/develop
Browse files Browse the repository at this point in the history
suboptimal fix but working
  • Loading branch information
CropWatchDevelopment authored Oct 1, 2024
2 parents 806a903 + 07b5007 commit def3faa
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/lib/components/ui/Sensors/CW_TRAFFIC/CW_TRAFFIC.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,18 @@
const tempChartConfig = getChartConfig(people_count, bicycle_count, car_count);
let value = {
from: moment.utc().utcOffset('+0900').toDate(),
to: moment.utc().utcOffset('+0900').toDate(),
from: moment.utc().utcOffset('+0900').startOf('month').toDate(),
to: moment.utc().utcOffset('+0900').endOf('month').toDate(),
periodType: PeriodType.Day
};
let plugins = [TimeGrid];
let options = {
view: 'dayGridMonth',
date: value.from,
events: [
],
events: [],
prev: () => {
debugger;
},
locale: 'ja-jp',
};
Expand All @@ -49,7 +50,7 @@
const loadCountsForCalendar = async () => {
fetch(
`/api/v1/devices/${$page.params.dev_eui}/data?firstDataDate=${moment.utc().utcOffset('+0000').startOf('month').toDate()}&lastDataDate=${moment.utc().utcOffset('+0000').toDate()}`
`/api/v1/devices/${$page.params.dev_eui}/data?firstDataDate=${moment.utc(value.from).utcOffset('+0000').startOf('month').toDate()}&lastDataDate=${moment.utc(value.to).utcOffset('+0000').toDate()}`
)
.then((res) => res.json())
.then((data) => {
Expand Down

0 comments on commit def3faa

Please sign in to comment.