diff --git a/backend/capellacollab/feedback/models.py b/backend/capellacollab/feedback/models.py index fc4b234f3..81d28d19c 100644 --- a/backend/capellacollab/feedback/models.py +++ b/backend/capellacollab/feedback/models.py @@ -13,9 +13,9 @@ class FeedbackRating(str, enum.Enum): - GOOD = "good" - OKAY = "okay" BAD = "bad" + OKAY = "okay" + GOOD = "good" class AnonymizedSession(core_pydantic.BaseModel): diff --git a/frontend/src/app/app.component.ts b/frontend/src/app/app.component.ts index 8479de069..8f64b98d1 100644 --- a/frontend/src/app/app.component.ts +++ b/frontend/src/app/app.component.ts @@ -18,6 +18,7 @@ import { HeaderComponent } from './general/header/header.component'; import { NavBarMenuComponent } from './general/nav-bar-menu/nav-bar-menu.component'; import { NoticeComponent } from './general/notice/notice.component'; import { PageLayoutService } from './page-layout/page-layout.service'; +import { AuthenticationWrapperService } from './services/auth/auth.service'; import { FeedbackWrapperService } from './sessions/feedback/feedback.service'; import { FullscreenService } from './sessions/service/fullscreen.service'; @@ -46,6 +47,7 @@ export class AppComponent implements OnInit, AfterViewInit { public fullscreenService: FullscreenService, private navBarService: NavBarService, private feedbackService: FeedbackWrapperService, + private authService: AuthenticationWrapperService, ) { slugify.extend({ '.': '-' }); } @@ -54,7 +56,10 @@ export class AppComponent implements OnInit, AfterViewInit { async ngOnInit() { this.feedbackService.loadFeedbackConfig().subscribe(() => { - if (this.feedbackService.shouldShowIntervalPrompt()) { + if ( + this.feedbackService.shouldShowIntervalPrompt() && + this.authService.isLoggedIn() + ) { this.feedbackService.showDialog([], 'On interval'); this.feedbackService.saveFeedbackPromptDate(); } diff --git a/frontend/src/app/openapi/model/feedback-rating.ts b/frontend/src/app/openapi/model/feedback-rating.ts index 16b48081d..589acd144 100644 --- a/frontend/src/app/openapi/model/feedback-rating.ts +++ b/frontend/src/app/openapi/model/feedback-rating.ts @@ -11,11 +11,11 @@ -export type FeedbackRating = 'good' | 'okay' | 'bad'; +export type FeedbackRating = 'bad' | 'okay' | 'good'; export const FeedbackRating = { - Good: 'good' as FeedbackRating, + Bad: 'bad' as FeedbackRating, Okay: 'okay' as FeedbackRating, - Bad: 'bad' as FeedbackRating + Good: 'good' as FeedbackRating };