redone routes
This commit is contained in:
114
src/resource.config.ts
Normal file
114
src/resource.config.ts
Normal file
@@ -0,0 +1,114 @@
|
||||
import {
|
||||
contacts,
|
||||
contracts, costcentres, createddocuments,
|
||||
customers,
|
||||
files, filetags, folders, hourrates, inventoryitemgroups,
|
||||
inventoryitems, letterheads, ownaccounts,
|
||||
plants, productcategories, products,
|
||||
projects,
|
||||
projecttypes, servicecategories, services, spaces, tasks, texttemplates, units, vehicles,
|
||||
vendors
|
||||
} from "../db/schema";
|
||||
|
||||
export const resourceConfig = {
|
||||
projects: {
|
||||
searchColumns: ["name"],
|
||||
mtoLoad: ["customer","plant","contract","projecttype"],
|
||||
mtmLoad: ["tasks", "files"],
|
||||
table: projects
|
||||
},
|
||||
customers: {
|
||||
searchColumns: ["name", "customerNumber", "firstname", "lastname", "notes"],
|
||||
mtmLoad: ["contacts","projects"],
|
||||
table: customers,
|
||||
},
|
||||
contacts: {
|
||||
searchColumns: ["firstName", "lastName", "email", "phone", "notes"],
|
||||
table: contacts,
|
||||
mtoLoad: ["customer","vendor"]
|
||||
},
|
||||
contracts: {
|
||||
table: contracts,
|
||||
searchColumns: ["name", "notes", "contractNumber", "paymentType", "sepaRef", "bankingName"]
|
||||
},
|
||||
plants: {
|
||||
table: plants,
|
||||
mtoLoad: ["customer"],
|
||||
mtmLoad: ["projects","tasks","files"],
|
||||
},
|
||||
projecttypes: {
|
||||
table: projecttypes
|
||||
},
|
||||
vendors: {
|
||||
table: vendors,
|
||||
searchColumns: ["name","vendorNumber","notes","defaultPaymentType"],
|
||||
},
|
||||
files: {
|
||||
table: files
|
||||
},
|
||||
folders: {
|
||||
table: folders
|
||||
},
|
||||
filetags: {
|
||||
table: filetags
|
||||
},
|
||||
inventoryitems: {
|
||||
table: inventoryitems
|
||||
},
|
||||
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"],
|
||||
},
|
||||
ownaccounts: {
|
||||
table: ownaccounts,
|
||||
searchColumns: ["name","description","number"],
|
||||
},
|
||||
costcentres: {
|
||||
table: costcentres,
|
||||
searchColumns: ["name","number","description"],
|
||||
mtoLoad: ["vehicle","project","inventoryitem"]
|
||||
},
|
||||
tasks: {
|
||||
table: tasks,
|
||||
},
|
||||
letterheads: {
|
||||
table: letterheads,
|
||||
|
||||
},
|
||||
createddocuments: {
|
||||
table: createddocuments,
|
||||
mtoLoad: ["customer", "project", "contact", "contract", "plant","letterhead",]
|
||||
},
|
||||
texttemplates: {
|
||||
table: texttemplates
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user