mirror of
https://github.com/a-mayb3/KanbanCloneAngular.git
synced 2026-03-21 09:55:37 +01:00
Changed layout for project detail page
This commit is contained in:
parent
69edc4e197
commit
effcab5947
4 changed files with 99 additions and 54 deletions
|
|
@ -33,8 +33,9 @@
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: #374151;
|
color: #374151;
|
||||||
min-width: 140px;
|
width: fit-content;
|
||||||
height: 32px;
|
height: 32px;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-remove {
|
.btn-remove {
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
(ngModelChange)="onStatusChange($event)"
|
(ngModelChange)="onStatusChange($event)"
|
||||||
>
|
>
|
||||||
@for (status of statusOptions; track status) {
|
@for (status of statusOptions; track status) {
|
||||||
<option [value]="status">{{ status.replace('_', ' ') }}</option>
|
<option [value]="status">{{ status.replace('_', ' ').toUpperCase() }}</option>
|
||||||
}
|
}
|
||||||
</select>
|
</select>
|
||||||
<button class="btn-edit" type="button" aria-label="Edit task" (click)="onEdit()">Edit</button>
|
<button class="btn-edit" type="button" aria-label="Edit task" (click)="onEdit()">Edit</button>
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,19 @@
|
||||||
.content {
|
.content {
|
||||||
padding: 40px;
|
padding: 40px;
|
||||||
max-width: 1200px;
|
width: clamp(70vw, 85vw, 90vw);
|
||||||
|
max-width: 80%;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 0.6rem;
|
gap: 0.6rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 600px) {
|
||||||
|
.content{
|
||||||
|
max-width: 95%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.title h2 {
|
.title h2 {
|
||||||
margin: 0 0 6px 0;
|
margin: 0 0 6px 0;
|
||||||
font-size: 26px;
|
font-size: 26px;
|
||||||
|
|
@ -153,13 +160,13 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.collaborators-grid {
|
.collaborators-grid {
|
||||||
display: grid;
|
display: flex;
|
||||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
flex-direction: column;
|
||||||
gap: 16px;
|
gap: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.collaborators-grid--single {
|
.collaborators-grid--single {
|
||||||
grid-template-columns: minmax(0, 1fr);
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-add-task {
|
.btn-add-task {
|
||||||
|
|
@ -205,6 +212,41 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cards-row {
|
||||||
|
width: 100%;
|
||||||
|
height: max-content;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
gap: 16px;
|
||||||
|
align-items: stretch;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cards-row section {
|
||||||
|
height: auto;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cards-row .tasks-card {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
flex: 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cards-row .collaborators-card {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 960px) {
|
||||||
|
.content {
|
||||||
|
width: 90vw;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cards-row {
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.loading p,
|
.loading p,
|
||||||
|
|
|
||||||
|
|
@ -17,58 +17,60 @@
|
||||||
</p>
|
</p>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="tasks-card">
|
<div class="cards-row">
|
||||||
<div class="tasks-header">
|
<section class="tasks-card">
|
||||||
<h4>Tasks</h4>
|
<div class="tasks-header">
|
||||||
<span class="tasks-count">
|
<h4>Tasks</h4>
|
||||||
{{ project()?.tasks?.length ?? 0 }} total • {{ taskCompletionPercentage }}% completed
|
<span class="tasks-count">
|
||||||
</span>
|
{{ project()?.tasks?.length ?? 0 }} total • {{ taskCompletionPercentage }}% completed
|
||||||
</div>
|
</span>
|
||||||
|
|
||||||
@if ((project()?.tasks?.length ?? 0) > 0) {
|
|
||||||
<div class="tasks-list">
|
|
||||||
@for (task of project()?.tasks ?? []; track task.id) {
|
|
||||||
<app-task-item
|
|
||||||
[task]="task"
|
|
||||||
[projectId]="project()?.id"
|
|
||||||
(statusChange)="onTaskStatusChange($event)"
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
} @else {
|
|
||||||
<div class="empty-state">
|
@if ((project()?.tasks?.length ?? 0) > 0) {
|
||||||
<p>No tasks yet.</p>
|
<div class="tasks-list">
|
||||||
|
@for (task of project()?.tasks ?? []; track task.id) {
|
||||||
|
<app-task-item
|
||||||
|
[task]="task"
|
||||||
|
[projectId]="project()?.id"
|
||||||
|
(statusChange)="onTaskStatusChange($event)"
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
} @else {
|
||||||
|
<div class="empty-state">
|
||||||
|
<p>No tasks yet.</p>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
|
||||||
|
<button class="btn-add-task" type="button" (click)="onAddTask()">Add task</button>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="collaborators-card">
|
||||||
|
<div class="collaborators-header">
|
||||||
|
<h4>Collaborators</h4>
|
||||||
|
<span class="collaborators-count"> {{ project()?.users?.length ?? 0 }} total </span>
|
||||||
</div>
|
</div>
|
||||||
}
|
|
||||||
|
|
||||||
<button class="btn-add-task" type="button" (click)="onAddTask()">Add task</button>
|
@if ((project()?.users?.length ?? 0) > 0) {
|
||||||
</section>
|
<div
|
||||||
|
class="collaborators-grid"
|
||||||
|
[class.collaborators-grid--single]="(project()?.users?.length ?? 0) === 1"
|
||||||
|
>
|
||||||
|
@for (user of project()?.users ?? []; track user.id) {
|
||||||
|
<app-collaborator-item [user]="user" (remove)="onRemoveCollaborator($event)" />
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
} @else {
|
||||||
|
<div class="empty-state">
|
||||||
|
<p>No collaborators yet.</p>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
|
||||||
<section class="collaborators-card">
|
<button class="btn-add-collaborator" type="button" (click)="onAddCollaborator()">
|
||||||
<div class="collaborators-header">
|
Add collaborator
|
||||||
<h4>Collaborators</h4>
|
</button>
|
||||||
<span class="collaborators-count"> {{ project()?.users?.length ?? 0 }} total </span>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@if ((project()?.users?.length ?? 0) > 0) {
|
|
||||||
<div
|
|
||||||
class="collaborators-grid"
|
|
||||||
[class.collaborators-grid--single]="(project()?.users?.length ?? 0) === 1"
|
|
||||||
>
|
|
||||||
@for (user of project()?.users ?? []; track user.id) {
|
|
||||||
<app-collaborator-item [user]="user" (remove)="onRemoveCollaborator($event)" />
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
} @else {
|
|
||||||
<div class="empty-state">
|
|
||||||
<p>No collaborators yet.</p>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
|
|
||||||
<button class="btn-add-collaborator" type="button" (click)="onAddCollaborator()">
|
|
||||||
Add collaborator
|
|
||||||
</button>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="danger-zone">
|
<section class="danger-zone">
|
||||||
<div class="danger-header">
|
<div class="danger-header">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue