Skip to content

Commit 3a12bfb

Browse files
committed
fix(kanban/activity): guard create-without-project, resolve NG0600 signal writes, and align My Activity icon chips with app theme
1 parent 96729b9 commit 3a12bfb

7 files changed

Lines changed: 67 additions & 10 deletions

File tree

src/app/app.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export class AppComponent {
6565
...prev,
6666
staticMenuDesktopInactive: sidebarBehavior === 'collapsed'
6767
}));
68-
});
68+
}, { allowSignalWrites: true });
6969
}
7070

7171
isOutsideClicked(event: MouseEvent) {

src/app/core/layout/component/app-topbar/app-topbar.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export class AppTopbarComponent {
6363
}
6464

6565
this.notificationsService.initialize();
66-
});
66+
}, { allowSignalWrites: true });
6767
}
6868

6969
toggleDarkMode() {

src/app/core/layout/services/layout.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export class LayoutService {
9494
if (config) {
9595
this.onConfigUpdate();
9696
}
97-
});
97+
}, { allowSignalWrites: true });
9898

9999
effect(() => {
100100
const config = this.layoutConfig();
@@ -105,7 +105,7 @@ export class LayoutService {
105105
}
106106

107107
this.handleDarkModeTransition(config);
108-
});
108+
}, { allowSignalWrites: true });
109109

110110
this.toggleDarkMode(this.layoutConfig());
111111
}

src/app/features/activity/components/my-activity/my-activity.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ <h3>Activity Timeline</h3>
4343

4444
<div class="activity-list" *ngIf="!isLoading; else loadingState">
4545
<div class="activity-row" *ngFor="let activity of filteredActivities; let isLast = last" [class.activity-row--last]="isLast">
46-
<div class="activity-row__icon" [ngClass]="activity.bgColor">
47-
<i class="{{ activity.icon }}" [ngClass]="activity.iconColor"></i>
46+
<div class="activity-row__icon" [ngClass]="getActivityIconChipClass(activity.rawEvent.type)">
47+
<i class="{{ activity.icon }}"></i>
4848
</div>
4949

5050
<div class="activity-row__content">

src/app/features/activity/components/my-activity/my-activity.component.scss

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,13 +203,43 @@
203203
}
204204

205205
.activity-row__icon {
206-
width: 2.5rem;
207-
height: 2.5rem;
208-
border-radius: 999px;
206+
width: 2.45rem;
207+
height: 2.45rem;
208+
border-radius: 10px;
209209
display: inline-flex;
210210
align-items: center;
211211
justify-content: center;
212212
flex-shrink: 0;
213+
border: 1px solid var(--surface-border);
214+
background: color-mix(in srgb, var(--surface-100) 78%, transparent);
215+
}
216+
217+
.activity-row__icon i {
218+
font-size: 1rem;
219+
}
220+
221+
.activity-row__icon--todo {
222+
color: #1976d2;
223+
border-color: color-mix(in srgb, #1976d2 35%, var(--surface-border));
224+
background: color-mix(in srgb, #1976d2 12%, var(--surface-100));
225+
}
226+
227+
.activity-row__icon--progress {
228+
color: #6f42c1;
229+
border-color: color-mix(in srgb, #6f42c1 35%, var(--surface-border));
230+
background: color-mix(in srgb, #6f42c1 12%, var(--surface-100));
231+
}
232+
233+
.activity-row__icon--done {
234+
color: #2e7d32;
235+
border-color: color-mix(in srgb, #2e7d32 35%, var(--surface-border));
236+
background: color-mix(in srgb, #2e7d32 12%, var(--surface-100));
237+
}
238+
239+
.activity-row__icon--warning {
240+
color: #f57c00;
241+
border-color: color-mix(in srgb, #f57c00 35%, var(--surface-border));
242+
background: color-mix(in srgb, #f57c00 12%, var(--surface-100));
213243
}
214244

215245
.activity-row__content {

src/app/features/activity/components/my-activity/my-activity.component.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,25 @@ export class MyActivityComponent implements OnInit, OnDestroy {
144144
return this.typeOptions.find((option) => option.value === type)?.label ?? 'Activity';
145145
}
146146

147+
getActivityIconChipClass(type: ActivityType): string {
148+
switch (type) {
149+
case ActivityType.TaskCreated:
150+
case ActivityType.ProjectCreated:
151+
return 'activity-row__icon--todo';
152+
case ActivityType.TaskStatusChanged:
153+
case ActivityType.TaskDueDateChanged:
154+
case ActivityType.ProjectRenamed:
155+
return 'activity-row__icon--progress';
156+
case ActivityType.TaskDeleted:
157+
case ActivityType.ProjectDeleted:
158+
return 'activity-row__icon--warning';
159+
case ActivityType.TaskAssigneeChanged:
160+
case ActivityType.TaskRenamed:
161+
default:
162+
return 'activity-row__icon--done';
163+
}
164+
}
165+
147166
private loadActivity(): void {
148167
this.isLoading = true;
149168
this.errorMessage = null;

src/app/features/projects/components/project-kanban/project-kanban.component.html

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,15 @@ <h3>Create Task</h3>
335335

336336
<div class="task-dialog-actions">
337337
<button pButton type="button" label="Cancel" class="p-button-text" (click)="closeTaskDialogs()"></button>
338-
<button pButton type="button" label="Create task" icon="pi pi-plus" [loading]="isSavingTask" [disabled]="!taskForm.title.trim()" (click)="saveCreateTask()"></button>
338+
<button
339+
pButton
340+
type="button"
341+
label="Create task"
342+
icon="pi pi-plus"
343+
[loading]="isSavingTask"
344+
[disabled]="!taskForm.title.trim() || !selectedProjectId"
345+
(click)="saveCreateTask()">
346+
</button>
339347
</div>
340348
</div>
341349
</div>

0 commit comments

Comments
 (0)