Skip to content

Commit

Permalink
Fix #943 & #944 (#20)
Browse files Browse the repository at this point in the history
* gtag hide/show

* fix #943 - hide quickfilter title when no filters

* fix #944 - desktop layout for mobile
  • Loading branch information
amirbashan authored Jan 26, 2025
1 parent c40047f commit fd2b207
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 17 deletions.
4 changes: 3 additions & 1 deletion projects/srm/src/app/analytics.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Injectable } from '@angular/core';
import { Card, SearchParams } from './consts';
import { PlatformService } from './platform.service';
import { WindowService } from './window.service';
import { environment } from '../environments/environment';

declare const window: {
gtag: any
Expand All @@ -25,7 +26,8 @@ export class AnalyticsService {
}

gtag(...args: any[]) {
if (this.platform.browser() && window?.gtag) {
const isGtag = environment.production || !environment.isHideGtagLog;
if (isGtag && this.platform.browser() && window?.gtag) {
window.gtag(...args);
}
}
Expand Down
30 changes: 15 additions & 15 deletions projects/srm/src/app/page/page.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,21 +66,21 @@
</app-results-drawer>
</div>
}
@if (layout.desktop() && searchParams) {
<app-search-results-page
[class.visible]='stage === "search-results"'
[searchParams]='searchParams'
[serachResultsActive]="stage === 'search-results'"
[didYouMean]='didYouMean'
[searchState]='searchState'
[filtersState]='filtersState'
[areaSearchState]='areaSearchState'
(zoomout)='zoomOutMap($event)'
(visibleCount)='visibleCount = $event'
(nationalCount)='nationalCount = $event'
(hoverCard)='hoverCard($event)'
></app-search-results-page>
}
<app-search-results-page
*ngIf='layout.desktop() && searchParams'
[class.visible]='stage === "search-results"'
[searchParams]='searchParams'
[serachResultsActive]="stage === 'search-results'"
[didYouMean]='didYouMean'
[searchState]='searchState'
[filtersState]='filtersState'
[areaSearchState]='areaSearchState'
(zoomout)='zoomOutMap($event)'
(visibleCount)='visibleCount = $event'
(nationalCount)='nationalCount = $event'
(hoverCard)='hoverCard($event)'
/>

@if (stage === 'point') {
<app-branch-container
[cardId]='card'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<h3>סינון מהיר:</h3>
<h3 *ngIf='filtersState.staticFilters.length'>סינון מהיר:</h3>
<div class='items'>
@for (item of filtersState.staticFilters; track item.key) {
@if (item.key?.indexOf('human_situation') === 0 && item.key && filtersState.situationsMap[item.key]) {
Expand Down
1 change: 1 addition & 0 deletions projects/srm/src/environments/development-env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

export const devEnv: any = {
production: false,
isHideGtagLog: true,
cardsURL: 'https://srm-staging-api.whiletrue.industries/api/idx/search/cards',
// pointsURL: 'https://srm-staging-api.whiletrue.industries/api/idx/search/points',
// countCategoriesURL: 'https://srm-staging-api.whiletrue.industries/api/idx/search/count',
Expand Down
1 change: 1 addition & 0 deletions projects/srm/src/environments/environment.prod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

export const environment = {
production: true,
isHideGtagLog: false,
cardsURL: 'https://api.kolsherut.org.il/api/idx/search/cards',
// pointsURL: 'https://api.kolsherut.org.il/api/idx/search/points',
// countCategoriesURL: 'https://api.kolsherut.org.il/api/idx/search/count',
Expand Down
1 change: 1 addition & 0 deletions projects/srm/src/environments/environment.staging.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { devEnv } from './development-env';

export const environment = Object.assign({}, devEnv, {
isHideGtagLog: false,
// clusterDataURL: '/clusters.json',
// taxonomySituationsURL: '/situations.json',
// taxonomyResponsesURL: '/responses.json'
Expand Down

0 comments on commit fd2b207

Please sign in to comment.