@haiiro/docuflow 0.0.7 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -11
- package/manifest.json +37 -33
- package/package.json +1 -1
- package/src/front-components/docflow-documents.front-component.mjs +26 -26
- package/src/front-components/docflow-documents.front-component.tsx +24 -8
- package/src/front-components/docflow-processes.front-component.mjs +23 -23
- package/src/front-components/docflow-processes.front-component.tsx +27 -3
- package/src/front-components/docflow-tasks.front-component.mjs +32 -32
- package/src/front-components/docflow-tasks.front-component.tsx +16 -4
- package/src/front-components/process-steps.front-component.mjs +21 -21
- package/src/front-components/process-steps.front-component.tsx +36 -13
- package/src/logic-functions/hand-out-form-step.logic-function.mjs +6 -1
- package/src/logic-functions/launch-parameters-step.logic-function.mjs +1 -15
- package/src/logic-functions/launch-parameters-step.logic-function.ts +4 -18
- package/src/logic-functions/on-workflow-run-updated.logic-function.mjs +6 -1
- package/src/logic-functions/save-launch-fields.logic-function.mjs +72 -106
- package/src/logic-functions/save-launch-fields.logic-function.ts +9 -9
|
@@ -5,7 +5,7 @@ import { Button } from 'twenty-ui/primitives/input';
|
|
|
5
5
|
import { Tag } from 'twenty-ui/primitives/data-display';
|
|
6
6
|
import { useTheme } from 'twenty-ui/theme';
|
|
7
7
|
|
|
8
|
-
import { createRecord, getErrorMessage, listRecords } from 'src/front/api';
|
|
8
|
+
import { createRecord, deleteRecord, getErrorMessage, listRecords } from 'src/front/api';
|
|
9
9
|
import { formatDate, formatMemberName, isOverdue, TASK_STATUS_LABELS } from 'src/front/format';
|
|
10
10
|
import { useAsync, useDebouncedValue } from 'src/front/hooks/use-async';
|
|
11
11
|
import { useWorkspaceMembers } from 'src/front/hooks/use-workspace-members';
|
|
@@ -199,6 +199,17 @@ const DocflowTasks = () => {
|
|
|
199
199
|
}),
|
|
200
200
|
[taskFilter, searchQuery, currentMember?.id, sort, pages, now],
|
|
201
201
|
);
|
|
202
|
+
|
|
203
|
+
const handleDeleteTask = async (taskId: string) => {
|
|
204
|
+
try {
|
|
205
|
+
await deleteRecord('tasks', taskId);
|
|
206
|
+
setPanel((current) => (current.kind === 'task' && current.taskId === taskId ? { kind: 'closed' } : current));
|
|
207
|
+
await enqueueSnackbar({ message: 'Задание удалено: оно в фильтре «Архив»', variant: 'success' });
|
|
208
|
+
await reload();
|
|
209
|
+
} catch (deleteError) {
|
|
210
|
+
await enqueueSnackbar({ message: getErrorMessage(deleteError, 'Не удалось удалить задание'), variant: 'error' });
|
|
211
|
+
}
|
|
212
|
+
};
|
|
202
213
|
const tasks = data?.records ?? [];
|
|
203
214
|
|
|
204
215
|
return (
|
|
@@ -273,12 +284,13 @@ const DocflowTasks = () => {
|
|
|
273
284
|
{tasks.length > 0 && (
|
|
274
285
|
<DataTable
|
|
275
286
|
columns={[
|
|
276
|
-
{ key: 'title', label: 'Задание', width: '
|
|
277
|
-
{ key: 'assignee', label: 'Исполнитель', width: '
|
|
278
|
-
{ key: 'dueAt', label: 'Срок', width: '
|
|
287
|
+
{ key: 'title', label: 'Задание', width: '34%' },
|
|
288
|
+
{ key: 'assignee', label: 'Исполнитель', width: '20%' },
|
|
289
|
+
{ key: 'dueAt', label: 'Срок', width: '14%' },
|
|
279
290
|
{ key: 'status', label: 'Статус' },
|
|
280
291
|
]}
|
|
281
292
|
selectedRowId={panel.kind === 'task' ? panel.taskId : undefined}
|
|
293
|
+
onDeleteRow={taskFilter === 'archived' ? undefined : handleDeleteTask}
|
|
282
294
|
onRowClick={(taskId) =>
|
|
283
295
|
taskFilter === 'archived'
|
|
284
296
|
? void openArchivedTask(taskId)
|