From c89d96c6b0904500ffab31b0edd12e2cdba15639 Mon Sep 17 00:00:00 2001
From: ValueOn AG
Date: Tue, 14 Apr 2026 00:22:01 +0200
Subject: [PATCH] added syscreatedat in trustee
---
src/components/UiComponents/Button/ButtonTypes.ts | 2 +-
src/pages/views/trustee/TrusteeDocumentsView.tsx | 15 +++++++++++++--
src/pages/views/trustee/TrusteePositionsView.tsx | 9 ++++-----
3 files changed, 18 insertions(+), 8 deletions(-)
diff --git a/src/components/UiComponents/Button/ButtonTypes.ts b/src/components/UiComponents/Button/ButtonTypes.ts
index 3bee1ee..3458cf0 100644
--- a/src/components/UiComponents/Button/ButtonTypes.ts
+++ b/src/components/UiComponents/Button/ButtonTypes.ts
@@ -1,6 +1,6 @@
import { IconType } from 'react-icons';
-export type ButtonVariant = 'primary' | 'secondary' | 'danger' | 'success' | 'warning';
+export type ButtonVariant = 'primary' | 'secondary' | 'danger' | 'success' | 'warning' | 'ghost';
export type ButtonSize = 'sm' | 'md' | 'lg';
export interface BaseButtonProps {
diff --git a/src/pages/views/trustee/TrusteeDocumentsView.tsx b/src/pages/views/trustee/TrusteeDocumentsView.tsx
index f1ab67b..2e52944 100644
--- a/src/pages/views/trustee/TrusteeDocumentsView.tsx
+++ b/src/pages/views/trustee/TrusteeDocumentsView.tsx
@@ -57,9 +57,10 @@ export const TrusteeDocumentsView: React.FC = () => {
}
}, [instanceId]);
- // Generate columns from attributes
+ const documentColumnOrder = ['sysCreatedAt'];
+
const columns = useMemo(() => {
- return (attributes || []).map(attr => ({
+ const allCols = (attributes || []).map(attr => ({
key: attr.name,
label: attr.label || attr.name,
type: attr.type as any,
@@ -70,6 +71,16 @@ export const TrusteeDocumentsView: React.FC = () => {
minWidth: attr.minWidth || 100,
maxWidth: attr.maxWidth || 400,
}));
+ const byKey = new Map(allCols.map(c => [c.key, c]));
+ const ordered: typeof allCols = [];
+ for (const key of documentColumnOrder) {
+ const col = byKey.get(key);
+ if (col) { ordered.push(col); byKey.delete(key); }
+ }
+ for (const col of allCols) {
+ if (byKey.has(col.key)) ordered.push(col);
+ }
+ return ordered;
}, [attributes]);
// Check permissions
diff --git a/src/pages/views/trustee/TrusteePositionsView.tsx b/src/pages/views/trustee/TrusteePositionsView.tsx
index fec99a0..3d6f192 100644
--- a/src/pages/views/trustee/TrusteePositionsView.tsx
+++ b/src/pages/views/trustee/TrusteePositionsView.tsx
@@ -257,12 +257,11 @@ export const TrusteePositionsView: React.FC = () => {
[syncByPosition]
);
- // Desired column order: Belege (icons), Sync-Status, Erstellt am, Valuta, Tags, Company, then the rest
const positionColumnOrder = [
- '_documentRefs', // Belege (download icons)
- '_syncStatus', // Sync-Status
- 'sysCreatedAt', // Erstellt am
- 'valuta', // Valuta date
+ 'sysCreatedAt',
+ '_documentRefs',
+ '_syncStatus',
+ 'valuta',
'tags',
'company',
];