diff --git a/osinaweb/db.sqlite3 b/osinaweb/db.sqlite3 index 703801d6..eb594ca2 100644 Binary files a/osinaweb/db.sqlite3 and b/osinaweb/db.sqlite3 differ diff --git a/osinaweb/osinacore/__pycache__/admin.cpython-310.pyc b/osinaweb/osinacore/__pycache__/admin.cpython-310.pyc index dc91d65b..d8020d23 100644 Binary files a/osinaweb/osinacore/__pycache__/admin.cpython-310.pyc and b/osinaweb/osinacore/__pycache__/admin.cpython-310.pyc differ diff --git a/osinaweb/osinacore/__pycache__/custom_context.cpython-310.pyc b/osinaweb/osinacore/__pycache__/custom_context.cpython-310.pyc index dfcbe0e1..7e8d4dee 100644 Binary files a/osinaweb/osinacore/__pycache__/custom_context.cpython-310.pyc and b/osinaweb/osinacore/__pycache__/custom_context.cpython-310.pyc differ diff --git a/osinaweb/osinacore/__pycache__/models.cpython-310.pyc b/osinaweb/osinacore/__pycache__/models.cpython-310.pyc index 7147d30d..c5d9e448 100644 Binary files a/osinaweb/osinacore/__pycache__/models.cpython-310.pyc and b/osinaweb/osinacore/__pycache__/models.cpython-310.pyc differ diff --git a/osinaweb/osinacore/__pycache__/views.cpython-310.pyc b/osinaweb/osinacore/__pycache__/views.cpython-310.pyc index fd876d2d..96c18632 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/admin.py b/osinaweb/osinacore/admin.py index b8d6537d..2e7f59fd 100644 --- a/osinaweb/osinacore/admin.py +++ b/osinaweb/osinacore/admin.py @@ -34,4 +34,5 @@ admin.site.register(Status) admin.site.register(Tag) admin.site.register(Point) admin.site.register(DailyReport) +admin.site.register(BusinessType) diff --git a/osinaweb/osinacore/custom_context.py b/osinaweb/osinacore/custom_context.py index 1b578d5c..26a0498c 100644 --- a/osinaweb/osinacore/custom_context.py +++ b/osinaweb/osinacore/custom_context.py @@ -1,4 +1,4 @@ -from .models import Task, Status +from .models import * from django.contrib.auth.models import AnonymousUser from datetime import datetime, timedelta @@ -20,11 +20,13 @@ def calculate_time_ago(status): def utilities(request): + notes = Note.objects.filter(user=request.user).order_by('-date')[:6] + recent_note = Note.objects.filter(user=request.user).last() + if request.user.is_authenticated and request.user.is_superuser: open_task_count = Task.objects.filter(status='Open').count() working_on_task_count = Task.objects.filter(status='Working On').count() - elif request.user.is_authenticated: open_task_count = Task.objects.filter(assigned_to=request.user.staffprofile, status='Open').count() working_on_task_count = Task.objects.filter(assigned_to=request.user.staffprofile, status='Working On').count() @@ -35,8 +37,6 @@ def utilities(request): open_task_count = 0 working_on_task_count = 0 - - total_tasks = open_task_count + working_on_task_count latest_statuses = Status.objects.all().order_by('-id')[:12] @@ -48,7 +48,7 @@ def utilities(request): - return {'total_tasks': total_tasks, 'latest_statuses' : latest_statuses, 'latest_statuses_time_ago': latest_statuses_time_ago, } + return {'total_tasks': total_tasks, 'latest_statuses' : latest_statuses, 'latest_statuses_time_ago': latest_statuses_time_ago, 'notes' : notes, 'recent_note' : recent_note,} diff --git a/osinaweb/osinacore/migrations/0043_businesstype.py b/osinaweb/osinacore/migrations/0043_businesstype.py new file mode 100644 index 00000000..88819ec7 --- /dev/null +++ b/osinaweb/osinacore/migrations/0043_businesstype.py @@ -0,0 +1,20 @@ +# Generated by Django 4.2.5 on 2024-01-05 18:48 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('osinacore', '0042_remove_customerprofile_email_and_more'), + ] + + operations = [ + migrations.CreateModel( + name='BusinessType', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=50)), + ], + ), + ] diff --git a/osinaweb/osinacore/migrations/0044_remove_business_business_type.py b/osinaweb/osinacore/migrations/0044_remove_business_business_type.py new file mode 100644 index 00000000..1bb4cb68 --- /dev/null +++ b/osinaweb/osinacore/migrations/0044_remove_business_business_type.py @@ -0,0 +1,17 @@ +# Generated by Django 4.2.5 on 2024-01-05 18:48 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('osinacore', '0043_businesstype'), + ] + + operations = [ + migrations.RemoveField( + model_name='business', + name='business_type', + ), + ] diff --git a/osinaweb/osinacore/migrations/0045_business_type.py b/osinaweb/osinacore/migrations/0045_business_type.py new file mode 100644 index 00000000..c2d6dd67 --- /dev/null +++ b/osinaweb/osinacore/migrations/0045_business_type.py @@ -0,0 +1,19 @@ +# Generated by Django 4.2.5 on 2024-01-05 18:49 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('osinacore', '0044_remove_business_business_type'), + ] + + operations = [ + migrations.AddField( + model_name='business', + name='type', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='osinacore.businesstype'), + ), + ] diff --git a/osinaweb/osinacore/migrations/__pycache__/0043_businesstype.cpython-310.pyc b/osinaweb/osinacore/migrations/__pycache__/0043_businesstype.cpython-310.pyc new file mode 100644 index 00000000..fa110375 Binary files /dev/null and b/osinaweb/osinacore/migrations/__pycache__/0043_businesstype.cpython-310.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0044_remove_business_business_type.cpython-310.pyc b/osinaweb/osinacore/migrations/__pycache__/0044_remove_business_business_type.cpython-310.pyc new file mode 100644 index 00000000..80230af1 Binary files /dev/null and b/osinaweb/osinacore/migrations/__pycache__/0044_remove_business_business_type.cpython-310.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0045_business_type.cpython-310.pyc b/osinaweb/osinacore/migrations/__pycache__/0045_business_type.cpython-310.pyc new file mode 100644 index 00000000..2be11614 Binary files /dev/null and b/osinaweb/osinacore/migrations/__pycache__/0045_business_type.cpython-310.pyc differ diff --git a/osinaweb/osinacore/models.py b/osinaweb/osinacore/models.py index 79e8cf59..317f73c1 100644 --- a/osinaweb/osinacore/models.py +++ b/osinaweb/osinacore/models.py @@ -21,6 +21,12 @@ class Reference(models.Model): class Tag(models.Model): name = models.CharField(max_length=50) + +class BusinessType(models.Model): + name = models.CharField(max_length=50) + + + class Business(models.Model): name = models.CharField(max_length=50) email = models.EmailField(unique=True) @@ -29,19 +35,7 @@ class Business(models.Model): commercial_registration = models.CharField(max_length=50) phone_number = models.CharField(max_length=50) website = models.URLField(null=True) - BUSINESS_TYPE = ( - ('ASSOCIATIONS', 'ASSOCIATIONS'), - ('HEALTHCARE', 'HEALTHCARE'), - ('LUXURY', 'LUXURY'), - ('MANUFACTURING', 'MANUFACTURING'), - ('NON-PROFIT', 'NON-PROFIT'), - ('EDUCATION', 'EDUCATION'), - ('ENTERTAINMENT', 'ENTERTAINMENT'), - ('LOGISTICS', 'LOGISTICS'), - ('RETAIL', 'RETAIL'), - ('AUTOMOTIVE', 'AUTOMOTIVE'), - ) - business_type = models.CharField(max_length=200, choices=BUSINESS_TYPE) + type = models.ForeignKey(BusinessType, on_delete=models.CASCADE, null=True, blank=True) logo = models.ImageField() business_id = models.CharField(max_length=20, null=True, blank=True) # Allow null and blank for initial creation class Meta: @@ -60,6 +54,8 @@ class Business(models.Model): + + class CustomerProfile(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE, blank=True) mobile_number = models.CharField(max_length=50, blank=True) diff --git a/osinaweb/osinacore/views.py b/osinaweb/osinacore/views.py index b33b4b1b..5e2873bf 100644 --- a/osinaweb/osinacore/views.py +++ b/osinaweb/osinacore/views.py @@ -130,6 +130,15 @@ def project_types(request): return render(request, 'listing_pages/project-types.html', context) +@login_required +def business_types(request): + businesstypes = BusinessType.objects.all().order_by('-id') + + context = { + 'businesstypes' : businesstypes, + } + return render(request, 'listing_pages/business-types.html', context) + @login_required def references(request): @@ -476,6 +485,13 @@ def add_projecttype_modal(request, *args, **kwargs): } return render(request, 'popup_modals/addprojecttype-modal.html', context) + +def add_businesstype_modal(request, *args, **kwargs): + context = { + + } + return render(request, 'popup_modals/addbusinesstype-modal.html', context) + def add_reference_modal(request, *args, **kwargs): context = { @@ -900,6 +916,23 @@ def save_projecttype(request): return redirect('projecttypes') +@login_required +def save_businesstype(request): + if request.method == 'POST': + name = request.POST.get('name') + + + businesstype = BusinessType( + name = name, + ) + businesstype.save() + + + # Reload the parent page + return HttpResponse('') + + return redirect('businesstypes') + @login_required def save_reference(request): @@ -1143,18 +1176,94 @@ def edit_task(request, *args, **kwargs): @login_required -def edit_customer(request, *args, **kwargs): +def edit_customer(request, customer_id): + customer = get_object_or_404(CustomerProfile, customer_id=customer_id) + + #Utilities + references = Reference.objects.all() + businesses = Business.objects.all + customer_status = customer.status + customer_reference = customer.reference + customer_business = customer.business + + + if request.method == 'POST': + + customer.user.first_name = request.POST.get('first_name') + customer.user.last_name = request.POST.get('last_name') + customer.user.email = request.POST.get('email') + customer.user.save() + customer.mobile_number = request.POST.get('mobile_number') + customer.personal_website = request.POST.get('personal_website') + customer.status = request.POST.get('status') + + customer_reference = request.POST.get('reference') + reference = get_object_or_404(Reference, id=customer_reference) + customer.reference = reference + + if customer.business: + customer_business = request.POST.get('business') + business = get_object_or_404(Business, id=customer_business) + customer.business = business + + + + customer.save() + + + return redirect('customerdetails', customer_id=customer.customer_id) + context = { + 'customer' : customer, + 'references' : references, + 'businesses' : businesses, + 'customer_status' : customer_status, + 'customer_reference' : customer_reference, + 'customer_business' : customer_business, + } return render(request, 'edit_pages/edit-customer.html', context) @login_required -def edit_business(request, *args, **kwargs): +def edit_business(request, business_id): + business = get_object_or_404(Business, business_id=business_id) + business_types = BusinessType.objects.all().order_by('name') + current_business_type = None + if business.type: + current_business_type = business.type + + + if request.method == 'POST': + + business.name= request.POST.get('name') + business.financial_number = request.POST.get('financial_number') + business.commercial_registration = request.POST.get('commercial_registration') + business.vat = request.POST.get('vat') + business.phone_number = request.POST.get('phone_number') + business.website = request.POST.get('website') + + + business_type = request.POST.get('business_type') + type = get_object_or_404(BusinessType, id=business_type) + business.type = type + + new_logo = request.FILES.get('logo') + if new_logo: + business.logo = new_logo + + + business.save() + + + return redirect('businessdetails', business_id=business.business_id) context = { + 'business' : business, + 'business_types' : business_types, + 'current_business_type' : current_business_type, } return render(request, 'edit_pages/edit-business.html', context) @@ -1193,6 +1302,19 @@ def edit_project_type(request, projecttype_id): return render(request, 'edit_pages/edit-project-type.html', {'projecttype': projecttype}) +@login_required +def edit_business_type(request, businesstype_id): + + businesstype = get_object_or_404(BusinessType, id=businesstype_id) + + if request.method == 'POST': + businesstype.name = request.POST.get('name') + businesstype.save() + + return redirect('businesstypes') + + return render(request, 'edit_pages/edit-business-type.html', {'businesstype': businesstype}) + @login_required def edit_reference(request, reference_id): @@ -1227,6 +1349,7 @@ def edit_tag(request, tag_id): + # TO UPDATE THE STATUS CONTAINER def get_updated_last_status(request): if request.user.is_authenticated: diff --git a/osinaweb/osinaweb/__pycache__/urls.cpython-310.pyc b/osinaweb/osinaweb/__pycache__/urls.cpython-310.pyc index af4458bc..c31b9d5a 100644 Binary files a/osinaweb/osinaweb/__pycache__/urls.cpython-310.pyc and b/osinaweb/osinaweb/__pycache__/urls.cpython-310.pyc differ diff --git a/osinaweb/osinaweb/urls.py b/osinaweb/osinaweb/urls.py index a85cd8b2..a37c6515 100644 --- a/osinaweb/osinaweb/urls.py +++ b/osinaweb/osinaweb/urls.py @@ -30,12 +30,10 @@ urlpatterns = [ path('my-tasks/', login_required(views.my_tasks), name='my-tasks'), path('customers/', views.customers, name='customers'), path('addcustomer/', views.add_customer, name='addcustomer'), - path('customerdetails//', views.customerdetails, name='customerdetails'), - path('addbusiness/', views.addbusiness, name='addbusiness'), - path('businessdetails//', views.businessdetails, name='businessdetails'), + path('add-business/', views.addbusiness, name='addbusiness'), + path('businesses//', views.businessdetails, name='businessdetails'), path('businesses/', views.businesses, name='businesses'), path('addstaff/', views.addstaff, name='adduser'), - path('staffdetails//', views.staffdetails, name='userdetails'), path('staffs/', views.staffs, name='users'), path('staffpositions/', views.staff_positions, name='staffpositions'), path('projectdetails//', views.detailed_project, name='detailed-project'), @@ -44,37 +42,49 @@ urlpatterns = [ path('createtask/', views.create_task, name='createtask'), path('createtask//', views.createtask_project, name='createtaskproject'), path('createtaskepic/', views.createtask_epic, name='createtaskepic'), - path('taskdetails//', views.detailed_task, name='detailed-task'), path('projecttypes/', views.project_types, name='projecttypes'), + path('businesstypes/', views.business_types, name='businesstypes'), path('references/', views.references, name='references'), path('tags/', views.tags, name='tags'), path('dailyreports/', views.daily_reports, name='dailyreports'), - path('adddailyreport/', views.add_daily_report, name='adddailyreport'), + path('add-dailyreport/', views.add_daily_report, name='adddailyreport'), + + + + #Detail pages urls + path('businesses//', views.businessdetails, name='businessdetails'), + path('customers//', views.customerdetails, name='customerdetails'), + path('staffs//', views.staffdetails, name='userdetails'), + path('tasks//', views.detailed_task, name='detailed-task'), + + + #Fetch urls path("fetch_related_tasks/", views.fetch_related_tasks, name="fetch_related_tasks"), - # Modals urls - path('addstatus/', views.add_status_modal, name='addstatus'), - path('addnote/', views.add_note_modal, name='addnote'), - path('addfile/', views.add_file_modal, name='addfile'), - path('addcredentials/', views.add_credentials_modal, name='addcredentials'), - path('updatestatus//', views.update_status_modal, name='updatestatus'), - path('addpoint//', views.add_point_modal, name='addpoint'), - path('showpoints//', views.show_points_modal, name='showpoints'), - path('addtime/', views.add_time_modal, name='addtime'), + #Modals urls + path('add-status/', views.add_status_modal, name='addstatus'), + path('add-note/', views.add_note_modal, name='addnote'), + path('add-file/', views.add_file_modal, name='addfile'), + path('add-credentials/', views.add_credentials_modal, name='addcredentials'), + path('update-status//', views.update_status_modal, name='updatestatus'), + path('add-point//', views.add_point_modal, name='addpoint'), + path('show-points//', views.show_points_modal, name='showpoints'), + path('add-time/', views.add_time_modal, name='addtime'), path('timeline/', views.timeline_modal, name='timeline'), - path('deletetask/', views.delete_task_modal, name='deletetask'), - path('addprojecttype/', views.add_projecttype_modal, name='addprojecttype'), - path('addreference/', views.add_reference_modal, name='addreference'), - path('addtag/', views.add_tag_modal, name='addtag'), - path('addbusinesscustomer/', views.add_business_modal, name='addbusinesscustomer'), - path('addstaffposition/', views.staff_position_modal, name='addstaffposition'), + path('delete-task/', views.delete_task_modal, name='deletetask'), + path('add-projecttype/', views.add_projecttype_modal, name='addprojecttype'), + path('add-businesstype/', views.add_businesstype_modal, name='addbusinesstype'), + path('add-reference/', views.add_reference_modal, name='addreference'), + path('add-tag/', views.add_tag_modal, name='addtag'), + path('add-businesscustomer/', views.add_business_modal, name='addbusinesscustomer'), + path('add-staffposition/', views.staff_position_modal, name='addstaffposition'), - # Save Urls + #Save Urls path('save_note/', views.save_note, name='save_note'), path('save_project/', views.save_project, name='save_project'), path('save_epic/', views.save_epic, name='save_epic'), @@ -85,6 +95,7 @@ urlpatterns = [ path('save_staff/', views.save_staff, name='save_staff'), path('save_status/', views.save_status, name='save_status'), path('save_projecttype/', views.save_projecttype, name='save_projecttype'), + path('save_businesstype/', views.save_businesstype, name='save_businesstype'), path('save_reference/', views.save_reference, name='save_reference'), path('save_tag/', views.save_tag, name='save_tag'), path('save_point/', views.save_point, name='save_point'), @@ -92,19 +103,18 @@ urlpatterns = [ path('save_dailyreport/', views.save_dailyreport, name='save_dailyreport'), - - - # Edit Urls - path('editproject/', views.edit_project, name='editproject'), - path('editepic/', views.edit_epic, name='editepic'), - path('edittask/', views.edit_task, name='edittask'), - path('editcustomer/', views.edit_customer, name='editcustomer'), - path('editbusiness/', views.edit_business, name='editbusiness'), - path('editstaff/', views.edit_staff, name='editstaff'), - path('editprojecttype/', views.edit_project_type, name='editprojecttype'), - path('editreference/', views.edit_reference, name='editreference'), - path('edittag/', views.edit_tag, name='edittag'), - path('editstaffposition/', views.edit_staff_position, name='editstaffposition'), + #Edit Pages + path('edit-project/', views.edit_project, name='editproject'), + path('edit-epic/', views.edit_epic, name='editepic'), + path('edit-task/', views.edit_task, name='edittask'), + path('edit-customer//', views.edit_customer, name='editcustomer'), + path('edit-business//', views.edit_business, name='editbusiness'), + path('edit-staff/', views.edit_staff, name='editstaff'), + path('edit-projecttype/', views.edit_project_type, name='editprojecttype'), + path('edit-businesstype/', views.edit_business_type, name='editbusinesstype'), + path('edit-reference/', views.edit_reference, name='editreference'), + path('edit-tag/', views.edit_tag, name='edittag'), + path('edits-taffposition/', views.edit_staff_position, name='editstaffposition'), path('mark_point_working_on///', views.mark_point_working_on, name='mark_point_working_on'), path('mark_point_working_on_task_page///', views.mark_point_working_on_task_page, name='mark_point_working_on_task_page'), path('mark_point_completed///', views.mark_point_completed, name='mark_point_completed'), @@ -112,7 +122,7 @@ urlpatterns = [ - + #Fetch Urls path('getupdatedlaststatus/', views.get_updated_last_status, name='getupdatedlaststatus'), path('getupdatedactivities/', views.get_latest_activities, name='getupdatedactivities'), ] diff --git a/osinaweb/static/dist/output.css b/osinaweb/static/dist/output.css index 4345e49e..493aa298 100644 --- a/osinaweb/static/dist/output.css +++ b/osinaweb/static/dist/output.css @@ -977,10 +977,6 @@ video { width: 380px; } -.w-\[40\%\] { - width: 40%; -} - .w-\[40px\] { width: 40px; } @@ -1013,10 +1009,6 @@ video { width: 55%; } -.w-\[60\%\] { - width: 60%; -} - .w-\[60px\] { width: 60px; } @@ -1955,14 +1947,14 @@ video { color: rgb(59 130 246 / var(--tw-text-opacity)); } -.hover\:text-gray-500:hover { +.hover\:text-red-500:hover { --tw-text-opacity: 1; - color: rgb(107 114 128 / var(--tw-text-opacity)); + color: rgb(239 68 68 / var(--tw-text-opacity)); } -.hover\:text-red-500:hover { +.hover\:text-slate-700:hover { --tw-text-opacity: 1; - color: rgb(239 68 68 / var(--tw-text-opacity)); + color: rgb(51 65 85 / var(--tw-text-opacity)); } .hover\:text-slate-800:hover { diff --git a/osinaweb/static/js/pop-modals.js b/osinaweb/static/js/pop-modals.js index 59e188e2..e1cd5cd8 100644 --- a/osinaweb/static/js/pop-modals.js +++ b/osinaweb/static/js/pop-modals.js @@ -54,6 +54,7 @@ document.addEventListener("DOMContentLoaded", function () { addButtonClickListener("addFileButton", "500px", "320px"); addButtonClickListener("addCredentialsButton", "500px", "300px"); addButtonClickListener("addProjectTypeButton", "fit-content", "160px"); + addButtonClickListener("addBusinessTypeButton", "fit-content", "160px"); addButtonClickListener("addReferenceButton", "fit-content", "230px"); addButtonClickListener("addTagButton", "fit-content", "160px"); addButtonClickListener("addBusinessButton", "550px", "500px"); diff --git a/osinaweb/templates/details_pages/business-details.html b/osinaweb/templates/details_pages/business-details.html index e9071b99..5a16f490 100644 --- a/osinaweb/templates/details_pages/business-details.html +++ b/osinaweb/templates/details_pages/business-details.html @@ -68,7 +68,7 @@ - + @@ -108,13 +108,13 @@

Business Type: {{business.business_type}}

+ class="text-slate-800 text-xl font-semibold">{{business.type.name}}

Related Customer: {% for customer_profile in business.customerprofile_set.all %} - {{ customer_profile.user.first_name }} {{customer_profile.user.last_name}} + {{ customer_profile.user.first_name }} {{customer_profile.user.last_name}} {% if not forloop.last %}, {% endif %} {%endfor%} diff --git a/osinaweb/templates/details_pages/customer-details.html b/osinaweb/templates/details_pages/customer-details.html index f02dddc3..9f199622 100644 --- a/osinaweb/templates/details_pages/customer-details.html +++ b/osinaweb/templates/details_pages/customer-details.html @@ -80,7 +80,7 @@ - + @@ -90,17 +90,17 @@

+ +{% endblock content %} \ No newline at end of file diff --git a/osinaweb/templates/edit_pages/edit-business.html b/osinaweb/templates/edit_pages/edit-business.html index 945570e0..f77c5fad 100644 --- a/osinaweb/templates/edit_pages/edit-business.html +++ b/osinaweb/templates/edit_pages/edit-business.html @@ -8,18 +8,27 @@ Edit Business -
+ {% csrf_token %} - +
+
+ + +
-
+ +
- + Upload Business + class="text-gray-500 text-base focus:outline-none outline-none">Upload New Business Logo
+
diff --git a/osinaweb/templates/edit_pages/edit-customer.html b/osinaweb/templates/edit_pages/edit-customer.html index 6e163d3f..2dfb4e8a 100644 --- a/osinaweb/templates/edit_pages/edit-customer.html +++ b/osinaweb/templates/edit_pages/edit-customer.html @@ -8,55 +8,100 @@ Edit Customer -
+ {% csrf_token %}
- - - - - - - - - - - - - - - +
+ + +
+ +
+ + +
+ + +
+ + +
+ +
+ + +
+ + +
+ + +
+ + +
+ + +
+ +
+ + +
+ + {% if not customer_business %} +
+ + +
+ {% endif %} + + + {% if customer_business %} +
+ + +
+ {% endif %} + + + + + + +{% endblock content %} \ No newline at end of file diff --git a/osinaweb/templates/listing_pages/businesses.html b/osinaweb/templates/listing_pages/businesses.html index 31ef27a6..9f424105 100644 --- a/osinaweb/templates/listing_pages/businesses.html +++ b/osinaweb/templates/listing_pages/businesses.html @@ -8,7 +8,13 @@

Recent Note:

-

Send an Email to Salim.

+
+
+ +
+

{{recent_note.text}}

+
@@ -26,29 +32,13 @@
@@ -92,12 +82,12 @@ Name - Business Type + class="px-6 py-3 text-sm font-medium text-gray-500 uppercase border-r border-gray-300 whitespace-nowrap"> + Customer - Financial Number + Business Type @@ -116,13 +106,17 @@ -

{{business.business_type}}

+ {% for customer in business.customerprofile_set.all %} +

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

+ {% endfor %} -

{{business.financial_number}}

+

{{business.type.name}}

+ + - +
diff --git a/osinaweb/templates/listing_pages/customers.html b/osinaweb/templates/listing_pages/customers.html index 741dbe39..5d0e979e 100644 --- a/osinaweb/templates/listing_pages/customers.html +++ b/osinaweb/templates/listing_pages/customers.html @@ -8,7 +8,13 @@

Recent Note:

-

Send an Email to Salim.

+
+
+ +
+

{{recent_note.text}}

+
@@ -26,29 +32,13 @@
@@ -153,7 +143,7 @@
- +
diff --git a/osinaweb/templates/listing_pages/daily-reports.html b/osinaweb/templates/listing_pages/daily-reports.html index 714b9bab..03e8f1fe 100644 --- a/osinaweb/templates/listing_pages/daily-reports.html +++ b/osinaweb/templates/listing_pages/daily-reports.html @@ -7,7 +7,13 @@

Recent Note:

-

Send an Email to Salim.

+
+
+ +
+

{{recent_note.text}}

+
@@ -25,33 +31,18 @@
+
diff --git a/osinaweb/templates/listing_pages/project-types.html b/osinaweb/templates/listing_pages/project-types.html index bb3ec194..5e2e8533 100644 --- a/osinaweb/templates/listing_pages/project-types.html +++ b/osinaweb/templates/listing_pages/project-types.html @@ -7,7 +7,13 @@

Recent Note:

-

Send an Email to Salim.

+
+
+ +
+

{{recent_note.text}}

+
@@ -25,29 +31,13 @@
diff --git a/osinaweb/templates/listing_pages/projects.html b/osinaweb/templates/listing_pages/projects.html index d4a63fa4..ea9fb7c1 100644 --- a/osinaweb/templates/listing_pages/projects.html +++ b/osinaweb/templates/listing_pages/projects.html @@ -8,7 +8,13 @@

Recent Note:

-

Send an Email to Salim.

+
+
+ +
+

{{recent_note.text}}

+
@@ -26,29 +32,13 @@
diff --git a/osinaweb/templates/listing_pages/references.html b/osinaweb/templates/listing_pages/references.html index 70aae6ee..578d88d8 100644 --- a/osinaweb/templates/listing_pages/references.html +++ b/osinaweb/templates/listing_pages/references.html @@ -7,7 +7,13 @@

Recent Note:

-

Send an Email to Salim.

+
+
+ +
+

{{recent_note.text}}

+
@@ -25,29 +31,13 @@
diff --git a/osinaweb/templates/listing_pages/staff-positions.html b/osinaweb/templates/listing_pages/staff-positions.html index 2c46dbb7..4e00287f 100644 --- a/osinaweb/templates/listing_pages/staff-positions.html +++ b/osinaweb/templates/listing_pages/staff-positions.html @@ -8,7 +8,13 @@

Recent Note:

-

Send an Email to Salim.

+
+
+ +
+

{{recent_note.text}}

+
@@ -26,29 +32,13 @@
diff --git a/osinaweb/templates/listing_pages/staffs.html b/osinaweb/templates/listing_pages/staffs.html index 5faf28f4..a02417ca 100644 --- a/osinaweb/templates/listing_pages/staffs.html +++ b/osinaweb/templates/listing_pages/staffs.html @@ -8,7 +8,13 @@

Recent Note:

-

Send an Email to Salim.

+
+
+ +
+

{{recent_note.text}}

+
@@ -26,29 +32,13 @@
diff --git a/osinaweb/templates/listing_pages/tags.html b/osinaweb/templates/listing_pages/tags.html index 7fd8828a..9ae515b8 100644 --- a/osinaweb/templates/listing_pages/tags.html +++ b/osinaweb/templates/listing_pages/tags.html @@ -7,7 +7,13 @@

Recent Note:

-

Send an Email to Salim.

+
+
+ +
+

{{recent_note.text}}

+
@@ -25,29 +31,13 @@
diff --git a/osinaweb/templates/listing_pages/tasks.html b/osinaweb/templates/listing_pages/tasks.html index 996e9757..db92b3df 100644 --- a/osinaweb/templates/listing_pages/tasks.html +++ b/osinaweb/templates/listing_pages/tasks.html @@ -7,7 +7,13 @@

Recent Note:

-

Send an Email to Salim.

+
+
+ +
+

{{recent_note.text}}

+
@@ -25,29 +31,13 @@
diff --git a/osinaweb/templates/main.html b/osinaweb/templates/main.html index 0137da2b..05e1c8f2 100644 --- a/osinaweb/templates/main.html +++ b/osinaweb/templates/main.html @@ -167,24 +167,32 @@
- + +
-

References

+

Staff Positions

- +
-

Tags

+

Business Types

- +
-

Staff Positions

+

References

+
+
+ + +
+

Tags

diff --git a/osinaweb/templates/popup_modals/addbusinesstype-modal.html b/osinaweb/templates/popup_modals/addbusinesstype-modal.html new file mode 100644 index 00000000..1fb10722 --- /dev/null +++ b/osinaweb/templates/popup_modals/addbusinesstype-modal.html @@ -0,0 +1,32 @@ +{% load static %} + + + + + + + Osina + + + + + + + + + {% csrf_token %} +

Add Business Type

+ +
+ +
+ +
+ +
+
+ + \ No newline at end of file