Skip to content

Commit e77f811

Browse files
committed
mend
1 parent fc9f8ef commit e77f811

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+4482
-829
lines changed

.gitignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ __pycache__/
33
*.py[cod]
44
*$py.class
55

6-
fusion.db
6+
77
# C extensions
88
*.so
99

1010

1111
# db file
12-
*.db
12+
1313

1414

1515
# Distribution / packaging
@@ -30,6 +30,9 @@ var/
3030
.installed.cfg
3131
*.egg
3232

33+
# Swap files
34+
*.swp
35+
3336
# PyInstaller
3437
# Usually these files are written by a python script from a template
3538
# before PyInstaller builds the exe, so as to inject date/other infos into it.

.gitignore.swp

-12 KB
Binary file not shown.

FusionIIIT/Fusion/fusion.db

7.28 MB
Binary file not shown.

FusionIIIT/applications/complaint_system/models.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ class Caretaker(models.Model):
3434
staff_id = models.ForeignKey(ExtraInfo, on_delete=models.CASCADE)
3535
area = models.CharField(choices=Constants.AREA, max_length=20, default='hall-3')
3636
rating = models.IntegerField(default=0)
37+
myfeedback = models.CharField(max_length=400, default='this is my feedback')
38+
# no_of_comps = models.CharField(max_length=1000)
3739

3840
def __str__(self):
3941
return str(self.id) + '-' + self.area
@@ -42,7 +44,7 @@ def __str__(self):
4244
class Workers(models.Model):
4345
caretaker_id = models.ForeignKey(Caretaker, on_delete=models.CASCADE)
4446
name = models.CharField(max_length=50)
45-
age = models.CharField(max_length=100)
47+
age = models.CharField(max_length=10)
4648
phone = models.BigIntegerField(blank=True)
4749
worker_type = models.CharField(choices=Constants.COMPLAINT_TYPE,
4850
max_length=20, default='internet')
@@ -66,6 +68,8 @@ class StudentComplain(models.Model):
6668
reason = models.CharField(max_length=100, blank=True, default="None")
6769
feedback = models.CharField(max_length=500, blank=True)
6870
worker_id = models.ForeignKey(Workers, blank=True, null=True)
71+
upload_complaint = models.FileField(blank=True)
72+
6973

7074
def __str__(self):
7175
return str(self.complainer.user.username)
25.5 KB
Loading
29.2 KB
Loading

FusionIIIT/applications/complaint_system/static/complaint_system/js/rating.js

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,108 @@
88
*
99
*/
1010

11+
12+
$(document).ready(function(){
13+
console.log("TTTTTTTT")
14+
});
15+
16+
// function back_to_manage_worker(event){
17+
// event.preventDefault();
18+
// $('input[name="complaint_type"]').val(null);
19+
// $('input[name="name"]').val(null);
20+
// $('input[name="phone_no"]').val(null);
21+
// $('input[name="age"]').val(null);
22+
23+
// complaint_type = $('input[name="complaint_type"]').val();
24+
// name = $('input[name="name"]').val();
25+
// phone_no = $('input[name="phone_no"]').val();
26+
// age = $('input[name="age"]').val();
27+
28+
29+
30+
31+
32+
33+
34+
// $.ajax({
35+
// type: 'POST',
36+
// url: '/complaint/caretaker/',
37+
// data: {
38+
// 'complaint_type' : complaint_type,
39+
// 'name' : name,
40+
// // 'csrfmiddlewaretoken': csrfmiddlewaretoken,
41+
// 'phone_no' : phone_no,
42+
// 'age' : age,
43+
44+
// },
45+
// success: function(data) {
46+
// alertModal(" Your attempt to add the worker has been cancelled");
47+
// console.log("it reached here");
48+
// setTimeout(function() {
49+
// window.location.replace('http://localhost:8000/complaint');
50+
// }, 1500);
51+
// },
52+
// error: function(data, err) {
53+
// alertModal('Something went wrong! Please retry');
54+
// console.log(err);
55+
// }
56+
// });
57+
// };
58+
59+
60+
61+
// function addwork(event) {
62+
// event.preventDefault();
63+
64+
// complaint_type = $('input[name="complaint_type"]').val();
65+
// name = $('input[name="name"]').val();
66+
// phone_no = $('input[name="phone_no"]').val();
67+
// age = $('input[name="age"]').val();
68+
// str_phone_no=phone_no.toString();
69+
70+
// if (str_phone_no.length == 10){
71+
// alertModal ('Oops! The Phone Number Should Be Of 10 Digits');
72+
// return;
73+
// }
74+
75+
// if (str_phone_no.charAt(0) != '9' || str_phone_no.charAt(0) != '8' || str_phone_no.charAt(0) != '7') {
76+
// alertModal ('Phone Number should begin with 9,8 or 7');
77+
// return;
78+
// }
79+
80+
// if (age < 20 || age > 50) {
81+
// alertModal ("Oops! Age of the worker should be between 20 and 50.");
82+
// return;
83+
// }
84+
85+
86+
87+
// $.ajax({
88+
// type: 'POST',
89+
// url: '/complaint/caretaker/',
90+
// data: {
91+
// 'complaint_type' : complaint_type,
92+
// 'name' : name,
93+
// // 'csrfmiddlewaretoken': csrfmiddlewaretoken,
94+
// 'phone_no' : phone_no,
95+
// 'age' : age,
96+
97+
// },
98+
// success: function(data) {
99+
// alertModal(" Congratulations! The Worker has been added successfully\n Please wait for confirmation");
100+
// console.log("it reached here");
101+
// setTimeout(function() {
102+
// window.location.replace('http://localhost:8000/complaint');
103+
// }, 1500);
104+
// },
105+
// error: function(data, err) {
106+
// alertModal('Something went wrong! Please refill the form');
107+
// console.log(err);
108+
// }
109+
// });
110+
// };
111+
112+
11113
;(function ($, window, document, undefined) {
12114

13115
"use strict";

FusionIIIT/applications/complaint_system/urls.py

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,33 @@
77
urlpatterns = [
88

99
url(r'^$', views.check, name='complaint'),
10-
# url(r'^login/$', views.login1, name='complaint'),
10+
# url(r'^login/$', views.login1, name='complaint'),
1111
url(r'^user/$', views.user),
12+
13+
url(r'^user/caretakerfb/$' , views.caretaker_feedback),
14+
1215
url(r'^user/(?P<complaint_id>[0-9]+)/$', views.submitfeedback),
1316
url(r'^user/detail/(?P<detailcomp_id1>[0-9]+)/$', views.detail),
14-
url(r'^user/check_complaint/$', views.save_comp),
15-
url(r'^caretaker/$', views.caretaker),
17+
# url(r'^user/check_complaint/$', views.save_comp),
18+
url(r'^caretaker/$', views.caretaker, name='caretaker'),
19+
url(r'^caretaker/feedback/(?P<feedcomp_id>[0-9]+)/$', views.feedback_care),
20+
# url(r'^caretaker/discharge_worker/(?P<wid>[0-9]+)/from_complaint/(?P<cid>[0-9]+)/$', views.discharge_worker),
21+
url(r'^caretaker/worker_id_know_more/(?P<wid>[0-9]+)/complaint_reassign/(?P<cid>[0-9]+)/discharge_worker/$', views.discharge_worker),
22+
url(r'^caretaker/worker_id_know_more/(?P<work_id>[0-9]+)/$', views.worker_id_know_more, name='come_back_to_this'),
23+
url(r'^caretaker/worker_id_know_more/(?P<wid>[0-9]+)/complaint_reassign/(?P<iid>[0-9]+)/$', views.complaint_reassign),
24+
#url(r'^caretaker/list_caretakers_area/$', views.caretaker, name='caretaker'),
25+
url(r'^caretaker/pending/(?P<cid>[0-9]+)/$', views.resolvepending),
1626
url(r'^caretaker/detail2/(?P<detailcomp_id1>[0-9]+)/$', views.detail2),
1727
url(r'^caretaker/search_complaint$', views.search_complaint),
1828
url(r'^supervisor/$', views.supervisor),
29+
url(r'^supervisor/feedback/(?P<feedcomp_id>[0-9]+)/$', views.feedback_super),
30+
url(r'^supervisor/caretaker_id_know_more/(?P<caretaker_id>[0-9]+)/$', views.caretaker_id_know_more),
31+
url(r'^supervisor/caretaker_id_know_more/(?P<caretaker_id>[0-9]+)/complaint_reassign_super/(?P<iid>[0-9]+)/$', views.complaint_reassign_super),
1932
url(r'^supervisor/detail3/(?P<detailcomp_id1>[0-9]+)/$', views.detail3),
20-
url(r'^caretaker/removew/(?P<work_id>[0-9]+)/$', views.removew),
33+
url(r'^caretaker/worker_id_know_more/(?P<work_id>[0-9]+)/removew/$', views.removew),
2134
url(r'^caretaker/(?P<comp_id1>[0-9]+)/$', views.assign_worker),
2235
url(r'^caretaker/deletecomplaint/(?P<comp_id1>[0-9]+)/$', views.deletecomplaint),
23-
url(r'^home/(?P<comp_id>[0-9]+)/$', views.assign_worker),
36+
url(r'^caretaker/(?P<comp_id>[0-9]+)/$', views.assign_worker),
2437
url(r'^caretaker/(?P<complaint_id>[0-9]+)/(?P<status>[0-9]+)/$', views.changestatus),
2538

2639

0 commit comments

Comments
 (0)