mergin
This commit is contained in:
commit
e4f10b1e4a
41
back-end/src/static/css/table.css
Normal file
41
back-end/src/static/css/table.css
Normal file
@ -0,0 +1,41 @@
|
||||
@import url("/static/css/colors.css");
|
||||
|
||||
main {
|
||||
width: 80%;
|
||||
margin: 0px auto;
|
||||
}
|
||||
|
||||
table {
|
||||
margin: 5px 0 10px 0;
|
||||
border-collapse: collapse;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
table a {
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
color: white;
|
||||
}
|
||||
|
||||
tr {
|
||||
background-color: #343c4b;
|
||||
color: white;
|
||||
}
|
||||
|
||||
table tr:nth-child(2n+1) {
|
||||
background-color: #1f242d;
|
||||
}
|
||||
|
||||
td,
|
||||
th {
|
||||
padding: 6px;
|
||||
font-size: .9rem;
|
||||
font-weight: normal;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
th {
|
||||
background-color: #C1292E;
|
||||
}
|
@ -7,49 +7,53 @@
|
||||
<title>
|
||||
<%= box.title %>
|
||||
</title>
|
||||
<%- include('partials/links.ejs') %>
|
||||
<script>
|
||||
function deletePiece(id) {
|
||||
fetch(window.location + "?id_piece=" + id, {
|
||||
method: 'DELETE'
|
||||
}).then(r => window.location.reload());
|
||||
}
|
||||
</script>
|
||||
<%- include('partials/links.ejs') %>
|
||||
<script>
|
||||
function deletePiece(id) {
|
||||
fetch(window.location + "?id_piece=" + id, {
|
||||
method: 'DELETE'
|
||||
}).then(r => window.location.reload());
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<%- include('partials/header.ejs') %>
|
||||
<h1>
|
||||
<%= box.title %>
|
||||
</h1>
|
||||
<pre>
|
||||
id : <%= box.id %>
|
||||
date : <%= box.date %>
|
||||
modèles :
|
||||
<% box.models.forEach(function(m) { %>
|
||||
<li>
|
||||
<a href="/models/byid/<%=m.id_id_model%>">
|
||||
<%=m.id_name%>
|
||||
</a>
|
||||
</li>
|
||||
<% }); %>
|
||||
pièces :
|
||||
<% box.pieces.forEach(function(pair) { %>
|
||||
<li>
|
||||
<a href="/pieces/<%=pair.first.id_piece%>">
|
||||
n°<%=pair.first.id_piece%> en <%=pair.second%> exemplaires
|
||||
</a>
|
||||
<p><a href="javascript: deletePiece('<%=pair.first.id_piece%>')">Suppr</a></p>
|
||||
</li>
|
||||
<% }); %>
|
||||
<form>
|
||||
<label for="numero_piece">Numero Piece</label>
|
||||
<input type="number" id="numero_piece" name="numero_piece" />
|
||||
<label for="quantite">Quantité</label>
|
||||
<input type="number" id="quantite" name="quantite" />
|
||||
<input type="submit" formmethod="post" value="Ajouter"/>
|
||||
</form>
|
||||
</pre>
|
||||
<%- include('partials/header.ejs') %>
|
||||
<h1>
|
||||
<%= box.title %>
|
||||
</h1>
|
||||
<pre>
|
||||
<main>
|
||||
id : <%= box.id %>
|
||||
date : <%= box.date %>
|
||||
pièces :
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Id pièce</th>
|
||||
<th>Quantité pieces</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% box.pieces.forEach(function(pair) { %>
|
||||
<tr>
|
||||
<td><a href="/pieces/<%=pair.first.id_piece%>"><i class="fa-solid fa-puzzle-piece"></i> <%= pair.first.id_piece%></a></td>
|
||||
<td><%= pair.second%></td>
|
||||
<td><a href="javascript: deletePiece('<%= pair.first.id_piece %>')"><i class="fa-solid fa-trash"></i></a></td>
|
||||
</tr>
|
||||
<% }); %>
|
||||
</tbody>
|
||||
</table>
|
||||
<form>
|
||||
<label for="numero_piece">Numero Piece</label>
|
||||
<input type="number" id="numero_piece" name="numero_piece" />
|
||||
<label for="quantite">Quantité</label>
|
||||
<input type="number" id="quantite" name="quantite" />
|
||||
<input type="submit" formmethod="post" value="Ajouter" />
|
||||
</form>
|
||||
</main>
|
||||
</pre>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
@ -1,3 +1,5 @@
|
||||
<script src="https://kit.fontawesome.com/62d2ff68ea.js" crossorigin="anonymous"></script>
|
||||
<link href="/static/css/colors.css" rel="stylesheet" />
|
||||
<link href="/static/css/header.css" rel="stylesheet" />
|
||||
<link href="/static/css/table.css" rel="stylesheet" />
|
||||
<link href="/static/css/reset.css" rel="stylesheet" />
|
||||
|
Loading…
x
Reference in New Issue
Block a user