diff --git a/android/app/build.gradle b/android/app/build.gradle index d8e93da8..5529b7b7 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -49,8 +49,8 @@ android { // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. minSdkVersion 21 targetSdkVersion 33 - versionCode 3 - versionName '1.0.3' + versionCode 5 + versionName '1.0.5' } signingConfigs { diff --git a/ios/Podfile b/ios/Podfile index 2dff4172..c0216e16 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -37,6 +37,9 @@ end post_install do |installer| installer.pods_project.targets.each do |target| flutter_additional_ios_build_settings(target) + target.build_configurations.each do |config| + config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0' + end end installer.generated_projects.each do |project| project.targets.each do |target| diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index d3d177ff..5fcc36b0 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -10,11 +10,11 @@ 00C3AFCE29769C38002E7B47 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 00C3AFCD29769C37002E7B47 /* GoogleService-Info.plist */; }; 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 4141329F7EE1C2C4921406EF /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CCEA5D6B9129CB26397DBEBA /* Pods_Runner.framework */; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 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 */; }; - F2A2A0FF9835A41EAE85C46C /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4EFA2032ACFCE75A326C4021 /* Pods_Runner.framework */; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -35,9 +35,8 @@ 00C3AFCD29769C37002E7B47 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; 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 = ""; }; - 21218448C05A6EE259A8A273 /* 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 = ""; }; + 19F80F744566086934C1EFAB /* 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 = ""; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 4EFA2032ACFCE75A326C4021 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 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 = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; @@ -48,8 +47,9 @@ 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 = ""; }; - 9CABA487766DBA12CD9795AB /* 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 = ""; }; - C495935E3B272204B901FA13 /* 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 = ""; }; + B31016378DCE198B9537F302 /* 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 = ""; }; + B42BA5D3E47EC815EC803E18 /* 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 = ""; }; + CCEA5D6B9129CB26397DBEBA /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -57,7 +57,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - F2A2A0FF9835A41EAE85C46C /* Pods_Runner.framework in Frameworks */, + 4141329F7EE1C2C4921406EF /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -67,13 +67,21 @@ 577ED37A491ADCF557B4F6D9 /* Pods */ = { isa = PBXGroup; children = ( - 21218448C05A6EE259A8A273 /* Pods-Runner.debug.xcconfig */, - C495935E3B272204B901FA13 /* Pods-Runner.release.xcconfig */, - 9CABA487766DBA12CD9795AB /* Pods-Runner.profile.xcconfig */, + B42BA5D3E47EC815EC803E18 /* Pods-Runner.debug.xcconfig */, + B31016378DCE198B9537F302 /* Pods-Runner.release.xcconfig */, + 19F80F744566086934C1EFAB /* Pods-Runner.profile.xcconfig */, ); path = Pods; sourceTree = ""; }; + 87D8490E375D7CE60C246AAF /* Frameworks */ = { + isa = PBXGroup; + children = ( + CCEA5D6B9129CB26397DBEBA /* Pods_Runner.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; 9740EEB11CF90186004384FC /* Flutter */ = { isa = PBXGroup; children = ( @@ -92,7 +100,7 @@ 97C146F01CF9000F007C117D /* Runner */, 97C146EF1CF9000F007C117D /* Products */, 577ED37A491ADCF557B4F6D9 /* Pods */, - CF00C18CA99370AC196B5B50 /* Frameworks */, + 87D8490E375D7CE60C246AAF /* Frameworks */, ); sourceTree = ""; }; @@ -121,14 +129,6 @@ path = Runner; sourceTree = ""; }; - CF00C18CA99370AC196B5B50 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 4EFA2032ACFCE75A326C4021 /* Pods_Runner.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -136,14 +136,14 @@ isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( - 1EBE8111D78021B782F0E9D3 /* [CP] Check Pods Manifest.lock */, + 9F565295956C4424C1A65C21 /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - 82ACB2D948A573383205B7AC /* [CP] Embed Pods Frameworks */, + 55FB1946A3AB2CD5DD528CC0 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -160,7 +160,6 @@ 97C146E61CF9000F007C117D /* Project object */ = { isa = PBXProject; attributes = { - BuildIndependentTargetsInParallel = YES; LastUpgradeCheck = 1300; ORGANIZATIONNAME = ""; TargetAttributes = { @@ -204,28 +203,6 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 1EBE8111D78021B782F0E9D3 /* [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; - }; 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; @@ -241,7 +218,7 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; }; - 82ACB2D948A573383205B7AC /* [CP] Embed Pods Frameworks */ = { + 55FB1946A3AB2CD5DD528CC0 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -273,6 +250,28 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; }; + 9F565295956C4424C1A65C21 /* [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; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -311,7 +310,6 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -365,11 +363,10 @@ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 99Z3UD3LJM; + DEVELOPMENT_TEAM = 3A359E86ZF; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = Atoms; @@ -377,7 +374,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.4; + MARKETING_VERSION = 1.0.1; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -444,8 +441,6 @@ "-framework", "\"package_info\"", "-framework", - "\"permission_handler_apple\"", - "-framework", "\"qr_code_scanner\"", "-framework", "\"share\"", @@ -459,7 +454,7 @@ "\"UserNotifications\"", "\"-lc++\"", ); - PRODUCT_BUNDLE_IDENTIFIER = com.habib.atoms; + PRODUCT_BUNDLE_IDENTIFIER = com.hmg.atoms; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; @@ -471,7 +466,6 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -529,7 +523,6 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -585,11 +578,10 @@ baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 99Z3UD3LJM; + DEVELOPMENT_TEAM = 3A359E86ZF; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = Atoms; @@ -597,7 +589,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.4; + MARKETING_VERSION = 1.0.1; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -664,8 +656,6 @@ "-framework", "\"package_info\"", "-framework", - "\"permission_handler_apple\"", - "-framework", "\"qr_code_scanner\"", "-framework", "\"share\"", @@ -679,7 +669,7 @@ "\"UserNotifications\"", "\"-lc++\"", ); - PRODUCT_BUNDLE_IDENTIFIER = com.habib.atoms; + PRODUCT_BUNDLE_IDENTIFIER = com.hmg.atoms; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; @@ -693,11 +683,10 @@ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 99Z3UD3LJM; + DEVELOPMENT_TEAM = 3A359E86ZF; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = Atoms; @@ -705,7 +694,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.4; + MARKETING_VERSION = 1.0.1; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -772,8 +761,6 @@ "-framework", "\"package_info\"", "-framework", - "\"permission_handler_apple\"", - "-framework", "\"qr_code_scanner\"", "-framework", "\"share\"", @@ -787,7 +774,7 @@ "\"UserNotifications\"", "\"-lc++\"", ); - PRODUCT_BUNDLE_IDENTIFIER = com.habib.atoms; + PRODUCT_BUNDLE_IDENTIFIER = com.hmg.atoms; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index c87d15a3..f3d88ace 100644 --- a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -40,7 +40,7 @@ (file == null || file.isEmpty) ? null :1 (file.contains("/") ? file : "$_host/attachment/$file"); // API Routes - static get login => "$_baseUrl/MobileAuth/Login"; // post + // static get login => "$_baseUrl/MobileAuth/Login"; // web login + static get login => "$_baseUrl/MobileAuth/LoginIntegration"; // mobile login static get register => "$_baseUrl/handle/create/user"; // post static get updateProfile => "$_baseUrl/update/user/profile"; // post static get getSites => "$_baseUrl/Customer/GetCustomers"; // get @@ -48,8 +49,6 @@ class URLs { static get getMaintenanceSituation => "$_baseUrl/Lookups/GetLookup?lookupEnum=502"; - static get getAllUsers => "http://109.123.243.118:5000/api/Account/GetAllUsers"; - static get getPreventiveMaintenanceVisits => "$_baseUrl/return/user/calibrations"; // get static get updatePreventiveMaintenanceVisits => "$_baseUrl/Visit/UpdateVisits"; // get diff --git a/lib/controllers/providers/api/status_drop_down/report/service_report_assistants_employee_provider.dart b/lib/controllers/providers/api/status_drop_down/report/service_report_assistants_employee_provider.dart index 3dbfc742..2436fc9d 100644 --- a/lib/controllers/providers/api/status_drop_down/report/service_report_assistants_employee_provider.dart +++ b/lib/controllers/providers/api/status_drop_down/report/service_report_assistants_employee_provider.dart @@ -22,18 +22,24 @@ class ServiceReportAssistantsEmployeeProvider extends ChangeNotifier { // like 400 customer request failed // 500 service not available int _stateCode; + int get stateCode => _stateCode; + set setStateCode(int statusCode) => _stateCode = statusCode; + // contain user data // when user not login or register _user = null List _assistantEmployees; + List get assistantEmployees => _assistantEmployees; // when categories in-process _loading = true // done _loading = true // failed _loading = false bool _loading; + bool get isLoading => _loading; + set isLoading(bool isLoading) { _loading = isLoading; notifyListeners(); diff --git a/lib/controllers/providers/api/status_drop_down/report/service_report_users_provider.dart b/lib/controllers/providers/api/status_drop_down/report/service_report_users_provider.dart index 6fcd5f80..c05295fa 100644 --- a/lib/controllers/providers/api/status_drop_down/report/service_report_users_provider.dart +++ b/lib/controllers/providers/api/status_drop_down/report/service_report_users_provider.dart @@ -19,18 +19,22 @@ class ServiceReportUsersProvider extends ChangeNotifier { // like 400 customer request failed // 500 service not available int _stateCode; + int get stateCode => _stateCode; // contain user data // when user not login or register _user = null List _engineers; + List get engineers => _engineers; // when categories in-process _loading = true // done _loading = true // failed _loading = false bool _loading; + bool get isLoading => _loading; + set isLoading(bool isLoading) { _loading = isLoading; notifyListeners(); @@ -47,9 +51,7 @@ class ServiceReportUsersProvider extends ChangeNotifier { notifyListeners(); Response response; try { - response = await ApiManager.instance.get( - "${URLs.getAllUsers}", - ); + response = await ApiManager.instance.get("${URLs.getEngineers}"); // response = await get( // Uri.parse( // URLs.getServiceReportLastCalls diff --git a/lib/views/pages/sub_workorder/create_sub_workorder_page.dart b/lib/views/pages/sub_workorder/create_sub_workorder_page.dart index 5eba98c5..ee6c3905 100644 --- a/lib/views/pages/sub_workorder/create_sub_workorder_page.dart +++ b/lib/views/pages/sub_workorder/create_sub_workorder_page.dart @@ -6,6 +6,7 @@ import 'package:flutter/material.dart'; import 'package:fluttertoast/fluttertoast.dart'; import 'package:provider/provider.dart'; import 'package:test_sa/controllers/providers/api/service_requests_provider.dart'; +import 'package:test_sa/controllers/providers/api/status_drop_down/report/service_report_assistants_employee_provider.dart'; import 'package:test_sa/controllers/providers/api/status_drop_down/report/service_types_provider.dart'; import 'package:test_sa/extensions/context_extension.dart'; import 'package:test_sa/extensions/widget_extensions.dart'; @@ -63,6 +64,9 @@ class _CreateSubWorkOrderPageState extends State { _serviceReport = ServiceReport(id: widget.workOrder.id, assetType: widget.workOrder.assetType, equipmentStatus: widget.workOrder.equipmentStatus); _isLoading = true; super.initState(); + if (context.mounted) { + Provider.of(context, listen: false).reset(); + } } var assetTypesProvider; @@ -257,7 +261,10 @@ class _CreateSubWorkOrderPageState extends State { useSafeArea: true, isScrollControlled: true, backgroundColor: Colors.transparent, - builder: (context) => WorkOrderDetailsBottomSheet(subWorkOrder: _subWorkOrders), + builder: (context) => WorkOrderDetailsBottomSheet( + subWorkOrder: _subWorkOrders, + assetId: widget.workOrder?.callRequest?.asset?.id, + ), ); //log(_subWorkOrders?.toJson()?.toString()); }, diff --git a/lib/views/pages/sub_workorder/work_order_details_bottom_sheet.dart b/lib/views/pages/sub_workorder/work_order_details_bottom_sheet.dart index 54e01c4b..fe73ab78 100644 --- a/lib/views/pages/sub_workorder/work_order_details_bottom_sheet.dart +++ b/lib/views/pages/sub_workorder/work_order_details_bottom_sheet.dart @@ -19,7 +19,9 @@ import 'auto_generated_vendor_name.dart'; class WorkOrderDetailsBottomSheet extends StatefulWidget { final SearchWorkOrder subWorkOrder; - const WorkOrderDetailsBottomSheet({this.subWorkOrder, Key key}) : super(key: key); + final num assetId; + + const WorkOrderDetailsBottomSheet({this.subWorkOrder, this.assetId, Key key}) : super(key: key); @override State createState() => _WorkOrderDetailsBottomSheetState(); @@ -90,12 +92,13 @@ class _WorkOrderDetailsBottomSheetState extends State { height: 4, ), ATextFormField( - initialValue: (model.title ?? "").toString(), + initialValue: (model.title?.trim() ?? "").toString(), textAlign: TextAlign.center, style: Theme.of(context).textTheme.subtitle1, textInputType: TextInputType.text, diff --git a/pubspec.yaml b/pubspec.yaml index 576cff87..08f6be19 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.0.4+3 +version: 1.0.6+5 environment: sdk: ">=2.7.0 <3.0.0"