@@ -297,39 +297,7 @@ class FilterStore implements IFilterStore {
297297 @computed get isValidWhat ( ) {
298298 return this . getWhatStore ( ) . isValidWhat ;
299299 }
300-
301- // ///////////////////////////////////////////////////////////////////////////////////////////////
302- // What Vehicle
303- // ///////////////////////////////////////////////////////////////////////////////////////////////
304-
305- get injTypes ( ) {
306- return this . vehicleStore . injTypes ;
307- }
308-
309- updateInjuerdType = ( aType : number , val : boolean ) => {
310- this . vehicleStore . updateInjuerdType ( aType , val ) ;
311- }
312-
313- get vehicleType ( ) {
314- return this . vehicleStore . vehicleType ;
315- }
316-
317- updateVehicleType = ( aType : number , val : boolean ) => {
318- this . vehicleStore . updateVehicleType ( aType , val ) ;
319- }
320-
321- get involvedVehicle ( ) {
322- return this . vehicleStore . involvedVehicle ;
323- }
324-
325- setInvolvedVehicle = ( aType : number , val : boolean ) => {
326- this . vehicleStore . setInvolvedVehicle ( aType , val ) ;
327- }
328-
329- @computed get isValidWhatVehicle ( ) {
330- return this . vehicleStore . isValidWhatVehicle ;
331- }
332-
300+
333301 // ///////////////////////////////////////////////////////////////////////////////////////////////
334302 // What Road (delegated to RoadFilterStore)
335303 // ///////////////////////////////////////////////////////////////////////////////////////////////
@@ -438,7 +406,7 @@ class FilterStore implements IFilterStore {
438406
439407 @computed get isValidAllFilters ( ) {
440408 const res = this . severityStore . isValidSeverity && this . timeStore . isValidWhen && this . isValidWho
441- && this . isValidWhere && this . isValidWhat && this . isValidWhatVehicle && this . isValidWhatRoad ;
409+ && this . isValidWhere && this . isValidWhat && this . vehicleStore . isValidWhatVehicle && this . isValidWhatRoad ;
442410 return res ;
443411 }
444412
@@ -729,13 +697,13 @@ class FilterStore implements IFilterStore {
729697 query += this . streets . getFilter ( ) ;
730698 query += this . roads . getFilter ( ) ;
731699 query += this . roadSegment . getFilter ( ) ;
732- query += this . injTypes . getFilter ( ) ;
700+ query += this . vehicleStore . injTypes . getFilter ( ) ;
733701 query += this . genderTypes . getFilter ( ) ;
734702 query += this . ageTypes . getFilter ( ) ;
735703 query += this . populationTypes . getFilter ( ) ;
736704 query += this . accidentType . getFilter ( ) ;
737- query += this . vehicleType . getFilter ( ) ;
738- query += this . involvedVehicle . getFilter ( ) ;
705+ query += this . vehicleStore . vehicleType . getFilter ( ) ;
706+ query += this . vehicleStore . involvedVehicle . getFilter ( ) ;
739707 query += this . locationAccuracy . getFilter ( ) ;
740708 query += this . roadTypes . getFilter ( ) ;
741709 query += this . speedLimit . getFilter ( ) ;
@@ -754,7 +722,7 @@ class FilterStore implements IFilterStore {
754722 setFiltersText = ( ignoreIfAll : boolean ) => {
755723 this . timeStore . startYear . setText ( ) ;
756724 this . timeStore . endYear . setText ( ) ;
757- this . injTypes . setText ( ignoreIfAll ) ;
725+ this . vehicleStore . injTypes . setText ( ignoreIfAll ) ;
758726 this . timeStore . dayNight . setText ( ignoreIfAll ) ;
759727 this . genderTypes . setText ( ignoreIfAll ) ;
760728 this . ageTypes . setText ( ignoreIfAll ) ;
@@ -767,8 +735,8 @@ class FilterStore implements IFilterStore {
767735 this . roads . setText ( ) ;
768736 this . cityPopSizeRange . setText ( ) ;
769737 this . accidentType . setText ( ignoreIfAll ) ;
770- this . vehicleType . setText ( ignoreIfAll ) ;
771- this . involvedVehicle . setText ( ignoreIfAll ) ;
738+ this . vehicleStore . vehicleType . setText ( ignoreIfAll ) ;
739+ this . vehicleStore . involvedVehicle . setText ( ignoreIfAll ) ;
772740 }
773741
774742 /**
@@ -783,7 +751,7 @@ class FilterStore implements IFilterStore {
783751 this . timeStore . endYear . setBrowserQueryString ( params , false ) ;
784752 this . severityStore . injurySeverity . setBrowserQueryString ( params , false ) ;
785753 this . roadTypes . setBrowserQueryString ( params ) ;
786- this . injTypes . setBrowserQueryString ( params ) ;
754+ this . vehicleStore . injTypes . setBrowserQueryString ( params ) ;
787755 this . genderTypes . setBrowserQueryString ( params ) ;
788756 this . ageTypes . setBrowserQueryString ( params ) ;
789757 this . populationTypes . setBrowserQueryString ( params ) ;
@@ -792,8 +760,8 @@ class FilterStore implements IFilterStore {
792760 this . roads . setBrowserQueryString ( params ) ;
793761 this . locationAccuracy . setBrowserQueryString ( params ) ;
794762 this . accidentType . setBrowserQueryString ( params ) ;
795- this . vehicleType . setBrowserQueryString ( params ) ;
796- this . involvedVehicle . setBrowserQueryString ( params ) ;
763+ this . vehicleStore . vehicleType . setBrowserQueryString ( params ) ;
764+ this . vehicleStore . involvedVehicle . setBrowserQueryString ( params ) ;
797765 this . speedLimit . setBrowserQueryString ( params ) ;
798766 this . roadWidth . setBrowserQueryString ( params ) ;
799767 this . separator . setBrowserQueryString ( params ) ;
@@ -824,13 +792,13 @@ class FilterStore implements IFilterStore {
824792 this . setRoads ( roads ) ;
825793 this . locationAccuracy . setValuesByQuery ( params ) ;
826794 this . roadTypes . setValuesByQuery ( params ) ;
827- this . injTypes . setValuesByQuery ( params ) ;
795+ this . vehicleStore . injTypes . setValuesByQuery ( params ) ;
828796 this . genderTypes . setValuesByQuery ( params ) ;
829797 this . ageTypes . setValuesByQuery ( params ) ;
830798 this . populationTypes . setValuesByQuery ( params ) ;
831799 this . accidentType . setValuesByQuery ( params ) ;
832- this . vehicleType . setValuesByQuery ( params ) ;
833- this . involvedVehicle . setValuesByQuery ( params ) ;
800+ this . vehicleStore . vehicleType . setValuesByQuery ( params ) ;
801+ this . vehicleStore . involvedVehicle . setValuesByQuery ( params ) ;
834802 this . speedLimit . setValuesByQuery ( params ) ;
835803 this . roadWidth . setValuesByQuery ( params ) ;
836804 this . separator . setValuesByQuery ( params ) ;
@@ -957,4 +925,4 @@ class FilterStore implements IFilterStore {
957925 }
958926}
959927
960- export default FilterStore ;
928+ export default FilterStore ;
0 commit comments