Skip to content

Commit

Permalink
split the trranscriptsRemoved query into two parts, used css to modif…
Browse files Browse the repository at this point in the history
…y the location of the pencil icon, modified the message by the checkbox
  • Loading branch information
vungc authored Dec 6, 2024
1 parent c6af958 commit 3dafa2f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions app/logic/transcript.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,12 @@ def getTotalHours(username):
"""
Get the toal hours from events and courses combined.
"""
transcriptsRemoved = [program.program_id for program in ProgramBan.select().where((ProgramBan.user == username) and (ProgramBan.unbanNote.is_null(True)) and (ProgramBan.removeFromTranscript == 1))]
bannedAndTranscriptsRemoved = ProgramBan.select().where((ProgramBan.user == username) and (ProgramBan.unbanNote.is_null(True)) and (ProgramBan.removeFromTranscript == 1))
transcriptsRemovedIdList = [program.program_id for program in bannedAndTranscriptsRemoved]

eventHours = (EventParticipant.select(fn.SUM(EventParticipant.hoursEarned))
.join(Event, on=(EventParticipant.event == Event.id))
.where((EventParticipant.user == username) & (Event.program_id.not_in(transcriptsRemoved)))).scalar()
.where((EventParticipant.user == username) & (Event.program_id.not_in(transcriptsRemovedIdList)))).scalar()



Expand Down
2 changes: 1 addition & 1 deletion app/static/css/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -137,5 +137,5 @@ form {

.editIcon {
position: relative;
top: -2.6px;
top: -4px;
}
3 changes: 2 additions & 1 deletion app/static/js/userProfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ $(document).ready(function(){

function displayTranscriptStatus(programID) {
$('#transcriptStatus-' + programID).show();
$('#transcriptStatus-' + programID).css('color', blue);
$('#transcriptStatus-' + programID).text("Saved!");
$('#transcriptStatus-' + programID).css('color', 'blue');
//show for 0.5s and fade out last for 0.5s
setTimeout(function() {
$('#transcriptStatus-' + programID).fadeOut(500, function() {
Expand Down

0 comments on commit 3dafa2f

Please sign in to comment.