Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified FusionIIIT/Fusion/fusion.db
Binary file not shown.
18 changes: 9 additions & 9 deletions FusionIIIT/Fusion/routing.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from channels.routing import route
from notification_channels.consumers import add, disconnect, message
channel_routing = [
route("websocket.connect", add, path=r"/notifications/"),
# path="r^/(?P<room_name>[a-zA-Z0-9_]+)/$"),
route("websocket.disconnect", disconnect, path=r"/notifications/"),
route("websocket.receive", message, path=r"/notifications/"),
]
from channels.routing import route
#from notification_channels.consumers import add, disconnect, message

channel_routing = [
#route("websocket.connect", add, path=r"/notifications/"),
# path="r^/(?P<room_name>[a-zA-Z0-9_]+)/$"),
#route("websocket.disconnect", disconnect, path=r"/notifications/"),
#route("websocket.receive", message, path=r"/notifications/"),
]
1 change: 0 additions & 1 deletion FusionIIIT/Fusion/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@
'applications.filetracking',
'applications.finance_accounts',
'applications.health_center',
'notification_channels',
'applications.online_cms',
'applications.placement_cell',
'applications.scholarships',
Expand Down
52 changes: 11 additions & 41 deletions FusionIIIT/applications/eis/static/fusion/js/editProfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,48 +58,18 @@ function editFirst(){
}

function editStudent() {
var aboutSpan = $("#aboutSpan").text().trim();
var contactSpan = $("#contactSpan").text().trim();
var interestSpan = $("#interestSpan").text().trim();

var buttonValue = $("#editButton").val()

if(buttonValue == "Edit") {
$("#editButton").val("Save");

$("#contactInput").val(contactSpan);
$("#contactInput").show();
$("#contactSpan").hide();
$("#contactIcon").hide();
$("#editButton").hide();
$("#saveButton").show();

$("#aboutTextarea").val(aboutSpan);
$("#aboutTextarea").show();
$("#aboutSpan").hide();
$("#contactInput").show();
$("#contactSpan").hide();

$("#interestTextarea").val(interestSpan);
$("#interestTextarea").show();
$("#interestSpan").hide();
}
$("#aboutTextarea").show();
$("#aboutSpan").hide();

else if($("#editButton").val("Save")) {
$("#editButton").val("Edit");
$("#ageSpan").hide();
$("#ageInput").show();

var contactValue = $("#contactInput").val().trim();
$("#contactSpan").text(contactValue);
$("#contactInput").hide();
$("#contactSpan").show();
$("#contactIcon").show();

var aboutSpan = $("#aboutTextarea").val().trim();
$("#aboutSpan").text(aboutSpan);
$("#aboutTextarea").hide();
$("#aboutSpan").show();

var interestSpan = $("#interestTextarea").val().trim();
$("#interestSpan").text(interestSpan);
$("#interestTextarea").hide();
$("#interestSpan").show();


}
}
$("#addrSpan").hide();
$("#addrInput").show();
}
1 change: 1 addition & 0 deletions FusionIIIT/applications/globals/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
url(r'^$', views.index, name='index'),
url(r'^dashboard/$', views.dashboard, name='dashboard'),
url(r'^about/', views.about, name='about'),
url(r'^profile/', views.profile, name='profile'),
# Feedback and issues url
url(r'^feedback/$', views.feedback, name="feedback"),
url(r'^issue/$', views.issue, name="issue"),
Expand Down
10 changes: 6 additions & 4 deletions FusionIIIT/applications/globals/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,11 @@ def about(request):

@login_required(login_url=LOGIN_URL)
def dashboard(request):
return render(request, "dashboard/dashboard.html", {})


@login_required(login_url=LOGIN_URL)
def profile(request):
user = request.user
profile = get_object_or_404(ExtraInfo, Q(user=user))
if(str(request.user.extrainfo.user_type)=='faculty'):
Expand Down Expand Up @@ -870,14 +875,11 @@ def dashboard(request):
'patent': patent, 'form': form, 'form1': form1, 'form14': form14,
'form5': form5, 'form6': form6, 'form7': form7, 'form8': form8,
'form10':form10, 'form11':form11, 'form12':form12, 'current':current}
return render(request, "dashboard/dashboard.html", context)
return render(request, "globals/student_profile.html", context)
else:
context = {}
return render(request, "dashboard/dashboard.html", context)




@login_required(login_url=LOGIN_URL)
def logout_view(request):
logout(request)
Expand Down
20 changes: 10 additions & 10 deletions FusionIIIT/applications/health_center/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from django.shortcuts import render

from applications.globals.models import ExtraInfo
from notification_channels.models import Notification
#from notification_channels.models import Notification

from .models import (Ambulance_request, Appointment, Complaint, Constants,
Counter, Doctor, Expiry, Hospital, Hospital_admit,
Expand Down Expand Up @@ -73,17 +73,17 @@ def compounder_view(request):
active=True
)
a=User.objects.all()
for user in a:
Notification.objects.create(notif_type='healthcenter',recipient=user,action_verb='appoiinted',display_text='New Doctor has been appointed : Dr.'+doctor)
# for user in a:
# Notification.objects.create(notif_type='healthcenter',recipient=user,action_verb='appoiinted',display_text='New Doctor has been appointed : Dr.'+doctor)
data={'status':1}
return JsonResponse(data)
elif 'remove_doctor' in request.POST:
doctor=request.POST.get('doctor_active')
Doctor.objects.filter(id=doctor).update(active=False)
doc=Doctor.objects.get(id=doctor).doctor_name
a=User.objects.all()
for user in a:
Notification.objects.create(notif_type='healthcenter',recipient=user,action_verb='removed',display_text='Dr.'+doc+'will not be available from now')
# for user in a:
# Notification.objects.create(notif_type='healthcenter',recipient=user,action_verb='removed',display_text='Dr.'+doc+'will not be available from now')
data={'status':1}
return JsonResponse(data)
elif 'discharge' in request.POST:
Expand Down Expand Up @@ -128,8 +128,8 @@ def compounder_view(request):
Schedule.objects.filter(doctor_id=doctor_id, day=day).update(from_time=time_in)
Schedule.objects.filter(doctor_id=doctor_id, day=day).update(to_time=time_out)
a=User.objects.all()
for user in a:
Notification.objects.create(notif_type='healthcenter',recipient=user,action_verb='changed',display_text='Doctor Schedule has been changed')
# for user in a:
# Notification.objects.create(notif_type='healthcenter',recipient=user,action_verb='changed',display_text='Doctor Schedule has been changed')
data={'status':1}
return JsonResponse(data)
elif 'add_medicine' in request.POST:
Expand Down Expand Up @@ -176,7 +176,7 @@ def compounder_view(request):
)
user=user_id.user
hname=hospital_name.hospital_name
Notification.objects.create(notif_type='healthcenter',recipient=user,action_verb='admitted',display_text='You have been admitted in '+hname)
# Notification.objects.create(notif_type='healthcenter',recipient=user,action_verb='admitted',display_text='You have been admitted in '+hname)
data={'status':1}
return JsonResponse(data)
elif 'medicine_name' in request.POST:
Expand Down Expand Up @@ -320,7 +320,7 @@ def compounder_view(request):
'status': status,
'stock':stock
}
Notification.objects.create(notif_type='healthcenter',recipient=user.user,action_verb='prescribed',display_text='You have been prescribed for '+details)
# Notification.objects.create(notif_type='healthcenter',recipient=user.user,action_verb='prescribed',display_text='You have been prescribed for '+details)

return JsonResponse(data)
elif 'prescribe_b' in request.POST:
Expand Down Expand Up @@ -386,7 +386,7 @@ def compounder_view(request):
status=0

Medicine.objects.all().delete()
Notification.objects.create(notif_type='healthcenter',recipient=user.user,action_verb='prescribed',display_text='You have been prescribed for '+details)
# Notification.objects.create(notif_type='healthcenter',recipient=user.user,action_verb='prescribed',display_text='You have been prescribed for '+details)

data = {
'status': status
Expand Down
Empty file.
9 changes: 0 additions & 9 deletions FusionIIIT/notification_channels/admin.py

This file was deleted.

5 changes: 0 additions & 5 deletions FusionIIIT/notification_channels/apps.py

This file was deleted.

22 changes: 0 additions & 22 deletions FusionIIIT/notification_channels/consumers.py

This file was deleted.

24 changes: 0 additions & 24 deletions FusionIIIT/notification_channels/helpers.py

This file was deleted.

Loading