fix up mistaken col-4 for wrong Date header, move from name to bill_type for new/update bill and support future dates by showing future in the text, rather than show an actual input type=date
This commit is contained in:
@@ -185,7 +185,7 @@
|
|||||||
{% if loop.first %}
|
{% if loop.first %}
|
||||||
<div class="row pt-2">
|
<div class="row pt-2">
|
||||||
<div class="p-0 col-2"><label class="form-control text-center border-0 fw-bold bg-body-tertiary rounded-0">Name</ ></div>
|
<div class="p-0 col-2"><label class="form-control text-center border-0 fw-bold bg-body-tertiary rounded-0">Name</ ></div>
|
||||||
<div class="p-0 col-4"><label class="form-control text-center border-0 fw-bold bg-body-tertiary rounded-0">Date</ ></div>
|
<div class="p-0 col-2"><label class="form-control text-center border-0 fw-bold bg-body-tertiary rounded-0">Date</ ></div>
|
||||||
<div class="p-0 col-2"><label class="form-control text-center border-0 fw-bold bg-body-tertiary rounded-0">Amount</ ></div>
|
<div class="p-0 col-2"><label class="form-control text-center border-0 fw-bold bg-body-tertiary rounded-0">Amount</ ></div>
|
||||||
<div class="px-0 col-4"><label class="form-control text-center border-0 fw-bold bg-body-tertiary rounded-0">Actions</ ></div>
|
<div class="px-0 col-4"><label class="form-control text-center border-0 fw-bold bg-body-tertiary rounded-0">Actions</ ></div>
|
||||||
</div>
|
</div>
|
||||||
@@ -199,7 +199,11 @@
|
|||||||
{% set classes="form-control text-center" %}
|
{% set classes="form-control text-center" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="px-0 col-2"> <input type="text" class="{{classes}}" id="bill-data-type-{{bd.id}}" value="{{ bd.name }}" disabled> </div>
|
<div class="px-0 col-2"> <input type="text" class="{{classes}}" id="bill-data-type-{{bd.id}}" value="{{ bd.name }}" disabled> </div>
|
||||||
|
{% if bd.bill_date == 'future' %}
|
||||||
|
<div class="px-0 col-2"> <input type="text" class="{{classes}}" id="bill-data-date-{{bd.id}}" value="{{ bd.bill_date }}" disabled> </div>
|
||||||
|
{% else %}
|
||||||
<div class="px-0 col-2"> <input type="date" class="{{classes}}" id="bill-data-date-{{bd.id}}" value="{{ bd.bill_date }}" disabled> </div>
|
<div class="px-0 col-2"> <input type="date" class="{{classes}}" id="bill-data-date-{{bd.id}}" value="{{ bd.bill_date }}" disabled> </div>
|
||||||
|
{% endif %}
|
||||||
<div class="px-0 col-2"> <input type="number" class="{{classes}}" id="bill-data-amount-{{bd.id}}" value="{{ bd.amount }}" disabled> </div>
|
<div class="px-0 col-2"> <input type="number" class="{{classes}}" id="bill-data-amount-{{bd.id}}" value="{{ bd.amount }}" disabled> </div>
|
||||||
{% if bd.estimated == 0 %}
|
{% if bd.estimated == 0 %}
|
||||||
<button id="bill-data-chg-{{bd.id}}" class="px-0 col-2 btn btn-success bg-success-subtle text-success" onClick="StartUpdateBill( {{bd.id}} )"><span class="bi bi-pencil-square"> Change</button>
|
<button id="bill-data-chg-{{bd.id}}" class="px-0 col-2 btn btn-success bg-success-subtle text-success" onClick="StartUpdateBill( {{bd.id}} )"><span class="bi bi-pencil-square"> Change</button>
|
||||||
@@ -247,7 +251,7 @@
|
|||||||
$.ajax( { type: 'POST', url: '/newbill',
|
$.ajax( { type: 'POST', url: '/newbill',
|
||||||
contentType: 'application/json',
|
contentType: 'application/json',
|
||||||
data: JSON.stringify( {
|
data: JSON.stringify( {
|
||||||
'name': $('#new-bill-data-type').val(),
|
'bill_type': $('#new-bill-data-type').val(),
|
||||||
'amount': $('#new-bill-data-amount').val(),
|
'amount': $('#new-bill-data-amount').val(),
|
||||||
'bill_date': $('#new-bill-data-date').val() } ),
|
'bill_date': $('#new-bill-data-date').val() } ),
|
||||||
success: function() { window.location='bills' } } )
|
success: function() { window.location='bills' } } )
|
||||||
@@ -258,7 +262,7 @@
|
|||||||
$.ajax( { type: 'POST', url: '/newbill',
|
$.ajax( { type: 'POST', url: '/newbill',
|
||||||
contentType: 'application/json',
|
contentType: 'application/json',
|
||||||
data: JSON.stringify( {
|
data: JSON.stringify( {
|
||||||
'name': $('#new-bill-data-type').val(),
|
'bill_type': $('#new-bill-data-type').val(),
|
||||||
'amount': $('#new-bill-data-amount').val(),
|
'amount': $('#new-bill-data-amount').val(),
|
||||||
'growth': $('#new-bill-data-growth').val() } ),
|
'growth': $('#new-bill-data-growth').val() } ),
|
||||||
success: function() { window.location='bills' } } )
|
success: function() { window.location='bills' } } )
|
||||||
@@ -302,7 +306,7 @@
|
|||||||
$.ajax( { type: 'POST', url: '/updatebill',
|
$.ajax( { type: 'POST', url: '/updatebill',
|
||||||
contentType: 'application/json', data: JSON.stringify( {
|
contentType: 'application/json', data: JSON.stringify( {
|
||||||
'id': id,
|
'id': id,
|
||||||
'name': $('#bill-data-type-'+id).val(),
|
'bill_type': $('#bill-data-type-'+id).val(),
|
||||||
'bill_date' : $('#bill-data-date-'+id).val(),
|
'bill_date' : $('#bill-data-date-'+id).val(),
|
||||||
'amount': $('#bill-data-amount-'+id).val() } ),
|
'amount': $('#bill-data-amount-'+id).val() } ),
|
||||||
success: function() { window.location='bills' } } )
|
success: function() { window.location='bills' } } )
|
||||||
|
|||||||
Reference in New Issue
Block a user