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
Changes from 3 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
Original file line number Diff line number Diff line change
@@ -697,8 +697,7 @@ class _StudentCreateState extends State<StudentCreate> {
Expanded(
flex: 6,
child: DropdownButtonFormField<int>(
value: userPerson.organization?.parent_organizations?.first.id ??
userPerson.organization_id,
value: selectedOrgId,
items: [
DropdownMenuItem<int>(
value: null, // Default item for when no selection is made
@@ -720,8 +719,8 @@ class _StudentCreateState extends State<StudentCreate> {
classes = await fetchClasses(newValue);
}
setState(() {
userPerson.organization_id =
newValue; // Update the organization ID
selectedOrgId = newValue;
userPerson.organization?.id = newValue;
});
},
decoration: InputDecoration(
@@ -955,7 +954,8 @@ class _StudentCreateState extends State<StudentCreate> {
onChanged: (value) {
setState(() {
selectedClassId = value;
userPerson.organization?.id = value;
userPerson.organization_id =
value; // Update the organization ID
});
},
decoration: const InputDecoration(
Original file line number Diff line number Diff line change
@@ -115,7 +115,8 @@ class _StudentUpdateState extends State<StudentUpdate> {
}

selectedOrgId = userPerson.organization?.id ?? 0;
selectedClassId = classes.isNotEmpty ? classes.first.id : 0;
selectedClassId =
(userPerson.organization != null) ? userPerson.organization!.id : 0;

// Handling date of birth safely
String? dob = userPerson.date_of_birth;
@@ -446,8 +447,8 @@ class _StudentUpdateState extends State<StudentUpdate> {
return 'Phone number is required';
}
final phoneRegex = RegExp(r'^[0-9]+$');
if (!phoneRegex.hasMatch(value) || value.length < 10) {
return 'Enter a valid phone number (at least 10 digits)';
if (!phoneRegex.hasMatch(value) || value.length < 9) {
return 'Enter a valid phone number (at least 9 digits)';
}
return null;
}
@@ -682,6 +683,9 @@ class _StudentUpdateState extends State<StudentUpdate> {
);
}

// final parentOrganizationId =
// (userPerson.organization != null) ? userPerson.organization!.id : 0;

final parentOrganizationId =
(userPerson.organization?.parent_organizations != null &&
userPerson.organization!.parent_organizations!.isNotEmpty)
@@ -708,7 +712,7 @@ class _StudentUpdateState extends State<StudentUpdate> {
Expanded(
flex: 6,
child: DropdownButtonFormField<int>(
value: validParentOrganizationId,
value: validParentOrganizationId ?? userPerson.organization_id,
items: organizations
.where((org) =>
org.avinya_type?.id == 105 ||
@@ -945,13 +949,15 @@ class _StudentUpdateState extends State<StudentUpdate> {
flex: 6,
child: DropdownButtonFormField<int>(
value: isValidClass
? selectedClassId
: null, // Validate selectedClassId
? (userPerson.organization != null)
? userPerson.organization!.id
: 0
: selectedClassId, // Validate selectedClassId
items: _getClassOptions(),
onChanged: (value) {
setState(() {
selectedClassId = value;
userPerson.organization?.id = value;
userPerson.organization_id = value;
});
},
decoration: const InputDecoration(
13 changes: 2 additions & 11 deletions campus/frontend/lib/avinya/enrollment/lib/widgets/students.dart
Original file line number Diff line number Diff line change
@@ -8,13 +8,12 @@ import 'package:gallery/avinya/enrollment/lib/screens/student_create_screen.dart
import 'package:gallery/avinya/enrollment/lib/screens/student_update_screen.dart';
import 'person_data_excel_report.dart';

enum AvinyaTypeId { Empower, IT, CS, FutureEnrollees }
enum AvinyaTypeId { Empower, IT, CS }

const avinyaTypeId = {
AvinyaTypeId.Empower: 37,
AvinyaTypeId.IT: 10,
AvinyaTypeId.CS: 96,
AvinyaTypeId.FutureEnrollees: 103,
};

class Students extends StatefulWidget {
@@ -37,7 +36,6 @@ class _StudentsState extends State<Students> {
AvinyaTypeId.Empower,
AvinyaTypeId.IT,
AvinyaTypeId.CS,
AvinyaTypeId.FutureEnrollees
];

List<String?> columnNames = [];
@@ -75,19 +73,16 @@ class _StudentsState extends State<Students> {
AvinyaTypeId.Empower,
AvinyaTypeId.IT,
AvinyaTypeId.CS,
AvinyaTypeId.FutureEnrollees
];
} else {
filteredAvinyaTypeIdValues = [
AvinyaTypeId.Empower,
AvinyaTypeId.FutureEnrollees
];
}
} else {
// Default value if newValue is null or invalid
filteredAvinyaTypeIdValues = [
AvinyaTypeId.Empower,
AvinyaTypeId.FutureEnrollees
];
}

@@ -231,14 +226,12 @@ class _StudentsState extends State<Students> {
.isBefore(DateTime.parse('2024-03-01'))) {
filteredAvinyaTypeIdValues = [
AvinyaTypeId.Empower,
AvinyaTypeId.FutureEnrollees
];
} else {
filteredAvinyaTypeIdValues = [
AvinyaTypeId.Empower,
AvinyaTypeId.IT,
AvinyaTypeId.CS,
AvinyaTypeId.FutureEnrollees
];
}

@@ -308,9 +301,7 @@ class _StudentsState extends State<Students> {
return DropdownMenuItem<AvinyaTypeId>(
value: typeId,
child: Text(
typeId.name == 'FutureEnrollees'
? 'FUTURE ENROLLEES'
: typeId.name.toUpperCase(),
typeId.name.toUpperCase(),
),
);
}).toList(),
10 changes: 9 additions & 1 deletion campus/mobile/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -53,6 +53,14 @@
"request": "launch",
"type": "dart",
"flutterMode": "release"
}
},
{
"name": "debug android Tab",
"request": "launch",
"type": "dart",
"flutterMode": "debug",
"deviceId": "emulator-5556",
"runTestsOnDevice": false
},
]
}
8 changes: 4 additions & 4 deletions campus/mobile/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -31,7 +31,7 @@ if (keystorePropertiesFile.exists()) {


android {
namespace "com.avinyanew.mobile"
namespace "com.avinyav2.mobile"
compileSdkVersion 34
ndkVersion flutter.ndkVersion

@@ -50,12 +50,12 @@ android {

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.avinyanew.mobile"
applicationId "com.avinyav2.mobile"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion 20
minSdkVersion 21
targetSdkVersion 34
versionCode 6
versionCode 8
versionName "1.0.2"
multiDexEnabled true
manifestPlaceholders += [
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.avinyanew.mobile
package com.avinyav2.mobile

import io.flutter.embedding.android.FlutterActivity

12 changes: 6 additions & 6 deletions campus/mobile/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
@@ -367,7 +367,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.avinyanew.mobile;
PRODUCT_BUNDLE_IDENTIFIER = com.avinyav2.mobile;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
@@ -384,7 +384,7 @@
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.avinyanew.mobile;
PRODUCT_BUNDLE_IDENTIFIER = com.avinyav2.mobile;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
@@ -402,7 +402,7 @@
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.avinyanew.mobile;
PRODUCT_BUNDLE_IDENTIFIER = com.avinyav2.mobile;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
@@ -418,7 +418,7 @@
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.avinyanew.mobile;
PRODUCT_BUNDLE_IDENTIFIER = com.avinyav2.mobile;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
@@ -545,7 +545,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.avinyanew.mobile;
PRODUCT_BUNDLE_IDENTIFIER = com.avinyav2.mobile;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
@@ -567,7 +567,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.avinyanew.mobile;
PRODUCT_BUNDLE_IDENTIFIER = com.avinyav2.mobile;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
2 changes: 1 addition & 1 deletion campus/mobile/linux/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ project(runner LANGUAGES CXX)
set(BINARY_NAME "Avinya Apps")
# The unique GTK application identifier for this application. See:
# https://wiki.gnome.org/HowDoI/ChooseApplicationID
set(APPLICATION_ID "com.avinyanew.mobile")
set(APPLICATION_ID "com.avinyav2.mobile")

# Explicitly opt in to modern CMake behaviors to avoid warnings with recent
# versions of CMake.
6 changes: 3 additions & 3 deletions campus/mobile/macos/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
@@ -384,7 +384,7 @@
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.avinyanew.mobile.RunnerTests;
PRODUCT_BUNDLE_IDENTIFIER = com.avinyav2.mobile.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/mobile.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/mobile";
@@ -398,7 +398,7 @@
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.avinyanew.mobile.RunnerTests;
PRODUCT_BUNDLE_IDENTIFIER = com.avinyav2.mobile.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/mobile.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/mobile";
@@ -412,7 +412,7 @@
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.avinyanew.mobile.RunnerTests;
PRODUCT_BUNDLE_IDENTIFIER = com.avinyav2.mobile.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/mobile.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/mobile";
2 changes: 1 addition & 1 deletion campus/mobile/macos/Runner/Configs/AppInfo.xcconfig
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@
PRODUCT_NAME = Avinya Apps;

// The application's bundle identifier
PRODUCT_BUNDLE_IDENTIFIER = com.avinyanew.mobile;
PRODUCT_BUNDLE_IDENTIFIER = com.avinyav2.mobile;

// The copyright displayed in application information
PRODUCT_COPYRIGHT = Copyright © 2023 com.avinya. All rights reserved.