inital UI work on AFLOW-40
This commit is contained in:
parent
cd37f096ca
commit
ddb484cac9
@ -81,15 +81,37 @@
|
|||||||
</li> -->
|
</li> -->
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<h6 class="sidebar-heading d-flex justify-content-between align-items-center px-3 mt-4 mb-1 text-muted">
|
||||||
|
<a href="/projects/" class="nav-link"
|
||||||
|
>Projects<span class="badge rounded-pill bg-primary" >
|
||||||
|
Alpha
|
||||||
|
<span class="visually-hidden">Alpha feature</span>
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
</h6>
|
||||||
|
<ul class="nav flex-column mb-2">
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link <%= it.active == 'PROJ_HOME' ? 'active' : ''%>" href="/projects/"><i class="bi bi-kanban"></i> Manage Projects </a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link <%= it.active == 'PROJ_LIST' ? 'active' : ''%>" href="/projects/lists"><i class="bi bi-card-checklist"></i> Packaging Lists </a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link <%= it.active == 'PROJ_PEPS' ? 'active' : ''%>" href="/projects/people"><i class="bi bi-people-fill"></i> People </a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
<h6 class="sidebar-heading d-flex justify-content-between align-items-center px-3 mt-4 mb-1 text-muted">
|
<h6 class="sidebar-heading d-flex justify-content-between align-items-center px-3 mt-4 mb-1 text-muted">
|
||||||
<a href="/manage/" class="nav-link"
|
<a href="/manage/" class="nav-link"
|
||||||
>Settings
|
>Settings
|
||||||
<span class="badge rounded-pill bg-danger invisible">
|
<span class="badge rounded-pill bg-danger invisible" id="notifcationInfo">
|
||||||
2
|
1
|
||||||
<span class="visually-hidden">changes or updates</span>
|
<span class="visually-hidden">changes or updates</span>
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
</h6>
|
</h6>
|
||||||
|
|
||||||
|
|
||||||
<ul class="nav flex-column mb-2">
|
<ul class="nav flex-column mb-2">
|
||||||
<a class="nav-link <%= it.active == 'SETT_STORE' ? 'active' : ''%>" href="/manage/storages"
|
<a class="nav-link <%= it.active == 'SETT_STORE' ? 'active' : ''%>" href="/manage/storages"
|
||||||
@ -187,6 +209,11 @@
|
|||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
$('#versionInfo').text(`AssetFlow Alpha ${data.version} ${data.commit}`);
|
$('#versionInfo').text(`AssetFlow Alpha ${data.version} ${data.commit}`);
|
||||||
|
if(data.updateAvailable ){
|
||||||
|
$('#notifcationInfo').show();
|
||||||
|
} else {
|
||||||
|
$('#notifcationInfo').hide();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
error: function (data) {
|
error: function (data) {
|
||||||
createNewToast('<i class="bi bi-exclamation-triangle-fill"></i> Unable to load version information', "text-bg-danger", 3000, false)
|
createNewToast('<i class="bi bi-exclamation-triangle-fill"></i> Unable to load version information', "text-bg-danger", 3000, false)
|
||||||
|
49
src/frontend/projects/dashboard.eta.html
Normal file
49
src/frontend/projects/dashboard.eta.html
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
<%~ E.includeFile("../partials/head.eta.html", {"title": "Projects"}) %> <%~ E.includeFile("../partials/controls.eta.html", {"active": "PROJ_HOME"}) %>
|
||||||
|
|
||||||
|
<h1>Projectmanager</h1>
|
||||||
|
<div class="container text-center">
|
||||||
|
<div class="row">
|
||||||
|
<a class="card col m-2" href="/manage/categories">
|
||||||
|
<div class="card-body">
|
||||||
|
<h1 class="card-title"><i class="bi bi-tag"></i></h1>
|
||||||
|
<p class="card-text">Manage categories</p>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
<a class="card col m-2" href="/manage/storages">
|
||||||
|
<div class="card-body">
|
||||||
|
<h1 class="card-title"><i class="bi bi-box-seam"></i></h1>
|
||||||
|
<p class="card-text">Manage storages</p>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
<a class="card col m-2" href="/manage/import/csv">
|
||||||
|
<div class="card-body">
|
||||||
|
<h1 class="card-title"><i class="bi bi-filetype-csv"></i></h1>
|
||||||
|
<p class="card-text">Import data via CSV</p>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
<a class="card col m-2" href="/manage/import/json">
|
||||||
|
<div class="card-body">
|
||||||
|
<h1 class="card-title"><i class="bi bi-filetype-json"></i></h1>
|
||||||
|
<p class="card-text">Import data via JSON</p>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h2>Recent projects</h2>
|
||||||
|
<div class="container">
|
||||||
|
<table class="table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Name</th>
|
||||||
|
<th scope="col">Status</th>
|
||||||
|
<!--<th scope="col">Actions</th>-->
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<%~ E.includeFile("../partials/controlsFoot.eta.html") %> <%~ E.includeFile("../partials/foot.eta.html") %>
|
@ -7,6 +7,7 @@ import testRoute from './test.js';
|
|||||||
import dashboardRoute from './dashboard.js';
|
import dashboardRoute from './dashboard.js';
|
||||||
import itemsRoute from './items.js';
|
import itemsRoute from './items.js';
|
||||||
import manage_routes from './manage/index.js';
|
import manage_routes from './manage/index.js';
|
||||||
|
import project_routes from './projects/index.js';
|
||||||
|
|
||||||
// Router base is '/'
|
// Router base is '/'
|
||||||
const Router = express.Router({ strict: false });
|
const Router = express.Router({ strict: false });
|
||||||
@ -14,11 +15,13 @@ const Router = express.Router({ strict: false });
|
|||||||
Router.route('/test').get(testRoute.get);
|
Router.route('/test').get(testRoute.get);
|
||||||
Router.route('/items').get(itemsRoute.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.route('/s/:id').get(skuRouteDash.get);
|
||||||
|
|
||||||
Router.use('/manage', manage_routes);
|
Router.use('/manage', manage_routes);
|
||||||
|
|
||||||
|
|
||||||
Router.route('/').get(dashboardRoute.get);
|
Router.route('/').get(dashboardRoute.get);
|
||||||
|
|
||||||
export default Router;
|
export default Router;
|
||||||
|
9
src/routes/frontend/projects/dashboard.ts
Normal file
9
src/routes/frontend/projects/dashboard.ts
Normal 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 };
|
11
src/routes/frontend/projects/index.ts
Normal file
11
src/routes/frontend/projects/index.ts
Normal 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;
|
Loading…
Reference in New Issue
Block a user