-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
77a1d8f
commit 18e7c02
Showing
7 changed files
with
49 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: CI | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [18.x, 20.x] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Run ESLint | ||
run: npm run lint:check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
module.exports = { | ||
presets: [ | ||
'@vue/cli-plugin-babel/preset' | ||
] | ||
} | ||
presets: ["@vue/cli-plugin-babel/preset"], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,6 @@ class BookingManager { | |
init() { | ||
console.log("Initializing Booking Manager Integration."); | ||
|
||
|
||
this.addLibScripts([ | ||
"https://cdn.jsdelivr.net/npm/[email protected]/index.global.min.js", | ||
"https://cdn.jsdelivr.net/npm/@fullcalendar/[email protected]/locales-all.global.min.js", | ||
|
@@ -210,9 +209,12 @@ class BookingManager { | |
|
||
for (let i = 0; i < calendarEls.length; i++) { | ||
const calendarEl = calendarEls[i]; | ||
const initialView = calendarEl.getAttribute("data-view") || "dayGridMonth"; | ||
const initialView = | ||
calendarEl.getAttribute("data-view") || "dayGridMonth"; | ||
|
||
console.log(`Binding data to element with class bm-calendar and initial view ${initialView}`); | ||
console.log( | ||
`Binding data to element with class bm-calendar and initial view ${initialView}` | ||
); | ||
|
||
this._fetchEvents().then((events) => { | ||
this._initCalendar(calendarEl, initialView, events); | ||
|
@@ -226,14 +228,19 @@ class BookingManager { | |
* The initial view of the calendar is determined by the "data-view" attribute of the element. If no "data-view" attribute is present, the default view is "dayGridMonth". | ||
*/ | ||
initializeOccupancyCalendars() { | ||
const calendarEls = document.getElementsByClassName("bm-occupancy-calendar"); | ||
const calendarEls = document.getElementsByClassName( | ||
"bm-occupancy-calendar" | ||
); | ||
|
||
for ( let i = 0; i< calendarEls.length; i++ ) { | ||
for (let i = 0; i < calendarEls.length; i++) { | ||
const calendarEl = calendarEls[i]; | ||
const bookableIds = calendarEl.getAttribute("data-id")?.split(","); | ||
const initialView = calendarEl.getAttribute("data-view") || "dayGridMonth"; | ||
const initialView = | ||
calendarEl.getAttribute("data-view") || "dayGridMonth"; | ||
|
||
console.log(`Binding data to element with class bm-occupancy-calendar and initial view ${initialView}`); | ||
console.log( | ||
`Binding data to element with class bm-occupancy-calendar and initial view ${initialView}` | ||
); | ||
|
||
this._fetchOccupancies(bookableIds).then((occupancy) => { | ||
this._initCalendar(calendarEl, initialView, occupancy); | ||
|
@@ -301,7 +308,7 @@ class BookingManager { | |
.then(function (response) { | ||
return response.text(); | ||
}) | ||
.then(function (text) { | ||
.then(function () { | ||
console.log("Signout successful"); | ||
}) | ||
.catch(function (err) { | ||
|
@@ -471,7 +478,7 @@ class BookingManager { | |
try { | ||
const response = await fetch(fetchUrl); | ||
const apiResponse = await response.json(); | ||
return apiResponse.map(event => ({ | ||
return apiResponse.map((event) => ({ | ||
title: event.information.name, | ||
start: `${event.information.startDate}T${event.information.startTime}`, | ||
end: `${event.information.endDate}T${event.information.endTime}`, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
module.exports = { | ||
devServer: { | ||
allowedHosts: 'all' | ||
allowedHosts: "all", | ||
}, | ||
lintOnSave: false, | ||
transpileDependencies: [ | ||
'vuetify' | ||
] | ||
} | ||
transpileDependencies: ["vuetify"], | ||
}; |