174 lines
4.3 KiB
TypeScript
174 lines
4.3 KiB
TypeScript
import {
|
|
accounts,
|
|
bankaccounts,
|
|
bankrequisitions,
|
|
bankstatements,
|
|
contacts,
|
|
contracts,
|
|
costcentres,
|
|
createddocuments,
|
|
customers,
|
|
files,
|
|
filetags,
|
|
folders,
|
|
hourrates,
|
|
incominginvoices,
|
|
inventoryitemgroups,
|
|
inventoryitems,
|
|
letterheads,
|
|
ownaccounts,
|
|
plants,
|
|
productcategories,
|
|
products,
|
|
projects,
|
|
projecttypes,
|
|
serialExecutions,
|
|
servicecategories,
|
|
services,
|
|
spaces,
|
|
statementallocations,
|
|
tasks,
|
|
texttemplates,
|
|
units,
|
|
vehicles,
|
|
vendors
|
|
} from "../../db/schema";
|
|
|
|
export const resourceConfig = {
|
|
projects: {
|
|
searchColumns: ["name"],
|
|
mtoLoad: ["customer","plant","contract","projecttype"],
|
|
mtmLoad: ["tasks", "files","createddocuments"],
|
|
table: projects,
|
|
numberRangeHolder: "projectNumber"
|
|
},
|
|
customers: {
|
|
searchColumns: ["name", "customerNumber", "firstname", "lastname", "notes"],
|
|
mtmLoad: ["contacts","projects","plants","createddocuments","contracts"],
|
|
table: customers,
|
|
numberRangeHolder: "customerNumber",
|
|
},
|
|
contacts: {
|
|
searchColumns: ["firstName", "lastName", "email", "phone", "notes"],
|
|
table: contacts,
|
|
mtoLoad: ["customer","vendor"]
|
|
},
|
|
contracts: {
|
|
table: contracts,
|
|
searchColumns: ["name", "notes", "contractNumber", "paymentType", "sepaRef", "bankingName"],
|
|
numberRangeHolder: "contractNumber",
|
|
},
|
|
plants: {
|
|
table: plants,
|
|
mtoLoad: ["customer"],
|
|
mtmLoad: ["projects","tasks","files"],
|
|
},
|
|
projecttypes: {
|
|
table: projecttypes
|
|
},
|
|
vendors: {
|
|
table: vendors,
|
|
searchColumns: ["name","vendorNumber","notes","defaultPaymentType"],
|
|
numberRangeHolder: "vendorNumber",
|
|
},
|
|
files: {
|
|
table: files
|
|
},
|
|
folders: {
|
|
table: folders
|
|
},
|
|
filetags: {
|
|
table: filetags
|
|
},
|
|
inventoryitems: {
|
|
table: inventoryitems,
|
|
numberRangeHolder: "articleNumber",
|
|
},
|
|
inventoryitemgroups: {
|
|
table: inventoryitemgroups
|
|
},
|
|
products: {
|
|
table: products,
|
|
searchColumns: ["name","manufacturer","ean","barcode","description","manfacturer_number","article_number"],
|
|
},
|
|
productcategories: {
|
|
table: productcategories
|
|
},
|
|
services: {
|
|
table: services,
|
|
mtoLoad: ["unit"],
|
|
searchColumns: ["name","description"],
|
|
},
|
|
servicecategories: {
|
|
table: servicecategories
|
|
},
|
|
units: {
|
|
table: units,
|
|
},
|
|
vehicles: {
|
|
table: vehicles,
|
|
searchColumns: ["name","license_plate","vin","color"],
|
|
},
|
|
hourrates: {
|
|
table: hourrates,
|
|
searchColumns: ["name"],
|
|
},
|
|
spaces: {
|
|
table: spaces,
|
|
searchColumns: ["name","space_number","type","info_data"],
|
|
numberRangeHolder: "spaceNumber",
|
|
},
|
|
ownaccounts: {
|
|
table: ownaccounts,
|
|
searchColumns: ["name","description","number"],
|
|
},
|
|
costcentres: {
|
|
table: costcentres,
|
|
searchColumns: ["name","number","description"],
|
|
mtoLoad: ["vehicle","project","inventoryitem"],
|
|
numberRangeHolder: "number",
|
|
},
|
|
tasks: {
|
|
table: tasks,
|
|
},
|
|
letterheads: {
|
|
table: letterheads,
|
|
|
|
},
|
|
createddocuments: {
|
|
table: createddocuments,
|
|
mtoLoad: ["customer", "project", "contact", "contract", "plant","letterhead","createddocument"],
|
|
mtmLoad: ["statementallocations","files","createddocuments"],
|
|
mtmListLoad: ["statementallocations"],
|
|
},
|
|
texttemplates: {
|
|
table: texttemplates
|
|
},
|
|
incominginvoices: {
|
|
table: incominginvoices,
|
|
mtmLoad: ["statementallocations","files"],
|
|
mtmListLoad: ["statementallocations"],
|
|
mtoLoad: ["vendor"],
|
|
},
|
|
statementallocations: {
|
|
table: statementallocations,
|
|
mtoLoad: ["customer","vendor","incominginvoice","createddocument","ownaccount","bankstatement"]
|
|
},
|
|
accounts: {
|
|
table: accounts,
|
|
},
|
|
bankstatements: {
|
|
table: bankstatements,
|
|
mtmListLoad: ["statementallocations"],
|
|
mtmLoad: ["statementallocations"],
|
|
},
|
|
bankaccounts: {
|
|
table: bankaccounts,
|
|
},
|
|
bankrequisitions: {
|
|
table: bankrequisitions,
|
|
},
|
|
serialexecutions: {
|
|
table: serialExecutions
|
|
}
|
|
} |