AndrewMotevich / Airways

The app called Airways - it’s an online platform designed to help users find and book flights quickly and easily.
https://airways-coral.vercel.app
1 stars 2 forks source link

Fix/stepper #46

Closed AndrewMotevich closed 1 year ago

AndrewMotevich commented 1 year ago

Поправил навигацию При перезагрузке страницы select-flight, booking, summary не доступны и идет навигация на main


 if (this.stepperService.init === false) {
      switch (this.router.url) {
        case '/select-flight':
          this.stepperService.init = true;
          this.router.navigate(['/']);
          break;
        case '/booking':
          this.stepperService.init = true;
          this.router.navigate(['/']);
          break;
        case '/summary':
          this.stepperService.init = true;
          this.router.navigate(['/']);
          break;
        default:
          break;
      }

При добавлении в корзину доступна навигация по всем страницам букинга (select-flight, booking, summary)


        if (this.stepperService.canNavigate) {
          if (url === '/select-flight') {
            this.stepperService.editStepOne();
          } else if (url === '/booking') {
            this.stepperService.editStepTwo();
          } else if (url === '/summary') {
            this.stepperService.editStepThree();
          }
        }