-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add start of status screen and add new picked up button
- Loading branch information
Showing
12 changed files
with
334 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
website/orders/migrations/0008_order_picked_up_order_picked_up_at.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Generated by Django 4.2.4 on 2023-11-12 09:32 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("orders", "0007_order_deprioritize"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="order", | ||
name="picked_up", | ||
field=models.BooleanField(default=True), | ||
), | ||
migrations.AddField( | ||
model_name="order", | ||
name="picked_up_at", | ||
field=models.DateTimeField(blank=True, null=True), | ||
), | ||
migrations.AlterField( | ||
model_name="order", | ||
name="picked_up", | ||
field=models.BooleanField(default=False), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,37 @@ | ||
<ul class="row w-100"> | ||
<div class="col-auto col-lg-4 d-inline-flex"> | ||
<div class="col d-inline-flex"> | ||
<p class="item-counter">${ index + 1 }$.</p> | ||
<p class="item-name">${ order.product.name }$ (€${ (Math.round(order.order_price * 100) / | ||
100).toFixed(2) }$)</p> | ||
<i v-if="order.product.icon !== null" :class="`fa-solid fa-${order.product.icon} item-icon`"></i> | ||
</div> | ||
<div class="col col-lg-5 d-inline-flex" style="min-width: 0"> | ||
<div class="ms-auto"></div> | ||
<p v-if="order.user !== null" class="text-truncate" style="min-width: 0"> | ||
<i v-if="order.user !== null && {{ user.id }} === order.user.id" | ||
class="fa-solid fa-user fa-xs"></i> | ||
${ order.user.first_name }$ ${ order.user.last_name }$ | ||
</p> | ||
<i v-if="order.user !== null && {{ user.id }} === order.user.id && order.deprioritize === false" | ||
class="fa-solid fa-arrow-down-short-wide" style="font-size: 1.2em; cursor: pointer;" v-on:click="order_to_bottom_of_list(order)"></i> | ||
<p><a target="_blank" :href="`{% url 'admin:orders_order_changelist' %}${order.id}/change/`"><i class="fa-solid fa-pen-to-square fa-xs text-white"></i></a></p> | ||
</div> | ||
<div v-if="!shift.finalized" class="col-12 col-lg-3 d-inline-flex gap-2"> | ||
<button v-if="order.paid" type="button" class="checkbox-paid btn col btn-success" | ||
v-on:click="toggle_paid(order)">Paid <i class="fa-regular fa-circle-check"></i></button> | ||
<button v-else type="button" class="checkbox-paid btn col btn-danger" | ||
v-on:click="toggle_paid(order)">Paid <i class="fa-regular fa-circle-xmark"></i></button> | ||
|
||
<button v-if="order.ready" type="button" class="checkbox-ready btn col btn-success" | ||
v-on:click="toggle_ready(order)">Ready <i class="fa-regular fa-circle-check"></i></button> | ||
<button v-else type="button" class="checkbox-ready btn col btn-danger" | ||
v-on:click="toggle_ready(order)">Ready <i class="fa-regular fa-circle-xmark"></i></button> | ||
<div class="col-lg-5"> | ||
<div class="row"> | ||
<div class="col d-inline-flex"> | ||
<div class="ms-auto"></div> | ||
<p v-if="order.user !== null" class="text-truncate" style="min-width: 0"> | ||
<i v-if="order.user !== null && {{ user.id }} === order.user.id" | ||
class="fa-solid fa-user fa-xs"></i> | ||
${ order.user.first_name }$ ${ order.user.last_name }$ | ||
</p> | ||
<p><a target="_blank" :href="`{% url 'admin:orders_order_changelist' %}${order.id}/change/`"><i class="fa-solid fa-pen-to-square fa-xs text-white"></i></a></p> | ||
</div> | ||
</div> | ||
<div v-if="!shift.finalized" class="row"> | ||
<div class="col d-inline-flex gap-2"> | ||
<button v-if="order.paid" type="button" class="checkbox-paid btn col btn-success" | ||
v-on:click="toggle_paid(order)">Paid <i class="fa-regular fa-circle-check"></i></button> | ||
<button v-else type="button" class="checkbox-paid btn col btn-danger" | ||
v-on:click="toggle_paid(order)">Paid <i class="fa-regular fa-circle-xmark"></i></button> | ||
<button v-if="order.ready" type="button" class="checkbox-ready btn col btn-success" | ||
v-on:click="toggle_ready(order)">Ready <i class="fa-regular fa-circle-check"></i></button> | ||
<button v-else type="button" class="checkbox-ready btn col btn-danger" | ||
v-on:click="toggle_ready(order)">Ready <i class="fa-regular fa-circle-xmark"></i></button> | ||
<button v-if="order.picked_up" type="button" class="checkbox-picked-up btn col btn-success" | ||
v-on:click="toggle_picked_up(order)">Picked up <i class="fa-regular fa-circle-check"></i></button> | ||
<button v-else type="button" class="checkbox-picked-up btn col btn-danger" | ||
v-on:click="toggle_picked_up(order)">Picked up <i class="fa-regular fa-circle-xmark"></i></button> | ||
</div> | ||
</div> | ||
</div> | ||
</ul> |
Oops, something went wrong.