Skip to content

Commit a8416fb

Browse files
committed
updates
1 parent 6b1e561 commit a8416fb

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

components/nifty/nifty.app.mjs

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -138,22 +138,21 @@ export default {
138138
async options({
139139
page, projectId,
140140
}) {
141-
const { items } = await this.listMilestones({
141+
const { items } = await this.listTaskGroups({
142142
params: {
143143
limit: LIMIT,
144144
offset: LIMIT * page,
145145
project_id: projectId,
146+
archived: false,
146147
},
147148
});
148149

149-
return items
150-
.filter(({ task_group }) => task_group )
151-
.map(({
152-
task_group: value, name: label,
153-
}) => ({
154-
label,
155-
value,
156-
}));
150+
return items?.map(({
151+
id: value, name: label,
152+
}) => ({
153+
label,
154+
value,
155+
})) || [];
157156
},
158157
},
159158
},
@@ -229,6 +228,12 @@ export default {
229228
...opts,
230229
});
231230
},
231+
listTaskGroups(opts = {}) {
232+
return this._makeRequest({
233+
path: "/taskgroups",
234+
...opts,
235+
});
236+
},
232237
listTemplates(opts = {}) {
233238
return this._makeRequest({
234239
path: "/templates",

0 commit comments

Comments
 (0)