Added Entity Wiki
This commit is contained in:
@@ -4,22 +4,51 @@ import { and, eq, isNull, asc, inArray } from "drizzle-orm"
|
||||
import {
|
||||
wikiPages,
|
||||
authUsers,
|
||||
// Bereits vorhanden
|
||||
customers,
|
||||
projects,
|
||||
plants,
|
||||
products,
|
||||
inventoryitems,
|
||||
// ... weitere Schemas hier importieren
|
||||
// NEU HINZUGEFÜGT (Basierend auf deinem DataStore)
|
||||
tasks,
|
||||
contacts,
|
||||
contracts,
|
||||
vehicles,
|
||||
vendors,
|
||||
spaces,
|
||||
inventoryitemgroups,
|
||||
services,
|
||||
hourrates,
|
||||
events,
|
||||
productcategories,
|
||||
servicecategories,
|
||||
ownaccounts
|
||||
} from "../../db/schema/"
|
||||
|
||||
// Konfiguration: Welche Entitäten sollen im Wiki auftauchen?
|
||||
const ENTITY_CONFIG: Record<string, { table: any, labelField: any, rootLabel: string, idField: 'id' | 'uuid' }> = {
|
||||
// --- BEREITS VORHANDEN ---
|
||||
'customers': { table: customers, labelField: customers.name, rootLabel: 'Kunden', idField: 'id' },
|
||||
'projects': { table: projects, labelField: projects.name, rootLabel: 'Projekte', idField: 'id' },
|
||||
'plants': { table: plants, labelField: plants.name, rootLabel: 'Objekte', idField: 'id' },
|
||||
'products': { table: products, labelField: products.name, rootLabel: 'Artikel', idField: 'id' },
|
||||
'inventoryitems': { table: inventoryitems, labelField: inventoryitems.name, rootLabel: 'Inventarartikel', idField: 'id' },
|
||||
// Hier weitere hinzufügen (z.B. vehicles, products...)
|
||||
|
||||
// --- NEU BASIEREND AUF DATASTORE ---
|
||||
'tasks': { table: tasks, labelField: tasks.name, rootLabel: 'Aufgaben', idField: 'id' },
|
||||
'contacts': { table: contacts, labelField: contacts.fullName, rootLabel: 'Kontakte', idField: 'id' },
|
||||
'contracts': { table: contracts, labelField: contracts.name, rootLabel: 'Verträge', idField: 'id' },
|
||||
'vehicles': { table: vehicles, labelField: vehicles.license_plate, rootLabel: 'Fahrzeuge', idField: 'id' },
|
||||
'vendors': { table: vendors, labelField: vendors.name, rootLabel: 'Lieferanten', idField: 'id' },
|
||||
'spaces': { table: spaces, labelField: spaces.name, rootLabel: 'Lagerplätze', idField: 'id' },
|
||||
'inventoryitemgroups': { table: inventoryitemgroups, labelField: inventoryitemgroups.name, rootLabel: 'Inventarartikelgruppen', idField: 'id' },
|
||||
'services': { table: services, labelField: services.name, rootLabel: 'Leistungen', idField: 'id' },
|
||||
'hourrates': { table: hourrates, labelField: hourrates.name, rootLabel: 'Stundensätze', idField: 'id' },
|
||||
'events': { table: events, labelField: events.name, rootLabel: 'Termine', idField: 'id' },
|
||||
'productcategories': { table: productcategories, labelField: productcategories.name, rootLabel: 'Artikelkategorien', idField: 'id' },
|
||||
'servicecategories': { table: servicecategories, labelField: servicecategories.name, rootLabel: 'Leistungskategorien', idField: 'id' },
|
||||
'ownaccounts': { table: ownaccounts, labelField: ownaccounts.name, rootLabel: 'Zusätzliche Buchungskonten', idField: 'id' },
|
||||
}
|
||||
|
||||
// Types
|
||||
|
||||
@@ -155,7 +155,7 @@ export const useDataStore = defineStore('data', () => {
|
||||
"Allgemeines",
|
||||
"Zuweisungen"
|
||||
],
|
||||
showTabs: [{label: 'Informationen'}]
|
||||
showTabs: [{label: 'Informationen'},{label: 'Wiki'}]
|
||||
},
|
||||
customers: {
|
||||
isArchivable: true,
|
||||
@@ -417,7 +417,7 @@ export const useDataStore = defineStore('data', () => {
|
||||
inputColumn: "Allgemeines"
|
||||
},*/
|
||||
],
|
||||
showTabs: [{label: 'Informationen'},{label: 'Ansprechpartner'},{label: 'Dateien'},{label: 'Ausgangsbelege'},{label: 'Projekte'},{label: 'Objekte'},{label: 'Termine'},{label: 'Verträge'}]
|
||||
showTabs: [{label: 'Informationen'},{label: 'Ansprechpartner'},{label: 'Dateien'},{label: 'Ausgangsbelege'},{label: 'Projekte'},{label: 'Objekte'},{label: 'Termine'},{label: 'Verträge'},{label: 'Wiki'}]
|
||||
},
|
||||
contacts: {
|
||||
isArchivable: true,
|
||||
@@ -539,6 +539,8 @@ export const useDataStore = defineStore('data', () => {
|
||||
showTabs:[
|
||||
{
|
||||
label: 'Informationen',
|
||||
},{
|
||||
label: 'Wiki',
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -710,7 +712,7 @@ export const useDataStore = defineStore('data', () => {
|
||||
inputType: "textarea",
|
||||
}
|
||||
],
|
||||
showTabs: [{label: 'Informationen'},{label: 'Dateien'}]
|
||||
showTabs: [{label: 'Informationen'},{label: 'Dateien'},{label: 'Wiki'}]
|
||||
},
|
||||
absencerequests: {
|
||||
isArchivable: true,
|
||||
@@ -1111,6 +1113,8 @@ export const useDataStore = defineStore('data', () => {
|
||||
label: "Ausgangsbelege"
|
||||
},{
|
||||
label: "Termine"
|
||||
},{
|
||||
label: "Wiki"
|
||||
}/*,{
|
||||
key: "timetracking",
|
||||
label: "Zeiterfassung"
|
||||
@@ -1223,6 +1227,8 @@ export const useDataStore = defineStore('data', () => {
|
||||
label: 'Dateien',
|
||||
}, {
|
||||
label: 'Überprüfungen',
|
||||
}, {
|
||||
label: 'Wiki',
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -1372,6 +1378,8 @@ export const useDataStore = defineStore('data', () => {
|
||||
label: 'Ansprechpartner',
|
||||
}, {
|
||||
label: 'Dateien',
|
||||
}, {
|
||||
label: 'Wiki',
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -1506,7 +1514,7 @@ export const useDataStore = defineStore('data', () => {
|
||||
label: 'Informationen',
|
||||
}, {
|
||||
label: 'Dateien',
|
||||
},{label: 'Inventarartikel'}
|
||||
},{label: 'Inventarartikel'},{label: 'Wiki'}
|
||||
]
|
||||
},
|
||||
users: {
|
||||
@@ -1767,6 +1775,8 @@ export const useDataStore = defineStore('data', () => {
|
||||
label: 'Informationen',
|
||||
}, {
|
||||
label: 'Dateien',
|
||||
}, {
|
||||
label: 'Wiki',
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -1834,6 +1844,8 @@ export const useDataStore = defineStore('data', () => {
|
||||
showTabs: [
|
||||
{
|
||||
label: 'Informationen',
|
||||
},{
|
||||
label: 'Wiki',
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -2032,6 +2044,8 @@ export const useDataStore = defineStore('data', () => {
|
||||
showTabs: [
|
||||
{
|
||||
label: 'Informationen',
|
||||
},{
|
||||
label: 'Wiki',
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -2081,6 +2095,8 @@ export const useDataStore = defineStore('data', () => {
|
||||
showTabs: [
|
||||
{
|
||||
label: 'Informationen',
|
||||
},{
|
||||
label: 'Wiki',
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -2204,7 +2220,8 @@ export const useDataStore = defineStore('data', () => {
|
||||
],
|
||||
showTabs: [
|
||||
{
|
||||
label: 'Informationen',}
|
||||
label: 'Informationen',},{
|
||||
label: 'Wiki',}
|
||||
]
|
||||
},
|
||||
profiles: {
|
||||
@@ -2272,6 +2289,8 @@ export const useDataStore = defineStore('data', () => {
|
||||
showTabs: [
|
||||
{
|
||||
label: 'Informationen',
|
||||
},{
|
||||
label: 'Wiki',
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -2312,6 +2331,8 @@ export const useDataStore = defineStore('data', () => {
|
||||
showTabs: [
|
||||
{
|
||||
label: 'Informationen',
|
||||
},{
|
||||
label: 'Wiki',
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -2540,7 +2561,9 @@ export const useDataStore = defineStore('data', () => {
|
||||
inputColumn: "Allgemeines"
|
||||
},*/
|
||||
],
|
||||
showTabs: [{label: 'Informationen'},{label: 'Buchungen'}]
|
||||
showTabs: [{label: 'Informationen'},{label: 'Buchungen'},{
|
||||
label: 'Wiki',
|
||||
}]
|
||||
},
|
||||
bankaccounts: {
|
||||
label: "Bankkonten",
|
||||
|
||||
Reference in New Issue
Block a user