Skip to content

Commit

Permalink
fix(frontend): only show public-holidays of users location (#212)
Browse files Browse the repository at this point in the history
  • Loading branch information
c0rydoras authored May 24, 2024
1 parent 40aa5a6 commit 1045c6e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions frontend/app/index/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -421,15 +421,14 @@ export default class IndexController extends Controller {
const params = {
from_date: from.format("YYYY-MM-DD"),
to_date: to.format("YYYY-MM-DD"),
user: this.currentUser.user?.id,
};

const absences = yield this.store.query("absence", params);

const publicHolidays = yield this.store.query("public-holiday", {
...params,
// eslint-disable-next-line ember/no-get
location: get(this, "user.activeEmployment.location.id"),
location: this.currentUser.user.activeEmployment.location.get("id"),
});

const disabled = [
Expand Down

0 comments on commit 1045c6e

Please sign in to comment.