Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rspc 2025 1 #1461

Merged
merged 88 commits into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
5c61a54
GAD-5: Fix responsiveness (#1125)
Lawful2002 Feb 23, 2023
9a4fc4d
Merge branch 'main' into gad-5
akshatnema Mar 15, 2023
b295d7f
Merge branch 'main' into gad-5
akshatnema Mar 15, 2023
72e34e7
Merge branch 'main' into gad-5
akshatnema Mar 18, 2023
721ee82
Merge branch 'main' into gad-5
akshatnema Mar 19, 2023
91ef4e9
Merge branch 'main' into gad-5
akshatnema Mar 23, 2023
da49572
Merge branch 'main' into gad-5
akshatnema Mar 26, 2023
468b866
fix requirements and docker-compose
Aragorn-64 Jan 22, 2024
bed09cc
fix docker compose and dependencies
theoden42 Jan 23, 2024
d136718
fix merge conflicts
theoden42 Jan 23, 2024
10a5fec
add sdk and api folder structure
theoden42 Jan 23, 2024
b60770f
add sdk methods and fix some urls
theoden42 Jan 23, 2024
fe98b1d
update models for API
Aragorn-64 Jan 23, 2024
f6c5284
add urls for api
Aragorn-64 Jan 23, 2024
8ee2f6e
merge urls in api
Aragorn-64 Jan 23, 2024
d6917b8
Merge remote-tracking branch 'upstream/main'
Aragorn-64 Jan 23, 2024
726e6f1
add methods for viewing file, inbox, outbox, getting designation with…
theoden42 Jan 27, 2024
0bd4cb4
fix serializers and fix file attachment functionality in forward_file
theoden42 Jan 28, 2024
b36972c
sync with upstream
Aragorn-64 Jan 30, 2024
1631e25
add views and fix urls
theoden42 Jan 30, 2024
201185d
create file
Aragorn-64 Jan 30, 2024
18cdf15
Merge branch 'main' of https://github.com/theoden42/Fusion
Aragorn-64 Jan 30, 2024
a3c1d63
create file change
Aragorn-64 Jan 30, 2024
ef9105e
fix create_file, without upload_file feature
Aragorn-64 Jan 30, 2024
87dc61a
fix sdk forward_file : accept remarks
Aragorn-64 Jan 30, 2024
5ad97a7
add view_history in sdk
Aragorn-64 Jan 30, 2024
07f7d04
add blueprint for draft and archive methods to sdk
Aragorn-64 Feb 6, 2024
54845b1
fix FileHeaderSerializer to include id
Aragorn-64 Feb 6, 2024
30afd49
fix empty file upload error
Aragorn-64 Feb 6, 2024
55e8a74
fix inbox outbox methods to return unique ids
Aragorn-64 Feb 6, 2024
6ead47d
fix complete_flag to is_read
Aragorn-64 Feb 6, 2024
40815fd
fix inbox outbox methods to not show archived
Aragorn-64 Feb 6, 2024
d4bf291
add view_archived method to sdk
Aragorn-64 Feb 6, 2024
aea33d8
add archive_file method to sdk
Aragorn-64 Feb 6, 2024
66706c7
fix inbox and outbox output and add support for attachments
theoden42 Feb 12, 2024
ab0489d
add draft methods to sdk
Aragorn-64 Feb 12, 2024
423a2f9
fix default values of named params
Aragorn-64 Feb 12, 2024
cf2bbd5
fix merge conflicts
theoden42 Feb 12, 2024
c60098f
fix css for filetracking.html
Aragorn-64 Feb 15, 2024
1d27054
fix fts serializer.py
Aragorn-64 Feb 15, 2024
eff3142
add dept adding method to sdk
Aragorn-64 Feb 15, 2024
6eb1284
add helper methods to sdk
Aragorn-64 Feb 17, 2024
25f7174
fix inbox based on SDK
Aragorn-64 Feb 17, 2024
49f4a41
remove track from TabMenu
Aragorn-64 Feb 17, 2024
6d908b2
fix outbox using SDK
Aragorn-64 Feb 17, 2024
736ea3b
fix archive view for SDK
Aragorn-64 Feb 17, 2024
21c32d3
fix Drafts based on SDK
Aragorn-64 Feb 17, 2024
c4a66ba
fix the view file functionality in the web app
theoden42 Feb 18, 2024
086cb3c
fix frontend
Aragorn-64 Feb 18, 2024
ce5b4f3
fix .gitignore to untrack migrations
Aragorn-64 Feb 18, 2024
3d19ee8
database integration error resolved
SharanKumar06 Mar 3, 2024
a117a6e
merge conflicts resolved-1
SharanKumar06 Mar 3, 2024
90763ce
50% usecases implemented
SharanKumar06 Mar 3, 2024
f8447a3
Added new suggested usecases
KULADEEP1 Mar 10, 2024
fb2fb00
few changes made
KULADEEP1 Mar 11, 2024
f0c8308
hellooo
KULADEEP1 Mar 11, 2024
cf27da3
filetracking integraion-1
KULADEEP1 Mar 11, 2024
47af12c
GAD -5 Dashboard Changes (#1325)
BlackHAWK2001 Mar 11, 2024
ed642ee
dashboard and usercard updated (#1329)
Arpittak Mar 12, 2024
d40e94d
Fixing ui bugs (#1335)
SukulSarve Mar 17, 2024
55af051
file tracking updated
SharanKumar06 Mar 18, 2024
b932431
integration of updated dashboard
SharanKumar06 Mar 18, 2024
145ec51
dashboard modified
SharanKumar06 Mar 18, 2024
cf297f0
dashboard and fts integrated
SharanKumar06 Mar 18, 2024
c834069
Changes made 10/04
SharanKumar06 Apr 10, 2024
0ccb411
Changes made 10/04/24
SharanKumar06 Apr 10, 2024
ee342e0
merging with old
SharanKumar06 Apr 10, 2024
49b9ed6
changes after merge
SharanKumar06 Apr 10, 2024
6cb3a30
changes after merge 1
SharanKumar06 Apr 10, 2024
6ece1ba
dashboard edit
SharanKumar06 Apr 10, 2024
8046d05
Merge remote-tracking branch 'upstream/rspc' into rspc_2025_1
SharanKumar06 Apr 10, 2024
485eefe
All changes done
SharanKumar06 Apr 11, 2024
3755d36
All changes done 2
SharanKumar06 Apr 11, 2024
2975250
Merging done
SharanKumar06 Apr 11, 2024
99816bf
PR raise
SharanKumar06 Apr 11, 2024
793ae0f
error, login handling done
SharanKumar06 Apr 12, 2024
33780ef
functions created for better code understanding
SharanKumar06 Apr 12, 2024
c0ff4dc
fixed bugs as asked
SharanKumar06 Apr 12, 2024
1536fbb
all changes done
SharanKumar06 Apr 12, 2024
385b815
edited for better understanding
SharanKumar06 Apr 12, 2024
277c5da
edited for better understanding 3
SharanKumar06 Apr 12, 2024
e8e38dd
file tracking usage comments added
SharanKumar06 Apr 12, 2024
05d5818
Co-authored-by: KPR111 <[email protected]>
SharanKumar06 Apr 13, 2024
cec64f9
added .github and .idea
SharanKumar06 Apr 14, 2024
5bb11b9
final changes added
SharanKumar06 Apr 14, 2024
8a1639f
minor bugs fixed and notfication panel inserted
SharanKumar06 Apr 15, 2024
a1b8564
Merge remote-tracking branch 'upstream/rspc' into rspc_2025_1
SharanKumar06 Apr 15, 2024
0c40ac5
hardcoded lines removed
SharanKumar06 Apr 15, 2024
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
50 changes: 38 additions & 12 deletions FusionIIIT/applications/research_procedures/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ def add_projects(request):
# if designation != 'rspc_admin':
# messages.error(request, 'Only RSPC Admin can add projects')
# return redirect("/research_procedures")
if request.session.get('currentDesignationSelected') != 'rspc_admin':
messages.error(request, 'Only RSPC Admin can add projects')
return redirect("/research_procedures")

if request.method== "POST":
obj= request.POST
Expand All @@ -162,7 +165,6 @@ def add_projects(request):
# print(check[0].username)




check= get_obj_by_username_and_designation(pid, "Professor") #checking for pid to exist

Expand Down Expand Up @@ -237,7 +239,9 @@ def add_projects(request):
messages.success(request,"Project added successfully")
categories = category.objects.all()

notifs = request.user.notifications.all()
data = {
'notifications': notifs,
"pid": pid,
"years": list(range(1, int(years) + 1)),
"categories": categories,
Expand Down Expand Up @@ -357,7 +361,9 @@ def view_projects(request):
rspc_admin = HoldsDesignation.objects.get(designation__name="rspc_admin")
rspc_admin =rspc_admin.user.username
if request.user.username == rspc_admin:
data= {
notifs = request.user.notifications.all()
data = {
'notifications': notifs,
"projects": queryset,
"username": request.user.username,
}
Expand All @@ -384,7 +390,9 @@ def view_requests(request,id):
rspc_admin =rspc_admin.user.username
if request.user.username == rspc_admin :
queryset= rspc_inventory.objects.all()
data= {
notifs = request.user.notifications.all()
data = {
'notifications': notifs,
"requests": queryset,
"username": request.user.username
}
Expand Down Expand Up @@ -524,6 +532,9 @@ def financial_outlay_form(request,pid):

@login_required
def add_staff_details(request, pid):
if request.session.get('currentDesignationSelected') != 'rspc_admin':
messages.error(request, 'Only RSPC Admin can add staff details')
return redirect("/research_procedures")
if request.method == 'POST':
obj = request.POST
for key, value in obj.items():
Expand Down Expand Up @@ -662,10 +673,9 @@ def add_financial_outlay(request,pid):

@login_required
def inbox(request):
data1 = {}
if request.method == 'POST':
obj= request.POST
user_designation= obj.get('inbox_designation')

user_designation= request.session.get('currentDesignationSelected')

print(user_designation)
user_designation= get_designation_instance(user_designation)

Expand All @@ -688,7 +698,7 @@ def inbox(request):
"files": files
}
# print(data)
return render(request, "rs/inbox.html",context= data1)
return render(request, "rs/inbox.html",context= data1)



Expand All @@ -697,15 +707,20 @@ def add_staff_request(request,id):
if request.method == 'POST':
obj= request.POST
projectid = int(id)
receiver = obj.get('receiver')
receiver_designation = obj.get('receiver')



receiver_designation= get_designation_instance(receiver_designation)
receiver = get_user_by_designation(receiver_designation).username


sender = request.user.username
file_to_forward= request.FILES.get('file_to_forward')
project_instance=projects.objects.get(project_id=projectid)
receiver_instance=User.objects.get(username=receiver)
sender_designation= HoldsDesignation.objects.get(user= request.user).designation
receiver_designation = HoldsDesignation.objects.get(user= receiver_instance).designation
receiver_designation = receiver_designation

file_x= create_file(
uploader=sender,
Expand All @@ -714,7 +729,7 @@ def add_staff_request(request,id):
receiver_designation=receiver_designation,
src_module="research_procedures",
src_object_id= projectid,
file_extra_JSON= { "message": "Staff request added ("+ str(projectid)+ ")"},
file_extra_JSON= { "message": "Request Added." },
attached_file= file_to_forward,
)
messages.success(request,"request added successfully")
Expand Down Expand Up @@ -783,7 +798,12 @@ def update_financial_outlay(request,pid):


#post method
if(request.session.get('currentDesignationSelected') != 'rspc_admin'):
messages.error(request, 'Only RSPC Admin can update financial outlay')
return redirect("/research_procedures")

if request.method=="POST" :

obj = request.POST
financial_outlay_id = obj.get('financial_outlay_id')
# print("sdfkjsdfd")
Expand Down Expand Up @@ -825,6 +845,9 @@ def update_financial_outlay(request,pid):

@login_required
def approve_request(request,id):



if request.method == 'POST':
obj= request.POST
fileid = id
Expand Down Expand Up @@ -854,7 +877,9 @@ def approve_request(request,id):
def getDesignation(us):
user_inst = User.objects.get(username= us)

user_designation= HoldsDesignation.objects.get(user= user_inst).designation
user_designation= HoldsDesignation.objects.filter(user= user_inst)
if user_designation.exists():
user_designation= user_designation.first().designation.name

return user_designation

Expand Down Expand Up @@ -885,6 +910,7 @@ def get_obj_by_username_and_designation(username,designation):
return HoldsDesignation.objects.filter(user=user_instance, designation=designation_instance)






Expand Down
26 changes: 26 additions & 0 deletions FusionIIIT/templates/notifications/sidepanel.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{% load static %}
{% block sidepanel %}
{% load notifications_tags %}
{% for notice in notifications %}
{% if notice.unread %}
{% if notice.data.module == 'module_name' %}
<div class="ui icon message">
<i class="inbox icon"></i>
<div class="content">
<div class="header">
<a href="{% url 'notifications:mark_as_read_and_redirect' notice.slug %}">
{{ notice.data.module }}
</a>
</div>
<p>{{ notice.verb }}</p>
</div>
<div class="ui right floated">
<a href="{% url 'notifications:delete' notice.slug %}">
<i class="close icon"></i>
</a>
</div>
</div>
{% endif%}
{% endif %}
{% endfor %}
{% endblock %}
2 changes: 1 addition & 1 deletion FusionIIIT/templates/rs/display_inbox.html
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
<select id="receiver" name="receiver_designation" class="ui selection dropdown small">
<option value="dean_rspc">RSPC Dean</option>
<option value="rspc_admin">RSPC Admin</option>
<option value="HOD (CSE)">HOD (CSE)</option>
<option value="CSE HOD">HOD (CSE)</option>
<option value="HOD (ME)">HOD (ME)</option>
<option value="HOD (ECE)">HOD (ECE)</option>
<option value="HOD (Design)">HOD (Design)</option>
Expand Down
8 changes: 6 additions & 2 deletions FusionIIIT/templates/rs/display_view_project_info.html
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,13 @@
<div class="four wide field">
<label for="receiver">Select a role:</label>
<select id="receiver" name="receiver" class="ui selection dropdown">
<option value="ATULK">RSPC Dean</option>
<option value="dean_rspc">RSPC Dean</option>
<option value="rspc_admin">RSPC Admin</option>
<option value="HOD">Department HOD</option>
<option value="CSE HOD">HOD (CSE)</option>
<option value="HOD (ME)">HOD (ME)</option>
<option value="HOD (ECE)">HOD (ECE)</option>
<option value="HOD (Design)">HOD (Design)</option>
<option value="HOD (NS)">HOD (NS)</option>
<option value="Director">Director</option>
</select>
</div>
Expand Down
9 changes: 1 addition & 8 deletions FusionIIIT/templates/rs/menu_card.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,6 @@
<a class="item" href="/research_procedures/add_projects">Add Projects</a>
{% endif %}
<a class="item" href="/research_procedures/view_projects" >View Projects</a>
<!-- <a class="item" href="/research_procedures/inbox" >Inbox</a> -->
<form class="ui form" action="{% url 'research_procedures:inbox' %}" method="post" enctype="multipart/form-data">
{% csrf_token %}
<input type="text" style="display: none;" name="inbox_designation" value={{global_var}}>
<a class="item" href="/research_procedures/inbox" >Inbox</a>

<button class="item" type="submit" >Inbox</button>


</form>
{% endblock %}
3 changes: 3 additions & 0 deletions FusionIIIT/templates/rs/research.html
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@
{% comment %}The right-rail segment starts here!{% endcomment %}
<div class="three wide column">
<div class="row">
{% block sidepanel %}
{% include 'notifications/sidepanel.html' %}
{% endblock %}
{% comment %}
TODO: the right rail!
{% endcomment %}
Expand Down