<ul class="order-statuses flat-list">
<li class="status-item card">
<h2 class="status-item-supplier">Vinunic (sales@vinunic.se)</h2>
<div class="status-item-wines">
<table>
<thead>
<tr>
<th scope="col">Wines</th>
<th scope="col" class="num">Bottles</th>
<th scope="col" class="num">Unit price</th>
</tr>
</thead>
<tbody>
<tr>
<td>
Chateu Pontet-Canet Chateu Pontet-Canet 2008 <em>(75 cl)</em>
</td>
<td class="num">
<label for="a5e8d565-56a2-c70b-95e4-77e723d675d2" class="at-only">
Bottles
</label>
<input type="number" id="a5e8d565-56a2-c70b-95e4-77e723d675d2" value="10">
</td>
<td class="num">
<label for="b22dcbe0-7e28-0c8a-d953-9c081634a14c" class="at-only">
Unit price
</label>
<input type="number" id="b22dcbe0-7e28-0c8a-d953-9c081634a14c" value="550">
</td>
</tr>
<tr>
<td>
Chateu Pontet-Canet Chateu Pontet-Canet 2010 <em>(75 cl)</em>
</td>
<td class="num">
<label for="0942045c-48c1-ff07-578c-9ddaab25df23" class="at-only">
Bottles
</label>
<input type="number" id="0942045c-48c1-ff07-578c-9ddaab25df23" value="18">
</td>
<td class="num">
<label for="6a5ff7ab-d5b5-c36f-d338-35f13bd75764" class="at-only">
Unit price
</label>
<input type="number" id="6a5ff7ab-d5b5-c36f-d338-35f13bd75764" value="500">
</td>
</tr>
<tr>
<td>
Chateu Pontet-Canet Chateu Pontet-Canet 2011 <em>(75 cl)</em>
</td>
<td class="num">
<label for="559058e9-322e-a21e-47d8-e8f2031293c9" class="at-only">
Bottles
</label>
<input type="number" id="559058e9-322e-a21e-47d8-e8f2031293c9" value="20">
</td>
<td class="num">
<label for="c36cc0f4-3050-3075-3d8c-62a8fb46c2cc" class="at-only">
Unit price
</label>
<input type="number" id="c36cc0f4-3050-3075-3d8c-62a8fb46c2cc" value="480">
</td>
</tr>
</tbody>
</table>
</div>
<p class="status-item-order-total">
<strong>Order total:</strong>
<span>24100</span>
</p>
<p class="status-item-order-date">
<strong>Order date:</strong>
<span>2019-06-01</span>
</p>
<p class="status-item-delivery-date">
<strong>Delivery date:</strong>
<span>2019-06-08</span>
</p>
<p class="status-item-status">
<strong>Status:</strong>
<span><svg class="icon " height="20" width="20" aria-hidden="true">
<use xlink:href="../../sprite.svg#pending" />
</svg>
Pending</span>
</p>
<div class="status-item-actions">
<button type="button" class="alt">
<span>
<svg class="icon alt" height="20" width="20" aria-hidden="true">
<use xlink:href="../../sprite.svg#cancel" />
</svg>
<span>Cancel</span>
</span>
</button>
<button type="button">
<span>
<svg class="icon " height="20" width="20" aria-hidden="true">
<use xlink:href="../../sprite.svg#order-created" />
</svg>
<span>Send order</span>
</span>
</button>
</div>
</li>
<li class="status-item card">
<h2 class="status-item-supplier">Spring Wine (order@springwine.se)</h2>
<div class="status-item-wines">
<table>
<thead>
<tr>
<th scope="col">Wines</th>
<th scope="col" class="num">Bottles</th>
<th scope="col" class="num">Unit price</th>
</tr>
</thead>
<tbody>
<tr>
<td>
Aalto PS 2015 <em>(75 cl)</em>
</td>
<td class="num">
36
</td>
<td class="num">
1000
</td>
</tr>
</tbody>
</table>
</div>
<p class="status-item-order-total">
<strong>Order total:</strong>
<span>36000</span>
</p>
<p class="status-item-order-date">
<strong>Order date:</strong>
<span>2019-06-02</span>
</p>
<p class="status-item-delivery-date">
<strong>Delivery date:</strong>
<span>2019-06-09</span>
</p>
<p class="status-item-status">
<strong>Status:</strong>
<span><svg class="icon " height="20" width="20" aria-hidden="true">
<use xlink:href="../../sprite.svg#order-sent" />
</svg>
Sent to supplier</span>
</p>
<div class="status-item-actions">
<button type="button" class="alt">
<span>
<svg class="icon alt" height="20" width="20" aria-hidden="true">
<use xlink:href="../../sprite.svg#cancel" />
</svg>
<span>Cancel</span>
</span>
</button>
<button type="button">
<span>
<svg class="icon " height="20" width="20" aria-hidden="true">
<use xlink:href="../../sprite.svg#order-invoice-received" />
</svg>
<span>Order confirmed</span>
</span>
</button>
</div>
</li>
<li class="status-item card">
<h2 class="status-item-supplier">Johan Lidby (sales@johanlidby.se)</h2>
<div class="status-item-wines">
<table>
<thead>
<tr>
<th scope="col">Wines</th>
<th scope="col" class="num">Bottles</th>
<th scope="col" class="num">Unit price</th>
</tr>
</thead>
<tbody>
<tr>
<td>
Roederer Cristal 2009 <em>(75 cl)</em>
</td>
<td class="num">
24
</td>
<td class="num">
1200
</td>
</tr>
</tbody>
</table>
</div>
<p class="status-item-order-total">
<strong>Order total:</strong>
<span>28800</span>
</p>
<p class="status-item-order-date">
<strong>Order date:</strong>
<span>2019-06-03</span>
</p>
<p class="status-item-delivery-date">
<strong>Delivery date:</strong>
<span>2019-06-10</span>
</p>
<p class="status-item-status">
<strong>Status:</strong>
<span><svg class="icon " height="20" width="20" aria-hidden="true">
<use xlink:href="../../sprite.svg#order-invoice-received" />
</svg>
Order confirmed by supplier</span>
</p>
<div class="status-item-actions">
<button type="button" class="alt">
<span>
<svg class="icon alt" height="20" width="20" aria-hidden="true">
<use xlink:href="../../sprite.svg#cancel" />
</svg>
<span>Cancel</span>
</span>
</button>
<button type="button">
<span>
<svg class="icon " height="20" width="20" aria-hidden="true">
<use xlink:href="../../sprite.svg#order-invoice-certified" />
</svg>
<span>Invoice confirmed</span>
</span>
</button>
</div>
</li>
<li class="status-item card">
<h2 class="status-item-supplier">Johan Lidby (sales@johanlidby.se)</h2>
<div class="status-item-wines">
<table>
<thead>
<tr>
<th scope="col">Wines</th>
<th scope="col" class="num">Bottles</th>
<th scope="col" class="num">Unit price</th>
</tr>
</thead>
<tbody>
<tr>
<td>
Roederer Cristal 2009 <em>(75 cl)</em>
</td>
<td class="num">
24
</td>
<td class="num">
1200
</td>
</tr>
</tbody>
</table>
</div>
<p class="status-item-order-total">
<strong>Order total:</strong>
<span>28800</span>
</p>
<p class="status-item-order-date">
<strong>Order date:</strong>
<span>2019-06-03</span>
</p>
<p class="status-item-delivery-date">
<strong>Delivery date:</strong>
<span>2019-06-10</span>
</p>
<p class="status-item-status">
<strong>Status:</strong>
<span><svg class="icon " height="20" width="20" aria-hidden="true">
<use xlink:href="../../sprite.svg#order-invoice-certified" />
</svg>
Invoice confirmed</span>
</p>
<div class="status-item-actions">
<button type="button" class="alt">
<span>
<svg class="icon alt" height="20" width="20" aria-hidden="true">
<use xlink:href="../../sprite.svg#cancel" />
</svg>
<span>Cancel</span>
</span>
</button>
<button type="button">
<span>
<svg class="icon " height="20" width="20" aria-hidden="true">
<use xlink:href="../../sprite.svg#order-received" />
</svg>
<span>Delivered and certified</span>
</span>
</button>
</div>
</li>
<li class="status-item card">
<h2 class="status-item-supplier">Johan Lidby (sales@johanlidby.se)</h2>
<div class="status-item-wines">
<table>
<thead>
<tr>
<th scope="col">Wines</th>
<th scope="col" class="num">Bottles</th>
<th scope="col" class="num">Unit price</th>
</tr>
</thead>
<tbody>
<tr>
<td>
Roederer Cristal 2010 <em>(75 cl)</em>
<button type="button" class="alt size-xxs">
<span>
<svg class="icon alt size-xxs" height="20" width="20" aria-hidden="true">
<use xlink:href="../../sprite.svg#add" />
</svg>
<span>Add to wine cellar</span>
</span>
</button>
</td>
<td class="num">
24
</td>
<td class="num">
1200
</td>
</tr>
<tr>
<td>
Roederer Cristal 2009 <em>(75 cl)</em>
<button type="button" class="alt size-xxs">
<span>
<svg class="icon alt size-xxs" height="20" width="20" aria-hidden="true">
<use xlink:href="../../sprite.svg#add" />
</svg>
<span>Add to wine cellar</span>
</span>
</button>
</td>
<td class="num">
24
</td>
<td class="num">
1200
</td>
</tr>
<tr>
<td>
Roederer Cristal 2008 <em>(75 cl)</em>
<button type="button" class="alt size-xxs">
<span>
<svg class="icon alt size-xxs" height="20" width="20" aria-hidden="true">
<use xlink:href="../../sprite.svg#add" />
</svg>
<span>Add to wine cellar</span>
</span>
</button>
</td>
<td class="num">
24
</td>
<td class="num">
1200
</td>
</tr>
</tbody>
</table>
</div>
<p class="status-item-order-total">
<strong>Order total:</strong>
<span>86400</span>
</p>
<p class="status-item-order-date">
<strong>Order date:</strong>
<span>2019-06-03</span>
</p>
<p class="status-item-delivery-date">
<strong>Delivery date:</strong>
<span>2019-06-10</span>
</p>
<p class="status-item-status">
<strong>Status:</strong>
<span><svg class="icon " height="20" width="20" aria-hidden="true">
<use xlink:href="../../sprite.svg#order-received" />
</svg>
Delivery received and certified</span>
</p>
<div class="status-item-actions">
<button type="button" class="alt">
<span>
<svg class="icon alt" height="20" width="20" aria-hidden="true">
<use xlink:href="../../sprite.svg#cancel" />
</svg>
<span>Cancel</span>
</span>
</button>
<button type="button">
<span>
<svg class="icon " height="20" width="20" aria-hidden="true">
<use xlink:href="../../sprite.svg#check" />
</svg>
<span>Added to inventory</span>
</span>
</button>
</div>
</li>
<li class="status-item card">
<h2 class="status-item-supplier">Johan Lidby (sales@johanlidby.se)</h2>
<div class="status-item-wines">
<table>
<thead>
<tr>
<th scope="col">Wines</th>
<th scope="col" class="num">Bottles</th>
<th scope="col" class="num">Unit price</th>
</tr>
</thead>
<tbody>
<tr>
<td>
Roederer Cristal 2009 <em>(75 cl)</em>
</td>
<td class="num">
24
</td>
<td class="num">
1200
</td>
</tr>
</tbody>
</table>
</div>
<p class="status-item-order-total">
<strong>Order total:</strong>
<span>28800</span>
</p>
<p class="status-item-order-date">
<strong>Order date:</strong>
<span>2019-06-03</span>
</p>
<p class="status-item-delivery-date">
<strong>Delivery date:</strong>
<span>2019-06-10</span>
</p>
<p class="status-item-status">
<strong>Status:</strong>
<span><svg class="icon " height="20" width="20" aria-hidden="true">
<use xlink:href="../../sprite.svg#check" />
</svg>
Finalized</span>
</p>
<div class="status-item-actions">
</div>
</li>
<li class="status-item card">
<h2 class="status-item-supplier">Johan Lidby (sales@johanlidby.se)</h2>
<div class="status-item-wines">
<table>
<thead>
<tr>
<th scope="col">Wines</th>
<th scope="col" class="num">Bottles</th>
<th scope="col" class="num">Unit price</th>
</tr>
</thead>
<tbody>
<tr>
<td>
Roederer Cristal 2009 <em>(75 cl)</em>
</td>
<td class="num">
24
</td>
<td class="num">
1200
</td>
</tr>
</tbody>
</table>
</div>
<p class="status-item-order-total">
<strong>Order total:</strong>
<span>28800</span>
</p>
<p class="status-item-order-date">
<strong>Order date:</strong>
<span>2019-06-03</span>
</p>
<p class="status-item-delivery-date">
<strong>Delivery date:</strong>
<span>2019-06-10</span>
</p>
<p class="status-item-status">
<strong>Status:</strong>
<span><svg class="icon " height="20" width="20" aria-hidden="true">
<use xlink:href="../../sprite.svg#order-annulled" />
</svg>
Annulled</span>
</p>
<div class="status-item-actions">
</div>
</li>
</ul>
<ul class="order-statuses flat-list">
{{#each orders}}
<li class="status-item card">
<h2 class="status-item-supplier">{{supplier}}</h2>
<div class="status-item-wines">
<table>
<thead>
<tr>
<th scope="col">Wines</th>
<th scope="col" class="num">Bottles</th>
<th scope="col" class="num">Unit price</th>
</tr>
</thead>
<tbody>
{{#each wines}}
<tr>
<td>
{{producer}} {{wine-name}} {{vintage}} <em>({{btl-size}})</em>
{{#if ../add-to-inv}}
{{> @button ../inventory-add}}
{{/if}}
</td>
<td class="num">
{{#if ../editable}}
{{> @input ../btl-input id=(random) value=btl-amount}}
{{else}}
{{btl-amount}}
{{/if}}
</td>
<td class="num">
{{#if ../editable}}
{{> @input ../price-input id=(random) value=price}}
{{else}}
{{price}}
{{/if}}
</td>
</tr>
{{/each}}
</tbody>
</table>
</div>
<p class="status-item-order-total">
<strong>Order total:</strong>
<span>{{order-total}}</span>
</p>
<p class="status-item-order-date">
<strong>Order date:</strong>
<span>{{order-date}}</span>
</p>
<p class="status-item-delivery-date">
<strong>Delivery date:</strong>
<span>{{delivery-date}}</span>
</p>
{{#with status}}
<p class="status-item-status">
<strong>Status:</strong>
<span>{{> @svg}} {{text}}</span>
</p>
{{/with}}
<div class="status-item-actions">
{{#each actions}}
{{> @button}}
{{/each}}
</div>
</li>
{{/each}}
</ul>
{
"orders": [
{
"supplier": "Vinunic (sales@vinunic.se)",
"editable": true,
"btl-input": {
"type": "number",
"label": "Bottles",
"at-label": true
},
"price-input": {
"type": "number",
"label": "Unit price",
"at-label": true
},
"wines": [
{
"producer": "Chateu Pontet-Canet",
"wine-name": "Chateu Pontet-Canet",
"vintage": 2008,
"btl-size": "75 cl",
"btl-amount": 10,
"price": 550
},
{
"producer": "Chateu Pontet-Canet",
"wine-name": "Chateu Pontet-Canet",
"vintage": 2010,
"btl-size": "75 cl",
"btl-amount": 18,
"price": 500
},
{
"producer": "Chateu Pontet-Canet",
"wine-name": "Chateu Pontet-Canet",
"vintage": 2011,
"btl-size": "75 cl",
"btl-amount": 20,
"price": 480
}
],
"order-total": 24100,
"order-date": "2019-06-01",
"delivery-date": "2019-06-08",
"status": {
"text": "Pending",
"icon": "pending"
},
"actions": [
{
"text": "Cancel",
"icon": "cancel",
"modifier": "alt"
},
{
"text": "Send order",
"icon": "order-created"
}
]
},
{
"supplier": "Spring Wine (order@springwine.se)",
"wines": [
{
"producer": "Aalto",
"wine-name": "PS",
"vintage": 2015,
"btl-size": "75 cl",
"btl-amount": 36,
"price": 1000
}
],
"order-total": 36000,
"order-date": "2019-06-02",
"delivery-date": "2019-06-09",
"status": {
"text": "Sent to supplier",
"icon": "order-sent"
},
"actions": [
{
"text": "Cancel",
"icon": "cancel",
"modifier": "alt"
},
{
"text": "Order confirmed",
"icon": "order-invoice-received"
}
]
},
{
"supplier": "Johan Lidby (sales@johanlidby.se)",
"wines": [
{
"producer": "Roederer",
"wine-name": "Cristal",
"vintage": 2009,
"btl-size": "75 cl",
"btl-amount": 24,
"price": 1200
}
],
"order-total": 28800,
"order-date": "2019-06-03",
"delivery-date": "2019-06-10",
"status": {
"text": "Order confirmed by supplier",
"icon": "order-invoice-received"
},
"actions": [
{
"text": "Cancel",
"icon": "cancel",
"modifier": "alt"
},
{
"text": "Invoice confirmed",
"icon": "order-invoice-certified"
}
]
},
{
"supplier": "Johan Lidby (sales@johanlidby.se)",
"wines": [
{
"producer": "Roederer",
"wine-name": "Cristal",
"vintage": 2009,
"btl-size": "75 cl",
"btl-amount": 24,
"price": 1200
}
],
"order-total": 28800,
"order-date": "2019-06-03",
"delivery-date": "2019-06-10",
"status": {
"text": "Invoice confirmed",
"icon": "order-invoice-certified"
},
"actions": [
{
"text": "Cancel",
"icon": "cancel",
"modifier": "alt"
},
{
"text": "Delivered and certified",
"icon": "order-received"
}
]
},
{
"supplier": "Johan Lidby (sales@johanlidby.se)",
"wines": [
{
"producer": "Roederer",
"wine-name": "Cristal",
"vintage": 2010,
"btl-size": "75 cl",
"btl-amount": 24,
"price": 1200
},
{
"producer": "Roederer",
"wine-name": "Cristal",
"vintage": 2009,
"btl-size": "75 cl",
"btl-amount": 24,
"price": 1200
},
{
"producer": "Roederer",
"wine-name": "Cristal",
"vintage": 2008,
"btl-size": "75 cl",
"btl-amount": 24,
"price": 1200
}
],
"order-total": 86400,
"order-date": "2019-06-03",
"delivery-date": "2019-06-10",
"status": {
"text": "Delivery received and certified",
"icon": "order-received"
},
"add-to-inv": true,
"inventory-add": {
"text": "Add to wine cellar",
"icon": "add",
"modifier": "alt size-xxs"
},
"actions": [
{
"text": "Cancel",
"icon": "cancel",
"modifier": "alt"
},
{
"text": "Added to inventory",
"icon": "check"
}
]
},
{
"supplier": "Johan Lidby (sales@johanlidby.se)",
"wines": [
{
"producer": "Roederer",
"wine-name": "Cristal",
"vintage": 2009,
"btl-size": "75 cl",
"btl-amount": 24,
"price": 1200
}
],
"order-total": 28800,
"order-date": "2019-06-03",
"delivery-date": "2019-06-10",
"status": {
"text": "Finalized",
"icon": "check"
}
},
{
"id": 7,
"supplier": "Johan Lidby (sales@johanlidby.se)",
"wines": [
{
"producer": "Roederer",
"wine-name": "Cristal",
"vintage": 2009,
"btl-size": "75 cl",
"btl-amount": 24,
"price": 1200
}
],
"order-total": 28800,
"order-date": "2019-06-03",
"delivery-date": "2019-06-10",
"status": {
"text": "Annulled",
"icon": "order-annulled"
}
}
]
}
/**
* Purchase orders
*/
@media screen {
.status-item {
display: grid;
grid-gap: 0.5rem 1rem;
grid-template-columns: repeat(2, auto);
grid-template-areas:
"supplier supplier"
"wines wines"
"order-total order-total"
"order-date order-date"
"delivery-date delivery-date"
"status status"
"actions actions";
}
.status-item + .status-item {
margin-top: 1.5rem;
}
/* Margin resets */
.status-item .form-item,
.status-item > *,
.status-item > * > * {
margin-top: 0;
}
/* Edge to edge layout on status items */
p[class^="status-item-"] {
display: flex;
justify-content: space-between;
}
/* Supplier */
.status-item-supplier {
grid-area: supplier;
font-size: 1.4em;
margin: 0;
}
/* Wines */
.status-item-wines {
grid-area: wines;
margin: 1.5em 0;
}
.status-item-wines table {
width: 100%;
}
.status-item-wines thead tr,
.status-item-wines tbody {
border-bottom: 1px solid var(--mid-light-grey);
}
.status-item-wines td {
padding-bottom: 0.3em;
padding-top: 0.3em;
}
.status-item-wines td button {
margin: 0 0 0 1em;
}
.status-item-wines input {
text-align: inherit;
padding: 0 0.2em;
width: 8ch;
}
/* Order total */
.status-item-order-total {
grid-area: order-total;
}
/* Order date */
.status-item-order-date {
grid-area: order-date;
}
/* Delivery date */
.status-item-delivery-date {
grid-area: delivery-date;
}
/* Order status */
.status-item-status {
grid-area: status;
}
.status-item-status .icon {
height: 1em;
width: 1em;
vertical-align: middle;
}
/* Order actions */
.status-item-actions {
grid-area: actions;
justify-self: end;
}
}
@media only screen and (min-width: 26em) {
.status-item {
grid-template-areas:
"supplier supplier"
"wines wines"
"order-total ."
"order-date ."
"delivery-date ."
"status ."
"actions actions";
}
}
@media only screen and (min-width: 42em) {
.status-item {
grid-template-columns: repeat(4, auto);
grid-template-areas:
"supplier supplier supplier supplier"
"wines wines wines wines"
". . . order-total"
". . . order-date"
". . . delivery-date"
". . . status"
"actions actions actions actions";
}
}
No notes defined.