auto-sync: 2026-05-17 13:22:33
This commit is contained in:
@@ -218,11 +218,14 @@ export const api = {
|
||||
try {
|
||||
const pid = _currentProjectId || Object.keys((await api.projects()).projects)[0];
|
||||
if (!pid) return { ok: false, error: 'No project selected' };
|
||||
const prio = typeof data.priority === 'string' ? parseInt(data.priority, 10) || 5 : 5;
|
||||
return postJ(`${API_BASE}/api/projects/${pid}/tasks`, {
|
||||
id: `task-${Date.now().toString(36)}`,
|
||||
title: data.title || data.requirement || '',
|
||||
requirement: data.requirement || data.title || '',
|
||||
description: data.requirement || data.title || '',
|
||||
task_type: data.project_type || 'general',
|
||||
priority: data.priority || 'medium',
|
||||
priority: prio,
|
||||
assigned_by: 'user',
|
||||
});
|
||||
} catch (e: any) {
|
||||
return { ok: false, error: e.message };
|
||||
|
||||
Reference in New Issue
Block a user