diff --git a/machines/web01/crabfit/packages/crabfit-frontend/07-colormap.patch b/machines/web01/crabfit/packages/crabfit-frontend/07-colormap.patch new file mode 100644 index 0000000..4eee47c --- /dev/null +++ b/machines/web01/crabfit/packages/crabfit-frontend/07-colormap.patch @@ -0,0 +1,15 @@ +diff --git a/src/utils/calculateAvailability.ts b/src/utils/calculateAvailability.ts +index 67286f35..4a744672 100644 +--- a/src/utils/calculateAvailability.ts ++++ b/src/utils/calculateAvailability.ts +@@ -23,8 +23,8 @@ interface AvailabilityInfo { + * group availability for each date passed in. + */ + export const calculateAvailability = (dates: string[], people: Person[]): AvailabilityInfo => { +- let min = 0 +- let max = people.length ++ let min = people.length ++ let max = 0 + + const availabilities: Availability[] = dates.map(date => { + const names = people.flatMap(p => p.availability.some(d => d === date) ? [p.name] : []) diff --git a/machines/web01/crabfit/packages/crabfit-frontend/default.nix b/machines/web01/crabfit/packages/crabfit-frontend/default.nix index d89830e..a2280ff 100644 --- a/machines/web01/crabfit/packages/crabfit-frontend/default.nix +++ b/machines/web01/crabfit/packages/crabfit-frontend/default.nix @@ -32,6 +32,7 @@ stdenv.mkDerivation ( ./04-frontend_url.patch ./05-dgnum.patch ./06-download.patch + ./07-colormap.patch ]; offlineCache = fetchYarnDeps {