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

student enrollment changes added #468

Merged
merged 37 commits into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
e75e1a5
fetch classes api function bug fixed
lahirulakruwan Nov 5, 2024
7c1ef3e
Merge remote-tracking branch 'upstream/main'
lahirulakruwan Nov 5, 2024
7a94f52
Merge pull request #449 from lahirulakruwan/main
YujithIsura Nov 5, 2024
c045325
Toast message added for monthly leave dates picker
lahirulakruwan Nov 6, 2024
53d985c
Merge remote-tracking branch 'upstream/main'
lahirulakruwan Nov 6, 2024
965653e
Merge pull request #451 from lahirulakruwan/main
YujithIsura Nov 6, 2024
5f2239e
lint
YujithIsura Nov 6, 2024
fb086b8
Merge remote-tracking branch 'upstream/main'
YujithIsura Nov 6, 2024
40527f4
Added Monthly payment amount by organization api fetch function
lahirulakruwan Nov 8, 2024
8e8ed09
Merge remote-tracking branch 'upstream/main'
lahirulakruwan Nov 8, 2024
5a3c17b
Merge pull request #453 from lahirulakruwan/main
YujithIsura Nov 8, 2024
64ded91
fixed attendance dashboard class loading issue
YujithIsura Nov 8, 2024
22471db
Merge remote-tracking branch 'upstream/main'
YujithIsura Nov 8, 2024
488a68b
batch selection feture added for bulk attendance marker
YujithIsura Nov 8, 2024
e206e25
Merge pull request #454 from YujithIsura/main
YujithIsura Nov 8, 2024
7cf3e80
Batch select changes added to frontend late attendance report and mon…
lahirulakruwan Nov 21, 2024
ee37a5a
Merge pull request #455 from lahirulakruwan/main
YujithIsura Nov 22, 2024
c585e09
mobile app version updated
YujithIsura Dec 11, 2024
97f611c
student update error fixed in enrollment
YujithIsura Dec 20, 2024
5051319
Merge pull request #458 from YujithIsura/main
YujithIsura Dec 20, 2024
02e66b0
lint
YujithIsura Dec 20, 2024
499ca21
lint
YujithIsura Dec 20, 2024
d75d19e
Merge pull request #460 from YujithIsura/main
YujithIsura Dec 20, 2024
0e961b2
enrollment update and insert bug fixed
YujithIsura Jan 2, 2025
a6ca5db
Merge remote-tracking branch 'upstream/main'
YujithIsura Jan 2, 2025
31a77c6
Merge pull request #462 from YujithIsura/main
YujithIsura Jan 2, 2025
92ff9e0
Student File upload changes added
lahirulakruwan Jan 3, 2025
8bd287b
Merge remote-tracking branch 'upstream/main'
lahirulakruwan Jan 3, 2025
954f0e6
Merge pull request #464 from lahirulakruwan/main
YujithIsura Jan 3, 2025
9ba4ef2
bug fixed in avinya type of student update
YujithIsura Jan 6, 2025
51b708d
student file upload WIP
YujithIsura Jan 6, 2025
f4ef1f1
Merge remote-tracking branch 'upstream/main'
YujithIsura Jan 6, 2025
da38831
Merge pull request #465 from YujithIsura/main
YujithIsura Jan 6, 2025
9e3446f
Class icons added to the icon folder
lahirulakruwan Jan 9, 2025
b2831b5
Merge remote-tracking branch 'upstream/main'
lahirulakruwan Jan 9, 2025
0b4b1ae
Student document upload api changes added
lahirulakruwan Jan 21, 2025
69124a5
Merge pull request #467 from lahirulakruwan/main
YujithIsura Jan 22, 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
8 changes: 4 additions & 4 deletions campus/bffs/attendance/api/Dependencies.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ distribution-version = "2201.8.7"
[[package]]
org = "avinyafoundation"
name = "campus_attendance_bff"
version = "1.1.0"
version = "2.1.0"
dependencies = [
{org = "ballerina", name = "graphql"},
{org = "ballerina", name = "http"},
Expand Down Expand Up @@ -108,7 +108,7 @@ modules = [
[[package]]
org = "ballerina"
name = "http"
version = "2.10.17"
version = "2.10.19"
dependencies = [
{org = "ballerina", name = "auth"},
{org = "ballerina", name = "cache"},
Expand Down Expand Up @@ -140,7 +140,7 @@ modules = [
[[package]]
org = "ballerina"
name = "io"
version = "1.6.1"
version = "1.6.3"
dependencies = [
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "lang.value"}
Expand Down Expand Up @@ -357,7 +357,7 @@ dependencies = [
[[package]]
org = "ballerina"
name = "websocket"
version = "2.10.2"
version = "2.10.3"
dependencies = [
{org = "ballerina", name = "auth"},
{org = "ballerina", name = "constraint"},
Expand Down
13 changes: 13 additions & 0 deletions campus/bffs/attendance/api/attendance_client.bal
Original file line number Diff line number Diff line change
Expand Up @@ -333,4 +333,17 @@ log:printInfo("Formatted Response: " + formattedJson);
json graphqlResponse = check self.graphqlClient->executeWithType(query, variables);
return <GetMonthlyLeaveDatesRecordByIdResponse> check performDataBinding(graphqlResponse, GetMonthlyLeaveDatesRecordByIdResponse);
}

remote isolated function getOrganizationsByAvinyaTypeWithActiveStatus(int avinya_type, int active) returns GetOrganizationsByAvinyaTypeWithActiveStatusResponse|graphql:ClientError {
string query = string `query getOrganizationsByAvinyaTypeWithActiveStatus($avinya_type:Int!,$active:Int!) {organizations_by_avinya_type(avinya_type:$avinya_type,active:$active) {id name {name_en} description organization_metadata {key_name value} active}}`;
map<anydata> variables = {"avinya_type": avinya_type, "active": active};
json graphqlResponse = check self.graphqlClient->executeWithType(query, variables);
return <GetOrganizationsByAvinyaTypeWithActiveStatusResponse> check performDataBinding(graphqlResponse, GetOrganizationsByAvinyaTypeWithActiveStatusResponse);
}
remote isolated function getCalendarMetadataByOrgId(int organization_id) returns GetCalendarMetadataByOrgIdResponse|graphql:ClientError {
string query = string `query getCalendarMetadataByOrgId($organization_id:Int!) {calendar_metadata_by_org_id(organization_id:$organization_id) {id organization_id monthly_payment_amount}}`;
map<anydata> variables = {"organization_id": organization_id};
json graphqlResponse = check self.graphqlClient->executeWithType(query, variables);
return <GetCalendarMetadataByOrgIdResponse> check performDataBinding(graphqlResponse, GetCalendarMetadataByOrgIdResponse);
}
}
42 changes: 42 additions & 0 deletions campus/bffs/attendance/api/service.bal
Original file line number Diff line number Diff line change
Expand Up @@ -935,4 +935,46 @@ service / on new http:Listener(9091) {
}
}

resource function get organizations_by_avinya_type_with_active_status/[int avinya_type_id]/[int active]() returns Organization[]|error {
GetOrganizationsByAvinyaTypeWithActiveStatusResponse|graphql:ClientError getOrganizationsByAvinyaTypeWithActiveStatusResponse = globalDataClient->getOrganizationsByAvinyaTypeWithActiveStatus(avinya_type_id,active);
if(getOrganizationsByAvinyaTypeWithActiveStatusResponse is GetOrganizationsByAvinyaTypeWithActiveStatusResponse) {
Organization[] organizations = [];
foreach var organization_record in getOrganizationsByAvinyaTypeWithActiveStatusResponse.organizations_by_avinya_type {
Organization|error organization = organization_record.cloneWithType(Organization);
if(organization is Organization) {
organizations.push(organization);
} else {
log:printError("Error while processing Application record received", organization);
return error("Error while processing Application record received: " + organization.message() +
":: Detail: " + organization.detail().toString());
}
}

return organizations;

} else {
log:printError("Error while creating application", getOrganizationsByAvinyaTypeWithActiveStatusResponse);
return error("Error while creating application: " + getOrganizationsByAvinyaTypeWithActiveStatusResponse.message() +
":: Detail: " + getOrganizationsByAvinyaTypeWithActiveStatusResponse.detail().toString());
}
}

resource function get calendar_metadata_by_org_id/[int organization_id]() returns CalendarMetadata|error {
GetCalendarMetadataByOrgIdResponse|graphql:ClientError getCalendarMetadataByOrgIdResponse = globalDataClient->getCalendarMetadataByOrgId(organization_id);
if (getCalendarMetadataByOrgIdResponse is GetCalendarMetadataByOrgIdResponse) {
CalendarMetadata|error calendar_metadata_record = getCalendarMetadataByOrgIdResponse.calendar_metadata_by_org_id.cloneWithType(CalendarMetadata);
if (calendar_metadata_record is CalendarMetadata) {
return calendar_metadata_record;
} else {
log:printError("Error while processing Application record received", calendar_metadata_record);
return error("Error while processing Application record received: " + calendar_metadata_record.message() +
":: Detail: " + calendar_metadata_record.detail().toString());
}
} else {
log:printError("Error while creating application", getCalendarMetadataByOrgIdResponse);
return error("Error while creating application: " + getCalendarMetadataByOrgIdResponse.message() +
":: Detail: " + getCalendarMetadataByOrgIdResponse.detail().toString());
}
}

}
44 changes: 40 additions & 4 deletions campus/bffs/attendance/api/types.bal
Original file line number Diff line number Diff line change
Expand Up @@ -161,16 +161,20 @@ public type Evaluation record {
};

public type Organization record {
int[]? parent_organizations?;
string? notes?;
string? name_ta?;
int[]? child_organizations?;
int? phone?;
int? address_id?;
string? name_si?;
int? avinya_type?;
int? id?;
string? description?;
int? active?;
int[]? child_organizations_for_dashboard?;
string? record_type?;
string name_en?;
int[]? parent_organizations?;
int? phone?;
int? id?;
string? name_en?;
};
public type Person record {
int? permanent_address_id?;
Expand Down Expand Up @@ -291,6 +295,13 @@ public type MonthlyLeaveDates record {
string? record_type?;
};

public type CalendarMetadata record {
string? record_type?;
int? id?;
int? organization_id;
anydata? monthly_payment_amount;
};

public type GetAvinyaTypesResponse record {|
map<json?> __extensions?;
record {|
Expand Down Expand Up @@ -861,3 +872,28 @@ public type GetMonthlyLeaveDatesRecordByIdResponse record {|
string? updated;
|}? monthly_leave_dates_record_by_id;
|};

public type GetOrganizationsByAvinyaTypeWithActiveStatusResponse record {|
map<json?> __extensions?;
record {|
int? id;
record {|
string? name_en;
|} name;
string? description;
record {|
string? key_name;
string? value;
|}[]? organization_metadata;
int? active;
|}[] organizations_by_avinya_type;
|};

public type GetCalendarMetadataByOrgIdResponse record {|
map<json?> __extensions?;
record {|
int? id;
int? organization_id;
anydata? monthly_payment_amount;
|}? calendar_metadata_by_org_id;
|};
22 changes: 22 additions & 0 deletions campus/bffs/attendance/graphql_client/activity.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -453,3 +453,25 @@ query getMonthlyLeaveDatesRecordById($organization_id:Int!,$year:Int!,$month:Int
}
}

query getOrganizationsByAvinyaTypeWithActiveStatus($avinya_type:Int!,$active:Int!) {
organizations_by_avinya_type(avinya_type:$avinya_type,active:$active) {
id
name {
name_en
}
description
organization_metadata{
key_name
value
}
active
}
}

query getCalendarMetadataByOrgId($organization_id: Int!) {
calendar_metadata_by_org_id(organization_id: $organization_id) {
id
organization_id
monthly_payment_amount
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -237,4 +237,16 @@ public isolated client class GraphqlClient {
json graphqlResponse = check self.graphqlClient->executeWithType(query, variables);
return <GetMonthlyLeaveDatesRecordByIdResponse> check performDataBinding(graphqlResponse, GetMonthlyLeaveDatesRecordByIdResponse);
}
remote isolated function getOrganizationsByAvinyaTypeWithActiveStatus(int avinya_type, int active) returns GetOrganizationsByAvinyaTypeWithActiveStatusResponse|graphql:ClientError {
string query = string `query getOrganizationsByAvinyaTypeWithActiveStatus($avinya_type:Int!,$active:Int!) {organizations_by_avinya_type(avinya_type:$avinya_type,active:$active) {id name {name_en} description organization_metadata {key_name value} active}}`;
map<anydata> variables = {"avinya_type": avinya_type, "active": active};
json graphqlResponse = check self.graphqlClient->executeWithType(query, variables);
return <GetOrganizationsByAvinyaTypeWithActiveStatusResponse> check performDataBinding(graphqlResponse, GetOrganizationsByAvinyaTypeWithActiveStatusResponse);
}
remote isolated function getCalendarMetadataByOrgId(int organization_id) returns GetCalendarMetadataByOrgIdResponse|graphql:ClientError {
string query = string `query getCalendarMetadataByOrgId($organization_id:Int!) {calendar_metadata_by_org_id(organization_id:$organization_id) {id organization_id monthly_payment_amount}}`;
map<anydata> variables = {"organization_id": organization_id};
json graphqlResponse = check self.graphqlClient->executeWithType(query, variables);
return <GetCalendarMetadataByOrgIdResponse> check performDataBinding(graphqlResponse, GetCalendarMetadataByOrgIdResponse);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ public type Organization record {
string? name_si?;
int? avinya_type?;
string? description?;
int? active?;
int[]? child_organizations_for_dashboard?;
string? record_type?;
int[]? parent_organizations?;
Expand Down Expand Up @@ -973,3 +974,28 @@ public type GetMonthlyLeaveDatesRecordByIdResponse record {|
string? updated;
|}? monthly_leave_dates_record_by_id;
|};

public type GetOrganizationsByAvinyaTypeWithActiveStatusResponse record {|
map<json?> __extensions?;
record {|
int? id;
record {|
string? name_en;
|} name;
string? description;
record {|
string? key_name;
string? value;
|}[]? organization_metadata;
int? active;
|}[]? organizations_by_avinya_type;
|};

public type GetCalendarMetadataByOrgIdResponse record {|
map<json?> __extensions?;
record {|
int? id;
int? organization_id;
anydata? monthly_payment_amount;
|}? calendar_metadata_by_org_id;
|};
11 changes: 10 additions & 1 deletion campus/bffs/attendance/graphql_client/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,12 @@ type AvinyaTypeData {
description: String
}

type CalendarMetaData {
id: Int
organization_id: Int
monthly_payment_amount: Decimal
}

input City {
record_type: String = "city"
id: Int
Expand Down Expand Up @@ -707,6 +713,7 @@ input Organization {
phone: Int
description: String
notes: String
active: Int
name_en: String
name_ta: String
name_si: String
Expand All @@ -726,6 +733,7 @@ type OrganizationData {
people: [PersonData!]
vacancies: [VacancyData!]
organization_metadata: [OrganizationMetaData!]
active: Int
}

type OrganizationMetaData {
Expand Down Expand Up @@ -885,7 +893,7 @@ type Query {
organization_structure(name: String, id: Int): OrganizationStructureData
organizations(level: Int!): OrganizationStructureData
organization(name: String, id: Int): OrganizationData
organizations_by_avinya_type(avinya_type: Int): [OrganizationData!]
organizations_by_avinya_type(avinya_type: Int, active: Int = 0): [OrganizationData!]
student_list_by_parent(id: Int): [PersonData!]
person(name: String, id: Int): PersonData
person_by_digital_id(id: String): PersonData
Expand Down Expand Up @@ -960,6 +968,7 @@ type Query {
cities(district_id: Int): [CityData!]
all_organizations: [OrganizationData!]
monthly_leave_dates_record_by_id(organization_id: Int!, year: Int!, month: Int!): MonthlyLeaveDatesData
calendar_metadata_by_org_id(organization_id: Int!): CalendarMetaData
}

input ResourceAllocation {
Expand Down
Loading
Loading