Added way to track license seats
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
6db18f63d6
commit
30bf9beea5
@ -13,6 +13,16 @@ module.exports = (sequelize, Sequelize) => {
|
|||||||
type: Sequelize.STRING,
|
type: Sequelize.STRING,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
seatsUsed: {
|
||||||
|
type: Sequelize.NUMBER,
|
||||||
|
default: 0,
|
||||||
|
},
|
||||||
|
|
||||||
|
seatsTotal: {
|
||||||
|
type: Sequelize.NUMBER,
|
||||||
|
default: 1,
|
||||||
|
},
|
||||||
|
|
||||||
purchasedFrom: {
|
purchasedFrom: {
|
||||||
type: Sequelize.STRING,
|
type: Sequelize.STRING,
|
||||||
},
|
},
|
||||||
|
@ -12,6 +12,8 @@ exports.postAdd = async function(req, res) {
|
|||||||
name: req.body.license_name,
|
name: req.body.license_name,
|
||||||
key: req.body.license_key,
|
key: req.body.license_key,
|
||||||
manufacturer: req.body.license_manufacturer,
|
manufacturer: req.body.license_manufacturer,
|
||||||
|
seatsUsed: req.body.license_seats_used,
|
||||||
|
seatsTotal: req.body.license_seats_total,
|
||||||
purchasedFrom: req.body.license_purchase_from,
|
purchasedFrom: req.body.license_purchase_from,
|
||||||
purchasedAt: req.body.license_purchase_date,
|
purchasedAt: req.body.license_purchase_date,
|
||||||
});
|
});
|
||||||
@ -63,6 +65,8 @@ exports.postEdit = async function(req, res) {
|
|||||||
license.name = req.body.license_name;
|
license.name = req.body.license_name;
|
||||||
license.key = req.body.license_key;
|
license.key = req.body.license_key;
|
||||||
license.manufacturer = req.body.license_manufacturer;
|
license.manufacturer = req.body.license_manufacturer;
|
||||||
|
license.seatsUsed = req.body.license_seats_used;
|
||||||
|
license.seatsTotal = req.body.license_seats_total;
|
||||||
license.purchasedFrom = req.body.license_purchase_from;
|
license.purchasedFrom = req.body.license_purchase_from;
|
||||||
license.purchasedAt = req.body.license_purchase_date;
|
license.purchasedAt = req.body.license_purchase_date;
|
||||||
|
|
||||||
|
@ -12,13 +12,19 @@
|
|||||||
</header>
|
</header>
|
||||||
|
|
||||||
<section id="record-actions" class="row">
|
<section id="record-actions" class="row">
|
||||||
<div class="columns six">
|
<div class="columns four">
|
||||||
<a href="/item/add">
|
<a href="/item/add">
|
||||||
<p><i class="fa-solid fa-plus"></i> Add Item</p>
|
<p><i class="fa-solid fa-plus"></i> Add Item</p>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="columns six">
|
<div class="columns four">
|
||||||
|
<a href="/license/add">
|
||||||
|
<p><i class="fa-solid fa-plus"></i> Add License</p>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="columns four">
|
||||||
<a href="/item/search">
|
<a href="/item/search">
|
||||||
<p><i class="fa-solid fa-search"></i> Search</p>
|
<p><i class="fa-solid fa-search"></i> Search</p>
|
||||||
</a>
|
</a>
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="six columns">
|
<div class="six columns">
|
||||||
<label for="license_key">License Key:</label>
|
<label for="license_key">License key:</label>
|
||||||
<input class="u-full-width" type="text" placeholder="ABCD-EFGH-1234-5678" id="license_key" name="license_key" required>
|
<input class="u-full-width" type="text" placeholder="ABCD-EFGH-1234-5678" id="license_key" name="license_key" required>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -33,6 +33,18 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="six columns">
|
||||||
|
<label for="license_seats_used">Seats in use:</label>
|
||||||
|
<input class="u-full-width" type="number" placeholder="0" id="license_seats_used" name="license_seats_used" required value="0">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="six columns">
|
||||||
|
<label for="license_seats_total">Seats total:</label>
|
||||||
|
<input class="u-full-width" type="number" placeholder="1" id="license_seats_total" name="license_seats_total" required value="1">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="six columns">
|
<div class="six columns">
|
||||||
<label for="license_purchase_from">Purchased from:</label>
|
<label for="license_purchase_from">Purchased from:</label>
|
||||||
|
@ -33,6 +33,18 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="six columns">
|
||||||
|
<label for="license_seats_used">Seats in use:</label>
|
||||||
|
<input class="u-full-width" type="number" placeholder="0" id="license_seats_used" name="license_seats_used" required value="{{ license.seatsUsed }}">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="six columns">
|
||||||
|
<label for="license_seats_total">Seats total:</label>
|
||||||
|
<input class="u-full-width" type="number" placeholder="1" id="license_seats_total" name="license_seats_total" required value="{{ license.seatsTotal }}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="six columns">
|
<div class="six columns">
|
||||||
<label for="license_purchase_from">Purchased from:</label>
|
<label for="license_purchase_from">Purchased from:</label>
|
||||||
|
@ -22,8 +22,10 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Product name</th>
|
<th>Product name</th>
|
||||||
<th>License Key</th>
|
<th>License key</th>
|
||||||
<th>Manufacturer</th>
|
<th>Manufacturer</th>
|
||||||
|
<th>Seats used</th>
|
||||||
|
<th>Total seats</th>
|
||||||
<th>Seller</th>
|
<th>Seller</th>
|
||||||
<th>Purchase date</th>
|
<th>Purchase date</th>
|
||||||
</tr>
|
</tr>
|
||||||
@ -33,6 +35,8 @@
|
|||||||
<td>{{ license.name }}</td>
|
<td>{{ license.name }}</td>
|
||||||
<td>{{ license.key ? license.key : 'N/a' }}</td>
|
<td>{{ license.key ? license.key : 'N/a' }}</td>
|
||||||
<td>{{ license.manufacturer ? license.manufacturer : 'N/a' }}</td>
|
<td>{{ license.manufacturer ? license.manufacturer : 'N/a' }}</td>
|
||||||
|
<td>{{ license.seatsUsed }}</td>
|
||||||
|
<td>{{ license.seatsTotal }}</td>
|
||||||
<td>{{ license.purchasedFrom ? license.purchasedFrom : 'N/a' }}</td>
|
<td>{{ license.purchasedFrom ? license.purchasedFrom : 'N/a' }}</td>
|
||||||
<td>{{ license.purchasedAt | date("m/d/Y h:i:s A") }}</td>
|
<td>{{ license.purchasedAt | date("m/d/Y h:i:s A") }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
Loading…
Reference in New Issue
Block a user