fix: resolve TypeScript build errors
All checks were successful
Deploy Nyla Frontend to Integration / deploy (push) Successful in 1m31s
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:
parent
6520763736
commit
5109279ebd
5 changed files with 9 additions and 20 deletions
|
|
@ -73,7 +73,7 @@ export const ClickUpListPicker: React.FC<FieldRendererProps> = ({
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
setError(null);
|
setError(null);
|
||||||
try {
|
try {
|
||||||
const res = await fetchBrowse(request, instanceId, connectionReference, 'clickup', path);
|
const res = await fetchBrowse(request, connectionReference, 'clickup', path);
|
||||||
setItems(res.items);
|
setItems(res.items);
|
||||||
setBrowsePath(res.path || path);
|
setBrowsePath(res.path || path);
|
||||||
} catch (err: unknown) {
|
} catch (err: unknown) {
|
||||||
|
|
|
||||||
|
|
@ -134,10 +134,10 @@ export function useUserFiles() {
|
||||||
console.error('Error fetching permissions:', error);
|
console.error('Error fetching permissions:', error);
|
||||||
const defaultPerms: UserPermissions = {
|
const defaultPerms: UserPermissions = {
|
||||||
view: true,
|
view: true,
|
||||||
read: 'my',
|
read: 'o',
|
||||||
create: 'my',
|
create: 'o',
|
||||||
update: 'my',
|
update: 'o',
|
||||||
delete: 'my',
|
delete: 'o',
|
||||||
};
|
};
|
||||||
setPermissions(defaultPerms);
|
setPermissions(defaultPerms);
|
||||||
return defaultPerms;
|
return defaultPerms;
|
||||||
|
|
|
||||||
|
|
@ -38,16 +38,7 @@ export function useCurrentUser() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// JWT tokens are now stored in httpOnly cookies, so we fetch user data from API
|
// 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');
|
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
|
// Add a small delay to ensure cookies are properly set after authentication
|
||||||
if (authAuthority === 'msft' || authAuthority === 'google') {
|
if (authAuthority === 'msft' || authAuthority === 'google') {
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ async function _deleteWorkflowsSequential(
|
||||||
|
|
||||||
async function startWorkflowApi(
|
async function startWorkflowApi(
|
||||||
request: ApiRequestFunction,
|
request: ApiRequestFunction,
|
||||||
instanceId: string,
|
_instanceId: string,
|
||||||
workflowData: StartWorkflowRequest,
|
workflowData: StartWorkflowRequest,
|
||||||
options?: { workflowId?: string; workflowMode?: 'Dynamic' | 'Automation' },
|
options?: { workflowId?: string; workflowMode?: 'Dynamic' | 'Automation' },
|
||||||
) {
|
) {
|
||||||
|
|
@ -106,7 +106,7 @@ export interface PaginationParams {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Get apiBaseUrl for workflow APIs (mandate-scoped) */
|
/** 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) return undefined;
|
||||||
if (featureCode === 'workflowAutomation') return `/api/workflow-automation`;
|
if (featureCode === 'workflowAutomation') return `/api/workflow-automation`;
|
||||||
return undefined;
|
return undefined;
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React, { useState, useCallback, useEffect, useMemo } from 'react';
|
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 { FaCopy, FaSync, FaShareAlt, FaPen } from 'react-icons/fa';
|
||||||
import { usePrompt } from '../../../hooks/usePrompt';
|
import { usePrompt } from '../../../hooks/usePrompt';
|
||||||
import { FormGeneratorTable, type ColumnConfig } from '../../../components/FormGenerator';
|
import { FormGeneratorTable, type ColumnConfig } from '../../../components/FormGenerator';
|
||||||
|
|
@ -53,7 +53,7 @@ interface WorkflowTemplatesPageProps {
|
||||||
|
|
||||||
export const WorkflowTemplatesPage: React.FC<WorkflowTemplatesPageProps> = ({
|
export const WorkflowTemplatesPage: React.FC<WorkflowTemplatesPageProps> = ({
|
||||||
persistentInstanceId,
|
persistentInstanceId,
|
||||||
persistentMandateId,
|
persistentMandateId: _persistentMandateId,
|
||||||
}) => {
|
}) => {
|
||||||
const { t } = useLanguage();
|
const { t } = useLanguage();
|
||||||
|
|
||||||
|
|
@ -68,9 +68,7 @@ export const WorkflowTemplatesPage: React.FC<WorkflowTemplatesPageProps> = ({
|
||||||
);
|
);
|
||||||
|
|
||||||
const urlInstanceId = useInstanceId();
|
const urlInstanceId = useInstanceId();
|
||||||
const { mandateId: urlMandateId } = useParams<{ mandateId: string }>();
|
|
||||||
const instanceId = persistentInstanceId || urlInstanceId;
|
const instanceId = persistentInstanceId || urlInstanceId;
|
||||||
const _mandateId = persistentMandateId || urlMandateId;
|
|
||||||
const { request } = useApiRequest();
|
const { request } = useApiRequest();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const { showSuccess, showError } = useToast();
|
const { showSuccess, showError } = useToast();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue