diff --git a/osinaweb/billing/templates/details_templates/order-details.html b/osinaweb/billing/templates/details_templates/order-details.html index 9e38f3d6..eb6cdba6 100644 --- a/osinaweb/billing/templates/details_templates/order-details.html +++ b/osinaweb/billing/templates/details_templates/order-details.html @@ -19,9 +19,9 @@

Services

-
+
+ class="w-ful py-9 px-5 flex justify-center items-center text-center text-secondosiblue bg-white rounded-t-md">

Service Name

-

Ticket: #2226663535

+

Ticket {{ticket.ticket_number}}

-
+

Closed by Linode at 20-4-24 16:30

@@ -17,11 +17,32 @@
+ + {% for update in ticket_updates %}
- + {% if update.added_by.customerprofile %} + {% if update.added_by.customerprofile.image %} + + {% else %} +
+ {{ request.user.first_name.0 }}{{ request.user.last_name.0 }} +
+ {% endif %} + {% elif update.added_by.staffprofile %} + {% if update.added_by.staffprofile.image %} + + {% else %} +
+ {{ request.user.first_name.0 }}{{ request.user.last_name.0 }} +
+ {% endif %} + {% endif %}
@@ -29,9 +50,8 @@
-

Ositcom - Ltd - commented 2024-04-17 12:19

+

{{update.added_by.first_name}} + replied {{update.date_added}}

@@ -47,100 +67,72 @@

- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus non purus consectetur - magna sodales fringilla. Suspendisse non imperdiet metus. Curabitur feugiat tristique - varius. Curabitur fermentum sapien nisi, sed suscipit odio luctus sed. Mauris pretium risus - a tincidunt facilisis. Aliquam quis odio in mi aliquet scelerisque et ut urna. Ut ultrices - turpis odio, id hendrerit lectus dignissim in. Donec at tortor quis dui auctor sodales porta - et purus. Aliquam at nunc sit amet tortor lacinia porttitor. Proin auctor, eros ac - sollicitudin iaculis, felis quam vulputate ante, eu varius dolor arcu non enim. Vestibulum - ornare dapibus risus, id eleifend ipsum. Aliquam metus urna, bibendum quis cursus vitae, - placerat sit amet felis. Aliquam tellus ex, pretium id gravida id, vulputate et velit. - Phasellus leo felis, lobortis ut dolor eget, viverra aliquet ligula. Aliquam molestie ac - eros et fermentum. + {{update.description}}

-
-
- - - -
-
-
- -
-
- -
-
-

Scott - Customer Support commented 2024-04-17 12:19

- - - - - - -
+ {% if update.added_by.staffprofile %} +
+ How + did I do? -
-

- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus non purus consectetur - magna sodales fringilla. Suspendisse non imperdiet metus. Curabitur feugiat tristique - varius. Curabitur fermentum sapien nisi, sed suscipit odio luctus sed. Mauris pretium risus - a tincidunt facilisis. Aliquam quis odio in mi aliquet scelerisque et ut urna. Ut ultrices - turpis odio, id hendrerit lectus dignissim in. Donec at tortor quis dui auctor sodales porta - et purus. -

+
+
+ +
+ +
+ +
-
- How - did I do? - -
-
- -
- -
- -
- -
- -
+
+
+ {% endif %} + +
- + {% endfor %} -
+
+ {% csrf_token %}
- + {% if request.user.customerprofile %} + {% if request.user.customerprofile.image %} + + {% else %} +
+ {{ request.user.first_name.0 }}{{ request.user.last_name.0 }} +
+ {% endif %} + {% elif request.user.staffprofile %} + {% if request.user.staffprofile.image %} + + {% else %} +
+ {{ request.user.first_name.0 }}{{ request.user.last_name.0 }} +
+ {% endif %} + {% endif %}
- + rows="8" placeholder="Add Comment...">
@@ -160,7 +152,7 @@
-
+
diff --git a/osinaweb/customercore/templates/listing_pages/customer-tickets.html b/osinaweb/customercore/templates/listing_pages/customer-tickets.html index c62989e4..90df9d02 100644 --- a/osinaweb/customercore/templates/listing_pages/customer-tickets.html +++ b/osinaweb/customercore/templates/listing_pages/customer-tickets.html @@ -11,8 +11,8 @@
-

Open Ticktes

-

Closed Ticktes

+

Open Tickets

+

Closed Tickets

@@ -59,7 +59,7 @@ - +

My Account Balance

diff --git a/osinaweb/customercore/urls.py b/osinaweb/customercore/urls.py index 2013ef10..f8dbfe8a 100644 --- a/osinaweb/customercore/urls.py +++ b/osinaweb/customercore/urls.py @@ -7,7 +7,8 @@ urlpatterns = [ path('redirect-osicard/', views.redirect_osicard, name='redirectosicard'), # ADD - path('customer-add-ticket/', views.customer_add_ticket, name='customeraddticket'), + path('add/ticket/', views.customer_add_ticket, name='customeraddticket'), + path('customer/add/ticketupdate//', views.customer_add_ticket_update, name='customeraddticketupdate'), # LISTING @@ -18,7 +19,7 @@ urlpatterns = [ # DETAILS - path('inner-customer-ticket/', views.customer_ticket_details, name='customerticketdetails'), + path('my-tickets//', views.customer_ticket_details, name='customerticketdetails'), # PRODUCTS URL diff --git a/osinaweb/customercore/views.py b/osinaweb/customercore/views.py index 1e66c56b..eea676a6 100644 --- a/osinaweb/customercore/views.py +++ b/osinaweb/customercore/views.py @@ -62,13 +62,20 @@ def customer_add_ticket(request, *args, **kwargs): opened_date = datetime.now() ) ticket.save() + ticket_status_update = TicketStatusUpdate( + ticket = ticket, + status = 'Open', + added_by = request.user, + date_added = datetime.now() + ) + ticket_status_update.save() for file in request.FILES.getlist('files'): ticket_attachment = TicketAttachment( ticket=ticket, file=file ) ticket_attachment.save() - return redirect('customertickets') + return redirect('customerticketdetails', ticket_number=ticket.ticket_number) context = { 'customer_products': customer_products, @@ -79,6 +86,35 @@ def customer_add_ticket(request, *args, **kwargs): return render(request, 'add_templates/customer-add-ticket.html', context) +@customer_login_required +def customer_add_ticket_update(request, ticket_id): + ticket = get_object_or_404(Ticket, id=ticket_id) + + + if request.method == 'POST': + ticket_update = TicketUpdate( + ticket = ticket, + description = request.POST.get('description'), + added_by = request.user, + date_added = datetime.now(), + ) + ticket_update.save() + for file in request.FILES.getlist('files'): + ticket_attachment = TicketAttachment( + ticket_update=ticket_update, + file=file + ) + ticket_attachment.save() + return redirect('customerticketdetails', ticket_number=ticket.ticket_number) + + context = { + 'ticket': ticket, + + + } + + return render(request, 'add_templates/customer-add-ticket.html', context) + # LISTING @customer_login_required @@ -132,10 +168,16 @@ def customer_tickets(request, *args, **kwargs): # DETAILS -def customer_ticket_details(request, *args, **kwargs): +def customer_ticket_details(request, ticket_number): + ticket = get_object_or_404(Ticket, ticket_number=ticket_number) + ticket_updates = TicketUpdate.objects.filter(ticket=ticket).order_by('id') + for update in ticket_updates: + if not TicketRead.objects.filter(ticket_update=update, user=request.user).exists(): + TicketRead.objects.create(ticket_update=update, user=request.user, read=True) context = { - + 'ticket': ticket, + 'ticket_updates': ticket_updates, } return render(request, 'details_templates/inner-customer-ticket.html', context) diff --git a/osinaweb/db.sqlite3 b/osinaweb/db.sqlite3 index 139d35bb..e366fcb3 100644 Binary files a/osinaweb/db.sqlite3 and b/osinaweb/db.sqlite3 differ diff --git a/osinaweb/osinacore/__pycache__/urls.cpython-310.pyc b/osinaweb/osinacore/__pycache__/urls.cpython-310.pyc index e7fb0bff..cf54ff16 100644 Binary files a/osinaweb/osinacore/__pycache__/urls.cpython-310.pyc and b/osinaweb/osinacore/__pycache__/urls.cpython-310.pyc differ diff --git a/osinaweb/osinacore/__pycache__/views.cpython-310.pyc b/osinaweb/osinacore/__pycache__/views.cpython-310.pyc index 8fbe6545..2b77ba0f 100644 Binary files a/osinaweb/osinacore/__pycache__/views.cpython-310.pyc and b/osinaweb/osinacore/__pycache__/views.cpython-310.pyc differ diff --git a/osinaweb/osinacore/add/__pycache__/urls.cpython-310.pyc b/osinaweb/osinacore/add/__pycache__/urls.cpython-310.pyc index 00960999..f36e1851 100644 Binary files a/osinaweb/osinacore/add/__pycache__/urls.cpython-310.pyc and b/osinaweb/osinacore/add/__pycache__/urls.cpython-310.pyc differ diff --git a/osinaweb/osinacore/add/__pycache__/views.cpython-310.pyc b/osinaweb/osinacore/add/__pycache__/views.cpython-310.pyc index c3358659..725635fb 100644 Binary files a/osinaweb/osinacore/add/__pycache__/views.cpython-310.pyc and b/osinaweb/osinacore/add/__pycache__/views.cpython-310.pyc differ diff --git a/osinaweb/osinacore/add/urls.py b/osinaweb/osinacore/add/urls.py index ab4d9e11..bd222b07 100644 --- a/osinaweb/osinacore/add/urls.py +++ b/osinaweb/osinacore/add/urls.py @@ -27,7 +27,8 @@ urlpatterns = [ path('reference/', views.add_reference_modal, name='addreferencemodal'), path('tag/', views.add_tag_modal, name='addtagmodal'), path('reaction///', views.add_reaction, name='add_reaction'), - path('add-ticket//', views.add_ticket, name='addticket'), + path('ticket//', views.add_ticket, name='addticket'), + path('ticketupdate//', views.add_ticket_update, name='addticketupdate'), ] \ No newline at end of file diff --git a/osinaweb/osinacore/add/views.py b/osinaweb/osinacore/add/views.py index 8791b06f..80127020 100644 --- a/osinaweb/osinacore/add/views.py +++ b/osinaweb/osinacore/add/views.py @@ -8,6 +8,7 @@ from datetime import date from django.http import JsonResponse from osinacore.decorators import * from billing.models import * +from customercore.models import * @@ -601,18 +602,90 @@ def add_reaction(request, status_id, emoji): @staff_login_required def add_ticket(request, customer_id): customer= get_object_or_404(CustomerProfile, id=customer_id) - customer_products = OrderItem.objects.filter(order__status='Completed', active__in=[True, None], item__type='Product', order__customer=customer).values() + customer_products = OrderItem.objects.filter(order__status='Completed', active__in=[True, None], item__type='Product', order__customer=customer) customer_projects = Project.objects.filter(customer=customer) + departments = Department.objects.all().order_by('name') + if request.method == 'POST': + project = None + product = None + department_id = request.POST.get('department') + department = get_object_or_404(Department, id=department_id) + regarding = 'General/Account/Billing' + if request.POST.get('project'): + project = get_object_or_404(Project, id=request.POST.get('project')) + department = project.project_type.department + regarding = 'Project/Product' + elif request.POST.get('product'): + product = get_object_or_404(Item, id=request.POST.get('product')) + department = product.item_type.department + regarding = 'Project/Product' + ticket = Ticket( + status = 'Open', + customer = customer, + title = request.POST.get('title'), + description = request.POST.get('description'), + regarding = regarding, + project = project, + product = product, + department = department, + opened_by = request.user, + opened_date = datetime.now() + ) + ticket.save() + ticket_status_update = TicketStatusUpdate( + ticket = ticket, + status = 'Open', + added_by = request.user, + date_added = datetime.now() + ) + ticket_status_update.save() + for file in request.FILES.getlist('files'): + ticket_attachment = TicketAttachment( + ticket=ticket, + file=file + ) + ticket_attachment.save() + return redirect('ticketdetails', ticket_number=ticket.ticket_number) context = { 'customer_products' : customer_products, 'customer_projects' : customer_projects, + 'customer': customer, + 'departments' : departments } return render(request, 'add_templates/add-ticket.html', context) +@staff_login_required +def add_ticket_update(request, ticket_id): + ticket = get_object_or_404(Ticket, id=ticket_id) + + + if request.method == 'POST': + ticket_update = TicketUpdate( + ticket = ticket, + description = request.POST.get('description'), + added_by = request.user, + date_added = datetime.now(), + ) + ticket_update.save() + for file in request.FILES.getlist('files'): + ticket_attachment = TicketAttachment( + ticket_update=ticket_update, + file=file + ) + ticket_attachment.save() + return redirect('ticketdetails', ticket_number=ticket.ticket_number) + + context = { + 'ticket': ticket, + + + } + + return render(request, 'add_templates/customer-add-ticket.html', context) diff --git a/osinaweb/osinacore/templates/add_templates/add-ticket.html b/osinaweb/osinacore/templates/add_templates/add-ticket.html index 1c882ebc..04be705d 100644 --- a/osinaweb/osinacore/templates/add_templates/add-ticket.html +++ b/osinaweb/osinacore/templates/add_templates/add-ticket.html @@ -8,7 +8,7 @@ Add Ticket for {{customer.user.first_name}} {{customer.user.last_name}} -
+ {% csrf_token %}
@@ -19,7 +19,7 @@
- - - {% for customer_project in customer_projects %} - - {% endfor %} - + - + + + +
+ + +
+
- + @@ -57,7 +79,7 @@
- + Upload Document(s)
-
- - -
-

Invoices

-
- - - - - - - - - - - - - - - - - - - - - - - + + {% endfor %}
- Due Date - - Title - - Description - - Status - - Amount -
-

20-2-2024

-
-

Invoice 1

+
+ +

{{ticket.unread_updates_count}}

+
-

Invoice description section

-
-

Pending

-
-

200

-
@@ -185,7 +131,7 @@
-

Other Ways to Get Help

+

Ways to Get Help

diff --git a/osinaweb/osinacore/templates/details_templates/customer-details.html b/osinaweb/osinacore/templates/details_templates/customer-details.html index 4debe8c8..3d9ec8cb 100644 --- a/osinaweb/osinacore/templates/details_templates/customer-details.html +++ b/osinaweb/osinacore/templates/details_templates/customer-details.html @@ -28,7 +28,7 @@
diff --git a/osinaweb/osinacore/templates/details_templates/ticket-details.html b/osinaweb/osinacore/templates/details_templates/ticket-details.html index 624dcf24..6759e4b5 100644 --- a/osinaweb/osinacore/templates/details_templates/ticket-details.html +++ b/osinaweb/osinacore/templates/details_templates/ticket-details.html @@ -4,10 +4,10 @@
-

Ticket: #2226663535

+

Ticket: {{ticket.ticket_number}}

-
+

Closed by Linode at 20-4-24 16:30

@@ -15,11 +15,31 @@
+ {% for update in ticket_updates %}
- + {% if update.added_by.customerprofile %} + {% if update.added_by.customerprofile.image %} + + {% else %} +
+ {{ request.user.first_name.0 }}{{ request.user.last_name.0 }} +
+ {% endif %} + {% elif update.added_by.staffprofile %} + {% if update.added_by.staffprofile.image %} + + {% else %} +
+ {{ request.user.first_name.0 }}{{ request.user.last_name.0 }} +
+ {% endif %} + {% endif %}
@@ -27,9 +47,8 @@
-

Ositcom - Ltd - commented 2024-04-17 12:19

+

{{update.added_by.first_name}} + replied {{update.date_added}}

@@ -45,130 +64,77 @@

- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus non purus consectetur - magna sodales fringilla. Suspendisse non imperdiet metus. Curabitur feugiat tristique - varius. Curabitur fermentum sapien nisi, sed suscipit odio luctus sed. Mauris pretium risus - a tincidunt facilisis. Aliquam quis odio in mi aliquet scelerisque et ut urna. Ut ultrices - turpis odio, id hendrerit lectus dignissim in. Donec at tortor quis dui auctor sodales porta - et purus. Aliquam at nunc sit amet tortor lacinia porttitor. Proin auctor, eros ac - sollicitudin iaculis, felis quam vulputate ante, eu varius dolor arcu non enim. Vestibulum - ornare dapibus risus, id eleifend ipsum. Aliquam metus urna, bibendum quis cursus vitae, - placerat sit amet felis. Aliquam tellus ex, pretium id gravida id, vulputate et velit. - Phasellus leo felis, lobortis ut dolor eget, viverra aliquet ligula. Aliquam molestie ac - eros et fermentum. + {{update.description}}

-
-
- -
-
-
- -
- -
-
-

Scott - Customer Support commented 2024-04-17 12:19

- - - - - - - -
- -
-

- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus non purus consectetur - magna sodales fringilla. Suspendisse non imperdiet metus. Curabitur feugiat tristique - varius. Curabitur fermentum sapien nisi, sed suscipit odio luctus sed. Mauris pretium risus - a tincidunt facilisis. Aliquam quis odio in mi aliquet scelerisque et ut urna. Ut ultrices - turpis odio, id hendrerit lectus dignissim in. Donec at tortor quis dui auctor sodales porta - et purus. -

- -
- How - did I do? - -
-
- +
+ {% endfor %} + + + + {% csrf_token %} +
+
+ {% if request.user.customerprofile %} + {% if request.user.customerprofile.image %} + + {% else %} +
+ {{ request.user.first_name.0 }}{{ request.user.last_name.0 }}
- -
- + {% endif %} + {% elif request.user.staffprofile %} + {% if request.user.staffprofile.image %} + + {% else %} +
+ {{ request.user.first_name.0 }}{{ request.user.last_name.0 }}
- -
- -
-
+ {% endif %} + {% endif %}
-
-
- - -
-
-
- -
-
- - -
- +
+ -
-
- +
+
+ - - - -
+ + + +
- + + + +
-
-
-
+ +
+
diff --git a/osinaweb/osinacore/templates/listing_pages/tickets.html b/osinaweb/osinacore/templates/listing_pages/tickets.html index e9b9ff5d..2f9d41a9 100644 --- a/osinaweb/osinacore/templates/listing_pages/tickets.html +++ b/osinaweb/osinacore/templates/listing_pages/tickets.html @@ -26,8 +26,8 @@
-

Open Ticktes

-

Closed Ticktes

+

Open Tickets

+

Closed Tickets

@@ -49,10 +49,6 @@ class="px-6 py-3 text-sm font-medium text-gray-500 uppercase border-r border-gray-300 whitespace-nowrap"> Regarding - - Date Created - Last Updated @@ -89,17 +85,13 @@

20-2-2024

- -

20-2-2024

- -

Ositcom Ltd

- +
diff --git a/osinaweb/osinacore/urls.py b/osinaweb/osinacore/urls.py index 33811162..8f76074e 100644 --- a/osinaweb/osinacore/urls.py +++ b/osinaweb/osinacore/urls.py @@ -54,7 +54,7 @@ urlpatterns = [ #Details Templates path('customers//', views.customerdetails, name='customerdetails'), - path('ticket-details/', views.ticket_details, name='ticketdetails'), + path('ticket//', views.ticket_details, name='ticketdetails'), path('businesses//', views.businessdetails, name='businessdetails'), path('staffs//', views.staffdetails, name='userdetails'), path('projectdetails//', views.projectdetails, name='detailed-project'), diff --git a/osinaweb/osinacore/views.py b/osinaweb/osinacore/views.py index 0bce1001..e776d1a8 100644 --- a/osinaweb/osinacore/views.py +++ b/osinaweb/osinacore/views.py @@ -20,7 +20,7 @@ from django.core.mail import send_mail from django.conf import settings from django.utils.encoding import force_bytes from django.utils.http import urlsafe_base64_encode, urlsafe_base64_decode - +from customercore .models import * def login_with_email(request, email, key): @@ -451,9 +451,16 @@ def customerdetails(request, customer_id): @staff_login_required -def ticket_details(request): +def ticket_details(request, ticket_number): + ticket = get_object_or_404(Ticket, ticket_number=ticket_number) + ticket_updates = TicketUpdate.objects.filter(ticket=ticket).order_by('id') + for update in ticket_updates: + if not TicketRead.objects.filter(ticket_update=update, user=request.user).exists(): + TicketRead.objects.create(ticket_update=update, user=request.user, read=True) - context = { + context = { + 'ticket' : ticket, + 'ticket_updates': ticket_updates, } diff --git a/osinaweb/static/dist/output.css b/osinaweb/static/dist/output.css index 217314b2..e1ba3132 100644 --- a/osinaweb/static/dist/output.css +++ b/osinaweb/static/dist/output.css @@ -1,5 +1,5 @@ /* -! tailwindcss v3.4.1 | MIT License | https://tailwindcss.com +! tailwindcss v3.3.3 | MIT License | https://tailwindcss.com */ /* @@ -32,11 +32,9 @@ 4. Use the user's configured `sans` font-family by default. 5. Use the user's configured `sans` font-feature-settings by default. 6. Use the user's configured `sans` font-variation-settings by default. -7. Disable tap highlights on iOS */ -html, -:host { +html { line-height: 1.5; /* 1 */ -webkit-text-size-adjust: 100%; @@ -46,14 +44,12 @@ html, -o-tab-size: 4; tab-size: 4; /* 3 */ - font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; + font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; /* 4 */ font-feature-settings: normal; /* 5 */ font-variation-settings: normal; /* 6 */ - -webkit-tap-highlight-color: transparent; - /* 7 */ } /* @@ -125,10 +121,8 @@ strong { } /* -1. Use the user's configured `mono` font-family by default. -2. Use the user's configured `mono` font-feature-settings by default. -3. Use the user's configured `mono` font-variation-settings by default. -4. Correct the odd `em` font sizing in all browsers. +1. Use the user's configured `mono` font family by default. +2. Correct the odd `em` font sizing in all browsers. */ code, @@ -137,12 +131,8 @@ samp, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /* 1 */ - font-feature-settings: normal; - /* 2 */ - font-variation-settings: normal; - /* 3 */ font-size: 1em; - /* 4 */ + /* 2 */ } /* @@ -1406,7 +1396,7 @@ video { } .max-w-0 { - max-width: 0px; + max-width: 0rem; } .max-w-2xl { @@ -3225,6 +3215,11 @@ 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-gray-100:hover { + --tw-bg-opacity: 1; + background-color: rgb(243 244 246 / var(--tw-bg-opacity)); +} + .hover\:bg-gray-50:hover { --tw-bg-opacity: 1; background-color: rgb(249 250 251 / var(--tw-bg-opacity)); @@ -3322,6 +3317,13 @@ video { color: rgb(255 255 255 / var(--tw-text-opacity)); } +@media (prefers-color-scheme: dark) { + .dark\:text-gray-600 { + --tw-text-opacity: 1; + color: rgb(75 85 99 / var(--tw-text-opacity)); + } +} + @media (min-width: 650px) { .s\:mt-10 { margin-top: 2.5rem; @@ -3822,11 +3824,4 @@ video { .xll\:text-\[70px\] { font-size: 70px; } -} - -@media (prefers-color-scheme: dark) { - .dark\:text-gray-600 { - --tw-text-opacity: 1; - color: rgb(75 85 99 / var(--tw-text-opacity)); - } } \ No newline at end of file diff --git a/osinaweb/static/js/add-ticket.js b/osinaweb/static/js/add-ticket.js index 90a3f5b1..bcdb0297 100644 --- a/osinaweb/static/js/add-ticket.js +++ b/osinaweb/static/js/add-ticket.js @@ -17,6 +17,12 @@ selectRegarding.addEventListener('change', function() { projectsSelectTag.classList.remove('hidden'); projectsSelectTag.required = true; + productsSelectTag.required = false; + productsSelectTag.classList.add('hidden'); + } else if (selectedOption === 'General/Account/Billing') { + projectsSelectTag.classList.add('hidden'); + projectsSelectTag.required = true; + productsSelectTag.required = false; productsSelectTag.classList.add('hidden'); }