inital UI work on AFLOW-40

This commit is contained in:
2023-07-11 17:00:34 +02:00
parent cd37f096ca
commit ddb484cac9
5 changed files with 102 additions and 3 deletions

View File

@ -7,6 +7,7 @@ import testRoute from './test.js';
import dashboardRoute from './dashboard.js';
import itemsRoute from './items.js';
import manage_routes from './manage/index.js';
import project_routes from './projects/index.js';
// Router base is '/'
const Router = express.Router({ strict: false });
@ -14,11 +15,13 @@ const Router = express.Router({ strict: false });
Router.route('/test').get(testRoute.get);
Router.route('/items').get(itemsRoute.get);
Router.route('/:id(\\w{8})').get(skuRoute.get);
Router.use('/projects', project_routes); // has to be before skuRoute
Router.route('/:id(\\w{8})').get(skuRoute.get); // we should probably deprecate this
Router.route('/s/:id').get(skuRouteDash.get);
Router.use('/manage', manage_routes);
Router.route('/').get(dashboardRoute.get);
export default Router;

View File

@ -0,0 +1,9 @@
import express, { Request, Response } from 'express';
import { prisma, __path, log } from '../../../index.js';
function get(req: Request, res: Response) {
res.render(__path + '/src/frontend/projects/dashboard.eta.html');
}
export default { get };

View File

@ -0,0 +1,11 @@
import express from 'express';
// Route imports
import dashboard from './dashboard.js';
// Router base is '/manage'
const Router = express.Router({ strict: false });
Router.route('/').get(dashboard.get);
export default Router;