Skip to content

Commit 8107abb

Browse files
committed
more fix on completed status
1 parent 4aad85e commit 8107abb

File tree

1 file changed

+29
-26
lines changed

1 file changed

+29
-26
lines changed

packages/experiments-realm/task.gts

+29-26
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,35 @@ export class BaseTaskStatusEdit extends Component<typeof BaseTaskStatusField> {
7272
}
7373
}
7474

75+
export class BaseTaskStatusField extends LooseGooseyField {
76+
@field completed = contains(BooleanField);
77+
static values = [
78+
{ index: 0, label: 'Not Started', color: '#B0BEC5', completed: false },
79+
{
80+
index: 1,
81+
label: 'In Progress',
82+
color: '#64B5F6',
83+
completed: false,
84+
},
85+
{
86+
index: 2,
87+
label: 'Done',
88+
color: '#00BCD4',
89+
completed: true,
90+
},
91+
];
92+
93+
static embedded = class Embedded extends Component<
94+
typeof BaseTaskStatusField
95+
> {
96+
<template>
97+
{{@model.label}}
98+
</template>
99+
};
100+
101+
static edit = BaseTaskStatusEdit;
102+
}
103+
75104
export class FittedTask extends Component<typeof TaskBase> {
76105
get visibleTags() {
77106
return [this.args.fields.tags[0], this.args.fields.tags[1]].filter(Boolean);
@@ -500,32 +529,6 @@ export class BaseTaskPriority extends LooseGooseyField {
500529
};
501530
}
502531

503-
export class BaseTaskStatusField extends LooseGooseyField {
504-
static values = [
505-
{ index: 0, label: 'Not Started', color: '#B0BEC5' },
506-
{
507-
index: 1,
508-
label: 'In Progress',
509-
color: '#64B5F6',
510-
},
511-
{
512-
index: 2,
513-
label: 'Done',
514-
color: '#00BCD4',
515-
},
516-
];
517-
518-
static embedded = class Embedded extends Component<
519-
typeof BaseTaskStatusField
520-
> {
521-
<template>
522-
{{@model.label}}
523-
</template>
524-
};
525-
526-
static edit = BaseTaskStatusEdit;
527-
}
528-
529532
export class TaskBase extends CardDef {
530533
static displayName = 'Task Base';
531534
@field taskName = contains(StringField);

0 commit comments

Comments
 (0)