Skip to content

Commit

Permalink
Merge Clean-up
Browse files Browse the repository at this point in the history
  • Loading branch information
artisticlight committed Jul 25, 2024
1 parent 9e853b1 commit 6a74a2e
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
{{ 'EVENT_SEARCH' | translate }}
</ng-container>

@if(selectedSearchType === searchTypes.TIMESERIES) {
{{ 'TIMESERIES_SEARCH' | translate }}
@if(selectedSearchType === searchTypes.DISPLACEMENT) {
{{ 'DISPLACEMENT_SEARCH' | translate }}
}
</div>
</div>
Expand Down Expand Up @@ -66,7 +66,7 @@
<ng-container *ngIf="selectedSearchType === searchTypes.SARVIEWS_EVENTS">
<app-sarviews-filters></app-sarviews-filters>
</ng-container>
@if(selectedSearchType === searchTypes.TIMESERIES) {
@if(selectedSearchType === searchTypes.DISPLACEMENT) {
<app-timeseries-filters></app-timeseries-filters>
}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
</div>
</div>

<div *ngIf="searchType === searchTypes.DATASET || searchType === searchTypes.SBAS || searchType === searchTypes.TIMESERIES" class="fx-empty group-margin">
<div *ngIf="searchType === searchTypes.DATASET || searchType === searchTypes.SBAS || searchType === searchTypes.DISPLACEMENT" class="fx-empty group-margin">
<div class="fx-row-center button-group-label">
<label>{{ 'AREA_OF_INTEREST' | translate }}</label>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<mat-icon class="draw-icon">place</mat-icon>
{{ 'PLACE_A_POINT' | translate }}
</button>
@if(searchType !== searchTypes.TIMESERIES) {
@if(searchType !== searchTypes.DISPLACEMENT) {

<button mat-menu-item
(click)="onLineStringSelected()"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<ng-container *ngIf="searchType$ | async as type">
<ng-container *ngIf="type === searchTypes.TIMESERIES; else other_stuff">
<ng-container *ngIf="type === searchTypes.DISPLACEMENT; else other_stuff">
<mat-form-field style="display: block">

<mat-label>{{'BURST_ID_FULL' | translate}}</mat-label>
Expand All @@ -12,4 +12,4 @@
<textarea matInput style="height: 75px;" [value]="fullBurstIDs.join(',')" (input)="onChange($event)"></textarea>
</mat-form-field>
</ng-template>
</ng-container>
</ng-container>
2 changes: 1 addition & 1 deletion src/app/services/search-params.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ export class SearchParamsService {
case models.SearchType.CUSTOM_PRODUCTS: {
return listParam;
}
case models.SearchType.TIMESERIES: {
case models.SearchType.DISPLACEMENT: {
return timeseriesParams;
}
default: {
Expand Down
2 changes: 1 addition & 1 deletion src/app/store/scenes/scenes.action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export enum ScenesActionType {
CLEAR = '[Granules] Clear Scenes',
SET_SARVIEWS_EVENTS = '[SARViews] Set SARViews Events',
SET_SARVIEWS_EVENT_PRODUCTS = '[SARViews] Set Selected SARViews Event Products',
SET_TIMESERIES_PRODUCTS = '[Timeseries] Set Selected Timeseries Products',
SET_DISPLACEMENT_PRODUCTS = '[Timeseries] Set Selected Timeseries Products',

SET_IMAGE_BROWSE_PRODUCTS = '[Products-Browse] Set product browse image view',

Expand Down
4 changes: 2 additions & 2 deletions src/app/store/search/search.action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export enum SearchActionType {
LOAD_ON_DEMAND_SCENES_LIST = '[Search] Load on Demand Scenes List',

SARVIEWS_SEARCH_RESPONSE = '[Search] SARViews Search Response',
TIMESERIES_SEARCH_RESPONSE = '[Search] Timeseries Search Response',
DISPLACEMENT_SEARCH_RESPONSE = '[Search] Timeseries Search Response',
MAKE_EVENT_PRODUCT_CMR_SEARCH = '[Search] Make a search for CMR Products with SARVIEWS Products',
EVENT_PRODUCT_CMR_RESPONSE = '[Search] Event Monitoring CMR Search Response',
SET_SEARCH_OUT_OF_DATE = '[Search] Set if Search is Out of Date'
Expand Down Expand Up @@ -76,7 +76,7 @@ export class SarviewsEventsResponse implements Action {
}

export class TimeseriesSearchResponse implements Action {
public readonly type = SearchActionType.TIMESERIES_SEARCH_RESPONSE;
public readonly type = SearchActionType.DISPLACEMENT_SEARCH_RESPONSE;

constructor(public payload: any) {}
}
Expand Down
12 changes: 6 additions & 6 deletions src/app/store/search/search.effect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export class SearchEffects {
if (searchType === SearchType.CUSTOM_PRODUCTS) {
return this.customProductsQuery$();
}
if (searchType === SearchType.TIMESERIES) {
if (searchType === SearchType.DISPLACEMENT) {
return this.timeseriesQuery$();
}

Expand Down Expand Up @@ -229,9 +229,9 @@ export class SearchEffects {


public timeseriesSearchResponse = createEffect(() => this.actions$.pipe(
ofType<TimeseriesSearchResponse>(SearchActionType.TIMESERIES_SEARCH_RESPONSE),
ofType<TimeseriesSearchResponse>(SearchActionType.DISPLACEMENT_SEARCH_RESPONSE),
withLatestFrom(this.store$.select(getSearchType)),
filter(([_, searchType]) => searchType === SearchType.TIMESERIES),
filter(([_, searchType]) => searchType === SearchType.DISPLACEMENT),
switchMap(([action, _]) => {
return [
new scenesStore.SetScenes({
Expand Down Expand Up @@ -296,18 +296,18 @@ export class SearchEffects {
));

public showTimeseriesResultsMenuOnSearchResponse = createEffect(() => this.actions$.pipe(
ofType<TimeseriesSearchResponse>(SearchActionType.TIMESERIES_SEARCH_RESPONSE),
ofType<TimeseriesSearchResponse>(SearchActionType.DISPLACEMENT_SEARCH_RESPONSE),
map(_ => new uiStore.OpenResultsMenu()),
));

public setMapInteractionModeBasedOnSearchType = createEffect(() => this.actions$.pipe(
ofType<SetSearchType>(SearchActionType.SET_SEARCH_TYPE_AFTER_SAVE),
filter(action => action.payload === models.SearchType.DATASET || action.payload === models.SearchType.TIMESERIES),
filter(action => action.payload === models.SearchType.DATASET || action.payload === models.SearchType.DISPLACEMENT),
switchMap((action) => {
let output : any[] = [
new mapStore.SetMapInteractionMode(models.MapInteractionModeType.DRAW)
];
if (action.payload === models.SearchType.TIMESERIES) {
if (action.payload === models.SearchType.DISPLACEMENT) {
output.push(new mapStore.SetMapDrawMode(models.MapDrawModeType.POINT))
}
return output;
Expand Down
2 changes: 1 addition & 1 deletion src/app/store/search/search.reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export function searchReducer(state = initState, action: SearchActions): SearchS
};
}

case SearchActionType.TIMESERIES_SEARCH_RESPONSE: {
case SearchActionType.DISPLACEMENT_SEARCH_RESPONSE: {
return {
...state,
totalResults: 1,
Expand Down
2 changes: 1 addition & 1 deletion src/app/store/user/user.effect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ export class UserEffects {
case SearchType.SBAS:
actions = this.setSBASFilters(targetFilter.filters as SbasFiltersType);
break;
case SearchType.TIMESERIES:
case SearchType.DISPLACEMENT:
actions = this.setTimeseriesFilters(targetFilter.filters as TimeseriesFiltersType);
default:
break;
Expand Down

0 comments on commit 6a74a2e

Please sign in to comment.