-
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.
Add option for holiday inclusion/exclusion (#84)
* add holidays API endpoint * create placeholder HolidayOptions class * send names too * fetch holidays once from data store * create three-way holiday logic + form * pass options through to query and results * use holiday dates in hoursPossible counts * field has been added * note change in readme
- Loading branch information
1 parent
48d1cf9
commit d8f9a50
Showing
7 changed files
with
156 additions
and
20 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
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
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,17 @@ | ||
import { Factor } from './factor.js' | ||
|
||
export class HolidayOption extends Factor { | ||
#includeHolidays | ||
#dataContext | ||
constructor(dataContext,includeHolidays){ | ||
super(dataContext) | ||
// store this here too to actually access the holiday data | ||
this.#dataContext = dataContext | ||
// selection for whether to include holidays | ||
this.#includeHolidays = includeHolidays | ||
} | ||
get holidaysIncluded(){ return this.#includeHolidays } | ||
get holidays(){ | ||
return this.#dataContext.holidays | ||
} | ||
} |
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