From 5cb022d4fe4a08322e9ec378e552045e3ce224f3 Mon Sep 17 00:00:00 2001 From: Archita bansal Date: Sun, 22 Dec 2024 11:58:14 +0530 Subject: [PATCH] page-flow --- ios/Podfile.lock | 23 + ios/Runner.xcodeproj/project.pbxproj | 112 ++++ .../contents.xcworkspacedata | 17 +- .../controllers/settings_controller.dart | 2 +- .../modules/Settings/views/settings_view.dart | 45 +- .../dashboard/view/dashboard_view.dart | 6 +- .../home/controllers/home_controller.dart | 5 +- lib/app/modules/home/views/home_view.dart | 44 +- lib/app/modules/login/views/login_view.dart | 4 +- .../markAttendanceView/views/heads_view.dart | 49 +- .../views/mark_attendance_view.dart | 23 +- .../views/members_view.dart | 18 +- .../views/organizers_view.dart | 18 +- .../views/volunteers_view.dart | 52 +- .../controllers/meetings_controller.dart | 64 +- .../modules/meetings/views/meetings_view.dart | 149 +++-- .../controllers/profile_edit_controller.dart | 52 +- .../profileEdit/views/profile_edit_view.dart | 597 +++++++++--------- .../controllers/registration_controller.dart | 4 +- .../registration/views/registration_view.dart | 255 ++++---- .../views/team_attendance_view.dart | 8 +- .../teamPage/views/team_page_view.dart | 18 +- lib/app/routes/app_pages.dart | 21 +- lib/components/MeetsConductedTile.dart | 2 +- lib/components/SettingButton.dart | 2 +- lib/components/bottom_navigation_bar.dart | 51 ++ 26 files changed, 1035 insertions(+), 606 deletions(-) create mode 100644 ios/Podfile.lock create mode 100644 lib/components/bottom_navigation_bar.dart diff --git a/ios/Podfile.lock b/ios/Podfile.lock new file mode 100644 index 0000000..b9de763 --- /dev/null +++ b/ios/Podfile.lock @@ -0,0 +1,23 @@ +PODS: + - Flutter (1.0.0) + - path_provider_foundation (0.0.1): + - Flutter + - FlutterMacOS + +DEPENDENCIES: + - Flutter (from `Flutter`) + - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) + +EXTERNAL SOURCES: + Flutter: + :path: Flutter + path_provider_foundation: + :path: ".symlinks/plugins/path_provider_foundation/darwin" + +SPEC CHECKSUMS: + Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 + path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46 + +PODFILE CHECKSUM: 4bb0d5af7b0a7a18570b26cd09a55bf9a905f81f + +COCOAPODS: 1.16.2 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index ffd93c6..8ad9219 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -10,7 +10,9 @@ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 517B4BBB6AE59102236A7432 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 173CFA0BF0D35A098DA7FECF /* Pods_RunnerTests.framework */; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 7FAFB8ECDD34B9875F019809 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 935552E3676383D4F58D5F78 /* Pods_Runner.framework */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; @@ -42,12 +44,19 @@ /* Begin PBXFileReference section */ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 1599394E1D91983FC94CE4B8 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = ""; }; + 173CFA0BF0D35A098DA7FECF /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 24E6877D2DD71498FA021C3D /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 62B055953F170B73FE4D654E /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7671CEA1F185E1A3DB1E0CEE /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 935552E3676383D4F58D5F78 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 948939B2BA19E464EBD2A2C2 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -55,13 +64,23 @@ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + AC65478A96F1A7B2B9622BCA /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ + 1D4367F1EDABA0A42F3B67B9 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 517B4BBB6AE59102236A7432 /* Pods_RunnerTests.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 97C146EB1CF9000F007C117D /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 7FAFB8ECDD34B9875F019809 /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -76,6 +95,29 @@ path = RunnerTests; sourceTree = ""; }; + 44CA8E9E4EEB766C1ED0E718 /* Pods */ = { + isa = PBXGroup; + children = ( + 24E6877D2DD71498FA021C3D /* Pods-Runner.debug.xcconfig */, + 7671CEA1F185E1A3DB1E0CEE /* Pods-Runner.release.xcconfig */, + 62B055953F170B73FE4D654E /* Pods-Runner.profile.xcconfig */, + AC65478A96F1A7B2B9622BCA /* Pods-RunnerTests.debug.xcconfig */, + 948939B2BA19E464EBD2A2C2 /* Pods-RunnerTests.release.xcconfig */, + 1599394E1D91983FC94CE4B8 /* Pods-RunnerTests.profile.xcconfig */, + ); + name = Pods; + path = Pods; + sourceTree = ""; + }; + 903DD0810C696FB7A80AAFAC /* Frameworks */ = { + isa = PBXGroup; + children = ( + 935552E3676383D4F58D5F78 /* Pods_Runner.framework */, + 173CFA0BF0D35A098DA7FECF /* Pods_RunnerTests.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; 9740EEB11CF90186004384FC /* Flutter */ = { isa = PBXGroup; children = ( @@ -94,6 +136,8 @@ 97C146F01CF9000F007C117D /* Runner */, 97C146EF1CF9000F007C117D /* Products */, 331C8082294A63A400263BE5 /* RunnerTests */, + 44CA8E9E4EEB766C1ED0E718 /* Pods */, + 903DD0810C696FB7A80AAFAC /* Frameworks */, ); sourceTree = ""; }; @@ -128,8 +172,10 @@ isa = PBXNativeTarget; buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; buildPhases = ( + 1BE9748E37A9691C0DC45D0E /* [CP] Check Pods Manifest.lock */, 331C807D294A63A400263BE5 /* Sources */, 331C807F294A63A400263BE5 /* Resources */, + 1D4367F1EDABA0A42F3B67B9 /* Frameworks */, ); buildRules = ( ); @@ -145,12 +191,14 @@ isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( + 84FEB37D575695E3DB9F5C92 /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + BBD246FB5F9161FBBF8A4826 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -222,6 +270,28 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ + 1BE9748E37A9691C0DC45D0E /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; @@ -238,6 +308,28 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; }; + 84FEB37D575695E3DB9F5C92 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; @@ -253,6 +345,23 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; }; + BBD246FB5F9161FBBF8A4826 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -378,6 +487,7 @@ }; 331C8088294A63A400263BE5 /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = AC65478A96F1A7B2B9622BCA /* Pods-RunnerTests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; @@ -395,6 +505,7 @@ }; 331C8089294A63A400263BE5 /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 948939B2BA19E464EBD2A2C2 /* Pods-RunnerTests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; @@ -410,6 +521,7 @@ }; 331C808A294A63A400263BE5 /* Profile */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 1599394E1D91983FC94CE4B8 /* Pods-RunnerTests.profile.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; diff --git a/ios/Runner.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcworkspace/contents.xcworkspacedata index 59c6d39..21a3cc1 100644 --- a/ios/Runner.xcworkspace/contents.xcworkspacedata +++ b/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -1,7 +1,10 @@ - - - - - + + + + + + + diff --git a/lib/app/modules/Settings/controllers/settings_controller.dart b/lib/app/modules/Settings/controllers/settings_controller.dart index 7fb7976..26bd3cd 100644 --- a/lib/app/modules/Settings/controllers/settings_controller.dart +++ b/lib/app/modules/Settings/controllers/settings_controller.dart @@ -1,3 +1,4 @@ +import 'package:flutter/cupertino.dart'; import 'package:get/get.dart'; class SettingsController extends GetxController { @@ -9,7 +10,6 @@ class SettingsController extends GetxController { } - final count = 0.obs; @override void onInit() { diff --git a/lib/app/modules/Settings/views/settings_view.dart b/lib/app/modules/Settings/views/settings_view.dart index 75afda2..c4e5109 100644 --- a/lib/app/modules/Settings/views/settings_view.dart +++ b/lib/app/modules/Settings/views/settings_view.dart @@ -1,9 +1,14 @@ -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:managment_app/Themes/themes.dart'; +import 'package:managment_app/app/modules/login/views/login_view.dart'; +import 'package:managment_app/app/modules/markAttendanceView/views/mark_attendance_view.dart'; +import 'package:managment_app/app/modules/teamAttendance/views/team_attendance_view.dart'; import 'package:managment_app/components/SettingButton.dart'; import '../../../../components/Logoutbutton.dart'; +import '../../login/controllers/login_controller.dart'; +import '../../profileEdit/views/profile_edit_view.dart'; +import '../../registration/views/registration_view.dart'; import '../controllers/settings_controller.dart'; class SettingsView extends GetView { @@ -42,7 +47,7 @@ class SettingsView extends GetView { ), ), Positioned( - top: -10, + top: 10, child: Container( padding: EdgeInsets.symmetric( vertical: screenHeight * 0.03, @@ -56,7 +61,7 @@ class SettingsView extends GetView { color: Colors.black.withOpacity(0.1), spreadRadius: 5, blurRadius: 10, - offset: Offset(0, 5), + offset: const Offset(0, 5), ), ], ), @@ -65,6 +70,7 @@ class SettingsView extends GetView { style: theme.kTitleTextStyle.copyWith( letterSpacing: 5, fontSize: screenWidth * 0.05, + fontWeight: FontWeight.bold, ), textAlign: TextAlign.center, ), @@ -85,25 +91,46 @@ class SettingsView extends GetView { Flexible( child: Settingbutton( title: 'MY PROFILE', - onPressed: () {}, + onPressed: () { + Get.to(() => ProfileEditView()); + }, ), ), SizedBox(height: screenHeight * 0.03), Flexible( child: Settingbutton( title: 'REGISTRATION', - onPressed: () {}, + onPressed: () { + Get.to(() => const RegistrationView()); + }, + ), + ), + SizedBox(height: screenHeight * 0.03), + Flexible( + child: Settingbutton( + title: 'UPDATE TEAM', //only for heads org + onPressed: () { + Get.to(() => const MarkAttendanceView()); + }, ), ), SizedBox(height: screenHeight * 0.03), Flexible( child: Settingbutton( title: 'MY TEAM', - onPressed: () {}, + onPressed: () { + Get.to(() => const TeamAttendanceView()); + }, ), ), - Spacer(), - Logoutbutton(onPressed: () {}), + //add a button for past meetings conducted + const Spacer(), + Logoutbutton( + onPressed: () { + Get.lazyPut(() => LoginViewController()); + Get.to(() => const LoginView()); + }, + ), ], ), ), @@ -114,4 +141,4 @@ class SettingsView extends GetView { ), ); } -} +} \ No newline at end of file diff --git a/lib/app/modules/dashboard/view/dashboard_view.dart b/lib/app/modules/dashboard/view/dashboard_view.dart index e8fe6af..c707a53 100644 --- a/lib/app/modules/dashboard/view/dashboard_view.dart +++ b/lib/app/modules/dashboard/view/dashboard_view.dart @@ -2,6 +2,8 @@ import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:flutter_svg/flutter_svg.dart'; +import 'package:managment_app/app/modules/markAttendanceView/views/mark_attendance_view.dart'; +import 'package:managment_app/app/modules/teamAttendance/views/team_attendance_view.dart'; import '../../../../components/AnnouncementBox.dart'; import '../../../../components/MeetsConductedTile.dart'; import '../../../../components/UpcomingMeetTile.dart'; @@ -111,7 +113,9 @@ class DashboardView extends GetView { SizedBox(height: 8), MeetsConductedTile( title: 'Design - 4/06/24', - OnUpdateAttendance: () {}, + OnUpdateAttendance: () { + Get.to(() => MarkAttendanceView()); + }, ), ], ), diff --git a/lib/app/modules/home/controllers/home_controller.dart b/lib/app/modules/home/controllers/home_controller.dart index 5332ed5..5445ec8 100644 --- a/lib/app/modules/home/controllers/home_controller.dart +++ b/lib/app/modules/home/controllers/home_controller.dart @@ -1,8 +1,9 @@ +import 'package:flutter/cupertino.dart'; import 'package:get/get.dart'; class HomeController extends GetxController { - //TODO: Implement HomeController - + final PageController _pageController = PageController(); + RxInt currentIndex = 0.obs; final count = 0.obs; diff --git a/lib/app/modules/home/views/home_view.dart b/lib/app/modules/home/views/home_view.dart index 7361aaf..c10d115 100644 --- a/lib/app/modules/home/views/home_view.dart +++ b/lib/app/modules/home/views/home_view.dart @@ -1,21 +1,45 @@ import 'package:flutter/material.dart'; - import 'package:get/get.dart'; -import '../controllers/home_controller.dart'; +import 'package:managment_app/app/modules/dashboard/view/dashboard_view.dart'; +import 'package:managment_app/app/modules/teamPage/views/team_page_view.dart'; +import '../../../../components/bottom_navigation_bar.dart'; +import '../../Settings/views/settings_view.dart'; +import '../../meetings/views/meetings_view.dart'; + +class HomeView extends StatefulWidget { -class HomeView extends GetView { const HomeView({super.key}); + + @override + State createState() => _HomeViewState(); +} + +class _HomeViewState extends State { + final PageController _pageController = PageController(); + + RxInt currentIndex = 0.obs; + @override Widget build(BuildContext context) { return Scaffold( - appBar: AppBar( - title: const Text('HomeView'), - centerTitle: true, + extendBodyBehindAppBar: true, + body: PageView( + controller: _pageController, + onPageChanged: (index) => currentIndex.value = index, + children: [ + const DashboardView(), // Content for the Home tab + MeetingsView(), + const TeamPageView(), // Profile content + const SettingsView(), + ], ), - body: const Center( - child: Text( - 'HomeView is working', - style: TextStyle(fontSize: 20), + bottomNavigationBar: Obx( + () => BottomNavBar( + selectedIndex: currentIndex.value, + onTap: (index) { + currentIndex.value = index; + _pageController.jumpToPage(index); + }, ), ), ); diff --git a/lib/app/modules/login/views/login_view.dart b/lib/app/modules/login/views/login_view.dart index 2bdb188..e0b98ed 100644 --- a/lib/app/modules/login/views/login_view.dart +++ b/lib/app/modules/login/views/login_view.dart @@ -1,6 +1,6 @@ - import 'package:flutter/material.dart'; import 'package:get/get.dart'; +import 'package:managment_app/app/modules/home/views/home_view.dart'; import 'package:managment_app/app/modules/login/controllers/login_controller.dart'; import '../../../../Themes/themes.dart'; @@ -232,7 +232,7 @@ class LoginView extends GetView { ElevatedButton( onPressed: () { if (formKey.currentState!.validate()) { - // Perform login action + Get.to(() => HomeView()); } }, style: ElevatedButton.styleFrom( diff --git a/lib/app/modules/markAttendanceView/views/heads_view.dart b/lib/app/modules/markAttendanceView/views/heads_view.dart index 9646471..7638598 100644 --- a/lib/app/modules/markAttendanceView/views/heads_view.dart +++ b/lib/app/modules/markAttendanceView/views/heads_view.dart @@ -2,10 +2,12 @@ import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:managment_app/Themes/themes.dart'; - +import 'package:managment_app/app/modules/home/views/home_view.dart'; import '../controllers/mark_attendance_view_controller.dart'; class HeadsView extends GetView { + const HeadsView({super.key}); + @override Widget build(BuildContext context) { @@ -19,12 +21,12 @@ class HeadsView extends GetView { ], begin: Alignment.topCenter, end: Alignment.bottomCenter, - stops: [0.2, 1.0] + stops: const [0.2, 1.0] ) ), child: Column( children: [ - SizedBox(height:30), + const SizedBox(height:30), Expanded( child: ListView.builder( itemCount: controller.names.length, @@ -64,13 +66,27 @@ class HeadsView extends GetView { ), height: Get.height*0.05, width: Get.width*0.35, - child: TextButton(onPressed: () {}, + child: TextButton(onPressed: () { + Get.snackbar( + 'Attendance Updated', + 'Attendance has been Updated successfully', + snackPosition: SnackPosition.TOP, + backgroundColor: Colors.grey[300], + colorText: Colors.black, + icon: const Icon(Icons.check_circle, color: Colors.green), + margin: const EdgeInsets.all(10), + duration: const Duration(seconds: 1), + ); + Future.delayed(const Duration(seconds: 1), () { + Get.to(() => HomeView()); + }); + }, child: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ Text("UPDATE",style: Get.theme.kSubTitleTextStyle), - SizedBox(width: 10), - Container(child: Image.asset('assets/images/Update.png')), + const SizedBox(width: 10), + Image.asset('assets/images/Update.png'), ], ) ), @@ -84,27 +100,32 @@ class HeadsView extends GetView { } } -class _CheckBox extends StatelessWidget{ - RxBool isChecked = false.obs; +class _CheckBox extends StatefulWidget{ final String name; final String profile; - _CheckBox({required this.name,required this.profile,}); + const _CheckBox({required this.name,required this.profile,}); + @override + State<_CheckBox> createState() => _CheckBoxState(); +} + +class _CheckBoxState extends State<_CheckBox> { + RxBool isChecked = false.obs; @override Widget build(BuildContext context) { final controller = Get.find(); return Obx((){ return CheckboxListTile( - activeColor: Color.fromRGBO(62, 201, 207, 1), + activeColor: const Color.fromRGBO(62, 201, 207, 1), value: isChecked.value, onChanged: (val) { if(val == true){ - controller.checkedTiles.add(name); + controller.checkedTiles.add(widget.name); } else{ - controller.checkedTiles.remove(name); + controller.checkedTiles.remove(widget.name); } isChecked.value = val!; @@ -115,8 +136,8 @@ class _CheckBox extends StatelessWidget{ title: Row( children: [ CircleAvatar(backgroundColor: Get.theme.colorLevel4,), - SizedBox(width: 10), - Text(name+' : ', style: Get.theme.kBodyTextStyle), + const SizedBox(width: 10), + Text('${widget.name} : ', style: Get.theme.kBodyTextStyle), ], ), ); diff --git a/lib/app/modules/markAttendanceView/views/mark_attendance_view.dart b/lib/app/modules/markAttendanceView/views/mark_attendance_view.dart index 484ffa3..f9fa1c5 100644 --- a/lib/app/modules/markAttendanceView/views/mark_attendance_view.dart +++ b/lib/app/modules/markAttendanceView/views/mark_attendance_view.dart @@ -10,24 +10,31 @@ import 'package:managment_app/app/modules/markAttendanceView/views/volunteers_vi import '../controllers/mark_attendance_view_controller.dart'; class MarkAttendanceView extends GetView { - const MarkAttendanceView({Key? key}) : super(key: key); + const MarkAttendanceView({super.key}); @override Widget build(BuildContext context) { + Get.put(MarkAttendanceViewController()); return DefaultTabController( length: 4, child: Scaffold( appBar: AppBar( + leading: IconButton( + icon: Container(padding: const EdgeInsets.all(5),child: Image.asset('assets/images/icon.png'),), + onPressed: () { + Get.back(); + }, + ), backgroundColor: Get.theme.colorLevel1, - title: Text('ATTENDANCE', + title: Text('ATTENDANCE', //CHANGE TO UPDATE AND USE SAME PAGE DIFFERENT LOGIC style: Get.theme.kTitleTextStyle),foregroundColor: Get.theme.colorLevel0, elevation: 0, centerTitle: true, ), body: Column( children: [ - Container(color: Color.fromRGBO(158, 161, 174, 1),height: 30, + Container(color: const Color.fromRGBO(158, 161, 174, 1),height: 30, child: TabBar( - labelPadding: EdgeInsets.all(0.8), + labelPadding: const EdgeInsets.all(0.8), unselectedLabelColor: Get.theme.colorLevel0, labelColor: Get.theme.colorLevel0, indicator: BoxDecoration( @@ -35,11 +42,11 @@ class MarkAttendanceView extends GetView { shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(90), ), - indicatorPadding: EdgeInsets.symmetric(horizontal: 0,vertical: 3.0), + indicatorPadding: const EdgeInsets.symmetric(horizontal: 0,vertical: 3.0), indicatorColor: Get.theme.colorLevel4, dividerColor: Colors.transparent, - isScrollable: false,padding: EdgeInsets.symmetric(horizontal: 10), - tabs: [ + isScrollable: false,padding: const EdgeInsets.symmetric(horizontal: 10), + tabs: const [ Tab(text: ' organizers '), Tab(text: ' heads '), @@ -50,7 +57,7 @@ class MarkAttendanceView extends GetView { ), Expanded( child: TabBarView( - children: [OrganizersView(),HeadsView(),MembersView(),VolunteersView()], + children: [OrganizersView(), HeadsView(),MembersView(), VolunteersView()], ), ), ], diff --git a/lib/app/modules/markAttendanceView/views/members_view.dart b/lib/app/modules/markAttendanceView/views/members_view.dart index b74e354..7442911 100644 --- a/lib/app/modules/markAttendanceView/views/members_view.dart +++ b/lib/app/modules/markAttendanceView/views/members_view.dart @@ -2,7 +2,9 @@ import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:managment_app/Themes/themes.dart'; +import 'package:managment_app/app/modules/home/views/home_view.dart'; +import '../../teamAttendance/views/team_attendance_view.dart'; import '../controllers/mark_attendance_view_controller.dart'; class MembersView extends GetView { @@ -64,7 +66,21 @@ Widget build(BuildContext context) { ), height: Get.height*0.05, width: Get.width*0.35, - child: TextButton(onPressed: () {}, + child: TextButton(onPressed: () { + Get.snackbar( + 'Attendance Updated', + 'Attendance has been Updated successfully', + snackPosition: SnackPosition.TOP, + backgroundColor: Colors.grey[300], + colorText: Colors.black, + icon: Icon(Icons.check_circle, color: Colors.green), + margin: const EdgeInsets.all(10), + duration: const Duration(seconds: 1), + ); + Future.delayed(const Duration(seconds: 1), () { + Get.to(() => HomeView()); + }); + }, child: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ diff --git a/lib/app/modules/markAttendanceView/views/organizers_view.dart b/lib/app/modules/markAttendanceView/views/organizers_view.dart index a6f16c3..8e2aa0a 100644 --- a/lib/app/modules/markAttendanceView/views/organizers_view.dart +++ b/lib/app/modules/markAttendanceView/views/organizers_view.dart @@ -3,7 +3,9 @@ import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:managment_app/Themes/themes.dart'; +import 'package:managment_app/app/modules/teamAttendance/views/team_attendance_view.dart'; +import '../../home/views/home_view.dart'; import '../controllers/mark_attendance_view_controller.dart'; class OrganizersView extends GetView { @@ -65,7 +67,21 @@ Widget build(BuildContext context) { ), height: Get.height*0.05, width: Get.width*0.35, - child: TextButton(onPressed: () {}, + child: TextButton(onPressed: () { + Get.snackbar( + 'Attendance Updated', + 'Attendance has been Updated successfully', + snackPosition: SnackPosition.TOP, + backgroundColor: Colors.grey[300], + colorText: Colors.black, + icon: Icon(Icons.check_circle, color: Colors.green), + margin: const EdgeInsets.all(10), + duration: const Duration(seconds: 1), + ); + Future.delayed(const Duration(seconds: 1), () { + Get.to(() => HomeView()); + }); + }, child: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ diff --git a/lib/app/modules/markAttendanceView/views/volunteers_view.dart b/lib/app/modules/markAttendanceView/views/volunteers_view.dart index a4a4bb5..b137a3d 100644 --- a/lib/app/modules/markAttendanceView/views/volunteers_view.dart +++ b/lib/app/modules/markAttendanceView/views/volunteers_view.dart @@ -1,10 +1,12 @@ import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:managment_app/Themes/themes.dart'; - + import 'package:managment_app/app/modules/home/views/home_view.dart'; import '../controllers/mark_attendance_view_controller.dart'; class VolunteersView extends GetView { + const VolunteersView({super.key}); + @override Widget build(BuildContext context) { @@ -18,12 +20,12 @@ ], begin: Alignment.topCenter, end: Alignment.bottomCenter, - stops: [0.2, 1.0] + stops: const [0.2, 1.0] ) ), child: Column( children: [ - SizedBox(height:30), + const SizedBox(height:30), Expanded( child: ListView.builder( itemCount: controller.names.length, @@ -63,13 +65,28 @@ ), height: Get.height*0.05, width: Get.width*0.35, - child: TextButton(onPressed: () {}, + child: TextButton(onPressed: () { + + Get.snackbar( + 'Attendance Updated', + 'Attendance has been Updated successfully', + snackPosition: SnackPosition.TOP, + backgroundColor: Colors.grey[300], + colorText: Colors.black, + icon: const Icon(Icons.check_circle, color: Colors.green), + margin: const EdgeInsets.all(10), + duration: const Duration(seconds: 1), + ); + Future.delayed(const Duration(seconds: 1), () { + Get.to(() => const HomeView()); + }); + }, child: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ Text("UPDATE",style: Get.theme.kSubTitleTextStyle), - SizedBox(width: 10), - Container(child: Image.asset('assets/images/Update.png')), + const SizedBox(width: 10), + Image.asset('assets/images/Update.png'), ], ) ), @@ -83,27 +100,32 @@ } } - class _CheckBox extends StatelessWidget{ - RxBool isChecked = false.obs; + class _CheckBox extends StatefulWidget{ final String name; final String profile; - _CheckBox({required this.name,required this.profile,}); + const _CheckBox({required this.name,required this.profile,}); + + @override + State<_CheckBox> createState() => _CheckBoxState(); +} +class _CheckBoxState extends State<_CheckBox> { + RxBool isChecked = false.obs; @override Widget build(BuildContext context) { final controller = Get.find(); return Obx((){ return CheckboxListTile( - activeColor: Color.fromRGBO(62, 201, 207, 1), + activeColor: const Color.fromRGBO(62, 201, 207, 1), value: isChecked.value, onChanged: (val) { if(val == true){ - controller.checkedTiles.add(name); + controller.checkedTiles.add(widget.name); } else{ - controller.checkedTiles.remove(name); + controller.checkedTiles.remove(widget.name); } isChecked.value = val!; @@ -114,11 +136,11 @@ title: Row( children: [ CircleAvatar(backgroundColor: Get.theme.colorLevel4,), - SizedBox(width: 10), - Text(name+' : ', style: Get.theme.kBodyTextStyle), + const SizedBox(width: 10), + Text('${widget.name} : ', style: Get.theme.kBodyTextStyle), ], ), ); }); } - } \ No newline at end of file +} \ No newline at end of file diff --git a/lib/app/modules/meetings/controllers/meetings_controller.dart b/lib/app/modules/meetings/controllers/meetings_controller.dart index e308898..64c0bef 100644 --- a/lib/app/modules/meetings/controllers/meetings_controller.dart +++ b/lib/app/modules/meetings/controllers/meetings_controller.dart @@ -7,10 +7,9 @@ final List domainOptions = [ 'Machination', 'Electrizite', 'Digital Design', 'X-Zone' ]; +RxInt currentIndex = 0.obs; final List forOptions = ['Volunteer', 'Member', 'Head']; - - final List modeOptions = ['Online', 'Offline']; class MeetingsController extends GetxController { @@ -26,6 +25,9 @@ class MeetingsController extends GetxController { var selectedDate = Rx(DateTime.now()); var selectedTime = Rx(TimeOfDay.now()); + // Observable for meeting description + var description = ''.obs; + void updateSelectedDate(DateTime date) { selectedDate.value = date; dateController.text = '${date.year}-${date.month}-${date.day}'; @@ -35,4 +37,62 @@ class MeetingsController extends GetxController { selectedTime.value = time; timeController.text = '${time.hour}:${time.minute}'; } + + // Function to show the dialog and update the description + void showDescriptionDialog(BuildContext context) { + final TextEditingController descriptionController = TextEditingController(); + + showDialog( + context: context, + builder: (BuildContext context) { + return Theme( + data: Theme.of(context).copyWith( + dialogBackgroundColor: const Color (0xFF002431), + ), + child: AlertDialog( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(20), + ), + title: const Text( + 'Add Meeting Description', + style: TextStyle( color: Colors.white, fontWeight: FontWeight.bold), + ), + content: TextField( + controller: descriptionController, + decoration: InputDecoration( + hintText: 'Enter meeting description', + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(10), + ), + ), + maxLines: 3, + ), + actions: [ + TextButton( + onPressed: () { + Navigator.pop(context); + }, + child: const Text( + 'Cancel', + style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold), + ), + ), + ElevatedButton( + onPressed: () { + if (descriptionController.text.trim().isNotEmpty) { + description.value = descriptionController.text.trim(); + } + Navigator.pop(context); + }, + child: const Text( + 'Done', + style: TextStyle( color:Colors.cyan, fontWeight: FontWeight.bold), + ), + ), + ], + ), + ); + }, + ); + } } diff --git a/lib/app/modules/meetings/views/meetings_view.dart b/lib/app/modules/meetings/views/meetings_view.dart index db10f9e..5a730cb 100644 --- a/lib/app/modules/meetings/views/meetings_view.dart +++ b/lib/app/modules/meetings/views/meetings_view.dart @@ -2,18 +2,20 @@ import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:get/get.dart'; import 'package:google_fonts/google_fonts.dart'; +import 'package:managment_app/app/modules/home/views/home_view.dart'; import '../../../../components/DatePickerField.dart'; import '../../../../components/Dropdown.dart'; import '../../../../components/TimePickerField.dart'; -import '../controllers/meetings_controller.dart'; import 'package:managment_app/Themes/themes.dart'; +import '../controllers/meetings_controller.dart'; class MeetingsView extends GetView { - const MeetingsView({super.key}); + MeetingsView({super.key}); + @override + final MeetingsController controller = Get.put(MeetingsController()); @override Widget build(BuildContext context) { - final double screenWidth = MediaQuery.of(context).size.width; final theme = Theme.of(context); return Scaffold( @@ -31,6 +33,12 @@ class MeetingsView extends GetView { centerTitle: true, backgroundColor: theme.colorLevel1, elevation: 0, + leading: IconButton( + icon: Icon(Icons.arrow_back_ios, color: theme.colorLevel4), + onPressed: () { + Get.offAll(() => const HomeView()); + }, + ), ), body: Container( decoration: BoxDecoration( @@ -41,17 +49,17 @@ class MeetingsView extends GetView { ), ), child: SingleChildScrollView( - padding: const EdgeInsets.all(50.0), + padding: const EdgeInsets.all(20.0), child: Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ + // Calendar Icon Container( width: 150, height: 150, padding: const EdgeInsets.all(15), decoration: BoxDecoration( - borderRadius: BorderRadius.circular(16), ), child: SvgPicture.asset( @@ -62,13 +70,20 @@ class MeetingsView extends GetView { ), ), const SizedBox(height: 20), + Container( - width: screenWidth * 0.8, - padding: const EdgeInsets.all(16.0), + width: Get.width * 0.8, + padding: const EdgeInsets.all(20.0), decoration: BoxDecoration( color: const Color(0xFF094454), - borderRadius: BorderRadius.circular(15), - boxShadow: [BoxShadow(color: theme.colorLevel0, spreadRadius: 2, blurRadius: 4)], + borderRadius: BorderRadius.circular(25), + boxShadow: [ + BoxShadow( + color: theme.colorLevel0, + spreadRadius: 2, + blurRadius: 4, + ), + ], ), child: Column( crossAxisAlignment: CrossAxisAlignment.stretch, @@ -86,12 +101,14 @@ class MeetingsView extends GetView { DatePickerField( hintText: 'DATE', selectedDate: controller.selectedDate, - onDateChanged: (date) => controller.selectedDate.value = date, + onDateChanged: (date) => + controller.selectedDate.value = date, ), TimePickerField( hintText: 'TIME', selectedTime: controller.selectedTime, - onTimeChanged: (time) => controller.selectedTime.value = time, + onTimeChanged: (time) => + controller.selectedTime.value = time, ), CustomDropdownButton( hintText: 'MODE', @@ -102,61 +119,71 @@ class MeetingsView extends GetView { ), ), const SizedBox(height: 20), - Container( - decoration: BoxDecoration( - boxShadow: const [ - BoxShadow( - color: Colors.black26, - offset: Offset(0, 4), - blurRadius: 5.0, - ), - ], - borderRadius: BorderRadius.circular(15), - ), - child: ElevatedButton( - onPressed: () {}, - style: ElevatedButton.styleFrom( - backgroundColor: theme.colorPrimary, - elevation: 0, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(15), - ), - ), - child: Text( - 'ADD MEETING DESCRIPTION', - style: theme.kSmallTextStyle, + + ElevatedButton( + onPressed: () { + controller.showDescriptionDialog(context); + }, + style: ElevatedButton.styleFrom( + backgroundColor: theme.colorPrimary, + elevation: 0, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(15), ), ), + child: Text( + 'ADD MEETING DESCRIPTION', + style: theme.kSmallTextStyle, + ), ), const SizedBox(height: 20), - Container( - decoration: BoxDecoration( - boxShadow: const [ - BoxShadow( - color: Colors.black26, - offset: Offset(0, 4), - blurRadius: 5.0, - ), - ], - borderRadius: BorderRadius.circular(15), + + Obx(() { + return controller.description.value.isEmpty + ? Container() + : Text( + controller.description.value, + textAlign: TextAlign.center, + style: theme.kSmallTextStyle.copyWith(fontSize: 16), + ); + }), + + const SizedBox(height: 20), + + ElevatedButton( + onPressed: () { + Get.snackbar( + 'Reminder Sent', + 'Meeting reminder has been sent successfully!', + snackPosition: SnackPosition.TOP, + backgroundColor: Colors.grey[300], + colorText: Colors.black, + icon: const Icon(Icons.check_circle, color: Colors.green), + margin: const EdgeInsets.all(10), + duration: const Duration(seconds: 2), + ); + }, + style: ElevatedButton.styleFrom( + backgroundColor: Colors.blue[100], + elevation: 0, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(15), + ), ), - child: ElevatedButton( - onPressed: () {}, - style: ElevatedButton.styleFrom( - backgroundColor: Colors.blue[100], - elevation: 0, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(15), + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + Text( + 'Send Reminder', + style: GoogleFonts.raleway( + color: Colors.grey[700], + fontSize: 12, + fontWeight: FontWeight.w600, + ), ), - ), - child: Row( - mainAxisSize: MainAxisSize.min, - children: [ - Text('Send Reminder', style: GoogleFonts.raleway(color: Colors.grey[700], fontSize: 12,fontWeight: FontWeight.w600)), - const SizedBox(width: 8), - Icon(Icons.notifications_active, color: Colors.grey[700]), - ], - ), + const SizedBox(width: 8), + Icon(Icons.notifications_active, color: Colors.grey[700]), + ], ), ), ], @@ -167,5 +194,3 @@ class MeetingsView extends GetView { ); } } - - diff --git a/lib/app/modules/profileEdit/controllers/profile_edit_controller.dart b/lib/app/modules/profileEdit/controllers/profile_edit_controller.dart index 501e193..e1331fa 100644 --- a/lib/app/modules/profileEdit/controllers/profile_edit_controller.dart +++ b/lib/app/modules/profileEdit/controllers/profile_edit_controller.dart @@ -1,44 +1,36 @@ +import 'package:flutter/cupertino.dart'; import 'package:get/get.dart'; class ProfileEditController extends GetxController { - //TODO: Implement ProfileEditController + final GlobalKey formKey = GlobalKey(); - final count = 0.obs; + final isEditing = true.obs; - @override - void onInit() { - super.onInit(); - } - - @override - void onReady() { - super.onReady(); - } + // TextEditingControllers for editable fields + final nameController = TextEditingController(); + final emailController = TextEditingController(); + final regNoController = TextEditingController(); + final phoneController = TextEditingController(); - @override - void onClose() { - super.onClose(); - } + var selectedGender = Rxn(); + List get genders => ["Male", "Female", "Others"]; - void increment() => count.value++; + var selectedYear = Rxn(); + List get years => ["1st", "2nd", "3rd", "4th", "5th"]; - var selectedGender = Rxn(); - void setSelectedGender(String gender) { - if (gender != null) { - selectedGender.value = gender; - } + void toggleEditMode() { + isEditing.value = !isEditing.value; } - List get genders => ["Male", "Female","Others"]; - var selectedYear = Rxn(); - void setSelectedYear(String year) { - if (year != null) { - selectedYear.value = year; - } + void saveProfile() { + // Logic to save profile data + toggleEditMode(); } - List get years => ["1st", "2nd","3rd","4th","5th"]; - void goBack() { - Get.back(); + @override + void onClose() { + nameController.dispose(); + emailController.dispose(); + super.onClose(); } } \ No newline at end of file diff --git a/lib/app/modules/profileEdit/views/profile_edit_view.dart b/lib/app/modules/profileEdit/views/profile_edit_view.dart index e74d8a8..0edcae6 100644 --- a/lib/app/modules/profileEdit/views/profile_edit_view.dart +++ b/lib/app/modules/profileEdit/views/profile_edit_view.dart @@ -1,327 +1,330 @@ import 'package:flutter/material.dart'; import 'package:get/get.dart'; -import 'package:managment_app/app/modules/profileEdit/controllers/profile_edit_controller.dart'; -import '../../../../Themes/themes.dart'; +import 'package:managment_app/Themes/themes.dart'; + +import '../controllers/profile_edit_controller.dart'; + +class ProfileEditView extends GetView { + ProfileEditView({super.key}); -class ProfileEditView extends StatelessWidget { final ProfileEditController controller = Get.put(ProfileEditController()); - final _formKey = GlobalKey(); @override Widget build(BuildContext context) { final theme = Get.theme; return Scaffold( - extendBodyBehindAppBar: true, body: SingleChildScrollView( - child: Container( - decoration: BoxDecoration( - gradient: LinearGradient( - begin: Alignment.topLeft, - end: Alignment.bottomRight, - colors: [ - theme.colorLevel1, - theme.colorLevel0, - ], - ), + child: ConstrainedBox( + constraints: BoxConstraints( + minHeight: MediaQuery.of(context).size.height, ), - child: Padding( - padding: const EdgeInsets.all(16.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - SizedBox(height: 50), - Center( - child: Stack( - alignment: Alignment.center, - children: [ - Container( - width: 550, - height: 300, - decoration: BoxDecoration( - color: theme.colorLevel2, - borderRadius: BorderRadius.circular(30), - ), - ), - Positioned( - top: 5, - left: 10, - child: IconButton( - icon: - Icon(Icons.arrow_back_ios, color: theme.dayNight), - onPressed: () => controller.goBack(), - ), - ), - Positioned( - top: 20, - right: 20, - child: Text( - 'Edit Profile', - style: theme.kSubTitleTextStyle, - ), - ), - Positioned( - top: 100, - child: CircleAvatar( - radius: 70, - backgroundImage: - AssetImage('assets/images/profile_icon.png'), - backgroundColor: theme.colorLevel3, - ), - ), - Positioned( - top: 190, - right: 140, - child: Container( - decoration: BoxDecoration( - shape: BoxShape.circle, - color: theme.colorPrimary, - ), - child: Padding( - padding: const EdgeInsets.all(10.0), - child: Icon( - Icons.edit, - color: theme.dayNight, - size: 30, - ), - ), - ), - ), - ], - ), - ), - SizedBox(height: 30), - - Container( - width: double.infinity, - padding: EdgeInsets.symmetric(vertical: 20, horizontal: 20), - decoration: BoxDecoration( - color: theme.colorLevel2, - borderRadius: BorderRadius.circular(15), - ), - child: Text( - 'BASIC INFORMATION', - style: theme.kTitleTextStyle.copyWith( - fontSize: 25, - ), - textAlign: TextAlign.center, - ), - ), - SizedBox(height: 20), - - - Form( - key: _formKey, - child: Column( - children: [ - - TextFormField( - decoration: InputDecoration( - labelText: 'Name', - border: UnderlineInputBorder(), - suffixIcon: Icon(Icons.arrow_forward_ios), - enabledBorder: UnderlineInputBorder( - borderSide: BorderSide( - color: theme - .colorPrimary, - width: 1.0, - ), - ), - focusedBorder: UnderlineInputBorder( - borderSide: BorderSide( - color: theme - .colorPrimary, - width: 2.0, - ), - ), + child: Container( + decoration: BoxDecoration( + gradient: LinearGradient( + begin: Alignment.topLeft, + end: Alignment.bottomRight, + colors: [ + theme.colorLevel1, + theme.colorLevel0, + ], + ), + ), + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const SizedBox(height: 50), + Center( + child: Stack( + alignment: Alignment.center, + children: [ + Container( + width: 550, + height: 300, ), - validator: (value) { - if (value == null || value.isEmpty) { - return 'Please enter your name'; - } - return null; - }, - ), - SizedBox(height: 10), - - - Obx(() => DropdownButtonFormField( - value: controller.selectedGender.value, - decoration: InputDecoration( - labelText: 'Gender', - border: UnderlineInputBorder(), - enabledBorder: UnderlineInputBorder( - borderSide: BorderSide( - color: theme - .colorPrimary, - width: 1.0, - ), - ), - focusedBorder: UnderlineInputBorder( - borderSide: BorderSide( - color: theme - .colorPrimary, - width: 2.0, - ), - ), - ), - validator: (value) { - if (value == null || value.isEmpty) { - return 'Please select your gender'; - } - return null; - }, - icon: Icon(Icons.arrow_forward_ios), - onChanged: (String? newValue) { - if (newValue != null) { - controller.setSelectedGender(newValue); - } + Positioned( + top: 5, + left: 10, + child: IconButton( + icon: Icon(Icons.arrow_back_ios, + color: theme.dayNight), + onPressed: () { + Get.back(); // Navigate back to the previous page }, - items: controller.genders - .map>((String value) { - return DropdownMenuItem( - value: value, - child: Text(value), - ); - }).toList(), - )), - SizedBox(height: 10), - - - TextFormField( - decoration: InputDecoration( - labelText: 'Email', - border: UnderlineInputBorder(), - suffixIcon: Icon(Icons.arrow_forward_ios), - enabledBorder: UnderlineInputBorder( - borderSide: BorderSide( - color: theme - .colorPrimary, - width: 1.0, - ), - ), - focusedBorder: UnderlineInputBorder( - borderSide: BorderSide( - color: theme - .colorPrimary, - width: 2.0, - ), ), ), - validator: (value) { - if (value == null || - value.isEmpty || - !value.isEmail) { - return 'Please enter a valid email'; - } - return null; - }, - ), - SizedBox(height: 10), - - TextFormField( - decoration: InputDecoration( - labelText: 'Phone Number', - border: UnderlineInputBorder(), - enabledBorder: UnderlineInputBorder( - borderSide: BorderSide( - color: theme - .colorPrimary, - width: 1.0, - ), + Positioned( + top: 100, + child: CircleAvatar( + radius: 70, + backgroundImage: + AssetImage('assets/images/profile_icon.png'), + backgroundColor: theme.colorLevel3, ), - focusedBorder: UnderlineInputBorder( - borderSide: BorderSide( - color: theme - .colorPrimary, - width: 2.0, - ), - ), - suffixIcon: Icon(Icons.arrow_forward_ios), ), - validator: (value) { - if (value == null || value.isEmpty) { - return 'Please enter your number'; - } - return null; - }, - ), - SizedBox(height: 10), - - Obx(() => DropdownButtonFormField( - value: controller.selectedYear.value, - decoration: InputDecoration( - labelText: 'Year', - border: UnderlineInputBorder(), - enabledBorder: UnderlineInputBorder( - borderSide: BorderSide( - color: theme - .colorPrimary, - width: 1.0, - ), - ), - focusedBorder: UnderlineInputBorder( - borderSide: BorderSide( - color: theme - .colorPrimary, - width: 2.0, - ), + Positioned( + //edit icon can be removed + top: 190, + right: 110, + child: Container( + decoration: BoxDecoration( + shape: BoxShape.circle, + color: theme.colorPrimary, + ), + child: Padding( + padding: const EdgeInsets.all(10.0), + child: Icon( + Icons.edit, + color: theme.dayNight, + size: 30, ), ), - validator: (value) { - if (value == null || value.isEmpty) { - return 'Please select your year'; - } - return null; - }, - icon: Icon(Icons.arrow_forward_ios), - onChanged: (String? newValue) { - if (newValue != null) { - controller.setSelectedYear(newValue); - } - }, - items: controller.years - .map>((String value) { - return DropdownMenuItem( - value: value, - child: Text(value), - ); - }).toList(), - )), - SizedBox(height: 10), - - - ElevatedButton( - onPressed: () { - if (_formKey.currentState!.validate()) { - - } - }, - style: ElevatedButton.styleFrom( - backgroundColor: theme.colorLevel2, - padding: const EdgeInsets.symmetric( - horizontal: 80, vertical: 12), - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(10), - ), - ), - child: Text( - 'Update', - style: theme.kTitleTextStyle.copyWith( - color: theme.colorLevel3, - fontSize: 20, ), ), - ), - ], + ], + ), ), - ), - SizedBox(height: 20), - ], + const SizedBox(height: 20), + Obx( + () => controller.isEditing.value + ? _buildProfileDetails(context, theme) + : _buildEditableForm(context, theme), + ), + const SizedBox(height: 20), + ], + ), ), ), ), ), ); } + + Widget _buildProfileDetails(BuildContext context, ThemeData theme) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'Name: ${controller.nameController.text}', // Displaying updated name + style: theme.kTitleTextStyle + .copyWith(fontSize: 20, color: theme.colorPrimary), + ), + const SizedBox(height: 20), + Text( + 'Gender: ${controller.selectedGender.value ?? " "}', // Displaying updated gender + style: theme.kTitleTextStyle + .copyWith(fontSize: 20, color: theme.colorPrimary), + ), + const SizedBox(height: 20), + Text( + 'Email: ${controller.emailController.text}', // Displaying updated email + style: theme.kTitleTextStyle + .copyWith(fontSize: 20, color: theme.colorPrimary), + ), + const SizedBox(height: 20), + Text( + 'Year: ${controller.selectedYear.value ?? " "}', // Displaying updated year + style: theme.kTitleTextStyle + .copyWith(fontSize: 20, color: theme.colorPrimary), + ), + const SizedBox(height: 20), + Text( + 'Registeration No. : ${controller.regNoController.text}', // Displaying updated registration number + style: theme.kTitleTextStyle + .copyWith(fontSize: 20, color: theme.colorPrimary), + ), + const SizedBox(height: 20), + Text( + 'Phone No. : ${controller.phoneController.text}', // Displaying updated phone number + style: theme.kTitleTextStyle + .copyWith(fontSize: 20, color: theme.colorPrimary), + ), + const SizedBox(height: 30), + Center( + child: ElevatedButton( + onPressed: controller.toggleEditMode, + style: ElevatedButton.styleFrom( + backgroundColor: theme.colorLevel2, + padding: const EdgeInsets.symmetric(horizontal: 80, vertical: 12), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10), + ), + ), + child: Text( + 'Edit Profile', + style: theme.kTitleTextStyle.copyWith( + color: theme.colorLevel3, + fontSize: 20, + ), + ), + ), + ), + ], + ); + } + + Widget _buildEditableForm(BuildContext context, ThemeData theme) { + return Form( + key: controller.formKey, + child: Column( + children: [ + TextFormField( + controller: controller.nameController, + decoration: InputDecoration( + labelText: 'Name', + border: const UnderlineInputBorder(), + enabledBorder: UnderlineInputBorder( + borderSide: BorderSide( + color: theme.colorPrimary, + width: 1.0, + ), + ), + focusedBorder: UnderlineInputBorder( + borderSide: BorderSide( + color: theme.colorPrimary, + width: 2.0, + ), + ), + ), + ), + const SizedBox(height: 10), + TextFormField( + controller: controller.emailController, + decoration: InputDecoration( + labelText: 'Email', + border: const UnderlineInputBorder(), + enabledBorder: UnderlineInputBorder( + borderSide: BorderSide( + color: theme.colorPrimary, + width: 1.0, + ), + ), + focusedBorder: UnderlineInputBorder( + borderSide: BorderSide( + color: theme.colorPrimary, + width: 2.0, + ), + ), + ), + ), + const SizedBox(height: 10), + TextFormField( + controller: controller.regNoController, + decoration: InputDecoration( + labelText: 'Registeration No.', + border: const UnderlineInputBorder(), + enabledBorder: UnderlineInputBorder( + borderSide: BorderSide( + color: theme.colorPrimary, + width: 1.0, + ), + ), + focusedBorder: UnderlineInputBorder( + borderSide: BorderSide( + color: theme.colorPrimary, + width: 2.0, + ), + ), + ), + ), + const SizedBox(height: 10), + TextFormField( + controller: controller.phoneController, + decoration: InputDecoration( + labelText: 'Phone No.', + border: const UnderlineInputBorder(), + enabledBorder: UnderlineInputBorder( + borderSide: BorderSide( + color: theme.colorPrimary, + width: 1.0, + ), + ), + focusedBorder: UnderlineInputBorder( + borderSide: BorderSide( + color: theme.colorPrimary, + width: 2.0, + ), + ), + ), + ), + const SizedBox(height: 10), + DropdownButtonFormField( + value: controller.selectedGender.value, + items: controller.genders + .map((gender) => + DropdownMenuItem(value: gender, child: Text(gender))) + .toList(), + onChanged: controller.selectedGender, + decoration: InputDecoration( + labelText: 'Gender', + border: const UnderlineInputBorder(), + enabledBorder: UnderlineInputBorder( + borderSide: BorderSide( + color: theme.colorPrimary, + width: 1.0, + ), + ), + focusedBorder: UnderlineInputBorder( + borderSide: BorderSide( + color: theme.colorPrimary, + width: 2.0, + ), + ), + ), + ), + const SizedBox(height: 10), + DropdownButtonFormField( + value: controller.selectedYear.value, + items: controller.years + .map((year) => DropdownMenuItem(value: year, child: Text(year))) + .toList(), + onChanged: controller.selectedYear, + decoration: InputDecoration( + labelText: 'Year', + border: const UnderlineInputBorder(), + enabledBorder: UnderlineInputBorder( + borderSide: BorderSide( + color: theme.colorPrimary, + width: 1.0, + ), + ), + focusedBorder: UnderlineInputBorder( + borderSide: BorderSide( + color: theme.colorPrimary, + width: 2.0, + ), + ), + ), + ), + const SizedBox(height: 30), + Center( + child: ElevatedButton( + onPressed: () { + if (controller.formKey.currentState!.validate()) { + controller.saveProfile(); + } + }, + style: ElevatedButton.styleFrom( + backgroundColor: theme.colorLevel2, + padding: + const EdgeInsets.symmetric(horizontal: 80, vertical: 12), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10), + ), + ), + child: Text( + 'Update', + style: theme.kTitleTextStyle.copyWith( + color: theme.colorLevel3, + fontSize: 20, + ), + ), + ), + ), + ], + ), + ); + } } diff --git a/lib/app/modules/registration/controllers/registration_controller.dart b/lib/app/modules/registration/controllers/registration_controller.dart index 5f0281e..91f91bd 100644 --- a/lib/app/modules/registration/controllers/registration_controller.dart +++ b/lib/app/modules/registration/controllers/registration_controller.dart @@ -1,9 +1,10 @@ +import 'package:flutter/cupertino.dart'; import 'package:get/get.dart'; class RegistrationController extends GetxController { - //TODO: Implement RegistrationController final count = 0.obs; + @override void onInit() { super.onInit(); @@ -21,3 +22,4 @@ class RegistrationController extends GetxController { void increment() => count.value++; } + diff --git a/lib/app/modules/registration/views/registration_view.dart b/lib/app/modules/registration/views/registration_view.dart index 4592b59..e13fcd0 100644 --- a/lib/app/modules/registration/views/registration_view.dart +++ b/lib/app/modules/registration/views/registration_view.dart @@ -1,10 +1,9 @@ import 'package:flutter/material.dart'; import 'package:get/get.dart'; -import 'package:get/get_connect/http/src/utils/utils.dart'; import 'package:managment_app/Themes/themes.dart'; +import 'package:managment_app/app/modules/home/views/home_view.dart'; import '../../../../components/kDropDownButton.dart'; import '../../../../components/kTextField.dart'; -import '../controllers/registration_controller.dart'; class RegistrationView extends StatefulWidget { const RegistrationView({Key? key}) : super(key: key); @@ -16,6 +15,7 @@ class RegistrationView extends StatefulWidget { class _RegistrationViewState extends State { // Create a GlobalKey for the Form final formKey = GlobalKey(); + @override Widget build(BuildContext context) { return Scaffold( @@ -40,124 +40,148 @@ class _RegistrationViewState extends State { key: formKey, child: Column( children: [ - SingleChildScrollView( - child: Padding( - padding: const EdgeInsets.all(16.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - const SizedBox(height: 10), - Center( - child: Text( - 'STUDENT DETAILS', - style: Get.theme.kSubTitleTextStyle, - ), + Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const SizedBox(height: 10), + Center( + child: Text( + 'STUDENT DETAILS', + style: Get.theme.kSubTitleTextStyle, + ), + ), + const SizedBox(height: 20), + Container( + padding: const EdgeInsets.all(16.0), + decoration: BoxDecoration( + boxShadow: [ + BoxShadow( + blurRadius: 8, + color: Get.theme.colorLevel0, + spreadRadius: 5, + ) + ], + color: Get.theme.colorLevel2, + borderRadius: BorderRadius.circular(15), ), - const SizedBox(height: 20), - Container( - padding: const EdgeInsets.all(16.0), - decoration: BoxDecoration( - boxShadow: [ - BoxShadow( - blurRadius: 8, - color: Get.theme.colorLevel0, - spreadRadius: 5, - ) - ], - color: Get.theme.colorLevel2, - borderRadius: BorderRadius.circular(15), - ), - child: Column( - children: [ - buildTextField( - labelText: 'NAME:', - validator: (value) { - if (value == null || - value.isEmpty || - !value.isNAME) { - return 'Please enter name'; - } - return null; - }, - ), - const SizedBox(height: 30), - buildTextField( - labelText: 'REGISTRATION NO:', - validator: (value) { - if (value == null || value.isEmpty) { - return 'Please enter registration number'; - } - return null; - }, - ), - const SizedBox(height: 30), - buildDropdownButtonFormField( - labelText: 'DESIGNATION:', - items: [ - 'VOLUNTEER', - 'COMMITTEE MEMBER', - 'COMMITTEE HEAD', - 'ORGANIZER' - ], - validator: (value) { - if (value == null || value.isEmpty) { - return 'Please select a designation'; - } else - return null; - }, - ), - const SizedBox(height: 30), - buildTextField( - labelText: 'DEPARTMENT:', - validator: (value) { - if (value == null || value.isEmpty) { - return 'Please enter your department'; - } - return null; - }, - ), - const SizedBox(height: 30), - buildDropdownButtonFormField( - labelText: 'DIVISION:', - items: ['A', 'B', 'C'], - validator: (value) { - if (value == null || value.isEmpty) { - return 'Please select a division'; - } - return null; - }, - ), - const SizedBox(height: 30), - buildTextField( - labelText: 'NET ID:', - validator: (value) { - if (value == null || value.isEmpty) { - return 'Please enter your net ID'; - } - return null; - }, - ), - const SizedBox(height: 30), - buildTextField( - labelText: 'Ph no:', - validator: (value) { - if (value == null || value.isEmpty) { - return 'Please enter your phone number'; - } - return null; - }, - ), - const SizedBox(height: 30), - ], - ), + child: Column( + children: [ + buildTextField( + labelText: 'NAME:', + validator: (value) { + if (value == null || value.isEmpty) { + return 'Please enter name'; + } + return null; + }, + ), + const SizedBox(height: 30), + buildTextField( + labelText: 'REGISTRATION NO:', + validator: (value) { + if (value == null || value.isEmpty) { + return 'Please enter registration number'; + } + return null; + }, + ), + const SizedBox(height: 30), + buildDropdownButtonFormField( + labelText: 'DESIGNATION:', + items: [ + 'VOLUNTEER', + 'COMMITTEE MEMBER', + 'COMMITTEE HEAD', + 'ORGANIZER' + ], + validator: (value) { + if (value == null || value.isEmpty) { + return 'Please select a designation'; + } + return null; + }, + ), + const SizedBox(height: 30), + buildTextField( + labelText: 'DEPARTMENT:', + validator: (value) { + if (value == null || value.isEmpty) { + return 'Please enter your department'; + } + return null; + }, + ), + const SizedBox(height: 30), + buildDropdownButtonFormField( + labelText: 'DIVISION:', + items: ['A', 'B', 'C'], + validator: (value) { + if (value == null || value.isEmpty) { + return 'Please select a division'; + } + return null; + }, + ), + const SizedBox(height: 30), + buildTextField( + labelText: 'NET ID:', + validator: (value) { + if (value == null || value.isEmpty) { + return 'Please enter your net ID'; + } + return null; + }, + ), + const SizedBox(height: 30), + buildTextField( + labelText: 'Ph no:', + validator: (value) { + if (value == null || value.isEmpty) { + return 'Please enter your phone number'; + } + return null; + }, + ), + const SizedBox(height: 30), + ], ), - ], - ), + ), + ], ), ), ElevatedButton.icon( onPressed: () { - if (formKey.currentState!.validate()) {} + // Check if the form is valid + if (formKey.currentState?.validate() ?? false) { + // If all fields are valid + Get.snackbar( + 'Enrolled Successfully', + 'User has been enrolled successfully', + snackPosition: SnackPosition.TOP, + backgroundColor: Colors.grey[300], + colorText: Colors.black, + icon: Icon(Icons.check_circle, color: Colors.green), + margin: const EdgeInsets.all(10), + duration: const Duration(seconds: 2), + ); + Future.delayed(const Duration(seconds: 2), () { + Get.to(() => HomeView()); + }); + } else { + // If there are validation errors + Get.snackbar( + 'Validation Error', + 'Please fill all fields correctly', + snackPosition: SnackPosition.TOP, + backgroundColor: Colors.red[300], + colorText: Colors.white, + icon: Icon(Icons.error, color: Colors.white), + margin: const EdgeInsets.all(10), + duration: const Duration(seconds: 4), + ); + } }, style: ElevatedButton.styleFrom( backgroundColor: Get.theme.colorLevel1, @@ -168,8 +192,8 @@ class _RegistrationViewState extends State { mainAxisAlignment: MainAxisAlignment.center, children: [ Text( - style: Get.theme.kSmallTextStyle, 'ENROLL', + style: Get.theme.kSmallTextStyle, ), const SizedBox( width: 10, @@ -177,6 +201,7 @@ class _RegistrationViewState extends State { Image.asset('assets/images/Login.png'), ], ), + icon: const SizedBox.shrink(), ), ], ), diff --git a/lib/app/modules/teamAttendance/views/team_attendance_view.dart b/lib/app/modules/teamAttendance/views/team_attendance_view.dart index 3071cc2..8b9e5f3 100644 --- a/lib/app/modules/teamAttendance/views/team_attendance_view.dart +++ b/lib/app/modules/teamAttendance/views/team_attendance_view.dart @@ -3,13 +3,15 @@ import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:managment_app/Themes/themes.dart'; +import 'package:managment_app/app/modules/markAttendanceView/views/mark_attendance_view.dart'; +import '../../home/views/home_view.dart'; import '../controllers/team_attendance_controller.dart'; class TeamAttendanceView extends GetView { const TeamAttendanceView({super.key}); - +//MY TEAM PAGE PE ICON PE CLICK KARNE SE IT WILL USE THE SAME PAGE BUT DIFFERENT LOGIC JISME ORGANISERS PE CLICK KARNE PE SIRF ORGANISER KA AAYEGA @override Widget build(BuildContext context) { @@ -19,7 +21,9 @@ class TeamAttendanceView extends GetView { appBar: AppBar( leading: IconButton( icon: Container(padding: const EdgeInsets.all(5),child: Image.asset('assets/images/icon.png'),), - onPressed: () {}, + onPressed: () { + Get.back(); + }, ), backgroundColor: Get.theme.colorLevel1, title: Text('MY TEAM', diff --git a/lib/app/modules/teamPage/views/team_page_view.dart b/lib/app/modules/teamPage/views/team_page_view.dart index 914c9c3..08e1051 100644 --- a/lib/app/modules/teamPage/views/team_page_view.dart +++ b/lib/app/modules/teamPage/views/team_page_view.dart @@ -39,7 +39,7 @@ class TeamPageView extends GetView { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - const SizedBox(height: 35.0), + const SizedBox(height: 30.0), Center( child: Text( 'MY TEAM', @@ -51,36 +51,36 @@ class TeamPageView extends GetView { ), ), ), - const SizedBox(height: 35), + const SizedBox(height: 20), TeamTile( title: 'ORGANIZERS', subtitle: '5 members', onTap: () { - Get.toNamed('/teamDetails', arguments: 'Organizers'); + Get.toNamed('/team-attendance', arguments: 'Organizers'); }, ), - const SizedBox(height: 35), + const SizedBox(height: 20), TeamTile( title: 'HEADS', subtitle: '8 members', onTap: () { - Get.toNamed('/teamDetails', arguments: 'Heads'); + Get.toNamed('/team-attendance', arguments: 'Heads'); }, ), - const SizedBox(height: 35), + const SizedBox(height: 20), TeamTile( title: 'MEMBERS', subtitle: '11 members', onTap: () { - Get.toNamed('/teamDetails', arguments: 'Members'); + Get.toNamed('/team-attendance', arguments: 'Members'); }, ), - const SizedBox(height: 35), + const SizedBox(height: 20), TeamTile( title: 'VOLUNTEERS', subtitle: '20 members', onTap: () { - Get.toNamed('/teamDetails', arguments: 'Volunteers'); + Get.toNamed('/team-attendance', arguments: 'Volunteers'); }, ), const SizedBox(height: 20), diff --git a/lib/app/routes/app_pages.dart b/lib/app/routes/app_pages.dart index 990a292..bcd7f7d 100644 --- a/lib/app/routes/app_pages.dart +++ b/lib/app/routes/app_pages.dart @@ -1,6 +1,5 @@ import 'package:get/get.dart'; - import '../modules/Settings/bindings/settings_binding.dart'; import '../modules/Settings/views/settings_view.dart'; import '../modules/dashboard/binding/dashboard_binding.dart'; @@ -9,7 +8,6 @@ import '../modules/home/bindings/home_binding.dart'; import '../modules/home/views/home_view.dart'; import '../modules/login/bindings/login_binding.dart'; import '../modules/login/views/login_view.dart'; -import '../modules/login/views/login_view.dart'; import '../modules/markAttendanceView/bindings/mark_attendance_view_binding.dart'; import '../modules/markAttendanceView/views/mark_attendance_view.dart'; import '../modules/meetings/bindings/meetings_binding.dart'; @@ -18,13 +16,6 @@ import '../modules/profileEdit/bindings/profile_edit_binding.dart'; import '../modules/profileEdit/views/profile_edit_view.dart'; import '../modules/registration/bindings/registration_binding.dart'; import '../modules/registration/views/registration_view.dart'; - -import '../modules/markAttendanceView/views/mark_attendance_view.dart'; -import '../modules/meetings/bindings/meetings_binding.dart'; -import '../modules/meetings/views/meetings_view.dart'; -import '../modules/profileEdit/bindings/profile_edit_binding.dart'; -import '../modules/profileEdit/views/profile_edit_view.dart'; - import '../modules/teamAttendance/bindings/team_attendance_binding.dart'; import '../modules/teamAttendance/views/team_attendance_view.dart'; import '../modules/teamPage/bindings/team_page_binding.dart'; @@ -34,18 +25,18 @@ part 'app_routes.dart'; class AppPages { AppPages._(); - static const INITIAL = Routes.TEAM_PAGE; + static const INITIAL = Routes.LOGIN_VIEW; static final routes = [ GetPage( name: _Paths.HOME, - page: () => const HomeView(), + page: () => HomeView(), binding: HomeBinding(), ), GetPage( name: _Paths.MEETINGS, - page: () => const MeetingsView(), + page: () => MeetingsView(), binding: MeetingsBinding(), ), GetPage( @@ -70,15 +61,15 @@ class AppPages { ), GetPage( name: _Paths.PROFILE_EDIT, - page: () => ProfileEditView(), + page: () => ProfileEditView(), binding: ProfileEditBinding(), ), GetPage( name: _Paths.SETTINGS, page: () => const SettingsView(), binding: SettingsBinding(), - ), - GetPage( + ), + GetPage( name: _Paths.REGISTRATION, page: () => const RegistrationView(), binding: RegistrationBinding(), diff --git a/lib/components/MeetsConductedTile.dart b/lib/components/MeetsConductedTile.dart index 3e96cce..4165d82 100644 --- a/lib/components/MeetsConductedTile.dart +++ b/lib/components/MeetsConductedTile.dart @@ -43,7 +43,7 @@ class MeetsConductedTile extends StatelessWidget { backgroundColor: Colors.blue[100], ), child: Center( - child: Text('Update\nAttendance', textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontSize: 10))),)) + child: Text('Update\nAttendance', textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontSize: 9))),)) ], ) diff --git a/lib/components/SettingButton.dart b/lib/components/SettingButton.dart index 37b152f..3b39c9f 100644 --- a/lib/components/SettingButton.dart +++ b/lib/components/SettingButton.dart @@ -22,7 +22,7 @@ class Settingbutton extends StatelessWidget { ), ), - onPressed: () {}, + onPressed: onPressed, child: Text( title, style: theme.kSubTitleTextStyle, diff --git a/lib/components/bottom_navigation_bar.dart b/lib/components/bottom_navigation_bar.dart new file mode 100644 index 0000000..0020804 --- /dev/null +++ b/lib/components/bottom_navigation_bar.dart @@ -0,0 +1,51 @@ +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; +import 'package:managment_app/Themes/themes.dart'; + +class BottomNavBar extends StatelessWidget { + final int selectedIndex; + final Function(int) onTap; + + BottomNavBar({required this.selectedIndex, required this.onTap}); + + @override + Widget build(BuildContext context) { + final theme = Theme.of(context); + + return BottomNavigationBar( + currentIndex: selectedIndex, + onTap: onTap, + items: [ + BottomNavigationBarItem( + icon: Icon(Icons.home, + color: + selectedIndex == 0 ? theme.colorPrimary : theme.colorLevel3), + label: '', + ), + BottomNavigationBarItem( + icon: Icon(Icons.add_box, + color: + selectedIndex == 1 ? theme.colorPrimary : theme.colorLevel3), + label: '', + ), + BottomNavigationBarItem( + icon: Icon(Icons.person, + color: + selectedIndex == 2 ? theme.colorPrimary : theme.colorLevel3), + label: '', + ), + BottomNavigationBarItem( + icon: Icon(Icons.settings, + color: + selectedIndex == 3 ? theme.colorPrimary : theme.colorLevel3), + label: '', + ), + ], + backgroundColor: theme.colorLevel0, + selectedItemColor: theme.colorPrimary, + unselectedItemColor: theme.colorLevel3, + showSelectedLabels: false, + showUnselectedLabels: false, + ); + } +} \ No newline at end of file