@@ -21,10 +21,14 @@ import { LooseGooseyField, type LooseyGooseyData } from './loosey-goosey';
21
21
import { tracked } from ' @glimmer/tracking' ;
22
22
import { action } from ' @ember/object' ;
23
23
import { fn } from ' @ember/helper' ;
24
+ import ChevronsUp from ' @cardstack/boxel-icons/chevrons-up' ;
25
+ import ChevronUp from ' @cardstack/boxel-icons/chevron-up' ;
26
+ import ChevronsDown from ' @cardstack/boxel-icons/chevrons-down' ;
27
+ import ChevronDown from ' @cardstack/boxel-icons/chevrons-down' ;
28
+ import CircleEqual from ' @cardstack/boxel-icons/circle-equal' ;
24
29
import { isToday , isThisWeek , addWeeks } from ' date-fns' ;
25
30
import GlimmerComponent from ' @glimmer/component' ;
26
31
import Calendar from ' @cardstack/boxel-icons/calendar' ;
27
- import ChevronsUp from ' @cardstack/boxel-icons/chevrons-up' ;
28
32
import { Pill } from ' @cardstack/boxel-ui/components' ;
29
33
import { CheckMark } from ' @cardstack/boxel-ui/icons' ;
30
34
@@ -143,7 +147,7 @@ export class FittedTask extends Component<typeof TaskBase> {
143
147
{{/if }}
144
148
</div >
145
149
<div class =' short-id-container' >
146
- <ChevronsUp width = ' 14px ' height = ' 14px ' />
150
+ <@ fields.priority @ format = ' atom ' />
147
151
<span class =' short-id' >{{@ model.shortId }} </span >
148
152
</div >
149
153
</header >
@@ -229,7 +233,7 @@ export class FittedTask extends Component<typeof TaskBase> {
229
233
.short-id-container {
230
234
display : flex ;
231
235
align-items : center ;
232
- gap : var (--boxel-sp-3xs );
236
+ gap : var (--boxel-sp-xxxs );
233
237
margin-left : auto ;
234
238
}
235
239
.short-id {
@@ -483,14 +487,22 @@ class EditPriority extends Component<typeof BaseTaskPriority> {
483
487
export class BaseTaskPriority extends LooseGooseyField {
484
488
// loosey goosey pattern
485
489
static values = [
486
- { index: 0 , label: ' Low' },
490
+ { index: 0 , label: ' Lowest' , icon: ChevronsDown },
491
+ { index: 1 , label: ' Low' , icon: ChevronDown },
487
492
{
488
- index: 1 ,
493
+ index: 2 ,
489
494
label: ' Medium' ,
495
+ icon: CircleEqual ,
490
496
},
491
497
{
492
- index: 2 ,
498
+ index: 3 ,
493
499
label: ' High' ,
500
+ icon: ChevronUp ,
501
+ },
502
+ {
503
+ index: 4 ,
504
+ label: ' Highest' ,
505
+ icon: ChevronsUp ,
494
506
},
495
507
];
496
508
@@ -500,6 +512,21 @@ export class BaseTaskPriority extends LooseGooseyField {
500
512
{{@ model.label }}
501
513
</template >
502
514
};
515
+
516
+ static atom = class Atom extends Component <typeof this > {
517
+ get selectedPriority() {
518
+ return BaseTaskPriority .values .find ((priority ) => {
519
+ return priority .label === this .args .model .label ;
520
+ });
521
+ }
522
+
523
+ get selectedIcon() {
524
+ return this .selectedPriority ?.icon ;
525
+ }
526
+ <template >
527
+ <this .selectedIcon width =' 14px' height =' 14px' />
528
+ </template >
529
+ };
503
530
}
504
531
505
532
export class TaskBase extends CardDef {
0 commit comments