Skip to content

Commit

Permalink
feat(boards): also show scheduled with reminder case for tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
johannesjo committed Mar 4, 2025
1 parent fee5781 commit bca2c98
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,22 @@
[task]="task"
[tagsToHide]="panelCfg().includedTagIds || []"
>
@if (
((plannerService.plannedTaskDayMap$ | async) || {})[task.id];
as plannedAtDay
) {
@if (task.reminderId) {
<button
(click)="scheduleTask(task, $event)"
[title]="T.F.TASK.CMP.EDIT_SCHEDULED | translate"
class="ico-btn schedule-btn"
color=""
mat-icon-button
>
<mat-icon>alarm</mat-icon>
<div
class="time-badge"
[innerHTML]="task.plannedAt | shortPlannedAt"
></div>
</button>
}
@if (plannedTaskDayMap()[task.id]) {
<button
(click)="scheduleTask(task, $event)"
[title]="T.F.TASK.CMP.SCHEDULE | translate"
Expand All @@ -32,7 +44,7 @@
mat-icon-button
>
<mat-icon>today</mat-icon>
<div class="time-badge">{{ plannedAtDay | localDateStr }}</div>
<div class="time-badge">{{ plannedTaskDayMap()[task.id] | localDateStr }}</div>
</button>
}
</planner-task>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import { MatDialog } from '@angular/material/dialog';
import { fastArrayCompare } from '../../../util/fast-array-compare';
import { first, take } from 'rxjs/operators';
import { PlannerActions } from '../../planner/store/planner.actions';
import { ShortPlannedAtPipe } from '../../../ui/pipes/short-planned-at.pipe';

@Component({
selector: 'board-task-list',
Expand All @@ -56,6 +57,7 @@ import { PlannerActions } from '../../planner/store/planner.actions';
MatIcon,
MatIconButton,
TranslatePipe,
ShortPlannedAtPipe,
],
templateUrl: './board-task-list.component.html',
styleUrl: './board-task-list.component.scss',
Expand Down
2 changes: 1 addition & 1 deletion src/app/ui/pipes/short-planned-at.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { inject, LOCALE_ID, Pipe, PipeTransform } from '@angular/core';
import { isToday } from '../../util/is-today.util';
import { ShortTime2Pipe } from './short-time2.pipe';

@Pipe({ name: 'shortPlannedAt' })
@Pipe({ name: 'shortPlannedAt', standalone: true })
export class ShortPlannedAtPipe implements PipeTransform {
private _shortTime2Pipe = inject(ShortTime2Pipe);
private locale = inject(LOCALE_ID);
Expand Down

0 comments on commit bca2c98

Please sign in to comment.