Skip to content
This repository was archived by the owner on Mar 8, 2024. It is now read-only.

Commit c815fd1

Browse files
author
Johannes Hötter
committed
re-add projects homescreen and automated routing to labeling page for experts
1 parent 0509508 commit c815fd1

File tree

3 files changed

+9
-34
lines changed

3 files changed

+9
-34
lines changed

src/app/base/components/header/header.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666

6767
</div>
6868
<div class="flex flex-row flex-nowrap items-center">
69-
<div *ngIf="user.role == 'ENGINEER'" class="flex items-center justify-center">
69+
<div class="flex items-center justify-center">
7070
<a [routerLink]="['/projects']" class="flex mr-6 tooltip tooltip-left" data-tip="Home page - Projects">
7171
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-home" width="24"
7272
height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none"

src/app/base/components/sidebar-pm/sidebar-pm.component.html

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
<div class="flex flex-col w-20 overflow-visible">
44
<div class="flex-1 flex flex-col min-h-0 overflow-y-auto bg-kernindigo overflow-initial">
55
<div class="flex-1 flex flex-col">
6-
<div *ngIf="user.role == 'ENGINEER'"
7-
class="flex-shrink-0 bg-kernindigo pt-4 flex items-center justify-center">
6+
<div class="flex-shrink-0 bg-kernindigo pt-4 flex items-center justify-center">
87
<a [routerLink]="['/projects']"
98
class="inline-flex items-center p-2 rounded-full hover:bg-kernindigo-dark focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-kernindigo-dark"
109
data-intercom-target="Home Button">
@@ -31,33 +30,6 @@
3130
</svg>
3231
</a>
3332
</div>
34-
<div *ngIf="user.role != 'ENGINEER'"
35-
class="flex-shrink-0 bg-kernindigo pt-4 flex items-center justify-center">
36-
<div class="p-2">
37-
38-
<svg width="32" height="30" viewBox="0 0 32 30" fill="none"
39-
xmlns="http://www.w3.org/2000/svg">
40-
<path
41-
d="M5.67491 11.8223H0V29.3048C0 29.6614 0.289047 29.9504 0.645605 29.9504H29.1477C29.5042 29.9504 29.7933 29.6614 29.7933 29.3048V18.1277H24.1184V23.6299C24.1184 23.9865 23.8293 24.2755 23.4728 24.2755H6.32051C5.96396 24.2755 5.67491 23.9865 5.67491 23.6299V11.8223Z"
42-
fill="url(#paint0_linear_220_314)" />
43-
<path
44-
d="M26.3251 18.1289H32V0.646334C32 0.289776 31.711 0.000727048 31.3544 0.000727048L2.85234 0.000727048C2.49578 0.000727048 2.20673 0.289776 2.20673 0.646334L2.20673 11.8235H7.88164V6.32124C7.88164 5.96468 8.17069 5.67563 8.52725 5.67563L25.6795 5.67563C26.036 5.67563 26.3251 5.96468 26.3251 6.32124V18.1289Z"
45-
fill="url(#paint1_linear_220_314)" />
46-
<defs>
47-
<linearGradient id="paint0_linear_220_314" x1="6.12865" y1="20.8369" x2="23.4115"
48-
y2="20.8369" gradientUnits="userSpaceOnUse">
49-
<stop stop-color="#75EA8E" />
50-
<stop offset="1" stop-color="#5DE079" />
51-
</linearGradient>
52-
<linearGradient id="paint1_linear_220_314" x1="26.1079" y1="9.07118" x2="8.2122"
53-
y2="9.07118" gradientUnits="userSpaceOnUse">
54-
<stop stop-color="#75EA8E" />
55-
<stop offset="1" stop-color="#5DE079" />
56-
</linearGradient>
57-
</defs>
58-
</svg>
59-
</div>
60-
</div>
6133
<div>
6234
<div *ngIf="project$ | async as project">
6335
<div *ngIf="project.id !== null"

src/app/projects/components/projects/projects.component.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -286,12 +286,15 @@ export class ProjectsComponent implements OnInit, OnDestroy {
286286
}
287287

288288
manageProject(projectId: string, recordsInProject: Number): void {
289-
if (recordsInProject == 0) {
290-
this.router.navigate(['projects', projectId, 'settings']);
289+
if (this.user.role == 'ENGINEER') {
290+
if (recordsInProject == 0) {
291+
this.router.navigate(['projects', projectId, 'settings']);
292+
} else {
293+
this.router.navigate(['projects', projectId, 'overview']);
294+
}
291295
} else {
292-
this.router.navigate(['projects', projectId, 'overview']);
296+
this.router.navigate(['projects', projectId, 'labeling']);
293297
}
294-
295298
}
296299

297300
handleWebsocketNotification(msgParts) {

0 commit comments

Comments
 (0)