HH/apps/projects/urls.py
2026-04-19 10:53:12 +03:00

48 lines
2.6 KiB
Python

from django.urls import path
from . import ui_views
app_name = "projects"
urlpatterns = [
# QI Project Views
path("", ui_views.project_list, name="project_list"),
path("create/", ui_views.project_create, name="project_create"),
path("create/from-template/<uuid:template_pk>/", ui_views.project_create, name="project_create_from_template"),
path("<uuid:pk>/", ui_views.project_detail, name="project_detail"),
path("<uuid:pk>/edit/", ui_views.project_edit, name="project_edit"),
path("<uuid:pk>/delete/", ui_views.project_delete, name="project_delete"),
# Task Management (legacy project-level + new phase-level)
path("<uuid:project_pk>/tasks/add/", ui_views.task_create, name="task_create"),
path("<uuid:project_pk>/tasks/<uuid:task_pk>/edit/", ui_views.task_edit, name="task_edit"),
path("<uuid:project_pk>/tasks/<uuid:task_pk>/delete/", ui_views.task_delete, name="task_delete"),
path("<uuid:project_pk>/tasks/<uuid:task_pk>/toggle/", ui_views.task_toggle_status, name="task_toggle_status"),
# PDCA Phase Management
path("<uuid:pk>/pdca/<str:phase>/", ui_views.pdca_phase_detail, name="pdca_phase_detail"),
path("<uuid:pk>/pdca/<str:phase>/edit/", ui_views.pdca_phase_edit, name="pdca_phase_edit"),
path("<uuid:project_pk>/pdca/<str:phase>/tasks/add/", ui_views.task_create, name="phase_task_create"),
path("<uuid:project_pk>/pdca/<str:phase>/tasks/<uuid:task_pk>/edit/", ui_views.task_edit, name="phase_task_edit"),
path(
"<uuid:project_pk>/pdca/<str:phase>/tasks/<uuid:task_pk>/delete/",
ui_views.task_delete,
name="phase_task_delete",
),
path(
"<uuid:project_pk>/pdca/<str:phase>/tasks/<uuid:task_pk>/toggle/",
ui_views.task_toggle_status,
name="phase_task_toggle_status",
),
# Template Management
path("templates/", ui_views.template_list, name="template_list"),
path("templates/create/", ui_views.template_create, name="template_create"),
path("templates/<uuid:pk>/", ui_views.template_detail, name="template_detail"),
path("templates/<uuid:pk>/edit/", ui_views.template_edit, name="template_edit"),
path("templates/<uuid:pk>/delete/", ui_views.template_delete, name="template_delete"),
# Save Project as Template
path("<uuid:pk>/save-as-template/", ui_views.project_save_as_template, name="project_save_as_template"),
# Export
path("<uuid:pk>/export/excel/", ui_views.project_export_excel, name="project_export_excel"),
# PX Action Conversion
path("convert-action/<uuid:action_pk>/", ui_views.convert_action_to_project, name="convert_action"),
]