fixes
This commit is contained in:
parent
af9e827efc
commit
861bec31cb
6 changed files with 6 additions and 8 deletions
|
|
@ -47,7 +47,7 @@ import { AccessManagementHub, AdminMandatesPage, AdminUsersPage, AdminUserMandat
|
|||
import { PromptsPage, FilesPage, ConnectionsPage } from './pages/basedata';
|
||||
|
||||
// Billing Pages
|
||||
import { BillingDashboard, BillingDataView, BillingAdmin } from './pages/billing';
|
||||
import { BillingDataView, BillingAdmin } from './pages/billing';
|
||||
|
||||
function App() {
|
||||
// Load saved theme preference and set app name on app mount
|
||||
|
|
|
|||
|
|
@ -319,7 +319,7 @@ const _renderPieChart = (section: ReportSectionPieChart, currencyCode: string):
|
|||
))}
|
||||
</Pie>
|
||||
<Tooltip
|
||||
formatter={(value: number, name: string) => [formatter(value), name]}
|
||||
formatter={(value: number | undefined, name: string | undefined) => [formatter(value ?? 0), name ?? '']}
|
||||
/>
|
||||
<Legend
|
||||
formatter={(value: string) => {
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import {
|
|||
updatePrompt as updatePromptApi,
|
||||
deletePrompt as deletePromptApi,
|
||||
type Prompt,
|
||||
type UpdatePromptData,
|
||||
type AttributeDefinition,
|
||||
type PaginationParams
|
||||
} from '../api/promptApi';
|
||||
|
|
@ -531,7 +532,7 @@ export function usePromptOperations() {
|
|||
// Pass all provided fields (supports partial inline updates like isSystem toggle)
|
||||
const { id, mandateId, _createdBy, _createdAt, _modifiedAt, _permissions, ...requestBody } = updateData;
|
||||
|
||||
const updatedPrompt = await updatePromptApi(request, promptId, requestBody);
|
||||
const updatedPrompt = await updatePromptApi(request, promptId, requestBody as UpdatePromptData);
|
||||
|
||||
return { success: true, promptData: updatedPrompt };
|
||||
} catch (error: any) {
|
||||
|
|
|
|||
|
|
@ -89,9 +89,7 @@ export const FilesPage: React.FC = () => {
|
|||
width: 150,
|
||||
minWidth: 100,
|
||||
maxWidth: 250,
|
||||
fkSource: '/api/users/',
|
||||
fkDisplayField: 'username',
|
||||
});
|
||||
} as any);
|
||||
|
||||
return cols;
|
||||
}, [attributes]);
|
||||
|
|
|
|||
|
|
@ -380,7 +380,7 @@ const AccountsOverview: React.FC<AccountsOverviewProps> = ({ accounts, users, lo
|
|||
|
||||
export const BillingAdmin: React.FC = () => {
|
||||
const [selectedMandateId, setSelectedMandateId] = useState<string | null>(null);
|
||||
const { settings, accounts, users, loading, loadSettings, saveSettings, addCredit, loadAccounts } = useBillingAdmin(selectedMandateId || undefined);
|
||||
const { settings, accounts, users, loading, saveSettings, addCredit, loadAccounts } = useBillingAdmin(selectedMandateId || undefined);
|
||||
|
||||
const handleMandateSelect = (mandateId: string) => {
|
||||
setSelectedMandateId(mandateId || null);
|
||||
|
|
|
|||
|
|
@ -164,7 +164,6 @@ export const BillingDashboard: React.FC = () => {
|
|||
balances,
|
||||
statistics,
|
||||
loading,
|
||||
loadBalances,
|
||||
loadStatistics
|
||||
} = useBilling();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue