1- from django . conf . urls import url , include
1+ # urls.py
22
3- from . import views
3+ # complaint/urls.py
4+ from django .urls import path
5+ from .views import (
6+ CheckUser ,
7+ UserComplaintView ,
8+ CaretakerFeedbackView ,
9+ SubmitFeedbackView ,
10+ ComplaintDetailView ,
11+ )
12+ from .views import (
13+ CaretakerLodgeView ,
14+ CaretakerView ,
15+ FeedbackCareView ,
16+ ResolvePendingView ,
17+ ComplaintDetailView ,
18+ SearchComplaintView ,
19+ SubmitFeedbackCaretakerView ,
20+ )
21+ from .views import (
22+ SupervisorLodgeView ,
23+ SupervisorView ,
24+ FeedbackSuperView ,
25+ CaretakerIdKnowMoreView ,
26+ SupervisorComplaintDetailView ,
27+ SupervisorResolvePendingView ,
28+ SupervisorSubmitFeedbackView ,
29+ )
30+
31+ from django .urls import path
32+ from .views import (
33+ RemoveWorkerView ,
34+ ForwardCompaintView ,
35+ DeleteComplaintView ,
36+ ChangeStatusView ,
37+ ChangeStatusSuperView ,
38+ GenerateReportView ,
39+ # Other imported views
40+ )
441
5- app_name = 'complaint'
642
7- urlpatterns = [
843
9- url (r'^$' , views .check , name = 'complaint' ),
10- # url(r'^login/$', views.login1, name='complaint'),
11- url (r'^user/$' , views .user ),
12- url (r'^user/caretakerfb/$' , views .caretaker_feedback ),
13- url (r'^user/(?P<complaint_id>[0-9]+)/$' , views .submitfeedback ),
14- url (r'^user/detail/(?P<detailcomp_id1>[0-9]+)/$' , views .detail ,name = 'detail' ),
15- # url(r'^user/check_complaint/$', views.save_comp),
16-
17- # caretaker
18- url (r'^caretaker/lodge/$' , views .caretakerlodge ),
19- url (r'^caretaker/$' , views .caretaker , name = 'caretaker' ),
20- url (r'^caretaker/feedback/(?P<feedcomp_id>[0-9]+)/$' , views .feedback_care ),
21- url (r'^caretaker/pending/(?P<cid>[0-9]+)/$' , views .resolvepending ),
22- url (r'^caretaker/detail2/(?P<detailcomp_id1>[0-9]+)/$' , views .detail ),
23- url (r'^caretaker/search_complaint$' , views .search_complaint ),
24- url (r'^caretaker/(?P<complaint_id>[0-9]+)/feedback/$' , views .submitfeedbackcaretaker ),
25-
26-
27- # supervisor
28- url (r'^supervisor/lodge/$' , views .supervisorlodge ),
29- url (r'^supervisor/$' , views .supervisor ),
30- url (r'^supervisor/feedback/(?P<feedcomp_id>[0-9]+)/$' , views .feedback_super ),
31- url (r'^supervisor/caretaker_id_know_more/(?P<caretaker_id>[0-9]+)/$' , views .caretaker_id_know_more ),
32- # url(r'^supervisor/caretaker_id_know_more/(?P<caretaker_id>[0-9]+)/complaint_reassign_super/(?P<iid>[0-9]+)/$', views.complaint_reassign_super, name = 'complaint_reassign_super'),
33- url (r'^supervisor/detail/(?P<detailcomp_id1>[0-9]+)/$' , views .detail3 , name = 'detail3' ),
34- url (r'^supervisor/pending/(?P<cid>[0-9]+)/$' , views .resolvependingsuper ),
35- url (r'^supervisor/(?P<complaint_id>[0-9]+)/$' , views .submitfeedbacksuper ),
36-
37-
38-
39- # CRUD task
40- url (r'^caretaker/worker_id_know_more/(?P<work_id>[0-9]+)/removew/$' , views .removew ),
41- url (r'^caretaker/(?P<comp_id1>[0-9]+)/$' , views .assign_worker ,name = 'assign_worker' ),
42- url (r'^caretaker/deletecomplaint/(?P<comp_id1>[0-9]+)/$' , views .deletecomplaint ),
43- # url(r'^caretaker/(?P<comp_id>[0-9]+)/$', views.assign_worker),
44- url (r'^caretaker/(?P<complaint_id>[0-9]+)/(?P<status>[0-9]+)/$' , views .changestatus ),
45- url (r'^supervisor/(?P<complaint_id>[0-9]+)/(?P<status>[0-9]+)/$' , views .changestatussuper ),
44+ app_name = "complaint"
4645
47- url (r'^api/' ,include ('applications.complaint_system.api.urls' ))
46+ urlpatterns = [
47+ path ("" , CheckUser .as_view (), name = "complaint" ),
48+ path ("user/" , UserComplaintView .as_view (), name = "user-complaints" ),
49+ path ("user/caretakerfb/" , CaretakerFeedbackView .as_view (), name = "caretaker-feedback" ),
50+ path ("user/<int:complaint_id>/" , SubmitFeedbackView .as_view (), name = "submit-feedback" ),
51+ path ("user/detail/<int:detailcomp_id1>/" , ComplaintDetailView .as_view (), name = "detail" ),
52+ # Other URL patterns
53+ path ('caretaker/lodge/' , CaretakerLodgeView .as_view ()), # Converted to DRF
54+ path ('caretaker/' , CaretakerView .as_view (), name = 'caretaker' ), # Converted to DRF
55+ path ('caretaker/feedback/<int:feedcomp_id>/' , FeedbackCareView .as_view ()), # Converted to DRF
56+ path ('caretaker/pending/<int:cid>/' , ResolvePendingView .as_view ()), # Converted to DRF
57+ path ('caretaker/detail2/<int:detailcomp_id1>/' , ComplaintDetailView .as_view ()), # Converted to DRF
58+ path ('caretaker/search_complaint' , SearchComplaintView .as_view ()), # Converted to DRF
59+ path ('caretaker/<int:complaint_id>/feedback/' , SubmitFeedbackCaretakerView .as_view ()), # Converted to DRF
60+ # Supervisor URLs
61+ path ('supervisor/lodge/' , SupervisorLodgeView .as_view ()),
62+ path ('supervisor/' , SupervisorView .as_view ()),
63+ path ('supervisor/feedback/<int:feedcomp_id>/' , FeedbackSuperView .as_view ()),
64+ path ('supervisor/caretaker_id_know_more/<int:caretaker_id>/' , CaretakerIdKnowMoreView .as_view ()),
65+ # The following URL is commented out as per the original code
66+ # path('supervisor/caretaker_id_know_more/<int:caretaker_id>/complaint_reassign_super/<int:iid>/', views.complaint_reassign_super, name='complaint_reassign_super'),
67+ path ('supervisor/detail/<int:detailcomp_id1>/' , SupervisorComplaintDetailView .as_view (), name = 'detail3' ),
68+ path ('supervisor/pending/<int:cid>/' , SupervisorResolvePendingView .as_view ()),
69+ path ('supervisor/<int:complaint_id>/' , SupervisorSubmitFeedbackView .as_view ()),
70+ # CRUD task URLs
71+ path ('caretaker/worker_id_know_more/<int:work_id>/removew/' , RemoveWorkerView .as_view ()),
72+ path ('caretaker/<int:comp_id1>/' , ForwardCompaintView .as_view (), name = 'assign_worker' ),
73+ path ('caretaker/deletecomplaint/<int:comp_id1>/' , DeleteComplaintView .as_view ()),
74+ path ('caretaker/<int:complaint_id>/<str:status>/' , ChangeStatusView .as_view ()),
75+ path ('supervisor/<int:complaint_id>/<str:status>/' , ChangeStatusSuperView .as_view ()),
4876
77+ path ('generate-report/' , GenerateReportView .as_view (), name = 'generate-report-api' ),
4978]
0 commit comments