diff --git a/osinaweb/billing/__pycache__/models.cpython-312.pyc b/osinaweb/billing/__pycache__/models.cpython-312.pyc index b3ad9c1c..f486031c 100644 Binary files a/osinaweb/billing/__pycache__/models.cpython-312.pyc and b/osinaweb/billing/__pycache__/models.cpython-312.pyc differ diff --git a/osinaweb/billing/__pycache__/urls.cpython-312.pyc b/osinaweb/billing/__pycache__/urls.cpython-312.pyc index 26e8ebf2..671b70ef 100644 Binary files a/osinaweb/billing/__pycache__/urls.cpython-312.pyc and b/osinaweb/billing/__pycache__/urls.cpython-312.pyc differ diff --git a/osinaweb/billing/__pycache__/views.cpython-312.pyc b/osinaweb/billing/__pycache__/views.cpython-312.pyc index 9454eff8..1cbc2833 100644 Binary files a/osinaweb/billing/__pycache__/views.cpython-312.pyc and b/osinaweb/billing/__pycache__/views.cpython-312.pyc differ diff --git a/osinaweb/billing/add/__pycache__/urls.cpython-312.pyc b/osinaweb/billing/add/__pycache__/urls.cpython-312.pyc index 5e1073ed..0a8b845c 100644 Binary files a/osinaweb/billing/add/__pycache__/urls.cpython-312.pyc and b/osinaweb/billing/add/__pycache__/urls.cpython-312.pyc differ diff --git a/osinaweb/billing/add/__pycache__/views.cpython-312.pyc b/osinaweb/billing/add/__pycache__/views.cpython-312.pyc index dc55c31c..76c4c18b 100644 Binary files a/osinaweb/billing/add/__pycache__/views.cpython-312.pyc and b/osinaweb/billing/add/__pycache__/views.cpython-312.pyc differ diff --git a/osinaweb/billing/add/urls.py b/osinaweb/billing/add/urls.py index b5c7f44b..84f0f892 100644 --- a/osinaweb/billing/add/urls.py +++ b/osinaweb/billing/add/urls.py @@ -7,6 +7,9 @@ urlpatterns = [ path('service', views.add_service, name='addservice'), path('order//', views.add_order, name='addorder'), - path('invoice//', views.add_invoice_pdf, name='addinvoice'), + path('service///', views.add_service_in_order, name='addserviceinorder'), + + path('add_payment_comment', views.add_payment_comment_modal, name='add_payment_comment_modal'), + path('add_payment', views.add_payment_modal, name='add_payment_modal'), ] diff --git a/osinaweb/billing/add/views.py b/osinaweb/billing/add/views.py index 53e288c7..28ccc22b 100644 --- a/osinaweb/billing/add/views.py +++ b/osinaweb/billing/add/views.py @@ -7,7 +7,7 @@ from django.conf import settings import os from osinacore.decorators import * from django.core.files.base import ContentFile -from weasyprint import HTML, CSS +from django.db.models import Q @@ -78,6 +78,7 @@ def add_service (request, *args, **kwargs): def add_order(request, customer_id): customer= get_object_or_404(CustomerProfile, id=customer_id) businesses = Business.objects.filter(customer=customer) + services = Item.objects.filter(Q(type='Service') & (Q(customer=customer) | Q(customer__isnull=True))) if request.method == 'POST': status = request.POST.get('status') @@ -98,6 +99,7 @@ def add_order(request, customer_id): context = { 'customer' : customer, 'businesses' : businesses, + 'services' : services, } return render(request, 'add_templates/add-order.html', context) @@ -119,63 +121,24 @@ def add_service_in_order(request, service_id, order_id): +@staff_login_required +def add_payment_comment_modal(request): -def add_invoice_pdf(request, order_id): - order = get_object_or_404(Order, id=order_id) - - current_year = str(timezone.now().year)[-2:] - last_invoice = Invoice.objects.all().last() - if last_invoice: - last_invoice_number = int(last_invoice.invoice_number.split('-')[1].split('+')[0]) - new_invoice_number = f"$0{current_year}-{last_invoice_number + 1}" - else: - new_invoice_number = f"$0{current_year}-1425" + context = { + } + return render(request, 'add_templates/add-payment-comment-modal.html', context) - invoice = Invoice.objects.create( - invoice_number = new_invoice_number, - order=order, - date_created=datetime.now(), - ) - template = get_template('details_templates/invoice-details.html') - context = {'order': order} - html_string = template.render(context) - - # Define the CSS string with Poppins font - css_string = ''' - @font-face { - font-family: 'Poppins'; - src: url('path_to_poppins_font_file.ttf') format('truetype'); /* Update the path to the font file */ - } - - body { - font-family: 'Poppins', sans-serif; /* Use Poppins font for the entire document */ - } - - /* Your existing CSS styles */ - /* Add or modify styles as needed */ - ''' - - # Generate PDF - pdf = HTML(string=html_string).write_pdf( - stylesheets=[ - CSS(string=css_string), - CSS(string='@page { margin: 30px; }') - ], - presentational_hints=True - ) +@staff_login_required +def add_payment_modal(request): - filename = f'invoice_{invoice.invoice_number}.pdf' - pdf_content = ContentFile(pdf) - invoice.pdf.save(filename, pdf_content, save=True) + context = { + } - # Return PDF - response = HttpResponse(pdf, content_type='application/pdf') - response['Content-Disposition'] = 'attachment; filename="my_pdf.pdf"' - return response + return render(request, 'add_templates/add-payment-modal.html', context) diff --git a/osinaweb/billing/edit/__pycache__/urls.cpython-312.pyc b/osinaweb/billing/edit/__pycache__/urls.cpython-312.pyc new file mode 100644 index 00000000..68c0a98a Binary files /dev/null and b/osinaweb/billing/edit/__pycache__/urls.cpython-312.pyc differ diff --git a/osinaweb/billing/edit/__pycache__/views.cpython-312.pyc b/osinaweb/billing/edit/__pycache__/views.cpython-312.pyc new file mode 100644 index 00000000..762467ed Binary files /dev/null and b/osinaweb/billing/edit/__pycache__/views.cpython-312.pyc differ diff --git a/osinaweb/billing/edit/urls.py b/osinaweb/billing/edit/urls.py index e69de29b..7497a217 100644 --- a/osinaweb/billing/edit/urls.py +++ b/osinaweb/billing/edit/urls.py @@ -0,0 +1,7 @@ +from django.urls import path +from billing.edit import views + + +urlpatterns = [ + path('edit_payment_modal', views.edit_payment_modal, name='edit_payment_modal'), +] diff --git a/osinaweb/billing/edit/views.py b/osinaweb/billing/edit/views.py index e69de29b..8870b4cb 100644 --- a/osinaweb/billing/edit/views.py +++ b/osinaweb/billing/edit/views.py @@ -0,0 +1,13 @@ +from django.shortcuts import render, get_object_or_404 +from osinacore.models import * +from billing.models import * +from osinacore.decorators import * + +@staff_login_required +def edit_payment_modal(request): + + context = { + + } + + return render(request, 'edit_templates/edit-payment-modal.html', context) \ No newline at end of file diff --git a/osinaweb/billing/models.py b/osinaweb/billing/models.py index ca35c104..610ed827 100644 --- a/osinaweb/billing/models.py +++ b/osinaweb/billing/models.py @@ -117,6 +117,7 @@ class OrderPayment(models.Model): comment = models.TextField(null=True, blank=True) def __str__(self): return f"Payment for {self.order}" + class Receipt(models.Model): receipt_number = models.CharField(max_length=100) diff --git a/osinaweb/billing/templates/add_templates/add-order.html b/osinaweb/billing/templates/add_templates/add-order.html index 579446ec..ea6d600c 100644 --- a/osinaweb/billing/templates/add_templates/add-order.html +++ b/osinaweb/billing/templates/add_templates/add-order.html @@ -11,7 +11,7 @@

- Add Order for {{customer.user.first_name}} {{customer.user.last_name}} + Create Order for {{customer.user.first_name}} {{customer.user.last_name}}

@@ -20,7 +20,7 @@
-
+ + + +
- - +

Pick Services

+
+ + {% for service in services %} +
+
+

+ {{service.title}} +

+
+
+

+ ${{service.amount}}

+
+
+

Add

+
+
+ {% endfor %} +
+ class="w-fit py-1 px-5 bg-osiblue rounded-md outline-none text-white border border-osiblue text-xl cursor-pointer hover:bg-white hover:text-osiblue duration-300">Create
@@ -52,6 +71,9 @@
+ + + {% endblock %} \ No newline at end of file diff --git a/osinaweb/billing/templates/add_templates/add-payment-comment-modal.html b/osinaweb/billing/templates/add_templates/add-payment-comment-modal.html new file mode 100644 index 00000000..0057e055 --- /dev/null +++ b/osinaweb/billing/templates/add_templates/add-payment-comment-modal.html @@ -0,0 +1,34 @@ +{% load static %} + + + + + + + + Osina + + + + + + + +
+ {% csrf_token %} +

Add Comment

+ +
+ +
+ +
+ +
+
+ + + \ No newline at end of file diff --git a/osinaweb/billing/templates/add_templates/add-payment-modal.html b/osinaweb/billing/templates/add_templates/add-payment-modal.html new file mode 100644 index 00000000..1e309340 --- /dev/null +++ b/osinaweb/billing/templates/add_templates/add-payment-modal.html @@ -0,0 +1,62 @@ +{% load static %} + + + + + + + + Osina + + + + + + + +
+ {% csrf_token %} +

Add Payment

+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ + +
+ + +
+ + +
+ +
+
+ + + \ No newline at end of file diff --git a/osinaweb/billing/templates/details_templates/order-details.html b/osinaweb/billing/templates/details_templates/order-details.html index 347cde05..fb9407fa 100644 --- a/osinaweb/billing/templates/details_templates/order-details.html +++ b/osinaweb/billing/templates/details_templates/order-details.html @@ -7,13 +7,34 @@
-
-
-

Order {{order.order_id}}

-

{{order.customer.user.first_name}} {{order.customer.user.last_name}}

+
+
+

Order {{order.order_id}} - {{order.customer.user.first_name}} + {{order.customer.user.last_name}}

+

+

+ {{order.status}} + - 12-02-2024 +

-

{{order.status}}

+ +
+ + + +
{% if order_items %} @@ -23,22 +44,27 @@ {% for item in order_items %}
-
+

{{item.item.title}}

-

${{item.item.amount}}

+

${{item.item.amount}} +

-
- > - - - -

Remove

-
+ +
+ > + + + +

Remove

+
+
{% endfor %}
@@ -53,29 +79,152 @@ {% for service in services %}
-
+

{{service.title}}

-

${{service.amount}}

+

${{service.amount}} +

-
- - - -

Add

-
+ +
+ + + +

Add

+
+
{% endfor %}
{% endif %} + + +
+
+
+

Payment

+
+ + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Amount + + Date Paid + + Date Due + + Payment Method + + Comment + + Actions +
+

$20.0

+
+

02-12-2024

+
+

02-12-2024

+
+

Cash

+
+
+
+ + + +
+
+ +
+
+
+ + + +
+ + +
+ + + +
+
+
+
+
+
+
+ + + + + {% endblock %} \ No newline at end of file diff --git a/osinaweb/billing/templates/edit_templates/edit-payment-modal.html b/osinaweb/billing/templates/edit_templates/edit-payment-modal.html new file mode 100644 index 00000000..b34d5952 --- /dev/null +++ b/osinaweb/billing/templates/edit_templates/edit-payment-modal.html @@ -0,0 +1,62 @@ +{% load static %} + + + + + + + + Osina + + + + + + + +
+ {% csrf_token %} +

Edit Payment

+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ + +
+ + +
+ + +
+ +
+
+ + + \ No newline at end of file diff --git a/osinaweb/billing/urls.py b/osinaweb/billing/urls.py index d21abcda..c58f79c3 100644 --- a/osinaweb/billing/urls.py +++ b/osinaweb/billing/urls.py @@ -6,6 +6,8 @@ from billing import views urlpatterns = [ path('add/', include('billing.add.urls')), path('delete/', include('billing.delete.urls')), + path('delete/', include('billing.edit.urls')), + # LISTING path('items/', views.items, name='items'), diff --git a/osinaweb/db.sqlite3 b/osinaweb/db.sqlite3 index dfdd46cb..0cd843f9 100644 Binary files a/osinaweb/db.sqlite3 and b/osinaweb/db.sqlite3 differ diff --git a/osinaweb/osinacore/__pycache__/urls.cpython-312.pyc b/osinaweb/osinacore/__pycache__/urls.cpython-312.pyc index eab7c448..cd2cf2ea 100644 Binary files a/osinaweb/osinacore/__pycache__/urls.cpython-312.pyc and b/osinaweb/osinacore/__pycache__/urls.cpython-312.pyc differ diff --git a/osinaweb/osinacore/__pycache__/views.cpython-312.pyc b/osinaweb/osinacore/__pycache__/views.cpython-312.pyc index 60da5746..56854958 100644 Binary files a/osinaweb/osinacore/__pycache__/views.cpython-312.pyc and b/osinaweb/osinacore/__pycache__/views.cpython-312.pyc differ diff --git a/osinaweb/osinacore/add/__pycache__/urls.cpython-312.pyc b/osinaweb/osinacore/add/__pycache__/urls.cpython-312.pyc index ddfdd428..0a423746 100644 Binary files a/osinaweb/osinacore/add/__pycache__/urls.cpython-312.pyc and b/osinaweb/osinacore/add/__pycache__/urls.cpython-312.pyc differ diff --git a/osinaweb/osinacore/add/__pycache__/views.cpython-312.pyc b/osinaweb/osinacore/add/__pycache__/views.cpython-312.pyc index cd26776d..c027974a 100644 Binary files a/osinaweb/osinacore/add/__pycache__/views.cpython-312.pyc and b/osinaweb/osinacore/add/__pycache__/views.cpython-312.pyc differ diff --git a/osinaweb/osinacore/add/urls.py b/osinaweb/osinacore/add/urls.py index f5aefc7d..77afad4f 100644 --- a/osinaweb/osinacore/add/urls.py +++ b/osinaweb/osinacore/add/urls.py @@ -31,5 +31,5 @@ urlpatterns = [ path('ticket//', views.add_ticket, name='addticket'), path('ticketupdate//', views.add_ticket_update, name='addticketupdate'), - + path('add_payment_method_modal', views.add_payment_method_modal, name='add_payment_method_modal'), ] \ No newline at end of file diff --git a/osinaweb/osinacore/add/views.py b/osinaweb/osinacore/add/views.py index 7d058a00..7a89ef2f 100644 --- a/osinaweb/osinacore/add/views.py +++ b/osinaweb/osinacore/add/views.py @@ -717,5 +717,15 @@ def add_ticket_update(request, ticket_id): +@staff_login_required +def add_payment_method_modal(request, *args, **kwargs): + + context = { + + } + + return render(request, 'add_templates/add-payment-method-modal.html', context) + + diff --git a/osinaweb/osinacore/delete/__pycache__/urls.cpython-312.pyc b/osinaweb/osinacore/delete/__pycache__/urls.cpython-312.pyc index cc953bfb..167350ae 100644 Binary files a/osinaweb/osinacore/delete/__pycache__/urls.cpython-312.pyc and b/osinaweb/osinacore/delete/__pycache__/urls.cpython-312.pyc differ diff --git a/osinaweb/osinacore/delete/__pycache__/views.cpython-312.pyc b/osinaweb/osinacore/delete/__pycache__/views.cpython-312.pyc index 354681d7..16dc23d9 100644 Binary files a/osinaweb/osinacore/delete/__pycache__/views.cpython-312.pyc and b/osinaweb/osinacore/delete/__pycache__/views.cpython-312.pyc differ diff --git a/osinaweb/osinacore/delete/urls.py b/osinaweb/osinacore/delete/urls.py index 5f9f0e47..991de119 100644 --- a/osinaweb/osinacore/delete/urls.py +++ b/osinaweb/osinacore/delete/urls.py @@ -14,6 +14,8 @@ urlpatterns = [ path('ticket/', views.delete_ticket_modal, name='deleteticketmodal'), path('point///', views.delete_point_modal, name='deletepointmodal'), path('taskpoint///', views.delete_task_point_modal, name='deletetaskpointmodal'), - path('note/', views.delete_note_modal, name='deletenotemodal') + path('note/', views.delete_note_modal, name='deletenotemodal'), + path('payment/', views.delete_payment_modal, name='deletepaymentmodal'), + path('paymentmethod/', views.delete_payment_method_modal, name='deletepaymentmethodmodal') ] \ No newline at end of file diff --git a/osinaweb/osinacore/delete/views.py b/osinaweb/osinacore/delete/views.py index debf383c..e8a0b75c 100644 --- a/osinaweb/osinacore/delete/views.py +++ b/osinaweb/osinacore/delete/views.py @@ -153,3 +153,23 @@ def delete_note_modal(request, note_id): return render(request, "delete_templates/delete-note-modal.html", context) + +@staff_login_required +def delete_payment_modal(request): + + context = { + + } + + return render(request, "delete_templates/delete-payment-modal.html", context) + + +@staff_login_required +def delete_payment_method_modal(request): + + context = { + + } + + return render(request, "delete_templates/delete-payment-method-modal.html", context) + diff --git a/osinaweb/osinacore/edit/__pycache__/urls.cpython-312.pyc b/osinaweb/osinacore/edit/__pycache__/urls.cpython-312.pyc index a0991f28..f38ae700 100644 Binary files a/osinaweb/osinacore/edit/__pycache__/urls.cpython-312.pyc and b/osinaweb/osinacore/edit/__pycache__/urls.cpython-312.pyc differ diff --git a/osinaweb/osinacore/edit/__pycache__/views.cpython-312.pyc b/osinaweb/osinacore/edit/__pycache__/views.cpython-312.pyc index 83999fa1..c55dfd29 100644 Binary files a/osinaweb/osinacore/edit/__pycache__/views.cpython-312.pyc and b/osinaweb/osinacore/edit/__pycache__/views.cpython-312.pyc differ diff --git a/osinaweb/osinacore/edit/urls.py b/osinaweb/osinacore/edit/urls.py index c8ef0e2f..6bd07c8b 100644 --- a/osinaweb/osinacore/edit/urls.py +++ b/osinaweb/osinacore/edit/urls.py @@ -17,6 +17,7 @@ urlpatterns = [ path('businesstype//', views.edit_business_type, name='editbusinesstype'), path('reference//', views.edit_reference, name='editreference'), path('tag//', views.edit_tag, name='edittag'), + path('editpaymentmethod/', views.edit_payment_method, name='editpaymentmethod'), #Mark Points diff --git a/osinaweb/osinacore/edit/views.py b/osinaweb/osinacore/edit/views.py index 769dba50..8f442652 100644 --- a/osinaweb/osinacore/edit/views.py +++ b/osinaweb/osinacore/edit/views.py @@ -378,7 +378,14 @@ def edit_tag(request, tag_id): +@staff_login_required +def edit_payment_method(request, *args, **kwargs): + + context = { + } + return render(request, 'edit_templates/edit-payment-method.html', context) + diff --git a/osinaweb/osinacore/templates/add-edit-main.html b/osinaweb/osinacore/templates/add-edit-main.html index d7df6bca..b68a0f85 100644 --- a/osinaweb/osinacore/templates/add-edit-main.html +++ b/osinaweb/osinacore/templates/add-edit-main.html @@ -272,6 +272,13 @@
+ +
+

Payment Methods/p> +

+
+
@@ -557,6 +564,13 @@
+ +
+

Payment Methods/p> +

+
+
diff --git a/osinaweb/osinacore/templates/add_templates/add-payment-method-modal.html b/osinaweb/osinacore/templates/add_templates/add-payment-method-modal.html new file mode 100644 index 00000000..b0023ea8 --- /dev/null +++ b/osinaweb/osinacore/templates/add_templates/add-payment-method-modal.html @@ -0,0 +1,60 @@ +{% load static %} + + + + + + + + Osina + + + + + + + +
+ {% csrf_token %} +

Add Payment Method

+ +
+ + +
+ +
+ + +
+ +
+ +
+
+ + Upload + Logo + +
+
+
+ +
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/osinaweb/osinacore/templates/delete_templates/delete-payment-method-modal.html b/osinaweb/osinacore/templates/delete_templates/delete-payment-method-modal.html new file mode 100644 index 00000000..69486555 --- /dev/null +++ b/osinaweb/osinacore/templates/delete_templates/delete-payment-method-modal.html @@ -0,0 +1,30 @@ +{%load static%} + + + + + + + + + + + + + + +
+ {% csrf_token %} + +
+

Are you sure you want to delete this Payment Method?

+ +
+ +
+
+
+ + + \ No newline at end of file diff --git a/osinaweb/osinacore/templates/delete_templates/delete-payment-modal.html b/osinaweb/osinacore/templates/delete_templates/delete-payment-modal.html new file mode 100644 index 00000000..8abd9bf4 --- /dev/null +++ b/osinaweb/osinacore/templates/delete_templates/delete-payment-modal.html @@ -0,0 +1,30 @@ +{%load static%} + + + + + + + + + + + + + + +
+ {% csrf_token %} + +
+

Are you sure you want to delete this Payment?

+ +
+ +
+
+
+ + + \ No newline at end of file diff --git a/osinaweb/osinacore/templates/details_templates/customer-details.html b/osinaweb/osinacore/templates/details_templates/customer-details.html index 3d9ec8cb..c00baf0e 100644 --- a/osinaweb/osinacore/templates/details_templates/customer-details.html +++ b/osinaweb/osinacore/templates/details_templates/customer-details.html @@ -28,14 +28,14 @@
+ + +
+
+
+

Payment

+
+ + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Order + + Amount + + Date Paid + + Date Due + + Payment Method + + Comment + + Actions +
+

order 1

+
+

$20.0

+
+

02-12-2024

+
+

02-12-2024

+
+

Cash

+
+
+
+ + + +
+
+ +
+
+
+ + + +
+ +
+ + + +
+
+
+
+
diff --git a/osinaweb/osinacore/templates/edit_templates/edit-payment-method.html b/osinaweb/osinacore/templates/edit_templates/edit-payment-method.html new file mode 100644 index 00000000..858cc5bd --- /dev/null +++ b/osinaweb/osinacore/templates/edit_templates/edit-payment-method.html @@ -0,0 +1,65 @@ +{% extends "add-edit-main.html" %} +{%load static%} +{% block content %} + +
+
+

+ Edit Payment Method +

+ +
+ {% csrf_token %} + +
+
+ + +
+ +
+ + +
+ +
+ +
+
+ + Upload + Logo + +
+
+
+
+
+ +
+
+ + + + + + + + + + +{% endblock content %} \ No newline at end of file diff --git a/osinaweb/osinacore/templates/listing_pages/business-types.html b/osinaweb/osinacore/templates/listing_pages/business-types.html index b95902ee..de370a66 100644 --- a/osinaweb/osinacore/templates/listing_pages/business-types.html +++ b/osinaweb/osinacore/templates/listing_pages/business-types.html @@ -57,7 +57,7 @@ - +
diff --git a/osinaweb/osinacore/templates/listing_pages/payment-methods.html b/osinaweb/osinacore/templates/listing_pages/payment-methods.html new file mode 100644 index 00000000..082079b9 --- /dev/null +++ b/osinaweb/osinacore/templates/listing_pages/payment-methods.html @@ -0,0 +1,101 @@ +{% extends "main.html" %} +{%load static%} +{% block content %} + + +
+
+

Payment Methods

+ + +
+
+
+ + +
+
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + +
+ Payment Method + + Description + + Actions +
+
+ +

Whish

+
+
+

Helo this is a description

+
+
+ +
+ + + +
+
+
+ + + +
+
+
+
+
+
+ + + + + + + + +{% endblock content %} \ No newline at end of file diff --git a/osinaweb/osinacore/templates/main.html b/osinaweb/osinacore/templates/main.html index 2a1b72db..e1d2d405 100644 --- a/osinaweb/osinacore/templates/main.html +++ b/osinaweb/osinacore/templates/main.html @@ -424,6 +424,14 @@
+ + +
+

Payment Methods

+
+
+
@@ -718,6 +726,13 @@
+ +
+

Payment Methods/p> +

+
+
diff --git a/osinaweb/osinacore/templates/recent-activities.html b/osinaweb/osinacore/templates/recent-activities.html index f601c0fd..52e1d54d 100644 --- a/osinaweb/osinacore/templates/recent-activities.html +++ b/osinaweb/osinacore/templates/recent-activities.html @@ -175,6 +175,13 @@ {% else %}

{{latest.status.text}}

{% endif %} +
+

Osina

+ + + +
+
diff --git a/osinaweb/osinacore/urls.py b/osinaweb/osinacore/urls.py index 1e4b138b..ea2039a5 100644 --- a/osinaweb/osinacore/urls.py +++ b/osinaweb/osinacore/urls.py @@ -52,6 +52,7 @@ urlpatterns = [ path('businesstypes/', views.business_types, name='businesstypes'), path('references/', views.references, name='references'), path('tags/', views.tags, name='tags'), + path('payment_methods/', views.payment_methods, name='payment_methods'), #Details Templates diff --git a/osinaweb/osinacore/views.py b/osinaweb/osinacore/views.py index 1efe0f30..b960a118 100644 --- a/osinaweb/osinacore/views.py +++ b/osinaweb/osinacore/views.py @@ -475,6 +475,17 @@ def tags(request): +@staff_login_required +def payment_methods(request): + + context = { + + } + + return render(request, 'listing_pages/payment-methods.html', context) + + + diff --git a/osinaweb/static/dist/output.css b/osinaweb/static/dist/output.css index f7e24821..ef500ddf 100644 --- a/osinaweb/static/dist/output.css +++ b/osinaweb/static/dist/output.css @@ -1048,6 +1048,14 @@ video { height: 3.5rem; } +.h-2 { + height: 0.5rem; +} + +.h-3 { + height: 0.75rem; +} + .h-4 { height: 1rem; } @@ -1222,6 +1230,14 @@ video { width: 3.5rem; } +.w-2 { + width: 0.5rem; +} + +.w-3 { + width: 0.75rem; +} + .w-4 { width: 1rem; } @@ -2590,6 +2606,10 @@ video { padding-top: 2.25rem; } +.text-left { + text-align: left; +} + .text-center { text-align: center; } @@ -3247,11 +3267,6 @@ video { transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); } -.hover\:bg-fifthosiblue:hover { - --tw-bg-opacity: 1; - background-color: rgb(146 156 183 / var(--tw-bg-opacity)); -} - .hover\:bg-gray-50:hover { --tw-bg-opacity: 1; background-color: rgb(249 250 251 / var(--tw-bg-opacity)); @@ -3280,10 +3295,6 @@ video { --tw-bg-opacity: 0.6; } -.hover\:fill-fifthosiblue:hover { - fill: #929cb7; -} - .hover\:p-2:hover { padding: 0.5rem; } @@ -3293,6 +3304,11 @@ video { color: rgb(146 156 183 / var(--tw-text-opacity)); } +.hover\:text-gray-100:hover { + --tw-text-opacity: 1; + color: rgb(243 244 246 / var(--tw-text-opacity)); +} + .hover\:text-gray-500:hover { --tw-text-opacity: 1; color: rgb(107 114 128 / var(--tw-text-opacity)); @@ -3461,10 +3477,6 @@ video { flex-direction: row; } - .s\:items-center { - align-items: center; - } - .s\:justify-end { justify-content: flex-end; } @@ -3839,14 +3851,35 @@ video { width: 75%; } + .xll\:w-fit { + width: -moz-fit-content; + width: fit-content; + } + .xll\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } + .xll\:flex-row { + flex-direction: row; + } + + .xll\:justify-end { + justify-content: flex-end; + } + + .xll\:justify-between { + justify-content: space-between; + } + .xll\:rounded-none { border-radius: 0px; } + .xll\:text-left { + text-align: left; + } + .xll\:text-2xl { font-size: 1.5rem; line-height: 2rem; diff --git a/osinaweb/static/images/icons/whishlogo.png b/osinaweb/static/images/icons/whishlogo.png new file mode 100644 index 00000000..c4a31004 Binary files /dev/null and b/osinaweb/static/images/icons/whishlogo.png differ diff --git a/osinaweb/static/js/billing/add-order.js b/osinaweb/static/js/billing/add-order.js new file mode 100644 index 00000000..fe822c92 --- /dev/null +++ b/osinaweb/static/js/billing/add-order.js @@ -0,0 +1,32 @@ +document.addEventListener("DOMContentLoaded", function () { + const addButtons = document.querySelectorAll('.addServiceButton'); + + addButtons.forEach(function (button) { + button.addEventListener('click', function () { + const serviceId = button.getAttribute('data-service-id'); + const serviceTitle = button.getAttribute('data-service-title'); + + const selectTag = document.getElementById('servicesSelectTag'); + const option = document.createElement('option'); + option.value = serviceId; + option.text = serviceTitle; + + if (button.classList.contains('added')) { + button.classList.remove('added'); + button.classList.remove('bg-red-500'); + button.classList.add('bg-osiblue'); + button.querySelector('p').textContent = "Add"; + const optionToRemove = selectTag.querySelector(`option[value="${serviceId}"]`); + if (optionToRemove) { + selectTag.removeChild(optionToRemove); + } + } else { + button.classList.add('added'); + button.classList.add('bg-red-500'); + button.querySelector('p').textContent = "Remove"; + selectTag.appendChild(option); + option.selected = true; + } + }); + }); +}); diff --git a/osinaweb/static/js/pop-modals.js b/osinaweb/static/js/pop-modals.js index 476a7ad7..fec63eb6 100644 --- a/osinaweb/static/js/pop-modals.js +++ b/osinaweb/static/js/pop-modals.js @@ -65,6 +65,15 @@ document.addEventListener("DOMContentLoaded", function () { addButtonClickListener("userRecentActivitiesButton", "400px", "600px"); addButtonClickListener("addUserStoryButton", "400px", "160px"); addButtonClickListener("reactionDetailsButton", "400px", "300px"); + + addButtonClickListener("addPaymentCommentButton", "500px", "250px"); + addButtonClickListener("addPaymentButton", "500px", "400px"); + addButtonClickListener("editPaymentButton", "500px", "400px"); + + addButtonClickListener("addPaymentMethodButton", "500px", "400px"); + + + @@ -78,7 +87,8 @@ document.addEventListener("DOMContentLoaded", function () { addButtonClickListener("deleteProjectNoteButton", "400px", "140px"); addButtonClickListener("deletePointButton", "400px", "140px"); addButtonClickListener("deleteTicketButton", "400px", "140px"); - + addButtonClickListener("deletePaymentButton", "400px", "140px"); + addButtonClickListener("deletePaymentMethodButton", "400px", "140px");