Skip to content

Commit 0ef66df

Browse files
committedSep 3, 2022
#282 Remove unused code
1 parent a76215c commit 0ef66df

File tree

1 file changed

+0
-39
lines changed

1 file changed

+0
-39
lines changed
 

‎src/state/State.ts

-39
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,6 @@ import { Memoize } from 'typescript-memoize'
44
import {ArrayBuilder} from "../utils/Arrays";
55
import {RemoteConfig} from "../utils/RemoteConfig";
66

7-
export type CodeTrancheAge = 'plus75ans';
8-
export type TrancheAge = {
9-
codeTrancheAge: CodeTrancheAge;
10-
libelle: string;
11-
};
12-
export const TRANCHES_AGE: Map<CodeTrancheAge, TrancheAge> = new Map([
13-
['plus75ans', { codeTrancheAge: 'plus75ans', libelle: "Plus de 75 ans" }]
14-
]);
157

168

179
export type SearchRequest = SearchRequest.ByCommune | SearchRequest.ByDepartement
@@ -107,15 +99,10 @@ export type ISODateString = string
10799
export type WeekDay = "lundi"|"mardi"|"mercredi"|"jeudi"|"vendredi"|"samedi"|"dimanche"
108100
export type BusinessHours = Record<WeekDay,string>;
109101
export type VaccineType = "AstraZeneca"|"Janssen"|"Pfizer-BioNTech"|"Moderna"|"ARNm";
110-
export type AppointmentPerVaccine = {
111-
vaccine_type: VaccineType;
112-
appointments: number;
113-
};
114102
export type AppointmentSchedule = {
115103
name: string;
116104
from: string; // Should be better to have ISODateString here
117105
to: string; // Should be better to have ISODateString here
118-
// appointments_per_vaccine: AppointmentPerVaccine[];
119106
total: number;
120107
};
121108
export type Lieu = {
@@ -195,9 +182,6 @@ export type StatsCreneauxLieuxParJour = {
195182
export function countCreneauxFromCreneauxParTag(statsCreneauxQuotidiensParTag: StatsCreneauxQuotidienParTag[], tag: TagCreneau): number {
196183
return statsCreneauxQuotidiensParTag.find(cpt => cpt.tag===tag)?.creneaux || 0;
197184
}
198-
export function countCreneauxFromStatsCreneauxLieux(statsCreneauxLieuxParJour: StatsCreneauxLieuxParJour, tag: TagCreneau) {
199-
return statsCreneauxLieuxParJour.statsCreneauxParLieu.reduce((total, lieu) => total + countCreneauxFromCreneauxParTag(lieu.statsCreneauxParTag, tag), 0);
200-
}
201185
export type StatsCreneauxLieuxParJour_JSON = {
202186
date: string; // "2021-05-23"
203187
total: number;
@@ -268,7 +252,6 @@ export type StatsLieu = {
268252
global: StatLieuGlobale;
269253
}
270254

271-
export type CommunesParAutocomplete = Map<string, Commune[]>;
272255
export interface Commune {
273256
code: string;
274257
codePostal: string;
@@ -335,28 +318,6 @@ const SEARCH_TYPE_CONFIGS: {[type in SearchType]: SearchTypeConfig & {type: type
335318
searchResultsByCity: 'search_results_by_city'
336319
}
337320
},
338-
/*
339-
'18_55': {
340-
type: '18_55',
341-
tagCreneau: "preco18_55",
342-
cardAppointmentsExtractor: (lieu, daySelectorDisponible, creneauxParLieux) => {
343-
if(daySelectorDisponible) {
344-
return creneauxParLieux.find(cpl => cpl.lieu === lieu.internal_id)?.creneaux || 0
345-
}
346-
throw new Error("We're not supposed to call cardAppointmentsExtractor() on 18_55 without day selector !")
347-
},
348-
lieuConsidereCommeDisponible: (lieu, creneauxParLieu) => lieu.appointment_by_phone_only || (creneauxParLieu?.creneaux || 0) > 0,
349-
pathParam: '18_55',
350-
standardTabSelected: true,
351-
excludeAppointmentByPhoneOnly: false,
352-
jourSelectionnable: true,
353-
theme: 'standard',
354-
analytics: {
355-
searchResultsByDepartement: 'search_results_by_department_18_55',
356-
searchResultsByCity: 'search_results_by_city_18_55'
357-
}
358-
},
359-
*/
360321
'dose_rappel': {
361322
type: 'dose_rappel',
362323
tagCreneau: 'third_dose',

0 commit comments

Comments
 (0)