Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
f7b8ad1
Add new migration files
kumkum020704 Oct 16, 2024
cb7b74c
created api folder
Beastharsh970 Oct 17, 2024
b85b3d6
Added files in the scholarships/api directory
kumkum020704 Oct 17, 2024
d378779
previous winners api
Beastharsh970 Oct 20, 2024
c2f9721
Api Created for previous winners
Beastharsh970 Oct 20, 2024
1f45474
api made of previous winner and catalog
Beastharsh970 Oct 20, 2024
437d089
Merge pull request #2 from Beastharsh970/ac-5
kumkum020704 Oct 21, 2024
a93c937
Merge branch 'ac-5' of https://github.com/kumkum020704/Fusion into ac-5
kumkum020704 Oct 21, 2024
e9ad1e6
API's made for MCM & all three medals
PriyanshuXcoder Nov 10, 2024
11057f6
Merge pull request #3 from PriyanshuXcoder/ac-5
kumkum020704 Nov 10, 2024
4d59343
making APIs to check status
harshit-G51102 Nov 10, 2024
c91bee3
Merge remote-tracking branch 'upstream/ac-5' into ac-5
harshit-G51102 Nov 10, 2024
361b95c
Merge pull request #4 from harshit-G51102/ac-5
kumkum020704 Nov 12, 2024
6560a26
Merge remote-tracking branch 'origin/ac-5' into ac-5
kumkum020704 Nov 12, 2024
2c80be2
Your descriptive commit message
Beastharsh970 Nov 15, 2024
49ca36e
api for editing the catalog by convenor or assistant
Beastharsh970 Nov 15, 2024
2b4037b
Merge pull request #5 from Beastharsh970/ac-5
kumkum020704 Nov 15, 2024
419c328
Made API for showing the mcm entries to spacs convenor and assistant
PriyanshuXcoder Nov 15, 2024
8ccf060
Merge pull request #6 from PriyanshuXcoder/ac-5
kumkum020704 Nov 15, 2024
e412b1f
created apis for showing data of director silver and gold on clicking…
Beastharsh970 Nov 15, 2024
56303ff
api to view all applied application for director's gold to spacs conv…
Beastharsh970 Nov 15, 2024
11e6611
api created for invite application
Beastharsh970 Nov 15, 2024
dc372ee
Merge pull request #7 from Beastharsh970/ac-5
kumkum020704 Nov 16, 2024
875edb1
some other apis
Beastharsh970 Nov 16, 2024
a3c102f
Merge remote-tracking branch 'upstream/ac-5' into ac-5
Beastharsh970 Nov 16, 2024
5e42deb
Added API for Director_gold,Director Silver,MCM listing and MCM,direc…
PriyanshuXcoder Nov 16, 2024
0d4edbd
API for Director silver status update
PriyanshuXcoder Nov 16, 2024
fb2765a
Merge pull request #8 from PriyanshuXcoder/ac-5
kumkum020704 Nov 16, 2024
16911ad
Changed in views of Award and Scholarship
PriyanshuXcoder Nov 18, 2024
9f4593c
Merge pull request #9 from PriyanshuXcoder/ac-5
kumkum020704 Nov 18, 2024
950ca4a
Update scholarships URLs and add migration files
kumkum020704 Nov 18, 2024
8e81da6
Merge branch 'ac-5' of https://github.com/kumkum020704/Fusion into ac-5
kumkum020704 Nov 18, 2024
2cf35d7
fixing some bugs
harshit-G51102 Nov 19, 2024
ad6dc7c
Merge branch 'ac-5' of https://github.com/kumkum020704/Fusion into ac-5
harshit-G51102 Nov 19, 2024
86d1191
api created to get value from release table according to the name of …
Beastharsh970 Nov 19, 2024
5dbbbd8
mcm submission backend complete
harshit-G51102 Nov 19, 2024
8857076
mcm api complete
harshit-G51102 Nov 19, 2024
06cc172
Merge pull request #11 from harshit-G51102/ac-5
kumkum020704 Nov 19, 2024
b2fa27d
Merge pull request #10 from Beastharsh970/ac-5
kumkum020704 Nov 19, 2024
728720d
Merge remote-tracking branch 'upstream/ac-5' into ac-5
harshit-G51102 Nov 19, 2024
f37b9cc
Merge pull request #12 from harshit-G51102/ac-5
kumkum020704 Nov 19, 2024
2e4dc41
py
kumkum020704 Nov 20, 2024
a09645b
some bugs of convenor api's are solved
Beastharsh970 Nov 20, 2024
7abee8c
Merge remote-tracking branch 'upstream/ac-5' into ac-5
Beastharsh970 Nov 20, 2024
6f35b90
Merge pull request #13 from Beastharsh970/ac-5
kumkum020704 Nov 20, 2024
e359322
Merge branch 'ac-5' of https://github.com/kumkum020704/Fusion into ac-5
kumkum020704 Nov 20, 2024
412639b
migration files
kumkum020704 Jan 14, 2025
8eafe60
delete duplicate migrations
kumkum020704 Jan 14, 2025
7f069c5
Correct Migration files
AkashPaloju Feb 16, 2025
6e218c4
Remove unwanted changes
AkashPaloju Feb 17, 2025
d548e47
files api in backend (#14)
PriyanshuXcoder Feb 18, 2025
b9fdb6c
Merge remote-tracking branch 'upstream/ac-5' into ac-5
AkashPaloju Feb 18, 2025
f086415
make backend changes for convocation models and mcm
AkashPaloju Mar 14, 2025
84c7889
Add dm-proficiency apis
AkashPaloju Mar 14, 2025
a79c102
modify mcmstatus update view
AkashPaloju Mar 18, 2025
de42b4c
removed unnecessary lines
AkashPaloju Mar 20, 2025
ee2cafb
Delete migration files
AkashPaloju Mar 20, 2025
f164281
Merge remote-tracking branch 'upstream/dashboard_client' into ac-5
AkashPaloju Mar 20, 2025
945019a
Delete a migration file
AkashPaloju Mar 20, 2025
9d41c66
Add invite window feature
AkashPaloju Apr 16, 2025
af91b0d
Change status codes for an api
AkashPaloju Apr 16, 2025
7a890d6
Merge remote-tracking branch 'upstream/dashboard_client' into ac-5
AkashPaloju Apr 16, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def post(self, request, *args, **kwargs):
recipient_id = request.data.get('recipient')
type = request.data.get('type')
User = get_user_model()
recipient = User.objects.get(pk=recipient_id)
recipient = User.objects.get(username=recipient_id)
# Trigger the notification function
scholarship_portal_notif(sender, recipient, type)

Expand Down
62 changes: 21 additions & 41 deletions FusionIIIT/applications/scholarships/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,27 @@ def post(self, request):
return Response(serializer.data, status=status.HTTP_201_CREATED)
return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)

class CheckApplicationWindowView(APIView):
def post(self, request):
award_name = request.data.get('award')
current_date = datetime.date.today()

if not award_name:
return Response({'result': 'Failure', 'error': 'Award is a required field'}, status=status.HTTP_400_BAD_REQUEST)

try:
#Get all the rows with the award name
releases = Release.objects.filter(award=award_name)
except Release.DoesNotExist:
return Response({'result': 'Failure', 'message': 'No release found for the specified award'}, status=status.HTTP_200_OK)
for release in releases:
# Check if the current date is within the start and end dates of the release
if release.startdate <= current_date <= release.enddate:
return Response({'result': 'Success', 'message': 'Application window is open.'}, status=status.HTTP_200_OK)

# If the current date is outside the start and end dates
return Response({'result': 'Failure', 'message': 'Application window is closed.'}, status=status.HTTP_200_OK)

#This API is for editing the catalogue by convenor and assistant and saving in the database
class AwardAndScholarshipCreateView(APIView):
def post(self, request, pk=None):
Expand Down Expand Up @@ -418,47 +439,6 @@ def get(self, request):
serializer = DirectorSilverSerializer(director_silver_entries, many=True)
return Response(serializer.data, status=status.HTTP_200_OK)

class GetReleaseByAwardView(APIView):

def post(self, request, *args, **kwargs):
# Get the award name from the request
award_name = request.data.get('award')

# Check if the award variable is provided
if not award_name:
return Response(
{'result': 'Failure', 'error': 'Award is a required field'},
status=status.HTTP_400_BAD_REQUEST
)

# Fetch records from the Release table where the award matches
releases = Release.objects.filter(award=award_name)

# Check if any records were found
if releases.exists():
# Build the response data
data = []
for release in releases:
data.append({
'id': release.id,
'date_time': release.date_time,
'programme': release.programme,
'startdate': release.startdate,
'enddate': release.enddate,
'award': release.award,
'remarks': release.remarks,
'batch': release.batch,
'notif_visible': release.notif_visible,
})

return Response({'result': 'Success', 'data': data}, status=status.HTTP_200_OK)

# If no records found
return Response(
{'result': 'Failure', 'error': 'No releases found for the specified award'},
status=status.HTTP_404_NOT_FOUND
)

class McmDocumentsRetrieveView(APIView):
permission_classes = [IsAuthenticated]

Expand Down
5 changes: 4 additions & 1 deletion FusionIIIT/applications/scholarships/urls.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
from django.conf.urls import url
from django.urls import path, include
from rest_framework.routers import DefaultRouter
from django.urls import path, include
from rest_framework.routers import DefaultRouter

from . import views
from applications.scholarships.api.views import GetWinnersView
from applications.scholarships.api.views import create_award,McmUpdateView, McmRetrieveView, DirectorSilverRetrieveView,DirectorSilverUpdateView,DirectorGoldRetrieveView,DirectorGoldUpdateView,ProficiencyDmRetrieveView,ProficiencyDmUpdateView,AwardAndScholarshipCreateView,DirectorSilverMarksheetView,DirectorGoldMarksheetView
from applications.scholarships.api.views import create_award,McmUpdateView, McmRetrieveView, DirectorSilverRetrieveView,DirectorSilverUpdateView,DirectorGoldRetrieveView,DirectorGoldUpdateView,ProficiencyDmRetrieveView,ProficiencyDmUpdateView,AwardAndScholarshipCreateView,DirectorSilverMarksheetView,DirectorGoldMarksheetView, CheckApplicationWindowView
from applications.scholarships.api.views import ScholarshipDetailView,StudentDetailView,DirectorSilverDetailView,DirectorGoldDetailView,DirectorGoldListView,DMProficiencyListView,ReleaseCreateView,McmStatusUpdateView,DirectorSilverDecisionView,DMProficiencyDecisionView,DirectorGoldAcceptRejectView,DirectorSilverListView,GetReleaseByAwardView,McmDocumentsRetrieveView
# ,DirectorSilverAcceptRejectView

Expand Down Expand Up @@ -83,5 +85,6 @@
path('medals/marksheet/', DirectorSilverMarksheetView.as_view(), name='director_silver_marksheet'),
path('medals/marksheet/gold/', DirectorGoldMarksheetView.as_view(), name='director_gold_marksheet'),
path('dm-proficiency-list/', DMProficiencyListView.as_view(), name='proficiency-dm'),
path('check-application-window/', CheckApplicationWindowView.as_view(), name='check-application-window'),

]
4 changes: 3 additions & 1 deletion FusionIIIT/notification/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,8 @@ def scholarship_portal_notif(sender, recipient, type):
verb = "Your Mcm form has been accepted "
elif type == 'Reject_MCM':
verb = "Your Mcm form has been rejected as you have not fulfilled the required criteria "
elif type == 'MCM_UNDER_REVIEW':
verb = "Your Mcm form is under review"
elif type == 'Accept_Gold':
verb = "Your Convocation form for Director's Gold Medal has been accepted "
elif type == 'Reject_Gold':
Expand All @@ -310,7 +312,7 @@ def scholarship_portal_notif(sender, recipient, type):
verb = "Your Convocation form for Director's Silver Medal has been rejected "
elif type == 'Accept_DM':
verb = "Your Convocation form for D&M Proficiency Gold Medal has been accepted "
elif type == 'Reject_Silver':
elif type == 'Reject_DM':
verb = "Your Convocation form for D&M Proficiency Gold Medal has been rejected "
notify.send(sender=sender, recipient=recipient,
url=url, module=module, verb=verb)
Expand Down