MCPcopy
hub / github.com/crawlab-team/artipub / onTaskChange

Function onTaskChange

frontend/src/pages/ArticleList/ArticleList.tsx:273–289  ·  view source on GitHub ↗
(type: string, key: string)

Source from the content-addressed store, hash-verified

271 };
272
273 const onTaskChange: Function = (type: string, key: string) => {
274 return (ev: any) => {
275 let value;
276 if (type === constants.inputType.SELECT) {
277 value = ev;
278 } else if (type === constants.inputType.INPUT) {
279 value = ev.target.value;
280 }
281 if (value !== undefined && !!task.currentTask) {
282 task.currentTask[key] = value;
283 dispatch({
284 type: 'task/saveCurrentTask',
285 payload: task.currentTask,
286 });
287 }
288 };
289 };
290
291 const getBadgeCount = (p: Platform) => {
292 const t = task.tasks.filter((d: Task) => d.platformId === p._id)[0];

Callers 1

ArticleListFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected