diff --git a/osinaweb/billing/__pycache__/urls.cpython-311.pyc b/osinaweb/billing/__pycache__/urls.cpython-311.pyc index 3096d409..f538a96a 100644 Binary files a/osinaweb/billing/__pycache__/urls.cpython-311.pyc and b/osinaweb/billing/__pycache__/urls.cpython-311.pyc differ diff --git a/osinaweb/billing/__pycache__/views.cpython-311.pyc b/osinaweb/billing/__pycache__/views.cpython-311.pyc index 8e0228e0..5f7e1749 100644 Binary files a/osinaweb/billing/__pycache__/views.cpython-311.pyc and b/osinaweb/billing/__pycache__/views.cpython-311.pyc differ diff --git a/osinaweb/billing/add/__pycache__/urls.cpython-311.pyc b/osinaweb/billing/add/__pycache__/urls.cpython-311.pyc index a1d26d21..4efb8f29 100644 Binary files a/osinaweb/billing/add/__pycache__/urls.cpython-311.pyc and b/osinaweb/billing/add/__pycache__/urls.cpython-311.pyc differ diff --git a/osinaweb/billing/add/__pycache__/views.cpython-311.pyc b/osinaweb/billing/add/__pycache__/views.cpython-311.pyc index b014d0b7..751875ee 100644 Binary files a/osinaweb/billing/add/__pycache__/views.cpython-311.pyc and b/osinaweb/billing/add/__pycache__/views.cpython-311.pyc differ diff --git a/osinaweb/billing/add/urls.py b/osinaweb/billing/add/urls.py index 304ba24f..9555f1af 100644 --- a/osinaweb/billing/add/urls.py +++ b/osinaweb/billing/add/urls.py @@ -6,5 +6,5 @@ urlpatterns = [ path('product', views.add_product, name='addproduct'), path('service', views.add_service, name='addservice'), path('order', views.add_order, name='addorder'), - path('invoice//', views.add_invoice_pdf, name='addinvoice'), + ] diff --git a/osinaweb/billing/add/views.py b/osinaweb/billing/add/views.py index 4b34510f..52ad81e4 100644 --- a/osinaweb/billing/add/views.py +++ b/osinaweb/billing/add/views.py @@ -5,7 +5,7 @@ from django.http import JsonResponse, HttpResponse from django.template.loader import get_template from django.conf import settings import os -from weasyprint import HTML + def add_product (request, *args, **kwargs): @@ -102,36 +102,7 @@ def add_order (request, *args, **kwargs): -def add_invoice_pdf(request, order_id): - order = get_object_or_404(Order, id=order_id) - - template = get_template('details_templates/invoice-details.html') - context = {'order': order} - html_string = template.render(context) - - # Generate PDF - pdf = HTML(string=html_string).write_pdf() - - invoice = Invoice.objects.create( - invoice_number='111', - order=order, - date_created=datetime.now(), - ) - - # Save PDF to a file - pdf_file_path = os.path.join(settings.MEDIA_ROOT, f'invoice_{invoice.id}.pdf') - with open(pdf_file_path, 'wb') as pdf_file: - pdf_file.write(pdf) - - # Associate PDF file path with the Invoice object - invoice.pdf = pdf_file_path - invoice.save() - - # Return PDF - response = HttpResponse(pdf, content_type='application/pdf') - response['Content-Disposition'] = 'attachment; filename="my_pdf.pdf"' - return response diff --git a/osinaweb/billing/templates/add_templates/add-order.html b/osinaweb/billing/templates/add_templates/add-order.html index 54ad365c..c0faf5d7 100644 --- a/osinaweb/billing/templates/add_templates/add-order.html +++ b/osinaweb/billing/templates/add_templates/add-order.html @@ -13,7 +13,7 @@

Add Order

- +
{% csrf_token %} @@ -31,6 +31,24 @@ +
+ + +
+ +
+ + +
+
- - -
-
@@ -62,7 +69,6 @@
- diff --git a/osinaweb/billing/templates/listing_pages/orders.html b/osinaweb/billing/templates/listing_pages/orders.html index 128aba41..a0f7209f 100644 --- a/osinaweb/billing/templates/listing_pages/orders.html +++ b/osinaweb/billing/templates/listing_pages/orders.html @@ -86,7 +86,7 @@ {% if order.status == 'Completed' and not order.invoice %} - + diff --git a/osinaweb/billing/urls.py b/osinaweb/billing/urls.py index 8baa9ab9..8582e020 100644 --- a/osinaweb/billing/urls.py +++ b/osinaweb/billing/urls.py @@ -16,5 +16,5 @@ urlpatterns = [ path('fetch-customer-items//', views.fetch_customer_items, name='fetch_customer_items'), - + path('fetch-customer-businesses//', views.fetch_customer_businesses, name='fetch_customer_businesses'), ] diff --git a/osinaweb/billing/views.py b/osinaweb/billing/views.py index 053d5926..72ae5377 100644 --- a/osinaweb/billing/views.py +++ b/osinaweb/billing/views.py @@ -64,3 +64,24 @@ def fetch_customer_items(request, customer_id): } return JsonResponse(data) + + +def fetch_customer_businesses(request, customer_id): + try: + customer_profile = CustomerProfile.objects.get(id=customer_id) + except CustomerProfile.DoesNotExist: + customer_profile = None + + if customer_profile and customer_profile.business: + # Retrieve the associated business + business = customer_profile.business + # Create a dictionary representation of the business + business_data = { + 'id': business.id, + 'name': business.name, + # Include other fields if needed + } + else: + business_data = None + + return JsonResponse({'business': business_data}) diff --git a/osinaweb/customercore/__pycache__/urls.cpython-311.pyc b/osinaweb/customercore/__pycache__/urls.cpython-311.pyc index 232ca0a0..cb828fd4 100644 Binary files a/osinaweb/customercore/__pycache__/urls.cpython-311.pyc and b/osinaweb/customercore/__pycache__/urls.cpython-311.pyc differ diff --git a/osinaweb/customercore/__pycache__/views.cpython-311.pyc b/osinaweb/customercore/__pycache__/views.cpython-311.pyc index 0892d56a..a90dc132 100644 Binary files a/osinaweb/customercore/__pycache__/views.cpython-311.pyc and b/osinaweb/customercore/__pycache__/views.cpython-311.pyc differ diff --git a/osinaweb/customercore/templates/products/cloud-vps-hosting-plans.html b/osinaweb/customercore/templates/products/cloud-vps-hosting-plans.html index 1dab778f..bec7284e 100644 --- a/osinaweb/customercore/templates/products/cloud-vps-hosting-plans.html +++ b/osinaweb/customercore/templates/products/cloud-vps-hosting-plans.html @@ -8,7 +8,7 @@ {% block content %} -
+

Cloud VPS Hosting

diff --git a/osinaweb/customercore/templates/products/dedicated-servers-plans.html b/osinaweb/customercore/templates/products/dedicated-servers-plans.html new file mode 100644 index 00000000..2ce57bb7 --- /dev/null +++ b/osinaweb/customercore/templates/products/dedicated-servers-plans.html @@ -0,0 +1,519 @@ +{% extends "customer_main.html" %} +{%load static%} + +{% block modules_section %} + +{% endblock modules_section %} + +{% block content %} + + +
+
+

Dedicated CPU Servers

+ + +
+ + + +
+
+
+

DEDICATED 1

+ +
+

30%

+

$103.06/month

+

Regular Price: $143.95/month

+
+ + + + +
+ +
+

View Features

+ +
+ + +
+ +
+
+

Best Value

+
+ +
+

DEDICATED 2

+ +
+

30%

+

$127.16/month

+

Regular Price: $184.95/month

+
+ + + + +
+ +
+

View Features

+ +
+ + +
+ +
+
+

DEDICATED 3

+ +
+

30%

+

$173.63/month

+

Regular Price: $252.95/month

+
+ + + + +
+ +
+

View Features

+ +
+ + +
+ +
+
+

DEDICATED 4

+ +
+

30%

+

$265.76/month

+

Regular Price: $374.95/month

+
+ + + + +
+ +
+

View Features

+ +
+ + +
+
+
+
+ + + + + +{% endblock %} \ No newline at end of file diff --git a/osinaweb/customercore/templates/products/osimenu-plans.html b/osinaweb/customercore/templates/products/osimenu-plans.html index a5cdffca..aeaa82d5 100644 --- a/osinaweb/customercore/templates/products/osimenu-plans.html +++ b/osinaweb/customercore/templates/products/osimenu-plans.html @@ -7,9 +7,9 @@ {% block content %} -
+
- + + + +
+

Dedicated CPU Servers

+
+
diff --git a/osinaweb/osinacore/templates/details_templates/business-details.html b/osinaweb/osinacore/templates/details_templates/business-details.html index 598ea4e7..f0a4f461 100644 --- a/osinaweb/osinacore/templates/details_templates/business-details.html +++ b/osinaweb/osinacore/templates/details_templates/business-details.html @@ -20,7 +20,7 @@ Business
diff --git a/osinaweb/osinacore/templates/details_templates/customer-details.html b/osinaweb/osinacore/templates/details_templates/customer-details.html index 0d8d25a3..fe1dedb3 100644 --- a/osinaweb/osinacore/templates/details_templates/customer-details.html +++ b/osinaweb/osinacore/templates/details_templates/customer-details.html @@ -32,7 +32,7 @@ Customer
diff --git a/osinaweb/osinacore/templates/details_templates/project-details.html b/osinaweb/osinacore/templates/details_templates/project-details.html index ff190182..0c772f81 100644 --- a/osinaweb/osinacore/templates/details_templates/project-details.html +++ b/osinaweb/osinacore/templates/details_templates/project-details.html @@ -37,7 +37,7 @@ Project
@@ -426,7 +426,7 @@ {% for note in project_notes %} -

{{ note.text }}

+

{{ note.text }}

diff --git a/osinaweb/osinacore/templates/details_templates/reaction-details-modal.html b/osinaweb/osinacore/templates/details_templates/reaction-details-modal.html new file mode 100644 index 00000000..c60c2edf --- /dev/null +++ b/osinaweb/osinacore/templates/details_templates/reaction-details-modal.html @@ -0,0 +1,59 @@ +{% load static %} + + + + + + + + Osina + + + + + + + + + +

10 Reactions

+ + +
+ + +
+
+

8

+

😄

+
+ +
+

Salim Elliye

+

Nataly Abi Wajeh

+

Diana Abi Wajeh

+

Roy Hawa

+

Salim Elliye

+

Nataly Abi Wajeh

+

Diana Abi Wajeh

+

Roy Hawa

+
+
+ + + +
+
+

2

+

😍

+
+ +
+

Salim Elliye

+

Nataly Abi Wajeh

+
+
+
+ + + \ No newline at end of file diff --git a/osinaweb/osinacore/templates/details_templates/staff-details.html b/osinaweb/osinacore/templates/details_templates/staff-details.html index 5389913d..ba7605dd 100644 --- a/osinaweb/osinacore/templates/details_templates/staff-details.html +++ b/osinaweb/osinacore/templates/details_templates/staff-details.html @@ -19,7 +19,7 @@ User
diff --git a/osinaweb/osinacore/templates/details_templates/task-details.html b/osinaweb/osinacore/templates/details_templates/task-details.html index e4699614..6819ef35 100644 --- a/osinaweb/osinacore/templates/details_templates/task-details.html +++ b/osinaweb/osinacore/templates/details_templates/task-details.html @@ -11,7 +11,10 @@
- + + + +

Total Time: {{ task.total_task_time.0 }}{% if task.total_task_time.0 == 1 %}hr{% else %}hrs{% endif %} {{ task.total_task_time.1 }}{% if task.total_task_time.1 == 1 %}min{% else %}mins{% endif %} {{ task.total_task_time.2 }}{% if task.total_task_time.2 == 1 %}sec{% else %}secs{% endif %}

@@ -23,7 +26,7 @@ Task
@@ -206,7 +209,7 @@ {% endfor %} {% else %} - + No Available Points diff --git a/osinaweb/osinacore/templates/edit_templates/edit-business-type.html b/osinaweb/osinacore/templates/edit_templates/edit-business-type.html index 6a3d2243..8a4fbd71 100644 --- a/osinaweb/osinacore/templates/edit_templates/edit-business-type.html +++ b/osinaweb/osinacore/templates/edit_templates/edit-business-type.html @@ -3,7 +3,7 @@ {% block content %}
-
+

Edit Business Type

diff --git a/osinaweb/osinacore/templates/edit_templates/edit-business.html b/osinaweb/osinacore/templates/edit_templates/edit-business.html index 420ebeb4..725b1c64 100644 --- a/osinaweb/osinacore/templates/edit_templates/edit-business.html +++ b/osinaweb/osinacore/templates/edit_templates/edit-business.html @@ -3,7 +3,7 @@ {% block content %}
-
+

Edit Business

diff --git a/osinaweb/osinacore/templates/edit_templates/edit-customer.html b/osinaweb/osinacore/templates/edit_templates/edit-customer.html index f3a75b15..13bd6007 100644 --- a/osinaweb/osinacore/templates/edit_templates/edit-customer.html +++ b/osinaweb/osinacore/templates/edit_templates/edit-customer.html @@ -3,7 +3,7 @@ {% block content %}
-
+

Edit Customer

diff --git a/osinaweb/osinacore/templates/edit_templates/edit-epic.html b/osinaweb/osinacore/templates/edit_templates/edit-epic.html index e7778d53..c6637f6e 100644 --- a/osinaweb/osinacore/templates/edit_templates/edit-epic.html +++ b/osinaweb/osinacore/templates/edit_templates/edit-epic.html @@ -3,7 +3,7 @@ {% block content %}
-
+

Edit Epic

diff --git a/osinaweb/osinacore/templates/edit_templates/edit-project-type.html b/osinaweb/osinacore/templates/edit_templates/edit-project-type.html index e966013b..009218d3 100644 --- a/osinaweb/osinacore/templates/edit_templates/edit-project-type.html +++ b/osinaweb/osinacore/templates/edit_templates/edit-project-type.html @@ -3,7 +3,7 @@ {% block content %}
-
+

Edit Project Type

diff --git a/osinaweb/osinacore/templates/edit_templates/edit-project.html b/osinaweb/osinacore/templates/edit_templates/edit-project.html index d8ac6c23..5a8d8ae5 100644 --- a/osinaweb/osinacore/templates/edit_templates/edit-project.html +++ b/osinaweb/osinacore/templates/edit_templates/edit-project.html @@ -3,7 +3,7 @@ {% block content %}
-
+

Edit Project

diff --git a/osinaweb/osinacore/templates/edit_templates/edit-reference.html b/osinaweb/osinacore/templates/edit_templates/edit-reference.html index 46113f53..ef7c3755 100644 --- a/osinaweb/osinacore/templates/edit_templates/edit-reference.html +++ b/osinaweb/osinacore/templates/edit_templates/edit-reference.html @@ -3,7 +3,7 @@ {% block content %}
-
+

Edit Reference

diff --git a/osinaweb/osinacore/templates/edit_templates/edit-staff-position.html b/osinaweb/osinacore/templates/edit_templates/edit-staff-position.html index 0f7e932b..aa507de8 100644 --- a/osinaweb/osinacore/templates/edit_templates/edit-staff-position.html +++ b/osinaweb/osinacore/templates/edit_templates/edit-staff-position.html @@ -3,7 +3,7 @@ {% block content %}
-
+

Edit Staff Position

diff --git a/osinaweb/osinacore/templates/edit_templates/edit-staff.html b/osinaweb/osinacore/templates/edit_templates/edit-staff.html index 68cec091..f11483fa 100644 --- a/osinaweb/osinacore/templates/edit_templates/edit-staff.html +++ b/osinaweb/osinacore/templates/edit_templates/edit-staff.html @@ -3,7 +3,7 @@ {% block content %}
-
+

Edit Staff

diff --git a/osinaweb/osinacore/templates/edit_templates/edit-tag.html b/osinaweb/osinacore/templates/edit_templates/edit-tag.html index b648e0c8..ab1831ee 100644 --- a/osinaweb/osinacore/templates/edit_templates/edit-tag.html +++ b/osinaweb/osinacore/templates/edit_templates/edit-tag.html @@ -3,7 +3,7 @@ {% block content %}
-
+

Edit Tag

diff --git a/osinaweb/osinacore/templates/edit_templates/edit-task.html b/osinaweb/osinacore/templates/edit_templates/edit-task.html index 760096fd..7285396f 100644 --- a/osinaweb/osinacore/templates/edit_templates/edit-task.html +++ b/osinaweb/osinacore/templates/edit_templates/edit-task.html @@ -3,7 +3,7 @@ {% block content %}
-
+

Edit Task

diff --git a/osinaweb/osinacore/templates/epic-fetched-tasks.html b/osinaweb/osinacore/templates/epic-fetched-tasks.html index 076c925a..99c4ef6a 100644 --- a/osinaweb/osinacore/templates/epic-fetched-tasks.html +++ b/osinaweb/osinacore/templates/epic-fetched-tasks.html @@ -1,20 +1,20 @@ {% load static %}
+ class="flex flex-col md:flex-row justify-between items-center gap-3 bg-gray-100 border border-gray-100 text-white py-2 px-3 rounded-md shadow-md">

{{epic.start_date}} - {{epic.end_date}}

-
+
@@ -29,7 +29,7 @@
+ class="flex justify-center items-center border-r border-b border-gray-200 {% if task.status == 'Open' %}bg-secondosiblue{% endif %} {% if task.status == 'Working On' %}bg-yellow-500{% endif %} {% if task.status == 'Closed' %}bg-green-700{% endif %} rounded-tl-md text-[17px] text-white text-center px-3">

{{task.name}}

@@ -139,7 +139,7 @@
- {% for task in my_tasks %} + {% for task in related_tasks %}
@@ -236,4 +236,18 @@
{% endfor %} -
\ No newline at end of file +
+ + + + + + \ No newline at end of file diff --git a/osinaweb/osinacore/templates/index.html b/osinaweb/osinacore/templates/index.html index c3863c56..f685c8e0 100644 --- a/osinaweb/osinacore/templates/index.html +++ b/osinaweb/osinacore/templates/index.html @@ -32,7 +32,7 @@
+ class="flex justify-center items-center border-r border-b border-gray-200 px-3 {% if task.status == 'Open' %}bg-secondosiblue{% endif %} {% if task.status == 'Working On' %}bg-yellow-500{% endif %} {% if task.status == 'Closed' %}bg-green-700{% endif %} rounded-tl-md text-[17px] text-white text-center">

{{task.name}}

diff --git a/osinaweb/osinacore/templates/listing_pages/projects.html b/osinaweb/osinacore/templates/listing_pages/projects.html index de912a67..aa704136 100644 --- a/osinaweb/osinacore/templates/listing_pages/projects.html +++ b/osinaweb/osinacore/templates/listing_pages/projects.html @@ -61,7 +61,7 @@
-
+
@@ -69,9 +69,9 @@
-
+
-
+
@@ -108,17 +108,17 @@ class="p-3 text-base bg-gray-50 border-b s:border-b-0 border-r-0 s:border-r border-gray-200 text-secondosiblue flex justify-center items-center">Edit
-
+
{% if project.note_set.exists %} {% with last_note=project.note_set.last %}
-

{{ last_note.text }}

+

{{ last_note.text }}

+ class="flex justify-center items-center border-r border-b border-gray-200 px-3 {% if task.status == 'Open' %}bg-secondosiblue{% endif %} {% if task.status == 'Working On' %}bg-yellow-500{% endif %} {% if task.status == 'Closed' %}bg-green-700{% endif %} rounded-tl-md text-[17px] text-white text-center">

{{task.name}}

diff --git a/osinaweb/osinacore/templates/main.html b/osinaweb/osinacore/templates/main.html index 2b38a5f4..f509a09c 100644 --- a/osinaweb/osinacore/templates/main.html +++ b/osinaweb/osinacore/templates/main.html @@ -859,7 +859,7 @@ - diff --git a/osinaweb/osinacore/templates/project-open-tasks.html b/osinaweb/osinacore/templates/project-open-tasks.html index 895d6f6f..eba6d4d5 100644 --- a/osinaweb/osinacore/templates/project-open-tasks.html +++ b/osinaweb/osinacore/templates/project-open-tasks.html @@ -218,4 +218,18 @@
{% endfor %} -
\ No newline at end of file +
+ + + + + + \ No newline at end of file diff --git a/osinaweb/osinacore/templates/recent-activities-page.html b/osinaweb/osinacore/templates/recent-activities-page.html index cbdccffb..e9d93c72 100644 --- a/osinaweb/osinacore/templates/recent-activities-page.html +++ b/osinaweb/osinacore/templates/recent-activities-page.html @@ -574,7 +574,7 @@ -
+
Ositcom Logo diff --git a/osinaweb/osinacore/templates/recent-activities.html b/osinaweb/osinacore/templates/recent-activities.html index 46893dac..276f2cd3 100644 --- a/osinaweb/osinacore/templates/recent-activities.html +++ b/osinaweb/osinacore/templates/recent-activities.html @@ -104,7 +104,6 @@
- @@ -192,7 +191,7 @@
{% for reaction in latest.status.reaction_set.all %} -

{{reaction.emoji}}

+

{{reaction.emoji}}

{% endfor %}
{% endif %} @@ -206,11 +205,6 @@
- - - - - diff --git a/osinaweb/osinacore/urls.py b/osinaweb/osinacore/urls.py index 8789e28a..e1a4efbf 100644 --- a/osinaweb/osinacore/urls.py +++ b/osinaweb/osinacore/urls.py @@ -53,6 +53,8 @@ urlpatterns = [ path('tasks//', views.taskdetails, name='detailed-task'), path('show-points//', views.show_points_modal, name='showpoints'), path('timeline//', views.timeline_modal, name='timeline'), + path('reaction-details-modal/', views.reaction_details_modal, name='reactiondetailsmodal'), + path('add/', include('osinacore.add.urls')), diff --git a/osinaweb/osinacore/views.py b/osinaweb/osinacore/views.py index 1120223d..12dd2ac5 100644 --- a/osinaweb/osinacore/views.py +++ b/osinaweb/osinacore/views.py @@ -439,7 +439,14 @@ def projectdetails(request, project_id): +@staff_login_required +def reaction_details_modal(request): + + context = { + + } + return render(request, 'details_templates/reaction-details-modal.html', context) diff --git a/osinaweb/static/dist/output.css b/osinaweb/static/dist/output.css index 5435defc..85e2bc92 100644 --- a/osinaweb/static/dist/output.css +++ b/osinaweb/static/dist/output.css @@ -1180,6 +1180,10 @@ video { height: 100vh; } +.max-h-\[50px\] { + max-height: 50px; +} + .w-1 { width: 0.25rem; } @@ -1630,6 +1634,10 @@ video { white-space: pre-wrap; } +.break-all { + word-break: break-all; +} + .rounded-full { border-radius: 9999px; } @@ -1724,6 +1732,10 @@ video { border-bottom-width: 2px; } +.border-l { + border-left-width: 1px; +} + .border-r { border-right-width: 1px; } @@ -1760,6 +1772,11 @@ video { border-color: rgb(30 64 175 / var(--tw-border-opacity)); } +.border-fifthosiblue { + --tw-border-opacity: 1; + border-color: rgb(146 156 183 / var(--tw-border-opacity)); +} + .border-gray-100 { --tw-border-opacity: 1; border-color: rgb(243 244 246 / var(--tw-border-opacity)); @@ -2435,6 +2452,10 @@ video { line-height: 2.5rem; } +.text-\[10px\] { + font-size: 10px; +} + .text-\[12px\] { font-size: 12px; } @@ -2781,6 +2802,16 @@ video { background: #5a5a5a00; } +/* SCROLL BAR OF REACTION DETAILS POPUP */ + +.reactionDetails::-webkit-scrollbar { + width: 3px; +} + +.reactionDetails::-webkit-scrollbar-thumb { + background: #b9bfc58b; +} + /* Website's font */ @font-face { @@ -3052,6 +3083,11 @@ video { padding: 0.5rem; } +.hover\:text-fifthosiblue:hover { + --tw-text-opacity: 1; + color: rgb(146 156 183 / var(--tw-text-opacity)); +} + .hover\:text-gray-500:hover { --tw-text-opacity: 1; color: rgb(107 114 128 / var(--tw-text-opacity)); @@ -3139,6 +3175,10 @@ video { width: 180px; } + .s\:w-\[250px\] { + width: 250px; + } + .s\:w-\[300px\] { width: 300px; } @@ -3345,8 +3385,8 @@ video { border-bottom-width: 0px; } - .l\:border-r { - border-right-width: 1px; + .l\:border-l { + border-left-width: 1px; } } diff --git a/osinaweb/static/images/client4.png b/osinaweb/static/images/client4.png new file mode 100644 index 00000000..45f99519 Binary files /dev/null and b/osinaweb/static/images/client4.png differ diff --git a/osinaweb/static/images/client4_6OcKRTB.png b/osinaweb/static/images/client4_6OcKRTB.png new file mode 100644 index 00000000..45f99519 Binary files /dev/null and b/osinaweb/static/images/client4_6OcKRTB.png differ diff --git a/osinaweb/static/images/location.png b/osinaweb/static/images/location.png new file mode 100644 index 00000000..7b3c13a6 Binary files /dev/null and b/osinaweb/static/images/location.png differ diff --git a/osinaweb/static/images/location_qKXwMbR.png b/osinaweb/static/images/location_qKXwMbR.png new file mode 100644 index 00000000..7b3c13a6 Binary files /dev/null and b/osinaweb/static/images/location_qKXwMbR.png differ diff --git a/osinaweb/static/js/billing/add-order.js b/osinaweb/static/js/billing/add-order.js index 6b98f732..2d8ae2a8 100644 --- a/osinaweb/static/js/billing/add-order.js +++ b/osinaweb/static/js/billing/add-order.js @@ -1,10 +1,10 @@ -// WHEN SELECTING A CUSTOMER FETCH AND DISPALY ITS RELATED ITEMS AND THE ITEMS THAT ARE NOT RELATED TO A CUSTOMER document.addEventListener('DOMContentLoaded', function () { var itemsSelectTag = $('#itemsSelectTag').selectize()[0].selectize; document.getElementById('customersSelectTag').addEventListener('change', function () { var customerId = this.value; + // FETCH CUSTOMER ITEMS fetch('/fetch-customer-items/' + customerId + '/') .then(response => { return response.json(); @@ -18,10 +18,12 @@ document.addEventListener('DOMContentLoaded', function () { delete itemsSelectTag.options['Select Customer First']; } + // Add items related to the customer data.items_related_to_customer.forEach(function (item) { itemsSelectTag.addOption({value: item.id, text: item.title}); }); + // Add items without a customer data.items_without_customer.forEach(function (item) { itemsSelectTag.addOption({value: item.id, text: item.title}); }); @@ -29,5 +31,22 @@ document.addEventListener('DOMContentLoaded', function () { itemsSelectTag.refreshOptions(); }) .catch(error => console.error('Error fetching customer items:', error)); + + + + // FETCH CUSTOMER BUSINESSES + $.ajax({ + url: `/fetch-customer-businesses/${customerId}/`, + type: 'GET', + success: function (data) { + $('#businessSelectTag').empty(); + if (data.business) { + $('#businessSelectTag').append(``); + } + }, + error: function (xhr, status, error) { + console.error(error); + } + }); }); }); diff --git a/osinaweb/static/js/pop-modals.js b/osinaweb/static/js/pop-modals.js index 44bdf4d2..cad59d7b 100644 --- a/osinaweb/static/js/pop-modals.js +++ b/osinaweb/static/js/pop-modals.js @@ -63,6 +63,7 @@ document.addEventListener("DOMContentLoaded", function () { addButtonClickListener("addStatusButtonMobile", "500px", "80px"); addButtonClickListener("userRecentActivitiesButton", "400px", "600px"); addButtonClickListener("addUserStoryButton", "400px", "160px"); + addButtonClickListener("reactionDetailsButton", "400px", "300px");