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
|
// 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).
|
* Fetch node types for the flow builder (backend-driven).
|
||||||
|
|
|
||||||
|
|
@ -107,7 +107,6 @@ export const FlowCanvas: React.FC<FlowCanvasProps> = ({
|
||||||
|
|
||||||
const w = NODE_WIDTH;
|
const w = NODE_WIDTH;
|
||||||
const h = NODE_HEIGHT;
|
const h = NODE_HEIGHT;
|
||||||
const centerX = node.x + w / 2;
|
|
||||||
const centerY = node.y + h / 2;
|
const centerY = node.y + h / 2;
|
||||||
|
|
||||||
if (isOutput) {
|
if (isOutput) {
|
||||||
|
|
@ -432,7 +431,6 @@ export const FlowCanvas: React.FC<FlowCanvasProps> = ({
|
||||||
const nt = nodeTypeMap[node.type];
|
const nt = nodeTypeMap[node.type];
|
||||||
const category = nt?.category ?? 'io';
|
const category = nt?.category ?? 'io';
|
||||||
const color = node.color ?? nt?.meta?.color ?? '#00BCD4';
|
const color = node.color ?? nt?.meta?.color ?? '#00BCD4';
|
||||||
const totalHandles = node.inputs + node.outputs;
|
|
||||||
const handles: Array<{ index: number; isOutput: boolean }> = [];
|
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.inputs; i++) handles.push({ index: i, isOutput: false });
|
||||||
for (let i = 0; i < node.outputs; i++) handles.push({ index: node.inputs + i, isOutput: true });
|
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 children = loadedChildren[entry.path] ?? [];
|
||||||
const folders = children.filter((c) => c.isFolder).sort((a, b) => a.name.localeCompare(b.name));
|
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 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 isLoading = isExpanded && loadingPaths.has(entry.path);
|
||||||
|
|
||||||
const handleRowClick = (e: React.MouseEvent) => {
|
const handleRowClick = (e: React.MouseEvent) => {
|
||||||
|
|
|
||||||
|
|
@ -269,8 +269,8 @@ const TaskCard: React.FC<TaskCardProps> = ({
|
||||||
case 'input.approval':
|
case 'input.approval':
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
{config.title && <h4>{config.title as string}</h4>}
|
{config.title != null && String(config.title) !== '' && <h4>{String(config.title)}</h4>}
|
||||||
{config.description && <p>{config.description as string}</p>}
|
{config.description != null && String(config.description) !== '' && <p>{String(config.description)}</p>}
|
||||||
<div className={styles.approvalButtons}>
|
<div className={styles.approvalButtons}>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
|
|
@ -356,14 +356,14 @@ const TaskCard: React.FC<TaskCardProps> = ({
|
||||||
onClick={() => onSubmit({ confirmed: true })}
|
onClick={() => onSubmit({ confirmed: true })}
|
||||||
disabled={submitting}
|
disabled={submitting}
|
||||||
>
|
>
|
||||||
{config.confirmLabel ?? 'Bestätigen'}
|
{typeof config.confirmLabel === 'string' ? config.confirmLabel : 'Bestätigen'}
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() => onSubmit({ confirmed: false })}
|
onClick={() => onSubmit({ confirmed: false })}
|
||||||
disabled={submitting}
|
disabled={submitting}
|
||||||
>
|
>
|
||||||
{config.rejectLabel ?? 'Ablehnen'}
|
{typeof config.rejectLabel === 'string' ? config.rejectLabel : 'Ablehnen'}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue