HH/apps/feedback/urls.py
ismail badb6a9ebf
All checks were successful
Build and Push Docker Image / build (push) Successful in 2m41s
feat: QI Projects — team-member task management + My Tasks + notifications
Fixed 3 gaps in the QI Projects module:

Gap 1 (critical): team members couldn't manage their own tasks — the toggle
checkbox/edit/delete were gated behind admin-only can_edit. Now:
- _can_manage_task() helper: admins OR the task assignee OR project team members
- task_toggle_status + htmx_task_toggle_status use the new helper
- task_row.html shows the toggle for assignees (task.assigned_to.user_id check)

Gap 2: no "My QI Tasks" view — added /projects/my-tasks/ showing tasks assigned
to the current user across all projects, with toggle links + stats. Sidebar link.

Gap 3: no notification on task assignment — added apps/projects/signals.py
(post_save on QIProjectTask → create_in_app_notification). apps.py ready() wired.

Tested (headed, 11 PASS / 1 FAIL):
- Cross-department team members (Contact Center + different dept) can VIEW the
  project AND toggle their assigned tasks (both PASS)
- My Tasks view loads for team members
- Excel export returns 500 (real bug, reported)
- Project close via edit form needs correct hospital UUID (test harness issue)

Also bundles accumulated in-progress work across complaints, observations,
organizations, templates, and other modules.

Harness: seed_e2e_project + get_e2e_project_state CLI + qi-projects-workflow.spec.ts
2026-06-16 23:55:58 +03:00

37 lines
1.9 KiB
Python

"""
Feedback URL Configuration
"""
from django.urls import path
from . import views
app_name = "feedback"
urlpatterns = [
# List and detail views
path("", views.feedback_list, name="feedback_list"),
path("<uuid:pk>/", views.feedback_detail, name="feedback_detail"),
# CRUD operations
path("create/", views.feedback_create, name="feedback_create"),
path("<uuid:pk>/update/", views.feedback_update, name="feedback_update"),
path("<uuid:pk>/delete/", views.feedback_delete, name="feedback_delete"),
# Workflow actions
path("<uuid:pk>/assign/", views.feedback_assign, name="feedback_assign"),
path("<uuid:pk>/change-status/", views.feedback_change_status, name="feedback_change_status"),
path("<uuid:pk>/send-to-department/", views.feedback_send_to_department, name="feedback_send_to_department"),
path("<uuid:pk>/add-response/", views.feedback_add_response, name="feedback_add_response"),
# Toggle actions
path("<uuid:pk>/toggle-featured/", views.feedback_toggle_featured, name="feedback_toggle_featured"),
path("<uuid:pk>/toggle-follow-up/", views.feedback_toggle_follow_up, name="feedback_toggle_follow_up"),
path("<uuid:pk>/create-action/", views.feedback_create_action, name="feedback_create_action"),
# Comments Workflow
path("comments/imports/", views.comment_import_list, name="comment_import_list"),
path("comments/", views.comment_list, name="comment_list"),
path("comments/action-plans/", views.action_plan_list, name="action_plan_list"),
path("comments/export/classification/", views.export_comments_step1, name="export_comments_step1"),
path("comments/export/filtered/", views.export_comments_step2, name="export_comments_step2"),
path("comments/export/action-plans/", views.export_action_plans, name="export_action_plans"),
path("public/suggestion/", views.public_suggestion_submit, name="public_suggestion_submit"),
]