diff --git a/.DS_Store b/.DS_Store index 952c9f83..5e4ef4e6 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/osinaweb/.DS_Store b/osinaweb/.DS_Store index 2836bb73..0f91ee00 100644 Binary files a/osinaweb/.DS_Store and b/osinaweb/.DS_Store differ diff --git a/osinaweb/customercore/.DS_Store b/osinaweb/customercore/.DS_Store new file mode 100644 index 00000000..d4651521 Binary files /dev/null and b/osinaweb/customercore/.DS_Store differ diff --git a/osinaweb/osinacore/templates/customer_dashboard/listing_pages/customer-products.html b/osinaweb/customercore/__init__.py similarity index 100% rename from osinaweb/osinacore/templates/customer_dashboard/listing_pages/customer-products.html rename to osinaweb/customercore/__init__.py diff --git a/osinaweb/customercore/__pycache__/__init__.cpython-310.pyc b/osinaweb/customercore/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 00000000..9f8f1cce Binary files /dev/null and b/osinaweb/customercore/__pycache__/__init__.cpython-310.pyc differ diff --git a/osinaweb/customercore/__pycache__/admin.cpython-310.pyc b/osinaweb/customercore/__pycache__/admin.cpython-310.pyc new file mode 100644 index 00000000..bc8cfe44 Binary files /dev/null and b/osinaweb/customercore/__pycache__/admin.cpython-310.pyc differ diff --git a/osinaweb/customercore/__pycache__/apps.cpython-310.pyc b/osinaweb/customercore/__pycache__/apps.cpython-310.pyc new file mode 100644 index 00000000..fb2e1ba9 Binary files /dev/null and b/osinaweb/customercore/__pycache__/apps.cpython-310.pyc differ diff --git a/osinaweb/customercore/__pycache__/decorators.cpython-310.pyc b/osinaweb/customercore/__pycache__/decorators.cpython-310.pyc new file mode 100644 index 00000000..2cac15a8 Binary files /dev/null and b/osinaweb/customercore/__pycache__/decorators.cpython-310.pyc differ diff --git a/osinaweb/customercore/__pycache__/models.cpython-310.pyc b/osinaweb/customercore/__pycache__/models.cpython-310.pyc new file mode 100644 index 00000000..8ae1b72a Binary files /dev/null and b/osinaweb/customercore/__pycache__/models.cpython-310.pyc differ diff --git a/osinaweb/customercore/__pycache__/urls.cpython-310.pyc b/osinaweb/customercore/__pycache__/urls.cpython-310.pyc new file mode 100644 index 00000000..901ec3ca Binary files /dev/null and b/osinaweb/customercore/__pycache__/urls.cpython-310.pyc differ diff --git a/osinaweb/customercore/__pycache__/views.cpython-310.pyc b/osinaweb/customercore/__pycache__/views.cpython-310.pyc new file mode 100644 index 00000000..c81f13d6 Binary files /dev/null and b/osinaweb/customercore/__pycache__/views.cpython-310.pyc differ diff --git a/osinaweb/customercore/admin.py b/osinaweb/customercore/admin.py new file mode 100644 index 00000000..8c38f3f3 --- /dev/null +++ b/osinaweb/customercore/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/osinaweb/customercore/apps.py b/osinaweb/customercore/apps.py new file mode 100644 index 00000000..d919b3a9 --- /dev/null +++ b/osinaweb/customercore/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class CustomercoreConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'customercore' diff --git a/osinaweb/customercore/decorators.py b/osinaweb/customercore/decorators.py new file mode 100644 index 00000000..e59d7b5b --- /dev/null +++ b/osinaweb/customercore/decorators.py @@ -0,0 +1,13 @@ +from functools import wraps +from django.shortcuts import redirect +from osinacore.models import * +def customer_login_required(view_func): + @wraps(view_func) + def _wrapped_view(request, *args, **kwargs): + # Check if the user is logged in and is a staff member + if not request.user.is_authenticated or not CustomerProfile.objects.filter(user=request.user): + return redirect('signout') # Redirect to login URL if not staff + + return view_func(request, *args, **kwargs) + + return _wrapped_view diff --git a/osinaweb/customercore/migrations/__init__.py b/osinaweb/customercore/migrations/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/osinaweb/customercore/migrations/__pycache__/__init__.cpython-310.pyc b/osinaweb/customercore/migrations/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 00000000..5c350bb5 Binary files /dev/null and b/osinaweb/customercore/migrations/__pycache__/__init__.cpython-310.pyc differ diff --git a/osinaweb/customercore/models.py b/osinaweb/customercore/models.py new file mode 100644 index 00000000..71a83623 --- /dev/null +++ b/osinaweb/customercore/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/osinaweb/customercore/templates/.DS_Store b/osinaweb/customercore/templates/.DS_Store new file mode 100644 index 00000000..f25a0aa6 Binary files /dev/null and b/osinaweb/customercore/templates/.DS_Store differ diff --git a/osinaweb/osinacore/templates/customer_dashboard/customer_main.html b/osinaweb/customercore/templates/customer_main.html similarity index 100% rename from osinaweb/osinacore/templates/customer_dashboard/customer_main.html rename to osinaweb/customercore/templates/customer_main.html diff --git a/osinaweb/osinacore/templates/customer_dashboard/listing_pages/customer-invoices.html b/osinaweb/customercore/templates/listing_pages/customer-invoices.html similarity index 98% rename from osinaweb/osinacore/templates/customer_dashboard/listing_pages/customer-invoices.html rename to osinaweb/customercore/templates/listing_pages/customer-invoices.html index fb65a7ae..39c2d9d0 100644 --- a/osinaweb/osinacore/templates/customer_dashboard/listing_pages/customer-invoices.html +++ b/osinaweb/customercore/templates/listing_pages/customer-invoices.html @@ -1,4 +1,4 @@ -{% extends "customer_dashboard/customer_main.html" %} +{% extends "customer_main.html" %} {%load static%} {% block content %} diff --git a/osinaweb/customercore/templates/listing_pages/customer-products.html b/osinaweb/customercore/templates/listing_pages/customer-products.html new file mode 100644 index 00000000..e69de29b diff --git a/osinaweb/osinacore/templates/customer_dashboard/pricing.html b/osinaweb/customercore/templates/pricing.html similarity index 99% rename from osinaweb/osinacore/templates/customer_dashboard/pricing.html rename to osinaweb/customercore/templates/pricing.html index 221cd1a9..1b64d884 100644 --- a/osinaweb/osinacore/templates/customer_dashboard/pricing.html +++ b/osinaweb/customercore/templates/pricing.html @@ -1,4 +1,4 @@ -{% extends "customer_dashboard/customer_main.html" %} +{% extends "customer_main.html" %} {%load static%} {% block modules_section %} diff --git a/osinaweb/customercore/tests.py b/osinaweb/customercore/tests.py new file mode 100644 index 00000000..7ce503c2 --- /dev/null +++ b/osinaweb/customercore/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/osinaweb/customercore/urls.py b/osinaweb/customercore/urls.py new file mode 100644 index 00000000..c99dda18 --- /dev/null +++ b/osinaweb/customercore/urls.py @@ -0,0 +1,13 @@ +from django.urls import path +from . import views + + +urlpatterns = [ + + path('invoices/', views.customer_invoices, name='customerinvoices'), + path('products/', views.customer_products, name='customerproducts'), + path('pricing/', views.pricing, name='pricing'), + path('initiate_checkout/', views.initiate_checkout, name='initiatecheckout'), + + +] diff --git a/osinaweb/customercore/views.py b/osinaweb/customercore/views.py new file mode 100644 index 00000000..445ee279 --- /dev/null +++ b/osinaweb/customercore/views.py @@ -0,0 +1,79 @@ +from django.shortcuts import render +from django.contrib.auth.decorators import login_required +from django.http import JsonResponse +import requests +from .decorators import * + +# Create your views here. +@customer_login_required +def customer_invoices(request, *args, **kwargs): + + context = { + + } + + return render(request, 'listing_pages/customer-invoices.html', context) + + +@customer_login_required +def customer_products(request, *args, **kwargs): + + context = { + + } + + return render(request, 'listing_pages/customer-products.html', context) + + +@customer_login_required +def pricing(request, *args, **kwargs): + + context = { + + } + + return render(request, 'pricing.html', context) + + + +@customer_login_required +def initiate_checkout(request): + # Your Mastercard API credentials + api_username = "merchant.TEST06127800" + api_password = "37846250a67c70e7fe9f82cf6ca81f93" + merchant_id = "TEST06127800" + merchant_name = "Ositcom Sal" + + # Data for Initiate Checkout operation + data = { + "apiOperation": "INITIATE_CHECKOUT", + "apiUsername": api_username, + "apiPassword": api_password, + "merchant": merchant_id, + "interaction.operation": "PURCHASE", + "interaction.merchant.name": merchant_name, + "order.id": "123", + "order.amount": "100.00", + "order.currency": "USD", + "order.description": "description_of_order" + } + + + try: + response = requests.post("https://creditlibanais-netcommerce.gateway.mastercard.com/api/nvp/version/72", data=data) + + print("Response Content:", response.content.decode()) # Print response content + + if response.status_code == 200: + response_data = response.text + parsed_data = dict(item.split("=") for item in response_data.split("&")) + session_id = parsed_data.get("session.id") + success_indicator = parsed_data.get("successIndicator") + return JsonResponse({"session_id": session_id, "success_indicator": success_indicator}) + else: + print("Response Status Code:", response.status_code) # Print status code + return JsonResponse({"error": "Failed to initiate checkout"}, status=500) + + except Exception as e: + print("Exception:", e) # Print exception traceback + return JsonResponse({"error": "Internal Server Error"}, status=500) \ No newline at end of file diff --git a/osinaweb/db.sqlite3 b/osinaweb/db.sqlite3 index a0055b77..9d7b087b 100644 Binary files a/osinaweb/db.sqlite3 and b/osinaweb/db.sqlite3 differ diff --git a/osinaweb/osinacore/.DS_Store b/osinaweb/osinacore/.DS_Store index 1e846952..70c987c7 100644 Binary files a/osinaweb/osinacore/.DS_Store and b/osinaweb/osinacore/.DS_Store differ diff --git a/osinaweb/osinacore/__pycache__/decorators.cpython-310.pyc b/osinaweb/osinacore/__pycache__/decorators.cpython-310.pyc new file mode 100644 index 00000000..87de1714 Binary files /dev/null and b/osinaweb/osinacore/__pycache__/decorators.cpython-310.pyc differ diff --git a/osinaweb/osinacore/__pycache__/urls.cpython-310.pyc b/osinaweb/osinacore/__pycache__/urls.cpython-310.pyc index 9a24806e..8c95496c 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 76e5a3e4..c02a9b86 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__/views.cpython-310.pyc b/osinaweb/osinacore/add/__pycache__/views.cpython-310.pyc index d3c8d4e5..0e555e33 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/views.py b/osinaweb/osinacore/add/views.py index 18ee3ef9..6c0767c5 100644 --- a/osinaweb/osinacore/add/views.py +++ b/osinaweb/osinacore/add/views.py @@ -6,9 +6,10 @@ from django.urls import reverse from django.http import HttpResponseRedirect from datetime import date from django.http import JsonResponse +from osinacore.decorators import * - +@staff_login_required def add_status_modal(request, *args, **kwargs): if request.method == 'POST': text = request.POST.get('text') @@ -36,7 +37,7 @@ def add_status_modal(request, *args, **kwargs): -@login_required +@staff_login_required def add_customer(request): businesses = Business.objects.all().order_by('-id') references = Reference.objects.all().order_by('-id') @@ -89,7 +90,7 @@ def add_customer(request): -@login_required +@staff_login_required def add_business(request): business_types = BusinessType.objects.all().order_by('-id') if request.method == 'POST': @@ -136,7 +137,7 @@ def add_business(request): -@login_required +@staff_login_required def add_business_modal(request): if request.method == 'POST': name = request.POST.get('name') @@ -180,7 +181,7 @@ def add_business_modal(request): return render(request, 'add_templates/addbusiness-modal.html') -@login_required +@staff_login_required def add_staff(request): staffpositions = StaffPosition.objects.all().order_by('-id') if request.method == 'POST': @@ -224,7 +225,7 @@ def add_staff(request): -@login_required +@staff_login_required def add_project(request): staffs = StaffProfile.objects.all().order_by('-id') project_types = ProjectType.objects.all() @@ -279,6 +280,8 @@ def add_project(request): return render(request, 'add_templates/add-project.html', context) + +@staff_login_required def add_user_story_modal(request, project_id): project = get_object_or_404(Project, project_id=project_id) if request.method == 'POST': @@ -305,7 +308,7 @@ def add_user_story_modal(request, project_id): - +@staff_login_required def add_project_note_modal(request, project_id): project = get_object_or_404(Project, project_id=project_id) if request.method == 'POST': @@ -333,7 +336,7 @@ def add_project_note_modal(request, project_id): - +@staff_login_required def add_file_modal(request, *args, **kwargs): context = { @@ -350,7 +353,7 @@ def add_credential_modal(request, *args, **kwargs): -@login_required +@staff_login_required def add_task(request, project_id=None, requirement_id=None): project = None requirement = None @@ -430,7 +433,7 @@ def add_task(request, project_id=None, requirement_id=None): - +@staff_login_required def add_point_modal(request, task_id): task = get_object_or_404(Task, task_id=task_id) if request.method == 'POST': @@ -455,7 +458,7 @@ def add_point_modal(request, task_id): -@login_required +@staff_login_required def add_epic(request, project_id): project = get_object_or_404(Project, project_id=project_id) if request.method == 'POST': @@ -494,7 +497,7 @@ def add_epic(request, project_id): - +@staff_login_required def add_note_modal(request, *args, **kwargs): if request.method == 'POST': text = request.POST.get('note_text') @@ -516,6 +519,7 @@ def add_note_modal(request, *args, **kwargs): +@staff_login_required def add_daily_report(request): user = request.user today = date.today() @@ -546,7 +550,7 @@ def add_daily_report(request): return render(request, 'add_templates/add-daily-report.html', context) - +@staff_login_required def add_projecttype_modal(request, *args, **kwargs): if request.method == 'POST': name = request.POST.get('name') @@ -561,7 +565,7 @@ def add_projecttype_modal(request, *args, **kwargs): return render(request, 'add_templates/add-projecttype-modal.html') - +@staff_login_required def add_staffposition_modal(request): if request.method == 'POST': name = request.POST.get('name') @@ -577,7 +581,7 @@ def add_staffposition_modal(request): return render(request, 'add_templates/add-staffposition-modal.html') - +@staff_login_required def add_businesstype_modal(request, *args, **kwargs): if request.method == 'POST': name = request.POST.get('name') @@ -597,7 +601,7 @@ def add_businesstype_modal(request, *args, **kwargs): - +@staff_login_required def add_reference_modal(request, *args, **kwargs): if request.method == 'POST': name = request.POST.get('name') diff --git a/osinaweb/osinacore/api/__pycache__/views.cpython-310.pyc b/osinaweb/osinacore/api/__pycache__/views.cpython-310.pyc index edd06695..99bbfa5a 100644 Binary files a/osinaweb/osinacore/api/__pycache__/views.cpython-310.pyc and b/osinaweb/osinacore/api/__pycache__/views.cpython-310.pyc differ diff --git a/osinaweb/osinacore/decorators.py b/osinaweb/osinacore/decorators.py new file mode 100644 index 00000000..719cda1b --- /dev/null +++ b/osinaweb/osinacore/decorators.py @@ -0,0 +1,13 @@ +from functools import wraps +from django.shortcuts import redirect +from .models import * +def staff_login_required(view_func): + @wraps(view_func) + def _wrapped_view(request, *args, **kwargs): + # Check if the user is logged in and is a staff member + if not request.user.is_authenticated or not StaffProfile.objects.filter(user=request.user): + return redirect('signout') # Redirect to login URL if not staff + + return view_func(request, *args, **kwargs) + + return _wrapped_view diff --git a/osinaweb/osinacore/delete/__pycache__/views.cpython-310.pyc b/osinaweb/osinacore/delete/__pycache__/views.cpython-310.pyc index 8922dba1..8af339fb 100644 Binary files a/osinaweb/osinacore/delete/__pycache__/views.cpython-310.pyc and b/osinaweb/osinacore/delete/__pycache__/views.cpython-310.pyc differ diff --git a/osinaweb/osinacore/delete/views.py b/osinaweb/osinacore/delete/views.py index be206dc1..78549fd9 100644 --- a/osinaweb/osinacore/delete/views.py +++ b/osinaweb/osinacore/delete/views.py @@ -3,9 +3,10 @@ from osinacore.models import * from django.contrib.auth.decorators import login_required from django.urls import reverse from django.http import HttpResponseRedirect +from osinacore.decorators import * -@login_required +@staff_login_required def delete_customer_modal(request, customer_id): customer = get_object_or_404(CustomerProfile, id=customer_id) @@ -19,7 +20,7 @@ def delete_customer_modal(request, customer_id): return render(request, "delete_templates/delete-customer-modal.html", context) -@login_required +@staff_login_required def delete_business_modal(request, business_id): business = get_object_or_404(Business, id=business_id) @@ -32,8 +33,7 @@ def delete_business_modal(request, business_id): } return render(request, "delete_templates/delete-business-modal.html", context) - -@login_required +@staff_login_required def delete_staff_modal(request, staff_id): staff = get_object_or_404(StaffProfile, id=staff_id) @@ -47,7 +47,7 @@ def delete_staff_modal(request, staff_id): return render(request, "delete_templates/delete-staff-modal.html", context) -@login_required +@staff_login_required def delete_project_modal(request, project_id): project = get_object_or_404(Project, id=project_id) @@ -61,7 +61,7 @@ def delete_project_modal(request, project_id): return render(request, "delete_templates/delete-project-modal.html", context) -@login_required +@staff_login_required def delete_project_note_modal(request, note_id): note = get_object_or_404(Note, id=note_id) @@ -80,7 +80,7 @@ def delete_project_note_modal(request, note_id): -@login_required +@staff_login_required def delete_task_modal(request, task_id): task = get_object_or_404(Task, id=task_id) @@ -95,7 +95,7 @@ def delete_task_modal(request, task_id): -@login_required +@staff_login_required def delete_point_modal(request, point_id, task_id): task = get_object_or_404(Task, id=task_id) point = get_object_or_404(Point, id=point_id) @@ -110,7 +110,7 @@ def delete_point_modal(request, point_id, task_id): -@login_required +@staff_login_required def delete_task_point_modal(request, point_id, task_id): task = get_object_or_404(Task, id=task_id) point = get_object_or_404(Point, id=point_id) @@ -125,7 +125,7 @@ def delete_task_point_modal(request, point_id, task_id): -@login_required +@staff_login_required def delete_note_modal(request, note_id): note = get_object_or_404(Note, id=note_id) diff --git a/osinaweb/osinacore/edit/__pycache__/views.cpython-310.pyc b/osinaweb/osinacore/edit/__pycache__/views.cpython-310.pyc index 60ebec3c..18161255 100644 Binary files a/osinaweb/osinacore/edit/__pycache__/views.cpython-310.pyc and b/osinaweb/osinacore/edit/__pycache__/views.cpython-310.pyc differ diff --git a/osinaweb/osinacore/edit/views.py b/osinaweb/osinacore/edit/views.py index 41f02212..d6d9690f 100644 --- a/osinaweb/osinacore/edit/views.py +++ b/osinaweb/osinacore/edit/views.py @@ -4,9 +4,10 @@ from django.contrib.auth.decorators import login_required from django.http import HttpResponseRedirect from django.urls import reverse from django.http import HttpResponse +from osinacore.decorators import * -@login_required +@staff_login_required def edit_customer(request, customer_id): customer = get_object_or_404(CustomerProfile, customer_id=customer_id) @@ -60,7 +61,7 @@ def edit_customer(request, customer_id): -@login_required +@staff_login_required def edit_business(request, business_id): business = get_object_or_404(Business, business_id=business_id) business_types = BusinessType.objects.all().order_by('name') @@ -102,7 +103,7 @@ def edit_business(request, business_id): return render(request, 'edit_templates/edit-business.html', context) -@login_required +@staff_login_required def edit_staff(request, staff_id): staff = get_object_or_404(StaffProfile, staff_id=staff_id) positions = StaffPosition.objects.all().order_by('name') @@ -148,7 +149,7 @@ def edit_staff(request, staff_id): -@login_required +@staff_login_required def edit_project(request, project_id): project = get_object_or_404(Project, project_id=project_id) @@ -210,7 +211,7 @@ def edit_project(request, project_id): -@login_required +@staff_login_required def edit_task(request, task_id): task = get_object_or_404(Task, task_id=task_id) projects = Project.objects.all().order_by('-id') @@ -259,7 +260,7 @@ def edit_task(request, task_id): - +@staff_login_required def edit_task_status_modal(request, *, task_id): task = get_object_or_404(Task, task_id=task_id) @@ -280,7 +281,7 @@ def edit_task_status_modal(request, *, task_id): -@login_required +@staff_login_required def edit_epic(request, *args, **kwargs): context = { @@ -290,7 +291,7 @@ def edit_epic(request, *args, **kwargs): -@login_required +@staff_login_required def edit_project_type(request, projecttype_id): projecttype = get_object_or_404(ProjectType, id=projecttype_id) @@ -304,7 +305,7 @@ def edit_project_type(request, projecttype_id): return render(request, 'edit_templates/edit-project-type.html', {'projecttype': projecttype}) -@login_required +@staff_login_required def edit_staff_position(request): context = { @@ -316,7 +317,7 @@ def edit_staff_position(request): -@login_required +@staff_login_required def edit_business_type(request, businesstype_id): businesstype = get_object_or_404(BusinessType, id=businesstype_id) @@ -330,7 +331,7 @@ def edit_business_type(request, businesstype_id): return render(request, 'edit_templates/edit-business-type.html', {'businesstype': businesstype}) -@login_required +@staff_login_required def edit_reference(request, reference_id): reference = get_object_or_404(Reference, id=reference_id) @@ -345,7 +346,7 @@ def edit_reference(request, reference_id): -@login_required +@staff_login_required def edit_tag(request, tag_id): tag = get_object_or_404(Tag, id=tag_id) @@ -368,7 +369,7 @@ def edit_tag(request, tag_id): #Mark points -@login_required +@staff_login_required def mark_point_working_on(request, point_id, task_id): task = get_object_or_404(Task, id=task_id) point = get_object_or_404(Point, id=point_id) @@ -401,7 +402,7 @@ def mark_point_working_on(request, point_id, task_id): -@login_required +@staff_login_required def mark_point_working_on_task_page(request, point_id, task_id): task = get_object_or_404(Task, id=task_id) point = get_object_or_404(Point, id=point_id) @@ -431,7 +432,7 @@ def mark_point_working_on_task_page(request, point_id, task_id): -@login_required +@staff_login_required def mark_point_paused(request, point_id, task_id): task = get_object_or_404(Task, id=task_id) point = get_object_or_404(Point, id=point_id) @@ -457,7 +458,7 @@ def mark_point_paused(request, point_id, task_id): -@login_required +@staff_login_required def mark_point_paused_task_page(request, point_id, task_id): task = get_object_or_404(Task, id=task_id) point = get_object_or_404(Point, id=point_id) @@ -483,7 +484,7 @@ def mark_point_paused_task_page(request, point_id, task_id): -@login_required +@staff_login_required def mark_point_completed(request, point_id, task_id): task = get_object_or_404(Task, id=task_id) point = get_object_or_404(Point, id=point_id) @@ -524,7 +525,7 @@ def mark_point_completed(request, point_id, task_id): -@login_required +@staff_login_required def mark_point_completed_task_page(request, point_id, task_id): task = get_object_or_404(Task, id=task_id) point = get_object_or_404(Point, id=point_id) diff --git a/osinaweb/osinacore/templates/.DS_Store b/osinaweb/osinacore/templates/.DS_Store index a1d4d95f..97587ba8 100644 Binary files a/osinaweb/osinacore/templates/.DS_Store and b/osinaweb/osinacore/templates/.DS_Store differ diff --git a/osinaweb/osinacore/templates/customer_dashboard/customer_index.html b/osinaweb/osinacore/templates/customer_index.html similarity index 99% rename from osinaweb/osinacore/templates/customer_dashboard/customer_index.html rename to osinaweb/osinacore/templates/customer_index.html index f23628db..5e034347 100644 --- a/osinaweb/osinacore/templates/customer_dashboard/customer_index.html +++ b/osinaweb/osinacore/templates/customer_index.html @@ -1,4 +1,4 @@ -{% extends "customer_dashboard/customer_main.html" %} +{% extends "customer_main.html" %} {%load static%} {% block content %} diff --git a/osinaweb/osinacore/templates/customer_main.html b/osinaweb/osinacore/templates/customer_main.html new file mode 100644 index 00000000..0e47e9f3 --- /dev/null +++ b/osinaweb/osinacore/templates/customer_main.html @@ -0,0 +1,316 @@ +{% load static %} + + + +
+ + +My Projects
+Tickets
+Invoices
+Products
+Knowledgebase
+Contact Us
+Powered By OSITCOM
+Copyrights © 2024 All Rights Reserved
+{{request.user.first_name}} {{request.user.last_name}}
+ + +Invoices
+2
+Projects
+2
+Tickets
+2
+