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