Add current state

This commit is contained in:
2023-05-16 00:05:39 +02:00
parent 3819d007a5
commit 532b7b9fe2
9 changed files with 374 additions and 40 deletions

View File

@ -2,7 +2,13 @@ import express, { Request, Response } from 'express';
import { prisma, __path } from '../../../index.js';
function get(req: Request, res: Response) {
res.render(__path + '/src/frontend/manage/storageManager.eta.html'); //, { items: items });
prisma.storageUnit.findMany({include: {contactInfo: true}}).then((storUnits) => {
prisma.storageLocation.findMany().then((storLocs) => {
prisma.contactInfo.findMany().then((contactInfos) => {
res.render(__path + '/src/frontend/manage/storageManager.eta.html', { storUnits: storUnits, storLocs: storLocs, address: contactInfos });
});
});
});
}
export default { get };