mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-02-07 23:49:42 +00:00
Enable preview of event authorisation
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
<div class="card card-default
|
||||
{% if object.authorised %}
|
||||
card-success
|
||||
{% if event.authorised %}
|
||||
border-success
|
||||
{% elif event.authorisation and event.authorisation.amount != event.total and event.authorisation.last_edited_at > event.auth_request_at %}
|
||||
card-warning
|
||||
border-warning
|
||||
{% elif event.auth_request_to %}
|
||||
card-info
|
||||
border-info
|
||||
{% endif %}
|
||||
">
|
||||
<div class="card-header">Client Authorisation</div>
|
||||
<div class="card-body row">
|
||||
<dl class="col-md-6">
|
||||
<dl class="col-sm-6">
|
||||
<dt>Authorisation Request</dt>
|
||||
<dd>{{ object.auth_request_to|yesno:"Yes,No" }}</dd>
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
<dt>To</dt>
|
||||
<dd>{{ object.auth_request_to }}</dd>
|
||||
</dl>
|
||||
<dd class="d-block d-sm-none"> </dd>
|
||||
<dl class="col-md-6">
|
||||
<dl class="col-sm-6">
|
||||
<hr class="d-block d-sm-none">
|
||||
<dt>Authorised</dt>
|
||||
<dd>{{ object.authorised|yesno:"Yes,No" }}</dd>
|
||||
|
||||
|
||||
51
RIGS/templates/partials/event_detail_buttons.html
Normal file
51
RIGS/templates/partials/event_detail_buttons.html
Normal file
@@ -0,0 +1,51 @@
|
||||
{% load button from filters %}
|
||||
<div class="btn-group py-3">
|
||||
{% button 'edit' 'event_update' event.pk %}
|
||||
{% if event.is_rig %}
|
||||
{% button 'print' 'event_print' event.pk %}
|
||||
{% endif %}
|
||||
{% button 'duplicate' 'event_duplicate' event.pk %}
|
||||
{% if event.is_rig %}
|
||||
{% if event.internal %}
|
||||
<a class="btn item-add modal-href event-authorise-request
|
||||
{% if event.authorised %}
|
||||
btn-success active
|
||||
{% elif event.authorisation and event.authorisation.amount != event.total and event.authorisation.last_edited_at > event.auth_request_at %}
|
||||
btn-warning
|
||||
{% elif event.auth_request_to %}
|
||||
btn-info
|
||||
{% else %}
|
||||
btn-secondary
|
||||
{% endif %}
|
||||
"
|
||||
href="{% url 'event_authorise_request' object.pk %}">
|
||||
<span class="fas fa-paper-plane"></span>
|
||||
<span class="d-none d-sm-inline">
|
||||
{% if event.authorised %}
|
||||
Authorised
|
||||
{% elif event.authorisation and event.authorisation.amount != event.total and event.authorisation.last_edited_at > event.auth_request_at %}
|
||||
Authorisation Issue
|
||||
{% elif event.auth_request_to %}
|
||||
Awaiting Authorisation
|
||||
{% else %}
|
||||
Request Authorisation
|
||||
{% endif %}
|
||||
</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if perms.RIGS.add_invoice %}
|
||||
<a id="invoiceDropdownLabel" href="{% url 'invoice_event' event.pk %}" class="btn
|
||||
{% if event.invoice and event.invoice.is_closed %}
|
||||
btn-success
|
||||
{% elif event.invoice %}
|
||||
btn-warning
|
||||
{% else %}
|
||||
btn-danger
|
||||
{% endif %}
|
||||
" title="Invoice Rig"><span
|
||||
class="fas fa-pound-sign"></span>
|
||||
<span class="d-none d-sm-inline">Invoice</span></a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
Reference in New Issue
Block a user