Skip to content

Commit

Permalink
Merge pull request #97 from theflyingmachine/dev-build-register-in-react
Browse files Browse the repository at this point in the history
Dev build register in react
  • Loading branch information
theflyingmachine authored Apr 25, 2023
2 parents 79314c6 + 188abb6 commit 18c0b56
Show file tree
Hide file tree
Showing 15 changed files with 1,103 additions and 80 deletions.
2 changes: 1 addition & 1 deletion bill/templates/bill/bill_template_simple.html
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ <h5 class="pt-2 mt-2 text-center">Bill Summary</h5>
</div>
</div>
{% endif %}
<p class="text-center"> --- END OF PAGE ---</p>
<p class="text-center text-secondary"> --- END OF PAGE ---</p>
{# Dynamic Content ends here#}


Expand Down
2 changes: 1 addition & 1 deletion customer/templates/customer/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ <h6 class="mb-0">{{ trans.amount }}</h6>

<!-- Place this tag in your head or just before your close body tag. -->
<script async defer src="https://buttons.github.io/buttons.js"></script>
<p class="text-center mb-5"> --- END OF PAGE ---</p>
<p class="text-center mb-5 text-secondary"> --- END OF PAGE ---</p>
<script>

(function () {
Expand Down
18 changes: 18 additions & 0 deletions register/serializer.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
from rest_framework import serializers

from .models import Customer, Register


class RegisterSerializer(serializers.ModelSerializer):
class Meta:
model = Register
fields = ['id', 'log_date', 'schedule', 'quantity', 'current_price', 'paid',
'transaction_number']


class CustomerSerializer(serializers.ModelSerializer):
register_entry = RegisterSerializer(many=True, source='register_set')

class Meta:
model = Customer
fields = ['id', 'name', 'm_quantity', 'e_quantity', 'status', 'register_entry']
2 changes: 1 addition & 1 deletion register/templates/register/account.html
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ <h3 class="pt-2 mt-2 text-center">Paid Customers</h3>
<h3 class="pt-5 mt-4 text-center">Nothing to display at the moment</h3>
{% endif %}
</div>
<p class="text-center mb-5"> --- END OF PAGE ---</p>
<p class="text-center mb-5 text-secondary"> --- END OF PAGE ---</p>

{# Delete Modal #}
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog"
Expand Down
3 changes: 2 additions & 1 deletion register/templates/register/broadcast.html
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@ <h3 className="text-center mt-2 mt-lg-5">Broadcast Bills</h3>
return <div className="report">
{component}
{this.state.isLoading ? loading_component : ''}
{this.state.isLoading ? '' : <p className="p-5 text-center"> --- END OF PAGE ---</p>}
{this.state.isLoading ? '' :
<p className="p-5 text-center text-secondary"> --- END OF PAGE ---</p>}
</div>;
}
}
Expand Down
6 changes: 4 additions & 2 deletions register/templates/register/customer.html
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ <h2 class="text-center">View Customers</h2>
{% if forloop.last %}</div>{% endif %}
{% endfor %}
{% else %}
<h3 class="pt-5 mt-4 text-center">No Customers to display</h3>
<div class="alert alert-primary text-center" role="alert">
No Customers to display
</div>
{% endif %}


Expand Down Expand Up @@ -160,7 +162,7 @@ <h3 class="pt-5 mt-4 text-center">Inactive Customers</h3>
{% endfor %}
{% endif %}
<p class="text-center mb-5"></p>
<p class="text-center mb-5"> --- END OF PAGE ---</p>
<p class="text-center mb-5 text-secondary"> --- END OF PAGE ---</p>
</div>


Expand Down
2 changes: 1 addition & 1 deletion register/templates/register/profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ <h5 class="p-2 text-nowrap text-right font-weight-bold">
</tbody>
</table>
</div>
<p class="text-center mb-5 pb-5"> --- END OF PAGE ---</p>
<p class="text-center mb-5 pb-5 text-secondary"> --- END OF PAGE ---</p>
{% endif %}


Expand Down
Loading

0 comments on commit 18c0b56

Please sign in to comment.