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]);
|
||||
|
||||
query = `
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<vn-zone-calendar
|
||||
id="calendar"
|
||||
vn-id="calendar"
|
||||
data="data"
|
||||
on-selection="$ctrl.onSelection($days, $type, $weekday, $events, $exclusions)"
|
||||
class="vn-w-md">
|
||||
|
|
|
@ -22,15 +22,17 @@ class Controller extends Section {
|
|||
|
||||
refresh() {
|
||||
this.$.data = null;
|
||||
let params = {
|
||||
zoneFk: 10,
|
||||
started: new Date('2021-10-01'),
|
||||
ended: new Date('2022-02-31')
|
||||
};
|
||||
this.$.$applyAsync(() => {
|
||||
const params = {
|
||||
zoneFk: this.$params.id,
|
||||
started: this.$.calendar.firstDay,
|
||||
ended: this.$.calendar.lastDay
|
||||
};
|
||||
|
||||
this.$http.get(`Zones/getEventsFiltered`, {params}).then(res => {
|
||||
let data = res.data;
|
||||
this.$.data = data;
|
||||
this.$http.get(`Zones/getEventsFiltered`, {params}).then(res => {
|
||||
const data = res.data;
|
||||
this.$.data = data;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue