Skip to content

Commit eb77011

Browse files
authored
Fix/fix sigin menu button (#1992)
* Add ready for indexing check * Backend checks on disallow robots conditons * Fix header menu * Remove logs
1 parent 9d26723 commit eb77011

3 files changed

Lines changed: 7 additions & 22 deletions

File tree

src/app/cdk/side-bar/modals/modal-country/modal-country.component.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ describe('ModalCountryComponent', () => {
135135
const countriesSelects = await loader.getAllHarnesses(MatSelectHarness)
136136
const countriesInputs = await loader.getAllHarnesses(MatInputHarness)
137137

138-
console.log(countriesSelects)
139138
await countriesSelects[1].open()
140139
await countriesSelects[1].clickOptions() //Select the first option
141140

src/app/layout/header/header.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@
138138
<button
139139
mat-stroked-button
140140
class="sign-in-button"
141-
(click)="navigateTo('/signout')"
141+
(click)="goto('signout')"
142142
>
143143
<ng-container i18n="#upperCase@@public-layout.sign_out"
144144
>SIGN OUT</ng-container

src/app/layout/header/header.component.ts

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,12 @@ export class HeaderComponent implements OnInit {
107107
button.route !== undefined &&
108108
(!button.buttons || !button.buttons.length)
109109
) {
110-
this.preNavigate(button.route)
110+
this.goto(button.route)
111111
} else {
112112
this.updateMenu(this.menu, treeLocation, true)
113113
}
114114
} else if (button.route !== undefined) {
115-
this.preNavigate(button.route)
115+
this.goto(button.route)
116116
}
117117
}
118118

@@ -257,28 +257,14 @@ export class HeaderComponent implements OnInit {
257257
: null
258258
}
259259

260-
goto(url) {
261-
if (url === 'signin') {
260+
goto(route: string) {
261+
if (route === 'signin') {
262262
this._router.navigate([ApplicationRoutes.signin])
263263
this.mobileMenuState = false
264-
} else {
265-
;(this.window as any).outOfRouterNavigation(environment.BASE_URL + url)
266-
}
267-
}
268-
269-
preNavigate(route: string) {
270-
if (route.indexOf('://') >= 0) {
271-
this.navigateTo(route)
272-
} else {
273-
this.navigateTo(environment.INFO_SITE + route)
274-
}
275-
}
276-
277-
navigateTo(val) {
278-
if (val === '/signout' && environment.proxyMode) {
264+
} else if (route === 'signout' && environment.proxyMode) {
279265
this._user.noRedirectLogout().subscribe()
280266
} else {
281-
;(this.window as any).outOfRouterNavigation(val)
267+
;(this.window as any).outOfRouterNavigation(environment.INFO_SITE + route)
282268
}
283269
}
284270
}

0 commit comments

Comments
 (0)