Skip to content

Commit

Permalink
Merge pull request #1828 from DSD-DBS/feedback-fixes
Browse files Browse the repository at this point in the history
fix: Disable Feedback Prompt when logged out, Change order of buttons
  • Loading branch information
MoritzWeber0 authored Sep 23, 2024
2 parents ca4d4ee + 1c547f3 commit 8f6298e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
4 changes: 2 additions & 2 deletions backend/capellacollab/feedback/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@


class FeedbackRating(str, enum.Enum):
GOOD = "good"
OKAY = "okay"
BAD = "bad"
OKAY = "okay"
GOOD = "good"


class AnonymizedSession(core_pydantic.BaseModel):
Expand Down
7 changes: 6 additions & 1 deletion frontend/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -46,6 +47,7 @@ export class AppComponent implements OnInit, AfterViewInit {
public fullscreenService: FullscreenService,
private navBarService: NavBarService,
private feedbackService: FeedbackWrapperService,
private authService: AuthenticationWrapperService,
) {
slugify.extend({ '.': '-' });
}
Expand All @@ -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();
}
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/app/openapi/model/feedback-rating.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8f6298e

Please sign in to comment.