Skip to content

Commit

Permalink
Merge branch 'disponibilite-generale' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
fcamblor committed Jul 25, 2021
2 parents 8a5054b + 9cf1b32 commit 4b707f5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
10 changes: 5 additions & 5 deletions src/components/vmd-search.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export class VmdSearchComponent extends LitElement {
}
`
];
@property() public set value (searchRequest: SearchRequest | void) {
@property() public set value (searchRequest: SearchRequest | undefined) {
if (!searchRequest) {
this.currentSelection = undefined
this.currentSearchType = undefined
Expand All @@ -35,12 +35,12 @@ export class VmdSearchComponent extends LitElement {
}
this.currentValue = searchRequest
}
public get value (): SearchRequest | void {
public get value (): SearchRequest | undefined {
return this.currentValue
}
@internalProperty() private currentValue: SearchRequest | void = undefined
@internalProperty() private currentSelection: Commune | Departement | void = undefined
@internalProperty() private currentSearchType: SearchType | void = undefined
@internalProperty() private currentValue: SearchRequest | undefined = undefined
@internalProperty() private currentSelection: Commune | Departement | undefined = undefined
@internalProperty() private currentSearchType: SearchType | undefined = undefined

render() {
return html`
Expand Down
6 changes: 3 additions & 3 deletions src/components/vmd-upcoming-days-selector.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export class VmdUpcomingDaysSelectorComponent extends LitElement {
];

@property() set creneauxQuotidiens(creneauxQuotidiens: RendezVousDuJour[]) {
const {upcomingDays, ..._ } = creneauxQuotidiens.reduce(({upcomingDays, currentGroup, groups}, infosJour, idx) => {
const upcomingDaysResults = creneauxQuotidiens.reduce(({upcomingDays, currentGroup, groups}, infosJour, idx) => {
// For a given time window with more than 3+ consecutive days with 0 available appointments, we may
// consider the 2nd (and every following) day as "hideable" as not very useful to be displayed
// (and hide them)
Expand Down Expand Up @@ -83,7 +83,7 @@ export class VmdUpcomingDaysSelectorComponent extends LitElement {

return {upcomingDays, currentGroup, groups};
}, { upcomingDays: [], currentGroup: undefined, groups: [] } as { upcomingDays: UpcomingDay[], currentGroup: number|undefined, groups: number[] });
this._upcomingDays = upcomingDays;
this._upcomingDays = upcomingDaysResults.upcomingDays;
this.requestUpdate()
}
private _upcomingDays: UpcomingDay[] = [];
Expand All @@ -96,7 +96,7 @@ export class VmdUpcomingDaysSelectorComponent extends LitElement {
render() {
return html`
<ul class="days list-group list-group-horizontal">
${repeat(this._upcomingDays, ud => ud.date, (ud, idx) => {
${repeat(this._upcomingDays, ud => ud.date, ud => {
return html`
${(ud.hidden && ud.firstHiddenFromGroup)?html`
<li class="list-group-item empty selectable">
Expand Down
3 changes: 1 addition & 2 deletions src/views/vmd-rdv.view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,11 @@ import {
searchTypeConfigFor,
searchTypeConfigFromSearch,
SearchTypeConfig,
VACCINE_CATEGORIES,
RendezVousDuJour,
StatsCreneauxLieuxParJour,
countCreneauxFromCreneauxParTag
} from "../state/State";
import {formatDistanceToNow, parseISO, startOfDay} from 'date-fns'
import {formatDistanceToNow, parseISO} from 'date-fns'
import { fr } from 'date-fns/locale'
import {Strings} from "../utils/Strings";
import {DEPARTEMENTS_LIMITROPHES} from "../utils/Departements";
Expand Down

0 comments on commit 4b707f5

Please sign in to comment.