Skip to content

Commit

Permalink
profile bff changed to handle new school batch
Browse files Browse the repository at this point in the history
  • Loading branch information
YujithIsura committed Sep 3, 2023
1 parent b3e91e7 commit 46ebb1e
Show file tree
Hide file tree
Showing 40 changed files with 110 additions and 37 deletions.
37 changes: 36 additions & 1 deletion campus/bffs/profile/api/person_client.bal
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,42 @@ public isolated client class GraphqlClient {
}

remote isolated function getOrganization(int id) returns GetOrganizationResponse|graphql:ClientError {
string query = string `query getOrganization($id:Int!) {organization(id:$id) {id name {name_en} description child_organizations {id name {name_en} description} parent_organizations {id name {name_en} description} people {id preferred_name digital_id}}}`;
string query = string `query getOrganization($id: Int!) {
organization(id: $id) {
id
name {
name_en
}
description
child_organizations {
id
name {
name_en
}
description
child_organizations {
id
name {
name_en
}
description
}
}
parent_organizations {
id
name {
name_en
}
description
}
people {
id
preferred_name
digital_id
}
}
}
`;
map<anydata> variables = {"id": id};
json graphqlResponse = check self.graphqlClient->executeWithType(query, variables);
return <GetOrganizationResponse> check performDataBinding(graphqlResponse, GetOrganizationResponse);
Expand Down
31 changes: 23 additions & 8 deletions campus/mobile/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,21 @@ if (flutterVersionName == null) {
flutterVersionName = '1.0'
}

def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}



android {
// flavorDimensions "environment"

// productFlavors {
// development {
// dimension "environment"
// applicationId "com.example.mobile"
// applicationId "com.avinya.mobile"
// manifestPlaceholders = [
// 'appAuthRedirectScheme': "com.avinyafoundation.campusapp.dev",
// 'applicationName': "com.example.mobile"
Expand Down Expand Up @@ -77,13 +85,20 @@ android {



buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
}
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
release {
signingConfig signingConfigs.release
}
}

}

flutter {
Expand Down
2 changes: 1 addition & 1 deletion campus/mobile/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application
android:label="mobile"
android:label="Avinya Apps"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
<activity
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 9 additions & 9 deletions campus/mobile/assets/config/dev.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"campusProfileBffApiUrl" : "http://192.168.8.192:9090",
"campusAttendanceBffApiUrl" : "http://192.168.8.192:9091",
"campusPctiNotesBffApiUrl" : "http://10.0.2.2:9092",
"campusPctiFeedbackBffApiUrl" : "http://10.0.2.2:9093",
"campusAssetsBffApiUrl" : "http://10.0.2.2:9094",
"campusProfileBffApiUrl" : "https://3a907137-52a3-4196-9e0d-22d054ea5789-prod.e1-us-east-azure.choreoapis.dev/fieg/profile-bff/0.9.0",
"campusAttendanceBffApiUrl" : "https://3a907137-52a3-4196-9e0d-22d054ea5789-prod.e1-us-east-azure.choreoapis.dev/fieg/attendance-bff/0.9.0",
"campusPctiNotesBffApiUrl" : "https://3a907137-52a3-4196-9e0d-22d054ea5789-dev.e1-us-east-azure.choreoapis.dev/fieg/pcti-notes-bff/1.0.0",
"campusPctiFeedbackBffApiUrl" : "https://3a907137-52a3-4196-9e0d-22d054ea5789-dev.e1-us-east-azure.choreoapis.dev/fieg/pcti-feedback-bff/1.0.0",
"campusAssetsBffApiUrl" : "https://3a907137-52a3-4196-9e0d-22d054ea5789-prod.e1-us-east-azure.choreoapis.dev/fieg/asset-bff/0.9.0",
"choreo_sts_endpoint" : "https://sts.choreo.dev/oauth2/token",
"asgardeo_token_endpoint" : "https://api.asgardeo.io/t/avinyatest/oauth2/token",
"logout_url" : "https://api.asgardeo.io/t/avinyatest/oidc/logout",
"bundle_id" : "com.avinyafoundation.campusapp.dev",
"asgardeo_token_endpoint" : "https://api.asgardeo.io/t/avinyaacademy/oauth2/token",
"logout_url" : "https://api.asgardeo.io/t/avinyaacademy/oidc/logout",
"bundle_id" : "com.avinyafoundation.campusapp.prod",
"redirect_url" : "com.avinyafoundation.campusapp.dev.mobile://oauth/callback",
"asgardeo_discovery_url" : "https://api.asgardeo.io/t/avinyatest/oauth2/token/.well-known/openid-configuration"
"asgardeo_discovery_url" : "https://api.asgardeo.io/t/avinyaacademy/oauth2/token/.well-known/openid-configuration"
}


15 changes: 15 additions & 0 deletions campus/mobile/assets/config/dev_old.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"campusProfileBffApiUrl" : "http://192.168.8.192:9090",
"campusAttendanceBffApiUrl" : "http://192.168.8.192:9091",
"campusPctiNotesBffApiUrl" : "http://10.0.2.2:9092",
"campusPctiFeedbackBffApiUrl" : "http://10.0.2.2:9093",
"campusAssetsBffApiUrl" : "http://10.0.2.2:9094",
"choreo_sts_endpoint" : "https://sts.choreo.dev/oauth2/token",
"asgardeo_token_endpoint" : "https://api.asgardeo.io/t/avinyatest/oauth2/token",
"logout_url" : "https://api.asgardeo.io/t/avinyatest/oidc/logout",
"bundle_id" : "com.avinyafoundation.campusapp.dev",
"redirect_url" : "com.avinyafoundation.campusapp.dev.mobile://oauth/callback",
"asgardeo_discovery_url" : "https://api.asgardeo.io/t/avinyatest/oauth2/token/.well-known/openid-configuration"
}


Binary file added campus/mobile/assets/images/app_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions campus/mobile/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.example.mobile;
PRODUCT_BUNDLE_IDENTIFIER = com.avinya.mobile;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
Expand All @@ -384,7 +384,7 @@
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.example.mobile.RunnerTests;
PRODUCT_BUNDLE_IDENTIFIER = com.avinya.mobile;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
Expand All @@ -402,7 +402,7 @@
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.example.mobile.RunnerTests;
PRODUCT_BUNDLE_IDENTIFIER = com.avinya.mobile;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
Expand All @@ -418,7 +418,7 @@
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.example.mobile.RunnerTests;
PRODUCT_BUNDLE_IDENTIFIER = com.avinya.mobile;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
Expand Down Expand Up @@ -545,7 +545,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.example.mobile;
PRODUCT_BUNDLE_IDENTIFIER = com.avinya.mobile;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
Expand All @@ -567,7 +567,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.example.mobile;
PRODUCT_BUNDLE_IDENTIFIER = com.avinya.mobile;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions campus/mobile/ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>Mobile</string>
<string>Avinya Apps</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>mobile</string>
<string>Avinya Apps</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
Expand Down
6 changes: 4 additions & 2 deletions campus/mobile/lib/config/app_config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ class AppConfig {
static String campusBffApiKey = '';
static String refreshToken = '';
static String choreoSTSEndpoint = "";
static String choreoSTSClientID = "x23_1tY7kAUtLUH9il9I3YwyrJca";
// static String choreoSTSClientID = "x23_1tY7kAUtLUH9il9I3YwyrJca";
static String choreoSTSClientID = "Krjx9Wr0F5eKDYAJQOSVX5rz2aoa";
static String asgardeoTokenEndpoint = "";
static String asgardeoClientId = "pJ2gM2o6yXN4f60FypEYWWERrAoa";
// static String asgardeoClientId = "pJ2gM2o6yXN4f60FypEYWWERrAoa";
static String asgardeoClientId = "6diD3fVU6KfYeokr3BZGoGPioCUa";
static var apiTokens = null;
static String applicationName = 'Avinya Campus Apps';
static String applicationVersion = '1.0.0';
Expand Down
4 changes: 2 additions & 2 deletions campus/mobile/linux/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ project(runner LANGUAGES CXX)

# The name of the executable created for the application. Change this to change
# the on-disk name of your application.
set(BINARY_NAME "mobile")
set(BINARY_NAME "Avinya Apps")
# The unique GTK application identifier for this application. See:
# https://wiki.gnome.org/HowDoI/ChooseApplicationID
set(APPLICATION_ID "com.example.mobile")
set(APPLICATION_ID "com.avinya.mobile")

# Explicitly opt in to modern CMake behaviors to avoid warnings with recent
# versions of CMake.
Expand Down
4 changes: 2 additions & 2 deletions campus/mobile/macos/Runner/Configs/AppInfo.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
// 'flutter create' template.

// The application's name. By default this is also the title of the Flutter window.
PRODUCT_NAME = mobile
PRODUCT_NAME = Avinya Apps;

// The application's bundle identifier
PRODUCT_BUNDLE_IDENTIFIER = com.example.mobile
PRODUCT_BUNDLE_IDENTIFIER = com.avinya.mobile;

// The copyright displayed in application information
PRODUCT_COPYRIGHT = Copyright © 2023 com.example. All rights reserved.
6 changes: 6 additions & 0 deletions campus/mobile/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
flutter_launcher_icons: "^0.13.1"

flutter_launcher_icons:
android: true
ios: true
image_path: "assets/images/app_logo.png"

# The "flutter_lints" package below contains a set of recommended lints to
# encourage good coding practices. The lint set provided by the package is
Expand Down
2 changes: 1 addition & 1 deletion campus/mobile/web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<!-- Favicon -->
<link rel="icon" type="image/png" href="favicon.png"/>

<title>mobile</title>
<title>Avinya Apps</title>
<link rel="manifest" href="manifest.json">

<script>
Expand Down
6 changes: 3 additions & 3 deletions campus/mobile/windows/runner/Runner.rc
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,12 @@ BEGIN
BLOCK "040904e4"
BEGIN
VALUE "CompanyName", "com.example" "\0"
VALUE "FileDescription", "mobile" "\0"
VALUE "FileDescription", "Avinya Apps" "\0"
VALUE "FileVersion", VERSION_AS_STRING "\0"
VALUE "InternalName", "mobile" "\0"
VALUE "InternalName", "Avinya Apps" "\0"
VALUE "LegalCopyright", "Copyright (C) 2023 com.example. All rights reserved." "\0"
VALUE "OriginalFilename", "mobile.exe" "\0"
VALUE "ProductName", "mobile" "\0"
VALUE "ProductName", "Avinya Apps" "\0"
VALUE "ProductVersion", VERSION_AS_STRING "\0"
END
END
Expand Down

0 comments on commit 46ebb1e

Please sign in to comment.