fix: build errors
This commit is contained in:
parent
896f7b5968
commit
437c79909f
4 changed files with 5 additions and 8 deletions
|
|
@ -101,7 +101,7 @@ export interface Automation2Workflow {
|
|||
// API FUNCTIONS
|
||||
// ============================================================================
|
||||
|
||||
export type ApiRequestFunction = (options: ApiRequestOptions) => Promise<any>;
|
||||
export type ApiRequestFunction = (options: ApiRequestOptions<any>) => Promise<any>;
|
||||
|
||||
/**
|
||||
* Fetch node types for the flow builder (backend-driven).
|
||||
|
|
|
|||
|
|
@ -107,7 +107,6 @@ export const FlowCanvas: React.FC<FlowCanvasProps> = ({
|
|||
|
||||
const w = NODE_WIDTH;
|
||||
const h = NODE_HEIGHT;
|
||||
const centerX = node.x + w / 2;
|
||||
const centerY = node.y + h / 2;
|
||||
|
||||
if (isOutput) {
|
||||
|
|
@ -432,7 +431,6 @@ export const FlowCanvas: React.FC<FlowCanvasProps> = ({
|
|||
const nt = nodeTypeMap[node.type];
|
||||
const category = nt?.category ?? 'io';
|
||||
const color = node.color ?? nt?.meta?.color ?? '#00BCD4';
|
||||
const totalHandles = node.inputs + node.outputs;
|
||||
const handles: Array<{ index: number; isOutput: boolean }> = [];
|
||||
for (let i = 0; i < node.inputs; i++) handles.push({ index: i, isOutput: false });
|
||||
for (let i = 0; i < node.outputs; i++) handles.push({ index: node.inputs + i, isOutput: true });
|
||||
|
|
|
|||
|
|
@ -101,7 +101,6 @@ function _FolderRow({
|
|||
const children = loadedChildren[entry.path] ?? [];
|
||||
const folders = children.filter((c) => c.isFolder).sort((a, b) => a.name.localeCompare(b.name));
|
||||
const files = children.filter((c) => !c.isFolder).sort((a, b) => a.name.localeCompare(b.name));
|
||||
const hasChildren = folders.length > 0 || files.length > 0;
|
||||
const isLoading = isExpanded && loadingPaths.has(entry.path);
|
||||
|
||||
const handleRowClick = (e: React.MouseEvent) => {
|
||||
|
|
|
|||
|
|
@ -269,8 +269,8 @@ const TaskCard: React.FC<TaskCardProps> = ({
|
|||
case 'input.approval':
|
||||
return (
|
||||
<div>
|
||||
{config.title && <h4>{config.title as string}</h4>}
|
||||
{config.description && <p>{config.description as string}</p>}
|
||||
{config.title != null && String(config.title) !== '' && <h4>{String(config.title)}</h4>}
|
||||
{config.description != null && String(config.description) !== '' && <p>{String(config.description)}</p>}
|
||||
<div className={styles.approvalButtons}>
|
||||
<button
|
||||
type="button"
|
||||
|
|
@ -356,14 +356,14 @@ const TaskCard: React.FC<TaskCardProps> = ({
|
|||
onClick={() => onSubmit({ confirmed: true })}
|
||||
disabled={submitting}
|
||||
>
|
||||
{config.confirmLabel ?? 'Bestätigen'}
|
||||
{typeof config.confirmLabel === 'string' ? config.confirmLabel : 'Bestätigen'}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => onSubmit({ confirmed: false })}
|
||||
disabled={submitting}
|
||||
>
|
||||
{config.rejectLabel ?? 'Ablehnen'}
|
||||
{typeof config.rejectLabel === 'string' ? config.rejectLabel : 'Ablehnen'}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue