fix: resolve TypeScript build errors
All checks were successful
Deploy Nyla Frontend to Integration / deploy (push) Successful in 1m31s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
ValueOn AG 2026-06-09 23:40:43 +02:00
parent 6520763736
commit 5109279ebd
5 changed files with 9 additions and 20 deletions

View file

@ -73,7 +73,7 @@ export const ClickUpListPicker: React.FC<FieldRendererProps> = ({
setLoading(true);
setError(null);
try {
const res = await fetchBrowse(request, instanceId, connectionReference, 'clickup', path);
const res = await fetchBrowse(request, connectionReference, 'clickup', path);
setItems(res.items);
setBrowsePath(res.path || path);
} catch (err: unknown) {

View file

@ -134,10 +134,10 @@ export function useUserFiles() {
console.error('Error fetching permissions:', error);
const defaultPerms: UserPermissions = {
view: true,
read: 'my',
create: 'my',
update: 'my',
delete: 'my',
read: 'o',
create: 'o',
update: 'o',
delete: 'o',
};
setPermissions(defaultPerms);
return defaultPerms;

View file

@ -38,16 +38,7 @@ export function useCurrentUser() {
}
// JWT tokens are now stored in httpOnly cookies, so we fetch user data from API
// Determine the correct endpoint based on authentication authority
const authAuthority = sessionStorage.getItem('auth_authority');
let endpoint = '/api/local/me';
if (authAuthority === 'msft') {
endpoint = '/api/msft/me';
} else if (authAuthority === 'google') {
endpoint = '/api/google/me';
}
// Add a small delay to ensure cookies are properly set after authentication
if (authAuthority === 'msft' || authAuthority === 'google') {

View file

@ -30,7 +30,7 @@ async function _deleteWorkflowsSequential(
async function startWorkflowApi(
request: ApiRequestFunction,
instanceId: string,
_instanceId: string,
workflowData: StartWorkflowRequest,
options?: { workflowId?: string; workflowMode?: 'Dynamic' | 'Automation' },
) {
@ -106,7 +106,7 @@ export interface PaginationParams {
}
/** Get apiBaseUrl for workflow APIs (mandate-scoped) */
export function getWorkflowApiBaseUrl(instanceId: string | undefined, featureCode: string | undefined): string | undefined {
export function getWorkflowApiBaseUrl(_instanceId: string | undefined, featureCode: string | undefined): string | undefined {
if (!featureCode) return undefined;
if (featureCode === 'workflowAutomation') return `/api/workflow-automation`;
return undefined;

View file

@ -9,7 +9,7 @@
*/
import React, { useState, useCallback, useEffect, useMemo } from 'react';
import { useNavigate, useParams } from 'react-router-dom';
import { useNavigate } from 'react-router-dom';
import { FaCopy, FaSync, FaShareAlt, FaPen } from 'react-icons/fa';
import { usePrompt } from '../../../hooks/usePrompt';
import { FormGeneratorTable, type ColumnConfig } from '../../../components/FormGenerator';
@ -53,7 +53,7 @@ interface WorkflowTemplatesPageProps {
export const WorkflowTemplatesPage: React.FC<WorkflowTemplatesPageProps> = ({
persistentInstanceId,
persistentMandateId,
persistentMandateId: _persistentMandateId,
}) => {
const { t } = useLanguage();
@ -68,9 +68,7 @@ export const WorkflowTemplatesPage: React.FC<WorkflowTemplatesPageProps> = ({
);
const urlInstanceId = useInstanceId();
const { mandateId: urlMandateId } = useParams<{ mandateId: string }>();
const instanceId = persistentInstanceId || urlInstanceId;
const _mandateId = persistentMandateId || urlMandateId;
const { request } = useApiRequest();
const navigate = useNavigate();
const { showSuccess, showError } = useToast();