feat(events): get range date of calendar
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
3324f4acd2
commit
6e2f7d9e0d
|
@ -43,7 +43,7 @@ module.exports = Self => {
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
ORDER BY type='indefinitely',type='range',type='day';`;
|
ORDER BY type='indefinitely' DESC, type='range' DESC, type='day' DESC;`;
|
||||||
const events = await Self.rawSql(query, [zoneFk, started, ended, started, ended, started, ended]);
|
const events = await Self.rawSql(query, [zoneFk, started, ended, started, ended, started, ended]);
|
||||||
|
|
||||||
query = `
|
query = `
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<vn-zone-calendar
|
<vn-zone-calendar
|
||||||
id="calendar"
|
id="calendar"
|
||||||
|
vn-id="calendar"
|
||||||
data="data"
|
data="data"
|
||||||
on-selection="$ctrl.onSelection($days, $type, $weekday, $events, $exclusions)"
|
on-selection="$ctrl.onSelection($days, $type, $weekday, $events, $exclusions)"
|
||||||
class="vn-w-md">
|
class="vn-w-md">
|
||||||
|
|
|
@ -22,15 +22,17 @@ class Controller extends Section {
|
||||||
|
|
||||||
refresh() {
|
refresh() {
|
||||||
this.$.data = null;
|
this.$.data = null;
|
||||||
let params = {
|
this.$.$applyAsync(() => {
|
||||||
zoneFk: 10,
|
const params = {
|
||||||
started: new Date('2021-10-01'),
|
zoneFk: this.$params.id,
|
||||||
ended: new Date('2022-02-31')
|
started: this.$.calendar.firstDay,
|
||||||
};
|
ended: this.$.calendar.lastDay
|
||||||
|
};
|
||||||
|
|
||||||
this.$http.get(`Zones/getEventsFiltered`, {params}).then(res => {
|
this.$http.get(`Zones/getEventsFiltered`, {params}).then(res => {
|
||||||
let data = res.data;
|
const data = res.data;
|
||||||
this.$.data = data;
|
this.$.data = data;
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue