Skip to content

Commit

Permalink
Merge pull request #353 from YujithIsura/main
Browse files Browse the repository at this point in the history
fixed attendance dashboard issues
  • Loading branch information
YujithIsura authored May 15, 2024
2 parents c72caf7 + e4ab24c commit e81f7fe
Show file tree
Hide file tree
Showing 9 changed files with 2,315 additions and 467 deletions.
2 changes: 1 addition & 1 deletion campus/bffs/attendance/api/Dependencies.toml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ modules = [
[[package]]
org = "ballerina"
name = "http"
version = "2.8.5"
version = "2.8.6"
dependencies = [
{org = "ballerina", name = "auth"},
{org = "ballerina", name = "cache"},
Expand Down
2 changes: 1 addition & 1 deletion campus/bffs/profile/api/Dependencies.toml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ modules = [
[[package]]
org = "ballerina"
name = "http"
version = "2.8.5"
version = "2.8.6"
dependencies = [
{org = "ballerina", name = "auth"},
{org = "ballerina", name = "cache"},
Expand Down
4 changes: 2 additions & 2 deletions campus/bffs/profile/api/person_client.bal
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ public isolated client class GraphqlClient {
name_en
}
description
child_organizations {
}
child_organizations_for_dashboard {
id
name {
name_en
}
description
}
}
parent_organizations {
id
name {
Expand Down
7 changes: 7 additions & 0 deletions campus/bffs/profile/api/types.bal
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,13 @@ public type GetOrganizationResponse record {|
|} name;
string? description;
|}[]? child_organizations;
record {|
int? id;
record {|
string name_en;
|} name;
string? description;
|}[]? child_organizations_for_dashboard;
record {|
int? id;
record {|
Expand Down
Binary file modified campus/bffs/profile/graphql_client/schema.graphql
Binary file not shown.
2,330 changes: 2,095 additions & 235 deletions campus/bffs/profile/graphql_client/schema.json

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion campus/frontend/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"githubPullRequests.ignoredPullRequestBranches": [
"main"
]
],
"editor.formatOnSave": true,
"editor.formatOnPaste": true
}

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions campus/frontend/lib/data/person.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class Organization {
String? description;
var child_organizations = <Organization>[];
var parent_organizations = <Organization>[];
var child_organizations_for_dashboard = <Organization>[];
var people = <Person>[];
var organization_metadata = <OrganizationMetaData>[];

Expand All @@ -52,6 +53,7 @@ class Organization {
this.description,
this.child_organizations = const [],
this.parent_organizations = const [],
this.child_organizations_for_dashboard = const [],
this.people = const [],
this.organization_metadata = const[],
});
Expand All @@ -69,6 +71,10 @@ class Organization {
? List<Organization>.from(
json['parent_organizations'].map((x) => Organization.fromJson(x)))
: [],
child_organizations_for_dashboard: json['child_organizations_for_dashboard'] != null
? List<Organization>.from(
json['child_organizations_for_dashboard'].map((x) => Organization.fromJson(x)))
: [],
people: json['people'] != null
? List<Person>.from(json['people'].map((x) => Person.fromJson(x)))
: [],
Expand All @@ -89,6 +95,8 @@ class Organization {
List<dynamic>.from(child_organizations.map((x) => x.toJson())),
'parent_organizations':
List<dynamic>.from(parent_organizations.map((x) => x.toJson())),
'child_organizations_for_dashboard':
List<dynamic>.from(child_organizations_for_dashboard.map((x) => x.toJson())),
'people': List<dynamic>.from(people.map((x) => x.toJson())),
'organization_metadata':List<dynamic>.from(organization_metadata.map((x) => x.toJson()))
// if (employees != null) 'employees': List<dynamic>.from(employees!.map((x) => x.toJson())),
Expand Down Expand Up @@ -117,6 +125,7 @@ Future<Organization> fetchOrganization(int id) async {
}
}


Future<List<Person>> fetchOrganizationForAll(int id) async {
final uri = Uri.parse(
AppConfig.campusProfileBffApiUrl + '/student_list_by_parent_org_id')
Expand Down

0 comments on commit e81f7fe

Please sign in to comment.