|
|
@@ -55,7 +55,7 @@ const ShopsSchema = require('./schema/shops.js');
|
|
|
const Stocktaking_itemsSchema = require('./schema/stocktaking_items.js');
|
|
|
const StocktakingSchema = require('./schema/stocktaking.js');
|
|
|
const SupaddressSchema = require('./schema/supaddress.js');
|
|
|
-const SuppliersSchema = require('./schema/suppliers.js');
|
|
|
+// const SuppliersSchema = require('./schema/suppliers.js');
|
|
|
const SysparamsSchema = require('./schema/sysparams.js');
|
|
|
const SysprivilegesSchema = require('./schema/sysprivileges.js');
|
|
|
const TagtemplateobjectsSchema = require('./schema/tagtemplateobjects.js');
|
|
|
@@ -67,15 +67,14 @@ const UpgradelogSchema = require('./schema/upgradelog.js');
|
|
|
const VatSchema = require('./schema/vat.js');
|
|
|
//const Logger = require('@keystonejs/logger').logger('test');
|
|
|
|
|
|
-
|
|
|
// ??? const initialiseData = require('./initial-data');
|
|
|
|
|
|
const { KnexAdapter: Adapter } = require('@keystonejs/adapter-knex');
|
|
|
|
|
|
const PROJECT_NAME = 'SchuStock';
|
|
|
const adapterConfig = { knexOptions: {
|
|
|
- //connection: 'postgresql://kdev_postgres:utnQ67pt74bVw6aB@postgres:5432/kdev_postgres',
|
|
|
- connection: 'postgresql://kdev_postgres:utnQ67pt74bVw6aB@54.37.131.206:5432/kdev_postgres',
|
|
|
+ connection: 'postgresql://kdev_postgres:utnQ67pt74bVw6aB@postgres:5432/kdev_postgres',
|
|
|
+ //connection: 'postgresql://kdev_postgres:utnQ67pt74bVw6aB@54.37.131.206:5432/kdev_postgres',
|
|
|
}
|
|
|
};
|
|
|
|
|
|
@@ -152,6 +151,7 @@ keystone.createList('User', {
|
|
|
},
|
|
|
},
|
|
|
// List-level access controls
|
|
|
+/*
|
|
|
access: {
|
|
|
read: access.userIsAdminOrOwner,
|
|
|
update: access.userIsAdminOrOwner,
|
|
|
@@ -159,6 +159,7 @@ keystone.createList('User', {
|
|
|
delete: access.userIsAdmin,
|
|
|
auth: true,
|
|
|
},
|
|
|
+*/
|
|
|
});
|
|
|
|
|
|
const authStrategy = keystone.createAuthStrategy({
|
|
|
@@ -167,10 +168,11 @@ const authStrategy = keystone.createAuthStrategy({
|
|
|
});
|
|
|
|
|
|
|
|
|
-keystone.createList('cashregisters', CashregistersSchema);
|
|
|
-keystone.createList('cashregisterdocs', CashregisterdocsSchema);
|
|
|
+//keystone.createList('cashregisters', CashregistersSchema);
|
|
|
+//keystone.createList('cashregisterdocs', CashregisterdocsSchema);
|
|
|
keystone.createList('companies', CompaniesSchema);
|
|
|
keystone.createList('currency', CurrencySchema);
|
|
|
+/*
|
|
|
keystone.createList('deliveryitems', DeliveryitemsSchema);
|
|
|
keystone.createList('deliverymaterialprices', DeliverymaterialpricesSchema);
|
|
|
keystone.createList('docflow', DocflowSchema);
|
|
|
@@ -219,7 +221,7 @@ keystone.createList('uninumbers', UninumbersSchema);
|
|
|
keystone.createList('uom', UomSchema);
|
|
|
keystone.createList('upgradelog', UpgradelogSchema);
|
|
|
keystone.createList('vat', VatSchema);
|
|
|
-
|
|
|
+*/
|
|
|
|
|
|
//console.log(keystone._providers);
|
|
|
/*
|
|
|
@@ -271,12 +273,15 @@ module.exports = {
|
|
|
keystone,
|
|
|
apps: [
|
|
|
new GraphQLApp(),
|
|
|
- new StaticApp({ path: '/', src: 'public' }),
|
|
|
+ new StaticApp({ path: '/', src: 'dist/public' }),
|
|
|
+ new AdminUIApp(),
|
|
|
+/*
|
|
|
new AdminUIApp({
|
|
|
name: 'SchuStocc',
|
|
|
enableDefaultRoute: true,
|
|
|
authStrategy,
|
|
|
}),
|
|
|
+*/
|
|
|
],
|
|
|
/*configureExpress: app => {
|
|
|
app.set('trust proxy', true);
|