Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
2a1fe46
Merch label maker
zarya Jun 15, 2025
1736f13
Merge branch 'main' into opr_stickers_merch
zarya Jun 15, 2025
380a2cc
Fix typo, move js to js file
zarya Jun 15, 2025
dbc1682
Fixed variable name
zarya Jun 15, 2025
5499cae
Remove js (not needed), made the post download zpl, made the qr code …
zarya Jun 15, 2025
4ff8648
Added infodesk scan page intergration. after scanning the merch ticke…
zarya Jun 15, 2025
7d4849d
Merge branch 'main' into opr_stickers_merch
zarya Jun 15, 2025
2390a0c
Initial function inventory scan
zarya Jun 22, 2025
a315409
Merge branch 'main' into opr_stickers_merch
zarya Jun 22, 2025
4dc989e
Merge branch 'main' into opr_stickers_merch
zarya Jun 26, 2025
f8a65f6
Small fixes for handing uuid on features and map layers imports (#1889)
zarya Jun 26, 2025
cd5cc8e
Added year specific logo for 2025 (#1890)
flummer Jun 26, 2025
92b826f
Fixed the missing and wrong title on the event page (#1895)
zarya Jul 1, 2025
13bad9d
Added new sponsor logos for 2025 (#1894)
flummer Jul 1, 2025
390bc77
remove a few forgotten debug prints
tykling Jul 1, 2025
b34517d
fixup PrizeTicketAdmin
tykling Jul 1, 2025
f0212f4
Participants counts (#1897)
0xUnicorn Jul 6, 2025
ddf7692
Add facilities and layers to the layer editor (#1886)
zarya Jul 6, 2025
71a5b98
show comment for prizetickets in admin
tykling Jul 6, 2025
4236670
Fixed bug when invalid labels where scanned, added total to merch to …
zarya Jul 8, 2025
6e353f0
Added link to backoffice page
zarya Jul 8, 2025
f8b8bb7
Merge branch 'main' into opr_stickers_merch
tykling Jul 8, 2025
7f17cf6
Fix typo
zarya Jul 8, 2025
55350a6
Merge branch 'main' into opr_stickers_merch
tykling Jul 10, 2025
3046425
Merge branch 'main' into opr_stickers_merch
tykling Jul 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added src/backoffice/static/audio/error.mp3
Binary file not shown.
Binary file added src/backoffice/static/audio/success.mp3
Binary file not shown.
Binary file added src/backoffice/static/audio/tada.mp3
Binary file not shown.
56 changes: 56 additions & 0 deletions src/backoffice/static/js/inventory_scan.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
document.addEventListener("DOMContentLoaded", () => {
"use strict";

const search_form = document.getElementById("search_form");
const token_input = document.getElementById("token_input");

search_form.onsubmit = submit;

if (document.getElementById("opr_id") && document.getElementById("opr_id")) {
new Audio('/static/audio/success.mp3').play()
} else if (document.getElementById("opr_id")) {
new Audio('/static/audio/tada.mp3').play();
} else if (!document.getElementById("scan_again").hidden) {
new Audio('/static/audio/error.mp3').play()
}

function submit(e) {
var product_quantity = document.getElementById("product_quantity");
e.preventDefault();
if (token_input.value === "#clear") {
window.location.replace(window.location.pathname);
} else if (product_quantity && token_input.value.split("/").length == 4) {
var quantity = Number(product_quantity.innerHTML)
var opr = document.getElementById("opr_id").innerHTML
var scanned_opr = token_input.value.split("/")[3];
token_input.value = "";
if (opr === scanned_opr) {
if (quantity > 1) {
product_quantity.innerHTML = quantity - 1;
new Audio('/static/audio/success.mp3').play()
} else {
if (quantity === 1) {
product_quantity.innerHTML = "0";
document.getElementById("checkin_qr").removeAttribute("hidden");;
new Audio('/static/audio/tada.mp3').play()
} else {
new Audio('/static/audio/error.mp3').play()
token_input.value = "TO MANY ITEMS SCANNED!!!!!";
}
}
} else {
new Audio('/static/audio/error.mp3').play()
token_input.value = "WRONG ITEM!!!!!";
}
} else {
search_form.submit();
}
}

document.addEventListener("keydown", event => {
if (event.key === "#") {
token_input.value = "";
token_input.focus();
}
});
});
20 changes: 20 additions & 0 deletions src/backoffice/static/js/ticket_scan.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,26 @@ document.addEventListener("DOMContentLoaded", () => {
check_in_form.submit();
} else if (ticket_token_input.value.length === 65) {
search_form.submit();
} else if (ticket_token_input.value.startsWith("#bornhack://opr/")) {
var oprelement = document.getElementById("opr");
if (oprelement) {
var opr = oprelement.innerHTML
var quantity = document.getElementById("product_quantity");
var opr_scanned = ticket_token_input.value.split("/")[3]
if (opr == opr_scanned) {
if (quantity && quantity.innerHTML=="1") {
quantity.innerHTML = Number(quantity.innerHTML) - 1;
} else {
document.getElementById("checkin_qr").removeAttribute("hidden");
}
ticket_token_input.value = "";
} else {
ticket_token_input.value = "WRONG ITEM";
}
} else {
scan_again.removeAttribute("hidden");
ticket_token_input.value = ""
}
} else {
scan_again.removeAttribute("hidden");
}
Expand Down
11 changes: 11 additions & 0 deletions src/backoffice/templates/includes/index_info.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,15 @@ <h4 class="list-group-item-heading">
<h4 class="list-group-item-heading">Shop Ticket Overview</h4>
<p class="list-group-item-text">Use this to list shop tickets</p>
</a>
{% if not camp.read_only %}
<a href="{% url 'backoffice:scan_inventory_index' camp_slug=camp.slug %}"
class="list-group-item list-group-item-action">
<h4 class="list-group-item-heading">
Scan inventory
</h4>
<p class="list-group-item-text">
Use this view to scan inventory QR codes to check in inventory.
</p>
</a>
{% endif %}
{% endif %}
4 changes: 4 additions & 0 deletions src/backoffice/templates/includes/index_orga.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ <h4 class="list-group-item-heading">Approve Public Credit Names</h4>
<h4 class="list-group-item-heading">Merchandise Orders</h4>
<p class="list-group-item-text">Use this view to look at Merchandise Orders</p>
</a>
<a href="{% url 'backoffice:merchandise_orders_labels' camp_slug=camp.slug %}" class="list-group-item list-group-item-action">
<h4 class="list-group-item-heading">Merchandise Orders Labels</h4>
<p class="list-group-item-text">Use this view to print Merchandise Order labels</p>
</a>
<a href="{% url 'backoffice:merchandise_to_order' camp_slug=camp.slug %}" class="list-group-item list-group-item-action">
<h4 class="list-group-item-heading">Merchandise To Order</h4>
<p class="list-group-item-text">Use this view to generate a list of merchandise that needs to be ordered</p>
Expand Down
66 changes: 66 additions & 0 deletions src/backoffice/templates/info_desk/inventory.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{% extends 'base.html' %}
{% load static %}
{% load qrcode %}

{% block title %}
Inventory | {{ block.super }}
{% endblock %}

{% block content %}

<form id="search_form" method="POST" action="">
{% csrf_token %}
<div class="row">
<div class="col-md-12">
<h3>Inventory: {{ pos.name }}</h3>
<h3>Scan the item!</h3>
<input type="text" class="form-control input-lg" name="token" id="token_input" autocomplete="off">
<div id="scan_again" {% if not failed %}hidden{% endif %}>
Scan again!
<hr/>
</div>
</div>
</div>
</form>
{% if opr %}
{% with opr.id|stringformat:"i" as opr_id %}
<div class="row">
<table>
<tr><td colspan=2><h2>Checkin {{ opr.product.category }}</h2></td></tr>
<tr>
<th>OPR</th>
<td><h2 id="opr_id">{{ opr.id }}</h2></td>
</tr>
<tr>
<th>Product</th>
<td>{{ opr.product.name }}</td>
</tr>
{% if opr.quantity > 1 %}
<tr>
<th>Quantity to check</th>
<td><h2 class="alert alert-warning"><span id="product_quantity">{{ opr.quantity|add:-1 }}</span>/{{ opr.quantity }}</h2></td>
</tr>
{% endif %}
<tr>
<th>Label</th>
<td>{{ opr.label_printed|yesno }}</td>
</tr>
<tr>
<th>Ready</th>
<td>{{ opr.ready_for_pickup|yesno }}</td>
</tr>
</table>
</div>
<div class="row justify-content-between">
<div class="col-md-4">
{% qr_code "clear" %}
</div>
<div class="col-md-4" id="checkin_qr" {% if opr.quantity > 1 %}hidden{% endif %}>
{% qr_code "bornhack://opr/"|add:opr_id|add:"/checkin" %}
</div>
</div>
{% endwith %}
{% endif %}
<script src="{% static 'js/inventory_scan.js' %}"></script>

{% endblock content %}
15 changes: 15 additions & 0 deletions src/backoffice/templates/info_desk/inventory_index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{% extends 'base.html' %}

{% block title %}
Select PoS | Scan Inventory | {{ block.super }}
{% endblock %}

{% block content %}
<div class="list-group">
{% for pos in pos_list %}
<a href="{% url 'backoffice:scan_inventory' camp_slug=camp.slug pos_slug=pos.slug %}" class="list-group-item list-group-item-action">
<h4 class="list-group-item-heading">{{ pos.name }}</h4>
</a>
{% endfor %}
</div>
{% endblock content %}
Loading
Loading