You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

133 lines
7.2 KiB
Python

"""osinaweb URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/4.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
Including another URLconf
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from osinacore import views
from django.contrib.auth.decorators import login_required
from django.conf.urls.static import static
from django.conf import settings
urlpatterns = [
# Pages urls
path('admin/', admin.site.urls),
path('login', views.signin, name='signin'),
path('logout/', views.signout, name='signout'),
path('', login_required(views.home), name='home'),
path('my-projects/', login_required(views.my_projects), name='my-projects'),
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('add-business/', views.addbusiness, name='addbusiness'),
path('businesses/<str:business_id>/', views.businessdetails, name='businessdetails'),
path('businesses/', views.businesses, name='businesses'),
path('addstaff/', views.addstaff, name='adduser'),
path('staffs/', views.staffs, name='users'),
path('staffpositions/', views.staff_positions, name='staffpositions'),
path('projectdetails/<str:project_id>/', views.detailed_project, name='detailed-project'),
path('createproject/', views.create_project, name='createproject'),
path('createepic/<str:project_id>/', views.create_epic, name='createepic'),
path('createtask/', views.create_task, name='createtask'),
path('createtask/<str:project_id>/', views.createtask_project, name='createtaskproject'),
path('createtaskepic/', views.createtask_epic, name='createtaskepic'),
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('add-dailyreport/', views.add_daily_report, name='adddailyreport'),
#Detail pages urls
path('businesses/<str:business_id>/', views.businessdetails, name='businessdetails'),
path('customers/<str:customer_id>/', views.customerdetails, name='customerdetails'),
path('staffs/<str:staff_id>/', views.staffdetails, name='userdetails'),
path('tasks/<str:task_id>/', views.detailed_task, name='detailed-task'),
#Fetch urls
path('get_tasks/<int:epic_id>/', views.get_tasks, name='get_tasks'),
path('get_latest_epic/<int:project_id>/', views.get_latest_epic, name='get_latest_epic'),
#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/<str:task_id>/', views.update_status_modal, name='updatestatus'),
path('add-point/<str:task_id>/', views.add_point_modal, name='addpoint'),
path('show-points/<str:task_id>/', views.show_points_modal, name='showpoints'),
path('add-time/', views.add_time_modal, name='addtime'),
path('timeline/', views.timeline_modal, name='timeline'),
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'),
path('statusmobilemodal/', views.status_mobile_modal, name='statusmobilemodal'),
#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'),
path('save_task/', views.save_task, name='save_task'),
path('save_business/', views.save_business, name='save_business'),
path('save_business_modal/', views.save_business_modal, name='save_business_modal'),
path('save_customer/', views.save_customer, name='save_customer'),
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'),
path('save_staffposition/', views.save_staffposition, name='save_staffposition'),
path('save_dailyreport/', views.save_dailyreport, name='save_dailyreport'),
#Edit Pages
path('edit-project/<str:project_id>/', views.edit_project, name='editproject'),
path('edit-epic/', views.edit_epic, name='editepic'),
path('edit-task/<str:task_id>', views.edit_task, name='edittask'),
path('edit-customer/<str:customer_id>/', views.edit_customer, name='editcustomer'),
path('edit-business/<str:business_id>/', views.edit_business, name='editbusiness'),
path('edit-staff/<str:staff_id>/', views.edit_staff, name='editstaff'),
path('edit-projecttype/<int:projecttype_id>', views.edit_project_type, name='editprojecttype'),
path('edit-businesstype/<int:businesstype_id>', views.edit_business_type, name='editbusinesstype'),
path('edit-reference/<int:reference_id>', views.edit_reference, name='editreference'),
path('edit-tag/<int:tag_id>', views.edit_tag, name='edittag'),
path('edits-taffposition/', views.edit_staff_position, name='editstaffposition'),
path('mark_point_working_on/<int:point_id>/<str:task_id>/', views.mark_point_working_on, name='mark_point_working_on'),
path('mark_point_working_on_task_page/<int:point_id>/<str:task_id>/', views.mark_point_working_on_task_page, name='mark_point_working_on_task_page'),
path('mark_point_completed/<int:point_id>/<str:task_id>/', views.mark_point_completed, name='mark_point_completed'),
path('mark_point_completed_task_page/<int:point_id>/<str:task_id>/', views.mark_point_completed_task_page, name='mark_point_completed_task_page'),
#Fetch Urls
path('getupdatedlaststatus/', views.get_updated_last_status, name='getupdatedlaststatus'),
path('getupdatedactivities/', views.get_latest_activities, name='getupdatedactivities'),
]
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)