Skip to content

Commit

Permalink
chore: run prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
GODrums committed Nov 21, 2024
1 parent 060617c commit 917d8e9
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import de.tum.in.www1.hephaestus.gitprovider.issuecomment.IssueComment;
import de.tum.in.www1.hephaestus.gitprovider.issuecomment.IssueCommentRepository;
import de.tum.in.www1.hephaestus.gitprovider.pullrequest.PullRequest;
import de.tum.in.www1.hephaestus.gitprovider.pullrequest.PullRequestInfoDTO;
import de.tum.in.www1.hephaestus.gitprovider.pullrequestreview.PullRequestReview;
import de.tum.in.www1.hephaestus.gitprovider.pullrequestreview.PullRequestReviewRepository;
import de.tum.in.www1.hephaestus.gitprovider.team.Team;
Expand Down
3 changes: 1 addition & 2 deletions webapp/src/app/admin/admin.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { HlmSkeletonModule } from '../../libs/ui/ui-skeleton-helm/src/index';
import { HlmScrollAreaModule } from '@spartan-ng/ui-scrollarea-helm';
import { FormControl, ReactiveFormsModule } from '@angular/forms';
import { HlmButtonModule } from '@spartan-ng/ui-button-helm';
import { RouterModule, } from '@angular/router';
import { RouterModule } from '@angular/router';

@Component({
selector: 'app-admin',
Expand Down Expand Up @@ -49,4 +49,3 @@ export class AdminComponent {
return JSON.stringify(value, null, 4);
}
}

2 changes: 1 addition & 1 deletion webapp/src/app/admin/layout.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
class="justify-start gap-2 w-full"
[routerLink]="navItem.route"
routerLinkActive="text-accent-foreground bg-accent"
[routerLinkActiveOptions]="{ exact: navItem.exact ?? false, }"
[routerLinkActiveOptions]="{ exact: navItem.exact ?? false }"
ariaCurrentWhenActive="page"
>
<hlm-icon size="normal" [name]="navItem.icon" />
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/app/admin/layout.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ export class AdminLayoutComponent {
{ icon: 'lucideFileCog', label: 'Environment', route: '.', exact: true },
{ icon: 'lucideUserCircle', label: 'Users', route: 'users' },
{ icon: 'lucideUsers2', label: 'Teams', route: 'teams' }
]
];
}
15 changes: 9 additions & 6 deletions webapp/src/app/admin/teams/table/teams-table.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export class AdminTeamsTableComponent {

displayLabelAlert = signal(false);

_teams = computed(() => this.isLoading() ? LOADING_TEAMS : this.teamData() ?? []);
_teams = computed(() => (this.isLoading() ? LOADING_TEAMS : (this.teamData() ?? [])));
// Filters
protected readonly _rawFilterInput = signal('');
protected readonly _nameFilter = signal('');
Expand Down Expand Up @@ -189,15 +189,18 @@ export class AdminTeamsTableComponent {
onSettled: () => {
this.displayLabelAlert.set(false);
this._newLabelName.reset();
this.invalidateTeams()
this.invalidateTeams();
}
}));

createTeam = injectMutation(() => ({
mutationFn: () => lastValueFrom(this.adminService.createTeam({
name: this._newTeamName.value,
color: this._newTeamColor.value ?? '#000000'
} as TeamInfo)),
mutationFn: () =>
lastValueFrom(
this.adminService.createTeam({
name: this._newTeamName.value,
color: this._newTeamColor.value ?? '#000000'
} as TeamInfo)
),
queryKey: ['admin', 'team', 'create'],
onSettled: () => this.invalidateTeams()
}));
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/app/admin/users/table/users-table.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export class AdminUsersTableComponent {
isLoading = input(false);
userData = input.required<UserTeams[] | undefined>();

_users = computed(() => this.isLoading() ? LOADING_DATA : this.userData() ?? []);
_users = computed(() => (this.isLoading() ? LOADING_DATA : (this.userData() ?? [])));
// Filters
protected readonly _rawFilterInput = signal('');
protected readonly _loginFilter = signal('');
Expand Down
18 changes: 11 additions & 7 deletions webapp/src/app/home/home.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,17 @@ export class HomeComponent {
};
});

protected afterParam = computed(() => this.queryParams().get('after') ?? (() => {
let defaultDate = dayjs().isoWeekday(this.leaderboardSchedule().day).startOf('hour').hour(this.leaderboardSchedule().hour).minute(this.leaderboardSchedule().minute);
if (defaultDate.isAfter(dayjs())) {
defaultDate = defaultDate.subtract(1, 'week');
}
return defaultDate.format();
})());
protected afterParam = computed(
() =>
this.queryParams().get('after') ??
(() => {
let defaultDate = dayjs().isoWeekday(this.leaderboardSchedule().day).startOf('hour').hour(this.leaderboardSchedule().hour).minute(this.leaderboardSchedule().minute);
if (defaultDate.isAfter(dayjs())) {
defaultDate = defaultDate.subtract(1, 'week');
}
return defaultDate.format();
})()
);
protected beforeParam = computed(() => this.queryParams().get('before') ?? dayjs().format());
protected teamParam = computed(() => this.queryParams().get('team') ?? 'all');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const buttonVariants = cva(
outline: 'border border-input hover:bg-accent hover:text-accent-foreground',
secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80',
ghost: 'hover:bg-accent hover:text-accent-foreground',
link: 'underline-offset-4 hover:underline text-primary',
link: 'underline-offset-4 hover:underline text-primary'
},
size: {
none: '',
Expand Down

0 comments on commit 917d8e9

Please sign in to comment.