Changing priorities of courts
This commit is contained in:
parent
696aa590ab
commit
d4eb34057c
2 changed files with 4 additions and 4 deletions
|
|
@ -68,8 +68,8 @@ const CourtSlotToNumber: Record<CourtSlot, number> = {
|
||||||
// Lower is better
|
// Lower is better
|
||||||
const CourtRank: Record<CourtSlot, number> = {
|
const CourtRank: Record<CourtSlot, number> = {
|
||||||
[CourtSlot.One]: 2,
|
[CourtSlot.One]: 2,
|
||||||
[CourtSlot.Two]: 1,
|
[CourtSlot.Two]: 0,
|
||||||
[CourtSlot.Three]: 0,
|
[CourtSlot.Three]: 1, // team at squash city has this pre-booked at 19.15 on Tuesday :sad:
|
||||||
[CourtSlot.Four]: 0,
|
[CourtSlot.Four]: 0,
|
||||||
[CourtSlot.Five]: 99, // shitty
|
[CourtSlot.Five]: 99, // shitty
|
||||||
[CourtSlot.Six]: 99, // shitty
|
[CourtSlot.Six]: 99, // shitty
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ describe('baanreserveren.service', () => {
|
||||||
describe('performSpeedyReservation', () => {
|
describe('performSpeedyReservation', () => {
|
||||||
it.each([
|
it.each([
|
||||||
[18, 15, CourtSlot.Seven, CourtSlot.Six],
|
[18, 15, CourtSlot.Seven, CourtSlot.Six],
|
||||||
[18, 30, CourtSlot.Three, CourtSlot.One],
|
[18, 30, CourtSlot.Two, CourtSlot.Four],
|
||||||
[18, 45, CourtSlot.Twelve, CourtSlot.Thirteen],
|
[18, 45, CourtSlot.Twelve, CourtSlot.Thirteen],
|
||||||
])(
|
])(
|
||||||
'should try highest ranked court first',
|
'should try highest ranked court first',
|
||||||
|
|
@ -90,7 +90,7 @@ describe('baanreserveren.service', () => {
|
||||||
|
|
||||||
it.each([
|
it.each([
|
||||||
[18, 15, CourtSlot.Seven, CourtSlot.Eight],
|
[18, 15, CourtSlot.Seven, CourtSlot.Eight],
|
||||||
[18, 30, CourtSlot.Three, CourtSlot.Four],
|
[18, 30, CourtSlot.Two, CourtSlot.Four],
|
||||||
[18, 45, CourtSlot.Twelve, CourtSlot.Thirteen],
|
[18, 45, CourtSlot.Twelve, CourtSlot.Thirteen],
|
||||||
])(
|
])(
|
||||||
'should try backup if first rank is taken',
|
'should try backup if first rank is taken',
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue