Skip to content

Commit

Permalink
default dates 2019-2023
Browse files Browse the repository at this point in the history
  • Loading branch information
citizen-dror committed Feb 24, 2024
1 parent 210adf9 commit a8b89c9
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 14 deletions.
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src/lng/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
"2019": "2019",
"2020": "2020",
"2021": "2021",
"2022": "2022",
"2023": "2023",
"2024": "2024",
"Month": "Month",
"Where": "Where",
"LocationAccuracy": "Location Accuracy",
Expand Down
3 changes: 3 additions & 0 deletions src/lng/he/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
"2019": "2019",
"2020": "2020",
"2021": "2021",
"2022": "2022",
"2023": "2023",
"2024": "2024",
"Month": "חודש",
"Where": "איפה",
"LocationAccuracy": "דיוק מיקום",
Expand Down
10 changes: 5 additions & 5 deletions src/stores/ColumnFilterCombo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export class ColumnFilterComboValText extends ColumnFilterCombo {
}
}

const years: string[] = ['2015', '2016', '2017', '2018', '2019','2020','2021'];
const years: string[] = ['2015', '2016', '2017', '2018', '2019','2020','2021','2022','2023',];
const CITY_POP_SIZE_ALL = '{"min":-1,"max":-1}';
const cityPopSizeArr = [
{ val: '{"min":-1,"max":-1}', text: 'all' },
Expand All @@ -135,13 +135,13 @@ const cityPopSizeArr = [
{ val: '{"min":0,"max":10000}', text: '0-10K' },
];

export const initStartYear = () => {
const col: ColumnFilterCombo = new ColumnFilterCombo('FromYear', 'sy', -1, years, 2016);
export const initStartYear = (year :number) => {
const col: ColumnFilterCombo = new ColumnFilterCombo('FromYear', 'sy', -1, years, year);
return col;
};

export const initEndYear = () => {
const col: ColumnFilterCombo = new ColumnFilterCombo('ToYear', 'ey', -1, years, 2021);
export const initEndYear = (year :number) => {
const col: ColumnFilterCombo = new ColumnFilterCombo('ToYear', 'ey', -1, years, year);
return col;
};

Expand Down
6 changes: 3 additions & 3 deletions src/stores/FilterStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
import { IColumnFilter } from './ColumnFilterCheckBoxList';
import * as FC from './ColumnFilterCheckBoxList';
import * as FilterUtils from '../utils/FilterUtils';
import { ColumnFilterArray, IColumnFilterArray } from './ColumnFilterArray';
import { ColumnFilterArray } from './ColumnFilterArray';
import { ColumnFilterCombo, initStartYear, initEndYear, initCityPopSize } from './ColumnFilterCombo';
import { IFilterChecker } from './FilterChecker';
import GroupBy, { initGroupMap } from './GroupBy';
Expand Down Expand Up @@ -35,8 +35,8 @@ export default class FilterStore {
this.injurySeverity = FC.initInjurySeverity();
this.setCasualtiesNames(this.injurySeverity);
// when
this.startYear = initStartYear();
this.endYear = initEndYear();
this.startYear = initStartYear(2019);
this.endYear = initEndYear(2023);
this.dayNight = FC.initDayNight();
// where
this.locationAccuracy = FC.initLocationAccuracy();
Expand Down

0 comments on commit a8b89c9

Please sign in to comment.