fixes
This commit is contained in:
parent
6a66388def
commit
71bf6baae5
3 changed files with 17 additions and 8 deletions
|
|
@ -225,12 +225,20 @@ export function buildSyncFromClickUpList(args: {
|
||||||
{ name: PAYLOAD_TIME_H, label: 'Zeitschätzung (Stunden)', type: 'number', required: false },
|
{ name: PAYLOAD_TIME_H, label: 'Zeitschätzung (Stunden)', type: 'number', required: false },
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const statusTriggerRow: TriggerFormFieldRow | null =
|
||||||
|
statusOpts.length > 0
|
||||||
|
? {
|
||||||
|
name: PAYLOAD_STATUS,
|
||||||
|
label: 'Status',
|
||||||
|
type: 'clickup_status',
|
||||||
|
statusOptions: statusOpts,
|
||||||
|
}
|
||||||
|
: null;
|
||||||
|
|
||||||
const standardTrigger: TriggerFormFieldRow[] = [
|
const standardTrigger: TriggerFormFieldRow[] = [
|
||||||
{ name: PAYLOAD_TITLE, label: 'Titel', type: 'text' },
|
{ name: PAYLOAD_TITLE, label: 'Titel', type: 'text' },
|
||||||
{ name: PAYLOAD_DESCRIPTION, label: 'Beschreibung', type: 'text' },
|
{ name: PAYLOAD_DESCRIPTION, label: 'Beschreibung', type: 'text' },
|
||||||
...(statusOpts.length > 0
|
...(statusTriggerRow ? [statusTriggerRow] : []),
|
||||||
? [{ name: PAYLOAD_STATUS, label: 'Status', type: 'clickup_status', statusOptions: statusOpts }]
|
|
||||||
: []),
|
|
||||||
{ name: PAYLOAD_PRIORITY, label: 'Priorität (1–4)', type: 'number' },
|
{ name: PAYLOAD_PRIORITY, label: 'Priorität (1–4)', type: 'number' },
|
||||||
{ name: PAYLOAD_DUE, label: 'Fälligkeit', type: 'date' },
|
{ name: PAYLOAD_DUE, label: 'Fälligkeit', type: 'date' },
|
||||||
{ name: PAYLOAD_TIME_H, label: 'Zeitschätzung (Stunden)', type: 'number' },
|
{ name: PAYLOAD_TIME_H, label: 'Zeitschätzung (Stunden)', type: 'number' },
|
||||||
|
|
@ -247,8 +255,9 @@ export function buildSyncFromClickUpList(args: {
|
||||||
if (inf) customInput.push(inf);
|
if (inf) customInput.push(inf);
|
||||||
if (tr) customTrigger.push(tr);
|
if (tr) customTrigger.push(tr);
|
||||||
const fid = String((f as ClickUpFieldLike).id ?? '');
|
const fid = String((f as ClickUpFieldLike).id ?? '');
|
||||||
if (fid && inf) {
|
const payloadKey = inf?.name;
|
||||||
customRefs[fid] = createRef(formNodeId, ['payload', inf.name]);
|
if (fid && payloadKey) {
|
||||||
|
customRefs[fid] = createRef(formNodeId, ['payload', payloadKey]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
import React, { useState, useCallback, useRef, useEffect, useMemo } from 'react';
|
import React, { useState, useCallback, useRef, useEffect, useMemo } from 'react';
|
||||||
import { FaFolder, FaFolderOpen, FaPlus, FaPen, FaTrash, FaChevronRight, FaGlobe, FaSyncAlt, FaDownload } from 'react-icons/fa';
|
import { FaFolder, FaFolderOpen, FaPlus, FaPen, FaTrash, FaChevronRight, FaGlobe, FaSyncAlt, FaDownload } from 'react-icons/fa';
|
||||||
import { usePrompt } from '../../hooks/usePrompt';
|
import { usePrompt, type PromptOptions } from '../../hooks/usePrompt';
|
||||||
import styles from './FolderTree.module.css';
|
import styles from './FolderTree.module.css';
|
||||||
|
|
||||||
/* ── Public types ──────────────────────────────────────────────────────── */
|
/* ── Public types ──────────────────────────────────────────────────────── */
|
||||||
|
|
@ -331,7 +331,7 @@ interface TreeNodeProps {
|
||||||
showFiles: boolean;
|
showFiles: boolean;
|
||||||
filesByFolder: Map<string, FileNode[]>;
|
filesByFolder: Map<string, FileNode[]>;
|
||||||
sel: SelectionCtx;
|
sel: SelectionCtx;
|
||||||
promptFolderName: (message: string) => Promise<string | null>;
|
promptFolderName: (message: string, options?: PromptOptions) => Promise<string | null>;
|
||||||
onToggle: (id: string) => void;
|
onToggle: (id: string) => void;
|
||||||
onSelect: (id: string | null) => void;
|
onSelect: (id: string | null) => void;
|
||||||
onCreateFolder?: (name: string, parentId: string | null) => Promise<void>;
|
onCreateFolder?: (name: string, parentId: string | null) => Promise<void>;
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
* // Render <PromptDialog /> once in the component tree.
|
* // Render <PromptDialog /> once in the component tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React, { useState, useCallback, useRef, useEffect } from 'react';
|
import React, { useState, useCallback, useRef } from 'react';
|
||||||
|
|
||||||
export interface PromptOptions {
|
export interface PromptOptions {
|
||||||
title?: string;
|
title?: string;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue