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

bug fixes #1561

Open
wants to merge 27 commits into
base: gad-3-final
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
b07ea3f
fix 1. order of files in inbox and outbox 2. order of files is mantai…
theoden42 Feb 19, 2024
402c8c4
fix login required on viewing file
theoden42 Feb 19, 2024
5c6ab07
fix create_file method so that subject and description are also accepted
theoden42 Feb 19, 2024
a4e01b3
add rest api for create file and view file
theoden42 Mar 3, 2024
3760068
add rest api for create, view and delete file
aish0749 Mar 3, 2024
a06d437
add rest api for inbox, outbox, history view
aish0749 Mar 3, 2024
2ab199e
add rest api for draft view, forward file
aish0749 Mar 4, 2024
e824b66
Merge remote-tracking branch 'upstream/gad-4'
theoden42 Mar 5, 2024
79ef20d
prevent student access of the filetracking module
theoden42 Mar 5, 2024
c3f14b7
add dropdown filtering based on reciever username and update notallow…
theoden42 Mar 5, 2024
a97f482
add option to unarchive files
theoden42 Mar 7, 2024
b0109b8
fix template for filetrackingnotallowed page
theoden42 Mar 7, 2024
586775a
fix attachments view in the history of the file
theoden42 Mar 7, 2024
b3c8f54
make the fields in draft view editable
theoden42 Mar 7, 2024
0dfdd3f
update the views
aish0749 Mar 10, 2024
2018781
Merge pull request #1 from aish0749/main
theoden42 Mar 10, 2024
acf82f8
merge updated changes in dashboard into the filetracking module.
theoden42 Mar 19, 2024
7f33e90
fix file sending and forwarding template to include designation autom…
theoden42 Mar 19, 2024
2f8813c
fix forward file view to include designations automatically
theoden42 Mar 19, 2024
808b4cf
support file uploading and other minor fixes
arminpatel Apr 2, 2024
21f4411
change docker and req
arminpatel Apr 2, 2024
4032140
Merge branch 'main' of https://github.com/theoden42/Fusion into gad-3…
arminpatel Apr 2, 2024
2677ecf
fts implementation in api and bug fixes
arminpatel Apr 14, 2024
a8c631f
Merge branch 'gad-3' of https://github.com/FusionIIIT/Fusion into gad…
arminpatel Apr 14, 2024
e41c09d
change requirements.txt
arminpatel Apr 14, 2024
a0ddb2d
add user_type enum
arminpatel Apr 14, 2024
3c601ff
bug fixes
arminpatel Apr 22, 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
Next Next commit
fix 1. order of files in inbox and outbox 2. order of files is mantai…
…ned in uniqueList function
theoden42 committed Feb 19, 2024
commit b07ea3f963bb86ee5afd678284097cf0ba7b0984
17 changes: 9 additions & 8 deletions FusionIIIT/applications/filetracking/sdk/methods.py
Original file line number Diff line number Diff line change
@@ -102,7 +102,7 @@ def view_inbox(username: str, designation: str, src_module: str) -> list:
receiver_id=recipient_object,
receive_design=user_designation,
file_id__src_module=src_module,
file_id__is_read=False)
file_id__is_read=False).order_by('receive_date');
received_files = [tracking.file_id for tracking in received_files_tracking]

# remove duplicate file ids (from sending back and forth)
@@ -131,7 +131,7 @@ def view_outbox(username: str, designation: str, src_module: str) -> list:
current_id=sender_ExtraInfo_object,
current_design=user_HoldsDesignation_object,
file_id__src_module=src_module,
file_id__is_read=False)
file_id__is_read=False).order_by('-receive_date')
sent_files = [tracking.file_id for tracking in sent_files_tracking]

# remove duplicate file ids (from sending back and forth)
@@ -141,9 +141,6 @@ def view_outbox(username: str, designation: str, src_module: str) -> list:
return sent_files_serialized.data


# need: view_archived, archive_file, (can get details of archived files by view_file, etc)
# view_drafts, create_draft, (delete_draft can be via delete_file),
# (forward_draft can be via forward_file, but lets implement a send draft that follows our remark convention)

def view_archived(username: str, designation: str, src_module: str) -> dict:
'''
@@ -348,8 +345,12 @@ def uniqueList(l: list) -> list:
This function is used to return a list with unique elements
O(n) time and space
'''
s = set(l)
unique_list = (list(s))
seen = set()
unique_list = []
for item in l:
if item not in seen:
unique_list.append(item)
seen.add(item)
return unique_list

def add_uploader_department_to_files_list(files: list) -> list:
@@ -402,4 +403,4 @@ def get_last_forw_tracking_for_user(file_id: int, username: str, designation: st
return last_tracking

def get_extra_info_object_from_id(id: int):
return ExtraInfo.objects.get(id=id)
return ExtraInfo.objects.get(id=id)