Skip to content

Commit

Permalink
Merge pull request #110 from avinyafoundation/main
Browse files Browse the repository at this point in the history
Attendance dashboard completed
  • Loading branch information
YujithIsura authored Jan 20, 2024
2 parents 51cb2be + bd0f6ff commit 3088531
Show file tree
Hide file tree
Showing 6 changed files with 1,095 additions and 23 deletions.
1 change: 1 addition & 0 deletions api/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
target
Dependencies.toml
37 changes: 37 additions & 0 deletions api/activity_participant_attendance_missed_by_security_data.bal
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
public isolated service class ActivityParticipantAttendanceMissedBySecurityData {
private ActivityParticipantAttendanceMissedBySecurity activity_participant_attendance_missed_by_security = {
sign_in_time: "",
description: "",
digital_id: ""
};

isolated function init(ActivityParticipantAttendanceMissedBySecurity? activity_participant_attendance_missed_by_security = null) returns error? {
if(activity_participant_attendance_missed_by_security != null) { // if activity_participant_attendance is provided, then use that and do not load from DB
self.activity_participant_attendance_missed_by_security = activity_participant_attendance_missed_by_security.cloneReadOnly();
return;
}

}


isolated resource function get sign_in_time() returns string? {
lock {
return self.activity_participant_attendance_missed_by_security.sign_in_time;
}
}

isolated resource function get description() returns string? {
lock {
return self.activity_participant_attendance_missed_by_security.description;
}
}

isolated resource function get digital_id() returns string? {
lock {
return self.activity_participant_attendance_missed_by_security.digital_id;
}
}



}
51 changes: 51 additions & 0 deletions api/daily_activity_participant_attendance_by_parent_org_data.bal
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
public isolated service class DailyActivityParticipantAttendanceByParentOrgData {
private DailyActivityParticipantAttendanceByParentOrg daily_activity_participant_attendance_by_parent_org = {
description: "",
present_count: -1,
svg_src : "",
color : "",
total_student_count : -1
};

isolated function init(DailyActivityParticipantAttendanceByParentOrg? daily_activity_participant_attendance_by_parent_org = null) returns error? {
if(daily_activity_participant_attendance_by_parent_org != null) { // if activity_participant_attendance is provided, then use that and do not load from DB
self.daily_activity_participant_attendance_by_parent_org = daily_activity_participant_attendance_by_parent_org.cloneReadOnly();
return;
}

}


isolated resource function get description() returns string? {
lock {
return self.daily_activity_participant_attendance_by_parent_org.description;
}
}

isolated resource function get present_count() returns int? {
lock {
return self.daily_activity_participant_attendance_by_parent_org.present_count;
}
}

isolated resource function get total_student_count() returns int? {
lock {
return self.daily_activity_participant_attendance_by_parent_org.total_student_count;
}
}


isolated resource function get svg_src() returns string? {
lock {
return self.daily_activity_participant_attendance_by_parent_org.svg_src;
}
}

isolated resource function get color() returns string? {
lock {
return self.daily_activity_participant_attendance_by_parent_org.color;
}
}


}
Loading

0 comments on commit 3088531

Please sign in to comment.