diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png index db77bb4..7e1e703 100644 Binary files a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png index 17987b7..51ead20 100644 Binary files a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png index 09d4391..3f0dc79 100644 Binary files a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png index d5f1c8d..2c117c8 100644 Binary files a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png index 4d6372e..16e07ac 100644 Binary files a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/assets/images/IconsImg/favicon_ts.png b/assets/images/IconsImg/favicon_ts.png new file mode 100644 index 0000000..53caf6a Binary files /dev/null and b/assets/images/IconsImg/favicon_ts.png differ diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index eea5c93..9cfd81c 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -427,7 +427,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -484,7 +484,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json index d36b1fa..d0d98aa 100644 --- a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,122 +1 @@ -{ - "images" : [ - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@3x.png", - "scale" : "3x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@3x.png", - "scale" : "3x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@3x.png", - "scale" : "3x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@2x.png", - "scale" : "2x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@3x.png", - "scale" : "3x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@1x.png", - "scale" : "1x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@1x.png", - "scale" : "1x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@1x.png", - "scale" : "1x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@2x.png", - "scale" : "2x" - }, - { - "size" : "83.5x83.5", - "idiom" : "ipad", - "filename" : "Icon-App-83.5x83.5@2x.png", - "scale" : "2x" - }, - { - "size" : "1024x1024", - "idiom" : "ios-marketing", - "filename" : "Icon-App-1024x1024@1x.png", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} +{"images":[{"size":"20x20","idiom":"iphone","filename":"Icon-App-20x20@2x.png","scale":"2x"},{"size":"20x20","idiom":"iphone","filename":"Icon-App-20x20@3x.png","scale":"3x"},{"size":"29x29","idiom":"iphone","filename":"Icon-App-29x29@1x.png","scale":"1x"},{"size":"29x29","idiom":"iphone","filename":"Icon-App-29x29@2x.png","scale":"2x"},{"size":"29x29","idiom":"iphone","filename":"Icon-App-29x29@3x.png","scale":"3x"},{"size":"40x40","idiom":"iphone","filename":"Icon-App-40x40@2x.png","scale":"2x"},{"size":"40x40","idiom":"iphone","filename":"Icon-App-40x40@3x.png","scale":"3x"},{"size":"57x57","idiom":"iphone","filename":"Icon-App-57x57@1x.png","scale":"1x"},{"size":"57x57","idiom":"iphone","filename":"Icon-App-57x57@2x.png","scale":"2x"},{"size":"60x60","idiom":"iphone","filename":"Icon-App-60x60@2x.png","scale":"2x"},{"size":"60x60","idiom":"iphone","filename":"Icon-App-60x60@3x.png","scale":"3x"},{"size":"20x20","idiom":"ipad","filename":"Icon-App-20x20@1x.png","scale":"1x"},{"size":"20x20","idiom":"ipad","filename":"Icon-App-20x20@2x.png","scale":"2x"},{"size":"29x29","idiom":"ipad","filename":"Icon-App-29x29@1x.png","scale":"1x"},{"size":"29x29","idiom":"ipad","filename":"Icon-App-29x29@2x.png","scale":"2x"},{"size":"40x40","idiom":"ipad","filename":"Icon-App-40x40@1x.png","scale":"1x"},{"size":"40x40","idiom":"ipad","filename":"Icon-App-40x40@2x.png","scale":"2x"},{"size":"50x50","idiom":"ipad","filename":"Icon-App-50x50@1x.png","scale":"1x"},{"size":"50x50","idiom":"ipad","filename":"Icon-App-50x50@2x.png","scale":"2x"},{"size":"72x72","idiom":"ipad","filename":"Icon-App-72x72@1x.png","scale":"1x"},{"size":"72x72","idiom":"ipad","filename":"Icon-App-72x72@2x.png","scale":"2x"},{"size":"76x76","idiom":"ipad","filename":"Icon-App-76x76@1x.png","scale":"1x"},{"size":"76x76","idiom":"ipad","filename":"Icon-App-76x76@2x.png","scale":"2x"},{"size":"83.5x83.5","idiom":"ipad","filename":"Icon-App-83.5x83.5@2x.png","scale":"2x"},{"size":"1024x1024","idiom":"ios-marketing","filename":"Icon-App-1024x1024@1x.png","scale":"1x"}],"info":{"version":1,"author":"xcode"}} \ No newline at end of file diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png index dc9ada4..33b3fcf 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png index 7353c41..0c23abb 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png index 797d452..f9563c2 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png index 6ed2d93..b62dd20 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png index 4cd7b00..cd6297c 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png index fe73094..6d1afb2 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png index 321773c..7ce0d7b 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png index 797d452..f9563c2 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png index 502f463..4284a47 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png index 0ec3034..e7d6cf8 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png new file mode 100644 index 0000000..ab81d94 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png new file mode 100644 index 0000000..1bd1418 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png new file mode 100644 index 0000000..5bfb2b7 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png new file mode 100644 index 0000000..f429496 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png index 0ec3034..e7d6cf8 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png index e9f5fea..2907f61 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png new file mode 100644 index 0000000..7e1e703 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png new file mode 100644 index 0000000..2c117c8 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png index 84ac32a..973441c 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png index 8953cba..1f63be3 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png index 0467bf1..bd619b0 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/lib/Screens/organization/orgSetup.dart b/lib/Screens/organization/orgSetup.dart index 08d046b..36d9396 100644 --- a/lib/Screens/organization/orgSetup.dart +++ b/lib/Screens/organization/orgSetup.dart @@ -583,16 +583,18 @@ class _OrgSetUpState extends State { isDesktop: isDesktop, breadcrumbItems: [ BreadcrumbItem( - title: 'Organization Settings', - tooltip: 'Go To Organization Settings', - onTap: (context) { - context.go("/OrganizationSettings"); - } + title: 'Organization Settings', + tooltip: 'Go To Organization Settings', + onTap: (context) { + context.go("/OrganizationSettings"); + }, ), BreadcrumbItem( - title: selectedOrg != null && selectedOrg!.isNotEmpty - ? "Update Organization" - : "Create Organization", + title: + selectedOrg != null && + selectedOrg!.isNotEmpty + ? "Update Organization" + : "Create Organization", ), ], ), @@ -991,7 +993,7 @@ class _OrgSetUpState extends State { case 'train': return Icons.train_outlined; case 'bus': - return Icons.bus_alert_outlined; + return Icons.directions_bus_rounded; case 'taxi': return Icons.local_taxi_outlined; case 'accomodation': diff --git a/lib/Screens/plans/create_plans.dart b/lib/Screens/plans/create_plans.dart index 8a32d7d..1070859 100644 --- a/lib/Screens/plans/create_plans.dart +++ b/lib/Screens/plans/create_plans.dart @@ -3405,7 +3405,7 @@ class CreateNewPlansState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - "Reason For Exceptional Class *", // Your label + "Reason for travel policy exception*", // Your label style: GoogleFonts.poppins( fontSize: 12, fontWeight: FontWeight.w600, @@ -3422,6 +3422,7 @@ class CreateNewPlansState extends State { ? MediaQuery.of(context).size.width * 0.42 : null, isDesktop: widget.isDesktop, + hasError: validationErrors["exceptional_plan_reason"] != null, child: SizedBox( height: 55, child: TextField( @@ -3432,7 +3433,7 @@ class CreateNewPlansState extends State { style: TextStyle(fontSize: 12), enabled: !widget.isViewMode, decoration: InputDecoration( - labelText: "Exceptional Description", + labelText: "Reason for exception ", labelStyle: GoogleFonts.poppins( fontSize: 12, color: Colors.grey, @@ -3440,6 +3441,7 @@ class CreateNewPlansState extends State { // labelStyle: TextStyle(fontSize: 12, color: Colors.grey), floatingLabelBehavior: FloatingLabelBehavior.never, border: InputBorder.none, + contentPadding: EdgeInsets.symmetric(vertical: 1), ), ), diff --git a/lib/Screens/userManagement/create_traveller_agent/createTravelAgent.dart b/lib/Screens/userManagement/create_traveller_agent/createTravelAgent.dart index f5a5536..42896e0 100644 --- a/lib/Screens/userManagement/create_traveller_agent/createTravelAgent.dart +++ b/lib/Screens/userManagement/create_traveller_agent/createTravelAgent.dart @@ -11,7 +11,6 @@ import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter/services.dart'; - import 'package:frontend/utils/auth_utils.dart'; import 'package:go_router/go_router.dart'; import 'package:google_fonts/google_fonts.dart'; @@ -36,10 +35,12 @@ import 'package:universal_html/html.dart' as html; class CreateTravelAgentFormDetials extends StatefulWidget { @override - _CreateTravelAgentFormDetialsState createState() => _CreateTravelAgentFormDetialsState(); + _CreateTravelAgentFormDetialsState createState() => + _CreateTravelAgentFormDetialsState(); } -class _CreateTravelAgentFormDetialsState extends State { +class _CreateTravelAgentFormDetialsState + extends State { final ApiService apiService = ApiService(); final GlobalKey personalDetailsKey = @@ -92,7 +93,8 @@ class _CreateTravelAgentFormDetialsState extends State?; - // - // if (extraData != null) { - // print("extraData: ${extraData['selectedUser']}"); - // - // setState(() { - // // apiCountryData = extraData['apiCountryData']; - // // apiUserData = extraData['apiUserData']; - // // - // // userList = apiUserData ?? []; - // // userMap = { - // // for (var user in userList) - // // user['user_id'].toString(): "${user['first_name']} ${user['last_name']}" - // // }; - // // userIdsApi = userMap.keys.toList(); - // - // // Handle selectedUser as a Map (not a List) - // apiselectedUser = - // extraData['selectedUser'] - // as Map?; // Cast it as a Map - // isViewMode = extraData['isViewMode'] ?? false; - // isEditProfile = extraData['isEditProfile'] ?? false; - // }); - // - // print("selectedUser: $apiselectedUser"); - // - // // Add another post-frame callback to check after setState - // // await Future.delayed(Duration( - // // milliseconds: 100)); // Optional delay to ensure UI has updated - // updateData(); - // } - // - // initializeData(); - // fetchCountries(); - // fetchDepartment(); - // fetchUsers(); - // fetchRoles(); - // loadInitialData(); - // }); - // - // for (var field in dataHeader) { - // controllers[field] = TextEditingController(); - // } - // } void initState() { super.initState(); setState(() { @@ -746,7 +675,7 @@ class _CreateTravelAgentFormDetialsState extends State const SavingLoader(), - ); if (selectedRole == "5") { print("NO validation"); @@ -948,8 +849,8 @@ class _CreateTravelAgentFormDetialsState extends State data) { @@ -963,6 +864,7 @@ class _CreateTravelAgentFormDetialsState extends State getTabs(bool setSelectesUserType) { // print(setSelectesUserType); // if (setSelectesUserType || selectedRole == "5") { - return {"personal": "Personal Details"}; + return {"personal": "Personal Details"}; // } else { // return allTabs; // } diff --git a/lib/Screens/userManagement/create_traveller_agent/personalDetailsTravelAgent.dart b/lib/Screens/userManagement/create_traveller_agent/personalDetailsTravelAgent.dart index 11f5234..6205db4 100644 --- a/lib/Screens/userManagement/create_traveller_agent/personalDetailsTravelAgent.dart +++ b/lib/Screens/userManagement/create_traveller_agent/personalDetailsTravelAgent.dart @@ -257,7 +257,8 @@ class PersonalDetailsState extends State { if (!mounted) return; setState(() { - final filteredRole = roleList.where((item) => item['dropdown_key'] == '5').toList(); + final filteredRole = + roleList.where((item) => item['dropdown_key'] == '5').toList(); apiRoleData = filteredRole; }); print("APIROLEData - $apiRoleData"); @@ -397,6 +398,17 @@ class PersonalDetailsState extends State { // color: Color(0xFF212121)), ), SizedBox(height: 10), + + if (widget.errorMessages["agent_supported_service_ids"] != null) ...[ + SizedBox(height: 5), // Space before error message + Align( + alignment: Alignment.center, + child: Text( + widget.errorMessages["agent_supported_service_ids"]!, + style: GoogleFonts.poppins(color: Colors.red, fontSize: 12), + ), + ), + ], Container( decoration: BoxDecoration( border: Border.all(color: Color(0xFFF4F4FB)), @@ -651,7 +663,7 @@ class PersonalDetailsState extends State { width: MediaQuery.of(context).size.width * 0.015, ), buildRole(), - ] + ], ], ) : Column( @@ -1201,7 +1213,7 @@ class PersonalDetailsState extends State { countryMap = { for (var country in countryList) (country['country_code'] ?? ''): - '${country['country_name'] ?? ''} (${country['country_code'] ?? ''})', + '${country['country_name'] ?? ''} (${country['country_code'] ?? ''})', }; // Extract only country codes for processing @@ -1234,19 +1246,19 @@ class PersonalDetailsState extends State { fit: FlexFit.loose, // Allows flexible height menuProps: const MenuProps(backgroundColor: Colors.white), itemBuilder: - // (context, item, isSelected) => Container( - // padding: EdgeInsets.symmetric( - // horizontal: 10, - // vertical: 6, - // ), - // child: Text( - // item, - // style: GoogleFonts.poppins(fontSize: 11.5), - // ), - // ), - (context, item, isSelected) { + // (context, item, isSelected) => Container( + // padding: EdgeInsets.symmetric( + // horizontal: 10, + // vertical: 6, + // ), + // child: Text( + // item, + // style: GoogleFonts.poppins(fontSize: 11.5), + // ), + // ), + (context, item, isSelected) { print("contryItem - $item"); - final match = RegExp(r'^(.*)\s\((.*)\)$',).firstMatch(item); + final match = RegExp(r'^(.*)\s\((.*)\)$').firstMatch(item); final countryName = match?.group(1) ?? ''; final countryCode = match?.group(2) ?? ''; return Padding( @@ -1265,13 +1277,16 @@ class PersonalDetailsState extends State { ), Text( countryCode, - style: GoogleFonts.poppins(fontSize: 11.5,color:Colors.grey), - + style: GoogleFonts.poppins( + fontSize: 11.5, + color: Colors.grey, + ), ), ], ), ), - );}, + ); + }, constraints: BoxConstraints(maxHeight: 200), searchFieldProps: TextFieldProps( decoration: InputDecoration( @@ -1388,7 +1403,6 @@ class PersonalDetailsState extends State { } Widget buildRole() { - Map roleMap = { for (var item in apiRoleData ?? []) item['dropdown_key'] as String: item['dropdown_value'] as String, @@ -1415,7 +1429,7 @@ class PersonalDetailsState extends State { child: SizedBox( height: 40, child: DropdownSearch( - selectedItem: roleMap[selectedRole] , + selectedItem: roleMap[selectedRole], enabled: false, //enabled: !widget.isViewMode, popupProps: PopupProps.menu( showSearchBox: true, @@ -1424,16 +1438,16 @@ class PersonalDetailsState extends State { menuProps: const MenuProps(backgroundColor: Colors.white), itemBuilder: (context, item, isSelected) => Container( - color: Colors.white, - padding: EdgeInsets.symmetric( - horizontal: 10, - vertical: 6, - ), - child: Text( - item, - style: GoogleFonts.poppins(fontSize: 11.5), - ), - ), + color: Colors.white, + padding: EdgeInsets.symmetric( + horizontal: 10, + vertical: 6, + ), + child: Text( + item, + style: GoogleFonts.poppins(fontSize: 11.5), + ), + ), searchFieldProps: TextFieldProps( decoration: InputDecoration( hintText: "Search Role...", @@ -1450,33 +1464,33 @@ class PersonalDetailsState extends State { ), dropdownBuilder: (context, selectedItem) => Align( - alignment: Alignment.centerLeft, - child: Text( - selectedItem ?? "Select Role", - style: GoogleFonts.poppins( - fontSize: 12, - color: Colors.black, + alignment: Alignment.centerLeft, + child: Text( + selectedItem ?? "Select Role", + style: GoogleFonts.poppins( + fontSize: 12, + color: Colors.black, + ), + ), ), - ), - ), onChanged: - widget.isViewMode - ? null - : (String? newValue) { - widget.errorMessages.remove("role_id"); - if (newValue == null) return; - final selectedKey = - roleMap.entries - .firstWhere((entry) => entry.value == newValue) - .key; + widget.isViewMode + ? null + : (String? newValue) { + widget.errorMessages.remove("role_id"); + if (newValue == null) return; + final selectedKey = + roleMap.entries + .firstWhere((entry) => entry.value == newValue) + .key; - setState(() { - selectedRole = selectedKey; - isTravelAgent = selectedKey == "5"; - }); - widget.onUserTypeChanged?.call(isTravelAgent); - widget.onRoleChanged?.call(selectedKey); - }, + setState(() { + selectedRole = selectedKey; + isTravelAgent = selectedKey == "5"; + }); + widget.onUserTypeChanged?.call(isTravelAgent); + widget.onRoleChanged?.call(selectedKey); + }, ), ), ), diff --git a/lib/app.dart b/lib/app.dart index 3839acd..10dfed7 100644 --- a/lib/app.dart +++ b/lib/app.dart @@ -2,7 +2,7 @@ import 'dart:convert'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -// import 'package:flutter/rendering.dart'; +import 'package:flutter/rendering.dart'; import 'dart:html' as html; import 'package:frontend/config/apiUrl.dart'; // 1 newly added import 'package:frontend/services/apiService.dart'; @@ -31,7 +31,7 @@ class _MyAppState extends State { @override void initState() { super.initState(); - // SemanticsBinding.instance.ensureSemantics(); // ✅ Safe here + SemanticsBinding.instance.ensureSemantics(); // ✅ Safe here if (kIsWeb) { final uri = Uri.parse(html.window.location.href); print("URI - $uri"); @@ -193,7 +193,7 @@ class _MyAppState extends State { @override Widget build(BuildContext context) { return MaterialApp.router( - title: 'TRIP MANAGEMENT', + title: 'Trip Approval Tool', debugShowCheckedModeBanner: false, theme: ThemeData( colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), diff --git a/lib/config/apiUrl.dart b/lib/config/apiUrl.dart index 5b21759..eb751b8 100644 --- a/lib/config/apiUrl.dart +++ b/lib/config/apiUrl.dart @@ -1,4 +1,3 @@ //api url const String apiUrl = 'http://apitest.tripapprovaltool.com/tstat_be'; // const String apiUrl = 'https://uat.tripapprovaltool.com/tstat_be'; - \ No newline at end of file diff --git a/lib/widgets/custom_text_field.dart b/lib/widgets/custom_text_field.dart index eebc4c7..6983c9e 100644 --- a/lib/widgets/custom_text_field.dart +++ b/lib/widgets/custom_text_field.dart @@ -13,6 +13,7 @@ class CustomTextFieldWrapper extends StatefulWidget { final EdgeInsetsGeometry padding; final BorderRadius? borderRadius; final Color? layoutColor; + final bool hasError; const CustomTextFieldWrapper({ super.key, @@ -25,6 +26,7 @@ class CustomTextFieldWrapper extends StatefulWidget { this.padding = const EdgeInsets.symmetric(horizontal: 12), this.borderRadius, this.layoutColor, + this.hasError = false, }); @override @@ -80,11 +82,24 @@ class _CustomTextFieldWrapperState extends State { color: Colors.white, borderRadius: widget.borderRadius ?? BorderRadius.circular(8), + // border: Border.all( + // color: widget.isFocused ? layoutColor! : Color(0xFFD6D5E6), + // // color: widget.isFocused ? Color(0xFF78B4FC) : Color(0xFFD6D5E6), + // width: widget.isFocused ? 1.0 : 0.5, + // ), border: Border.all( - color: widget.isFocused ? layoutColor! : Color(0xFFD6D5E6), - // color: widget.isFocused ? Color(0xFF78B4FC) : Color(0xFFD6D5E6), - width: widget.isFocused ? 1.0 : 0.5, + color: + widget.hasError + ? Colors + .red // 👈 show red if error + : (widget.isFocused + ? layoutColor ?? + Colors + .blue // focused border color + : Color(0xFFD6D5E6)), // normal border + width: widget.hasError ? 1.2 : (widget.isFocused ? 1.0 : 0.5), ), + // boxShadow: // widget.isFocused // ? [ diff --git a/lib/widgets/custom_user_form.dart b/lib/widgets/custom_user_form.dart index f4dd57b..0a1d036 100644 --- a/lib/widgets/custom_user_form.dart +++ b/lib/widgets/custom_user_form.dart @@ -30,13 +30,14 @@ class _CustomTextFieldUserWrapperState @override Widget build(BuildContext context) { return Container( - width: widget.width ?? // Use custom width if provided, else default + width: + widget.width ?? // Use custom width if provided, else default (widget.isDesktop ? MediaQuery.of(context).size.width * 0.25 : MediaQuery.of(context).size.width * 0.8), padding: widget.padding, decoration: BoxDecoration( - // color: widget.color, + color: widget.color, // color: Color(0xFFF7F7FB), borderRadius: BorderRadius.circular(10), border: Border.all( @@ -44,16 +45,17 @@ class _CustomTextFieldUserWrapperState // color: widget.isFocused ? Color(0xFF78B4FC) : Color(0xFFD6D5E6), width: widget.isFocused ? 2.0 : 0.5, ), - boxShadow: widget.isFocused - ? [ - BoxShadow( - color: Color.fromRGBO(120, 180, 252, 0.3), - blurRadius: 10, - spreadRadius: 2, - offset: Offset(0, 4), - ), - ] - : [], + // boxShadow: + // widget.isFocused + // ? [ + // BoxShadow( + // color: Color.fromRGBO(120, 180, 252, 0.3), + // blurRadius: 10, + // spreadRadius: 2, + // offset: Offset(0, 4), + // ), + // ] + // : [], ), child: widget.child, ); diff --git a/pubspec.lock b/pubspec.lock index e4884cf..c8bb6f4 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -57,6 +57,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.4.0" + checked_yaml: + dependency: transitive + description: + name: checked_yaml + sha256: "959525d3162f249993882720d52b7e0c833978df229be20702b33d48d91de70f" + url: "https://pub.dev" + source: hosted + version: "2.0.4" + cli_util: + dependency: transitive + description: + name: cli_util + sha256: ff6785f7e9e3c38ac98b2fb035701789de90154024a75b6cb926445e83197d1c + url: "https://pub.dev" + source: hosted + version: "0.4.2" clock: dependency: transitive description: @@ -270,6 +286,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.0" + flutter_launcher_icons: + dependency: "direct main" + description: + name: flutter_launcher_icons + sha256: "10f13781741a2e3972126fae08393d3c4e01fa4cd7473326b94b72cf594195e7" + url: "https://pub.dev" + source: hosted + version: "0.14.4" flutter_lints: dependency: "direct dev" description: @@ -397,6 +421,14 @@ packages: url: "https://pub.dev" source: hosted version: "4.1.2" + image: + dependency: transitive + description: + name: image + sha256: "4e973fcf4caae1a4be2fa0a13157aa38a8f9cb049db6529aa00b4d71abc4d928" + url: "https://pub.dev" + source: hosted + version: "4.5.4" image_picker: dependency: "direct main" description: @@ -469,6 +501,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.20.2" + json_annotation: + dependency: transitive + description: + name: json_annotation + sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" + url: "https://pub.dev" + source: hosted + version: "4.9.0" leak_tracker: dependency: transitive description: @@ -629,6 +669,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.3.0" + petitparser: + dependency: transitive + description: + name: petitparser + sha256: "07c8f0b1913bcde1ff0d26e57ace2f3012ccbf2b204e070290dad3bb22797646" + url: "https://pub.dev" + source: hosted + version: "6.1.0" photo_view: dependency: transitive description: @@ -1050,6 +1098,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.0" + xml: + dependency: transitive + description: + name: xml + sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226 + url: "https://pub.dev" + source: hosted + version: "6.5.0" + yaml: + dependency: transitive + description: + name: yaml + sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce + url: "https://pub.dev" + source: hosted + version: "3.1.3" sdks: - dart: ">=3.7.2 <4.0.0" + dart: ">=3.8.0 <4.0.0" flutter: ">=3.29.0" diff --git a/pubspec.yaml b/pubspec.yaml index 3ab006b..0ab28b9 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -62,6 +62,7 @@ dependencies: flutter_html: ^3.0.0 html2md: ^1.3.2 flutter_quill_delta_from_html: ^1.5.2 + flutter_launcher_icons: ^0.14.4 @@ -91,6 +92,7 @@ flutter: # the material Icons class. uses-material-design: true assets: + - assets/images/login/login_img1.png - assets/images/login/login_terminal.png - assets/images/login/login_travel.png @@ -109,6 +111,10 @@ flutter: - assets/images/IconsImg/download.png - assets/images/IconsImg/planPdf_icon.png +flutter_icons: + android: true + ios: true + image_path: "assets/images/IconsImg/favicon_ts.png" # To add assets to your application, add an assets section, like this: diff --git a/web/favicon.png b/web/favicon.png index 8aaa46a..53caf6a 100644 Binary files a/web/favicon.png and b/web/favicon.png differ diff --git a/web/index.html b/web/index.html index 6bf4dec..cd8955d 100644 --- a/web/index.html +++ b/web/index.html @@ -25,7 +25,7 @@ - +