diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 35a11152d..0d45fc254 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -1,8 +1,3 @@ -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. - name: Run analysis and tests on: @@ -22,7 +17,13 @@ jobs: - name: Flutter action uses: subosito/flutter-action@v2.8.0 with: - flutter-version: "3.16.5" + flutter-version: "3.22.1" + + - name: Clean previous builds + run: flutter clean + + - name: Install dependencies + run: flutter pub get - name: Generate models run: ./tools/install_bricks.sh diff --git a/.github/workflows/flutter-build-apk.yml b/.github/workflows/flutter-build-apk.yml new file mode 100644 index 000000000..a8995a1b0 --- /dev/null +++ b/.github/workflows/flutter-build-apk.yml @@ -0,0 +1,75 @@ +name: Build APK Workflow + +on: + push: + branches: [ 'develop', 'master' ] # This specifies that the workflow will run on any push to the 'develop' or 'master' branches + pull_request: + branches: [ 'develop', 'master' ] # Optionally, run on pull requests targeting the 'develop' or 'master' branches + +jobs: + build-apk: + runs-on: ubuntu-latest + environment: UAT + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' # Specify the Java distribution + + - name: Flutter action + uses: subosito/flutter-action@v2.8.0 + with: + flutter-version: "3.22.2" + + - name: Set up Android SDK + uses: android-actions/setup-android@v2 + with: + api-level: 33 + build-tools: 33.0.2 + + - name: Install Dependencies + run: flutter pub get + + - name: Create .env file + run: | + echo "BASE_URL=${{ vars.BASE_URL }}" >> apps/health_campaign_field_worker_app/.env + echo "MDMS_API_PATH=${{ vars.MDMS_API_PATH }}" >> apps/health_campaign_field_worker_app/.env + echo "TENANT_ID=${{ vars.TENANT_ID }}" >> apps/health_campaign_field_worker_app/.env + echo "ACTIONS_API_PATH=${{ vars.ACTIONS_API_PATH }}" >> apps/health_campaign_field_worker_app/.env + echo "SYNC_DOWN_RETRY_COUNT=${{ vars.SYNC_DOWN_RETRY_COUNT }}" >> apps/health_campaign_field_worker_app/.env + echo "RETRY_TIME_INTERVAL=${{ vars.RETRY_TIME_INTERVAL }}" >> apps/health_campaign_field_worker_app/.env + echo "CONNECT_TIMEOUT=${{ vars.CONNECT_TIMEOUT }}" >> apps/health_campaign_field_worker_app/.env + echo "RECEIVE_TIMEOUT=${{ vars.RECEIVE_TIMEOUT }}" >> apps/health_campaign_field_worker_app/.env + echo "SEND_TIMEOUT=${{ vars.SEND_TIMEOUT }}" >> apps/health_campaign_field_worker_app/.env + echo "CHECK_BANDWIDTH_API=${{ vars.CHECK_BANDWIDTH_API }}" >> apps/health_campaign_field_worker_app/.env + echo "HIERARCHY_TYPE=${{ vars.HIERARCHY_TYPE }}" >> apps/health_campaign_field_worker_app/.env + echo "ENV_NAME=${{ vars.ENV_NAME }}" >> apps/health_campaign_field_worker_app/.env + + - name: Verify .env file + run: | + ls -l apps/health_campaign_field_worker_app/.env + cat apps/health_campaign_field_worker_app/.env + + - name: Run APK build script + env: + BUILD_CONFIG: release # or profile depending on your choice + run: bash ./tools/generate-apk.sh + + # Archive the APK as a build artifact so it can be downloaded + - name: Upload APKs + uses: actions/upload-artifact@v3 + with: + name: app-release-apk + path: apps/health_campaign_field_worker_app/build/app/outputs/flutter-apk/app-release.apk + + - name: Upload .env as artifact + uses: actions/upload-artifact@v3 + with: + name: env-file + path: apps/health_campaign_field_worker_app/.env + include-hidden-files: true diff --git a/.gitignore b/.gitignore index 9793aec7d..21577b489 100644 --- a/.gitignore +++ b/.gitignore @@ -16,7 +16,6 @@ migrate_working_dir/ *.iws .idea/ - # The .vscode folder contains launch configuration and tasks you configure in # VS Code which you may wish to be included in version control, so this line # is commented out by default. @@ -57,3 +56,7 @@ pubspec_overrides.yaml apps/health_campaign_field_worker_app/.env apps/health_campaign_field_worker_app/libisar.dylib *.properties + +# FVM Version Cache +.fvm/ +.fvmrc \ No newline at end of file diff --git a/README.md b/README.md index b1562afae..99b8c1f4c 100644 --- a/README.md +++ b/README.md @@ -566,7 +566,7 @@ class _ChecklistDataShowcaseData { import '../../../utils/i18_key_constants.dart' as i18; import '../showcase_wrappers.dart'; -part 'checklist_data.dart'; +part 'survey_form_data.dart'; final checklistDataShowcaseData = _ChecklistDataShowcaseData(); ``` diff --git a/apps/health_campaign_field_worker_app/.gitignore b/apps/health_campaign_field_worker_app/.gitignore index ac43765ff..ce6d32b71 100644 --- a/apps/health_campaign_field_worker_app/.gitignore +++ b/apps/health_campaign_field_worker_app/.gitignore @@ -44,3 +44,7 @@ app.*.map.json /android/app/debug /android/app/profile /android/app/release + +# FVM Version Cache +.fvm/ +.fvmrc \ No newline at end of file diff --git a/apps/health_campaign_field_worker_app/android/app/build.gradle b/apps/health_campaign_field_worker_app/android/app/build.gradle index 7ed3cf689..614262029 100644 --- a/apps/health_campaign_field_worker_app/android/app/build.gradle +++ b/apps/health_campaign_field_worker_app/android/app/build.gradle @@ -1,3 +1,10 @@ +plugins { + id 'com.android.application' + id 'kotlin-android' + id 'dev.flutter.flutter-gradle-plugin' + id 'com.google.gms.google-services' +} + def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') if (localPropertiesFile.exists()) { @@ -6,11 +13,6 @@ if (localPropertiesFile.exists()) { } } -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - def flutterVersionCode = localProperties.getProperty('flutter.versionCode') if (flutterVersionCode == null) { flutterVersionCode = '1' @@ -21,24 +23,18 @@ if (flutterVersionName == null) { flutterVersionName = '1.0' } -apply plugin: 'com.android.application' -// START: FlutterFire Configuration -apply plugin: 'com.google.gms.google-services' -// END: FlutterFire Configuration -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion 34 + compileSdk = flutter.compileSdkVersion ndkVersion flutter.ndkVersion compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 } kotlinOptions { - jvmTarget = '1.8' + jvmTarget = '17' } sourceSets { @@ -50,8 +46,8 @@ android { applicationId "com.digit.hcm" // You can update the following values to match your application needs. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. - minSdkVersion 21 - targetSdkVersion flutter.targetSdkVersion + minSdk = flutter.minSdkVersion + targetSdk = flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() versionName flutterVersionName } @@ -63,12 +59,16 @@ android { signingConfig signingConfigs.debug } } + + if (!project.hasProperty('USE_GOOGLE_SERVICES')) { + tasks.whenTaskAdded { task -> + if (task.name.contains("GoogleServices")) { + task.enabled = false + } + } + } } flutter { source '../..' -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" -} +} \ No newline at end of file diff --git a/apps/health_campaign_field_worker_app/android/app/src/main/AndroidManifest.xml b/apps/health_campaign_field_worker_app/android/app/src/main/AndroidManifest.xml index 8599cae8b..5f39e8455 100644 --- a/apps/health_campaign_field_worker_app/android/app/src/main/AndroidManifest.xml +++ b/apps/health_campaign_field_worker_app/android/app/src/main/AndroidManifest.xml @@ -3,6 +3,7 @@ + @@ -10,7 +11,7 @@ - + @@ -28,16 +29,16 @@ android:allowBackup="false" - android:fullBackupOnly="false" android:fullBackupContent="false" + android:fullBackupOnly="false" + android:icon="@mipmap/ic_launcher" + android:label="HCM"> + android:exported="false" + android:foregroundServiceType="location" /> - - + + MethodChannel( + flutterEngine!!.dartExecutor.binaryMessenger, + CHANNEL + ).setMethodCallHandler { call, result -> when (call.method) { "startLocationUpdates" -> { val interval = (call.argument("interval")?.toLong()) ?: 60000L - val stopAfterTimestamp = (call.argument("stopAfterTimestamp")?.toLong()) ?: (System.currentTimeMillis() + 60000L) + val stopAfterTimestamp = (call.argument("stopAfterTimestamp")?.toLong()) + ?: (System.currentTimeMillis() + 60000L) if (!isMyServiceRunning(LocationService::class.java)) { startService(interval, stopAfterTimestamp) } else { - Toast.makeText(this, "Location service is already running", Toast.LENGTH_SHORT).show() + Toast.makeText( + this, + "Location service is already running", + Toast.LENGTH_SHORT + ).show() } result.success(null) } + "stopLocationUpdates" -> { stopService() result.success(null) } + else -> result.notImplemented() } } - // Register the receiver for location updates + // Register the receiver for location updates, with proper export settings for Android 13+ val filter = IntentFilter("LocationUpdate") - registerReceiver(locationReceiver, filter) + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { + registerReceiver(locationReceiver, filter, Context.RECEIVER_EXPORTED) + } else { + registerReceiver(locationReceiver, filter) + } } override fun onDestroy() { @@ -90,7 +112,8 @@ class MainActivity : FlutterActivity() { val manager = getSystemService(Context.ACTIVITY_SERVICE) as android.app.ActivityManager for (service in manager.getRunningServices(Int.MAX_VALUE)) { if (serviceClass.name == service.service.className) { - Toast.makeText(this, "Location service is already running", Toast.LENGTH_SHORT).show() + Toast.makeText(this, "Location service is already running", Toast.LENGTH_SHORT) + .show() return true } } diff --git a/apps/health_campaign_field_worker_app/android/app/src/main/kotlin/com/digit/hcm/location_service.kt b/apps/health_campaign_field_worker_app/android/app/src/main/kotlin/com/digit/hcm/location_service.kt index 930d4a408..23756ee0e 100644 --- a/apps/health_campaign_field_worker_app/android/app/src/main/kotlin/com/digit/hcm/location_service.kt +++ b/apps/health_campaign_field_worker_app/android/app/src/main/kotlin/com/digit/hcm/location_service.kt @@ -92,10 +92,11 @@ class LocationService : Service() { val intent = Intent("LocationUpdate") intent.putExtra("latitude", location.latitude) intent.putExtra("longitude", location.longitude) + intent.putExtra("accuracy", location.accuracy) sendBroadcast(intent) - Log.d("LocationSharing", "Location sent to MainActivity: Latitude ${location.latitude}, Longitude ${location.longitude}") + Log.d("LocationSharing", "Location sent to MainActivity: Latitude ${location.latitude}, Longitude ${location.longitude}, Accuracy ${location.accuracy}") } override fun onDestroy() { @@ -129,8 +130,10 @@ class LocationService : Service() { val notificationIntent = Intent(this, MainActivity::class.java) val pendingIntent = PendingIntent.getActivity(this, 0, notificationIntent, PendingIntent.FLAG_IMMUTABLE) val timestamp = System.currentTimeMillis() - val notificationContent = "Latitude: ${location.latitude}, Longitude: ${location.longitude}," - writeToFile("Latitude: ${location.latitude}, Longitude: ${location.longitude}, isSync: false, timestamp: $timestamp") + val notificationContent = "Latitude: ${location.latitude}, Longitude: ${location.longitude}, Accuracy: ${location.accuracy}" // Include accuracy + + // Write location and accuracy to file + writeToFile("Latitude: ${location.latitude}, Longitude: ${location.longitude}, Accuracy: ${location.accuracy}, isSync: false, timestamp: $timestamp") val notification = NotificationCompat.Builder(this, CHANNEL_ID) .setContentTitle("Location Service") diff --git a/apps/health_campaign_field_worker_app/android/build.gradle b/apps/health_campaign_field_worker_app/android/build.gradle index 240f9a683..bc157bd1a 100644 --- a/apps/health_campaign_field_worker_app/android/build.gradle +++ b/apps/health_campaign_field_worker_app/android/build.gradle @@ -1,19 +1,3 @@ -buildscript { - ext.kotlin_version = '1.8.22' - repositories { - google() - mavenCentral() - } - - dependencies { - classpath 'com.android.tools.build:gradle:7.1.2' - // START: FlutterFire Configuration - classpath 'com.google.gms:google-services:4.3.10' - // END: FlutterFire Configuration - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - allprojects { repositories { google() diff --git a/apps/health_campaign_field_worker_app/android/gradle/wrapper/gradle-wrapper.properties b/apps/health_campaign_field_worker_app/android/gradle/wrapper/gradle-wrapper.properties index cb24abda1..41dfb8790 100644 --- a/apps/health_campaign_field_worker_app/android/gradle/wrapper/gradle-wrapper.properties +++ b/apps/health_campaign_field_worker_app/android/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip diff --git a/apps/health_campaign_field_worker_app/android/settings.gradle b/apps/health_campaign_field_worker_app/android/settings.gradle index 44e62bcf0..a9fc22210 100644 --- a/apps/health_campaign_field_worker_app/android/settings.gradle +++ b/apps/health_campaign_field_worker_app/android/settings.gradle @@ -1,11 +1,27 @@ -include ':app' +pluginManagement { + def flutterSdkPath = { + def properties = new Properties() + file("local.properties").withInputStream { properties.load(it) } + def flutterSdkPath = properties.getProperty("flutter.sdk") + assert flutterSdkPath != null, "flutter.sdk not set in local.properties" + return flutterSdkPath + }() -def localPropertiesFile = new File(rootProject.projectDir, "local.properties") -def properties = new Properties() + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") -assert localPropertiesFile.exists() -localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} -def flutterSdkPath = properties.getProperty("flutter.sdk") -assert flutterSdkPath != null, "flutter.sdk not set in local.properties" -apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" +plugins { + id "dev.flutter.flutter-plugin-loader" version "1.0.0" + id "com.android.application" version "7.3.0" apply false + id "org.jetbrains.kotlin.android" version "1.8.22" apply false + id "com.google.gms.google-services" version "4.4.0" apply false + id "com.google.firebase.crashlytics" version "2.9.9" apply false +} + +include ":app" \ No newline at end of file diff --git a/apps/health_campaign_field_worker_app/assets/animated_json/alert.json b/apps/health_campaign_field_worker_app/assets/animated_json/alert.json new file mode 100644 index 000000000..171b416cd --- /dev/null +++ b/apps/health_campaign_field_worker_app/assets/animated_json/alert.json @@ -0,0 +1,1127 @@ +{ + "nm": "48 - Warning", + "ddd": 0, + "h": 500, + "w": 500, + "meta": { + "g": "LottieFiles AE " + }, + "layers": [ + { + "ty": 3, + "nm": "48 - Warning", + "sr": 1, + "st": 0, + "op": 144, + "ip": 0, + "hd": false, + "ddd": 0, + "bm": 0, + "hasMask": false, + "ao": 0, + "ks": { + "a": { + "a": 0, + "k": [ + 60, + 60, + 0 + ], + "ix": 1 + }, + "s": { + "a": 0, + "k": [ + 180, + 180, + 100 + ], + "ix": 6 + }, + "sk": { + "a": 0, + "k": 0 + }, + "p": { + "a": 0, + "k": [ + 250.045, + 290.339, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 10 + }, + "sa": { + "a": 0, + "k": 0 + }, + "o": { + "a": 0, + "k": 0, + "ix": 11 + } + }, + "ef": [], + "ind": 1 + }, + { + "ty": 4, + "nm": "Line", + "sr": 1, + "st": 0, + "op": 144, + "ip": 12, + "hd": false, + "ddd": 0, + "bm": 0, + "hasMask": false, + "ao": 0, + "ks": { + "a": { + "a": 0, + "k": [ + -1, + 21.25, + 0 + ], + "ix": 1 + }, + "s": { + "a": 1, + "k": [ + { + "o": { + "x": 0.167, + "y": 0.167 + }, + "i": { + "x": 0, + "y": 1 + }, + "s": [ + 0, + 0, + 100 + ], + "t": 12 + }, + { + "s": [ + 55.556, + 55.556, + 100 + ], + "t": 32 + } + ], + "ix": 6 + }, + "sk": { + "a": 0, + "k": 0 + }, + "p": { + "a": 0, + "k": [ + 85.533, + 85.887, + 0 + ], + "ix": 2 + }, + "r": { + "a": 1, + "k": [ + { + "o": { + "x": 0.167, + "y": 0.167 + }, + "i": { + "x": 0, + "y": 1 + }, + "s": [ + 180 + ], + "t": 12 + }, + { + "s": [ + 0 + ], + "t": 32 + } + ], + "ix": 10 + }, + "sa": { + "a": 0, + "k": 0 + }, + "o": { + "a": 0, + "k": 100, + "ix": 11 + } + }, + "ef": [], + "shapes": [ + { + "ty": "gr", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Group", + "nm": "Shape 1", + "ix": 1, + "cix": 2, + "np": 3, + "it": [ + { + "ty": "sh", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Shape - Group", + "nm": "Path 1", + "ix": 1, + "d": 1, + "ks": { + "a": 0, + "k": { + "c": false, + "i": [ + [ + 0, + 0 + ], + [ + 0, + 0 + ] + ], + "o": [ + [ + 0, + 0 + ], + [ + 0, + 0 + ] + ], + "v": [ + [ + -1, + 80 + ], + [ + -1, + -37.5 + ] + ] + }, + "ix": 2 + } + }, + { + "ty": "st", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Graphic - Stroke", + "nm": "Stroke 1", + "lc": 2, + "lj": 1, + "ml": 4, + "o": { + "a": 0, + "k": 100, + "ix": 4 + }, + "w": { + "a": 0, + "k": 28, + "ix": 5 + }, + "c": { + "a": 0, + "k": [ + 1, + 1, + 1 + ], + "ix": 3 + } + }, + { + "ty": "tr", + "a": { + "a": 0, + "k": [ + 0, + 0 + ], + "ix": 1 + }, + "s": { + "a": 0, + "k": [ + 100, + 100 + ], + "ix": 3 + }, + "sk": { + "a": 0, + "k": 0, + "ix": 4 + }, + "p": { + "a": 0, + "k": [ + 0, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 6 + }, + "sa": { + "a": 0, + "k": 0, + "ix": 5 + }, + "o": { + "a": 0, + "k": 100, + "ix": 7 + } + } + ] + }, + { + "ty": "tm", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Filter - Trim", + "nm": "Trim Paths 1", + "ix": 2, + "e": { + "a": 0, + "k": 100, + "ix": 2 + }, + "o": { + "a": 0, + "k": 0, + "ix": 3 + }, + "s": { + "a": 1, + "k": [ + { + "o": { + "x": 0.167, + "y": 0.167 + }, + "i": { + "x": 0, + "y": 1 + }, + "s": [ + 0 + ], + "t": 22 + }, + { + "s": [ + 40 + ], + "t": 42 + } + ], + "ix": 1 + }, + "m": 1 + } + ], + "ind": 2, + "parent": 5 + }, + { + "ty": 4, + "nm": "Dot", + "sr": 1, + "st": 0, + "op": 144, + "ip": 12, + "hd": false, + "ddd": 0, + "bm": 0, + "hasMask": false, + "ao": 0, + "ks": { + "a": { + "a": 0, + "k": [ + 0, + 0, + 0 + ], + "ix": 1 + }, + "s": { + "a": 0, + "k": [ + 100, + 100, + 100 + ], + "ix": 6 + }, + "sk": { + "a": 0, + "k": 0 + }, + "p": { + "a": 0, + "k": [ + 0, + 0, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 10 + }, + "sa": { + "a": 0, + "k": 0 + }, + "o": { + "a": 0, + "k": 100, + "ix": 11 + } + }, + "ef": [], + "shapes": [ + { + "ty": "gr", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Group", + "nm": "Shape 1", + "ix": 1, + "cix": 2, + "np": 4, + "it": [ + { + "ty": "sh", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Shape - Group", + "nm": "Path 1", + "ix": 1, + "d": 1, + "ks": { + "a": 0, + "k": { + "c": false, + "i": [ + [ + 0, + 0 + ], + [ + 0, + 0 + ] + ], + "o": [ + [ + 0, + 0 + ], + [ + 0, + 0 + ] + ], + "v": [ + [ + -1, + 80 + ], + [ + -1, + -37.5 + ] + ] + }, + "ix": 2 + } + }, + { + "ty": "tm", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Filter - Trim", + "nm": "Trim Paths 1", + "ix": 2, + "e": { + "a": 0, + "k": 0.1, + "ix": 2 + }, + "o": { + "a": 0, + "k": 0, + "ix": 3 + }, + "s": { + "a": 0, + "k": 0, + "ix": 1 + }, + "m": 1 + }, + { + "ty": "st", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Graphic - Stroke", + "nm": "Stroke 1", + "lc": 2, + "lj": 1, + "ml": 4, + "o": { + "a": 0, + "k": 100, + "ix": 4 + }, + "w": { + "a": 0, + "k": 33, + "ix": 5 + }, + "c": { + "a": 0, + "k": [ + 1, + 1, + 1 + ], + "ix": 3 + } + }, + { + "ty": "tr", + "a": { + "a": 0, + "k": [ + 0, + 0 + ], + "ix": 1 + }, + "s": { + "a": 0, + "k": [ + 100, + 100 + ], + "ix": 3 + }, + "sk": { + "a": 0, + "k": 0, + "ix": 4 + }, + "p": { + "a": 0, + "k": [ + 0, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 6 + }, + "sa": { + "a": 0, + "k": 0, + "ix": 5 + }, + "o": { + "a": 0, + "k": 100, + "ix": 7 + } + } + ] + } + ], + "ind": 3, + "parent": 2 + }, + { + "ty": 4, + "nm": "Tri Outlines", + "sr": 1, + "st": 0, + "op": 144, + "ip": 10, + "hd": false, + "ddd": 0, + "bm": 0, + "hasMask": false, + "ao": 0, + "ks": { + "a": { + "a": 0, + "k": [ + 85.513, + 72.848, + 0 + ], + "ix": 1 + }, + "s": { + "a": 1, + "k": [ + { + "o": { + "x": 0.167, + "y": 0.167 + }, + "i": { + "x": 0.833, + "y": 0.833 + }, + "s": [ + 0, + 0, + 100 + ], + "t": 10 + }, + { + "s": [ + 100, + 100, + 100 + ], + "t": 15 + } + ], + "ix": 6, + "x": "var $bm_rt;\nvar amp, freq, decay, n, t, v;\ntry {\n amp = $bm_div(effect('Scale - Overshoot')('ADBE Slider Control-0001'), 2.5), freq = $bm_div(effect('Scale - Bounce')('ADBE Slider Control-0001'), 20), decay = $bm_div(effect('Scale - Friction')('ADBE Slider Control-0001'), 20), n = 0, 0 < numKeys && (n = nearestKey(time).index, key(n).time > time && n--), t = 0 === n ? 0 : $bm_sub(time, key(n).time), $bm_rt = 0 < n ? (v = velocityAtTime($bm_sub(key(n).time, $bm_div(thisComp.frameDuration, 10))), $bm_sum(value, $bm_div($bm_mul($bm_mul($bm_div(v, 100), amp), Math.sin($bm_mul($bm_mul($bm_mul(freq, t), 2), Math.PI))), Math.exp($bm_mul(decay, t))))) : value;\n} catch (e$$4) {\n $bm_rt = value = value;\n}" + }, + "sk": { + "a": 0, + "k": 0 + }, + "p": { + "a": 0, + "k": [ + 59.955, + 37.467, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 10 + }, + "sa": { + "a": 0, + "k": 0 + }, + "o": { + "a": 0, + "k": 100, + "ix": 11 + } + }, + "ef": [ + { + "ty": 5, + "mn": "ADBE Slider Control", + "nm": "Scale - Overshoot", + "ix": 1, + "en": 1, + "ef": [ + { + "ty": 0, + "mn": "ADBE Slider Control-0001", + "nm": "Slider", + "ix": 1, + "v": { + "a": 0, + "k": 10, + "ix": 1, + "x": "var $bm_rt;\n$bm_rt = clamp(value, 0, 100);" + } + } + ] + }, + { + "ty": 5, + "mn": "ADBE Slider Control", + "nm": "Scale - Bounce", + "ix": 2, + "en": 1, + "ef": [ + { + "ty": 0, + "mn": "ADBE Slider Control-0001", + "nm": "Slider", + "ix": 1, + "v": { + "a": 0, + "k": 35, + "ix": 1, + "x": "var $bm_rt;\n$bm_rt = clamp(value, 0, 100);" + } + } + ] + }, + { + "ty": 5, + "mn": "ADBE Slider Control", + "nm": "Scale - Friction", + "ix": 3, + "en": 1, + "ef": [ + { + "ty": 0, + "mn": "ADBE Slider Control-0001", + "nm": "Slider", + "ix": 1, + "v": { + "a": 0, + "k": 65, + "ix": 1, + "x": "var $bm_rt;\n$bm_rt = clamp(value, 0, 100);" + } + } + ] + } + ], + "shapes": [ + { + "ty": "gr", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Group", + "nm": "Group 1", + "ix": 1, + "cix": 2, + "np": 2, + "it": [ + { + "ty": "sh", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Shape - Group", + "nm": "Path 1", + "ix": 1, + "d": 1, + "ks": { + "a": 0, + "k": { + "c": true, + "i": [ + [ + -3.315, + 5.634 + ], + [ + 0, + 0 + ], + [ + -3.267, + -5.554 + ], + [ + 0, + 0 + ], + [ + 6.537, + 0 + ], + [ + 0, + 0 + ] + ], + "o": [ + [ + 0, + 0 + ], + [ + 3.268, + -5.554 + ], + [ + 0, + 0 + ], + [ + 3.315, + 5.634 + ], + [ + 0, + 0 + ], + [ + -6.536, + 0 + ] + ], + "v": [ + [ + -81.948, + 59.861 + ], + [ + -7.284, + -67.044 + ], + [ + 7.284, + -67.044 + ], + [ + 81.948, + 59.861 + ], + [ + 74.664, + 72.598 + ], + [ + -74.664, + 72.598 + ] + ] + }, + "ix": 2 + } + }, + { + "ty": "fl", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Graphic - Fill", + "nm": "Fill 1", + "c": { + "a": 0, + "k": [ + 0.7255, + 0.098, + 0 + ], + "ix": 4 + }, + "r": 1, + "o": { + "a": 0, + "k": 100, + "ix": 5 + } + }, + { + "ty": "tr", + "a": { + "a": 0, + "k": [ + 0, + 0 + ], + "ix": 1 + }, + "s": { + "a": 0, + "k": [ + 100, + 100 + ], + "ix": 3 + }, + "sk": { + "a": 0, + "k": 0, + "ix": 4 + }, + "p": { + "a": 0, + "k": [ + 85.513, + 72.848 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 6 + }, + "sa": { + "a": 0, + "k": 0, + "ix": 5 + }, + "o": { + "a": 0, + "k": 100, + "ix": 7 + } + } + ] + } + ], + "ind": 4, + "parent": 1 + }, + { + "ty": 3, + "nm": "Tri", + "sr": 1, + "st": 0, + "op": 144, + "ip": 10, + "hd": false, + "ddd": 0, + "bm": 0, + "hasMask": false, + "ao": 0, + "ks": { + "a": { + "a": 0, + "k": [ + 85.513, + 72.848, + 0 + ], + "ix": 1 + }, + "s": { + "a": 1, + "k": [ + { + "o": { + "x": 0.167, + "y": 0.167 + }, + "i": { + "x": 0.833, + "y": 0.833 + }, + "s": [ + 0, + 0, + 100 + ], + "t": 10 + }, + { + "s": [ + 100, + 100, + 100 + ], + "t": 15 + } + ], + "ix": 6, + "x": "var $bm_rt;\nvar amp, freq, decay, n, t, v;\ntry {\n amp = $bm_div(effect('Scale - Overshoot')('ADBE Slider Control-0001'), 2.5), freq = $bm_div(effect('Scale - Bounce')('ADBE Slider Control-0001'), 20), decay = $bm_div(effect('Scale - Friction')('ADBE Slider Control-0001'), 20), n = 0, 0 < numKeys && (n = nearestKey(time).index, key(n).time > time && n--), t = 0 === n ? 0 : $bm_sub(time, key(n).time), $bm_rt = 0 < n ? (v = velocityAtTime($bm_sub(key(n).time, $bm_div(thisComp.frameDuration, 10))), $bm_sum(value, $bm_div($bm_mul($bm_mul($bm_div(v, 100), amp), Math.sin($bm_mul($bm_mul($bm_mul(freq, t), 2), Math.PI))), Math.exp($bm_mul(decay, t))))) : value;\n} catch (e$$4) {\n $bm_rt = value = value;\n}" + }, + "sk": { + "a": 0, + "k": 0 + }, + "p": { + "a": 0, + "k": [ + 59.955, + 37.467, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 10 + }, + "sa": { + "a": 0, + "k": 0 + }, + "o": { + "a": 0, + "k": 100, + "ix": 11 + } + }, + "ef": [ + { + "ty": 5, + "mn": "ADBE Slider Control", + "nm": "Scale - Overshoot", + "ix": 1, + "en": 1, + "ef": [ + { + "ty": 0, + "mn": "ADBE Slider Control-0001", + "nm": "Slider", + "ix": 1, + "v": { + "a": 0, + "k": 10, + "ix": 1, + "x": "var $bm_rt;\n$bm_rt = clamp(value, 0, 100);" + } + } + ] + }, + { + "ty": 5, + "mn": "ADBE Slider Control", + "nm": "Scale - Bounce", + "ix": 2, + "en": 1, + "ef": [ + { + "ty": 0, + "mn": "ADBE Slider Control-0001", + "nm": "Slider", + "ix": 1, + "v": { + "a": 0, + "k": 35, + "ix": 1, + "x": "var $bm_rt;\n$bm_rt = clamp(value, 0, 100);" + } + } + ] + }, + { + "ty": 5, + "mn": "ADBE Slider Control", + "nm": "Scale - Friction", + "ix": 3, + "en": 1, + "ef": [ + { + "ty": 0, + "mn": "ADBE Slider Control-0001", + "nm": "Slider", + "ix": 1, + "v": { + "a": 0, + "k": 65, + "ix": 1, + "x": "var $bm_rt;\n$bm_rt = clamp(value, 0, 100);" + } + } + ] + } + ], + "ind": 5, + "parent": 1 + }, + { + "ty": 1, + "nm": "Plate_white", + "sr": 1, + "st": 0, + "op": 144, + "ip": 0, + "hd": false, + "ddd": 0, + "bm": 0, + "hasMask": false, + "ao": 0, + "ks": { + "a": { + "a": 0, + "k": [ + 250, + 250, + 0 + ], + "ix": 1 + }, + "s": { + "a": 0, + "k": [ + 100, + 100, + 100 + ], + "ix": 6 + }, + "sk": { + "a": 0, + "k": 0 + }, + "p": { + "a": 0, + "k": [ + 250, + 250, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 10 + }, + "sa": { + "a": 0, + "k": 0 + }, + "o": { + "a": 0, + "k": 100, + "ix": 11 + } + }, + "ef": [], + "sc": "#ffffff", + "sh": 500, + "sw": 500, + "ind": 6 + } + ], + "v": "5.5.7", + "fr": 48, + "op": 144, + "ip": 0, + "assets": [] +} \ No newline at end of file diff --git a/apps/health_campaign_field_worker_app/assets/animated_json/error.json b/apps/health_campaign_field_worker_app/assets/animated_json/error.json new file mode 100644 index 000000000..96b4f9626 --- /dev/null +++ b/apps/health_campaign_field_worker_app/assets/animated_json/error.json @@ -0,0 +1,728 @@ +{ + "nm": "ckeck", + "ddd": 0, + "h": 50, + "w": 50, + "meta": { + "g": "@lottiefiles/toolkit-js 0.33.2" + }, + "layers": [ + { + "ty": 4, + "nm": "! Outlines", + "sr": 1, + "st": 0, + "op": 213, + "ip": 0, + "hd": false, + "ddd": 0, + "bm": 0, + "hasMask": false, + "ao": 0, + "ks": { + "a": { + "a": 0, + "k": [ + 2, + 12, + 0 + ], + "ix": 1 + }, + "s": { + "a": 1, + "k": [ + { + "o": { + "x": 0.653, + "y": -0.834 + }, + "i": { + "x": 0.667, + "y": 1 + }, + "s": [ + 100, + 100, + 100 + ], + "t": 60 + }, + { + "o": { + "x": 0.167, + "y": 0.167 + }, + "i": { + "x": 0.833, + "y": 0.833 + }, + "s": [ + 115, + 115, + 100 + ], + "t": 73 + }, + { + "o": { + "x": 0.333, + "y": 0 + }, + "i": { + "x": 0.127, + "y": 1.695 + }, + "s": [ + 115, + 115, + 100 + ], + "t": 83 + }, + { + "s": [ + 100, + 100, + 100 + ], + "t": 90 + } + ], + "ix": 6 + }, + "sk": { + "a": 0, + "k": 0 + }, + "p": { + "a": 0, + "k": [ + 25, + 25, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 10 + }, + "sa": { + "a": 0, + "k": 0 + }, + "o": { + "a": 0, + "k": 100, + "ix": 11 + } + }, + "ef": [], + "shapes": [ + { + "ty": "gr", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Group", + "nm": "Group 1", + "ix": 1, + "cix": 2, + "np": 4, + "it": [ + { + "ty": "sh", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Shape - Group", + "nm": "Path 1", + "ix": 1, + "d": 1, + "ks": { + "a": 0, + "k": { + "c": true, + "i": [ + [ + 0, + 1.104 + ], + [ + -1.104, + 0 + ], + [ + 0, + -1.104 + ], + [ + 1.104, + 0 + ] + ], + "o": [ + [ + 0, + -1.104 + ], + [ + 1.104, + 0 + ], + [ + 0, + 1.104 + ], + [ + -1.104, + 0 + ] + ], + "v": [ + [ + -2, + 10 + ], + [ + 0, + 8 + ], + [ + 2, + 10 + ], + [ + 0, + 12 + ] + ] + }, + "ix": 2 + } + }, + { + "ty": "sh", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Shape - Group", + "nm": "Path 2", + "ix": 2, + "d": 1, + "ks": { + "a": 0, + "k": { + "c": true, + "i": [ + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ] + ], + "o": [ + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ] + ], + "v": [ + [ + -1.036, + 5 + ], + [ + -2, + -6.625 + ], + [ + -2, + -12 + ], + [ + 2, + -12 + ], + [ + 2, + -6.625 + ], + [ + 1.052, + 5 + ] + ] + }, + "ix": 2 + } + }, + { + "ty": "mm", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Filter - Merge", + "nm": "Merge Paths 1", + "mm": 1 + }, + { + "ty": "fl", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Graphic - Fill", + "nm": "Fill 1", + "c": { + "a": 0, + "k": [ + 1, + 1, + 1 + ], + "ix": 4 + }, + "r": 1, + "o": { + "a": 0, + "k": 100, + "ix": 5 + } + }, + { + "ty": "tr", + "a": { + "a": 0, + "k": [ + 0.099, + 9.982 + ], + "ix": 1 + }, + "s": { + "a": 0, + "k": [ + 100, + 100 + ], + "ix": 3 + }, + "sk": { + "a": 0, + "k": 0, + "ix": 4 + }, + "p": { + "a": 0, + "k": [ + 2.099, + 21.982 + ], + "ix": 2 + }, + "r": { + "a": 1, + "k": [ + { + "o": { + "x": 0.167, + "y": 0.167 + }, + "i": { + "x": 0.833, + "y": 0.833 + }, + "s": [ + 0 + ], + "t": 10 + }, + { + "o": { + "x": 0.167, + "y": 0.167 + }, + "i": { + "x": 0.833, + "y": 0.833 + }, + "s": [ + 5 + ], + "t": 12 + }, + { + "o": { + "x": 0.167, + "y": 0.167 + }, + "i": { + "x": 0.833, + "y": 0.833 + }, + "s": [ + -5 + ], + "t": 14 + }, + { + "o": { + "x": 0.167, + "y": 0.167 + }, + "i": { + "x": 0.833, + "y": 0.833 + }, + "s": [ + 5 + ], + "t": 16 + }, + { + "o": { + "x": 0.167, + "y": 0.167 + }, + "i": { + "x": 0.833, + "y": 0.833 + }, + "s": [ + -5 + ], + "t": 18 + }, + { + "o": { + "x": 0.167, + "y": 0.167 + }, + "i": { + "x": 0.833, + "y": 0.833 + }, + "s": [ + 5 + ], + "t": 20 + }, + { + "o": { + "x": 0.167, + "y": 0.167 + }, + "i": { + "x": 0.833, + "y": 0.833 + }, + "s": [ + -5 + ], + "t": 22 + }, + { + "s": [ + 0 + ], + "t": 24 + } + ], + "ix": 6 + }, + "sa": { + "a": 0, + "k": 0, + "ix": 5 + }, + "o": { + "a": 0, + "k": 100, + "ix": 7 + } + } + ] + } + ], + "ind": 1 + }, + { + "ty": 4, + "nm": "Shape Layer 1", + "sr": 1, + "st": 0, + "op": 193, + "ip": 0, + "hd": false, + "ddd": 0, + "bm": 0, + "hasMask": false, + "ao": 0, + "ks": { + "a": { + "a": 0, + "k": [ + 0, + 10, + 0 + ], + "ix": 1 + }, + "s": { + "a": 1, + "k": [ + { + "o": { + "x": 0.41, + "y": -0.602 + }, + "i": { + "x": 0.667, + "y": 1 + }, + "s": [ + 100, + 100, + 100 + ], + "t": 60 + }, + { + "o": { + "x": 0.333, + "y": 0 + }, + "i": { + "x": 0.436, + "y": 1.492 + }, + "s": [ + 115, + 115, + 100 + ], + "t": 83 + }, + { + "s": [ + 100, + 100, + 100 + ], + "t": 90 + } + ], + "ix": 6 + }, + "sk": { + "a": 0, + "k": 0 + }, + "p": { + "a": 0, + "k": [ + 25, + 35, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 10 + }, + "sa": { + "a": 0, + "k": 0 + }, + "o": { + "a": 0, + "k": 100, + "ix": 11 + } + }, + "ef": [], + "shapes": [ + { + "ty": "gr", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Group", + "nm": "Ellipse 1", + "ix": 1, + "cix": 2, + "np": 3, + "it": [ + { + "ty": "el", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Shape - Ellipse", + "nm": "Ellipse Path 1", + "d": 1, + "p": { + "a": 0, + "k": [ + 0, + 0 + ], + "ix": 3 + }, + "s": { + "a": 0, + "k": [ + 40, + 40 + ], + "ix": 2 + } + }, + { + "ty": "st", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Graphic - Stroke", + "nm": "Stroke 1", + "lc": 1, + "lj": 1, + "ml": 4, + "o": { + "a": 0, + "k": 100, + "ix": 4 + }, + "w": { + "a": 0, + "k": 2, + "ix": 5 + }, + "c": { + "a": 0, + "k": [ + 1, + 1, + 1 + ], + "ix": 3 + } + }, + { + "ty": "tr", + "a": { + "a": 0, + "k": [ + 0, + 0 + ], + "ix": 1 + }, + "s": { + "a": 0, + "k": [ + 100, + 100 + ], + "ix": 3 + }, + "sk": { + "a": 0, + "k": 0, + "ix": 4 + }, + "p": { + "a": 0, + "k": [ + 0, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 6 + }, + "sa": { + "a": 0, + "k": 0, + "ix": 5 + }, + "o": { + "a": 0, + "k": 100, + "ix": 7 + } + } + ] + }, + { + "ty": "tm", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Filter - Trim", + "nm": "Trim Paths 1", + "ix": 2, + "e": { + "a": 0, + "k": 100, + "ix": 2 + }, + "o": { + "a": 0, + "k": 0, + "ix": 3 + }, + "s": { + "a": 0, + "k": 0, + "ix": 1 + }, + "m": 1 + } + ], + "ind": 2 + } + ], + "v": "5.6.5", + "fr": 60, + "op": 180, + "ip": 0, + "assets": [] +} \ No newline at end of file diff --git a/apps/health_campaign_field_worker_app/assets/animated_json/inline_loader.json b/apps/health_campaign_field_worker_app/assets/animated_json/inline_loader.json new file mode 100644 index 000000000..e5a3cc656 --- /dev/null +++ b/apps/health_campaign_field_worker_app/assets/animated_json/inline_loader.json @@ -0,0 +1 @@ +{"nm":"Main Scene","ddd":0,"h":500,"w":500,"meta":{"g":"@lottiefiles/creator 1.37.0"},"layers":[{"ty":4,"nm":"Shape Layer 5","sr":1,"st":20,"op":620,"ip":20,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[0,0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[251,250]},"r":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[0],"t":20},{"s":[360],"t":110}]},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}},"shapes":[{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Ellipse 1","ix":1,"cix":2,"np":3,"it":[{"ty":"el","bm":0,"hd":false,"mn":"ADBE Vector Shape - Ellipse","nm":"Ellipse Path 1","d":1,"p":{"a":0,"k":[0,-100]},"s":{"a":0,"k":[10,10]}},{"ty":"st","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Stroke","nm":"Stroke 1","lc":1,"lj":1,"ml":4,"o":{"a":0,"k":100},"w":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0]}},{"ty":"fl","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[0.7765,0.2902,0.051]},"r":1,"o":{"a":0,"k":100}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[0,0],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]}],"ind":1},{"ty":4,"nm":"Shape Layer 4","sr":1,"st":15,"op":615,"ip":15,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[0,0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[251,250]},"r":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[0],"t":15},{"s":[360],"t":105}]},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}},"shapes":[{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Ellipse 1","ix":1,"cix":2,"np":3,"it":[{"ty":"el","bm":0,"hd":false,"mn":"ADBE Vector Shape - Ellipse","nm":"Ellipse Path 1","d":1,"p":{"a":0,"k":[0,-100]},"s":{"a":0,"k":[20,20]}},{"ty":"st","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Stroke","nm":"Stroke 1","lc":1,"lj":1,"ml":4,"o":{"a":0,"k":100},"w":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0]}},{"ty":"fl","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[0.7765,0.2902,0.051]},"r":1,"o":{"a":0,"k":100}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[0,0],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]}],"ind":2},{"ty":4,"nm":"Shape Layer 3","sr":1,"st":10,"op":610,"ip":10,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[0,0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[251,250]},"r":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[0],"t":10},{"s":[360],"t":100}]},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}},"shapes":[{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Ellipse 1","ix":1,"cix":2,"np":3,"it":[{"ty":"el","bm":0,"hd":false,"mn":"ADBE Vector Shape - Ellipse","nm":"Ellipse Path 1","d":1,"p":{"a":0,"k":[0,-100]},"s":{"a":0,"k":[30,30]}},{"ty":"st","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Stroke","nm":"Stroke 1","lc":1,"lj":1,"ml":4,"o":{"a":0,"k":100},"w":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0]}},{"ty":"fl","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[0.7765,0.2902,0.051]},"r":1,"o":{"a":0,"k":100}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[0,0],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]}],"ind":3},{"ty":4,"nm":"Shape Layer 2","sr":1,"st":5,"op":605,"ip":5,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[0,0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[251,250]},"r":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[0],"t":5},{"s":[360],"t":95}]},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}},"shapes":[{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Ellipse 1","ix":1,"cix":2,"np":3,"it":[{"ty":"el","bm":0,"hd":false,"mn":"ADBE Vector Shape - Ellipse","nm":"Ellipse Path 1","d":1,"p":{"a":0,"k":[0,-100]},"s":{"a":0,"k":[40,40]}},{"ty":"st","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Stroke","nm":"Stroke 1","lc":1,"lj":1,"ml":4,"o":{"a":0,"k":100},"w":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0]}},{"ty":"fl","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[0.7765,0.2902,0.051]},"r":1,"o":{"a":0,"k":100}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[0,0],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]}],"ind":4},{"ty":4,"nm":"Shape Layer 1","sr":1,"st":0,"op":600,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[0,0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[250,250]},"r":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[0],"t":0},{"s":[360],"t":90}]},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}},"shapes":[{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Ellipse 1","ix":1,"cix":2,"np":3,"it":[{"ty":"el","bm":0,"hd":false,"mn":"ADBE Vector Shape - Ellipse","nm":"Ellipse Path 1","d":1,"p":{"a":0,"k":[0,-100]},"s":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[50,50],"t":0},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[40,40],"t":84},{"s":[50,50],"t":100}]}},{"ty":"st","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Stroke","nm":"Stroke 1","lc":1,"lj":1,"ml":4,"o":{"a":0,"k":100},"w":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0]}},{"ty":"fl","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[0.7765,0.2902,0.051]},"r":1,"o":{"a":0,"k":100}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[0,0],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]}],"ind":5}],"v":"5.7.0","fr":60,"op":106,"ip":0,"assets":[]} \ No newline at end of file diff --git a/apps/health_campaign_field_worker_app/assets/animated_json/overlay_loader.json b/apps/health_campaign_field_worker_app/assets/animated_json/overlay_loader.json new file mode 100644 index 000000000..9a9759f2d --- /dev/null +++ b/apps/health_campaign_field_worker_app/assets/animated_json/overlay_loader.json @@ -0,0 +1 @@ +{"nm":"Main Scene","ddd":0,"h":500,"w":500,"meta":{"g":"@lottiefiles/creator 1.37.1"},"layers":[{"ty":4,"nm":"Shape Layer 5","sr":1,"st":20,"op":620,"ip":20,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[0,0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[251,250]},"r":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[0],"t":20},{"s":[360],"t":110}]},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}},"shapes":[{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Ellipse 1","ix":1,"cix":2,"np":3,"it":[{"ty":"el","bm":0,"hd":false,"mn":"ADBE Vector Shape - Ellipse","nm":"Ellipse Path 1","d":1,"p":{"a":0,"k":[0,-100]},"s":{"a":0,"k":[10,10]}},{"ty":"st","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Stroke","nm":"Stroke 1","lc":1,"lj":1,"ml":4,"o":{"a":0,"k":100},"w":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0]}},{"ty":"fl","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[1,1,1]},"r":1,"o":{"a":0,"k":100}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[0,0],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]}],"ind":1},{"ty":4,"nm":"Shape Layer 4","sr":1,"st":15,"op":615,"ip":15,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[0,0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[251,250]},"r":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[0],"t":15},{"s":[360],"t":105}]},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}},"shapes":[{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Ellipse 1","ix":1,"cix":2,"np":3,"it":[{"ty":"el","bm":0,"hd":false,"mn":"ADBE Vector Shape - Ellipse","nm":"Ellipse Path 1","d":1,"p":{"a":0,"k":[0,-100]},"s":{"a":0,"k":[20,20]}},{"ty":"st","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Stroke","nm":"Stroke 1","lc":1,"lj":1,"ml":4,"o":{"a":0,"k":100},"w":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0]}},{"ty":"fl","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[1,1,1]},"r":1,"o":{"a":0,"k":100}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[0,0],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]}],"ind":2},{"ty":4,"nm":"Shape Layer 3","sr":1,"st":10,"op":610,"ip":10,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[0,0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[251,250]},"r":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[0],"t":10},{"s":[360],"t":100}]},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}},"shapes":[{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Ellipse 1","ix":1,"cix":2,"np":3,"it":[{"ty":"el","bm":0,"hd":false,"mn":"ADBE Vector Shape - Ellipse","nm":"Ellipse Path 1","d":1,"p":{"a":0,"k":[0,-100]},"s":{"a":0,"k":[30,30]}},{"ty":"st","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Stroke","nm":"Stroke 1","lc":1,"lj":1,"ml":4,"o":{"a":0,"k":100},"w":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0]}},{"ty":"fl","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[1,1,1]},"r":1,"o":{"a":0,"k":100}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[0,0],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]}],"ind":3},{"ty":4,"nm":"Shape Layer 2","sr":1,"st":5,"op":605,"ip":5,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[0,0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[251,250]},"r":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[0],"t":5},{"s":[360],"t":95}]},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}},"shapes":[{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Ellipse 1","ix":1,"cix":2,"np":3,"it":[{"ty":"el","bm":0,"hd":false,"mn":"ADBE Vector Shape - Ellipse","nm":"Ellipse Path 1","d":1,"p":{"a":0,"k":[0,-100]},"s":{"a":0,"k":[40,40]}},{"ty":"st","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Stroke","nm":"Stroke 1","lc":1,"lj":1,"ml":4,"o":{"a":0,"k":100},"w":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0]}},{"ty":"fl","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[1,1,1]},"r":1,"o":{"a":0,"k":100}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[0,0],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]}],"ind":4},{"ty":4,"nm":"Shape Layer 1","sr":1,"st":0,"op":600,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[0,0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[250,250]},"r":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[0],"t":0},{"s":[360],"t":90}]},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}},"shapes":[{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Ellipse 1","ix":1,"cix":2,"np":3,"it":[{"ty":"el","bm":0,"hd":false,"mn":"ADBE Vector Shape - Ellipse","nm":"Ellipse Path 1","d":1,"p":{"a":0,"k":[0,-100]},"s":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[50,50],"t":0},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[40,40],"t":84},{"s":[50,50],"t":100}]}},{"ty":"st","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Stroke","nm":"Stroke 1","lc":1,"lj":1,"ml":4,"o":{"a":0,"k":100},"w":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0]}},{"ty":"fl","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[1,1,1]},"r":1,"o":{"a":0,"k":100}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[0,0],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]}],"ind":5}],"v":"5.7.0","fr":60,"op":106,"ip":0,"assets":[]} \ No newline at end of file diff --git a/apps/health_campaign_field_worker_app/assets/animated_json/page_loader.json b/apps/health_campaign_field_worker_app/assets/animated_json/page_loader.json new file mode 100644 index 000000000..ef02f47ca --- /dev/null +++ b/apps/health_campaign_field_worker_app/assets/animated_json/page_loader.json @@ -0,0 +1 @@ +{"nm":"Main Scene","ddd":0,"h":500,"w":500,"meta":{"g":"@lottiefiles/creator 1.37.1"},"layers":[{"ty":4,"nm":"Shape Layer 5","sr":1,"st":20,"op":620,"ip":20,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[0,0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[251,250]},"r":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[0],"t":20},{"s":[360],"t":110}]},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}},"shapes":[{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Ellipse 1","ix":1,"cix":2,"np":3,"it":[{"ty":"el","bm":0,"hd":false,"mn":"ADBE Vector Shape - Ellipse","nm":"Ellipse Path 1","d":1,"p":{"a":0,"k":[0,-100]},"s":{"a":0,"k":[10,10]}},{"ty":"st","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Stroke","nm":"Stroke 1","lc":1,"lj":1,"ml":4,"o":{"a":0,"k":100},"w":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0]}},{"ty":"fl","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[0.0353,0.2902,0.4]},"r":1,"o":{"a":0,"k":100}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[0,0],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]}],"ind":1},{"ty":4,"nm":"Shape Layer 4","sr":1,"st":15,"op":615,"ip":15,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[0,0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[251,250]},"r":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[0],"t":15},{"s":[360],"t":105}]},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}},"shapes":[{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Ellipse 1","ix":1,"cix":2,"np":3,"it":[{"ty":"el","bm":0,"hd":false,"mn":"ADBE Vector Shape - Ellipse","nm":"Ellipse Path 1","d":1,"p":{"a":0,"k":[0,-100]},"s":{"a":0,"k":[20,20]}},{"ty":"st","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Stroke","nm":"Stroke 1","lc":1,"lj":1,"ml":4,"o":{"a":0,"k":100},"w":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0]}},{"ty":"fl","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[0.0353,0.2902,0.4]},"r":1,"o":{"a":0,"k":100}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[0,0],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]}],"ind":2},{"ty":4,"nm":"Shape Layer 3","sr":1,"st":10,"op":610,"ip":10,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[0,0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[251,250]},"r":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[0],"t":10},{"s":[360],"t":100}]},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}},"shapes":[{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Ellipse 1","ix":1,"cix":2,"np":3,"it":[{"ty":"el","bm":0,"hd":false,"mn":"ADBE Vector Shape - Ellipse","nm":"Ellipse Path 1","d":1,"p":{"a":0,"k":[0,-100]},"s":{"a":0,"k":[30,30]}},{"ty":"st","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Stroke","nm":"Stroke 1","lc":1,"lj":1,"ml":4,"o":{"a":0,"k":100},"w":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0]}},{"ty":"fl","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[0.0353,0.2902,0.4]},"r":1,"o":{"a":0,"k":100}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[0,0],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]}],"ind":3},{"ty":4,"nm":"Shape Layer 2","sr":1,"st":5,"op":605,"ip":5,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[0,0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[251,250]},"r":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[0],"t":5},{"s":[360],"t":95}]},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}},"shapes":[{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Ellipse 1","ix":1,"cix":2,"np":3,"it":[{"ty":"el","bm":0,"hd":false,"mn":"ADBE Vector Shape - Ellipse","nm":"Ellipse Path 1","d":1,"p":{"a":0,"k":[0,-100]},"s":{"a":0,"k":[40,40]}},{"ty":"st","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Stroke","nm":"Stroke 1","lc":1,"lj":1,"ml":4,"o":{"a":0,"k":100},"w":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0]}},{"ty":"fl","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[0.0353,0.2902,0.4]},"r":1,"o":{"a":0,"k":100}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[0,0],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]}],"ind":4},{"ty":4,"nm":"Shape Layer 1","sr":1,"st":0,"op":600,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[0,0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[250,250]},"r":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[0],"t":0},{"s":[360],"t":90}]},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}},"shapes":[{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Ellipse 1","ix":1,"cix":2,"np":3,"it":[{"ty":"el","bm":0,"hd":false,"mn":"ADBE Vector Shape - Ellipse","nm":"Ellipse Path 1","d":1,"p":{"a":0,"k":[0,-100]},"s":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[50,50],"t":0},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[40,40],"t":84},{"s":[50,50],"t":100}]}},{"ty":"st","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Stroke","nm":"Stroke 1","lc":1,"lj":1,"ml":4,"o":{"a":0,"k":100},"w":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0]}},{"ty":"fl","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[0.0353,0.2902,0.4]},"r":1,"o":{"a":0,"k":100}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[0,0],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]}],"ind":5}],"v":"5.7.0","fr":60,"op":106,"ip":0,"assets":[]} \ No newline at end of file diff --git a/apps/health_campaign_field_worker_app/assets/animated_json/success.json b/apps/health_campaign_field_worker_app/assets/animated_json/success.json new file mode 100644 index 000000000..43192f708 --- /dev/null +++ b/apps/health_campaign_field_worker_app/assets/animated_json/success.json @@ -0,0 +1,917 @@ +{ + "nm": "sucess", + "ddd": 0, + "h": 120, + "w": 120, + "meta": { + "g": "LottieFiles AE 0.1.21" + }, + "layers": [ + { + "ty": 3, + "nm": "scale up null", + "sr": 1, + "st": 0, + "op": 300.00001221925, + "ip": 0, + "hd": false, + "ddd": 0, + "bm": 0, + "hasMask": false, + "ao": 0, + "ks": { + "a": { + "a": 0, + "k": [ + 0, + 0, + 0 + ], + "ix": 1 + }, + "s": { + "a": 1, + "k": [ + { + "o": { + "x": 0.167, + "y": 0 + }, + "i": { + "x": 0.833, + "y": 1 + }, + "s": [ + 111, + 111, + 100 + ], + "t": 27 + }, + { + "o": { + "x": 0.167, + "y": 0 + }, + "i": { + "x": 0.833, + "y": 1 + }, + "s": [ + 101, + 101, + 100 + ], + "t": 36 + }, + { + "s": [ + 121, + 121, + 100 + ], + "t": 42.0000017106951 + } + ], + "ix": 6 + }, + "sk": { + "a": 0, + "k": 0 + }, + "p": { + "a": 0, + "k": [ + 60, + 60, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 10 + }, + "sa": { + "a": 0, + "k": 0 + }, + "o": { + "a": 0, + "k": 0, + "ix": 11 + } + }, + "ef": [], + "ind": 1 + }, + { + "ty": 4, + "nm": "spark", + "sr": 1, + "st": 35.0000014255792, + "op": 335.00001364483, + "ip": 35.0000014255792, + "hd": false, + "ddd": 0, + "bm": 0, + "hasMask": false, + "ao": 0, + "ks": { + "a": { + "a": 0, + "k": [ + 0, + 0, + 0 + ], + "ix": 1 + }, + "s": { + "a": 0, + "k": [ + 100, + 100, + 100 + ], + "ix": 6 + }, + "sk": { + "a": 0, + "k": 0 + }, + "p": { + "a": 0, + "k": [ + 0, + 0.5, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 10 + }, + "sa": { + "a": 0, + "k": 0 + }, + "o": { + "a": 0, + "k": 100, + "ix": 11 + } + }, + "ef": [], + "shapes": [ + { + "ty": "gr", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Group", + "nm": "Rectangle 1", + "ix": 1, + "cix": 2, + "np": 3, + "it": [ + { + "ty": "rc", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Shape - Rect", + "nm": "Rectangle Path 1", + "d": 1, + "p": { + "a": 1, + "k": [ + { + "o": { + "x": 0.333, + "y": 0 + }, + "i": { + "x": 0.667, + "y": 1 + }, + "s": [ + 0, + -21 + ], + "t": 35, + "ti": [ + 0, + 1.5 + ], + "to": [ + 0, + -1.5 + ] + }, + { + "s": [ + 0, + -30 + ], + "t": 53.0000021587343 + } + ], + "ix": 3 + }, + "r": { + "a": 0, + "k": 0, + "ix": 4 + }, + "s": { + "a": 1, + "k": [ + { + "o": { + "x": 0.976, + "y": 0 + }, + "i": { + "x": 0.667, + "y": 1 + }, + "s": [ + 2, + 0 + ], + "t": 35 + }, + { + "o": { + "x": 0.33299999999999996, + "y": 0 + }, + "i": { + "x": 0.15355432054499818, + "y": 0.9999999999999999 + }, + "s": [ + 2, + 8 + ], + "t": 42 + }, + { + "s": [ + 1.633, + 0 + ], + "t": 53.0000021587343 + } + ], + "ix": 2 + } + }, + { + "ty": "fl", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Graphic - Fill", + "nm": "Fill 1", + "c": { + "a": 0, + "k": [ + 0.9804, + 0.9804, + 0.9804 + ], + "ix": 4 + }, + "r": 1, + "o": { + "a": 0, + "k": 100, + "ix": 5 + } + }, + { + "ty": "tr", + "a": { + "a": 0, + "k": [ + 0, + 0 + ], + "ix": 1 + }, + "s": { + "a": 0, + "k": [ + 100, + 100 + ], + "ix": 3 + }, + "sk": { + "a": 0, + "k": 0, + "ix": 4 + }, + "p": { + "a": 0, + "k": [ + 0, + -8 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 6 + }, + "sa": { + "a": 0, + "k": 0, + "ix": 5 + }, + "o": { + "a": 0, + "k": 100, + "ix": 7 + } + } + ] + }, + { + "ty": "rp", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Filter - Repeater", + "nm": "Repeater 1", + "ix": 2, + "m": 1, + "c": { + "a": 0, + "k": 8, + "ix": 1 + }, + "o": { + "a": 0, + "k": 0, + "ix": 2 + }, + "tr": { + "a": { + "a": 0, + "k": [ + 0, + 0 + ], + "ix": 1 + }, + "s": { + "a": 0, + "k": [ + 100, + 100 + ], + "ix": 3 + }, + "sk": { + "a": 0, + "k": 0 + }, + "p": { + "a": 0, + "k": [ + 0, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 45, + "ix": 4 + }, + "sa": { + "a": 0, + "k": 0 + }, + "so": { + "a": 0, + "k": 100, + "ix": 5 + }, + "eo": { + "a": 0, + "k": 100, + "ix": 6 + } + } + } + ], + "ind": 2, + "parent": 1 + }, + { + "ty": 4, + "nm": "check", + "sr": 1, + "st": 10.0000004073083, + "op": 310.000012626559, + "ip": 22.0000008960784, + "hd": false, + "ddd": 0, + "bm": 0, + "hasMask": false, + "ao": 0, + "ks": { + "a": { + "a": 0, + "k": [ + 0, + 0, + 0 + ], + "ix": 1 + }, + "s": { + "a": 0, + "k": [ + 100, + 100, + 100 + ], + "ix": 6 + }, + "sk": { + "a": 0, + "k": 0 + }, + "p": { + "a": 0, + "k": [ + 0, + 0, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 10 + }, + "sa": { + "a": 0, + "k": 0 + }, + "o": { + "a": 0, + "k": 100, + "ix": 11 + } + }, + "ef": [], + "shapes": [ + { + "ty": "sh", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Shape - Group", + "nm": "Path 1", + "ix": 1, + "d": 1, + "ks": { + "a": 0, + "k": { + "c": false, + "i": [ + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 3.5, + 3.75 + ], + [ + -12.973, + 5.349 + ], + [ + -6.124, + -9.992 + ], + [ + 12.125, + -7.431 + ], + [ + 7.431, + 12.125 + ] + ], + "o": [ + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + -3.5, + -3.75 + ], + [ + 10.764, + -2.941 + ], + [ + 7.431, + 12.125 + ], + [ + -12.125, + 7.431 + ], + [ + -7.431, + -12.125 + ] + ], + "v": [ + [ + 15.25, + -9.688 + ], + [ + -5.75, + 10.062 + ], + [ + -16, + 0.25 + ], + [ + -6.777, + -24.849 + ], + [ + 21.955, + -13.456 + ], + [ + 13.456, + 21.955 + ], + [ + -21.955, + 13.456 + ] + ] + }, + "ix": 2 + } + }, + { + "ty": "tm", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Filter - Trim", + "nm": "Trim Paths 1", + "ix": 2, + "e": { + "a": 1, + "k": [ + { + "o": { + "x": 0.714, + "y": 0 + }, + "i": { + "x": 0.351, + "y": 1 + }, + "s": [ + 100 + ], + "t": 10 + }, + { + "s": [ + 23 + ], + "t": 40.0000016292334 + } + ], + "ix": 2 + }, + "o": { + "a": 0, + "k": 0, + "ix": 3 + }, + "s": { + "a": 1, + "k": [ + { + "o": { + "x": 0.742, + "y": 0 + }, + "i": { + "x": 0.363, + "y": 1 + }, + "s": [ + 100 + ], + "t": 17 + }, + { + "s": [ + 0 + ], + "t": 45.0000018328876 + } + ], + "ix": 1 + }, + "m": 1 + }, + { + "ty": "st", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Graphic - Stroke", + "nm": "Stroke 1", + "lc": 1, + "lj": 1, + "ml": 4, + "o": { + "a": 0, + "k": 100, + "ix": 4 + }, + "w": { + "a": 0, + "k": 4, + "ix": 5 + }, + "c": { + "a": 0, + "k": [ + 0.9804, + 0.9804, + 0.9804 + ], + "ix": 3 + } + } + ], + "ind": 3, + "parent": 1 + }, + { + "ty": 4, + "nm": "circle", + "sr": 1, + "st": 0, + "op": 300.00001221925, + "ip": 0, + "hd": false, + "ddd": 0, + "bm": 0, + "hasMask": false, + "ao": 0, + "ks": { + "a": { + "a": 0, + "k": [ + 0, + 0, + 0 + ], + "ix": 1 + }, + "s": { + "a": 0, + "k": [ + 100, + 100, + 100 + ], + "ix": 6 + }, + "sk": { + "a": 0, + "k": 0 + }, + "p": { + "a": 0, + "k": [ + 0, + 0, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 10 + }, + "sa": { + "a": 0, + "k": 0 + }, + "o": { + "a": 0, + "k": 100, + "ix": 11 + } + }, + "ef": [], + "shapes": [ + { + "ty": "sh", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Shape - Group", + "nm": "Path 1", + "ix": 1, + "d": 1, + "ks": { + "a": 0, + "k": { + "c": true, + "i": [ + [ + -14.221, + 0 + ], + [ + 0, + -14.221 + ], + [ + 14.221, + 0 + ], + [ + 0, + 14.221 + ] + ], + "o": [ + [ + 14.221, + 0 + ], + [ + 0, + 14.221 + ], + [ + -14.221, + 0 + ], + [ + 0, + -14.221 + ] + ], + "v": [ + [ + 0, + -25.75 + ], + [ + 25.75, + 0 + ], + [ + 0, + 25.75 + ], + [ + -25.75, + 0 + ] + ] + }, + "ix": 2 + } + }, + { + "ty": "st", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Graphic - Stroke", + "nm": "Stroke 1", + "lc": 1, + "lj": 1, + "ml": 4, + "o": { + "a": 0, + "k": 100, + "ix": 4 + }, + "w": { + "a": 0, + "k": 2, + "ix": 5 + }, + "c": { + "a": 0, + "k": [ + 0.9804, + 0.9804, + 0.9804 + ], + "ix": 3 + } + }, + { + "ty": "tm", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Filter - Trim", + "nm": "Trim Paths 1", + "ix": 3, + "e": { + "a": 1, + "k": [ + { + "o": { + "x": 0.714, + "y": 0 + }, + "i": { + "x": 0.351, + "y": 1 + }, + "s": [ + 100 + ], + "t": 0 + }, + { + "s": [ + 100 + ], + "t": 30.0000012219251 + } + ], + "ix": 2 + }, + "o": { + "a": 0, + "k": 0, + "ix": 3 + }, + "s": { + "a": 1, + "k": [ + { + "o": { + "x": 0.742, + "y": 0 + }, + "i": { + "x": 0.363, + "y": 1 + }, + "s": [ + 100 + ], + "t": 7 + }, + { + "s": [ + 0 + ], + "t": 33.0000013441176 + } + ], + "ix": 1 + }, + "m": 1 + } + ], + "ind": 4, + "parent": 1 + } + ], + "v": "5.5.7", + "fr": 29.9700012207031, + "op": 60.0000024438501, + "ip": 0, + "assets": [] +} \ No newline at end of file diff --git a/apps/health_campaign_field_worker_app/lib/app.dart b/apps/health_campaign_field_worker_app/lib/app.dart index 7d90ae5da..b5fa3fb6c 100644 --- a/apps/health_campaign_field_worker_app/lib/app.dart +++ b/apps/health_campaign_field_worker_app/lib/app.dart @@ -18,6 +18,7 @@ import 'package:registration_delivery/models/entities/household.dart'; import 'package:registration_delivery/models/entities/household_member.dart'; import 'package:registration_delivery/models/entities/project_beneficiary.dart'; import 'package:registration_delivery/models/entities/task.dart'; +import 'package:survey_form/survey_form.dart'; import 'blocs/app_initialization/app_initialization.dart'; import 'blocs/auth/auth.dart'; @@ -25,6 +26,8 @@ import 'blocs/localization/localization.dart'; import 'blocs/project/project.dart'; import 'data/local_store/app_shared_preferences.dart'; import 'data/network_manager.dart'; +import 'data/remote_client.dart'; +import 'data/repositories/remote/bandwidth_check.dart'; import 'data/repositories/remote/localization.dart'; import 'data/repositories/remote/mdms.dart'; import 'router/app_navigator_observer.dart'; @@ -181,13 +184,8 @@ class MainApplicationState extends State widget.sql) ..add( LocalizationEvent.onLoadLocalization( - module: localizationModulesList.interfaces - .where((element) => - element.type == - Modules.localizationModule) - .map((e) => e.name.toString()) - .join(',') - .toString(), + module: + "hcm-boundary-${envConfig.variables.hierarchyType.toLowerCase()},${localizationModulesList.interfaces.where((element) => element.type == Modules.localizationModule).map((e) => e.name.toString()).join(',')}", tenantId: appConfig.tenantId.toString(), locale: firstLanguage, path: Constants.localizationApiPath, @@ -201,6 +199,11 @@ class MainApplicationState extends State ), BlocProvider( create: (ctx) => ProjectBloc( + bandwidthCheckRepository: BandwidthCheckRepository( + DioClient().dio, + bandwidthPath: + envConfig.variables.checkBandwidthApiPath, + ), mdmsRepository: MdmsRepository(widget.client), dashboardRemoteRepository: DashboardRemoteRepository(widget.client), diff --git a/apps/health_campaign_field_worker_app/lib/blocs/app_initialization/app_initialization.dart b/apps/health_campaign_field_worker_app/lib/blocs/app_initialization/app_initialization.dart index 4530ae776..938819889 100644 --- a/apps/health_campaign_field_worker_app/lib/blocs/app_initialization/app_initialization.dart +++ b/apps/health_campaign_field_worker_app/lib/blocs/app_initialization/app_initialization.dart @@ -313,6 +313,7 @@ class MdmsConfig { final List serviceRegistryList; final DashboardConfigSchema? dashboardConfigSchema; + const MdmsConfig( {required this.appConfigs, required this.serviceRegistryList, diff --git a/apps/health_campaign_field_worker_app/lib/blocs/localization/app_localizations_delegate.dart b/apps/health_campaign_field_worker_app/lib/blocs/localization/app_localizations_delegate.dart index 7eaf5b020..9d8b05f12 100644 --- a/apps/health_campaign_field_worker_app/lib/blocs/localization/app_localizations_delegate.dart +++ b/apps/health_campaign_field_worker_app/lib/blocs/localization/app_localizations_delegate.dart @@ -1,7 +1,6 @@ import 'package:collection/collection.dart'; import 'package:digit_data_model/data/local_store/sql_store/sql_store.dart'; import 'package:flutter/material.dart'; -import 'package:isar/isar.dart'; import '../../data/local_store/no_sql/schema/app_configuration.dart'; import 'app_localization.dart'; diff --git a/apps/health_campaign_field_worker_app/lib/blocs/project/project.dart b/apps/health_campaign_field_worker_app/lib/blocs/project/project.dart index 18e420dea..07347633e 100644 --- a/apps/health_campaign_field_worker_app/lib/blocs/project/project.dart +++ b/apps/health_campaign_field_worker_app/lib/blocs/project/project.dart @@ -3,6 +3,7 @@ import 'dart:async'; import 'dart:core'; import 'package:attendance_management/attendance_management.dart'; +import 'package:survey_form/survey_form.dart'; import 'package:connectivity_plus/connectivity_plus.dart'; import 'package:digit_components/digit_components.dart'; import 'package:digit_data_model/data_model.dart'; @@ -19,10 +20,12 @@ import '../../data/local_store/no_sql/schema/app_configuration.dart'; import '../../data/local_store/no_sql/schema/row_versions.dart'; import '../../data/local_store/no_sql/schema/service_registry.dart'; import '../../data/local_store/secure_store/secure_store.dart'; +import '../../data/repositories/remote/bandwidth_check.dart'; import '../../data/repositories/remote/mdms.dart'; import '../../models/app_config/app_config_model.dart'; import '../../models/auth/auth_model.dart'; import '../../models/entities/roles_type.dart'; +import '../../utils/background_service.dart'; import '../../utils/environment_config.dart'; import '../../utils/utils.dart'; @@ -35,6 +38,8 @@ class ProjectBloc extends Bloc { final Isar isar; final MdmsRepository mdmsRepository; + final BandwidthCheckRepository bandwidthCheckRepository; + /// Project Staff Repositories final RemoteRepository projectStaffRemoteRepository; @@ -76,6 +81,7 @@ class ProjectBloc extends Bloc { final RemoteRepository stockRemoteRepository; final LocalRepository stockLocalRepository; + /// Service Definition Repositories final RemoteRepository serviceDefinitionRemoteRepository; final LocalRepository @@ -103,6 +109,7 @@ class ProjectBloc extends Bloc { ProjectBloc({ LocalSecureStore? localSecureStore, + required this.bandwidthCheckRepository, required this.projectStaffRemoteRepository, required this.projectRemoteRepository, required this.projectStaffLocalRepository, @@ -154,8 +161,8 @@ class ProjectBloc extends Bloc { title: 'ProjectBloc', ); - final isOnline = connectivityResult == ConnectivityResult.wifi || - connectivityResult == ConnectivityResult.mobile; + final isOnline = connectivityResult.firstOrNull == ConnectivityResult.wifi || + connectivityResult.firstOrNull == ConnectivityResult.mobile; final selectedProject = await localSecureStore.selectedProject; final isProjectSetUpComplete = await localSecureStore .isProjectSetUpComplete(selectedProject?.id ?? "noProjectId"); @@ -169,6 +176,7 @@ class ProjectBloc extends Bloc { } FutureOr _loadOnline(ProjectEmitter emit) async { + final batchSize = await _getBatchSize(); final userObject = await localSecureStore.userRequestModel; final uuid = userObject?.uuid; @@ -288,8 +296,11 @@ class ProjectBloc extends Bloc { } if (projects.isNotEmpty) { + + // INFO : Need to add project load functions + try { - await _loadProjectFacilities(projects); + await _loadProjectFacilities(projects, batchSize); } catch (_) { emit( state.copyWith( @@ -360,7 +371,8 @@ class ProjectBloc extends Bloc { ); } - FutureOr _loadProjectFacilities(List projects) async { + FutureOr _loadProjectFacilities( + List projects, int batchSize) async { final projectFacilities = await projectFacilityRemoteRepository.search( ProjectFacilitySearchModel( projectId: projects.map((e) => e.id).toList(), @@ -371,6 +383,7 @@ class ProjectBloc extends Bloc { final facilities = await facilityRemoteRepository.search( FacilitySearchModel(tenantId: envConfig.variables.tenantId), + limit: batchSize, ); await facilityLocalRepository.bulkCreate(facilities); @@ -584,8 +597,6 @@ class ProjectBloc extends Bloc { loading: false, syncError: ProjectSyncErrorType.boundary, )); - - return; } emit(state.copyWith( @@ -594,6 +605,25 @@ class ProjectBloc extends Bloc { syncError: null, )); } + + FutureOr _getBatchSize() async { + try { + final configs = await isar.appConfigurations.where().findAll(); + + final double speed = await bandwidthCheckRepository.pingBandwidthCheck( + bandWidthCheckModel: null, + ); + + int configuredBatchSize = getBatchSizeToBandwidth( + speed, + configs, + isDownSync: true, + ); + return configuredBatchSize; + } catch (e) { + rethrow; + } + } } @freezed diff --git a/apps/health_campaign_field_worker_app/lib/blocs/projects_beneficiary_downsync/project_beneficiaries_downsync.dart b/apps/health_campaign_field_worker_app/lib/blocs/projects_beneficiary_downsync/project_beneficiaries_downsync.dart index a443250b1..61c278aeb 100644 --- a/apps/health_campaign_field_worker_app/lib/blocs/projects_beneficiary_downsync/project_beneficiaries_downsync.dart +++ b/apps/health_campaign_field_worker_app/lib/blocs/projects_beneficiary_downsync/project_beneficiaries_downsync.dart @@ -2,14 +2,14 @@ import 'dart:async'; import 'package:digit_data_model/data_model.dart'; -import 'package:disk_space/disk_space.dart'; +import 'package:disk_space_update/disk_space_update.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:registration_delivery/registration_delivery.dart'; +import 'package:sync_service/sync_service_lib.dart'; import '../../data/local_store/no_sql/schema/app_configuration.dart'; import '../../data/local_store/secure_store/secure_store.dart'; -import '../../data/network_manager.dart'; import '../../data/repositories/remote/bandwidth_check.dart'; import '../../models/downsync/downsync.dart'; import '../../utils/background_service.dart'; @@ -27,7 +27,6 @@ class BeneficiaryDownSyncBloc downSyncRemoteRepository; final LocalRepository downSyncLocalRepository; - final NetworkManager networkManager; final BandwidthCheckRepository bandwidthCheckRepository; final LocalRepository householdLocalRepository; @@ -39,12 +38,11 @@ class BeneficiaryDownSyncBloc final LocalRepository sideEffectLocalRepository; final LocalRepository - referralLocalRepository; + referralLocalRepository; BeneficiaryDownSyncBloc({ required this.individualLocalRepository, required this.downSyncRemoteRepository, required this.downSyncLocalRepository, - required this.networkManager, required this.bandwidthCheckRepository, required this.householdLocalRepository, required this.householdMemberLocalRepository, @@ -203,7 +201,9 @@ class BeneficiaryDownSyncBloc ); // check if the API response is there or it failed if (downSyncResults.isNotEmpty) { - await networkManager.writeToEntityDB(downSyncResults, [ + await SyncServiceSingleton() + .entityMapper + ?.writeToEntityDB(downSyncResults, [ individualLocalRepository, householdLocalRepository, householdMemberLocalRepository, diff --git a/apps/health_campaign_field_worker_app/lib/data/data_manager.dart b/apps/health_campaign_field_worker_app/lib/data/data_manager.dart deleted file mode 100644 index 7d649d73e..000000000 --- a/apps/health_campaign_field_worker_app/lib/data/data_manager.dart +++ /dev/null @@ -1,35 +0,0 @@ -import 'dart:async'; - -import 'package:digit_data_model/data_model.dart'; - -class DataManager { - final RemoteRepository remoteRepository; - final LocalRepository localRepository; - final PersistenceConfiguration configuration; - - const DataManager({ - required this.localRepository, - required this.remoteRepository, - required this.configuration, - }); - - DataRepository _getRepository(PersistenceConfiguration configuration) { - switch (configuration) { - case PersistenceConfiguration.offline: - return localRepository; - case PersistenceConfiguration.online: - return remoteRepository; - } - } - - FutureOr> search(R query) => - _getRepository(configuration).search(query); - - FutureOr create(D entity) => - _getRepository(configuration).create(entity); - - FutureOr update(D entity) => - _getRepository(configuration).update(entity); -} - -enum PersistenceConfiguration { offline, online } diff --git a/apps/health_campaign_field_worker_app/lib/data/local_store/no_sql/schema/entity_mapper.dart b/apps/health_campaign_field_worker_app/lib/data/local_store/no_sql/schema/entity_mapper.dart index d1efb0e67..3dbaa40eb 100644 --- a/apps/health_campaign_field_worker_app/lib/data/local_store/no_sql/schema/entity_mapper.dart +++ b/apps/health_campaign_field_worker_app/lib/data/local_store/no_sql/schema/entity_mapper.dart @@ -1,4 +1,7 @@ +import 'package:complaints/complaints.dart'; + import 'package:attendance_management/models/entities/attendance_log.dart'; +import 'package:survey_form/survey_form.dart'; import 'package:digit_data_model/data/local_store/no_sql/schema/entity_mapper_listener.dart'; import 'package:digit_data_model/data_model.dart'; import 'package:digit_data_model/models/entities/user_action.dart'; diff --git a/apps/health_campaign_field_worker_app/lib/data/network_manager.dart b/apps/health_campaign_field_worker_app/lib/data/network_manager.dart index 5a1b16971..34125ce56 100644 --- a/apps/health_campaign_field_worker_app/lib/data/network_manager.dart +++ b/apps/health_campaign_field_worker_app/lib/data/network_manager.dart @@ -1,18 +1,6 @@ -import 'dart:async'; -import 'dart:convert'; - import 'package:digit_data_model/data_model.dart'; import 'package:flutter/cupertino.dart'; -import 'package:flutter/foundation.dart'; -import 'package:flutter_background_service/flutter_background_service.dart'; import 'package:provider/provider.dart'; -import 'package:registration_delivery/registration_delivery.dart'; - -import '../models/bandwidth/bandwidth_model.dart'; -import 'local_store/secure_store/secure_store.dart'; -import 'repositories/sync/remote_type.dart'; -import 'repositories/sync/sync_down.dart'; -import 'repositories/sync/sync_up.dart'; class NetworkManager { final NetworkManagerConfiguration configuration; @@ -30,194 +18,6 @@ class NetworkManager { return context.read>(); } } - -/* This function will read the params and get the records which are not synced - and pushes to the sync-up and sync-down methods */ - - FutureOr performSync({ - required List localRepositories, - required List remoteRepositories, - required BandwidthModel bandwidthModel, - ServiceInstance? service, - }) async { - if (configuration.persistenceConfig == - PersistenceConfiguration.onlineOnly) { - throw Exception('Sync up is not valid for online only configuration'); - } - bool isSyncCompleted = false; - - final futuresSyncDown = await Future.wait( - localRepositories - .map((e) => e.getItemsToBeSyncedDown(bandwidthModel.userId)), - ); - final pendingSyncDownEntries = futuresSyncDown.expand((e) => e).toList(); - - final futuresSyncUp = await Future.wait( - localRepositories - .map((e) => e.getItemsToBeSyncedUp(bandwidthModel.userId)), - ); - final pendingSyncUpEntries = futuresSyncUp.expand((e) => e).toList(); - - SyncError? syncError; - -// Perform the sync Down Operation - - try { - await PerformSyncDown.syncDown( - bandwidthModel: bandwidthModel, - localRepositories: localRepositories.toSet().toList(), - remoteRepositories: remoteRepositories.toSet().toList(), - configuration: configuration, - ); - } catch (e) { - syncError = SyncDownError(e); - service?.stopSelf(); - } - -// Perform the sync up Operation - - try { - await PerformSyncUp.syncUp( - bandwidthModel: bandwidthModel, - localRepositories: localRepositories.toSet().toList(), - remoteRepositories: remoteRepositories.toSet().toList(), - ); - } catch (e) { - if (kDebugMode) { - print('Sync Up Error: $e'); - } - syncError ??= SyncUpError(e); - service?.stopSelf(); - } - - if (syncError != null) throw syncError; - - // Recursive function which will call the Perfom Sync - - if (pendingSyncUpEntries.isNotEmpty || pendingSyncDownEntries.isNotEmpty) { - await Future.delayed(const Duration(seconds: 3)); - isSyncCompleted = await performSync( - bandwidthModel: bandwidthModel, - localRepositories: localRepositories, - remoteRepositories: remoteRepositories, - ); - } else if (pendingSyncUpEntries.isEmpty && pendingSyncDownEntries.isEmpty) { - await LocalSecureStore.instance.setManualSyncTrigger(false); - isSyncCompleted = true; - } - - return isSyncCompleted; - } - - // - FutureOr writeToEntityDB( - Map response, - List localRepositories, - ) async { - try { - for (int i = 0; i <= response.keys.length - 1; i++) { - if (response.keys.elementAt(i) != 'DownsyncCriteria') { - final local = RepositoryType.getLocalForType( - DataModels.getDataModelForEntityName(response.keys.elementAt(i)), - localRepositories, - ); - final List entityResponse = - response[response.keys.elementAt(i)] ?? []; - - final entityList = - entityResponse.whereType>().toList(); - - switch (response.keys.elementAt(i)) { - case "Individuals": - final entity = entityList - .map((e) => IndividualModelMapper.fromJson(jsonEncode(e))) - .toList(); - await local.bulkCreate(entity); - case "Households": - final entity = entityList - .map((e) => HouseholdModelMapper.fromJson(jsonEncode(e))) - .toList(); - await local.bulkCreate(entity); - case "HouseholdMembers": - final entity = entityList - .map( - (e) => HouseholdMemberModelMapper.fromJson( - jsonEncode(e), - ), - ) - .toList(); - await local.bulkCreate(entity); - case "ProjectBeneficiaries": - final entity = entityList - .map((e) => - ProjectBeneficiaryModelMapper.fromJson(jsonEncode(e))) - .toList(); - await local.bulkCreate(entity); - case "Tasks": - final entity = entityList - .map((e) => TaskModelMapper.fromJson(jsonEncode(e))) - .toList(); - await local.bulkCreate(entity); - case "SideEffects": - final entity = entityList - .map((e) => SideEffectModelMapper.fromJson(jsonEncode(e))) - .toList(); - await local.bulkCreate(entity); - case "Referrals": - final entity = entityList - .map((e) => ReferralModelMapper.fromJson(jsonEncode(e))) - .toList(); - await local.bulkCreate(entity); - default: - final entity = entityList - .map((e) => EntityModelMapper.fromJson(jsonEncode(e))) - .toList(); - await local.bulkCreate(entity); - } - } - } - } catch (e) { - rethrow; - } - } - - FutureOr getPendingSyncRecordsCount( - List localRepositories, - String userId, - ) async => - (await Future.wait(localRepositories.map((e) { - return e.getItemsToBeSyncedUp(userId); - }))) - .expand((element) => element) - .length; -} - -FutureOr> filterEntitybyBandwidth( - int batchSize, - List entities, -) async { - final List items = []; - final int size = batchSize < entities.length ? batchSize : entities.length; - - for (var i = 0; i < size; i++) { - items.add(entities[i]); - } - - return items; -} - -Future>> filterOpLogByBandwidth( - int batchSize, - List> entities, -) async { - final List> items = []; - final int size = batchSize < entities.length ? batchSize : entities.length; - - for (var i = 0; i < size; i++) { - items.add(entities[i]); - } - - return items; } class NetworkManagerConfiguration { @@ -227,17 +27,3 @@ class NetworkManagerConfiguration { this.persistenceConfig = PersistenceConfiguration.offlineFirst, }); } - -abstract class SyncError implements Exception { - final dynamic error; - - const SyncError([this.error]); -} - -class SyncUpError extends SyncError { - const SyncUpError([super.error]); -} - -class SyncDownError extends SyncError { - const SyncDownError([super.error]); -} diff --git a/apps/health_campaign_field_worker_app/lib/data/repositories/local/localization.dart b/apps/health_campaign_field_worker_app/lib/data/repositories/local/localization.dart index bd9fc1e08..2ea70837d 100644 --- a/apps/health_campaign_field_worker_app/lib/data/repositories/local/localization.dart +++ b/apps/health_campaign_field_worker_app/lib/data/repositories/local/localization.dart @@ -10,98 +10,113 @@ import '../../local_store/no_sql/schema/localization.dart'; class LocalizationLocalRepository { FutureOr> returnLocalizationFromSQL( LocalSqlDataStore sql) async { - final selectQuery = sql.select(sql.localization).join([]); - - // List to hold the AND conditions - final andConditions = >[]; - - // Add condition for locale if provided - if (LocalizationParams().locale != null) { - final localeString = '${LocalizationParams().locale!}'; - andConditions.add(sql.localization.locale.equals(localeString)); - } - - // Add conditions for modules and codes - if (LocalizationParams().module != null && - LocalizationParams().module!.isNotEmpty) { - final moduleToExclude = LocalizationParams().module!; - - if (LocalizationParams().exclude == true) { - // Exclude modules but include records where the code matches - final moduleCondition = - sql.localization.module.contains(moduleToExclude).not(); - final codeCondition = LocalizationParams().code != null && - LocalizationParams().code!.isNotEmpty - ? sql.localization.code.isIn(LocalizationParams().code!.toList()) - : const Constant(false); // True if no code filter - - // Combine conditions: exclude module unless code matches - andConditions.add(buildAnd([moduleCondition | codeCondition])); - } else { - // Include specified modules and optionally filter by code - final moduleCondition = - sql.localization.module.contains(moduleToExclude); - final codeCondition = LocalizationParams().code != null && - LocalizationParams().code!.isNotEmpty - ? sql.localization.code.isIn(LocalizationParams().code!.toList()) - : const Constant(false); - - // Combine conditions: module matches and optionally code filter - andConditions.add(buildAnd([moduleCondition | codeCondition])); + return retryLocalCallOperation(() async { + final selectQuery = sql.select(sql.localization).join([]); + + // List to hold the AND conditions + final andConditions = >[]; + + // Add condition for locale if provided + if (LocalizationParams().locale != null) { + final localeString = '${LocalizationParams().locale!}'; + andConditions.add(sql.localization.locale.equals(localeString)); + } + + // Add conditions for modules and codes + if (LocalizationParams().module != null && + LocalizationParams().module!.isNotEmpty) { + final moduleToExclude = LocalizationParams().module!; + + if (LocalizationParams().exclude == true) { + // Exclude modules but include records where the code matches + final moduleCondition = + sql.localization.module.contains(moduleToExclude).not(); + final codeCondition = LocalizationParams().code != null && + LocalizationParams().code!.isNotEmpty + ? sql.localization.code.isIn(LocalizationParams().code!.toList()) + : const Constant(false); // True if no code filter + + // Combine conditions: exclude module unless code matches + andConditions.add(buildAnd([moduleCondition | codeCondition])); + } else { + // Include specified modules and optionally filter by code + final moduleCondition = + sql.localization.module.contains(moduleToExclude); + final codeCondition = LocalizationParams().code != null && + LocalizationParams().code!.isNotEmpty + ? sql.localization.code.isIn(LocalizationParams().code!.toList()) + : const Constant(false); + + // Combine conditions: module matches and optionally code filter + andConditions.add(buildAnd([moduleCondition | codeCondition])); + } + } else if (LocalizationParams().code != null && + LocalizationParams().code!.isNotEmpty) { + // If no module filter, just apply code filter + andConditions.add( + sql.localization.code.isIn(LocalizationParams().code!.toList())); + } + + // Apply the combined conditions to the query + if (andConditions.isNotEmpty) { + selectQuery.where(buildAnd(andConditions)); } - } else if (LocalizationParams().code != null && - LocalizationParams().code!.isNotEmpty) { - // If no module filter, just apply code filter - andConditions - .add(sql.localization.code.isIn(LocalizationParams().code!.toList())); - } - - // Apply the combined conditions to the query - if (andConditions.isNotEmpty) { - selectQuery.where(buildAnd(andConditions)); - } - - final result = await selectQuery.get(); - - return result.map((row) { - final data = row.readTableOrNull(sql.localization); - - return Localization() - ..code = data!.code - ..locale = data.locale - ..module = data.module - ..message = data.message; - }).toList(); + + final result = await selectQuery.get(); + + return result.map((row) { + final data = row.readTableOrNull(sql.localization); + if (data == null) { + throw StateError('No data found for localization'); + } + + return Localization() + ..code = data.code + ..locale = data.locale + ..module = data.module + ..message = data.message; + }).toList(); + }); } FutureOr> fetchLocalization( {required LocalSqlDataStore sql, required String locale, required String module}) async { - final query = sql.select(sql.localization).join([]) - ..where( - buildOr([ - sql.localization.locale.equals(locale), - sql.localization.module.contains(module), - ]), - ); - - final results = await query.get(); - - return results.map((e) { - final data = e.readTableOrNull(sql.localization); - return Localization() - ..code = data!.code - ..locale = data.locale - ..module = data.module - ..message = data.message; - }).toList(); + return retryLocalCallOperation(() async { + final query = sql.select(sql.localization).join([]) + ..where( + buildOr([ + sql.localization.locale.equals(locale), + sql.localization.module.contains(module), + ]), + ); + + final results = await query.get(); + + return results.map((e) { + final data = e.readTableOrNull(sql.localization); + + if (data == null) { + throw StateError('No data found for localization'); + } + + return Localization() + ..code = data.code + ..locale = data.locale + ..module = data.module + ..message = data.message; + }).toList(); + }); } FutureOr create( List result, LocalSqlDataStore sql) async { - return sql.batch((batch) { - batch.insertAll(sql.localization, result); + if (result.isEmpty) return; + return retryLocalCallOperation(() async { + return sql.batch((batch) { + batch.insertAll(sql.localization, result); + }); }); } } diff --git a/apps/health_campaign_field_worker_app/lib/data/repositories/remote/bandwidth_check.dart b/apps/health_campaign_field_worker_app/lib/data/repositories/remote/bandwidth_check.dart index e38f93aac..80c4adc52 100644 --- a/apps/health_campaign_field_worker_app/lib/data/repositories/remote/bandwidth_check.dart +++ b/apps/health_campaign_field_worker_app/lib/data/repositories/remote/bandwidth_check.dart @@ -29,7 +29,7 @@ class BandwidthCheckRepository { final speed = (((800 / timeconsumed) / 1000)); return speed; - } on DioError catch (e) { + } on DioException catch (e) { rethrow; } } diff --git a/apps/health_campaign_field_worker_app/lib/data/repositories/remote/mdms.dart b/apps/health_campaign_field_worker_app/lib/data/repositories/remote/mdms.dart index 748d821d1..35136b342 100644 --- a/apps/health_campaign_field_worker_app/lib/data/repositories/remote/mdms.dart +++ b/apps/health_campaign_field_worker_app/lib/data/repositories/remote/mdms.dart @@ -257,11 +257,11 @@ class MdmsRepository { final List? checklistTypes = element?.checklistTypes.map((e) { - final checklist = ChecklistTypes() + final surveyForm = ChecklistTypes() ..name = e.name ..code = e.code; - return checklist; + return surveyForm; }).toList(); final List? transportTypes = diff --git a/apps/health_campaign_field_worker_app/lib/data/repositories/sync/remote_type.dart b/apps/health_campaign_field_worker_app/lib/data/repositories/sync/remote_type.dart index c1217f919..8b1378917 100644 --- a/apps/health_campaign_field_worker_app/lib/data/repositories/sync/remote_type.dart +++ b/apps/health_campaign_field_worker_app/lib/data/repositories/sync/remote_type.dart @@ -1,39 +1 @@ -import 'package:collection/collection.dart'; -import 'package:digit_data_model/data_model.dart'; - -class RepositoryType { - static RemoteRepository getRemoteForType( - DataModelType type, - List remoteRepositories, - ) { - final repository = remoteRepositories.firstWhereOrNull( - (e) => e.type == type, - ); - - if (repository == null) { - throw Exception( - 'Remote repository is not configured in the network manager', - ); - } - - return repository; - } - - static LocalRepository getLocalForType( - DataModelType type, - List localRepositories, - ) { - final repository = localRepositories.firstWhereOrNull( - (e) => e.type == type, - ); - - if (repository == null) { - throw Exception( - 'Local repository is not configured in the network manager', - ); - } - - return repository; - } -} diff --git a/apps/health_campaign_field_worker_app/lib/data/repositories/sync/sync_down.dart b/apps/health_campaign_field_worker_app/lib/data/repositories/sync/sync_down.dart deleted file mode 100644 index e8f07d0e4..000000000 --- a/apps/health_campaign_field_worker_app/lib/data/repositories/sync/sync_down.dart +++ /dev/null @@ -1,740 +0,0 @@ -import 'dart:async'; - -import 'package:attendance_management/attendance_management.dart'; -import 'package:collection/collection.dart'; -import 'package:digit_data_model/data_model.dart'; -import 'package:inventory_management/models/entities/stock.dart'; -import 'package:inventory_management/models/entities/stock_reconciliation.dart'; -import 'package:referral_reconciliation/referral_reconciliation.dart'; -import 'package:registration_delivery/models/entities/household.dart'; -import 'package:registration_delivery/models/entities/household_member.dart'; -import 'package:registration_delivery/models/entities/project_beneficiary.dart'; -import 'package:registration_delivery/models/entities/referral.dart'; -import 'package:registration_delivery/models/entities/side_effect.dart'; -import 'package:registration_delivery/models/entities/task.dart'; - -import '../../../models/bandwidth/bandwidth_model.dart'; -import '../../../utils/environment_config.dart'; -import '../../network_manager.dart'; -import './remote_type.dart'; - -class PerformSyncDown { - static FutureOr syncDown({ - required BandwidthModel bandwidthModel, - required List localRepositories, - required List remoteRepositories, - required NetworkManagerConfiguration configuration, - }) async { - const taskResourceIdKey = 'taskResourceId'; - const individualIdentifierIdKey = 'individualIdentifierId'; - const householdAddressIdKey = 'householdAddressId'; - const individualAddressIdKey = 'individualAddressId'; - - if (configuration.persistenceConfig == - PersistenceConfiguration.onlineOnly) { - throw Exception('Sync down is not valid for online only configuration'); - } - - final futures = await Future.wait( - localRepositories - .map((e) => e.getItemsToBeSyncedDown(bandwidthModel.userId)), - ); - - final pendingSyncEntries = futures.expand((e) => e).toList(); - pendingSyncEntries.sort((a, b) => a.createdAt.compareTo(b.createdAt)); - - final groupedEntries = pendingSyncEntries - .where((element) => element.type != DataModelType.service) - .toList() - .groupListsBy( - (element) => element.type, - ); - - for (final typeGroupedEntity in groupedEntries.entries) { - final groupedOperations = typeGroupedEntity.value.groupListsBy( - (element) => element.operation, - ); - - final remote = RepositoryType.getRemoteForType( - typeGroupedEntity.key, - remoteRepositories, - ); - - final local = RepositoryType.getLocalForType( - typeGroupedEntity.key, - localRepositories, - ); - - for (final operationGroupedEntity in groupedOperations.entries) { - final entities = operationGroupedEntity.value.map((e) { - final serverGeneratedId = e.serverGeneratedId; - final rowVersion = e.rowVersion; - if (serverGeneratedId != null && !e.nonRecoverableError) { - return local.opLogManager.applyServerGeneratedIdToEntity( - e.entity, - serverGeneratedId, - rowVersion, - ); - } - - return e.entity; - }).toList(); - - List responseEntities = []; - - switch (typeGroupedEntity.key) { - case DataModelType.individual: - responseEntities = await remote.search(IndividualSearchModel( - clientReferenceId: entities - .whereType() - .map((e) => e.clientReferenceId) - .whereNotNull() - .toList(), - isDeleted: true, - )); - - for (var element in operationGroupedEntity.value) { - if (element.id == null) return; - final entity = element.entity as IndividualModel; - final responseEntity = responseEntities - .whereType() - .firstWhereOrNull( - (e) => e.clientReferenceId == entity.clientReferenceId, - ); - - final serverGeneratedId = responseEntity?.id; - final rowVersion = responseEntity?.rowVersion; - if (serverGeneratedId != null) { - final identifierAdditionalIds = responseEntity?.identifiers - ?.map((e) { - final id = e.id; - - if (id == null) return null; - - return AdditionalId( - idType: individualIdentifierIdKey, - id: id, - ); - }) - .whereNotNull() - .toList(); - - final addressAdditionalIds = responseEntity?.address - ?.map((e) { - final id = e.id; - - if (id == null) return null; - - return AdditionalId( - idType: individualAddressIdKey, - id: id, - ); - }) - .whereNotNull() - .toList(); - - await local.opLogManager.updateServerGeneratedIds( - model: UpdateServerGeneratedIdModel( - clientReferenceId: entity.clientReferenceId, - serverGeneratedId: serverGeneratedId, - nonRecoverableError: entity.nonRecoverableError, - additionalIds: [ - if (identifierAdditionalIds != null) - ...identifierAdditionalIds, - if (addressAdditionalIds != null) ...addressAdditionalIds, - ], - dataOperation: element.operation, - rowVersion: rowVersion, - ), - ); - } else { - final bool markAsNonRecoverable = await local.opLogManager - .updateSyncDownRetry(entity.clientReferenceId); - - if (markAsNonRecoverable) { - await local.update( - entity.copyWith( - nonRecoverableError: true, - ), - createOpLog: false, - ); - } - } - } - - break; - - case DataModelType.household: - responseEntities = await remote.search(HouseholdSearchModel( - clientReferenceId: entities - .whereType() - .map((e) => e.clientReferenceId) - .whereNotNull() - .toList(), - isDeleted: true, - )); - - for (var element in operationGroupedEntity.value) { - if (element.id == null) return; - final entity = element.entity as HouseholdModel; - final responseEntity = - responseEntities.whereType().firstWhereOrNull( - (e) => e.clientReferenceId == entity.clientReferenceId, - ); - - final serverGeneratedId = responseEntity?.id; - final rowVersion = responseEntity?.rowVersion; - if (serverGeneratedId != null) { - final addressAdditionalId = responseEntity?.address?.id == null - ? null - : AdditionalId( - idType: householdAddressIdKey, - id: responseEntity!.address!.id!, - ); - - await local.opLogManager.updateServerGeneratedIds( - model: UpdateServerGeneratedIdModel( - clientReferenceId: entity.clientReferenceId, - serverGeneratedId: serverGeneratedId, - additionalIds: [ - if (addressAdditionalId != null) addressAdditionalId, - ], - dataOperation: element.operation, - rowVersion: rowVersion, - nonRecoverableError: element.nonRecoverableError, - ), - ); - } else { - final bool markAsNonRecoverable = await local.opLogManager - .updateSyncDownRetry(entity.clientReferenceId); - - if (markAsNonRecoverable) { - await local.update( - entity.copyWith( - nonRecoverableError: true, - ), - createOpLog: false, - ); - } - } - } - - break; - - case DataModelType.householdMember: - responseEntities = await remote.search(HouseholdMemberSearchModel( - clientReferenceId: entities - .whereType() - .map((e) => e.clientReferenceId) - .whereNotNull() - .toList(), - isDeleted: true, - )); - - for (var element in operationGroupedEntity.value) { - if (element.id == null) return; - final entity = element.entity as HouseholdMemberModel; - final responseEntity = responseEntities - .whereType() - .firstWhereOrNull( - (e) => e.clientReferenceId == entity.clientReferenceId, - ); - final serverGeneratedId = responseEntity?.id; - final rowVersion = responseEntity?.rowVersion; - if (serverGeneratedId != null) { - await local.opLogManager.updateServerGeneratedIds( - model: UpdateServerGeneratedIdModel( - clientReferenceId: entity.clientReferenceId, - serverGeneratedId: serverGeneratedId, - dataOperation: element.operation, - rowVersion: rowVersion, - ), - ); - } else { - final bool markAsNonRecoverable = await local.opLogManager - .updateSyncDownRetry(entity.clientReferenceId); - - if (markAsNonRecoverable) { - await local.update( - entity.copyWith( - nonRecoverableError: true, - ), - createOpLog: false, - ); - } - } - } - - break; - - case DataModelType.sideEffect: - responseEntities = await remote.search(SideEffectSearchModel( - clientReferenceId: entities - .whereType() - .map((e) => e.clientReferenceId) - .whereNotNull() - .toList(), - isDeleted: true, - )); - - for (var element in typeGroupedEntity.value) { - if (element.id == null) return; - final entity = element.entity as SideEffectModel; - var responseEntity = responseEntities - .whereType() - .firstWhereOrNull( - (e) => e.clientReferenceId == entity.clientReferenceId, - ); - - final serverGeneratedId = responseEntity?.id; - final rowVersion = responseEntity?.rowVersion; - if (serverGeneratedId != null) { - local.opLogManager.updateServerGeneratedIds( - model: UpdateServerGeneratedIdModel( - clientReferenceId: entity.clientReferenceId, - serverGeneratedId: serverGeneratedId, - dataOperation: element.operation, - rowVersion: rowVersion, - ), - ); - } else { - final bool markAsNonRecoverable = await local.opLogManager - .updateSyncDownRetry(entity.clientReferenceId); - - if (markAsNonRecoverable) { - await local.update( - entity.copyWith( - nonRecoverableError: true, - ), - createOpLog: false, - ); - } - } - } - - case DataModelType.referral: - responseEntities = await remote.search(ReferralSearchModel( - clientReferenceId: entities - .whereType() - .map((e) => e.clientReferenceId) - .whereNotNull() - .toList(), - isDeleted: true, - )); - - for (var element in typeGroupedEntity.value) { - if (element.id == null) return; - final entity = element.entity as ReferralModel; - var responseEntity = - responseEntities.whereType().firstWhereOrNull( - (e) => e.clientReferenceId == entity.clientReferenceId, - ); - - final serverGeneratedId = responseEntity?.id; - final rowVersion = responseEntity?.rowVersion; - if (serverGeneratedId != null) { - local.opLogManager.updateServerGeneratedIds( - model: UpdateServerGeneratedIdModel( - clientReferenceId: entity.clientReferenceId, - serverGeneratedId: serverGeneratedId, - dataOperation: element.operation, - rowVersion: rowVersion, - ), - ); - } else { - final bool markAsNonRecoverable = await local.opLogManager - .updateSyncDownRetry(entity.clientReferenceId); - - if (markAsNonRecoverable) { - await local.update( - entity.copyWith( - nonRecoverableError: true, - ), - createOpLog: false, - ); - } - } - } - - case DataModelType.projectBeneficiary: - responseEntities = - await remote.search(ProjectBeneficiarySearchModel( - clientReferenceId: entities - .whereType() - .map((e) => e.clientReferenceId) - .whereNotNull() - .toList(), - isDeleted: true, - )); - - for (var element in operationGroupedEntity.value) { - if (element.id == null) return; - final entity = element.entity as ProjectBeneficiaryModel; - final responseEntity = responseEntities - .whereType() - .firstWhereOrNull( - (e) => e.clientReferenceId == entity.clientReferenceId, - ); - final serverGeneratedId = responseEntity?.id; - final rowVersion = responseEntity?.rowVersion; - if (serverGeneratedId != null) { - await local.opLogManager.updateServerGeneratedIds( - model: UpdateServerGeneratedIdModel( - clientReferenceId: entity.clientReferenceId, - serverGeneratedId: serverGeneratedId, - dataOperation: element.operation, - rowVersion: rowVersion, - ), - ); - } else { - final bool markAsNonRecoverable = await local.opLogManager - .updateSyncDownRetry(entity.clientReferenceId); - - if (markAsNonRecoverable) { - await local.update( - entity.copyWith( - nonRecoverableError: true, - ), - createOpLog: false, - ); - } - } - } - - break; - case DataModelType.task: - responseEntities = await remote.search(TaskSearchModel( - clientReferenceId: entities - .whereType() - .map((e) => e.clientReferenceId) - .whereNotNull() - .toList(), - isDeleted: true, - )); - - for (var element in operationGroupedEntity.value) { - if (element.id == null) return; - final taskModel = element.entity as TaskModel; - var responseEntity = - responseEntities.whereType().firstWhereOrNull( - (e) => - e.clientReferenceId == taskModel.clientReferenceId, - ); - - final serverGeneratedId = responseEntity?.id; - final rowVersion = responseEntity?.rowVersion; - - if (serverGeneratedId != null) { - await local.opLogManager.updateServerGeneratedIds( - model: UpdateServerGeneratedIdModel( - clientReferenceId: taskModel.clientReferenceId, - serverGeneratedId: serverGeneratedId, - additionalIds: responseEntity?.resources - ?.map((e) { - final id = e.id; - if (id == null) return null; - - return AdditionalId( - idType: taskResourceIdKey, - id: id, - ); - }) - .whereNotNull() - .toList(), - dataOperation: element.operation, - rowVersion: rowVersion, - ), - ); - } else { - final bool markAsNonRecoverable = await local.opLogManager - .updateSyncDownRetry(taskModel.clientReferenceId); - - if (markAsNonRecoverable) { - await local.update( - taskModel.copyWith( - nonRecoverableError: true, - ), - createOpLog: false, - ); - } - } - } - - break; - - case DataModelType.hFReferral: - responseEntities = await remote.search( - HFReferralSearchModel( - clientReferenceId: entities - .whereType() - .map((e) => e.clientReferenceId) - .whereNotNull() - .toList(), - ), - ); - - for (var element in operationGroupedEntity.value) { - if (element.id == null) return; - final entity = element.entity as HFReferralModel; - final responseEntity = responseEntities - .whereType() - .firstWhereOrNull( - (e) => e.clientReferenceId == entity.clientReferenceId, - ); - - final serverGeneratedId = responseEntity?.id; - final rowVersion = responseEntity?.rowVersion; - if (serverGeneratedId != null) { - await local.opLogManager.updateServerGeneratedIds( - model: UpdateServerGeneratedIdModel( - clientReferenceId: entity.clientReferenceId, - serverGeneratedId: serverGeneratedId, - nonRecoverableError: entity.nonRecoverableError, - dataOperation: element.operation, - rowVersion: rowVersion, - ), - ); - } else { - final bool markAsNonRecoverable = await local.opLogManager - .updateSyncDownRetry(entity.clientReferenceId); - - if (markAsNonRecoverable) { - await local.update( - entity.copyWith( - nonRecoverableError: true, - ), - createOpLog: false, - ); - } - } - } - - break; - - case DataModelType.attendance: - responseEntities = await remote.search(AttendanceLogSearchModel( - clientReferenceId: entities - .whereType() - .map((e) => e.clientReferenceId!) - .whereNotNull() - .toList(), - tenantId: envConfig.variables.tenantId, - )); - - for (var element in operationGroupedEntity.value) { - if (element.id == null) return; - final entity = element.entity as AttendanceLogModel; - final responseEntity = responseEntities - .whereType() - .firstWhereOrNull( - (e) => e.clientReferenceId == entity.clientReferenceId, - ); - - final serverGeneratedId = responseEntity?.id; - final rowVersion = responseEntity?.rowVersion; - if (serverGeneratedId != null) { - await local.opLogManager.updateServerGeneratedIds( - model: UpdateServerGeneratedIdModel( - clientReferenceId: entity.clientReferenceId.toString(), - serverGeneratedId: serverGeneratedId, - nonRecoverableError: entity.nonRecoverableError, - dataOperation: element.operation, - rowVersion: rowVersion, - ), - ); - } else { - final bool markAsNonRecoverable = - await local.opLogManager.updateSyncDownRetry( - entity.clientReferenceId.toString(), - ); - - if (markAsNonRecoverable) { - await local.update( - entity.copyWith( - nonRecoverableError: true, - ), - createOpLog: false, - ); - } - } - } - - break; - - case DataModelType.stock: - responseEntities = await remote.search( - StockSearchModel( - clientReferenceId: entities - .whereType() - .map((e) => e.clientReferenceId) - .whereNotNull() - .toList(), - ), - ); - - for (var element in operationGroupedEntity.value) { - if (element.id == null) return; - final entity = element.entity as StockModel; - final responseEntity = - responseEntities.whereType().firstWhereOrNull( - (e) => e.clientReferenceId == entity.clientReferenceId, - ); - - final serverGeneratedId = responseEntity?.id; - final rowVersion = responseEntity?.rowVersion; - - if (serverGeneratedId != null) { - await local.opLogManager.updateServerGeneratedIds( - model: UpdateServerGeneratedIdModel( - clientReferenceId: entity.clientReferenceId!, - serverGeneratedId: serverGeneratedId, - dataOperation: element.operation, - rowVersion: rowVersion, - ), - ); - } else { - final bool markAsNonRecoverable = await local.opLogManager - .updateSyncDownRetry(entity.clientReferenceId); - - if (markAsNonRecoverable) { - await local.update( - entity.copyWith( - nonRecoverableError: true, - ), - createOpLog: false, - ); - } - } - } - - break; - - case DataModelType.stockReconciliation: - responseEntities = - await remote.search(StockReconciliationSearchModel( - clientReferenceId: entities - .whereType() - .map((e) => e.clientReferenceId) - .whereNotNull() - .toList(), - )); - - for (var element in operationGroupedEntity.value) { - if (element.id == null) return; - final entity = element.entity as StockReconciliationModel; - final responseEntity = responseEntities - .whereType() - .firstWhereOrNull( - (e) => e.clientReferenceId == entity.clientReferenceId, - ); - - final serverGeneratedId = responseEntity?.id; - final rowVersion = responseEntity?.rowVersion; - - if (serverGeneratedId != null) { - await local.opLogManager.updateServerGeneratedIds( - model: UpdateServerGeneratedIdModel( - clientReferenceId: entity.clientReferenceId, - serverGeneratedId: serverGeneratedId, - dataOperation: element.operation, - rowVersion: rowVersion, - ), - ); - } else { - final bool markAsNonRecoverable = await local.opLogManager - .updateSyncDownRetry(entity.clientReferenceId); - - if (markAsNonRecoverable) { - await local.update( - entity.copyWith( - nonRecoverableError: true, - ), - createOpLog: false, - ); - } - } - } - - break; - - // Note: Uncomment the following code block to enable complaints sync down - - // case DataModelType.complaints: - // if (remote is! PgrServiceRemoteRepository) continue; - // - // final futures = entities - // .whereType() - // .map((e) => e.serviceRequestId) - // .whereNotNull() - // .map( - // (e) { - // final future = remote.searchWithoutClientReferenceId( - // PgrServiceSearchModel( - // serviceRequestId: e, - // ), - // ); - // - // return Future.sync(() => future); - // }, - // ); - // - // final resolvedFutures = await Future.wait(futures); - // - // responseEntities = resolvedFutures - // .expand((element) => element) - // .whereType() - // // We only need serviceRequestId and application status - // .map((e) => PgrServiceModel( - // clientReferenceId: '', - // tenantId: e.tenantId ?? '', - // serviceCode: e.serviceCode ?? '', - // description: e.description ?? '', - // serviceRequestId: e.serviceRequestId, - // applicationStatus: e.applicationStatus ?? - // PgrServiceApplicationStatus.pendingAssignment, - // user: PgrComplainantModel( - // clientReferenceId: '', - // tenantId: '', - // complaintClientReferenceId: e.serviceRequestId ?? '', - // ), - // address: PgrAddressModel(), - // )) - // .toList(); - // - // for (var element in operationGroupedEntity.value) { - // if (element.id == null) return; - // final entity = element.entity as PgrServiceModel; - // final responseEntity = responseEntities - // .whereType() - // .firstWhereOrNull( - // (e) => e.clientReferenceId == entity.clientReferenceId, - // ); - // - // final serverGeneratedId = responseEntity?.serviceRequestId; - // final rowVersion = responseEntity?.rowVersion; - // - // if (serverGeneratedId != null) { - // await local.opLogManager.updateServerGeneratedIds( - // model: UpdateServerGeneratedIdModel( - // clientReferenceId: entity.clientReferenceId, - // serverGeneratedId: serverGeneratedId, - // dataOperation: element.operation, - // rowVersion: rowVersion, - // ), - // ); - // } - // } - // - // break; - - default: - continue; - } - - for (var element in responseEntities) { - await local.update(element, createOpLog: false); - } - } - } - } -} diff --git a/apps/health_campaign_field_worker_app/lib/data/repositories/sync/sync_up.dart b/apps/health_campaign_field_worker_app/lib/data/repositories/sync/sync_up.dart deleted file mode 100644 index fdf1ab1dd..000000000 --- a/apps/health_campaign_field_worker_app/lib/data/repositories/sync/sync_up.dart +++ /dev/null @@ -1,316 +0,0 @@ -import 'dart:async'; - -import 'package:collection/collection.dart'; -import 'package:digit_components/utils/app_logger.dart'; -import 'package:digit_data_model/data_model.dart'; -import 'package:registration_delivery/models/entities/household.dart'; -import 'package:registration_delivery/models/entities/task.dart'; - -import '../../../models/bandwidth/bandwidth_model.dart'; -import '../../../utils/environment_config.dart'; -import 'remote_type.dart'; - -class PerformSyncUp { - static FutureOr syncUp({ - required BandwidthModel bandwidthModel, - required List localRepositories, - required List remoteRepositories, - }) async { - const taskResourceIdKey = 'taskResourceId'; - const individualIdentifierIdKey = 'individualIdentifierId'; - const householdAddressIdKey = 'householdAddressId'; - const individualAddressIdKey = 'individualAddressId'; - - List getEntityModel( - List> opLogList, - LocalRepository local, - ) { - return opLogList - .map((e) { - final oplogEntryEntity = e.entity; - - final serverGeneratedId = e.serverGeneratedId; - final rowVersion = e.rowVersion; - if (serverGeneratedId != null) { - var updatedEntity = - local.opLogManager.applyServerGeneratedIdToEntity( - oplogEntryEntity, - serverGeneratedId, - rowVersion, - ); - - if (updatedEntity is HouseholdModel) { - final addressId = e.additionalIds.firstWhereOrNull( - (element) { - return element.idType == householdAddressIdKey; - }, - )?.id; - - updatedEntity = updatedEntity.copyWith( - address: updatedEntity.address?.copyWith( - id: updatedEntity.address?.id ?? addressId, - ), - ); - } - - if (updatedEntity is IndividualModel) { - final identifierId = e.additionalIds.firstWhereOrNull( - (element) { - return element.idType == individualIdentifierIdKey; - }, - )?.id; - - final addressId = e.additionalIds.firstWhereOrNull( - (element) { - return element.idType == individualAddressIdKey; - }, - )?.id; - - updatedEntity = updatedEntity.copyWith( - identifiers: updatedEntity.identifiers?.map((e) { - return e.copyWith( - id: e.id ?? identifierId, - ); - }).toList(), - address: updatedEntity.address?.map((e) { - return e.copyWith( - id: e.id ?? addressId, - ); - }).toList(), - ); - } - - if (updatedEntity is TaskModel) { - final resourceId = e.additionalIds - .firstWhereOrNull( - (element) => element.idType == taskResourceIdKey, - ) - ?.id; - - updatedEntity = updatedEntity.copyWith( - resources: updatedEntity.resources?.map((e) { - if (resourceId != null) { - return e.copyWith( - taskId: serverGeneratedId, - id: e.id ?? resourceId, - ); - } - - return e.copyWith(taskId: serverGeneratedId); - }).toList(), - ); - } - - return updatedEntity; - } - - return oplogEntryEntity; - }) - .whereNotNull() - .toList(); - } - - final futures = await Future.wait( - localRepositories - .map((e) => e.getItemsToBeSyncedUp(bandwidthModel.userId)), - ); - - final pendingSyncEntries = futures.expand((e) => e).toList(); - pendingSyncEntries.sort((a, b) => a.createdAt.compareTo(b.createdAt)); - final groupedEntries = pendingSyncEntries.groupListsBy( - (element) => element.type, - ); - -// Note : Sort the entries by DataModelType enum - final entries = groupedEntries.entries.toList(); - entries.sort((a, b) => DataModelType.values - .indexOf(a.key) - .compareTo(DataModelType.values.indexOf(b.key))); - - for (final typeGroupedEntity in entries) { - final groupedOperations = typeGroupedEntity.value.groupListsBy( - (element) => element.operation, - ); - - final remote = RepositoryType.getRemoteForType( - typeGroupedEntity.key, - remoteRepositories, - ); - - final local = RepositoryType.getLocalForType( - typeGroupedEntity.key, - localRepositories, - ); - - for (final operationGroupedEntity in groupedOperations.entries) { - // [returns list of oplogs whose nonRecoverableError is false and syncedup is false] - final opLogList = operationGroupedEntity.value - .where( - (element) => !element.nonRecoverableError && !element.syncedUp, - ) - .toList(); - // [returns list of oplogs whose nonRecoverableError is true] - final opLogErrorList = operationGroupedEntity.value - .where((element) => element.nonRecoverableError) - .toList(); - - // [returns list of oplogs whose nonRecoverableError is false and retry count is equal to configured value] - final nonRecoverableErrorList = operationGroupedEntity.value - .where((element) => - !element.nonRecoverableError && - element.syncDownRetryCount >= - envConfig.variables.syncDownRetryCount) - .toList(); - - final List>> listOfBatchedOpLogList = - opLogList.slices(bandwidthModel.batchSize).toList(); - - final List>> listOfBatchedOpLogErrorList = - opLogErrorList.slices(bandwidthModel.batchSize).toList(); - - final List>> - listOfBatchedNonRecoverableErrorList = - nonRecoverableErrorList.slices(bandwidthModel.batchSize).toList(); - - if (listOfBatchedNonRecoverableErrorList.isNotEmpty) { - for (final sublist in listOfBatchedNonRecoverableErrorList) { - final nonRecoverableErrorEntities = getEntityModel(sublist, local); - await remote.dumpError( - nonRecoverableErrorEntities, - operationGroupedEntity.key, - ); - for (final syncedEntity in sublist) { - if (syncedEntity.type == DataModelType.complaints) continue; - await local.markSyncedUp( - entry: syncedEntity, - nonRecoverableError: syncedEntity.nonRecoverableError, - clientReferenceId: syncedEntity.clientReferenceId, - id: syncedEntity.id, - ); - } - } - } - - if (listOfBatchedOpLogErrorList.isNotEmpty) { - for (final sublist in listOfBatchedOpLogErrorList) { - final errorEntities = getEntityModel(sublist, local); - await remote.dumpError( - errorEntities, - operationGroupedEntity.key, - ); - for (final syncedEntity in sublist) { - await local.markSyncedUp( - entry: syncedEntity, - nonRecoverableError: syncedEntity.nonRecoverableError, - clientReferenceId: syncedEntity.clientReferenceId, - id: syncedEntity.id, - ); - } - } - } - if (listOfBatchedOpLogList.isNotEmpty) { - for (final sublist in listOfBatchedOpLogList) { - final entities = getEntityModel(sublist, local); - if (operationGroupedEntity.key == DataOperation.create) { - switch (typeGroupedEntity.key) { - case DataModelType.complaints: - for (final entity in entities) { - if (remote is PgrServiceRemoteRepository && - entity is PgrServiceModel) { - final response = await remote.create(entity); - final responseData = response.data; - if (responseData is! Map) { - AppLogger.instance.error( - title: 'NetworkManager : PgrServiceRemoteRepository', - message: responseData, - stackTrace: StackTrace.current, - ); - continue; - } - - PgrServiceCreateResponseModel - pgrServiceCreateResponseModel; - PgrComplaintResponseModel pgrComplaintModel; - try { - pgrServiceCreateResponseModel = - PgrServiceCreateResponseModelMapper.fromMap( - responseData, - ); - pgrComplaintModel = - pgrServiceCreateResponseModel.serviceWrappers.first; - } catch (e) { - rethrow; - } - - final service = pgrComplaintModel.service; - final serviceRequestId = service.serviceRequestId; - - if (serviceRequestId == null || - serviceRequestId.isEmpty) { - AppLogger.instance.error( - title: 'NetworkManager : PgrServiceRemoteRepository', - message: 'Service Request ID is null', - stackTrace: StackTrace.current, - ); - continue; - } - - await local.markSyncedUp( - entry: sublist.firstWhere((element) => - element.clientReferenceId == - entity.clientReferenceId), - clientReferenceId: entity.clientReferenceId, - nonRecoverableError: entity.nonRecoverableError, - ); - - await local.opLogManager.updateServerGeneratedIds( - model: UpdateServerGeneratedIdModel( - clientReferenceId: entity.clientReferenceId, - serverGeneratedId: serviceRequestId, - dataOperation: operationGroupedEntity.key, - rowVersion: entity.rowVersion, - ), - ); - - await local.update( - entity.copyWith( - serviceRequestId: serviceRequestId, - id: service.id, - applicationStatus: service.applicationStatus, - accountId: service.accountId, - ), - createOpLog: false, - ); - } - } - break; - default: - await remote.bulkCreate(entities); - } - } else if (operationGroupedEntity.key == DataOperation.update) { - await Future.delayed(const Duration(seconds: 1)); - await remote.bulkUpdate(entities); - } else if (operationGroupedEntity.key == DataOperation.delete) { - await Future.delayed(const Duration(seconds: 1)); - await remote.bulkDelete(entities); - } - if (operationGroupedEntity.key == DataOperation.singleCreate) { - for (var element in entities) { - await remote.singleCreate(element); - } - } - for (final syncedEntity in sublist) { - if (syncedEntity.type == DataModelType.complaints) continue; - await local.markSyncedUp( - entry: syncedEntity, - id: syncedEntity.id, - nonRecoverableError: syncedEntity.nonRecoverableError, - clientReferenceId: syncedEntity.clientReferenceId, - ); - } - } - } - } - } - } -} diff --git a/apps/health_campaign_field_worker_app/lib/data/sync_registry.dart b/apps/health_campaign_field_worker_app/lib/data/sync_registry.dart new file mode 100644 index 000000000..331e08373 --- /dev/null +++ b/apps/health_campaign_field_worker_app/lib/data/sync_registry.dart @@ -0,0 +1,140 @@ +import 'package:complaints/data/repositories/remote/pgr_service.dart'; +import 'package:complaints/models/pgr_complaints.dart'; +import 'package:complaints/models/pgr_complaints_response.dart'; +import 'package:digit_components/utils/app_logger.dart'; +import 'package:digit_data_model/data_model.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:sync_service/data/repositories/sync/sync_up.dart'; + +class CustomSyncRegistry implements SyncUpOperation { + final RemoteRepository remote; + + CustomSyncRegistry(this.remote); + + @override + Future update(List entities, LocalRepository local) async { + try { + await remote.bulkUpdate(entities); + } catch (e) { + debugPrint('$e'); + } + } + + @override + Future delete(List entities, LocalRepository local) async { + try { + await remote.bulkDelete(entities); + } catch (e) { + debugPrint('$e'); + } + } + + @override + Future singleCreate(EntityModel entity, LocalRepository local) async { + try { + await remote.singleCreate(entity); + } catch (e) { + debugPrint('$e'); + } + } + + @override + Future create( + {required List> entry, + required List entities, + required LocalRepository local, + required MapEntry>> + operationGroupedEntity, + required MapEntry>> + typeGroupedEntity}) async { + try { + switch (typeGroupedEntity.key) { + case DataModelType.complaints: + for (final entity in entities) { + if (remote is PgrServiceRemoteRepository && + entity is PgrServiceModel) { + final response = await remote.create(entity); + final responseData = response.data; + if (responseData is! Map) { + AppLogger.instance.error( + title: 'NetworkManager : PgrServiceRemoteRepository', + message: responseData, + stackTrace: StackTrace.current, + ); + continue; + } + + PgrServiceCreateResponseModel pgrServiceCreateResponseModel; + PgrComplaintResponseModel pgrComplaintModel; + try { + pgrServiceCreateResponseModel = + PgrServiceCreateResponseModelMapper.fromMap( + responseData, + ); + pgrComplaintModel = + pgrServiceCreateResponseModel.serviceWrappers.first; + } catch (e) { + rethrow; + } + + final service = pgrComplaintModel.service; + final serviceRequestId = service.serviceRequestId; + + if (serviceRequestId == null || serviceRequestId.isEmpty) { + AppLogger.instance.error( + title: 'NetworkManager : PgrServiceRemoteRepository', + message: 'Service Request ID is null', + stackTrace: StackTrace.current, + ); + continue; + } + + await local.markSyncedUp( + entry: entry.firstWhere((element) => + element.clientReferenceId == entity.clientReferenceId), + clientReferenceId: entity.clientReferenceId, + nonRecoverableError: entity.nonRecoverableError, + ); + + await local.opLogManager.updateServerGeneratedIds( + model: UpdateServerGeneratedIdModel( + clientReferenceId: entity.clientReferenceId, + serverGeneratedId: serviceRequestId, + dataOperation: operationGroupedEntity.key, + rowVersion: entity.rowVersion, + ), + ); + + await local.update( + entity.copyWith( + serviceRequestId: serviceRequestId, + id: service.id, + applicationStatus: service.applicationStatus, + accountId: service.accountId, + ), + createOpLog: false, + ); + } + } + default: + await remote.bulkCreate(entities); + } + } catch (e) { + debugPrint('$e'); + } + } + + @override + Future localMarkSyncUp(List> entity, + LocalRepository local) async { + for (final syncedEntity in entity) { + if (syncedEntity.type == DataModelType.complaints) continue; + await local.markSyncedUp( + entry: syncedEntity, + id: syncedEntity.id, + nonRecoverableError: syncedEntity.nonRecoverableError, + clientReferenceId: syncedEntity.clientReferenceId, + ); + } + } +} diff --git a/apps/health_campaign_field_worker_app/lib/data/sync_service_mapper.dart b/apps/health_campaign_field_worker_app/lib/data/sync_service_mapper.dart new file mode 100644 index 000000000..9389bf865 --- /dev/null +++ b/apps/health_campaign_field_worker_app/lib/data/sync_service_mapper.dart @@ -0,0 +1,862 @@ +import 'dart:async'; +import 'dart:convert'; + +import 'package:attendance_management/attendance_management.dart'; +import 'package:collection/collection.dart'; +import 'package:digit_data_model/data_model.dart'; +import 'package:inventory_management/inventory_management.dart'; +import 'package:referral_reconciliation/referral_reconciliation.dart'; +import 'package:registration_delivery/registration_delivery.dart'; +import 'package:sync_service/data/repositories/sync/remote_type.dart'; +import 'package:sync_service/data/sync_entity_mapper_listener.dart'; + +import '../utils/environment_config.dart'; + +class SyncServiceMapper extends SyncEntityMapperListener { + @override + FutureOr writeToEntityDB( + Map response, + List> + localRepositories) async { + try { + for (int i = 0; i <= response.keys.length - 1; i++) { + if (response.keys.elementAt(i) != 'DownsyncCriteria') { + final local = RepositoryType.getLocalForType( + DataModels.getDataModelForEntityName(response.keys.elementAt(i)), + localRepositories, + ); + final List entityResponse = + response[response.keys.elementAt(i)] ?? []; + + final entityList = + entityResponse.whereType>().toList(); + + switch (response.keys.elementAt(i)) { + case "Individuals": + final entity = entityList + .map((e) => IndividualModelMapper.fromJson(jsonEncode(e))) + .toList(); + await local.bulkCreate(entity); + case "Households": + final entity = entityList + .map((e) => HouseholdModelMapper.fromJson(jsonEncode(e))) + .toList(); + await local.bulkCreate(entity); + case "HouseholdMembers": + final entity = entityList + .map( + (e) => HouseholdMemberModelMapper.fromJson( + jsonEncode(e), + ), + ) + .toList(); + await local.bulkCreate(entity); + case "ProjectBeneficiaries": + final entity = entityList + .map((e) => + ProjectBeneficiaryModelMapper.fromJson(jsonEncode(e))) + .toList(); + await local.bulkCreate(entity); + case "Tasks": + final entity = entityList + .map((e) => TaskModelMapper.fromJson(jsonEncode(e))) + .toList(); + await local.bulkCreate(entity); + case "SideEffects": + final entity = entityList + .map((e) => SideEffectModelMapper.fromJson(jsonEncode(e))) + .toList(); + await local.bulkCreate(entity); + case "Referrals": + final entity = entityList + .map((e) => ReferralModelMapper.fromJson(jsonEncode(e))) + .toList(); + await local.bulkCreate(entity); + default: + final entity = entityList + .map((e) => EntityModelMapper.fromJson(jsonEncode(e))) + .toList(); + await local.bulkCreate(entity); + } + } + } + } catch (e) { + rethrow; + } + } + + @override + int getSyncCount(List opLogs) { + int count = opLogs.where((element) { + if (element.syncedDown == false && element.syncedUp == true) { + switch (element.entityType) { + case DataModelType.household: + case DataModelType.individual: + case DataModelType.householdMember: + case DataModelType.projectBeneficiary: + case DataModelType.task: + case DataModelType.stock: + case DataModelType.stockReconciliation: + case DataModelType.sideEffect: + case DataModelType.referral: + case DataModelType.hFReferral: + case DataModelType.attendance: + return true; + default: + return false; + } + } else { + switch (element.entityType) { + case DataModelType.household: + case DataModelType.individual: + case DataModelType.householdMember: + case DataModelType.projectBeneficiary: + case DataModelType.task: + case DataModelType.stock: + case DataModelType.stockReconciliation: + case DataModelType.service: + case DataModelType.complaints: + case DataModelType.sideEffect: + case DataModelType.referral: + case DataModelType.hFReferral: + case DataModelType.attendance: + case DataModelType.userLocation: + return true; + default: + return false; + } + } + }).length; + + return count; + } + + @override + Future> syncDownEntityResponse( + MapEntry>> typeGroupedEntity, + MapEntry>> + operationGroupedEntity, + List entities, + RemoteRepository remote, + LocalRepository local) async { + List responseEntities = []; + const taskResourceIdKey = 'taskResourceId'; + const individualIdentifierIdKey = 'individualIdentifierId'; + const householdAddressIdKey = 'householdAddressId'; + const individualAddressIdKey = 'individualAddressId'; + + switch (typeGroupedEntity.key) { + case DataModelType.individual: + responseEntities = await remote.search(IndividualSearchModel( + clientReferenceId: entities + .whereType() + .map((e) => e.clientReferenceId) + .whereNotNull() + .toList(), + isDeleted: true, + )); + + for (var element in operationGroupedEntity.value) { + if (element.id == null) continue; + final entity = element.entity as IndividualModel; + final responseEntity = + responseEntities.whereType().firstWhereOrNull( + (e) => e.clientReferenceId == entity.clientReferenceId, + ); + + final serverGeneratedId = responseEntity?.id; + final rowVersion = responseEntity?.rowVersion; + if (serverGeneratedId != null) { + final identifierAdditionalIds = responseEntity?.identifiers + ?.map((e) { + final id = e.id; + + if (id == null) return null; + + return AdditionalId( + idType: individualIdentifierIdKey, + id: id, + ); + }) + .whereNotNull() + .toList(); + + final addressAdditionalIds = responseEntity?.address + ?.map((e) { + final id = e.id; + + if (id == null) return null; + + return AdditionalId( + idType: individualAddressIdKey, + id: id, + ); + }) + .whereNotNull() + .toList(); + + await local.opLogManager.updateServerGeneratedIds( + model: UpdateServerGeneratedIdModel( + clientReferenceId: entity.clientReferenceId, + serverGeneratedId: serverGeneratedId, + nonRecoverableError: entity.nonRecoverableError, + additionalIds: [ + if (identifierAdditionalIds != null) + ...identifierAdditionalIds, + if (addressAdditionalIds != null) ...addressAdditionalIds, + ], + dataOperation: element.operation, + rowVersion: rowVersion, + ), + ); + } else { + final bool markAsNonRecoverable = await local.opLogManager + .updateSyncDownRetry(entity.clientReferenceId); + + if (markAsNonRecoverable) { + await local.update( + entity.copyWith( + nonRecoverableError: true, + ), + createOpLog: false, + ); + } + } + } + + break; + + case DataModelType.household: + responseEntities = await remote.search(HouseholdSearchModel( + clientReferenceId: entities + .whereType() + .map((e) => e.clientReferenceId) + .whereNotNull() + .toList(), + isDeleted: true, + )); + + for (var element in operationGroupedEntity.value) { + if (element.id == null) continue; + final entity = element.entity as HouseholdModel; + final responseEntity = + responseEntities.whereType().firstWhereOrNull( + (e) => e.clientReferenceId == entity.clientReferenceId, + ); + + final serverGeneratedId = responseEntity?.id; + final rowVersion = responseEntity?.rowVersion; + if (serverGeneratedId != null) { + final addressAdditionalId = responseEntity?.address?.id == null + ? null + : AdditionalId( + idType: householdAddressIdKey, + id: responseEntity!.address!.id!, + ); + + await local.opLogManager.updateServerGeneratedIds( + model: UpdateServerGeneratedIdModel( + clientReferenceId: entity.clientReferenceId, + serverGeneratedId: serverGeneratedId, + additionalIds: [ + if (addressAdditionalId != null) addressAdditionalId, + ], + dataOperation: element.operation, + rowVersion: rowVersion, + nonRecoverableError: element.nonRecoverableError, + ), + ); + } else { + final bool markAsNonRecoverable = await local.opLogManager + .updateSyncDownRetry(entity.clientReferenceId); + + if (markAsNonRecoverable) { + await local.update( + entity.copyWith( + nonRecoverableError: true, + ), + createOpLog: false, + ); + } + } + } + + break; + + case DataModelType.householdMember: + responseEntities = await remote.search(HouseholdMemberSearchModel( + clientReferenceId: entities + .whereType() + .map((e) => e.clientReferenceId) + .whereNotNull() + .toList(), + isDeleted: true, + )); + + for (var element in operationGroupedEntity.value) { + if (element.id == null) continue; + final entity = element.entity as HouseholdMemberModel; + final responseEntity = responseEntities + .whereType() + .firstWhereOrNull( + (e) => e.clientReferenceId == entity.clientReferenceId, + ); + final serverGeneratedId = responseEntity?.id; + final rowVersion = responseEntity?.rowVersion; + if (serverGeneratedId != null) { + await local.opLogManager.updateServerGeneratedIds( + model: UpdateServerGeneratedIdModel( + clientReferenceId: entity.clientReferenceId, + serverGeneratedId: serverGeneratedId, + dataOperation: element.operation, + rowVersion: rowVersion, + ), + ); + } else { + final bool markAsNonRecoverable = await local.opLogManager + .updateSyncDownRetry(entity.clientReferenceId); + + if (markAsNonRecoverable) { + await local.update( + entity.copyWith( + nonRecoverableError: true, + ), + createOpLog: false, + ); + } + } + } + + break; + + case DataModelType.sideEffect: + responseEntities = await remote.search(SideEffectSearchModel( + clientReferenceId: entities + .whereType() + .map((e) => e.clientReferenceId) + .whereNotNull() + .toList(), + isDeleted: true, + )); + + for (var element in typeGroupedEntity.value) { + if (element.id == null) continue; + final entity = element.entity as SideEffectModel; + var responseEntity = + responseEntities.whereType().firstWhereOrNull( + (e) => e.clientReferenceId == entity.clientReferenceId, + ); + + final serverGeneratedId = responseEntity?.id; + final rowVersion = responseEntity?.rowVersion; + if (serverGeneratedId != null) { + local.opLogManager.updateServerGeneratedIds( + model: UpdateServerGeneratedIdModel( + clientReferenceId: entity.clientReferenceId, + serverGeneratedId: serverGeneratedId, + dataOperation: element.operation, + rowVersion: rowVersion, + ), + ); + } else { + final bool markAsNonRecoverable = await local.opLogManager + .updateSyncDownRetry(entity.clientReferenceId); + + if (markAsNonRecoverable) { + await local.update( + entity.copyWith( + nonRecoverableError: true, + ), + createOpLog: false, + ); + } + } + } + + case DataModelType.referral: + responseEntities = await remote.search(ReferralSearchModel( + clientReferenceId: entities + .whereType() + .map((e) => e.clientReferenceId) + .whereNotNull() + .toList(), + isDeleted: true, + )); + + for (var element in typeGroupedEntity.value) { + if (element.id == null) continue; + final entity = element.entity as ReferralModel; + var responseEntity = + responseEntities.whereType().firstWhereOrNull( + (e) => e.clientReferenceId == entity.clientReferenceId, + ); + + final serverGeneratedId = responseEntity?.id; + final rowVersion = responseEntity?.rowVersion; + if (serverGeneratedId != null) { + local.opLogManager.updateServerGeneratedIds( + model: UpdateServerGeneratedIdModel( + clientReferenceId: entity.clientReferenceId, + serverGeneratedId: serverGeneratedId, + dataOperation: element.operation, + rowVersion: rowVersion, + ), + ); + } else { + final bool markAsNonRecoverable = await local.opLogManager + .updateSyncDownRetry(entity.clientReferenceId); + + if (markAsNonRecoverable) { + await local.update( + entity.copyWith( + nonRecoverableError: true, + ), + createOpLog: false, + ); + } + } + } + + case DataModelType.projectBeneficiary: + responseEntities = await remote.search(ProjectBeneficiarySearchModel( + clientReferenceId: entities + .whereType() + .map((e) => e.clientReferenceId) + .whereNotNull() + .toList(), + isDeleted: true, + )); + + for (var element in operationGroupedEntity.value) { + if (element.id == null) continue; + final entity = element.entity as ProjectBeneficiaryModel; + final responseEntity = responseEntities + .whereType() + .firstWhereOrNull( + (e) => e.clientReferenceId == entity.clientReferenceId, + ); + final serverGeneratedId = responseEntity?.id; + final rowVersion = responseEntity?.rowVersion; + if (serverGeneratedId != null) { + await local.opLogManager.updateServerGeneratedIds( + model: UpdateServerGeneratedIdModel( + clientReferenceId: entity.clientReferenceId, + serverGeneratedId: serverGeneratedId, + dataOperation: element.operation, + rowVersion: rowVersion, + ), + ); + } else { + final bool markAsNonRecoverable = await local.opLogManager + .updateSyncDownRetry(entity.clientReferenceId); + + if (markAsNonRecoverable) { + await local.update( + entity.copyWith( + nonRecoverableError: true, + ), + createOpLog: false, + ); + } + } + } + + break; + case DataModelType.task: + responseEntities = await remote.search(TaskSearchModel( + clientReferenceId: entities + .whereType() + .map((e) => e.clientReferenceId) + .whereNotNull() + .toList(), + isDeleted: true, + )); + + for (var element in operationGroupedEntity.value) { + if (element.id == null) continue; + final taskModel = element.entity as TaskModel; + var responseEntity = + responseEntities.whereType().firstWhereOrNull( + (e) => e.clientReferenceId == taskModel.clientReferenceId, + ); + + final serverGeneratedId = responseEntity?.id; + final rowVersion = responseEntity?.rowVersion; + + if (serverGeneratedId != null) { + await local.opLogManager.updateServerGeneratedIds( + model: UpdateServerGeneratedIdModel( + clientReferenceId: taskModel.clientReferenceId, + serverGeneratedId: serverGeneratedId, + additionalIds: responseEntity?.resources + ?.map((e) { + final id = e.id; + if (id == null) return null; + + return AdditionalId( + idType: taskResourceIdKey, + id: id, + ); + }) + .whereNotNull() + .toList(), + dataOperation: element.operation, + rowVersion: rowVersion, + ), + ); + } else { + final bool markAsNonRecoverable = await local.opLogManager + .updateSyncDownRetry(taskModel.clientReferenceId); + + if (markAsNonRecoverable) { + await local.update( + taskModel.copyWith( + nonRecoverableError: true, + ), + createOpLog: false, + ); + } + } + } + + break; + case DataModelType.hFReferral: + responseEntities = await remote.search( + HFReferralSearchModel( + clientReferenceId: entities + .whereType() + .map((e) => e.clientReferenceId) + .whereNotNull() + .toList(), + ), + ); + + for (var element in operationGroupedEntity.value) { + if (element.id == null) continue; + final entity = element.entity as HFReferralModel; + final responseEntity = + responseEntities.whereType().firstWhereOrNull( + (e) => e.clientReferenceId == entity.clientReferenceId, + ); + + final serverGeneratedId = responseEntity?.id; + final rowVersion = responseEntity?.rowVersion; + if (serverGeneratedId != null) { + await local.opLogManager.updateServerGeneratedIds( + model: UpdateServerGeneratedIdModel( + clientReferenceId: entity.clientReferenceId, + serverGeneratedId: serverGeneratedId, + nonRecoverableError: entity.nonRecoverableError, + dataOperation: element.operation, + rowVersion: rowVersion, + ), + ); + } else { + final bool markAsNonRecoverable = await local.opLogManager + .updateSyncDownRetry(entity.clientReferenceId); + + if (markAsNonRecoverable) { + await local.update( + entity.copyWith( + nonRecoverableError: true, + ), + createOpLog: false, + ); + } + } + } + + break; + + case DataModelType.attendance: + responseEntities = await remote.search(AttendanceLogSearchModel( + clientReferenceId: entities + .whereType() + .map((e) => e.clientReferenceId!) + .whereNotNull() + .toList(), + tenantId: envConfig.variables.tenantId, + )); + + for (var element in operationGroupedEntity.value) { + if (element.id == null) continue; + final entity = element.entity as AttendanceLogModel; + final responseEntity = + responseEntities.whereType().firstWhereOrNull( + (e) => e.clientReferenceId == entity.clientReferenceId, + ); + + final serverGeneratedId = responseEntity?.id; + final rowVersion = responseEntity?.rowVersion; + if (serverGeneratedId != null) { + await local.opLogManager.updateServerGeneratedIds( + model: UpdateServerGeneratedIdModel( + clientReferenceId: entity.clientReferenceId.toString(), + serverGeneratedId: serverGeneratedId, + nonRecoverableError: entity.nonRecoverableError, + dataOperation: element.operation, + rowVersion: rowVersion, + ), + ); + } else { + final bool markAsNonRecoverable = + await local.opLogManager.updateSyncDownRetry( + entity.clientReferenceId.toString(), + ); + + if (markAsNonRecoverable) { + await local.update( + entity.copyWith( + nonRecoverableError: true, + ), + createOpLog: false, + ); + } + } + } + + break; + + case DataModelType.stock: + responseEntities = await remote.search( + StockSearchModel( + clientReferenceId: entities + .whereType() + .map((e) => e.clientReferenceId) + .whereNotNull() + .toList(), + ), + ); + + for (var element in operationGroupedEntity.value) { + if (element.id == null) continue; + final entity = element.entity as StockModel; + final responseEntity = + responseEntities.whereType().firstWhereOrNull( + (e) => e.clientReferenceId == entity.clientReferenceId, + ); + + final serverGeneratedId = responseEntity?.id; + final rowVersion = responseEntity?.rowVersion; + + if (serverGeneratedId != null) { + await local.opLogManager.updateServerGeneratedIds( + model: UpdateServerGeneratedIdModel( + clientReferenceId: entity.clientReferenceId!, + serverGeneratedId: serverGeneratedId, + dataOperation: element.operation, + rowVersion: rowVersion, + ), + ); + } else { + final bool markAsNonRecoverable = await local.opLogManager + .updateSyncDownRetry(entity.clientReferenceId); + + if (markAsNonRecoverable) { + await local.update( + entity.copyWith( + nonRecoverableError: true, + ), + createOpLog: false, + ); + } + } + } + + break; + + case DataModelType.stockReconciliation: + responseEntities = await remote.search(StockReconciliationSearchModel( + clientReferenceId: entities + .whereType() + .map((e) => e.clientReferenceId) + .whereNotNull() + .toList(), + )); + + for (var element in operationGroupedEntity.value) { + if (element.id == null) continue; + final entity = element.entity as StockReconciliationModel; + final responseEntity = responseEntities + .whereType() + .firstWhereOrNull( + (e) => e.clientReferenceId == entity.clientReferenceId, + ); + + final serverGeneratedId = responseEntity?.id; + final rowVersion = responseEntity?.rowVersion; + + if (serverGeneratedId != null) { + await local.opLogManager.updateServerGeneratedIds( + model: UpdateServerGeneratedIdModel( + clientReferenceId: entity.clientReferenceId, + serverGeneratedId: serverGeneratedId, + dataOperation: element.operation, + rowVersion: rowVersion, + ), + ); + } else { + final bool markAsNonRecoverable = await local.opLogManager + .updateSyncDownRetry(entity.clientReferenceId); + + if (markAsNonRecoverable) { + await local.update( + entity.copyWith( + nonRecoverableError: true, + ), + createOpLog: false, + ); + } + } + } + + break; + + // case DataModelType.complaints: + // if (remote is! PgrServiceRemoteRepository) return responseEntities; + // + // final futures = entities + // .whereType() + // .map((e) => e.serviceRequestId) + // .whereNotNull() + // .map( + // (e) { + // final future = remote.searchWithoutClientReferenceId( + // PgrServiceSearchModel( + // serviceRequestId: e, + // ), + // ); + // + // return Future.sync(() => future); + // }, + // ); + // + // final resolvedFutures = await Future.wait(futures); + // + // responseEntities = resolvedFutures + // .expand((element) => element) + // .whereType() + // // We only need serviceRequestId and application status + // .map((e) => PgrServiceModel( + // clientReferenceId: '', + // tenantId: e.tenantId ?? '', + // serviceCode: e.serviceCode ?? '', + // description: e.description ?? '', + // serviceRequestId: e.serviceRequestId, + // applicationStatus: e.applicationStatus ?? + // PgrServiceApplicationStatus.pendingAssignment, + // user: PgrComplainantModel( + // clientReferenceId: '', + // tenantId: '', + // complaintClientReferenceId: e.serviceRequestId ?? '', + // ), + // address: PgrAddressModel(), + // )) + // .toList(); + // + // for (var element in operationGroupedEntity.value) { + // if (element.id == null) continue; + // final entity = element.entity as PgrServiceModel; + // final responseEntity = + // responseEntities.whereType().firstWhereOrNull( + // (e) => e.clientReferenceId == entity.clientReferenceId, + // ); + // + // final serverGeneratedId = responseEntity?.serviceRequestId; + // final rowVersion = responseEntity?.rowVersion; + // + // if (serverGeneratedId != null) { + // await local.opLogManager.updateServerGeneratedIds( + // model: UpdateServerGeneratedIdModel( + // clientReferenceId: entity.clientReferenceId, + // serverGeneratedId: serverGeneratedId, + // dataOperation: element.operation, + // rowVersion: rowVersion, + // ), + // ); + // } + // } + // break; + + default: + break; + } + + return responseEntities; + } + + @override + EntityModel updatedEntity(EntityModel entity, OpLogEntry e, + String? serverGeneratedId) { + var updatedEntity = entity; + + const taskResourceIdKey = 'taskResourceId'; + const individualIdentifierIdKey = 'individualIdentifierId'; + const householdAddressIdKey = 'householdAddressId'; + const individualAddressIdKey = 'individualAddressId'; + + if (updatedEntity is HouseholdModel) { + final addressId = e.additionalIds.firstWhereOrNull( + (element) { + return element.idType == householdAddressIdKey; + }, + )?.id; + + updatedEntity = updatedEntity.copyWith( + address: updatedEntity.address?.copyWith( + id: updatedEntity.address?.id ?? addressId, + ), + ); + } + + if (updatedEntity is IndividualModel) { + final identifierId = e.additionalIds.firstWhereOrNull( + (element) { + return element.idType == individualIdentifierIdKey; + }, + )?.id; + + final addressId = e.additionalIds.firstWhereOrNull( + (element) { + return element.idType == individualAddressIdKey; + }, + )?.id; + + updatedEntity = updatedEntity.copyWith( + identifiers: updatedEntity.identifiers?.map((e) { + return e.copyWith( + id: e.id ?? identifierId, + ); + }).toList(), + address: updatedEntity.address?.map((e) { + return e.copyWith( + id: e.id ?? addressId, + ); + }).toList(), + ); + } + + if (updatedEntity is TaskModel) { + final resourceId = e.additionalIds + .firstWhereOrNull( + (element) => element.idType == taskResourceIdKey, + ) + ?.id; + + updatedEntity = updatedEntity.copyWith( + resources: updatedEntity.resources?.map((e) { + if (resourceId != null) { + return e.copyWith( + taskId: serverGeneratedId, + id: e.id ?? resourceId, + ); + } + + return e.copyWith(taskId: serverGeneratedId); + }).toList(), + ); + } + + return updatedEntity; + } +} diff --git a/apps/health_campaign_field_worker_app/lib/main.dart b/apps/health_campaign_field_worker_app/lib/main.dart index f46e21059..5fe3d6b17 100644 --- a/apps/health_campaign_field_worker_app/lib/main.dart +++ b/apps/health_campaign_field_worker_app/lib/main.dart @@ -1,4 +1,3 @@ -import 'package:collection/collection.dart'; import 'package:digit_components/digit_components.dart'; import 'package:digit_data_model/data/local_store/sql_store/sql_store.dart'; import 'package:dio/dio.dart'; diff --git a/apps/health_campaign_field_worker_app/lib/models/bandwidth/bandwidth_model.dart b/apps/health_campaign_field_worker_app/lib/models/bandwidth/bandwidth_model.dart deleted file mode 100644 index 7a1b455dd..000000000 --- a/apps/health_campaign_field_worker_app/lib/models/bandwidth/bandwidth_model.dart +++ /dev/null @@ -1,16 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:freezed_annotation/freezed_annotation.dart'; - -part 'bandwidth_model.freezed.dart'; -part 'bandwidth_model.g.dart'; - -@freezed -class BandwidthModel with _$BandwidthModel { - const factory BandwidthModel({ - required String userId, - required int batchSize, - }) = _BandwidthModel; - - factory BandwidthModel.fromJson(Map json) => - _$BandwidthModelFromJson(json); -} diff --git a/apps/health_campaign_field_worker_app/lib/models/downsync/downsync.mapper.dart b/apps/health_campaign_field_worker_app/lib/models/downsync/downsync.mapper.dart index 3a667fb18..41a7184be 100644 --- a/apps/health_campaign_field_worker_app/lib/models/downsync/downsync.mapper.dart +++ b/apps/health_campaign_field_worker_app/lib/models/downsync/downsync.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'downsync.dart'; @@ -130,10 +130,8 @@ mixin DownsyncSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - DownsyncSearchModelMapper.ensureInitialized() - .isValueEqual(this as DownsyncSearchModel, other)); + return DownsyncSearchModelMapper.ensureInitialized() + .equalsValue(this as DownsyncSearchModel, other); } @override @@ -357,10 +355,8 @@ mixin DownsyncModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - DownsyncModelMapper.ensureInitialized() - .isValueEqual(this as DownsyncModel, other)); + return DownsyncModelMapper.ensureInitialized() + .equalsValue(this as DownsyncModel, other); } @override @@ -569,10 +565,8 @@ mixin DownsyncAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - DownsyncAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as DownsyncAdditionalFields, other)); + return DownsyncAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as DownsyncAdditionalFields, other); } @override diff --git a/apps/health_campaign_field_worker_app/lib/models/entities/additional_fields_type.mapper.dart b/apps/health_campaign_field_worker_app/lib/models/entities/additional_fields_type.mapper.dart index 9d30d89b3..52eac602f 100644 --- a/apps/health_campaign_field_worker_app/lib/models/entities/additional_fields_type.mapper.dart +++ b/apps/health_campaign_field_worker_app/lib/models/entities/additional_fields_type.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'additional_fields_type.dart'; diff --git a/apps/health_campaign_field_worker_app/lib/models/entities/mdms_master_enums.mapper.dart b/apps/health_campaign_field_worker_app/lib/models/entities/mdms_master_enums.mapper.dart index 870f84eeb..43fa7b7f3 100644 --- a/apps/health_campaign_field_worker_app/lib/models/entities/mdms_master_enums.mapper.dart +++ b/apps/health_campaign_field_worker_app/lib/models/entities/mdms_master_enums.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'mdms_master_enums.dart'; diff --git a/apps/health_campaign_field_worker_app/lib/models/entities/mdms_module_enums.mapper.dart b/apps/health_campaign_field_worker_app/lib/models/entities/mdms_module_enums.mapper.dart index e71180b05..8910d16b3 100644 --- a/apps/health_campaign_field_worker_app/lib/models/entities/mdms_module_enums.mapper.dart +++ b/apps/health_campaign_field_worker_app/lib/models/entities/mdms_module_enums.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'mdms_module_enums.dart'; diff --git a/apps/health_campaign_field_worker_app/lib/models/entities/roles.mapper.dart b/apps/health_campaign_field_worker_app/lib/models/entities/roles.mapper.dart index c08d84d1d..504594772 100644 --- a/apps/health_campaign_field_worker_app/lib/models/entities/roles.mapper.dart +++ b/apps/health_campaign_field_worker_app/lib/models/entities/roles.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'roles.dart'; diff --git a/apps/health_campaign_field_worker_app/lib/models/entities/roles_type.mapper.dart b/apps/health_campaign_field_worker_app/lib/models/entities/roles_type.mapper.dart index cdb2482b8..3ec8e82bd 100644 --- a/apps/health_campaign_field_worker_app/lib/models/entities/roles_type.mapper.dart +++ b/apps/health_campaign_field_worker_app/lib/models/entities/roles_type.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'roles_type.dart'; diff --git a/apps/health_campaign_field_worker_app/lib/models/entities/scanner_type.mapper.dart b/apps/health_campaign_field_worker_app/lib/models/entities/scanner_type.mapper.dart index 32b70ae86..5b44d4208 100644 --- a/apps/health_campaign_field_worker_app/lib/models/entities/scanner_type.mapper.dart +++ b/apps/health_campaign_field_worker_app/lib/models/entities/scanner_type.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'scanner_type.dart'; diff --git a/apps/health_campaign_field_worker_app/lib/models/entities/status.dart b/apps/health_campaign_field_worker_app/lib/models/entities/status.dart index e7996833c..878c3fe09 100644 --- a/apps/health_campaign_field_worker_app/lib/models/entities/status.dart +++ b/apps/health_campaign_field_worker_app/lib/models/entities/status.dart @@ -2,17 +2,28 @@ import 'package:dart_mappable/dart_mappable.dart'; part 'status.mapper.dart'; + @MappableEnum(caseStyle: CaseStyle.upperCase) enum Status { - @MappableValue("DELIVERED") delivered, - @MappableValue("NOT_DELIVERED") notDelivered, - @MappableValue("VISITED") visited, - @MappableValue("NOT_VISITED") notVisited, - @MappableValue("BENEFICIARY_REFUSED") beneficiaryRefused, - @MappableValue("BENEFICIARY_REFERRED") beneficiaryReferred, - @MappableValue("ADMINISTERED_SUCCESS") administeredSuccess, - @MappableValue("ADMINISTERED_FAILED") administeredFailed, - @MappableValue("IN_COMPLETE") inComplete, - @MappableValue("TO_ADMINISTER") toAdminister, + @MappableValue("DELIVERED") + delivered, + @MappableValue("NOT_DELIVERED") + notDelivered, + @MappableValue("VISITED") + visited, + @MappableValue("NOT_VISITED") + notVisited, + @MappableValue("BENEFICIARY_REFUSED") + beneficiaryRefused, + @MappableValue("BENEFICIARY_REFERRED") + beneficiaryReferred, + @MappableValue("ADMINISTERED_SUCCESS") + administeredSuccess, + @MappableValue("ADMINISTERED_FAILED") + administeredFailed, + @MappableValue("IN_COMPLETE") + inComplete, + @MappableValue("TO_ADMINISTER") + toAdminister, ; -} \ No newline at end of file +} diff --git a/apps/health_campaign_field_worker_app/lib/models/entities/status.mapper.dart b/apps/health_campaign_field_worker_app/lib/models/entities/status.mapper.dart index dffb822cc..2581632e6 100644 --- a/apps/health_campaign_field_worker_app/lib/models/entities/status.mapper.dart +++ b/apps/health_campaign_field_worker_app/lib/models/entities/status.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'status.dart'; diff --git a/apps/health_campaign_field_worker_app/lib/pages/authenticated.dart b/apps/health_campaign_field_worker_app/lib/pages/authenticated.dart index 1f7baf504..c7f98a48f 100644 --- a/apps/health_campaign_field_worker_app/lib/pages/authenticated.dart +++ b/apps/health_campaign_field_worker_app/lib/pages/authenticated.dart @@ -9,10 +9,11 @@ import 'package:flutter_portal/flutter_portal.dart'; import 'package:isar/isar.dart'; import 'package:location/location.dart'; import 'package:registration_delivery/registration_delivery.dart'; +import 'package:survey_form/survey_form.dart'; +import 'package:sync_service/sync_service_lib.dart'; import '../blocs/localization/app_localization.dart'; import '../blocs/projects_beneficiary_downsync/project_beneficiaries_downsync.dart'; -import '../blocs/sync/sync.dart'; import '../data/remote_client.dart'; import '../data/repositories/remote/bandwidth_check.dart'; import '../models/downsync/downsync.dart'; @@ -43,7 +44,7 @@ class AuthenticatedPageWrapper extends StatelessWidget { return Portal( child: Scaffold( - backgroundColor: DigitTheme.instance.colorScheme.background, + backgroundColor: DigitTheme.instance.colorScheme.surface, appBar: AppBar( backgroundColor: DigitTheme.instance.colorScheme.primary, actions: showDrawer @@ -108,6 +109,7 @@ class AuthenticatedPageWrapper extends StatelessWidget { drawer: showDrawer ? const Drawer(child: SideBar()) : null, body: MultiBlocProvider( providers: [ + // INFO : Need to add bloc of package Here BlocProvider( create: (context) { final userId = context.loggedInUserUuid; @@ -115,7 +117,7 @@ class AuthenticatedPageWrapper extends StatelessWidget { final isar = context.read(); final bloc = SyncBloc( isar: isar, - networkManager: context.read(), + syncService: SyncService(), ); if (!bloc.isClosed) { @@ -134,7 +136,9 @@ class AuthenticatedPageWrapper extends StatelessWidget { bloc.add( SyncRefreshEvent( userId, - getSyncCount(event), + SyncServiceSingleton() + .entityMapper! + .getSyncCount(event), ), ); } @@ -153,7 +157,9 @@ class AuthenticatedPageWrapper extends StatelessWidget { bloc.add( SyncRefreshEvent( userId, - getSyncCount(event), + SyncServiceSingleton() + .entityMapper! + .getSyncCount(event), ), ); } @@ -183,7 +189,6 @@ class AuthenticatedPageWrapper extends StatelessWidget { downSyncLocalRepository: ctx.read< LocalRepository>(), - networkManager: ctx.read(), householdLocalRepository: ctx.read< LocalRepository>(), diff --git a/apps/health_campaign_field_worker_app/lib/pages/boundary_selection.dart b/apps/health_campaign_field_worker_app/lib/pages/boundary_selection.dart index a4acf7a33..622a47208 100644 --- a/apps/health_campaign_field_worker_app/lib/pages/boundary_selection.dart +++ b/apps/health_campaign_field_worker_app/lib/pages/boundary_selection.dart @@ -10,11 +10,13 @@ import 'package:digit_data_model/data_model.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:reactive_forms/reactive_forms.dart'; +import 'package:sync_service/blocs/sync/sync.dart'; import '../blocs/app_initialization/app_initialization.dart'; import '../blocs/localization/localization.dart'; import '../blocs/projects_beneficiary_downsync/project_beneficiaries_downsync.dart'; -import '../blocs/sync/sync.dart'; +import '../data/local_store/app_shared_preferences.dart'; +import '../data/local_store/no_sql/schema/app_configuration.dart'; import '../data/local_store/app_shared_preferences.dart'; import '../data/local_store/no_sql/schema/app_configuration.dart'; import '../models/entities/roles_type.dart'; @@ -41,19 +43,21 @@ class _BoundarySelectionPageState int i = 0; int pendingSyncCount = 0; final clickedStatus = ValueNotifier(false); - var expenseTypeCtrl = TextEditingController(); StreamController downloadProgress = StreamController(); Map dropdownControllers = {}; + late StreamSubscription syncSubscription; @override void initState() { + context.syncRefresh(); LocalizationParams().setModule('common', false); context.read().add(SyncRefreshEvent(context.loggedInUserUuid)); context.read().add( const DownSyncResetStateEvent(), ); super.initState(); + listenToSyncCount(); } @override @@ -67,6 +71,7 @@ class _BoundarySelectionPageState @override void dispose() { clickedStatus.dispose(); + syncSubscription.cancel(); super.dispose(); } @@ -124,8 +129,14 @@ class _BoundarySelectionPageState children: [ Expanded( child: ListView.builder( - itemCount: labelList.length, + itemCount: labelList.length+1, itemBuilder: (context, labelIndex) { + + if (labelIndex == labelList.length) { + // Return a SizedBox for whitespace after the last item + return const SizedBox(height: kPadding*3); // Adjust height as needed + } + final label = labelList.elementAt(labelIndex); final filteredItems = @@ -525,41 +536,31 @@ class _BoundarySelectionPageState padding: const EdgeInsets.fromLTRB( kPadding, 0, kPadding, 0), child: SafeArea( - child: BlocListener( - listener: (context, syncState) { - setState(() { - pendingSyncCount = syncState.maybeWhen( - orElse: () => 0, - pendingSync: (count) => count, - ); - }); - }, - child: ValueListenableBuilder( - valueListenable: clickedStatus, - builder: (context, bool isClicked, _) { - return DigitElevatedButton( - onPressed: selectedBoundary == null || - isClicked - ? null - : () async { - if (!form.valid || - validateAllBoundarySelection()) { - clickedStatus.value = false; - await DigitToast.show( - context, - options: - DigitToastOptions( - localizations.translate(i18 - .common - .corecommonRequired), - true, - Theme.of(context), - ), - ); - } else { - setState(() { - shouldPop = true; - }); + child: ValueListenableBuilder( + valueListenable: clickedStatus, + builder: (context, bool isClicked, _) { + return DigitElevatedButton( + onPressed: selectedBoundary == null || + isClicked + ? null + : () async { + if (!form.valid || + validateAllBoundarySelection()) { + clickedStatus.value = false; + await DigitToast.show( + context, + options: DigitToastOptions( + localizations.translate(i18 + .common + .corecommonRequired), + true, + Theme.of(context), + ), + ); + } else { + setState(() { + shouldPop = true; + }); context .read() @@ -632,7 +633,6 @@ class _BoundarySelectionPageState ), ), ), - ), ], ), ), @@ -699,4 +699,16 @@ class _BoundarySelectionPageState // Return false if none of the form controls have a null value return false; } + + void listenToSyncCount() async { + syncSubscription = context.syncCount().listen((state) { + state.maybeWhen( + orElse: () {}, + pendingSync: (count) { + setState(() { + pendingSyncCount = count; + }); + }); + }); + } } diff --git a/apps/health_campaign_field_worker_app/lib/pages/checklist/checklist.dart b/apps/health_campaign_field_worker_app/lib/pages/checklist/checklist.dart deleted file mode 100644 index b4f053759..000000000 --- a/apps/health_campaign_field_worker_app/lib/pages/checklist/checklist.dart +++ /dev/null @@ -1,178 +0,0 @@ -import 'package:digit_components/digit_components.dart'; -import 'package:digit_components/widgets/digit_project_cell.dart'; -import 'package:digit_data_model/data_model.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; -import '../../utils/constants.dart'; -import 'package:recase/recase.dart'; - -import '../../blocs/auth/auth.dart'; -import '../../router/app_router.dart'; -import '../../utils/extensions/extensions.dart'; -import '../../utils/i18_key_constants.dart' as i18; -import '../../widgets/action_card/action_card.dart'; -import '../../widgets/header/back_navigation_help_header.dart'; -import '../../widgets/localized.dart'; -import '../../widgets/no_result_card/no_result_card.dart'; - -@RoutePage() -class ChecklistPage extends LocalizedStatefulWidget { - const ChecklistPage({ - Key? key, - super.appLocalizations, - }) : super(key: key); - - @override - State createState() => _ChecklistPageState(); -} - -class _ChecklistPageState extends LocalizedState { - @override - Widget build(BuildContext context) { - final theme = Theme.of(context); - - return Scaffold( - body: ScrollableContent( - header: const Column(children: [ - BackNavigationHelpHeaderWidget(), - ]), - children: [ - BlocBuilder( - builder: (context, state) { - return state.map( - empty: (value) => const Text('No Checklist'), - isloading: (value) => const Center( - child: CircularProgressIndicator(), - ), - serviceDefinitionFetch: - (ServiceDefinitionServiceFetchedState value) { - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - Padding( - padding: const EdgeInsets.only(left: 8), - child: Align( - alignment: Alignment.centerLeft, - child: Padding( - padding: const EdgeInsets.all( - kPadding, - ), - child: Text( - localizations - .translate(i18.checklist.checklistlabel), - style: theme.textTheme.displayMedium, - ), - ), - ), - ), - BlocBuilder( - builder: (context, authstate) { - return authstate.maybeMap( - orElse: () => const Offstage(), - authenticated: (res) { - List roles = res.userModel.roles - .map((e) => e.code.snakeCase.toUpperCase()) - .toList(); - final values = value.serviceDefinitionList.where( - (item) => - !roles - .indexOf( - item.code!.split('.').lastOrNull!, - ) - .isNegative && - !item.code!.contains(Constants - .healthFacilityChecklistPrefix) && - (item.code ?? '').contains( - context.selectedProject.name)); - - if (values.isEmpty) { - return Column( - children: [ - NoResultCard( - align: Alignment.center, - label: localizations.translate( - i18.common.noResultsFound, - ), - ), - ], - ); - } - - return Column( - children: values - .map((e) => DigitProjectCell( - projectText: localizations - .translate('${e.code}'), - onTap: () { - context - .read() - .add( - ServiceDefinitionSelectionEvent( - serviceDefinition: e, - ), - ); - DigitActionDialog.show( - context, - widget: ActionCard(items: [ - ActionCardModel( - icon: Icons.edit_calendar, - label: localizations.translate(i18 - .checklist - .checklistCreateActionLabel), - action: () { - context.router.push( - ChecklistBoundaryViewRoute(), - ); - Navigator.of( - context, - rootNavigator: true, - ).pop(); - }, - ), - ActionCardModel( - icon: Icons.visibility, - label: localizations.translate(i18 - .checklist - .checklistViewActionLabel), - action: () { - context - .read() - .add( - ServiceSearchEvent( - serviceSearchModel: - ServiceSearchModel( - id: e.id, - ), - ), - ); - context.router.push( - ChecklistPreviewRoute(), - ); - Navigator.of( - context, - rootNavigator: true, - ).pop(); - }, - ), - ]), - ); - }, - )) - .toList(), - ); - }, - ); - }, - ), - ], - ); - }, - ); - }, - ), - ], - ), - ); - } -} diff --git a/apps/health_campaign_field_worker_app/lib/pages/checklist/checklist_boundary_view.dart b/apps/health_campaign_field_worker_app/lib/pages/checklist/checklist_boundary_view.dart deleted file mode 100644 index 40f2f05f4..000000000 --- a/apps/health_campaign_field_worker_app/lib/pages/checklist/checklist_boundary_view.dart +++ /dev/null @@ -1,86 +0,0 @@ -import 'package:digit_components/digit_components.dart'; -import 'package:flutter/material.dart'; -import 'package:intl/intl.dart'; - -import '../../router/app_router.dart'; -import '../../utils/i18_key_constants.dart' as i18; -import '../../utils/utils.dart'; -import '../../widgets/header/back_navigation_help_header.dart'; -import '../../widgets/localized.dart'; - -@RoutePage() -class ChecklistBoundaryViewPage extends LocalizedStatefulWidget { - const ChecklistBoundaryViewPage({ - Key? key, - super.appLocalizations, - }) : super(key: key); - - @override - State createState() => - _ChecklistBoundaryViewPageState(); -} - -class _ChecklistBoundaryViewPageState - extends LocalizedState { - @override - Widget build(BuildContext context) { - final theme = Theme.of(context); - - return Scaffold( - body: ScrollableContent( - header: const Column(children: [ - BackNavigationHelpHeaderWidget(), - ]), - footer: DigitCard( - child: DigitElevatedButton( - onPressed: () => context.router.push(ChecklistViewRoute()), - child: Text(localizations.translate( - i18.common.coreCommonContinue, - )), - ), - ), - children: [ - DigitCard( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - Text( - localizations.translate( - i18.checklist.checklistDetailLabel, - ), - style: theme.textTheme.displayMedium, - ), - DigitTextField( - readOnly: true, - label: localizations.translate( - i18.checklist.checklistdate, - ), - suffixIcon: const Padding( - padding: EdgeInsets.all(8), - child: Icon( - Icons.date_range_outlined, - ), - ), - controller: TextEditingController( - text: DateFormat('dd MMMM yyyy').format(DateTime.now()), - ), - ), - DigitTextField( - readOnly: true, - label: localizations.translate( - i18.householdLocation.administrationAreaFormLabel, - ), - controller: TextEditingController( - text: localizations - .translate(context.boundary.code.toString()), - ), - ), - ], - ), - ), - ], - ), - ); - } -} diff --git a/apps/health_campaign_field_worker_app/lib/pages/checklist/checklist_preview.dart b/apps/health_campaign_field_worker_app/lib/pages/checklist/checklist_preview.dart deleted file mode 100644 index 105936fc5..000000000 --- a/apps/health_campaign_field_worker_app/lib/pages/checklist/checklist_preview.dart +++ /dev/null @@ -1,283 +0,0 @@ -import 'package:digit_components/digit_components.dart'; -import 'package:digit_components/widgets/atoms/digit_divider.dart'; -import 'package:digit_data_model/data_model.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; -import '../../widgets/no_result_card/no_result_card.dart'; -import 'package:intl/intl.dart'; - -import '../../router/app_router.dart'; -import '../../utils/constants.dart'; -import '../../utils/i18_key_constants.dart' as i18; -import '../../widgets/header/back_navigation_help_header.dart'; -import '../../widgets/localized.dart'; - -@RoutePage() -class ChecklistPreviewPage extends LocalizedStatefulWidget { - const ChecklistPreviewPage({ - Key? key, - super.appLocalizations, - }) : super(key: key); - - @override - State createState() => _ChecklistPreviewPageState(); -} - -class _ChecklistPreviewPageState extends LocalizedState { - @override - Widget build(BuildContext context) { - final theme = Theme.of(context); - - return Scaffold( - body: ScrollableContent( - header: const Column(children: [ - BackNavigationHelpHeaderWidget(), - ]), - footer: BlocBuilder( - builder: (context, state) { - return state.maybeWhen( - orElse: () => const Offstage(), - serviceSearch: (value1, value2, value3) { - return value2 != null - ? DigitCard( - child: DigitElevatedButton( - onPressed: () { - context.read().add( - ServiceResetEvent(serviceList: value1), - ); - }, - child: Text( - localizations.translate(i18.common.corecommonclose), - ), - ), - ) - : const Offstage(); - }, - ); - }, - ), - children: [ - BlocBuilder(builder: (context, state) { - return state.maybeWhen( - orElse: () => const Offstage(), - serviceSearch: (serviceList, selectedService, loading) { - return selectedService == null - ? serviceList.isNotEmpty - ? Column( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - ...serviceList - .map((e) => e.serviceDefId != null - ? DigitCard( - child: Column( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Align( - alignment: Alignment.centerLeft, - child: Text( - DateFormat(Constants - .checklistPreviewDateFormat) - .format( - DateFormat(Constants - .defaultDateFormat) - .parse( - e.createdAt.toString(), - ), - ), - style: theme - .textTheme.headlineMedium, - ), - ), - Row( - mainAxisAlignment: - MainAxisAlignment - .spaceBetween, - children: [ - SizedBox( - child: Text( - localizations.translate( - '${e.tenantId}', - ), - ), - ), - DigitOutLineButton( - label: - localizations.translate( - i18.searchBeneficiary - .iconLabel, - ), - onPressed: () { - context - .read() - .add( - ServiceSelectionEvent( - service: e, - ), - ); - }, - buttonStyle: OutlinedButton - .styleFrom( - shape: - const RoundedRectangleBorder( - borderRadius: - BorderRadius.zero, - ), - ), - ), - ], - ), - ], - ), - ) - : const Offstage()) - .toList(), - ], - ) - : Expanded( - child: Center( - child: Padding( - padding: const EdgeInsets.all(10), - child: NoResultCard( - align: Alignment.center, - label: localizations.translate( - i18.checklist.noChecklistFound), - ), - ), - ), - ) - : BlocBuilder(builder: (context, state) { - return state.maybeWhen( - serviceDefinitionFetch: ( - item1, - item2, - ) { - return DigitCard( - child: Column( - children: [ - Container( - width: MediaQuery.of(context).size.width, - margin: const EdgeInsets.all(8), - child: Column( - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - Align( - alignment: Alignment.centerLeft, - child: Text( - localizations.translate( - item2?.code ?? '', - ), - style: - theme.textTheme.displayMedium, - ), - ), - ...(selectedService.attributes ?? []) - .where((a) => - a.value != - i18.checklist - .notSelectedKey && - a.value != '') - .map( - (e) => Padding( - padding: - const EdgeInsets.all(8), - child: Column( - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - Align( - alignment: - Alignment.centerLeft, - child: Text( - localizations.translate( - "${item2?.code ?? ''}.${e.attributeCode!}", - ), - style: theme.textTheme - .headlineSmall, - ), - ), - Container( - margin: const EdgeInsets - .only() - .copyWith( - top: kPadding, - bottom: kPadding, - ), - child: Align( - alignment: Alignment - .centerLeft, - child: Text( - e.dataType == - 'SingleValueList' - ? localizations - .translate( - 'CORE_COMMON_${e.value.toString().toUpperCase()}', - ) - : e.value ?? "", - ), - ), - ), - e.additionalDetails != '' && - e.additionalDetails != - null - ? Container( - margin: - const EdgeInsets - .only() - .copyWith( - top: kPadding, - bottom: kPadding, - ), - child: Column( - children: [ - Align( - alignment: - Alignment - .centerLeft, - child: Text( - localizations - .translate( - "${item2?.code ?? ''}.${e.attributeCode!}.ADDITIONAL_FIELD", - ), - ), - ), - Align( - alignment: - Alignment - .centerLeft, - child: Text( - localizations - .translate( - e.additionalDetails, - ), - ), - ), - ], - ), - ) - : const Offstage(), - const DigitDivider(), - ], - ), - ), - ), - ].toList(), - ), - ), - ], - ), - ); - }, - orElse: () => const Offstage(), - ); - }); - }, - ); - }), - ], - ), - ); - } -} diff --git a/apps/health_campaign_field_worker_app/lib/pages/checklist/checklist_view.dart b/apps/health_campaign_field_worker_app/lib/pages/checklist/checklist_view.dart deleted file mode 100644 index 55599817f..000000000 --- a/apps/health_campaign_field_worker_app/lib/pages/checklist/checklist_view.dart +++ /dev/null @@ -1,1104 +0,0 @@ -import 'dart:math'; - -import 'package:digit_components/digit_components.dart'; -import 'package:digit_components/utils/date_utils.dart'; -import 'package:digit_components/widgets/atoms/selection_card.dart'; -import 'package:digit_components/widgets/digit_sync_dialog.dart'; -import 'package:digit_data_model/data_model.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:group_radio_button/group_radio_button.dart'; - -import '../../models/data_model.dart'; -import '../../models/entities/roles_type.dart'; -import '../../router/app_router.dart'; -import '../../utils/i18_key_constants.dart' as i18; -import '../../utils/utils.dart'; -import '../../widgets/header/back_navigation_help_header.dart'; -import '../../widgets/localized.dart'; - -@RoutePage() -class ChecklistViewPage extends LocalizedStatefulWidget { - final String? referralClientRefId; - - const ChecklistViewPage({ - Key? key, - this.referralClientRefId, - super.appLocalizations, - }) : super(key: key); - - @override - State createState() => _ChecklistViewPageState(); -} - -class _ChecklistViewPageState extends LocalizedState { - String isStateChanged = ''; - var submitTriggered = false; - bool triggerLocalization = false; - List controller = []; - List additionalController = []; - List? initialAttributes; - ServiceDefinitionModel? selectedServiceDefinition; - bool isControllersInitialized = false; - List visibleChecklistIndexes = []; - GlobalKey checklistFormKey = GlobalKey(); - - @override - void initState() { - context.read().add( - ServiceChecklistEvent( - value: Random().nextInt(100).toString(), - submitTriggered: true, - ), - ); - super.initState(); - } - - @override - Widget build(BuildContext context) { - final theme = Theme.of(context); - - bool isHealthFacilityWorker = context.loggedInUserRoles - .where((role) => role.code == RolesType.healthFacilityWorker.toValue()) - .toList() - .isNotEmpty; - - return WillPopScope( - onWillPop: isHealthFacilityWorker && widget.referralClientRefId != null - ? () async => false - : () async => _onBackPressed(context), - child: Scaffold( - body: BlocBuilder( - builder: (context, state) { - state.mapOrNull( - serviceDefinitionFetch: (value) { - selectedServiceDefinition = value.selectedServiceDefinition; - initialAttributes = value.selectedServiceDefinition?.attributes; - if (!isControllersInitialized) { - initialAttributes?.forEach((e) { - controller.add(TextEditingController()); - if (!(isHealthFacilityWorker && - widget.referralClientRefId != null)) { - additionalController.add(TextEditingController()); - } - }); - - // Set the flag to true after initializing controllers - isControllersInitialized = true; - } - }, - ); - - return state.maybeMap( - orElse: () => Text(state.runtimeType.toString()), - serviceDefinitionFetch: (value) { - return ScrollableContent( - header: Column(children: [ - if (!(isHealthFacilityWorker && - widget.referralClientRefId != null)) - const BackNavigationHelpHeaderWidget(), - ]), - enableFixedButton: true, - footer: BlocListener( - listener: (context, state) async { - if(state.accuracy != null && triggerLocalization){ - if (!mounted) return; - triggerLocalization = false; - final router = context.router; - // close the location capturing `dialog` - DigitComponentsUtils().hideDialog(context); - - - // Wait for the location to be obtained - final locationState = - context.read().state; - double? latitude = locationState.latitude; - double? longitude = locationState.longitude; - - - final shouldSubmit = await DigitDialog.show( - context, - options: DigitDialogOptions( - titleText: localizations.translate( - i18.checklist.checklistDialogLabel, - ), - content: Text(localizations.translate( - i18.checklist.checklistDialogDescription, - )), - primaryAction: DigitDialogActions( - label: localizations.translate( - i18.checklist.checklistDialogPrimaryAction, - ), - action: (ctx) { - final referenceId = IdGen.i.identifier; - List attributes = []; - for (int i = 0; i < controller.length; i++) { - final attribute = initialAttributes; - attributes.add(ServiceAttributesModel( - auditDetails: AuditDetails( - createdBy: context.loggedInUserUuid, - createdTime: - context.millisecondsSinceEpoch(), - ), - attributeCode: '${attribute?[i].code}', - dataType: attribute?[i].dataType, - clientReferenceId: IdGen.i.identifier, - referenceId: isHealthFacilityWorker && - widget.referralClientRefId != null - ? widget.referralClientRefId - : referenceId, - value: attribute?[i].dataType != - 'SingleValueList' - ? controller[i] - .text - .toString() - .trim() - .isNotEmpty - ? controller[i].text.toString() - : '' - : visibleChecklistIndexes.contains(i) - ? controller[i].text.toString() - : i18.checklist.notSelectedKey, - rowVersion: 1, - tenantId: attribute?[i].tenantId, - additionalDetails: isHealthFacilityWorker && - widget.referralClientRefId != null - ? null - : ((attribute?[i].values?.length == 2 || - attribute?[i] - .values - ?.length == - 3) && - controller[i].text == - attribute?[i] - .values?[1] - .trim()) - ? additionalController[i] - .text - .toString() - .isEmpty - ? null - : additionalController[i] - .text - .toString() - : null, - additionalFields: - ServiceAttributesAdditionalFields( - version: 1, - fields: [ - AdditionalField( - 'latitude', - latitude, - ), - AdditionalField( - 'longitude', - longitude, - ), - ], - ), - )); - } - - context.read().add( - ServiceCreateEvent( - serviceModel: ServiceModel( - createdAt: DigitDateUtils - .getDateFromTimestamp( - DateTime.now() - .toLocal() - .millisecondsSinceEpoch, - dateFormat: Constants - .checklistViewDateFormat, - ), - tenantId: value - .selectedServiceDefinition! - .tenantId, - clientId: isHealthFacilityWorker && - widget.referralClientRefId != - null - ? widget.referralClientRefId - .toString() - : referenceId, - serviceDefId: value - .selectedServiceDefinition?.id, - attributes: attributes, - rowVersion: 1, - accountId: context.projectId, - auditDetails: AuditDetails( - createdBy: context.loggedInUserUuid, - createdTime: DateTime.now() - .millisecondsSinceEpoch, - ), - clientAuditDetails: - ClientAuditDetails( - createdBy: context.loggedInUserUuid, - createdTime: context - .millisecondsSinceEpoch(), - lastModifiedBy: - context.loggedInUserUuid, - lastModifiedTime: context - .millisecondsSinceEpoch(), - ), - additionalFields: - ServiceAdditionalFields( - version: 1, - fields: [ - AdditionalField( - 'latitude', - latitude, - ), - AdditionalField( - 'longitude', - longitude, - ), - AdditionalField( - 'localityCode', - context.boundary.code, - ), - ], - ), - additionalDetails: { - "boundaryCode": - context.boundary.code, - 'lat': latitude, - 'lng': longitude, - }, - ), - ), - ); - - Navigator.of( - context, - rootNavigator: true, - ).pop(true); - }, - ), - secondaryAction: DigitDialogActions( - label: localizations.translate( - i18.checklist.checklistDialogSecondaryAction, - ), - action: (context) { - Navigator.of( - context, - rootNavigator: true, - ).pop(false); - }, - ), - ), - ); - if (shouldSubmit ?? false) { - router.navigate(ChecklistRoute()); - - router.push(AcknowledgementRoute()); - } - } - }, - child: DigitCard( - margin: const EdgeInsets.fromLTRB(0, kPadding, 0, 0), - padding: - const EdgeInsets.fromLTRB(kPadding, 0, kPadding, 0), - child: DigitElevatedButton( - onPressed: () async { - submitTriggered = true; - - context.read().add( - const ServiceChecklistEvent( - value: '', - submitTriggered: true, - ), - ); - final isValid = - checklistFormKey.currentState?.validate(); - if (!isValid!) { - return; - } - final itemsAttributes = initialAttributes; - - for (int i = 0; i < controller.length; i++) { - if (itemsAttributes?[i].required == true && - ((itemsAttributes?[i].dataType == - 'SingleValueList' && - visibleChecklistIndexes - .any((e) => e == i) && - (controller[i].text == '')) || - (itemsAttributes?[i].dataType != - 'SingleValueList' && - (controller[i].text == '' && - !(isHealthFacilityWorker && - widget.referralClientRefId != - null))))) { - return; - } - } - - triggerLocalization = true; - - // Request location from LocationBloc - context.read().add(const LocationEvent.load()); - DigitComponentsUtils().showLocationCapturingDialog( - context, - localizations.translate(i18.common.locationCapturing), - DigitSyncDialogType.inProgress, - ); - - - }, - child: Text( - localizations.translate(i18.common.coreCommonSubmit), - ), - ), - ), - ), - children: [ - Form( - key: checklistFormKey, //assigning key to form - child: DigitCard( - child: Column(children: [ - Padding( - padding: const EdgeInsets.only(bottom: 8), - child: Text( - '${localizations.translate( - value.selectedServiceDefinition!.code - .toString(), - )} ${localizations.translate(i18.checklist.checklist)}', - style: theme.textTheme.displayMedium, - textAlign: TextAlign.left, - ), - ), - ...initialAttributes!.map(( - e, - ) { - int index = (initialAttributes ?? []).indexOf(e); - - return Column(children: [ - if (e.dataType == 'String' && - !(e.code ?? '').contains('.')) ...[ - DigitTextField( - onChange: (value) { - checklistFormKey.currentState?.validate(); - }, - isRequired: false, - controller: controller[index], - inputFormatter: [ - FilteringTextInputFormatter.allow(RegExp( - "[a-zA-Z0-9]", - )), - ], - validator: (value) { - if (((value == null || value == '') && - e.required == true)) { - return localizations - .translate("${e.code}_REQUIRED"); - } - if (e.regex != null) { - return (RegExp(e.regex!).hasMatch(value!)) - ? null - : localizations - .translate("${e.code}_REGEX"); - } - - return null; - }, - label: localizations.translate( - '${value.selectedServiceDefinition?.code}.${e.code}', - ), - ), - ] else if (e.dataType == 'Number' && - !(e.code ?? '').contains('.')) ...[ - DigitTextField( - onChange: (value) { - checklistFormKey.currentState?.validate(); - }, - textStyle: theme.textTheme.headlineMedium, - textInputType: TextInputType.number, - inputFormatter: [ - FilteringTextInputFormatter.allow(RegExp( - "[0-9]", - )), - ], - validator: (value) { - if (((value == null || value == '') && - e.required == true)) { - return localizations.translate( - i18.common.corecommonRequired, - ); - } - if (e.regex != null) { - return (RegExp(e.regex!).hasMatch(value!)) - ? null - : localizations - .translate("${e.code}_REGEX"); - } - - return null; - }, - controller: controller[index], - label: '${localizations.translate( - '${value.selectedServiceDefinition?.code}.${e.code}', - ).trim()} ${e.required == true ? '*' : ''}', - ), - ] else if (e.dataType == 'MultiValueList' && - !(e.code ?? '').contains('.')) ...[ - Align( - alignment: Alignment.topLeft, - child: Padding( - padding: const EdgeInsets.all(kPadding * 2), - child: Column( - children: [ - Text( - '${localizations.translate( - '${value.selectedServiceDefinition?.code}.${e.code}', - )} ${e.required == true ? '*' : ''}', - style: theme.textTheme.headlineSmall, - ), - ], - ), - ), - ), - BlocBuilder( - builder: (context, state) { - // Validation logic to check if required field is empty - final hasError = (e.required == true && - controller[index].text.isEmpty && - submitTriggered); - - return Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - // Checkbox options - Column( - children: e.values! - .map((item) => Padding( - padding: - const EdgeInsets.only( - left: kPadding * 2), - child: DigitCheckboxTile( - label: item, - value: controller[index] - .text - .split('.') - .contains(item), - onChanged: (value) { - context - .read() - .add( - ServiceChecklistEvent( - value: item - .toString(), - submitTriggered: - submitTriggered, - ), - ); - - // Split the controller text into a list of values - var val = controller[index].text.split('.').where((v) => v.trim().isNotEmpty).toList(); - if (val - .contains(item)) { - val.remove(item); - } else { - val.add(item); - } - - // Update the controller with the selected values - controller[index] - .value = - TextEditingController - .fromValue( - TextEditingValue( - text: val.join('.'), - ), - ).value; - - // If the field is required and no option is selected, trigger validation - if (e.required == - true && - val.isEmpty) { - submitTriggered = - true; - } - }, - ), - )) - .toList(), - ), - // Error message display if validation fails - Offstage( - offstage: !hasError, - child: Align( - alignment: Alignment.centerLeft, - child: Text( - localizations.translate( - i18.common.corecommonRequired, - ), - style: TextStyle( - color: theme.colorScheme.error, - ), - ), - ), - ), - ], - ); - }, - ), - ] else if (e.dataType == 'SingleValueList') ...[ - if (!(e.code ?? '').contains('.')) - DigitCard( - child: _buildChecklist( - e, - index, - value.selectedServiceDefinition, - context, - ), - ), - ] else if (e.dataType == 'Boolean') ...[ - if (!(e.code ?? '').contains('.')) - DigitCard( - child: Column( - children: [ - Align( - alignment: Alignment.topLeft, - child: Padding( - padding: const EdgeInsets.all(8), - child: Column( - children: [ - Text( - '${localizations.translate( - '${selectedServiceDefinition?.code}.${e.code}', - )} ${e.required == true ? '*' : ''}', - style: theme - .textTheme.headlineSmall, - ), - ], - ), - ), - ), - BlocBuilder( - builder: (context, state) { - return SelectionBox( - //label: e, - allowMultipleSelection: false, - width: 110, - valueMapper: (value) { - return value - ? localizations.translate( - i18.common - .coreCommonYes, - ) - : localizations.translate( - i18.common.coreCommonNo, - ); - }, - initialSelection: - controller[index].text == - 'true' - ? [true] - : controller[index] - .text == - 'false' - ? [false] - : [], - options: const [ - true, - false - ], // TODO: need to update - onSelectionChanged: (curValue) { - if (curValue.isNotEmpty) { - context - .read() - .add( - ServiceChecklistEvent( - value: curValue - .toString(), - submitTriggered: - submitTriggered, - ), - ); - controller[index].value = - TextEditingValue( - text: curValue.first - .toString(), - ); - } - }, - ); - }, - ), - ], - ), - ), - ], - ]); - }), - const SizedBox( - height: 15, - ), - ]), - ), - ), - ], - ); - }, - ); - }, - ), - ), - ); - } - - Widget _buildChecklist( - AttributesModel item, - int index, - ServiceDefinitionModel? selectedServiceDefinition, - BuildContext context, - ) { - bool isHealthFacilityWorker = context.loggedInUserRoles - .where((role) => role.code == RolesType.healthFacilityWorker.toValue()) - .toList() - .isNotEmpty; - final theme = Theme.of(context); - /* Check the data type of the attribute*/ - if (item.dataType == 'SingleValueList') { - final childItems = getNextQuestions( - item.code.toString(), - initialAttributes ?? [], - ); - List excludedIndexes = []; - - // Ensure the current index is added to visible indexes and not excluded - if (!visibleChecklistIndexes.contains(index) && - !excludedIndexes.contains(index)) { - visibleChecklistIndexes.add(index); - } - - // Determine excluded indexes - for (int i = 0; i < (initialAttributes ?? []).length; i++) { - if (!visibleChecklistIndexes.contains(i)) { - excludedIndexes.add(i); - } - } - - return Column( - children: [ - Align( - alignment: Alignment.topLeft, - child: Padding( - padding: const EdgeInsets.all(16.0), // Add padding here - child: Text( - '${localizations.translate( - '${selectedServiceDefinition?.code}.${item.code}', - )} ${item.required == true ? '*' : ''}', - style: theme.textTheme.headlineSmall, - ), - ), - ), - Column( - children: [ - BlocBuilder( - builder: (context, state) { - return RadioGroup.builder( - groupValue: controller[index].text.trim(), - onChanged: (value) { - context.read().add( - ServiceChecklistEvent( - value: Random().nextInt(100).toString(), - submitTriggered: submitTriggered, - ), - ); - setState(() { - // Clear child controllers and update visibility - for (final matchingChildItem in childItems) { - final childIndex = - initialAttributes?.indexOf(matchingChildItem); - if (childIndex != null) { - // controller[childIndex].clear(); - visibleChecklistIndexes - .removeWhere((v) => v == childIndex); - } - } - - // Update the current controller's value - controller[index].value = - TextEditingController.fromValue( - TextEditingValue( - text: value!, - ), - ).value; - - if (excludedIndexes.isNotEmpty) { - for (int i = 0; i < excludedIndexes.length; i++) { - // Clear excluded child controllers - if (item.dataType != 'SingleValueList') { - // controller[excludedIndexes[i]].value = - // TextEditingController.fromValue( - // const TextEditingValue( - // text: '', - // ), - // ).value; - } - } - } - - // Remove corresponding controllers based on the removed attributes - }); - }, - items: item.values != null - ? item.values! - .where((e) => e != i18.checklist.notSelectedKey) - .toList() - : [], - itemBuilder: (item) => RadioButtonBuilder( - localizations.translate( - item.trim().toUpperCase(), - ), - ), - ); - }, - ), - BlocBuilder( - builder: (context, state) { - return (controller[index].text == item.values?[1].trim() && - !(isHealthFacilityWorker && - widget.referralClientRefId != null)) - ? Padding( - padding: const EdgeInsets.only( - left: 4.0, - right: 4.0, - bottom: 16, - ), - child: DigitTextField( - maxLength: 1000, - isRequired: true, - controller: additionalController[index], - label: localizations.translate( - '${selectedServiceDefinition?.code}.${item.code}.ADDITIONAL_FIELD', - ), - validator: (value1) { - if (value1 == null || value1 == '') { - return localizations.translate( - i18.common.coreCommonReasonRequired, - ); - } - - return null; - }, - ), - ) - : const SizedBox(); - }, - ), - BlocBuilder( - builder: (context, state) { - final hasError = (item.required == true && - controller[index].text.isEmpty && - submitTriggered); - - return Offstage( - offstage: !hasError, - child: Align( - alignment: Alignment.centerLeft, - child: Text( - localizations.translate( - i18.common.corecommonRequired, - ), - style: TextStyle( - color: theme.colorScheme.error, - ), - ), - ), - ); - }, - ), - ], - ), - if (childItems.isNotEmpty && - controller[index].text.trim().isNotEmpty) ...[ - _buildNestedChecklists( - item.code.toString(), - index, - controller[index].text.trim(), - context, - ), - ], - ], - ); - } else if (item.dataType == 'String') { - return Padding( - padding: const EdgeInsets.all(8.0), - child: DigitTextField( - maxLength: 1000, - onChange: (value) { - checklistFormKey.currentState?.validate(); - }, - isRequired: item.required ?? true, - controller: controller[index], - inputFormatter: [ - FilteringTextInputFormatter.allow(RegExp( - "[a-zA-Z0-9 ]", - )), - ], - validator: (value) { - if (((value == null || value == '') && item.required == true)) { - return localizations.translate("${item.code}_REQUIRED"); - } - if (item.regex != null) { - return (RegExp(item.regex!).hasMatch(value!)) - ? null - : localizations.translate("${item.code}_REGEX"); - } - - return null; - }, - label: localizations.translate( - '${selectedServiceDefinition?.code}.${item.code}', - ), - ), - ); - } else if (item.dataType == 'Number') { - return DigitTextField( - onChange: (value) { - checklistFormKey.currentState?.validate(); - }, - textStyle: theme.textTheme.headlineMedium, - textInputType: TextInputType.number, - inputFormatter: [ - FilteringTextInputFormatter.allow(RegExp( - "[0-9]", - )), - ], - validator: (value) { - if (((value == null || value == '') && item.required == true)) { - return localizations.translate( - i18.common.corecommonRequired, - ); - } - if (item.regex != null) { - return (RegExp(item.regex!).hasMatch(value!)) - ? null - : localizations.translate("${item.code}_REGEX"); - } - - return null; - }, - controller: controller[index], - label: '${localizations.translate( - '${selectedServiceDefinition?.code}.${item.code}', - ).trim()} ${item.required == true ? '*' : ''}', - ); - } else if (item.dataType == 'MultiValueList') { - return Column( - children: [ - Align( - alignment: Alignment.topLeft, - child: Padding( - padding: const EdgeInsets.all(8), - child: Column( - children: [ - Text( - '${localizations.translate( - '${selectedServiceDefinition?.code}.${item.code}', - )} ${item.required == true ? '*' : ''}', - style: theme.textTheme.headlineSmall, - ), - ], - ), - ), - ), - BlocBuilder( - builder: (context, state) { - return Column( - children: item.values! - .map((e) => DigitCheckboxTile( - label: e, - value: controller[index].text.split('.').contains(e), - onChanged: (value) { - context.read().add( - ServiceChecklistEvent( - value: e.toString(), - submitTriggered: submitTriggered, - ), - ); - final String ele; - var val = controller[index].text.split('.'); - if (val.contains(e)) { - val.remove(e); - ele = val.join("."); - } else { - ele = "${controller[index].text}.$e"; - } - controller[index].value = - TextEditingController.fromValue( - TextEditingValue( - text: ele, - ), - ).value; - }, - )) - .toList(), - ); - }, - ), - ], - ); - } else if (item.dataType == 'Boolean') { - return Column( - children: [ - Align( - alignment: Alignment.topLeft, - child: Padding( - padding: const EdgeInsets.all(8), - child: Column( - children: [ - Text( - '${localizations.translate( - '${selectedServiceDefinition?.code}.${item.code}', - )} ${item.required == true ? '*' : ''}', - style: theme.textTheme.headlineSmall, - ), - ], - ), - ), - ), - BlocBuilder( - builder: (context, state) { - return SelectionBox( - //label: e, - allowMultipleSelection: false, - width: 110, - valueMapper: (value) { - return value ? 'Yes' : 'No'; - }, - initialSelection: const [false], - options: const [true, false], - onSelectionChanged: (valuec) { - print(submitTriggered); - print(controller[index].text.split('.').contains(e)); - context.read().add( - ServiceChecklistEvent( - value: valuec.toString(), - submitTriggered: submitTriggered, - ), - ); - final String ele; - var val = controller[index].text.split('.'); - if (val.contains(e)) { - val.remove(e); - ele = val.join("."); - } else { - ele = "${controller[index].text}.$e"; - } - controller[index].value = TextEditingController.fromValue( - TextEditingValue( - text: ele, - ), - ).value; - }, - ); - }, - ), - ], - ); - } else { - return const SizedBox.shrink(); - } - } - - // Function to build nested checklists for child attributes - Widget _buildNestedChecklists( - String parentCode, - int parentIndex, - String parentControllerValue, - BuildContext context, - ) { - // Retrieve child items for the given parent code - final childItems = getNextQuestions( - parentCode, - initialAttributes ?? [], - ); - - return Column( - children: [ - // Build cards for each matching child attribute - for (final matchingChildItem in childItems.where((childItem) => - childItem.code!.startsWith('$parentCode.$parentControllerValue.'))) - Card( - margin: const EdgeInsets.only(bottom: 8.0, left: 4.0, right: 4.0), - color: countDots(matchingChildItem.code ?? '') % 4 == 2 - ? const Color.fromRGBO(238, 238, 238, 1) - : const DigitColors().white, - child: _buildChecklist( - matchingChildItem, - initialAttributes?.indexOf(matchingChildItem) ?? parentIndex, - // Pass parentIndex here as we're building at the same level - selectedServiceDefinition, - context, - ), - ), - ], - ); - } - - // Function to get the next questions (child attributes) based on a parent code - List getNextQuestions( - String parentCode, - List checklistItems, - ) { - final childCodePrefix = '$parentCode.'; - final nextCheckLists = checklistItems.where((item) { - return item.code!.startsWith(childCodePrefix) && - item.code?.split('.').length == parentCode.split('.').length + 2; - }).toList(); - - return nextCheckLists; - } - - int countDots(String inputString) { - int dotCount = 0; - for (int i = 0; i < inputString.length; i++) { - if (inputString[i] == '.') { - dotCount++; - } - } - - return dotCount; - } - - Future _onBackPressed(BuildContext context) async { - bool? shouldNavigateBack = await showDialog( - context: context, - builder: (context) => DigitDialog( - options: DigitDialogOptions( - titleText: localizations.translate( - i18.checklist.checklistBackDialogLabel, - ), - content: Text(localizations.translate( - i18.checklist.checklistBackDialogDescription, - )), - primaryAction: DigitDialogActions( - label: localizations - .translate(i18.checklist.checklistBackDialogPrimaryAction), - action: (ctx) { - Navigator.of( - context, - rootNavigator: true, - ).pop(true); - }, - ), - secondaryAction: DigitDialogActions( - label: localizations - .translate(i18.checklist.checklistBackDialogSecondaryAction), - action: (context) { - Navigator.of( - context, - rootNavigator: true, - ).pop(false); - }, - ), - ), - ), - ); - - return shouldNavigateBack ?? false; - } -} diff --git a/apps/health_campaign_field_worker_app/lib/pages/complaints/inbox/complaints_details_view.dart b/apps/health_campaign_field_worker_app/lib/pages/complaints/inbox/complaints_details_view.dart deleted file mode 100644 index b4c644922..000000000 --- a/apps/health_campaign_field_worker_app/lib/pages/complaints/inbox/complaints_details_view.dart +++ /dev/null @@ -1,274 +0,0 @@ -import 'package:digit_components/digit_components.dart'; -import 'package:digit_components/widgets/atoms/digit_divider.dart'; -import 'package:flutter/material.dart'; -import 'package:recase/recase.dart'; -import 'package:digit_data_model/data_model.dart'; - -import '../../../blocs/localization/app_localization.dart'; -import '../../../router/app_router.dart'; -import '../../../utils/i18_key_constants.dart' as i18; -import '../../../utils/utils.dart'; -import '../../../widgets/header/back_navigation_help_header.dart'; - -@RoutePage() -class ComplaintsDetailsViewPage extends StatelessWidget { - final PgrServiceModel complaint; - - const ComplaintsDetailsViewPage({ - Key? key, - required this.complaint, - }) : super(key: key); - - @override - Widget build(BuildContext context) { - final router = context.router; - final theme = Theme.of(context); - final localizations = AppLocalizations.of(context); - - return Scaffold( - body: ScrollableContent( - enableFixedButton: true, - header: Column( - children: [ - const BackNavigationHelpHeaderWidget(), - Align( - alignment: Alignment.centerLeft, - child: Padding( - padding: const EdgeInsets.only(left: 8.0, top: 20.0), - child: Text( - localizations - .translate(i18.complaints.complaintsDetailsLabel), - style: theme.textTheme.displayMedium, - ), - ), - ), - ], - ), - footer: SizedBox( - child: DigitCard( - margin: const EdgeInsets.fromLTRB(0, kPadding, 0, 0), - padding: const EdgeInsets.fromLTRB(kPadding, 0, kPadding, 0), - child: DigitElevatedButton( - onPressed: () { - router.pop(); - }, - child: Center( - child: Text( - localizations.translate(i18.common.corecommonclose), - ), - ), - ), - ), - ), - children: [ - DigitCard( - child: Column( - children: [ - Padding( - padding: const EdgeInsets.only(top: 16, bottom: 16), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - Expanded( - flex: 3, - child: Text( - localizations - .translate(i18.complaints.inboxNumberLabel), - style: theme.textTheme.headlineSmall, - ), - ), - Expanded( - flex: 2, - child: Text( - complaint.serviceRequestId ?? - "${localizations.translate(i18.complaints.inboxNotGeneratedLabel)}\n${localizations.translate(i18.complaints.inboxSyncRequiredLabel)}", - style: TextStyle( - color: complaint.serviceRequestId != null - ? theme.colorScheme.secondary - : const DigitColors().woodsmokeBlack, - ), - ), - ), - ], - ), - ), - const DigitDivider(), - Padding( - padding: const EdgeInsets.only(top: 16, bottom: 16), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - Expanded( - flex: 3, - child: Text( - localizations - .translate(i18.complaints.inboxTypeLabel), - style: theme.textTheme.headlineSmall, - ), - ), - Expanded( - flex: 2, - child: Text( - localizations.translate( - complaint.serviceCode.snakeCase - .toUpperCase() - .trim(), - ), - ), - ), - ], - ), - ), - const DigitDivider(), - Padding( - padding: const EdgeInsets.only(top: 16, bottom: 16), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - Expanded( - flex: 3, - child: Text( - localizations - .translate(i18.complaints.inboxDateLabel), - style: theme.textTheme.headlineSmall, - ), - ), - Expanded( - flex: 2, - child: Text( - complaint.auditDetails?.createdTime.toDateTime - .getFormattedDate() ?? - "", - ), - ), - ], - ), - ), - const DigitDivider(), - Padding( - padding: const EdgeInsets.only(top: 16, bottom: 16), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - Expanded( - flex: 3, - child: Text( - localizations - .translate(i18.complaints.complainantName), - style: theme.textTheme.headlineSmall, - ), - ), - Expanded( - flex: 2, - child: Text( - complaint.user.name ?? "", - ), - ), - ], - ), - ), - const DigitDivider(), - Padding( - padding: const EdgeInsets.only(top: 16, bottom: 16), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - Expanded( - flex: 3, - child: Text( - localizations - .translate(i18.complaints.inboxAreaLabel), - style: theme.textTheme.headlineSmall, - ), - ), - Expanded( - flex: 2, - child: Text( - complaint.address.locality?.name ?? "", - ), - ), - ], - ), - ), - const DigitDivider(), - Padding( - padding: const EdgeInsets.only(top: 16, bottom: 16), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - Expanded( - flex: 3, - child: Text( - localizations.translate( - i18.complaints.complainantContactNumber, - ), - style: theme.textTheme.headlineSmall, - ), - ), - Expanded( - flex: 2, - child: Text( - complaint.user.mobileNumber ?? "", - ), - ), - ], - ), - ), - const DigitDivider(), - Padding( - padding: const EdgeInsets.only(top: 16, bottom: 16), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - Expanded( - flex: 3, - child: Text( - localizations - .translate(i18.complaints.inboxStatusLabel), - style: theme.textTheme.headlineSmall, - ), - ), - Expanded( - flex: 2, - child: Text( - localizations.translate( - "COMPLAINTS_STATUS_${complaint.applicationStatus.name.snakeCase.toUpperCase()}", - ), - ), - ), - ], - ), - ), - const DigitDivider(), - Padding( - padding: const EdgeInsets.only(top: 16, bottom: 16), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - Expanded( - flex: 3, - child: Text( - localizations - .translate(i18.complaints.complaintDescription), - style: theme.textTheme.headlineSmall, - ), - ), - Expanded( - flex: 2, - child: Text( - localizations.translate( - complaint.description, - ), - ), - ), - ], - ), - ), - ], - ), - ), - ], - ), - ); - } -} diff --git a/apps/health_campaign_field_worker_app/lib/pages/complaints/inbox/complaints_inbox.dart b/apps/health_campaign_field_worker_app/lib/pages/complaints/inbox/complaints_inbox.dart deleted file mode 100644 index ce0b8f0b6..000000000 --- a/apps/health_campaign_field_worker_app/lib/pages/complaints/inbox/complaints_inbox.dart +++ /dev/null @@ -1,370 +0,0 @@ -import 'package:digit_components/digit_components.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:digit_data_model/data_model.dart'; -import 'package:recase/recase.dart'; - -import '../../../blocs/complaints_inbox/complaints_inbox.dart'; -import '../../../blocs/localization/app_localization.dart'; -import '../../../router/app_router.dart'; -import '../../../utils/i18_key_constants.dart' as i18; -import '../../../utils/utils.dart'; -import '../../../widgets/header/back_navigation_help_header.dart'; -import '../../../widgets/localized.dart'; -import '../../../widgets/no_result_card/no_result_card.dart'; - -@RoutePage() -class ComplaintsInboxPage extends LocalizedStatefulWidget { - const ComplaintsInboxPage({ - super.key, - super.appLocalizations, - }); - - @override - State createState() => _ComplaintsInboxPageState(); -} - -class _ComplaintsInboxPageState extends LocalizedState { - @override - Widget build(BuildContext context) { - final theme = Theme.of(context); - final router = context.router; - - return Scaffold( - body: BlocBuilder( - builder: (context, state) { - final inboxItems = - state.isFiltered ? state.filteredComplaints : state.complaints; - - // TODO(ajil): Fix this scrollable component - return Column( - children: [ - Expanded( - child: ScrollableContent( - header: const Column( - children: [ - BackNavigationHelpHeaderWidget(), - ], - ), - slivers: [ - SliverToBoxAdapter( - child: Padding( - padding: const EdgeInsets.only( - left: kPadding*2, - bottom: kPadding, - ), - child: Text( - localizations.translate( - i18.complaints.inboxHeading, - ), - style: theme.textTheme.displayMedium, - ), - ), - ), - ...[ - SliverToBoxAdapter( - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - TextButton( - style: TextButton.styleFrom( - foregroundColor: theme.colorScheme.secondary, - padding: const EdgeInsets.only(left: kPadding*2), - ), - onPressed: () { - router.push(ComplaintsInboxSearchRoute()); - }, - child: Row( - children: [ - const Icon(Icons.search), - const SizedBox(width: 5,), - Text(localizations.translate( - i18.complaints.searchCTA, - )), - ], - ), - ), - TextButton( - style: TextButton.styleFrom( - foregroundColor: theme.colorScheme.secondary, - padding: EdgeInsets.zero, - ), - onPressed: () { - router.push(ComplaintsInboxFilterRoute()); - }, - child: Row( - children: [ - const Icon(Icons.filter_list_alt), - const SizedBox(width: 5,), - Text(localizations.translate( - i18.complaints.filterCTA, - )), - ], - ), - ), - TextButton( - style: TextButton.styleFrom( - foregroundColor: theme.colorScheme.secondary, - padding: const EdgeInsets.only(right: kPadding*2), - ), - onPressed: () { - router.push(ComplaintsInboxSortRoute()); - }, - child: Row( - children: [ - const Icon(Icons.segment), - const SizedBox(width: 5,), - Text(localizations.translate( - i18.complaints.sortCTA, - )), - ], - ), - ), - ], - ), - ), - SliverList( - delegate: SliverChildBuilderDelegate( - (context, index) { - final item = inboxItems.elementAt(index); - - return _ComplaintsInboxItem( - item: item, - localizations: localizations, - ); - }, - childCount: inboxItems.length, - ), - ), - ], - ], - children: [ - if (inboxItems.isEmpty) - Expanded( - child: Center( - child: Padding( - padding: const EdgeInsets.all(10), - child: NoResultCard( - align: Alignment.center, - label: localizations - .translate(i18.complaints.noComplaintsExist), - ), - ), - ), - ), - ], - ), - ), - SizedBox( - child: DigitCard( - margin: const EdgeInsets.fromLTRB(0, kPadding, 0, 0), - padding: const EdgeInsets.fromLTRB(kPadding, 0, kPadding, 0), - child: DigitElevatedButton( - onPressed: () async { - var loggedInUserUuid = context.loggedInUserUuid; - final bloc = context.read(); - - await router.push( - ComplaintsRegistrationWrapperRoute(), - ); - - try { - bloc.add( - ComplaintInboxLoadComplaintsEvent( - createdByUserId: loggedInUserUuid, - ), - ); - } catch (error) { - AppLogger.instance.error( - title: 'Error', - message: 'Error while loading complaints', - ); - } - }, - child: Center( - child: Text( - localizations.translate( - i18.complaints.fileComplaintAction, - ), - ), - ), - ), - ), - ), - ], - ); - }, - ), - ); - } -} - -class _ComplaintsInboxItem extends StatelessWidget { - final AppLocalizations localizations; - final PgrServiceModel item; - - const _ComplaintsInboxItem({ - Key? key, - required this.localizations, - required this.item, - }) : super(key: key); - - @override - Widget build(BuildContext context) { - final theme = Theme.of(context); - - return DigitCard( - child: Column( - children: [ - Padding( - padding: const EdgeInsets.only(top: kPadding, bottom: kPadding), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - Expanded( - flex: 2, - child: Text( - localizations.translate(i18.complaints.inboxNumberLabel), - style: theme.textTheme.headlineSmall, - ), - ), - Expanded( - flex: 3, - child: Text( - item.serviceRequestId ?? - "${localizations.translate(i18.complaints.inboxNotGeneratedLabel)}\n${localizations.translate(i18.complaints.inboxSyncRequiredLabel)}", - style: TextStyle( - color: item.serviceRequestId != null - ? theme.colorScheme.secondary - : const DigitColors().woodsmokeBlack, - ), - ), - ), - ], - ), - ), - Padding( - padding: const EdgeInsets.only(top: kPadding, bottom: kPadding), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - Expanded( - flex: 2, - child: Text( - localizations.translate(i18.complaints.inboxTypeLabel), - style: theme.textTheme.headlineSmall, - ), - ), - Expanded( - flex: 3, - child: Text( - localizations.translate( - item.serviceCode.snakeCase.toUpperCase().trim(), - ), - ), - ), - ], - ), - ), - Padding( - padding: const EdgeInsets.only(top: kPadding, bottom: kPadding), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - Expanded( - flex: 2, - child: Text( - localizations.translate(i18.complaints.inboxDateLabel), - style: theme.textTheme.headlineSmall, - ), - ), - Expanded( - flex: 3, - child: Text( - item.auditDetails?.createdTime.toDateTime - .getFormattedDate() ?? - "", - ), - ), - ], - ), - ), - Padding( - padding: const EdgeInsets.only(top: kPadding, bottom: kPadding), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - Expanded( - flex: 2, - child: Text( - localizations.translate(i18.complaints.inboxAreaLabel), - style: theme.textTheme.headlineSmall, - ), - ), - Expanded( - flex: 3, - child: Text( - item.address.locality?.name ?? "", - ), - ), - ], - ), - ), - Padding( - padding: const EdgeInsets.only(top: kPadding, bottom: 8), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - Expanded( - flex: 2, - child: Text( - localizations.translate(i18.complaints.inboxStatusLabel), - style: theme.textTheme.headlineSmall, - ), - ), - Expanded( - flex: 3, - child: Text( - localizations.translate( - "COMPLAINTS_STATUS_${item.applicationStatus.name.snakeCase.toUpperCase()}", - ), - ), - ), - ], - ), - ), - Padding( - padding: const EdgeInsets.only(top: kPadding*2), - child: Row( - children: [ - Expanded( - flex: 1, - child: OutlinedButton( - onPressed: () { - context.router.push(ComplaintsDetailsViewRoute( - complaint: item, - )); - }, - style: OutlinedButton.styleFrom( - side: BorderSide( - width: 1.0, - color: theme.colorScheme.secondary, - ), - shape: const RoundedRectangleBorder( - borderRadius: BorderRadius.zero, - ), - ), - child: Text( - localizations.translate(i18.searchBeneficiary.iconLabel), - style: DigitTheme.instance.mobileTheme.textTheme.headlineSmall?.apply(color: theme.colorScheme.secondary,), - ), - ), - ), - ], - ), - ), - ], - ), - ); - } -} diff --git a/apps/health_campaign_field_worker_app/lib/pages/complaints/inbox/complaints_inbox_filter.dart b/apps/health_campaign_field_worker_app/lib/pages/complaints/inbox/complaints_inbox_filter.dart deleted file mode 100644 index 5f27d8a07..000000000 --- a/apps/health_campaign_field_worker_app/lib/pages/complaints/inbox/complaints_inbox_filter.dart +++ /dev/null @@ -1,403 +0,0 @@ -import 'dart:collection'; - -import 'package:digit_components/digit_components.dart'; -import 'package:digit_components/widgets/atoms/digit_checkbox.dart'; -import 'package:digit_data_model/data_model.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:group_radio_button/group_radio_button.dart'; -import 'package:reactive_forms/reactive_forms.dart'; -import 'package:recase/recase.dart'; - -import '../../../blocs/auth/auth.dart'; -import '../../../blocs/complaints_inbox/complaints_inbox.dart'; -import '../../../router/app_router.dart'; -import '../../../utils/i18_key_constants.dart' as i18; -import '../../../utils/utils.dart'; -import '../../../widgets/localized.dart'; - -@RoutePage() -class ComplaintsInboxFilterPage extends LocalizedStatefulWidget { - const ComplaintsInboxFilterPage({ - super.key, - super.appLocalizations, - }); - - @override - State createState() => - _ComplaintsInboxFilterPageState(); -} - -class _ComplaintsInboxFilterPageState - extends LocalizedState { - static const _complaintType = "complaintType"; - static const _complaintLocality = "complaintLocality"; - static const _complaintAssignmentType = "complaintAssignmentType"; - static const _complaintStatus = "complaintStatus"; - static final _complaintAssignmentTypes = [ - i18.complaints.assignedToAll, - i18.complaints.assignedToSelf, - ]; - Map selected = { - PgrServiceApplicationStatus.created: false, - PgrServiceApplicationStatus.cancelled: false, - PgrServiceApplicationStatus.pendingAssignment: false, - PgrServiceApplicationStatus.rejected: false, - PgrServiceApplicationStatus.resolved: false, - }; - bool isFirstBuild = true; - Set statuses = HashSet(); - - @override - Widget build(BuildContext context) { - final theme = Theme.of(context); - - return Scaffold( - backgroundColor: theme.colorScheme.onPrimary, - body: BlocBuilder( - builder: (context, state) { - return ReactiveFormBuilder( - form: () => buildForm(state), - builder: (context, formGroup, child) { - List selectedStatuses = - state.filters?.complaintStatus?.toList() ?? []; - - if (isFirstBuild) { - for (var element in selectedStatuses) { - selected[element] = true; - statuses.add(element); - } - isFirstBuild = false; - } - - return ScrollableContent( - header: Column( - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - TextButton( - style: TextButton.styleFrom( - foregroundColor: theme.colorScheme.onBackground, - padding: EdgeInsets.zero, - ), - onPressed: () => context.router.maybePop(), - child: const Row( - children: [ - Icon(Icons.close), - ], - ), - ), - ], - ), - Padding( - padding: const EdgeInsets.only(left: 16), - child: Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - const Icon( - Icons.filter_alt, - size: 32, - ), - Text( - localizations.translate( - i18.complaints.complaintInboxFilterHeading, - ), - style: theme.textTheme.displayMedium, - ), - Padding( - padding: const EdgeInsets.only(left: 5), - child: TextButton( - onPressed: () { - clearFilters(formGroup); - }, - style: TextButton.styleFrom( - foregroundColor: theme.colorScheme.onBackground, - padding: const EdgeInsets.all(9), - side: BorderSide( - width: 1, - color: theme.colorScheme.outline, - ), - ), - child: const Column( - children: [ - Icon(Icons.autorenew), - ], - ), - ), - ), - ], - ), - ), - ], - ), - footer: SizedBox( - child: DigitCard( - margin: const EdgeInsets.fromLTRB(0, kPadding, 0, 0), - padding: - const EdgeInsets.fromLTRB(kPadding, 0, kPadding, 0), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Expanded( - flex: 1, - child: DigitOutLineButton( - label: localizations.translate( - i18.complaints.complaintsFilterClearAll, - ), - onPressed: () { - clearFilters(formGroup); - }, - buttonStyle: OutlinedButton.styleFrom( - shape: const BeveledRectangleBorder(), - padding: const EdgeInsets.all(14), - side: BorderSide( - width: 1.0, - color: theme.colorScheme.secondary, - ), - ), - ), - ), - const SizedBox(width: 10), - Expanded( - flex: 1, - child: DigitElevatedButton( - onPressed: () { - if (!formGroup.valid) return; - - final bloc = context.read(); - final userBloc = context.read(); - - final assignedTo = formGroup - .control(_complaintAssignmentType) - .value as String?; - - final complaintType = formGroup - .control(_complaintType) - .value as String?; - - final locality = formGroup - .control(_complaintLocality) - .value as String?; - - bloc.add( - ComplaintInboxFilterComplaintsEvent( - complaintAssignedTo: assignedTo, - currentUserName: userBloc.state.whenOrNull( - authenticated: ( - accessToken, - refreshToken, - userModel, - actions, - individualId, - ) { - return userModel.name; - }, - ), - complaintTypeCode: complaintType, - locality: locality, - complaintStatus: statuses.toList(), - createdByUserId: context.loggedInUserUuid, - ), - ); - - context.router.pop(); - }, - child: Center( - child: Text( - localizations - .translate(i18.complaints.filterCTA), - ), - ), - ), - ), - ], - ), - ), - ), - children: [ - Padding( - padding: const EdgeInsets.all(16), - child: Column( - children: [ - BlocBuilder( - builder: (context, state) { - Set complaintTypes = HashSet(); - Set locality = HashSet(); - - Set uniqueStatuses = - HashSet(); - Map statusCount = HashMap(); - - state.maybeWhen( - orElse: () { - return; - }, - complaints: ( - loading, - isFiltered, - complaints, - filteredComplaints, - filters, - searchKeys, - ) { - for (var e in complaints) { - complaintTypes.add(e.serviceCode.toString()); - - if (e.address.locality?.name != null) { - locality.add( - e.address.locality?.name ?? "", - ); - } - - var status = e.applicationStatus; - uniqueStatuses.add(status); - if (statusCount.containsKey(status.index)) { - int count = statusCount[status.index] ?? 0; - statusCount[status.index] = count + 1; - } else { - statusCount[status.index] = 1; - } - } - }, - ); - - return Column( - children: [ - BlocBuilder( - builder: (context, state) { - return RadioGroup.builder( - groupValue: formGroup - .control(_complaintAssignmentType) - .value ?? - "", - onChanged: (changedValue) { - setState(() { - formGroup - .control(_complaintAssignmentType) - .value = changedValue; - }); - }, - items: _complaintAssignmentTypes, - itemBuilder: (item) => RadioButtonBuilder( - localizations.translate(item.trim()), - ), - ); - }, - ), - DigitReactiveSearchDropdown( - label: localizations.translate( - i18.complaints.complaintsTypeHeading, - ), - form: formGroup, - menuItems: complaintTypes.toList(), - formControlName: _complaintType, - valueMapper: (value) { - return localizations.translate( - value - .toString() - .trim() - .snakeCase - .toUpperCase(), - ); - }, - emptyText: localizations - .translate(i18.common.noMatchFound), - ), - DigitReactiveSearchDropdown( - label: localizations - .translate(i18.complaints.locality), - form: formGroup, - menuItems: locality.toList(), - formControlName: _complaintLocality, - valueMapper: (value) => localizations - .translate(value.toString().trim()), - emptyText: localizations - .translate(i18.common.noMatchFound), - ), - if (uniqueStatuses.isNotEmpty) ...[ - LabeledField( - label: localizations.translate( - i18.complaints.inboxStatusLabel, - ), - child: Column( - children: [ - ...uniqueStatuses.map((e) => Padding( - padding: const EdgeInsets.only( - top: 16, - ), - child: DigitCheckbox( - label: - '${localizations.translate('COMPLAINTS_STATUS_${e.name.snakeCase.toUpperCase()}')} (${statusCount[e.index]})', - value: selected[e] ?? false, - onChanged: (value) { - setState(() { - if (selected[e]!) { - statuses.remove(e); - selected[e] = false; - - return; - } - - selected[e] = true; - statuses.add(e); - }); - }, - ), - )), - ], - ), - ), - ], - ], - ); - }, - ), - ], - ), - ), - ], - ); - }, - ); - }, - ), - ); - } - - void clearFilters(FormGroup formGroup) { - setState(() { - selected.forEach((key, value) { - selected[key] = false; - }); - statuses.clear(); - formGroup.control(_complaintType).value = null; - formGroup.control(_complaintAssignmentType).value = null; - formGroup.control(_complaintStatus).value = null; - formGroup.control(_complaintLocality).value = null; - }); - } - - FormGroup buildForm(ComplaintInboxState state) { - return fb.group({ - _complaintType: FormControl( - value: state.filters?.complaintTypeCode, - validators: [], - ), - _complaintLocality: FormControl( - value: state.filters?.locality, - validators: [], - ), - _complaintAssignmentType: FormControl( - value: state.filters?.complaintAssignedTo, - validators: [], - ), - _complaintStatus: FormControl( - validators: [], - ), - }); - } -} diff --git a/apps/health_campaign_field_worker_app/lib/pages/complaints/inbox/complaints_inbox_search.dart b/apps/health_campaign_field_worker_app/lib/pages/complaints/inbox/complaints_inbox_search.dart deleted file mode 100644 index bb6d3dcfe..000000000 --- a/apps/health_campaign_field_worker_app/lib/pages/complaints/inbox/complaints_inbox_search.dart +++ /dev/null @@ -1,188 +0,0 @@ -import 'package:digit_components/digit_components.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:reactive_forms/reactive_forms.dart'; - -import '../../../blocs/complaints_inbox/complaints_inbox.dart'; -import '../../../router/app_router.dart'; -import '../../../utils/i18_key_constants.dart' as i18; -import '../../../utils/utils.dart'; -import '../../../widgets/localized.dart'; -import 'package:flutter/services.dart'; - -@RoutePage() -class ComplaintsInboxSearchPage extends LocalizedStatefulWidget { - const ComplaintsInboxSearchPage({ - super.key, - super.appLocalizations, - }); - - @override - State createState() => - _ComplaintsInboxSearchPageState(); -} - -class _ComplaintsInboxSearchPageState - extends LocalizedState { - static const _complaintNumber = "complaintNumber"; - static const _mobileNumber = "mobileNumber"; - - @override - Widget build(BuildContext context) { - final theme = Theme.of(context); - final bloc = context.read(); - - return Scaffold( - backgroundColor: theme.colorScheme.onPrimary, - body: BlocBuilder( - builder: (context, state) { - return ReactiveFormBuilder( - form: () => buildForm(state), - builder: (context, formGroup, child) { - return ScrollableContent( - header: Column( - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - TextButton( - style: TextButton.styleFrom( - foregroundColor: theme.colorScheme.onBackground, - padding: EdgeInsets.zero, - ), - onPressed: () => context.router.pop(), - child: const Row( - children: [ - Icon(Icons.close), - ], - ), - ), - ], - ), - Padding( - padding: const EdgeInsets.only(left: 20), - child: Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Text( - localizations.translate( - i18.complaints.complaintInboxSearchHeading, - ), - style: theme.textTheme.displayMedium, - ), - ], - ), - ), - ], - ), - footer: SizedBox( - child: DigitCard( - margin: const EdgeInsets.fromLTRB(0, kPadding, 0, 0), - padding: - const EdgeInsets.fromLTRB(kPadding, 0, kPadding, 0), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Expanded( - flex: 1, - child: DigitElevatedButton( - onPressed: () { - formGroup.markAllAsTouched(); - - if (!formGroup.valid) return; - - final complaintNumberValue = - formGroup.control(_complaintNumber).value; - final mobileNumberValue = - formGroup.control(_mobileNumber).value; - - bloc.add( - ComplaintInboxSearchComplaintsEvent( - mobileNumber: mobileNumberValue == "" - ? null - : mobileNumberValue, - complaintNumber: complaintNumberValue == "" - ? null - : complaintNumberValue, - createdByUserId: context.loggedInUserUuid, - ), - ); - - context.router.pop(); - }, - child: Center( - child: Text( - localizations - .translate(i18.complaints.searchCTA), - ), - ), - ), - ), - ], - ), - ), - ), - children: [ - Column( - children: [ - BlocBuilder( - builder: (context, state) { - return Padding( - padding: const EdgeInsets.all(kPadding * 2), - child: Column( - children: [ - DigitTextFormField( - formControlName: _complaintNumber, - label: localizations.translate( - i18.complaints.inboxNumberLabel, - ), - maxLength: 65, - ), - DigitTextFormField( - formControlName: _mobileNumber, - label: localizations.translate( - i18.common.coreCommonMobileNumber, - ), - maxLength: 10, - keyboardType: TextInputType.number, - inputFormatters: [ - FilteringTextInputFormatter.digitsOnly, - ], - validationMessages: { - 'mobileNumber': (object) => - localizations.translate(i18 - .individualDetails - .mobileNumberInvalidFormatValidationMessage), - }, - ), - ], - ), - ); - }, - ), - ], - ), - ], - ); - }, - ); - }, - ), - ); - } - - FormGroup buildForm(ComplaintInboxState state) { - return fb.group({ - _complaintNumber: FormControl( - validators: [], - value: state.searchKeys?.complaintNumber, - ), - _mobileNumber: FormControl( - validators: [CustomValidator.validMobileNumber], - value: state.searchKeys?.complainantMobileNumber, - ), - }); - } -} diff --git a/apps/health_campaign_field_worker_app/lib/pages/complaints/inbox/complaints_inbox_sort.dart b/apps/health_campaign_field_worker_app/lib/pages/complaints/inbox/complaints_inbox_sort.dart deleted file mode 100644 index 34f35713d..000000000 --- a/apps/health_campaign_field_worker_app/lib/pages/complaints/inbox/complaints_inbox_sort.dart +++ /dev/null @@ -1,174 +0,0 @@ -import 'package:digit_components/digit_components.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:group_radio_button/group_radio_button.dart'; -import 'package:reactive_forms/reactive_forms.dart'; - -import '../../../blocs/complaints_inbox/complaints_inbox.dart'; -import '../../../router/app_router.dart'; -import '../../../utils/i18_key_constants.dart' as i18; -import '../../../widgets/localized.dart'; - -@RoutePage() -class ComplaintsInboxSortPage extends LocalizedStatefulWidget { - const ComplaintsInboxSortPage({ - super.key, - super.appLocalizations, - }); - - @override - State createState() => - _ComplaintsInboxSortPageState(); -} - -class _ComplaintsInboxSortPageState - extends LocalizedState { - static const _sortOrder = "sortOrder"; - static var sortOrders = [ - i18.complaints.complaintsSortDateDesc, - i18.complaints.complaintsSortDateAsc, - ]; - - @override - Widget build(BuildContext context) { - final theme = Theme.of(context); - final bloc = context.read(); - final router = context.router; - - return Scaffold( - backgroundColor: theme.colorScheme.onPrimary, - body: BlocBuilder( - builder: (context, state) { - return ReactiveFormBuilder( - form: () => buildForm(state), - builder: (context, formGroup, child) { - return BlocBuilder( - builder: (context, state) { - return ScrollableContent( - header: Column( - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - TextButton( - style: TextButton.styleFrom( - foregroundColor: theme.colorScheme.onBackground, - padding: EdgeInsets.zero, - ), - onPressed: () => context.router.pop(), - child: const Row( - children: [ - Icon(Icons.close), - ], - ), - ), - ], - ), - Padding( - padding: const EdgeInsets.only(left: 20), - child: Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Text( - localizations.translate( - i18.complaints.complaintInboxSortHeading, - ), - style: theme.textTheme.displayMedium, - ), - ], - ), - ), - ], - ), - footer: SizedBox( - child: DigitCard( - margin: const EdgeInsets.fromLTRB(0, kPadding, 0, 0), - padding: const EdgeInsets.fromLTRB(kPadding, 0, kPadding, 0), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Expanded( - flex: 1, - child: DigitElevatedButton( - onPressed: () { - formGroup.markAllAsTouched(); - - var sortOrder = - formGroup.control(_sortOrder).value; - - if (!formGroup.valid || sortOrder == null) { - return; - } - - bloc.add( - ComplaintInboxSortComplaintsEvent( - sortOrder, - ), - ); - router.pop(); - }, - child: Center( - child: Text( - localizations - .translate(i18.complaints.sortCTA), - ), - ), - ), - ), - ], - ), - ), - ), - children: [ - Column( - children: [ - Column( - children: [ - BlocBuilder( - builder: (context, state) { - // TODO(neel): Use Reactive components if possible - - return RadioGroup.builder( - groupValue: - formGroup.control(_sortOrder).value ?? - "", - onChanged: (changedValue) { - setState(() { - formGroup.control(_sortOrder).value = - changedValue; - }); - }, - items: sortOrders, - itemBuilder: (item) => RadioButtonBuilder( - localizations.translate(item.trim()), - ), - ); - }, - ), - ], - ), - ], - ), - ], - ); - }, - ); - }, - ); - }, - ), - ); - } - - FormGroup buildForm(ComplaintInboxState state) { - return fb.group({ - _sortOrder: FormControl( - validators: [], - value: "", - ), - }); - } -} diff --git a/apps/health_campaign_field_worker_app/lib/pages/complaints/registration/complaint_type.dart b/apps/health_campaign_field_worker_app/lib/pages/complaints/registration/complaint_type.dart deleted file mode 100644 index d1f30f77c..000000000 --- a/apps/health_campaign_field_worker_app/lib/pages/complaints/registration/complaint_type.dart +++ /dev/null @@ -1,235 +0,0 @@ -import 'package:digit_components/digit_components.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:group_radio_button/group_radio_button.dart'; -import 'package:reactive_forms/reactive_forms.dart'; -import 'package:recase/recase.dart'; - -import '../../../blocs/app_initialization/app_initialization.dart'; -import '../../../blocs/complaints_registration/complaints_registration.dart'; -import '../../../router/app_router.dart'; -import '../../../utils/i18_key_constants.dart' as i18; -import '../../../widgets/header/back_navigation_help_header.dart'; -import '../../../widgets/localized.dart'; - -@RoutePage() -class ComplaintTypePage extends LocalizedStatefulWidget { - const ComplaintTypePage({ - super.key, - super.appLocalizations, - }); - - @override - State createState() => _ComplaintTypePageState(); -} - -class _ComplaintTypePageState extends LocalizedState { - static const _complaintType = 'complaintType'; - static const _otherComplaintType = 'otherComplaintType'; - - @override - Widget build(BuildContext context) { - final bloc = context.read(); - final router = context.router; - final theme = Theme.of(context); - - return Scaffold( - body: ReactiveFormBuilder( - form: () { - return bloc.state.map( - create: (value) => buildForm(value), - persisted: (value) { - throw const InvalidComplaintsRegistrationStateException(); - }, - view: (value) => buildForm(value), - ); - }, - builder: (context, form, child) => BlocBuilder< - ComplaintsRegistrationBloc, ComplaintsRegistrationState>( - builder: (context, state) { - return ScrollableContent( - header: const Column(children: [ - BackNavigationHelpHeaderWidget(), - ]), - footer: DigitCard( - margin: const EdgeInsets.fromLTRB(0, kPadding, 0, 0), - padding: const EdgeInsets.fromLTRB(kPadding, 0, kPadding, 0), - child: DigitElevatedButton( - onPressed: () async { - var complaintType = form.control(_complaintType).value; - var otherComplaintTypeValue = - form.control(_otherComplaintType).value; - - if (complaintType == "Other") { - form.control(_otherComplaintType).setValidators( - [Validators.required], - autoValidate: true, - ); - } else { - form.control(_otherComplaintType).setValidators( - [], - autoValidate: true, - ); - } - - setState(() { - form.markAllAsTouched(); - }); - - if (!form.valid) return; - - state.whenOrNull( - create: ( - loading, - complaintType, - _, - addressModel, - complaintsDetailsModel, - ) { - bloc.add( - ComplaintsRegistrationEvent.saveComplaintType( - complaintType: form.control(_complaintType).value, - otherComplaintDescription: otherComplaintTypeValue, - ), - ); - }, - ); - - router.push(ComplaintsLocationRoute()); - }, - child: Center( - child: Text( - localizations.translate(i18.complaints.actionLabel), - ), - ), - ), - ), - children: [ - DigitCard( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - Padding( - padding: const EdgeInsets.only(bottom: kPadding), - child: Text( - localizations.translate( - i18.complaints.complaintsTypeHeading, - ), - style: theme.textTheme.displayMedium, - ), - ), - LabeledField( - label: localizations.translate( - i18.complaints.complaintsTypeLabel, - ), - child: BlocBuilder( - builder: (context, state) { - return state.maybeWhen( - orElse: () => const Offstage(), - initialized: ( - appConfiguration, - serviceRegistryList, - _, - ) { - var complaintTypes = appConfiguration - .complaintTypes - ?.map((e) => e.code) - .toList(); - - final isDisabled = - form.control(_complaintType).disabled; - - return RadioGroup.builder( - groupValue: - form.control(_complaintType).value ?? "", - onChanged: (changedValue) { - if (isDisabled) return; - - setState(() { - form.control(_complaintType).value = - changedValue; - }); - }, - textStyle: TextStyle( - color: isDisabled - ? theme.colorScheme.shadow - : theme.colorScheme.onBackground, - ), - items: complaintTypes ?? [], - itemBuilder: (item) => RadioButtonBuilder( - localizations.translate( - item.snakeCase.toUpperCase().trim(), - ), - ), - ); - }, - ); - }, - ), - ), - if (form.control(_complaintType).value == "Other") ...[ - DigitTextFormField( - formControlName: _otherComplaintType, - label: "", - maxLength: 100, - validationMessages: { - 'required': (object) => localizations.translate( - i18.complaints.validationRequiredError, - ), - }, - ), - ], - if (form.touched && - form.control(_complaintType).invalid) ...[ - Align( - alignment: Alignment.topLeft, - child: Padding( - padding: const EdgeInsets.only( - top: 5, - bottom: 5, - ), - child: Text( - localizations.translate( - i18.complaints.validationRadioRequiredError, - ), - style: TextStyle( - color: DigitTheme.instance.colors.lavaRed, - ), - ), - ), - ), - ], - const SizedBox(height: 16), - ], - ), - ), - ], - ); - }, - ), - ), - ); - } - - FormGroup buildForm(ComplaintsRegistrationState state) { - final complaintTypeValue = state.mapOrNull( - view: (value) => value.complaintType, - ); - - final bool shouldDisableForm = - complaintTypeValue != null && complaintTypeValue.isNotEmpty; - - return fb.group({ - _complaintType: FormControl( - validators: [Validators.required], - value: complaintTypeValue, - disabled: shouldDisableForm, - ), - _otherComplaintType: FormControl( - value: complaintTypeValue, - ), - }); - } -} diff --git a/apps/health_campaign_field_worker_app/lib/pages/complaints/registration/complaints_details.dart b/apps/health_campaign_field_worker_app/lib/pages/complaints/registration/complaints_details.dart deleted file mode 100644 index a1ecebbb9..000000000 --- a/apps/health_campaign_field_worker_app/lib/pages/complaints/registration/complaints_details.dart +++ /dev/null @@ -1,507 +0,0 @@ -import 'package:digit_components/digit_components.dart'; -import 'package:digit_data_model/data_model.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:group_radio_button/group_radio_button.dart'; -import 'package:reactive_forms/reactive_forms.dart'; - -import '../../../blocs/auth/auth.dart'; -import '../../../blocs/complaints_registration/complaints_registration.dart'; -import '../../../models/complaints/complaints.dart'; -import '../../../router/app_router.dart'; -import '../../../utils/i18_key_constants.dart' as i18; -import '../../../utils/utils.dart'; -import '../../../widgets/header/back_navigation_help_header.dart'; -import '../../../widgets/localized.dart'; - -@RoutePage() -class ComplaintsDetailsPage extends LocalizedStatefulWidget { - const ComplaintsDetailsPage({ - super.key, - super.appLocalizations, - }); - - @override - State createState() => _ComplaintsDetailsPageState(); -} - -class _ComplaintsDetailsPageState - extends LocalizedState { - static const _dateOfComplaint = 'dateOfComplaint'; - static const _administrativeArea = 'administrativeArea'; - static const _complaintRaisedFor = 'complaintRaisedFor'; - static const _complainantName = 'complainantName'; - static const _complainantContactNumber = 'complainantContactNumber'; - static const _supervisorName = 'supervisorName'; - static const _supervisorContactNumber = 'supervisorContactNumber'; - static const _complaintDescription = 'complaintDescription'; - static const _complaintDetailsForm = 'complaintDetailsForm'; - - @override - Widget build(BuildContext context) { - final theme = Theme.of(context); - final bloc = context.read(); - final router = context.router; - final complainantRaisedFor = [ - i18.complaints.raisedForMyself, - i18.complaints.raisedForAnotherUser, - ]; - - return Scaffold( - body: ReactiveFormBuilder( - form: () => bloc.state.map( - create: (value) => buildForm(value), - persisted: (value) => - throw const InvalidComplaintsRegistrationStateException(), - view: (value) => buildForm(value), - ), - builder: (_, form, __) => BlocListener( - listener: (context, state) { - context.navigateTo(HomeRoute()); - }, - child: BlocConsumer( - listener: (context, complaintState) { - complaintState.mapOrNull( - persisted: (value) { - router.replace(ComplaintsAcknowledgementRoute()); - }, - ); - }, - builder: (context, state) { - final isRaisedForSelf = form.control(_complaintRaisedFor).value == - i18.complaints.raisedForMyself; - - return ScrollableContent( - enableFixedButton: true, - header: const Column( - children: [ - BackNavigationHelpHeaderWidget(), - ], - ), - footer: SizedBox( - child: DigitCard( - margin: const EdgeInsets.fromLTRB(0, kPadding, 0, 0), - padding: - const EdgeInsets.fromLTRB(kPadding, 0, kPadding, 0), - child: DigitElevatedButton( - onPressed: () async { - setState(() { - form.markAllAsTouched(); - }); - - if (form.control(_complaintDetailsForm).disabled) { - router.parent()?.maybePop(); - } - - if (!form.valid) return; - - FocusManager.instance.primaryFocus?.unfocus(); - - final dateOfComplaint = - form.control(_dateOfComplaint).value as DateTime; - - final complaintRaisedFor = - form.control(_complaintRaisedFor).value as String; - - final administrativeArea = - form.control(_administrativeArea).value as String; - - final complainantName = - form.control(_complainantName).value as String; - - final complainantContactNumber = form - .control(_complainantContactNumber) - .value as String; - - final supervisorName = - form.control(_supervisorName).value as String?; - - final supervisorContactNumber = form - .control(_supervisorContactNumber) - .value as String?; - - final complaintDescription = - form.control(_complaintDescription).value as String; - - state.whenOrNull( - create: ( - loading, - complaintType, - _, - addressModel, - complaintsDetailsModel, - ) { - bloc.add( - ComplaintsRegistrationEvent.saveComplaintDetails( - boundaryModel: context.boundary, - complaintsDetailsModel: ComplaintsDetailsModel( - administrativeArea: - context.boundary.code.toString(), - dateOfComplaint: dateOfComplaint, - complaintRaisedFor: complaintRaisedFor, - complainantName: complainantName, - complainantContactNumber: - complainantContactNumber, - supervisorName: supervisorName, - supervisorContactNumber: - supervisorContactNumber, - complaintDescription: complaintDescription, - ), - ), - ); - }, - ); - - final userId = context.loggedInUserUuid; - - final submit = await DigitDialog.show( - context, - options: DigitDialogOptions( - titleText: localizations.translate( - i18.complaints.dialogTitle, - ), - contentText: localizations.translate( - i18.complaints.dialogContent, - ), - primaryAction: DigitDialogActions( - label: localizations.translate( - i18.common.coreCommonSubmit, - ), - action: (context) { - Navigator.of( - context, - rootNavigator: true, - ).pop(true); - }, - ), - secondaryAction: DigitDialogActions( - label: localizations.translate( - i18.common.coreCommonCancel, - ), - action: (context) { - Navigator.of( - context, - rootNavigator: true, - ).pop(false); - }, - ), - ), - ); - - if (submit != true) return; - - bloc.add( - ComplaintsRegistrationSubmitComplaintEvent( - userId: userId, - ), - ); - }, - child: Center( - child: Text( - form.control(_complaintDetailsForm).disabled - ? localizations - .translate(i18.complaints.backToInbox) - : localizations - .translate(i18.common.coreCommonSubmit), - ), - ), - ), - ), - ), - children: [ - DigitCard( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - Text( - localizations.translate( - i18.complaints.complaintsDetailsLabel, - ), - style: theme.textTheme.displayMedium, - ), - Column(children: [ - DigitDateFormPicker( - label: localizations.translate( - i18.complaints.dateOfComplaint, - ), - formControlName: _dateOfComplaint, - isRequired: true, - isEnabled: false, - initialDate: DateTime.now(), - confirmText: localizations.translate( - i18.common.coreCommonOk, - ), - cancelText: localizations.translate( - i18.common.coreCommonCancel, - ), - ), - DigitTextFormField( - formControlName: _administrativeArea, - label: localizations.translate( - i18.householdLocation.administrationAreaFormLabel, - ), - isRequired: true, - readOnly: true, - ), - LabeledField( - label: "${localizations.translate( - i18.complaints.complainantTypeQuestion, - )} *", - child: Column( - children: [ - RadioGroup.builder( - groupValue: - form.control(_complaintRaisedFor).value ?? - "", - onChanged: (changedValue) { - if (form - .control(_complaintRaisedFor) - .disabled) return; - - if (changedValue == - i18.complaints.raisedForAnotherUser) { - form.control(_complainantName).value = ""; - form - .control(_complainantContactNumber) - .value = ""; - } - setState(() { - form.control(_complaintRaisedFor).value = - changedValue; - }); - }, - textStyle: TextStyle( - color: form - .control(_complaintRaisedFor) - .disabled - ? theme.colorScheme.shadow - : theme.colorScheme.onBackground, - ), - items: complainantRaisedFor, - itemBuilder: (item) => RadioButtonBuilder( - localizations.translate(item.trim()), - ), - ), - if (form.touched && - form - .control(_complaintRaisedFor) - .invalid) ...[ - Align( - alignment: Alignment.topLeft, - child: Padding( - padding: const EdgeInsets.only( - top: 5, - bottom: 5, - ), - child: Text( - localizations.translate(i18.complaints - .validationRadioRequiredError), - style: TextStyle( - color: DigitTheme - .instance.colors.lavaRed, - ), - ), - ), - ), - ], - ], - ), - ), - BlocBuilder( - builder: (context, state) { - state.mapOrNull( - authenticated: (value) { - var user = value.userModel; - - if (isRaisedForSelf) { - form.control(_complainantName).value = - user.name; - form - .control(_complainantContactNumber) - .value = user.mobileNumber; - } - }, - ); - - return Column( - children: [ - DigitTextFormField( - formControlName: _complainantName, - label: localizations.translate( - i18.complaints.complainantName, - ), - readOnly: isRaisedForSelf, - isRequired: true, - validationMessages: { - 'required': (object) => - localizations.translate(i18.complaints - .validationRequiredError), - 'maxLength': (object) => localizations - .translate( - i18.common.maxCharsRequired) - .replaceAll('{}', '64'), - }, - ), - DigitTextFormField( - formControlName: _complainantContactNumber, - label: localizations.translate( - i18.complaints.complainantContactNumber, - ), - readOnly: isRaisedForSelf, - isRequired: true, - keyboardType: TextInputType.number, - inputFormatters: [ - FilteringTextInputFormatter.digitsOnly, - ], - validationMessages: { - 'mobileNumber': (object) => - localizations.translate(i18 - .individualDetails - .mobileNumberInvalidFormatValidationMessage), - 'required': (object) => - localizations.translate(i18.complaints - .validationRequiredError), - 'minLength': (object) => - localizations.translate(i18.complaints - .validationMinLengthError), - 'maxLength': (object) => localizations - .translate( - i18.common.maxCharsRequired) - .replaceAll('{}', '10'), - }, - ), - ], - ); - }, - ), - DigitTextFormField( - formControlName: _supervisorName, - label: localizations.translate( - i18.complaints.supervisorName, - ), - validationMessages: { - 'maxLength': (object) => localizations - .translate(i18.common.maxCharsRequired) - .replaceAll('{}', '64'), - }, - ), - DigitTextFormField( - formControlName: _supervisorContactNumber, - label: localizations.translate( - i18.complaints.supervisorContactNumber, - ), - keyboardType: TextInputType.number, - inputFormatters: [ - FilteringTextInputFormatter.digitsOnly, - ], - validationMessages: { - 'mobileNumber': (object) => - localizations.translate( - i18.individualDetails - .mobileNumberInvalidFormatValidationMessage, - ), - 'minLength': (object) => localizations.translate( - i18.complaints.validationMinLengthError), - 'maxLength': (object) => localizations - .translate(i18.common.maxCharsRequired) - .replaceAll('{}', '10'), - }, - ), - DigitTextFormField( - formControlName: _complaintDescription, - label: localizations.translate( - i18.complaints.complaintDescription, - ), - minLines: 3, - maxLines: 3, - isRequired: true, - validationMessages: { - 'required': (object) => localizations.translate( - i18.complaints.validationRequiredError, - ), - 'maxLength': (object) => localizations - .translate(i18.common.maxCharsRequired) - .replaceAll('{}', '1000'), - }, - ), - ]), - ], - ), - ), - ], - ); - }, - ), - ), - ), - ); - } - - FormGroup buildForm(ComplaintsRegistrationState state) { - final complaintDetails = state.mapOrNull( - view: (value) => value.complaintsDetailsModel, - ); - - final shouldDisableForm = complaintDetails != null; - - return fb.group({ - _dateOfComplaint: FormControl( - value: complaintDetails?.dateOfComplaint ?? DateTime.now(), - disabled: shouldDisableForm, - validators: [], - ), - _administrativeArea: FormControl( - value: localizations.translate( - (complaintDetails?.administrativeArea ?? context.boundary.name) - .toString()), - disabled: shouldDisableForm, - validators: [Validators.required], - ), - _complaintRaisedFor: FormControl( - value: complaintDetails?.complaintRaisedFor, - disabled: shouldDisableForm, - validators: [Validators.required], - ), - _complainantName: FormControl( - value: complaintDetails?.complainantName, - disabled: shouldDisableForm, - validators: [Validators.required, Validators.maxLength(64)], - ), - _complainantContactNumber: FormControl( - value: complaintDetails?.complainantContactNumber, - disabled: shouldDisableForm, - validators: [ - Validators.required, - CustomValidator.validMobileNumber, - Validators.minLength(10), - Validators.maxLength(10) - ], - ), - _supervisorName: FormControl( - value: complaintDetails?.supervisorName, - disabled: shouldDisableForm, - validators: [Validators.maxLength(64)], - ), - _supervisorContactNumber: FormControl( - value: complaintDetails?.supervisorContactNumber, - disabled: shouldDisableForm, - validators: [ - CustomValidator.validMobileNumber, - Validators.maxLength(10), - Validators.minLength(10), - ], - ), - _complaintDescription: FormControl( - value: complaintDetails?.complaintDescription, - disabled: shouldDisableForm, - validators: [Validators.required, Validators.maxLength(1000)], - ), - _complaintDetailsForm: FormControl( - disabled: shouldDisableForm, - ), - }); - } -} diff --git a/apps/health_campaign_field_worker_app/lib/pages/complaints/registration/complaints_location.dart b/apps/health_campaign_field_worker_app/lib/pages/complaints/registration/complaints_location.dart deleted file mode 100644 index f4feece4f..000000000 --- a/apps/health_campaign_field_worker_app/lib/pages/complaints/registration/complaints_location.dart +++ /dev/null @@ -1,277 +0,0 @@ -import 'package:digit_components/digit_components.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:reactive_forms/reactive_forms.dart'; -import 'package:digit_data_model/data_model.dart'; - -import '../../../blocs/complaints_registration/complaints_registration.dart'; -import '../../../router/app_router.dart'; -import '../../../utils/i18_key_constants.dart' as i18; -import '../../../utils/utils.dart'; -import '../../../widgets/header/back_navigation_help_header.dart'; -import '../../../widgets/localized.dart'; - -@RoutePage() -class ComplaintsLocationPage extends LocalizedStatefulWidget { - const ComplaintsLocationPage({ - super.key, - super.appLocalizations, - }); - - @override - State createState() => _ComplaintsLocationPageState(); -} - -class _ComplaintsLocationPageState - extends LocalizedState { - static const _addressLine1Key = 'addressLine1'; - static const _addressLine2Key = 'addressLine2'; - static const _landmarkKey = 'landmark'; - static const _postalCodeKey = 'postalCode'; - static const _latKey = 'latKey'; - static const _lngKey = 'lngKey'; - static const _accuracyKey = 'accuracyKey'; - int maxLength = 64; - - @override - Widget build(BuildContext context) { - final theme = Theme.of(context); - final bloc = context.read(); - final router = context.router; - - return Scaffold( - body: ReactiveFormBuilder( - form: () => bloc.state.map( - create: (value) => buildForm(value), - persisted: (value) => - throw const InvalidComplaintsRegistrationStateException(), - view: (value) => buildForm(value), - ), - builder: (_, form, __) => BlocListener( - listener: (context, locationState) { - final lat = locationState.latitude; - final lng = locationState.longitude; - final accuracy = locationState.accuracy; - - form.control(_latKey).value ??= lat; - form.control(_lngKey).value ??= lng; - form.control(_accuracyKey).value ??= accuracy; - }, - listenWhen: (previous, current) { - final lat = form.control(_latKey).value; - final lng = form.control(_lngKey).value; - final accuracy = form.control(_accuracyKey).value; - - return lat != null || lng != null || accuracy != null - ? false - : true; - }, - child: BlocBuilder( - builder: (context, state) { - return ScrollableContent( - enableFixedButton: true, - header: const Column( - children: [ - BackNavigationHelpHeaderWidget(), - ], - ), - footer: DigitCard( - margin: const EdgeInsets.fromLTRB(0, kPadding, 0, 0), - padding: const EdgeInsets.fromLTRB(kPadding, 0, kPadding, 0), - child: DigitElevatedButton( - onPressed: () { - form.markAllAsTouched(); - - if (!form.valid) return; - FocusManager.instance.primaryFocus?.unfocus(); - - final addressLine1 = - form.control(_addressLine1Key).value as String?; - final addressLine2 = - form.control(_addressLine2Key).value as String?; - final landmark = - form.control(_landmarkKey).value as String?; - final postalCode = - form.control(_postalCodeKey).value as String?; - - state.whenOrNull( - create: ( - loading, - complaintType, - _, - addressModel, - complaintsDetailsModel, - ) { - bloc.add(ComplaintsRegistrationEvent.saveAddress( - addressModel: PgrAddressModel( - buildingName: addressLine1, - street: addressLine2, - landmark: landmark, - pincode: postalCode, - geoLocation: GeoLocation( - latitude: form.control(_latKey).value, - longitude: form.control(_lngKey).value, - ), - ), - )); - }, - ); - - router.push(ComplaintsDetailsRoute()); - }, - child: Center( - child: Text( - localizations.translate(i18.complaints.actionLabel), - ), - ), - ), - ), - children: [ - DigitCard( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - Padding( - padding: const EdgeInsets.only(bottom: kPadding), - child: Text( - localizations.translate( - i18.complaints.complaintsLocationLabel, - ), - style: theme.textTheme.displayMedium, - ), - ), - Column(children: [ - DigitTextFormField( - formControlName: _addressLine1Key, - label: localizations.translate( - i18.householdLocation - .householdAddressLine1LabelText, - ), - validationMessages: { - 'required': (_) => localizations.translate( - i18.common.min2CharsRequired, - ), - 'maxLength': (object) => localizations - .translate(i18.common.maxCharsRequired) - .replaceAll('{}', maxLength.toString()), - }, - ), - DigitTextFormField( - formControlName: _addressLine2Key, - label: localizations.translate( - i18.householdLocation - .householdAddressLine2LabelText, - ), - validationMessages: { - 'required': (_) => localizations.translate( - i18.common.min2CharsRequired, - ), - 'maxLength': (object) => localizations - .translate(i18.common.maxCharsRequired) - .replaceAll('{}', maxLength.toString()), - }, - padding: const EdgeInsets.only(top: kPadding / 2), - ), - DigitTextFormField( - formControlName: _landmarkKey, - label: localizations.translate( - i18.householdLocation.landmarkFormLabel, - ), - validationMessages: { - 'required': (_) => localizations.translate( - i18.common.min2CharsRequired, - ), - 'maxLength': (object) => localizations - .translate(i18.common.maxCharsRequired) - .replaceAll('{}', maxLength.toString()), - }, - padding: const EdgeInsets.only(top: kPadding / 2), - ), - DigitTextFormField( - keyboardType: TextInputType.text, - formControlName: _postalCodeKey, - label: localizations.translate( - i18.householdLocation.postalCodeFormLabel, - ), - inputFormatters: [ - FilteringTextInputFormatter.digitsOnly, - ], - validationMessages: { - 'required': (_) => localizations.translate( - i18.common.min2CharsRequired, - ), - 'maxLength': (object) => localizations - .translate(i18.common.maxCharsRequired) - .replaceAll('{}', '6'), - }, - padding: const EdgeInsets.only(top: kPadding / 3.5), - ), - ]), - ], - ), - ), - ], - ); - }, - ), - ), - ), - ); - } - - FormGroup buildForm(ComplaintsRegistrationState state) { - final addressModel = state.mapOrNull( - view: (value) => value.addressModel, - ); - - final shouldDisableForm = addressModel != null; - - return fb.group({ - _addressLine1Key: FormControl( - value: addressModel?.buildingName, - disabled: shouldDisableForm, - validators: [ - CustomValidator.requiredMin, - Validators.maxLength(maxLength), - ], - ), - _addressLine2Key: FormControl( - value: addressModel?.street, - disabled: shouldDisableForm, - validators: [ - CustomValidator.requiredMin, - Validators.maxLength(maxLength), - ], - ), - _landmarkKey: FormControl( - value: addressModel?.landmark, - disabled: shouldDisableForm, - validators: [ - CustomValidator.requiredMin, - Validators.maxLength(maxLength), - ], - ), - _postalCodeKey: FormControl( - value: addressModel?.pincode, - disabled: shouldDisableForm, - validators: [ - CustomValidator.requiredMin, - Validators.maxLength(6), - ], - ), - _latKey: FormControl( - value: addressModel?.geoLocation?.latitude, - validators: [ - CustomValidator.requiredMin, - ], - ), - _lngKey: FormControl( - value: addressModel?.geoLocation?.longitude, - ), - _accuracyKey: FormControl(), - }); - } -} diff --git a/apps/health_campaign_field_worker_app/lib/pages/complaints/registration/complaints_registration_wrapper.dart b/apps/health_campaign_field_worker_app/lib/pages/complaints/registration/complaints_registration_wrapper.dart deleted file mode 100644 index d5a07a3f5..000000000 --- a/apps/health_campaign_field_worker_app/lib/pages/complaints/registration/complaints_registration_wrapper.dart +++ /dev/null @@ -1,75 +0,0 @@ -import 'dart:convert'; - -import 'package:auto_route/auto_route.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:digit_data_model/data_model.dart'; - -import '../../../blocs/complaints_registration/complaints_registration.dart'; -import '../../../models/complaints/complaints.dart'; -import '../../../utils/utils.dart'; -import '../../../widgets/boundary_selection_wrapper.dart'; - -@RoutePage() -class ComplaintsRegistrationWrapperPage extends StatelessWidget - implements AutoRouteWrapper { - final PgrServiceModel? pgrServiceModel; - - const ComplaintsRegistrationWrapperPage({ - Key? key, - this.pgrServiceModel, - }) : super(key: key); - - @override - Widget build(BuildContext context) { - return const BoundarySelectionWrapper( - child: AutoRouter(), - ); - } - - @override - Widget wrappedRoute(BuildContext context) { - return BlocProvider( - create: (context) { - ComplaintsRegistrationState initialState; - - final pgrItem = pgrServiceModel; - - if (pgrItem != null) { - final additionalDetails = PgrAdditionalDetails.fromJson( - jsonDecode(pgrItem.additionalDetail!), - ); - - initialState = ComplaintsRegistrationViewState( - complaintType: pgrItem.serviceCode, - addressModel: pgrItem.address, - complaintsDetailsModel: ComplaintsDetailsModel( - administrativeArea: pgrItem.address.locality?.name ?? '', - complainantContactNumber: pgrItem.user.mobileNumber ?? '', - complainantName: pgrItem.user.name ?? '', - complaintDescription: pgrItem.description, - complaintRaisedFor: - context.loggedInUser.mobileNumber != pgrItem.user.mobileNumber - ? 'Another user' - : 'Myself', - dateOfComplaint: pgrItem.auditDetails?.createdTime.toDateTime ?? - DateTime.now(), - supervisorContactNumber: - additionalDetails.supervisorContactNumber ?? '', - supervisorName: additionalDetails.supervisorName ?? '', - ), - ); - } else { - initialState = const ComplaintsRegistrationCreateState(); - } - - return ComplaintsRegistrationBloc( - initialState, - pgrServiceRepository: - context.repository(), - ); - }, - child: this, - ); - } -} diff --git a/apps/health_campaign_field_worker_app/lib/pages/complaints_acknowledgement.dart b/apps/health_campaign_field_worker_app/lib/pages/complaints_acknowledgement.dart deleted file mode 100644 index a51d6eb69..000000000 --- a/apps/health_campaign_field_worker_app/lib/pages/complaints_acknowledgement.dart +++ /dev/null @@ -1,40 +0,0 @@ -import 'package:digit_components/digit_components.dart'; -import 'package:flutter/material.dart'; - -import '../router/app_router.dart'; -import '../utils/i18_key_constants.dart' as i18; -import '../widgets/localized.dart'; - -@RoutePage() -class ComplaintsAcknowledgementPage extends LocalizedStatefulWidget { - const ComplaintsAcknowledgementPage({ - super.key, - super.appLocalizations, - }); - - @override - State createState() => - _ComplaintsAcknowledgementPageState(); -} - -class _ComplaintsAcknowledgementPageState - extends LocalizedState { - @override - Widget build(BuildContext context) { - return Scaffold( - body: DigitAcknowledgement.success( - action: () { - context.router.maybePop(); - }, - actionLabel: - localizations.translate(i18.complaints.acknowledgementAction), - description: localizations.translate( - i18.complaints.acknowledgementDescription, - ), - label: localizations.translate(i18.complaints.acknowledgementLabel), - subLabel: - "${localizations.translate(i18.complaints.acknowledgementSubLabelMain)}\n${localizations.translate(i18.complaints.acknowledgementSubLabelSub)}", - ), - ); - } -} diff --git a/apps/health_campaign_field_worker_app/lib/pages/home.dart b/apps/health_campaign_field_worker_app/lib/pages/home.dart index 48d393923..31e26b3a0 100644 --- a/apps/health_campaign_field_worker_app/lib/pages/home.dart +++ b/apps/health_campaign_field_worker_app/lib/pages/home.dart @@ -4,6 +4,8 @@ import 'package:attendance_management/attendance_management.dart'; import 'package:attendance_management/router/attendance_router.gm.dart'; import 'package:closed_household/closed_household.dart'; import 'package:closed_household/router/closed_household_router.gm.dart'; +import 'package:complaints/complaints.dart'; +import 'package:complaints/router/complaints_router.gm.dart'; import 'package:connectivity_plus/connectivity_plus.dart'; import 'package:digit_components/digit_components.dart'; import 'package:digit_components/widgets/atoms/digit_toaster.dart'; @@ -22,15 +24,18 @@ import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_secure_storage/flutter_secure_storage.dart'; import 'package:inventory_management/inventory_management.dart'; import 'package:inventory_management/router/inventory_router.gm.dart'; +import 'package:recase/recase.dart'; import 'package:referral_reconciliation/referral_reconciliation.dart'; import 'package:referral_reconciliation/router/referral_reconciliation_router.gm.dart'; import 'package:registration_delivery/registration_delivery.dart'; import 'package:registration_delivery/router/registration_delivery_router.gm.dart'; +import 'package:survey_form/router/survey_form_router.gm.dart'; +import 'package:survey_form/survey_form.dart'; +import 'package:sync_service/blocs/sync/sync.dart'; import '../blocs/app_initialization/app_initialization.dart'; import '../blocs/auth/auth.dart'; import '../blocs/localization/localization.dart'; -import '../blocs/sync/sync.dart'; import '../data/local_store/app_shared_preferences.dart'; import '../data/local_store/no_sql/schema/app_configuration.dart'; import '../data/local_store/no_sql/schema/service_registry.dart'; @@ -61,7 +66,7 @@ class HomePage extends LocalizedStatefulWidget { class _HomePageState extends LocalizedState { bool skipProgressBar = false; final storage = const FlutterSecureStorage(); - late StreamSubscription subscription; + late StreamSubscription> subscription; @override initState() { @@ -69,14 +74,10 @@ class _HomePageState extends LocalizedState { subscription = Connectivity() .onConnectivityChanged - .listen((ConnectivityResult resSyncBlocult) async { - var connectivityResult = await (Connectivity().checkConnectivity()); - - if (connectivityResult != ConnectivityResult.none) { + .listen((List result) async { + if (result.firstOrNull == ConnectivityResult.none) { if (context.mounted) { - context - .read() - .add(SyncRefreshEvent(context.loggedInUserUuid)); + context.syncRefresh(); } } }); @@ -117,172 +118,166 @@ class _HomePageState extends LocalizedState { ]; return Scaffold( - backgroundColor: DigitTheme.instance.colorScheme.background, - body: BlocListener( - listener: (context, state) { - state.maybeWhen( - orElse: () {}, - pendingSync: (count) { - final debouncer = Debouncer(seconds: 5); - debouncer.run(() async { - if (count != 0) { - await localSecureStore.setManualSyncTrigger(false); - if (context.mounted) { - await performBackgroundService( - isBackground: false, - stopService: false, - context: context, - ); - } - } else { - await localSecureStore.setManualSyncTrigger(true); - } - }); - }, - ); - }, - child: SizedBox( - height: MediaQuery.of(context).size.height, - child: ScrollableContent( - slivers: [ - SliverGrid( - delegate: SliverChildBuilderDelegate( - (context, index) { - return homeItems.elementAt(index); - }, - childCount: homeItems.length, - ), - gridDelegate: const SliverGridDelegateWithMaxCrossAxisExtent( - maxCrossAxisExtent: 145, - childAspectRatio: 104 / 128, - ), + backgroundColor: DigitTheme.instance.colorScheme.surface, + body: SizedBox( + height: MediaQuery.of(context).size.height, + child: ScrollableContent( + slivers: [ + SliverGrid( + delegate: SliverChildBuilderDelegate( + (context, index) { + return homeItems.elementAt(index); + }, + childCount: homeItems.length, ), - ], - header: Column( - children: [ - BackNavigationHelpHeaderWidget( - showBackNavigation: false, - showHelp: false, - showcaseButton: ShowcaseButton( - showcaseFor: showcaseKeys.toSet().toList(), - ), + gridDelegate: const SliverGridDelegateWithMaxCrossAxisExtent( + maxCrossAxisExtent: 145, + childAspectRatio: 104 / 128, + ), + ), + ], + header: Column( + children: [ + BackNavigationHelpHeaderWidget( + showBackNavigation: false, + showHelp: false, + showcaseButton: ShowcaseButton( + showcaseFor: showcaseKeys.toSet().toList(), ), - skipProgressBar - ? const SizedBox.shrink() - : homeShowcaseData.distributorProgressBar.buildWith( - child: BeneficiaryProgressBar( - label: localizations.translate( - i18.home.progressIndicatorTitle, - ), - prefixLabel: localizations.translate( - i18.home.progressIndicatorPrefixLabel, - ), + ), + skipProgressBar + ? const SizedBox.shrink() + : homeShowcaseData.distributorProgressBar.buildWith( + child: BeneficiaryProgressBar( + label: localizations.translate( + i18.home.progressIndicatorTitle, + ), + prefixLabel: localizations.translate( + i18.home.progressIndicatorPrefixLabel, ), ), - ], - ), - footer: PoweredByDigit( - version: Constants().version, - ), - children: [ - const SizedBox(height: kPadding * 2), - BlocConsumer( - listener: (context, state) { - state.maybeWhen( - orElse: () => null, - syncInProgress: () async { - await localSecureStore.setManualSyncTrigger(true); - if (context.mounted) { - DigitSyncDialog.show( - context, - type: DigitSyncDialogType.inProgress, - label: localizations.translate( - i18.syncDialog.syncInProgressTitle, - ), - barrierDismissible: false, - ); + ), + ], + ), + footer: PoweredByDigit( + version: Constants().version, + ), + children: [ + const SizedBox(height: kPadding * 2), + // INFO : Need to add sync bloc of package Here + BlocConsumer( + listener: (context, state) { + state.maybeWhen( + orElse: () => null, + pendingSync: (count) { + final debouncer = Debouncer(seconds: 5); + debouncer.run(() async { + if (count != 0) { + await localSecureStore.setManualSyncTrigger(false); + if (context.mounted) { + await performBackgroundService( + isBackground: false, + stopService: false, + context: context, + ); + } + } else { + await localSecureStore.setManualSyncTrigger(true); } - }, - completedSync: () async { - Navigator.of(context, rootNavigator: true).pop(); - await localSecureStore.setManualSyncTrigger(false); - if (context.mounted) { - DigitSyncDialog.show( - context, - type: DigitSyncDialogType.complete, + }); + }, + syncInProgress: () async { + await localSecureStore.setManualSyncTrigger(false); + if (context.mounted) { + DigitSyncDialog.show( + context, + type: DigitSyncDialogType.inProgress, + label: localizations.translate( + i18.syncDialog.syncInProgressTitle, + ), + barrierDismissible: false, + ); + } + }, + completedSync: () async { + Navigator.of(context, rootNavigator: true).pop(); + await localSecureStore.setManualSyncTrigger(true); + if (context.mounted) { + DigitSyncDialog.show( + context, + type: DigitSyncDialogType.complete, + label: localizations.translate( + i18.syncDialog.dataSyncedTitle, + ), + primaryAction: DigitDialogActions( label: localizations.translate( - i18.syncDialog.dataSyncedTitle, + i18.syncDialog.closeButtonLabel, ), - primaryAction: DigitDialogActions( - label: localizations.translate( - i18.syncDialog.closeButtonLabel, + action: (ctx) { + Navigator.pop(ctx); + }, + ), + ); + } + }, + failedSync: () async { + await localSecureStore.setManualSyncTrigger(true); + if (context.mounted) { + _showSyncFailedDialog( + context, + message: localizations.translate( + i18.syncDialog.syncFailedTitle, + ), + ); + } + }, + failedDownSync: () async { + await localSecureStore.setManualSyncTrigger(true); + if (context.mounted) { + _showSyncFailedDialog( + context, + message: localizations.translate( + i18.syncDialog.downSyncFailedTitle, + ), + ); + } + }, + failedUpSync: () async { + await localSecureStore.setManualSyncTrigger(true); + if (context.mounted) { + _showSyncFailedDialog( + context, + message: localizations.translate( + i18.syncDialog.upSyncFailedTitle, + ), + ); + } + }, + ); + }, + builder: (context, state) { + return state.maybeWhen( + orElse: () => const Offstage(), + pendingSync: (count) { + return count == 0 + ? const Offstage() + : DigitInfoCard( + icon: Icons.info, + backgroundColor: + theme.colorScheme.tertiaryContainer, + iconColor: theme.colorScheme.surfaceTint, + description: localizations + .translate(i18.home.dataSyncInfoContent) + .replaceAll('{}', count.toString()), + title: localizations.translate( + i18.home.dataSyncInfoLabel, ), - action: (ctx) { - Navigator.pop(ctx); - }, - ), - ); - } - }, - failedSync: () async { - await localSecureStore.setManualSyncTrigger(true); - if (context.mounted) { - _showSyncFailedDialog( - context, - message: localizations.translate( - i18.syncDialog.syncFailedTitle, - ), - ); - } - }, - failedDownSync: () async { - await localSecureStore.setManualSyncTrigger(true); - if (context.mounted) { - _showSyncFailedDialog( - context, - message: localizations.translate( - i18.syncDialog.downSyncFailedTitle, - ), - ); - } - }, - failedUpSync: () async { - await localSecureStore.setManualSyncTrigger(true); - if (context.mounted) { - _showSyncFailedDialog( - context, - message: localizations.translate( - i18.syncDialog.upSyncFailedTitle, - ), - ); - } - }, - ); - }, - builder: (context, state) { - return state.maybeWhen( - orElse: () => const Offstage(), - pendingSync: (count) { - return count == 0 - ? const Offstage() - : DigitInfoCard( - icon: Icons.info, - backgroundColor: - theme.colorScheme.tertiaryContainer, - iconColor: theme.colorScheme.surfaceTint, - description: localizations - .translate(i18.home.dataSyncInfoContent) - .replaceAll('{}', count.toString()), - title: localizations.translate( - i18.home.dataSyncInfoLabel, - ), - ); - }, - ); - }, - ), - ], - ), + ); + }, + ); + }, + ), + ], ), ), ); @@ -325,6 +320,16 @@ class _HomePageState extends LocalizedState { final Map homeItemsMap = { // INFO : Need to add home items of package Here + i18.home.fileComplaint: + homeShowcaseData.distributorFileComplaint.buildWith( + child: HomeItemCard( + icon: Icons.announcement, + label: i18.home.fileComplaint, + onPressed: () => + context.router.push(const ComplaintsInboxWrapperRoute()), + ), + ), + i18.home.dashboard: homeShowcaseData.dashBoard.buildWith( child: HomeItemCard( icon: Icons.bar_chart_sharp, @@ -386,24 +391,16 @@ class _HomePageState extends LocalizedState { }, ), ), - i18.home.myCheckList: homeShowcaseData.supervisorMyChecklist.buildWith( + i18.home.mySurveyForm: homeShowcaseData.supervisorMySurveyForm.buildWith( child: HomeItemCard( enableCustomIcon: true, - customIcon: myChecklistSvg, + customIcon: mySurveyFormSvg, icon: Icons.checklist, - label: i18.home.myCheckList, - onPressed: () => context.router.push(ChecklistWrapperRoute()), - ), - ), - i18.home.fileComplaint: - homeShowcaseData.distributorFileComplaint.buildWith( - child: HomeItemCard( - icon: Icons.announcement, - label: i18.home.fileComplaint, - onPressed: () => - context.router.push(const ComplaintsInboxWrapperRoute()), + label: i18.home.mySurveyForm, + onPressed: () => context.router.push(SurveyFormWrapperRoute()), ), ), + i18.home.syncDataLabel: homeShowcaseData.distributorSyncData.buildWith( child: StreamBuilder?>( stream: FlutterBackgroundService().on('serviceRunning'), @@ -504,7 +501,8 @@ class _HomePageState extends LocalizedState { homeShowcaseData.warehouseManagerManageStock.showcaseKey, i18.home.stockReconciliationLabel: homeShowcaseData.wareHouseManagerStockReconciliation.showcaseKey, - i18.home.myCheckList: homeShowcaseData.supervisorMyChecklist.showcaseKey, + i18.home.mySurveyForm: + homeShowcaseData.supervisorMySurveyForm.showcaseKey, i18.home.fileComplaint: homeShowcaseData.distributorFileComplaint.showcaseKey, i18.home.syncDataLabel: homeShowcaseData.distributorSyncData.showcaseKey, @@ -525,7 +523,7 @@ class _HomePageState extends LocalizedState { i18.home.closedHouseHoldLabel, i18.home.manageStockLabel, i18.home.stockReconciliationLabel, - i18.home.myCheckList, + i18.home.mySurveyForm, i18.home.fileComplaint, i18.home.syncDataLabel, i18.home.viewReportsLabel, @@ -549,6 +547,10 @@ class _HomePageState extends LocalizedState { .map((label) => homeItemsShowcaseMap[label]!) .toList(); + if (!context.selectedProject.name.contains('IRS')) { + filteredLabels.remove(i18.home.dashboard); + } + final List widgetList = filteredLabels.map((label) => homeItemsMap[label]!).toList(); @@ -567,6 +569,8 @@ class _HomePageState extends LocalizedState { userId: context.loggedInUserUuid, localRepositories: [ // INFO : Need to add local repo of package Here + context.read< + LocalRepository>(), context.read< LocalRepository>(), context.read< @@ -648,6 +652,16 @@ void setPackagesSingleton(BuildContext context) { ) { loadLocalization(context, appConfiguration); // INFO : Need to add singleton of package Here + ComplaintsSingleton().setInitialData( + tenantId: envConfig.variables.tenantId, + loggedInUserUuid: context.loggedInUserUuid, + userMobileNumber: context.loggedInUser.mobileNumber, + loggedInUserName: context.loggedInUser.name, + complaintTypes: + appConfiguration.complaintTypes!.map((e) => e.code).toList(), + userName: context.loggedInUser.name ?? '', + ); + RegistrationDeliverySingleton().setInitialData( loggedInUser: context.loggedInUserModel, loggedInUserUuid: context.loggedInUserUuid, @@ -699,6 +713,26 @@ void setPackagesSingleton(BuildContext context) { appVersion: Constants().version, ); + SurveyFormSingleton().setInitialData( + projectId: context.projectId, + projectName: context.selectedProject.name, + loggedInIndividualId: context.loggedInIndividualId ?? '', + loggedInUserUuid: context.loggedInUserUuid, + appVersion: Constants().version, + isHealthFacilityWorker: context.loggedInUserRoles + .where((role) => + role.code == RolesType.healthFacilityWorker.toValue()) + .toList() + .isNotEmpty, + roles: context.read().state.maybeMap( + orElse: () => const Offstage(), + authenticated: (res) { + return res.userModel.roles + .map((e) => e.code.snakeCase.toUpperCase()) + .toList(); + }), + ); + ReferralReconSingleton().setInitialData( userName: context.loggedInUser.name ?? '', userUUid: context.loggedInUserUuid, diff --git a/apps/health_campaign_field_worker_app/lib/pages/language_selection.dart b/apps/health_campaign_field_worker_app/lib/pages/language_selection.dart index d14118731..9ec5f06df 100644 --- a/apps/health_campaign_field_worker_app/lib/pages/language_selection.dart +++ b/apps/health_campaign_field_worker_app/lib/pages/language_selection.dart @@ -12,6 +12,7 @@ import '../data/local_store/app_shared_preferences.dart'; import '../data/local_store/no_sql/schema/app_configuration.dart'; import '../router/app_router.dart'; import '../utils/constants.dart'; +import '../utils/environment_config.dart'; import '../utils/i18_key_constants.dart' as i18; import '../utils/utils.dart'; @@ -154,10 +155,14 @@ class _LanguageSelectionPageState extends State { setState(() {}); context.read().add( LocalizationEvent.onLoadLocalization( - module: localizationModulesList - .map((e) => e.name.toString()) - .join(',') - .toString(), + module: 'hcm-boundary-${envConfig.variables.hierarchyType.toLowerCase()},${localizationModulesList + .map((e) + => + e.name.toString() + ) + .join(',') + .toString() + }', tenantId: tenantId, locale: locale, path: Constants.localizationApiPath, diff --git a/apps/health_campaign_field_worker_app/lib/pages/profile.dart b/apps/health_campaign_field_worker_app/lib/pages/profile.dart index b42a78708..b739a8a1f 100644 --- a/apps/health_campaign_field_worker_app/lib/pages/profile.dart +++ b/apps/health_campaign_field_worker_app/lib/pages/profile.dart @@ -59,7 +59,9 @@ class _ProfilePageState extends LocalizedState { _mobileNumberKey: FormControl( value: user?.mobileNumber, validators: [ - CustomValidator.validMobileNumber, + Validators.pattern(Constants.mobileNumberRegExp, + validationMessage: + localizations.translate(i18.common.coreCommonMobileNumber)) ], ), _emailId: FormControl( @@ -147,9 +149,9 @@ class _ProfilePageState extends LocalizedState { onPressed: () async { final connectivityResult = await (Connectivity().checkConnectivity()); - final isOnline = connectivityResult == + final isOnline = connectivityResult.firstOrNull == ConnectivityResult.wifi || - connectivityResult == + connectivityResult.firstOrNull == ConnectivityResult.mobile; if (!isOnline) { @@ -283,7 +285,7 @@ class _ProfilePageState extends LocalizedState { .translate(e.code)), formControlName: _genderKey, )) - .toList(), + , ], ); }, diff --git a/apps/health_campaign_field_worker_app/lib/pages/project_facility_selection.dart b/apps/health_campaign_field_worker_app/lib/pages/project_facility_selection.dart index cab08f048..f10c3625b 100644 --- a/apps/health_campaign_field_worker_app/lib/pages/project_facility_selection.dart +++ b/apps/health_campaign_field_worker_app/lib/pages/project_facility_selection.dart @@ -1,6 +1,6 @@ import 'package:collection/collection.dart'; import 'package:digit_components/digit_components.dart'; -import 'package:digit_data_model/models/entities/project_facility.dart'; +import 'package:digit_data_model/data_model.dart'; import 'package:flutter/material.dart'; import 'package:reactive_forms/reactive_forms.dart'; @@ -14,9 +14,9 @@ class ProjectFacilitySelectionPage extends StatelessWidget { final List projectFacilities; const ProjectFacilitySelectionPage({ - Key? key, + super.key, required this.projectFacilities, - }) : super(key: key); + }); static const _facilityName = 'facilityKey'; static const _selectedFacility = 'selectedFacilityKey'; diff --git a/apps/health_campaign_field_worker_app/lib/pages/reports/beneficiary/beneficaries_report.dart b/apps/health_campaign_field_worker_app/lib/pages/reports/beneficiary/beneficaries_report.dart index 4ea93bd81..02dd968be 100644 --- a/apps/health_campaign_field_worker_app/lib/pages/reports/beneficiary/beneficaries_report.dart +++ b/apps/health_campaign_field_worker_app/lib/pages/reports/beneficiary/beneficaries_report.dart @@ -10,7 +10,6 @@ import 'package:flutter_bloc/flutter_bloc.dart'; import '../../../blocs/app_initialization/app_initialization.dart'; import '../../../blocs/projects_beneficiary_downsync/project_beneficiaries_downsync.dart'; -import '../../../blocs/sync/sync.dart'; import '../../../models/downsync/downsync.dart'; import '../../../router/app_router.dart'; import '../../../utils/i18_key_constants.dart' as i18; @@ -34,17 +33,17 @@ class BeneficiariesReportState extends LocalizedState { int pendingSyncCount = 0; BoundaryModel? selectedBoundary; StreamController downloadProgress = StreamController(); + late StreamSubscription? syncSubscription; @override void initState() { - final syncBloc = context.read(); - syncBloc.add(SyncRefreshEvent(context.loggedInUserUuid)); - + context.syncRefresh(); final bloc = context.read(); bloc.add( const BeneficiaryDownSyncEvent.downSyncReport(), ); super.initState(); + listenToSyncCount(); } @override @@ -55,6 +54,12 @@ class BeneficiariesReportState extends LocalizedState { super.deactivate(); } + @override + void dispose() { + syncSubscription?.cancel(); + super.dispose(); + } + @override Widget build(BuildContext context) { final theme = Theme.of(context); @@ -86,346 +91,333 @@ class BeneficiariesReportState extends LocalizedState { ), header: const BackNavigationHelpHeaderWidget(), children: [ - BlocListener( - listener: (ctx, syncState) { - setState(() { - pendingSyncCount = syncState.maybeWhen( - orElse: () => 0, - pendingSync: (count) => count, - ); - }); - }, - child: BlocListener( - listener: (ctx, state) { - state.maybeWhen( - orElse: () => false, - loading: (isPop) => { - if (isPop) - { - Navigator.of(context, rootNavigator: true) - .popUntil((route) => route is! PopupRoute), - }, - DigitSyncDialog.show( - context, - type: DigitSyncDialogType.inProgress, - label: 'Loading', - barrierDismissible: false, - ), - }, - getBatchSize: ( - batchSize, - projectId, - boundaryCode, - pendingSync, - boundaryName, - ) => - context.read().add( - DownSyncCheckTotalCountEvent( - projectId: context.projectId, - boundaryCode: boundaryCode, - pendingSyncCount: pendingSyncCount, - boundaryName: boundaryName, - batchSize: batchSize, - ), - ), - report: (downSyncCriteriaList) { - setState(() { - downSyncList = downSyncCriteriaList; - }); - }, - pendingSync: () => showDownloadDialog( + BlocListener( + listener: (ctx, state) { + state.maybeWhen( + orElse: () => false, + loading: (isPop) => { + if (isPop) + { + Navigator.of(context, rootNavigator: true) + .popUntil((route) => route is! PopupRoute), + }, + DigitSyncDialog.show( context, - model: DownloadBeneficiary( - title: localizations.translate( - i18.syncDialog.pendingSyncLabel, - ), - projectId: context.projectId, - appConfiguartion: appConfiguration, - boundary: selectedBoundary!.code.toString(), - batchSize: 5, - totalCount: 0, - content: localizations.translate( - i18.syncDialog.pendingSyncContent, - ), - primaryButtonLabel: localizations.translate( - i18.acknowledgementSuccess.goToHome, - ), - boundaryName: selectedBoundary!.name.toString(), + type: DigitSyncDialogType.inProgress, + label: 'Loading', + barrierDismissible: false, + ), + }, + getBatchSize: ( + batchSize, + projectId, + boundaryCode, + pendingSync, + boundaryName, + ) => + context.read().add( + DownSyncCheckTotalCountEvent( + projectId: context.projectId, + boundaryCode: boundaryCode, + pendingSyncCount: pendingSyncCount, + boundaryName: boundaryName, + batchSize: batchSize, + ), + ), + report: (downSyncCriteriaList) { + setState(() { + downSyncList = downSyncCriteriaList; + }); + }, + pendingSync: () => showDownloadDialog( + context, + model: DownloadBeneficiary( + title: localizations.translate( + i18.syncDialog.pendingSyncLabel, ), - dialogType: DigitProgressDialogType.pendingSync, - isPop: true, + projectId: context.projectId, + appConfiguartion: appConfiguration, + boundary: selectedBoundary!.code.toString(), + batchSize: 5, + totalCount: 0, + content: localizations.translate( + i18.syncDialog.pendingSyncContent, + ), + primaryButtonLabel: localizations.translate( + i18.acknowledgementSuccess.goToHome, + ), + boundaryName: selectedBoundary!.name.toString(), ), - dataFound: (initialServerCount, batchSize) => - showDownloadDialog( - context, - model: DownloadBeneficiary( - title: localizations.translate( - initialServerCount > 0 - ? i18.beneficiaryDetails.dataFound - : i18.beneficiaryDetails.noDataFound, - ), - projectId: context.projectId, - appConfiguartion: appConfiguration, - boundary: selectedBoundary!.code.toString(), - batchSize: 5, - totalCount: initialServerCount, - content: localizations.translate( - initialServerCount > 0 - ? i18.beneficiaryDetails.dataFoundContent - : i18.beneficiaryDetails.noDataFoundContent, - ), - primaryButtonLabel: localizations.translate( - initialServerCount > 0 - ? i18.common.coreCommonDownload - : i18.common.coreCommonGoback, - ), - secondaryButtonLabel: localizations.translate( - initialServerCount > 0 - ? i18.beneficiaryDetails - .proceedWithoutDownloading - : i18.acknowledgementSuccess.goToHome, - ), - boundaryName: selectedBoundary!.name.toString(), + dialogType: DigitProgressDialogType.pendingSync, + isPop: true, + ), + dataFound: (initialServerCount, batchSize) => + showDownloadDialog( + context, + model: DownloadBeneficiary( + title: localizations.translate( + initialServerCount > 0 + ? i18.beneficiaryDetails.dataFound + : i18.beneficiaryDetails.noDataFound, + ), + projectId: context.projectId, + appConfiguartion: appConfiguration, + boundary: selectedBoundary!.code.toString(), + batchSize: 5, + totalCount: initialServerCount, + content: localizations.translate( + initialServerCount > 0 + ? i18.beneficiaryDetails.dataFoundContent + : i18.beneficiaryDetails.noDataFoundContent, ), - dialogType: DigitProgressDialogType.dataFound, - isPop: true, + primaryButtonLabel: localizations.translate( + initialServerCount > 0 + ? i18.common.coreCommonDownload + : i18.common.coreCommonGoback, + ), + secondaryButtonLabel: localizations.translate( + initialServerCount > 0 + ? i18.beneficiaryDetails + .proceedWithoutDownloading + : i18.acknowledgementSuccess.goToHome, + ), + boundaryName: selectedBoundary!.name.toString(), ), - inProgress: (syncCount, totalCount) { - downloadProgress.add( - min( - (syncCount) / (totalCount), - 1, + dialogType: DigitProgressDialogType.dataFound, + isPop: true, + ), + inProgress: (syncCount, totalCount) { + downloadProgress.add( + min( + (syncCount) / (totalCount), + 1, + ), + ); + if (syncCount < 1) { + showDownloadDialog( + context, + model: DownloadBeneficiary( + title: localizations.translate( + i18.beneficiaryDetails.dataDownloadInProgress, + ), + projectId: context.projectId, + boundary: selectedBoundary!.code.toString(), + appConfiguartion: appConfiguration, + syncCount: syncCount, + totalCount: totalCount, + prefixLabel: syncCount.toString(), + suffixLabel: totalCount.toString(), + boundaryName: selectedBoundary!.name.toString(), ), + dialogType: DigitProgressDialogType.inProgress, + isPop: true, + downloadProgressController: downloadProgress, ); - if (syncCount < 1) { - showDownloadDialog( - context, - model: DownloadBeneficiary( - title: localizations.translate( - i18.beneficiaryDetails.dataDownloadInProgress, - ), - projectId: context.projectId, - boundary: selectedBoundary!.code.toString(), - appConfiguartion: appConfiguration, - syncCount: syncCount, - totalCount: totalCount, - prefixLabel: syncCount.toString(), - suffixLabel: totalCount.toString(), - boundaryName: selectedBoundary!.name.toString(), - ), - dialogType: DigitProgressDialogType.inProgress, - isPop: true, - downloadProgressController: downloadProgress, - ); - } - }, - success: (result) { - int? epochTime = result.lastSyncedTime; + } + }, + success: (result) { + int? epochTime = result.lastSyncedTime; - String date = - '${DigitDateUtils.getTimeFromTimestamp(epochTime!)} on ${DigitDateUtils.getDateFromTimestamp(epochTime)}'; - String dataDescription = "${localizations.translate( - i18.beneficiaryDetails.downloadreport, - )}\n\n\n${localizations.translate( - i18.beneficiaryDetails.boundary, - )} ${result.boundaryName}\n${localizations.translate( - i18.beneficiaryDetails.status, - )} ${localizations.translate( - i18.beneficiaryDetails.downloadcompleted, - )}\n${localizations.translate( - i18.beneficiaryDetails.downloadedon, - )} $date\n${localizations.translate( - i18.beneficiaryDetails.recordsdownload, - )} ${result.totalCount}/${result.totalCount}"; - Navigator.of(context, rootNavigator: true).pop(); - context.router.popAndPush((AcknowledgementRoute( - isDataRecordSuccess: true, - description: dataDescription, - descriptionTableData: { - localizations.translate( - i18.beneficiaryDetails.boundary, - ): result.boundaryName!, - localizations.translate( - i18.beneficiaryDetails.status, - ): localizations.translate( - i18.beneficiaryDetails.downloadcompleted, - ), - localizations.translate( - i18.beneficiaryDetails.downloadtime, - ): date, - localizations.translate( - i18.beneficiaryDetails.totalrecorddownload, - ): '${result.totalCount}/${result.totalCount}', - }, - label: localizations.translate(i18 - .acknowledgementSuccess - .dataDownloadedSuccessLabel), - ))); - }, - failed: () => showDownloadDialog( - context, - model: DownloadBeneficiary( - title: localizations.translate( - i18.common.coreCommonDownloadFailed, - ), - projectId: context.projectId, - pendingSyncCount: pendingSyncCount, - appConfiguartion: appConfiguration, - boundary: selectedBoundary!.code.toString(), - content: localizations.translate( - i18.beneficiaryDetails.dataFoundContent, - ), - primaryButtonLabel: localizations.translate( - i18.syncDialog.retryButtonLabel, - ), - secondaryButtonLabel: localizations.translate( - i18.beneficiaryDetails.proceedWithoutDownloading, + String date = + '${DigitDateUtils.getTimeFromTimestamp(epochTime!)} on ${DigitDateUtils.getDateFromTimestamp(epochTime)}'; + String dataDescription = "${localizations.translate( + i18.beneficiaryDetails.downloadreport, + )}\n\n\n${localizations.translate( + i18.beneficiaryDetails.boundary, + )} ${result.boundaryName}\n${localizations.translate( + i18.beneficiaryDetails.status, + )} ${localizations.translate( + i18.beneficiaryDetails.downloadcompleted, + )}\n${localizations.translate( + i18.beneficiaryDetails.downloadedon, + )} $date\n${localizations.translate( + i18.beneficiaryDetails.recordsdownload, + )} ${result.totalCount}/${result.totalCount}"; + Navigator.of(context, rootNavigator: true).pop(); + context.router.popAndPush((AcknowledgementRoute( + isDataRecordSuccess: true, + description: dataDescription, + descriptionTableData: { + localizations.translate( + i18.beneficiaryDetails.boundary, + ): result.boundaryName!, + localizations.translate( + i18.beneficiaryDetails.status, + ): localizations.translate( + i18.beneficiaryDetails.downloadcompleted, ), - boundaryName: selectedBoundary!.name.toString(), + localizations.translate( + i18.beneficiaryDetails.downloadtime, + ): date, + localizations.translate( + i18.beneficiaryDetails.totalrecorddownload, + ): '${result.totalCount}/${result.totalCount}', + }, + label: localizations.translate(i18 + .acknowledgementSuccess + .dataDownloadedSuccessLabel), + ))); + }, + failed: () => showDownloadDialog( + context, + model: DownloadBeneficiary( + title: localizations.translate( + i18.common.coreCommonDownloadFailed, + ), + projectId: context.projectId, + pendingSyncCount: pendingSyncCount, + appConfiguartion: appConfiguration, + boundary: selectedBoundary!.code.toString(), + content: localizations.translate( + i18.beneficiaryDetails.dataFoundContent, ), - dialogType: DigitProgressDialogType.failed, - isPop: true, + primaryButtonLabel: localizations.translate( + i18.syncDialog.retryButtonLabel, + ), + secondaryButtonLabel: localizations.translate( + i18.beneficiaryDetails.proceedWithoutDownloading, + ), + boundaryName: selectedBoundary!.name.toString(), ), - totalCountCheckFailed: () => showDownloadDialog( - context, - model: DownloadBeneficiary( - title: localizations.translate( - i18.beneficiaryDetails.unableToCheckDataInServer, - ), - projectId: context.projectId, - pendingSyncCount: pendingSyncCount, - appConfiguartion: appConfiguration, - boundary: selectedBoundary!.code.toString(), - primaryButtonLabel: localizations.translate( - i18.syncDialog.retryButtonLabel, - ), - secondaryButtonLabel: localizations.translate( - i18.beneficiaryDetails.proceedWithoutDownloading, - ), - boundaryName: selectedBoundary!.name.toString(), + dialogType: DigitProgressDialogType.failed, + isPop: true, + ), + totalCountCheckFailed: () => showDownloadDialog( + context, + model: DownloadBeneficiary( + title: localizations.translate( + i18.beneficiaryDetails.unableToCheckDataInServer, + ), + projectId: context.projectId, + pendingSyncCount: pendingSyncCount, + appConfiguartion: appConfiguration, + boundary: selectedBoundary!.code.toString(), + primaryButtonLabel: localizations.translate( + i18.syncDialog.retryButtonLabel, + ), + secondaryButtonLabel: localizations.translate( + i18.beneficiaryDetails.proceedWithoutDownloading, ), - dialogType: DigitProgressDialogType.checkFailed, - isPop: true, + boundaryName: selectedBoundary!.name.toString(), ), - insufficientStorage: () => showDownloadDialog( - context, - model: DownloadBeneficiary( - title: localizations.translate( - i18.beneficiaryDetails.insufficientStorage, - ), - content: localizations.translate(i18 - .beneficiaryDetails.insufficientStorageContent), - projectId: context.projectId, - appConfiguartion: appConfiguration, - boundary: selectedBoundary!.code.toString(), - primaryButtonLabel: localizations.translate( - i18.common.coreCommonOk, - ), - boundaryName: selectedBoundary!.name.toString(), + dialogType: DigitProgressDialogType.checkFailed, + isPop: true, + ), + insufficientStorage: () => showDownloadDialog( + context, + model: DownloadBeneficiary( + title: localizations.translate( + i18.beneficiaryDetails.insufficientStorage, ), - dialogType: - DigitProgressDialogType.insufficientStorage, - isPop: true, + content: localizations.translate(i18 + .beneficiaryDetails.insufficientStorageContent), + projectId: context.projectId, + appConfiguartion: appConfiguration, + boundary: selectedBoundary!.code.toString(), + primaryButtonLabel: localizations.translate( + i18.common.coreCommonOk, + ), + boundaryName: selectedBoundary!.name.toString(), ), - ); - }, - child: Column(children: [ - Padding( - padding: const EdgeInsets.all(kPadding), - child: Align( - alignment: Alignment.centerLeft, - child: Text( - localizations.translate( - i18.beneficiaryDetails.datadownloadreport, - ), - style: theme.textTheme.displayMedium, - overflow: TextOverflow.ellipsis, + dialogType: DigitProgressDialogType.insufficientStorage, + isPop: true, + ), + ); + }, + child: Column(children: [ + Padding( + padding: const EdgeInsets.all(kPadding), + child: Align( + alignment: Alignment.centerLeft, + child: Text( + localizations.translate( + i18.beneficiaryDetails.datadownloadreport, ), + style: theme.textTheme.displayMedium, + overflow: TextOverflow.ellipsis, ), ), - ...downSyncList.map( - (e) => DigitCard( - child: Column( - children: [ - DigitTableCard( - element: { - localizations.translate( - i18.beneficiaryDetails.boundary, - ): e.boundaryName!, - localizations.translate( - i18.beneficiaryDetails.status, - ): e.offset == 0 && e.limit == 0 - ? localizations.translate( - i18.beneficiaryDetails - .downloadcompleted, - ) - : localizations.translate( - i18.beneficiaryDetails - .partialdownloaded, - ), - localizations.translate( - i18.beneficiaryDetails.downloadtime, - ): e.lastSyncedTime != null - ? '${DigitDateUtils.getTimeFromTimestamp(e.lastSyncedTime!)} on ${DigitDateUtils.getDateFromTimestamp(e.lastSyncedTime!)}' - : '--', - localizations.translate( - i18.beneficiaryDetails.totalrecorddownload, - ): e.offset == 0 && e.limit == 0 - ? '${e.totalCount}/${e.totalCount}' - : '${e.offset}/${e.totalCount}', - }, + ), + ...downSyncList.map( + (e) => DigitCard( + child: Column( + children: [ + DigitTableCard( + element: { + localizations.translate( + i18.beneficiaryDetails.boundary, + ): e.boundaryName!, + localizations.translate( + i18.beneficiaryDetails.status, + ): e.offset == 0 && e.limit == 0 + ? localizations.translate( + i18.beneficiaryDetails + .downloadcompleted, + ) + : localizations.translate( + i18.beneficiaryDetails + .partialdownloaded, + ), + localizations.translate( + i18.beneficiaryDetails.downloadtime, + ): e.lastSyncedTime != null + ? '${DigitDateUtils.getTimeFromTimestamp(e.lastSyncedTime!)} on ${DigitDateUtils.getDateFromTimestamp(e.lastSyncedTime!)}' + : '--', + localizations.translate( + i18.beneficiaryDetails.totalrecorddownload, + ): e.offset == 0 && e.limit == 0 + ? '${e.totalCount}/${e.totalCount}' + : '${e.offset}/${e.totalCount}', + }, + ), + DigitOutLineButton( + label: localizations.translate( + i18.beneficiaryDetails.download, ), - DigitOutLineButton( - label: localizations.translate( - i18.beneficiaryDetails.download, + buttonStyle: OutlinedButton.styleFrom( + backgroundColor: Colors.white, + side: BorderSide( + width: 1.0, + color: theme.colorScheme.secondary, ), - buttonStyle: OutlinedButton.styleFrom( - backgroundColor: Colors.white, - side: BorderSide( - width: 1.0, - color: theme.colorScheme.secondary, - ), - minimumSize: Size( - MediaQuery.of(context).size.width, - 50, - ), + minimumSize: Size( + MediaQuery.of(context).size.width, + 50, ), - onPressed: () { - setState(() { - selectedBoundary = BoundaryModel( - code: e.locality, - name: e.boundaryName, - ); - }); - context.read().add( - DownSyncGetBatchSizeEvent( - appConfiguration: [ - appConfiguration, - ], - projectId: context.projectId, - boundaryCode: e.locality!, - pendingSyncCount: pendingSyncCount, - boundaryName: - e.boundaryName.toString(), - ), - ); - }, ), - ], - ), + onPressed: () { + setState(() { + selectedBoundary = BoundaryModel( + code: e.locality, + name: e.boundaryName, + ); + }); + context.read().add( + DownSyncGetBatchSizeEvent( + appConfiguration: [ + appConfiguration, + ], + projectId: context.projectId, + boundaryCode: e.locality!, + pendingSyncCount: pendingSyncCount, + boundaryName: e.boundaryName.toString(), + ), + ); + }, + ), + ], ), ), - downSyncList.isEmpty - ? NoResultCard( - align: Alignment.center, - label: localizations.translate( - i18.common.noResultsFound, - ), - ) - : const SizedBox.shrink(), - ]), - ), + ), + downSyncList.isEmpty + ? NoResultCard( + align: Alignment.center, + label: localizations.translate( + i18.common.noResultsFound, + ), + ) + : const SizedBox.shrink(), + ]), ), ], ), @@ -434,4 +426,16 @@ class BeneficiariesReportState extends LocalizedState { ), ); } + + void listenToSyncCount() async { + syncSubscription = context.syncCount().listen((state) { + state.maybeWhen( + orElse: () {}, + pendingSync: (count) { + setState(() { + pendingSyncCount = count; + }); + }); + }); + } } diff --git a/apps/health_campaign_field_worker_app/lib/router/app_router.dart b/apps/health_campaign_field_worker_app/lib/router/app_router.dart index 50382946e..f588a1f49 100644 --- a/apps/health_campaign_field_worker_app/lib/router/app_router.dart +++ b/apps/health_campaign_field_worker_app/lib/router/app_router.dart @@ -3,6 +3,9 @@ import 'package:attendance_management/router/attendance_router.gm.dart'; import 'package:auto_route/auto_route.dart'; import 'package:closed_household/router/closed_household_router.dart'; import 'package:closed_household/router/closed_household_router.gm.dart'; +import 'package:complaints/router/complaints_router.dart'; +import 'package:complaints/router/complaints_router.gm.dart'; +import 'package:digit_data_model/data_model.dart'; import 'package:digit_data_model/data_model.dart'; import 'package:digit_dss/router/dashboard_router.dart'; import 'package:digit_dss/router/dashboard_router.gm.dart'; @@ -15,27 +18,13 @@ import 'package:referral_reconciliation/router/referral_reconciliation_router.da import 'package:referral_reconciliation/router/referral_reconciliation_router.gm.dart'; import 'package:registration_delivery/router/registration_delivery_router.dart'; import 'package:registration_delivery/router/registration_delivery_router.gm.dart'; +import 'package:survey_form/router/survey_form_router.dart'; +import 'package:survey_form/router/survey_form_router.gm.dart'; import '../blocs/localization/app_localization.dart'; import '../pages/acknowledgement.dart'; import '../pages/authenticated.dart'; import '../pages/boundary_selection.dart'; -import '../pages/checklist/checklist.dart'; -import '../pages/checklist/checklist_boundary_view.dart'; -import '../pages/checklist/checklist_preview.dart'; -import '../pages/checklist/checklist_view.dart'; -import '../pages/checklist/checklist_wrapper.dart'; -import '../pages/complaints/inbox/complaints_details_view.dart'; -import '../pages/complaints/inbox/complaints_inbox.dart'; -import '../pages/complaints/inbox/complaints_inbox_filter.dart'; -import '../pages/complaints/inbox/complaints_inbox_search.dart'; -import '../pages/complaints/inbox/complaints_inbox_sort.dart'; -import '../pages/complaints/inbox/complaints_inbox_wrapper.dart'; -import '../pages/complaints/registration/complaint_type.dart'; -import '../pages/complaints/registration/complaints_details.dart'; -import '../pages/complaints/registration/complaints_location.dart'; -import '../pages/complaints/registration/complaints_registration_wrapper.dart'; -import '../pages/complaints_acknowledgement.dart'; import '../pages/home.dart'; import '../pages/language_selection.dart'; import '../pages/login.dart'; @@ -59,6 +48,8 @@ part 'app_router.gr.dart'; RegistrationDeliveryRoute, ClosedHouseholdPackageRoute, DashboardRoute, + SurveyFormRoute, + ComplaintsRoute ], ) class AppRouter extends _$AppRouter { @@ -96,145 +87,34 @@ class AppRouter extends _$AppRouter { page: UserDashboardRoute.page, path: 'dashboard', ), - AutoRoute( - page: RegistrationDeliveryWrapperRoute.page, - path: 'registration-delivery-wrapper', - children: [ - AutoRoute( - initial: true, - page: SearchBeneficiaryRoute.page, - path: 'search-beneficiary'), - - /// Beneficiary Registration - AutoRoute( - page: BeneficiaryRegistrationWrapperRoute.page, - path: 'beneficiary-registration', - children: [ - AutoRoute( - page: IndividualDetailsRoute.page, - path: 'individual-details'), - AutoRoute( - page: HouseHoldDetailsRoute.page, - path: 'household-details'), - AutoRoute( - page: HouseDetailsRoute.page, path: 'house-details'), - AutoRoute( - page: HouseholdLocationRoute.page, - path: 'household-location', - initial: true, - ), - AutoRoute( - page: BeneficiaryAcknowledgementRoute.page, - path: 'beneficiary-acknowledgement', - ), - AutoRoute( - page: SummaryRoute.page, - path: 'beneficiary-summary', - ), - ], - ), - AutoRoute( - page: BeneficiaryWrapperRoute.page, - path: 'beneficiary', - children: [ - AutoRoute( - page: HouseholdOverviewRoute.page, - path: 'overview', - initial: true, - ), - AutoRoute( - page: BeneficiaryChecklistRoute.page, - path: 'beneficiary-checklist', - ), - AutoRoute( - page: BeneficiaryDetailsRoute.page, - path: 'beneficiary-details', - ), - AutoRoute( - page: DeliverInterventionRoute.page, - path: 'deliver-intervention', - ), - AutoRoute( - page: RefusedDeliveryRoute.page, - path: 'refused-delivery', - ), - AutoRoute( - page: SideEffectsRoute.page, - path: 'side-effects', - ), - AutoRoute( - page: ReferBeneficiaryRoute.page, - path: 'refer-beneficiary', - ), - AutoRoute( - page: DoseAdministeredRoute.page, - path: 'dose-administered', - ), - AutoRoute( - page: SplashAcknowledgementRoute.page, - path: 'splash-acknowledgement', - ), - AutoRoute( - page: ReasonForDeletionRoute.page, - path: 'reason-for-deletion', - ), - AutoRoute( - page: RecordPastDeliveryDetailsRoute.page, - path: 'record-past-delivery-details', - ), - AutoRoute( - page: HouseholdAcknowledgementRoute.page, - path: 'household-acknowledgement', - ), - AutoRoute(page: ChecklistViewRoute.page, path: 'view'), - AutoRoute( - page: DeliverySummaryRoute.page, - path: 'delivery-summary', - ), - ], - ), - ]), + ...RegistrationDeliveryRoute().routes, /// close household - AutoRoute( - page: ClosedHouseholdWrapperRoute.page, - path: 'closed-household-wrapper', - children: [ - AutoRoute( - page: ClosedHouseholdDetailsRoute.page, - path: 'closed-household-details', - initial: true, - ), - AutoRoute( - page: ClosedHouseholdSummaryRoute.page, - path: 'closed-household-summary'), - AutoRoute( - page: ClosedHouseholdAcknowledgementRoute.page, - path: 'closed-household-acknowledgement'), - ]), + ...ClosedHouseholdPackageRoute().routes, AutoRoute( - page: ChecklistWrapperRoute.page, - path: 'checklist', + page: SurveyFormWrapperRoute.page, + path: 'surveyForm', children: [ AutoRoute( - page: ChecklistRoute.page, + page: SurveyformRoute.page, path: '', ), AutoRoute( - page: ChecklistBoundaryViewRoute.page, path: 'view-boundary'), - AutoRoute(page: ChecklistViewRoute.page, path: 'view'), - AutoRoute(page: ChecklistPreviewRoute.page, path: 'preview'), + page: SurveyFormBoundaryViewRoute.page, + path: 'view-boundary'), + AutoRoute(page: SurveyFormViewRoute.page, path: 'view'), + AutoRoute(page: SurveyFormPreviewRoute.page, path: 'preview'), + AutoRoute( + page: SurveyFormAcknowledgementRoute.page, + path: 'surveyForm-acknowledgement'), ]), AutoRoute( page: BeneficiaryAcknowledgementRoute.page, path: 'beneficiary-acknowledgement', ), AutoRoute(page: AcknowledgementRoute.page, path: 'acknowledgement'), - AutoRoute( - page: ComplaintsAcknowledgementRoute.page, - path: 'complaints-acknowledgement', - ), + AutoRoute( page: ProjectFacilitySelectionRoute.page, path: 'select-project-facilities', @@ -257,7 +137,7 @@ class AppRouter extends _$AppRouter { path: 'select-boundary', ), - /// Complaints Inbox + // INFO : Need to add Router of package Here AutoRoute( page: ComplaintsInboxWrapperRoute.page, path: 'complaints-inbox', @@ -307,87 +187,20 @@ class AppRouter extends _$AppRouter { ], ), - // Attendance Route - AutoRoute( - page: ManageAttendanceRoute.page, - path: 'manage-attendance', - ), - AutoRoute( - page: AttendanceDateSessionSelectionRoute.page, - path: 'attendance-date-session-selection', - ), - AutoRoute( - page: MarkAttendanceRoute.page, - path: 'mark-attendance', - ), + /// Complaints Acknowledgemnet AutoRoute( - page: AttendanceAcknowledgementRoute.page, - path: 'attendance-acknowledgement', + page: ComplaintsAcknowledgementRoute.page, + path: 'complaints-acknowledgement', ), + // Attendance Route + ...AttendanceRoute().routes, + //Inventory Route - AutoRoute( - page: ManageStocksRoute.page, - path: 'manage-stocks', - ), - AutoRoute( - page: RecordStockWrapperRoute.page, - path: 'record-stock', - children: [ - AutoRoute( - page: WarehouseDetailsRoute.page, - path: 'warehouse-details', - initial: true), - AutoRoute(page: StockDetailsRoute.page, path: 'details'), - ]), - AutoRoute( - page: InventoryFacilitySelectionRoute.page, - path: 'inventory-select-facilities'), - AutoRoute( - page: StockReconciliationRoute.page, path: 'stock-reconciliation'), - AutoRoute( - page: InventoryReportSelectionRoute.page, - path: 'inventory-report-selection'), - AutoRoute( - page: InventoryReportDetailsRoute.page, - path: 'inventory-report-details'), - AutoRoute( - page: InventoryAcknowledgementRoute.page, - path: 'inventory-acknowledgement'), + ...InventoryRoute().routes, // Referral Reconciliation Route - AutoRoute( - page: HFCreateReferralWrapperRoute.page, - path: 'hf-referral', - children: [ - AutoRoute( - page: ReferralFacilityRoute.page, - path: 'facility-details', - initial: true), - AutoRoute( - page: RecordReferralDetailsRoute.page, - path: 'referral-details'), - AutoRoute( - page: ReferralReasonChecklistRoute.page, - path: 'referral-checklist-create', - ), - AutoRoute( - page: ReferralReasonChecklistPreviewRoute.page, - path: 'referral-checklist-view', - ), - ]), - AutoRoute( - page: ReferralReconAcknowledgementRoute.page, - path: 'referral-acknowledgement', - ), - AutoRoute( - page: ReferralReconProjectFacilitySelectionRoute.page, - path: 'referral-project-facility', - ), - AutoRoute( - page: SearchReferralReconciliationsRoute.page, - path: 'search-referrals', - ), + ...ReferralReconciliationRoute().routes, ], ) ]; diff --git a/apps/health_campaign_field_worker_app/lib/router/app_router.gr.dart b/apps/health_campaign_field_worker_app/lib/router/app_router.gr.dart index 68d85a6af..2fcad75ee 100644 --- a/apps/health_campaign_field_worker_app/lib/router/app_router.gr.dart +++ b/apps/health_campaign_field_worker_app/lib/router/app_router.gr.dart @@ -55,179 +55,6 @@ abstract class _$AppRouter extends RootStackRouter { ), ); }, - ChecklistBoundaryViewRoute.name: (routeData) { - final args = routeData.argsAs( - orElse: () => const ChecklistBoundaryViewRouteArgs()); - return AutoRoutePage( - routeData: routeData, - child: ChecklistBoundaryViewPage( - key: args.key, - appLocalizations: args.appLocalizations, - ), - ); - }, - ChecklistRoute.name: (routeData) { - final args = routeData.argsAs( - orElse: () => const ChecklistRouteArgs()); - return AutoRoutePage( - routeData: routeData, - child: ChecklistPage( - key: args.key, - appLocalizations: args.appLocalizations, - ), - ); - }, - ChecklistPreviewRoute.name: (routeData) { - final args = routeData.argsAs( - orElse: () => const ChecklistPreviewRouteArgs()); - return AutoRoutePage( - routeData: routeData, - child: ChecklistPreviewPage( - key: args.key, - appLocalizations: args.appLocalizations, - ), - ); - }, - ChecklistViewRoute.name: (routeData) { - final args = routeData.argsAs( - orElse: () => const ChecklistViewRouteArgs()); - return AutoRoutePage( - routeData: routeData, - child: ChecklistViewPage( - key: args.key, - referralClientRefId: args.referralClientRefId, - appLocalizations: args.appLocalizations, - ), - ); - }, - ChecklistWrapperRoute.name: (routeData) { - final args = routeData.argsAs( - orElse: () => const ChecklistWrapperRouteArgs()); - return AutoRoutePage( - routeData: routeData, - child: WrappedRoute( - child: ChecklistWrapperPage( - key: args.key, - isEditing: args.isEditing, - )), - ); - }, - ComplaintTypeRoute.name: (routeData) { - final args = routeData.argsAs( - orElse: () => const ComplaintTypeRouteArgs()); - return AutoRoutePage( - routeData: routeData, - child: ComplaintTypePage( - key: args.key, - appLocalizations: args.appLocalizations, - ), - ); - }, - ComplaintsAcknowledgementRoute.name: (routeData) { - final args = routeData.argsAs( - orElse: () => const ComplaintsAcknowledgementRouteArgs()); - return AutoRoutePage( - routeData: routeData, - child: ComplaintsAcknowledgementPage( - key: args.key, - appLocalizations: args.appLocalizations, - ), - ); - }, - ComplaintsDetailsRoute.name: (routeData) { - final args = routeData.argsAs( - orElse: () => const ComplaintsDetailsRouteArgs()); - return AutoRoutePage( - routeData: routeData, - child: ComplaintsDetailsPage( - key: args.key, - appLocalizations: args.appLocalizations, - ), - ); - }, - ComplaintsDetailsViewRoute.name: (routeData) { - final args = routeData.argsAs(); - return AutoRoutePage( - routeData: routeData, - child: ComplaintsDetailsViewPage( - key: args.key, - complaint: args.complaint, - ), - ); - }, - ComplaintsInboxFilterRoute.name: (routeData) { - final args = routeData.argsAs( - orElse: () => const ComplaintsInboxFilterRouteArgs()); - return AutoRoutePage( - routeData: routeData, - child: ComplaintsInboxFilterPage( - key: args.key, - appLocalizations: args.appLocalizations, - ), - ); - }, - ComplaintsInboxRoute.name: (routeData) { - final args = routeData.argsAs( - orElse: () => const ComplaintsInboxRouteArgs()); - return AutoRoutePage( - routeData: routeData, - child: ComplaintsInboxPage( - key: args.key, - appLocalizations: args.appLocalizations, - ), - ); - }, - ComplaintsInboxSearchRoute.name: (routeData) { - final args = routeData.argsAs( - orElse: () => const ComplaintsInboxSearchRouteArgs()); - return AutoRoutePage( - routeData: routeData, - child: ComplaintsInboxSearchPage( - key: args.key, - appLocalizations: args.appLocalizations, - ), - ); - }, - ComplaintsInboxSortRoute.name: (routeData) { - final args = routeData.argsAs( - orElse: () => const ComplaintsInboxSortRouteArgs()); - return AutoRoutePage( - routeData: routeData, - child: ComplaintsInboxSortPage( - key: args.key, - appLocalizations: args.appLocalizations, - ), - ); - }, - ComplaintsInboxWrapperRoute.name: (routeData) { - return AutoRoutePage( - routeData: routeData, - child: const ComplaintsInboxWrapperPage(), - ); - }, - ComplaintsLocationRoute.name: (routeData) { - final args = routeData.argsAs( - orElse: () => const ComplaintsLocationRouteArgs()); - return AutoRoutePage( - routeData: routeData, - child: ComplaintsLocationPage( - key: args.key, - appLocalizations: args.appLocalizations, - ), - ); - }, - ComplaintsRegistrationWrapperRoute.name: (routeData) { - final args = routeData.argsAs( - orElse: () => const ComplaintsRegistrationWrapperRouteArgs()); - return AutoRoutePage( - routeData: routeData, - child: WrappedRoute( - child: ComplaintsRegistrationWrapperPage( - key: args.key, - pgrServiceModel: args.pgrServiceModel, - )), - ); - }, HomeRoute.name: (routeData) { final args = routeData.argsAs(orElse: () => const HomeRouteArgs()); @@ -312,6 +139,8 @@ abstract class _$AppRouter extends RootStackRouter { ...RegistrationDeliveryRoute().pagesMap, ...ClosedHouseholdPackageRoute().pagesMap, ...DashboardRoute().pagesMap, + ...SurveyFormRoute().pagesMap, + ...ComplaintsRoute().pagesMap, }; } @@ -455,603 +284,6 @@ class BoundarySelectionRouteArgs { } } -/// generated route for -/// [ChecklistBoundaryViewPage] -class ChecklistBoundaryViewRoute - extends PageRouteInfo { - ChecklistBoundaryViewRoute({ - Key? key, - AppLocalizations? appLocalizations, - List? children, - }) : super( - ChecklistBoundaryViewRoute.name, - args: ChecklistBoundaryViewRouteArgs( - key: key, - appLocalizations: appLocalizations, - ), - initialChildren: children, - ); - - static const String name = 'ChecklistBoundaryViewRoute'; - - static const PageInfo page = - PageInfo(name); -} - -class ChecklistBoundaryViewRouteArgs { - const ChecklistBoundaryViewRouteArgs({ - this.key, - this.appLocalizations, - }); - - final Key? key; - - final AppLocalizations? appLocalizations; - - @override - String toString() { - return 'ChecklistBoundaryViewRouteArgs{key: $key, appLocalizations: $appLocalizations}'; - } -} - -/// generated route for -/// [ChecklistPage] -class ChecklistRoute extends PageRouteInfo { - ChecklistRoute({ - Key? key, - AppLocalizations? appLocalizations, - List? children, - }) : super( - ChecklistRoute.name, - args: ChecklistRouteArgs( - key: key, - appLocalizations: appLocalizations, - ), - initialChildren: children, - ); - - static const String name = 'ChecklistRoute'; - - static const PageInfo page = - PageInfo(name); -} - -class ChecklistRouteArgs { - const ChecklistRouteArgs({ - this.key, - this.appLocalizations, - }); - - final Key? key; - - final AppLocalizations? appLocalizations; - - @override - String toString() { - return 'ChecklistRouteArgs{key: $key, appLocalizations: $appLocalizations}'; - } -} - -/// generated route for -/// [ChecklistPreviewPage] -class ChecklistPreviewRoute extends PageRouteInfo { - ChecklistPreviewRoute({ - Key? key, - AppLocalizations? appLocalizations, - List? children, - }) : super( - ChecklistPreviewRoute.name, - args: ChecklistPreviewRouteArgs( - key: key, - appLocalizations: appLocalizations, - ), - initialChildren: children, - ); - - static const String name = 'ChecklistPreviewRoute'; - - static const PageInfo page = - PageInfo(name); -} - -class ChecklistPreviewRouteArgs { - const ChecklistPreviewRouteArgs({ - this.key, - this.appLocalizations, - }); - - final Key? key; - - final AppLocalizations? appLocalizations; - - @override - String toString() { - return 'ChecklistPreviewRouteArgs{key: $key, appLocalizations: $appLocalizations}'; - } -} - -/// generated route for -/// [ChecklistViewPage] -class ChecklistViewRoute extends PageRouteInfo { - ChecklistViewRoute({ - Key? key, - String? referralClientRefId, - AppLocalizations? appLocalizations, - List? children, - }) : super( - ChecklistViewRoute.name, - args: ChecklistViewRouteArgs( - key: key, - referralClientRefId: referralClientRefId, - appLocalizations: appLocalizations, - ), - initialChildren: children, - ); - - static const String name = 'ChecklistViewRoute'; - - static const PageInfo page = - PageInfo(name); -} - -class ChecklistViewRouteArgs { - const ChecklistViewRouteArgs({ - this.key, - this.referralClientRefId, - this.appLocalizations, - }); - - final Key? key; - - final String? referralClientRefId; - - final AppLocalizations? appLocalizations; - - @override - String toString() { - return 'ChecklistViewRouteArgs{key: $key, referralClientRefId: $referralClientRefId, appLocalizations: $appLocalizations}'; - } -} - -/// generated route for -/// [ChecklistWrapperPage] -class ChecklistWrapperRoute extends PageRouteInfo { - ChecklistWrapperRoute({ - Key? key, - bool isEditing = false, - List? children, - }) : super( - ChecklistWrapperRoute.name, - args: ChecklistWrapperRouteArgs( - key: key, - isEditing: isEditing, - ), - initialChildren: children, - ); - - static const String name = 'ChecklistWrapperRoute'; - - static const PageInfo page = - PageInfo(name); -} - -class ChecklistWrapperRouteArgs { - const ChecklistWrapperRouteArgs({ - this.key, - this.isEditing = false, - }); - - final Key? key; - - final bool isEditing; - - @override - String toString() { - return 'ChecklistWrapperRouteArgs{key: $key, isEditing: $isEditing}'; - } -} - -/// generated route for -/// [ComplaintTypePage] -class ComplaintTypeRoute extends PageRouteInfo { - ComplaintTypeRoute({ - Key? key, - AppLocalizations? appLocalizations, - List? children, - }) : super( - ComplaintTypeRoute.name, - args: ComplaintTypeRouteArgs( - key: key, - appLocalizations: appLocalizations, - ), - initialChildren: children, - ); - - static const String name = 'ComplaintTypeRoute'; - - static const PageInfo page = - PageInfo(name); -} - -class ComplaintTypeRouteArgs { - const ComplaintTypeRouteArgs({ - this.key, - this.appLocalizations, - }); - - final Key? key; - - final AppLocalizations? appLocalizations; - - @override - String toString() { - return 'ComplaintTypeRouteArgs{key: $key, appLocalizations: $appLocalizations}'; - } -} - -/// generated route for -/// [ComplaintsAcknowledgementPage] -class ComplaintsAcknowledgementRoute - extends PageRouteInfo { - ComplaintsAcknowledgementRoute({ - Key? key, - AppLocalizations? appLocalizations, - List? children, - }) : super( - ComplaintsAcknowledgementRoute.name, - args: ComplaintsAcknowledgementRouteArgs( - key: key, - appLocalizations: appLocalizations, - ), - initialChildren: children, - ); - - static const String name = 'ComplaintsAcknowledgementRoute'; - - static const PageInfo page = - PageInfo(name); -} - -class ComplaintsAcknowledgementRouteArgs { - const ComplaintsAcknowledgementRouteArgs({ - this.key, - this.appLocalizations, - }); - - final Key? key; - - final AppLocalizations? appLocalizations; - - @override - String toString() { - return 'ComplaintsAcknowledgementRouteArgs{key: $key, appLocalizations: $appLocalizations}'; - } -} - -/// generated route for -/// [ComplaintsDetailsPage] -class ComplaintsDetailsRoute extends PageRouteInfo { - ComplaintsDetailsRoute({ - Key? key, - AppLocalizations? appLocalizations, - List? children, - }) : super( - ComplaintsDetailsRoute.name, - args: ComplaintsDetailsRouteArgs( - key: key, - appLocalizations: appLocalizations, - ), - initialChildren: children, - ); - - static const String name = 'ComplaintsDetailsRoute'; - - static const PageInfo page = - PageInfo(name); -} - -class ComplaintsDetailsRouteArgs { - const ComplaintsDetailsRouteArgs({ - this.key, - this.appLocalizations, - }); - - final Key? key; - - final AppLocalizations? appLocalizations; - - @override - String toString() { - return 'ComplaintsDetailsRouteArgs{key: $key, appLocalizations: $appLocalizations}'; - } -} - -/// generated route for -/// [ComplaintsDetailsViewPage] -class ComplaintsDetailsViewRoute - extends PageRouteInfo { - ComplaintsDetailsViewRoute({ - Key? key, - required PgrServiceModel complaint, - List? children, - }) : super( - ComplaintsDetailsViewRoute.name, - args: ComplaintsDetailsViewRouteArgs( - key: key, - complaint: complaint, - ), - initialChildren: children, - ); - - static const String name = 'ComplaintsDetailsViewRoute'; - - static const PageInfo page = - PageInfo(name); -} - -class ComplaintsDetailsViewRouteArgs { - const ComplaintsDetailsViewRouteArgs({ - this.key, - required this.complaint, - }); - - final Key? key; - - final PgrServiceModel complaint; - - @override - String toString() { - return 'ComplaintsDetailsViewRouteArgs{key: $key, complaint: $complaint}'; - } -} - -/// generated route for -/// [ComplaintsInboxFilterPage] -class ComplaintsInboxFilterRoute - extends PageRouteInfo { - ComplaintsInboxFilterRoute({ - Key? key, - AppLocalizations? appLocalizations, - List? children, - }) : super( - ComplaintsInboxFilterRoute.name, - args: ComplaintsInboxFilterRouteArgs( - key: key, - appLocalizations: appLocalizations, - ), - initialChildren: children, - ); - - static const String name = 'ComplaintsInboxFilterRoute'; - - static const PageInfo page = - PageInfo(name); -} - -class ComplaintsInboxFilterRouteArgs { - const ComplaintsInboxFilterRouteArgs({ - this.key, - this.appLocalizations, - }); - - final Key? key; - - final AppLocalizations? appLocalizations; - - @override - String toString() { - return 'ComplaintsInboxFilterRouteArgs{key: $key, appLocalizations: $appLocalizations}'; - } -} - -/// generated route for -/// [ComplaintsInboxPage] -class ComplaintsInboxRoute extends PageRouteInfo { - ComplaintsInboxRoute({ - Key? key, - AppLocalizations? appLocalizations, - List? children, - }) : super( - ComplaintsInboxRoute.name, - args: ComplaintsInboxRouteArgs( - key: key, - appLocalizations: appLocalizations, - ), - initialChildren: children, - ); - - static const String name = 'ComplaintsInboxRoute'; - - static const PageInfo page = - PageInfo(name); -} - -class ComplaintsInboxRouteArgs { - const ComplaintsInboxRouteArgs({ - this.key, - this.appLocalizations, - }); - - final Key? key; - - final AppLocalizations? appLocalizations; - - @override - String toString() { - return 'ComplaintsInboxRouteArgs{key: $key, appLocalizations: $appLocalizations}'; - } -} - -/// generated route for -/// [ComplaintsInboxSearchPage] -class ComplaintsInboxSearchRoute - extends PageRouteInfo { - ComplaintsInboxSearchRoute({ - Key? key, - AppLocalizations? appLocalizations, - List? children, - }) : super( - ComplaintsInboxSearchRoute.name, - args: ComplaintsInboxSearchRouteArgs( - key: key, - appLocalizations: appLocalizations, - ), - initialChildren: children, - ); - - static const String name = 'ComplaintsInboxSearchRoute'; - - static const PageInfo page = - PageInfo(name); -} - -class ComplaintsInboxSearchRouteArgs { - const ComplaintsInboxSearchRouteArgs({ - this.key, - this.appLocalizations, - }); - - final Key? key; - - final AppLocalizations? appLocalizations; - - @override - String toString() { - return 'ComplaintsInboxSearchRouteArgs{key: $key, appLocalizations: $appLocalizations}'; - } -} - -/// generated route for -/// [ComplaintsInboxSortPage] -class ComplaintsInboxSortRoute - extends PageRouteInfo { - ComplaintsInboxSortRoute({ - Key? key, - AppLocalizations? appLocalizations, - List? children, - }) : super( - ComplaintsInboxSortRoute.name, - args: ComplaintsInboxSortRouteArgs( - key: key, - appLocalizations: appLocalizations, - ), - initialChildren: children, - ); - - static const String name = 'ComplaintsInboxSortRoute'; - - static const PageInfo page = - PageInfo(name); -} - -class ComplaintsInboxSortRouteArgs { - const ComplaintsInboxSortRouteArgs({ - this.key, - this.appLocalizations, - }); - - final Key? key; - - final AppLocalizations? appLocalizations; - - @override - String toString() { - return 'ComplaintsInboxSortRouteArgs{key: $key, appLocalizations: $appLocalizations}'; - } -} - -/// generated route for -/// [ComplaintsInboxWrapperPage] -class ComplaintsInboxWrapperRoute extends PageRouteInfo { - const ComplaintsInboxWrapperRoute({List? children}) - : super( - ComplaintsInboxWrapperRoute.name, - initialChildren: children, - ); - - static const String name = 'ComplaintsInboxWrapperRoute'; - - static const PageInfo page = PageInfo(name); -} - -/// generated route for -/// [ComplaintsLocationPage] -class ComplaintsLocationRoute - extends PageRouteInfo { - ComplaintsLocationRoute({ - Key? key, - AppLocalizations? appLocalizations, - List? children, - }) : super( - ComplaintsLocationRoute.name, - args: ComplaintsLocationRouteArgs( - key: key, - appLocalizations: appLocalizations, - ), - initialChildren: children, - ); - - static const String name = 'ComplaintsLocationRoute'; - - static const PageInfo page = - PageInfo(name); -} - -class ComplaintsLocationRouteArgs { - const ComplaintsLocationRouteArgs({ - this.key, - this.appLocalizations, - }); - - final Key? key; - - final AppLocalizations? appLocalizations; - - @override - String toString() { - return 'ComplaintsLocationRouteArgs{key: $key, appLocalizations: $appLocalizations}'; - } -} - -/// generated route for -/// [ComplaintsRegistrationWrapperPage] -class ComplaintsRegistrationWrapperRoute - extends PageRouteInfo { - ComplaintsRegistrationWrapperRoute({ - Key? key, - PgrServiceModel? pgrServiceModel, - List? children, - }) : super( - ComplaintsRegistrationWrapperRoute.name, - args: ComplaintsRegistrationWrapperRouteArgs( - key: key, - pgrServiceModel: pgrServiceModel, - ), - initialChildren: children, - ); - - static const String name = 'ComplaintsRegistrationWrapperRoute'; - - static const PageInfo page = - PageInfo(name); -} - -class ComplaintsRegistrationWrapperRouteArgs { - const ComplaintsRegistrationWrapperRouteArgs({ - this.key, - this.pgrServiceModel, - }); - - final Key? key; - - final PgrServiceModel? pgrServiceModel; - - @override - String toString() { - return 'ComplaintsRegistrationWrapperRouteArgs{key: $key, pgrServiceModel: $pgrServiceModel}'; - } -} - /// generated route for /// [HomePage] class HomeRoute extends PageRouteInfo { diff --git a/apps/health_campaign_field_worker_app/lib/utils/background_service.dart b/apps/health_campaign_field_worker_app/lib/utils/background_service.dart index d58ea8b9a..7a1584285 100644 --- a/apps/health_campaign_field_worker_app/lib/utils/background_service.dart +++ b/apps/health_campaign_field_worker_app/lib/utils/background_service.dart @@ -16,14 +16,14 @@ import 'package:flutter_local_notifications/flutter_local_notifications.dart'; import 'package:isar/isar.dart'; import 'package:package_info_plus/package_info_plus.dart'; import 'package:recase/recase.dart'; +import 'package:sync_service/data/sync_service.dart'; +import 'package:sync_service/models/bandwidth/bandwidth_model.dart'; import '../data/local_store/no_sql/schema/app_configuration.dart'; import '../data/local_store/no_sql/schema/service_registry.dart'; import '../data/local_store/secure_store/secure_store.dart'; -import '../data/network_manager.dart'; import '../data/remote_client.dart'; import '../data/repositories/remote/bandwidth_check.dart'; -import '../models/bandwidth/bandwidth_model.dart'; import '../widgets/network_manager_provider_wrapper.dart'; import 'environment_config.dart'; import 'utils.dart'; @@ -203,11 +203,8 @@ void onStart(ServiceInstance service) async { ), ), ); - final isSyncCompleted = await const NetworkManager( - configuration: NetworkManagerConfiguration( - persistenceConfig: PersistenceConfiguration.offlineFirst, - ), - ).performSync( + // Insert sync logic here + final isSyncCompleted = await SyncService().performSync( localRepositories: Constants.getLocalRepositories( _sql, _isar, diff --git a/apps/health_campaign_field_worker_app/lib/utils/constants.dart b/apps/health_campaign_field_worker_app/lib/utils/constants.dart index 6901971bd..fe95a6767 100644 --- a/apps/health_campaign_field_worker_app/lib/utils/constants.dart +++ b/apps/health_campaign_field_worker_app/lib/utils/constants.dart @@ -1,6 +1,7 @@ import 'package:attendance_management/attendance_management.dart'; import 'package:closed_household/utils/utils.dart'; import 'package:collection/collection.dart'; +import 'package:complaints/complaints.dart'; import 'package:digit_components/utils/app_logger.dart'; import 'package:digit_data_model/data_model.dart'; import 'package:digit_dss/digit_dss.dart'; @@ -14,6 +15,8 @@ import 'package:isar/isar.dart'; import 'package:path_provider/path_provider.dart'; import 'package:referral_reconciliation/referral_reconciliation.dart'; import 'package:registration_delivery/registration_delivery.dart'; +import 'package:survey_form/survey_form.dart'; +import 'package:sync_service/sync_service_lib.dart'; import '../data/local_store/no_sql/schema/app_configuration.dart'; import '../data/local_store/no_sql/schema/entity_mapper.dart'; @@ -22,6 +25,8 @@ import '../data/local_store/no_sql/schema/project_types.dart'; import '../data/local_store/no_sql/schema/row_versions.dart'; import '../data/local_store/no_sql/schema/service_registry.dart'; import '../data/repositories/remote/downsync.dart'; +import '../data/sync_registry.dart'; +import '../data/sync_service_mapper.dart'; import '../firebase_options.dart'; import 'environment_config.dart'; import 'utils.dart'; @@ -30,12 +35,15 @@ class Constants { late Future _isar; late String _version; static final Constants _instance = Constants._(); + Constants._() { _isar = openIsar(); } + factory Constants() { return _instance; } + Future initialize(version) async { await initializeAllMappers(); setInitialDataOfPackages(); @@ -75,14 +83,17 @@ class Constants { } static const String localizationApiPath = 'localization/messages/v1/_search'; - static const String checklistPreviewDateFormat = 'dd MMMM yyyy'; + static const String surveyFormPreviewDateFormat = 'dd MMMM yyyy'; static const String defaultDateFormat = 'dd/MM/yyyy'; static const String defaultDateTimeFormat = 'dd/MM/yyyy hh:mm a'; - static const String checklistViewDateFormat = 'dd/MM/yyyy hh:mm a'; - static const String healthFacilityChecklistPrefix = 'HF_RF'; + static const String surveyFormViewDateFormat = 'dd/MM/yyyy hh:mm a'; + static const String healthFacilitySurveyFormPrefix = 'HF_RF'; static const String boundaryLocalizationPath = 'rainmaker-boundary-admin'; + static RegExp mobileNumberRegExp = + RegExp(r'^(?=.{10}$)[+]*[(]{0,1}[0-9]{1,4}[)]{0,1}[-\s\./0-9]*$'); + static List getLocalRepositories( LocalSqlDataStore sql, Isar isar, @@ -113,10 +124,6 @@ class Constants { sql, BoundaryOpLogManager(isar), ), - PgrServiceLocalRepository( - sql, - PgrServiceOpLogManager(isar), - ), HouseholdMemberLocalRepository(sql, HouseholdMemberOpLogManager(isar)), HouseholdLocalRepository(sql, HouseholdOpLogManager(isar)), ProjectBeneficiaryLocalRepository( @@ -145,6 +152,10 @@ class Constants { sql, HFReferralOpLogManager(isar), ), + PgrServiceLocalRepository( + sql, + PgrServiceOpLogManager(isar), + ), LocationTrackerLocalBaseRepository( sql, LocationTrackerOpLogManager(isar)), ]; @@ -189,8 +200,6 @@ class Constants { remoteRepositories.addAll([ if (value == DataModelType.facility) FacilityRemoteRepository(dio, actionMap: actions), - if (value == DataModelType.complaints) - PgrServiceRemoteRepository(dio, actionMap: actions), if (value == DataModelType.productVariant) ProductVariantRemoteRepository(dio, actionMap: actions), if (value == DataModelType.boundary) @@ -233,6 +242,8 @@ class Constants { AttendanceLogRemoteRepository(dio, actionMap: actions), if (value == DataModelType.hFReferral) HFReferralRemoteRepository(dio, actionMap: actions), + if (value == DataModelType.complaints) + PgrServiceRemoteRepository(dio, actionMap: actions), if (value == DataModelType.userLocation) LocationTrackerRemoteRepository(dio, actionMap: actions), ]); @@ -276,6 +287,15 @@ class Constants { InventorySingleton().setTenantId(tenantId: envConfig.variables.tenantId); LocationTrackerSingleton() .setTenantId(tenantId: envConfig.variables.tenantId); + SyncServiceSingleton().setData( + syncDownRetryCount: envConfig.variables.syncDownRetryCount, + persistenceConfiguration: PersistenceConfiguration.offlineFirst, + entityMapper: SyncServiceMapper(), + ); + SyncServiceSingleton().setRegistries(SyncServiceRegistry()); + SyncServiceSingleton().registries?.registerSyncRegistries({ + DataModelType.complaints: (remote) => CustomSyncRegistry(remote), + }); } } @@ -285,6 +305,7 @@ final scaffoldMessengerKey = GlobalKey(); class KeyValue { String label; dynamic key; + KeyValue(this.label, this.key); } @@ -293,6 +314,7 @@ class StatusKeys { bool isBeneficiaryRefused; bool isBeneficiaryReferred; bool isStatusReset; + StatusKeys(this.isNotEligible, this.isBeneficiaryRefused, this.isBeneficiaryReferred, this.isStatusReset); } @@ -311,7 +333,7 @@ class Modules { } const String noResultSvg = 'assets/icons/svg/no_result.svg'; -const String myChecklistSvg = 'assets/icons/svg/mychecklist.svg'; +const String mySurveyFormSvg = 'assets/icons/svg/mychecklist.svg'; enum DigitProgressDialogType { inProgress, @@ -338,6 +360,7 @@ class DownloadBeneficiary { String? prefixLabel; String? suffixLabel; AppConfiguration? appConfiguartion; + DownloadBeneficiary({ required this.title, required this.projectId, diff --git a/apps/health_campaign_field_worker_app/lib/utils/extensions/context_utility.dart b/apps/health_campaign_field_worker_app/lib/utils/extensions/context_utility.dart index 595c4fa9f..de4dff872 100644 --- a/apps/health_campaign_field_worker_app/lib/utils/extensions/context_utility.dart +++ b/apps/health_campaign_field_worker_app/lib/utils/extensions/context_utility.dart @@ -104,6 +104,8 @@ extension ContextUtilityExtensions on BuildContext { ClosedHouseholdSingleton().setBoundary(boundary: selectedBoundary); InventorySingleton().setBoundaryName(boundaryName: selectedBoundary.name!); ReferralReconSingleton().setBoundary(boundary: selectedBoundary); + SurveyFormSingleton().setBoundary(boundary: selectedBoundary); + ComplaintsSingleton().setBoundary(boundary: selectedBoundary); AttendanceSingleton().setBoundary(boundary: selectedBoundary); LocationTrackerSingleton() .setBoundaryName(boundaryName: selectedBoundary.code!); @@ -224,4 +226,16 @@ extension ContextUtilityExtensions on BuildContext { throw AppException('Could not fetch ${T.runtimeType}'); } } + + // sync refresh + void syncRefresh() { + final syncBloc = _get(); + syncBloc.add(SyncRefreshEvent(loggedInUserUuid)); + } + + // insert sync count + Stream syncCount() { + final syncBloc = _get(); + return syncBloc.stream; + } } diff --git a/apps/health_campaign_field_worker_app/lib/utils/extensions/extensions.dart b/apps/health_campaign_field_worker_app/lib/utils/extensions/extensions.dart index 7ad448ecb..d2a24e841 100644 --- a/apps/health_campaign_field_worker_app/lib/utils/extensions/extensions.dart +++ b/apps/health_campaign_field_worker_app/lib/utils/extensions/extensions.dart @@ -1,7 +1,9 @@ -// Importing necessary packages and files +import 'dart:async'; + import 'package:attendance_management/attendance_management.dart'; import 'package:closed_household/utils/utils.dart'; import 'package:collection/collection.dart'; +import 'package:complaints/utils/utils.dart'; import 'package:digit_data_model/data_model.dart'; import 'package:digit_location_tracker/utils/utils.dart'; import 'package:flutter/material.dart'; @@ -11,6 +13,9 @@ import 'package:inventory_management/utils/utils.dart'; import 'package:package_info_plus/package_info_plus.dart'; import 'package:referral_reconciliation/utils/utils.dart'; import 'package:registration_delivery/registration_delivery.dart'; +// Importing necessary packages and files +import 'package:survey_form/utils/utils.dart'; +import 'package:sync_service/sync_service_lib.dart'; import '../../blocs/auth/auth.dart'; import '../../blocs/project/project.dart'; diff --git a/apps/health_campaign_field_worker_app/lib/utils/i18_key_constants.dart b/apps/health_campaign_field_worker_app/lib/utils/i18_key_constants.dart index 25fc33b2a..6e0940612 100644 --- a/apps/health_campaign_field_worker_app/lib/utils/i18_key_constants.dart +++ b/apps/health_campaign_field_worker_app/lib/utils/i18_key_constants.dart @@ -7,7 +7,6 @@ const home = Home(); const acknowledgementSuccess = AcknowledgementSuccess(); const adverseEvents = AdverseEvents(); const projectSelection = ProjectSelection(); -const checklist = Checklist(); const complaints = Complaints(); const syncDialog = SyncDialog(); const homeShowcase = HomeShowcase(); @@ -24,12 +23,12 @@ const selectStockShowcase = SelectStockShowcase(); const warehouseDetailsShowcase = WarehouseDetailsShowcase(); const stockDetailsReceiptShowcase = StockDetailsReceiptShowcase(); const stockDetailsIssuedShowcase = StockDetailsIssuedShowcase(); -const selectChecklistShowcase = SelectChecklistShowcase(); +const selectSurveyFormShowcase = SelectSurveyFormShowcase(); const stockDetailsReturnedShowcase = StockDetailsReturnedShowcase(); const stockReconciliationShowcase = StockReconciliationShowcase(); -const checklistDataShowcase = ChecklistDataShowcase(); -const checklistListShowcase = ChecklistListShowcase(); +const surveyFormDataShowcase = SurveyFormDataShowcase(); +const surveyFormListShowcase = SurveyFormListShowcase(); const complaintTypeShowcase = ComplaintTypeShowcase(); const complaintsDetailsShowcase = ComplaintsDetailsShowcase(); const complaintsDetailsViewShowcase = ComplaintsDetailsViewShowcase(); @@ -181,7 +180,7 @@ class HomeShowcase { return 'SUPERVISOR_HOME_SHOWCASE_PROGRESS_BAR'; } - String get supervisorMyChecklist { + String get supervisorMySurveyForm { return 'SUPERVISOR_HOME_SHOWCASE_MY_CHECKLIST'; } @@ -347,16 +346,16 @@ class Login { String get actionLabel => 'LOGIN_ACTION_LABEL'; } -class SelectChecklistShowcase { - const SelectChecklistShowcase(); +class SelectSurveyFormShowcase { + const SelectSurveyFormShowcase(); - String get selectChecklist { + String get selectSurveyForm { return 'SELECT_CHECKLIST_SHOWCASE_SELECT_CHECKLIST'; } } -class ChecklistDataShowcase { - const ChecklistDataShowcase(); +class SurveyFormDataShowcase { + const SurveyFormDataShowcase(); String get date { return 'CHECKLIST_DATA_SHOWCASE_DATE'; @@ -367,8 +366,8 @@ class ChecklistDataShowcase { } } -class ChecklistListShowcase { - const ChecklistListShowcase(); +class SurveyFormListShowcase { + const SurveyFormListShowcase(); String get open { return 'CHECKLIST_LIST_SHOWCASE_OPEN'; @@ -511,47 +510,6 @@ class ComplaintsInboxShowcase { } } -class Checklist { - const Checklist(); - - String get checklist => 'CHECKLIST'; - - String get checklistlabel => 'CHECKLIST_LABEL'; - - String get checklistCreateActionLabel => 'CHECKLIST_CREATE_ACTION_LABEL'; - - String get checklistViewActionLabel => 'CHECKLIST_VIEW_ACTION_LABEL'; - - String get checklistDetailLabel => 'CHECKLIST_DETAILS_LABEL'; - - String get checklistDialogLabel => 'CHECKLIST_DIALOG_LABEL'; - - String get checklistDialogDescription => 'CHECKLIST_DIALOG_DESCRITPTION'; - - String get checklistDialogPrimaryAction => 'CHECKLIST_DIALOG_PRIMARY_ACTION'; - - String get checklistDialogSecondaryAction => - 'CHECKLIST_DIALOG_SECONDARY_ACTION'; - - String get checklistdate => 'CHECKLIST_DATE'; - - String get checklistReasonRequiredError => 'CHECKLIST_REASON_REQUIRED_ERROR'; - - String get notSelectedKey => 'NOT_SELECTED'; - - String get checklistBackDialogLabel => 'CHECKLIST_BACK_DIALOG_LABEL'; - - String get checklistBackDialogDescription => - 'CHECKLIST_BACK_DIALOG_DESCRITPTION'; - - String get checklistBackDialogPrimaryAction => - 'CHECKLIST_BACK_DIALOG_PRIMARY_ACTION'; - - String get checklistBackDialogSecondaryAction => - 'CHECKLIST_BACK_DIALOG_SECONDARY_ACTION'; - - String get noChecklistFound => 'NO_CHECKLISTS_FOUND'; -} class ForgotPassword { const ForgotPassword(); @@ -592,7 +550,7 @@ class Home { String get dataSyncInfoContent => 'DATA_SYNC_INFO_CONTENT'; - String get myCheckList => 'MY_CHECK_LIST_LABEL'; + String get mySurveyForm => 'MY_CHECK_LIST_LABEL'; String get warehouseManagerCheckList => 'WAREHOUSE_MANAGER_CHECK_LIST_LABEL'; diff --git a/apps/health_campaign_field_worker_app/lib/utils/localization_delegates.dart b/apps/health_campaign_field_worker_app/lib/utils/localization_delegates.dart index 700760a8e..4da7c38a1 100644 --- a/apps/health_campaign_field_worker_app/lib/utils/localization_delegates.dart +++ b/apps/health_campaign_field_worker_app/lib/utils/localization_delegates.dart @@ -4,6 +4,10 @@ import 'package:attendance_management/blocs/app_localization.dart' as attendance_localization; import 'package:closed_household/blocs/app_localization.dart' as closed_household_localization; +import 'package:complaints/blocs/localization/app_localization.dart' + as complaints_localization; +import 'package:digit_components/blocs/localization.dart' + as component_localization; import 'package:digit_data_model/data/local_store/sql_store/sql_store.dart'; import 'package:digit_dss/blocs/app_localization.dart' as digit_dss_localization; @@ -16,7 +20,8 @@ import 'package:referral_reconciliation/blocs/app_localization.dart' as referral_reconciliation_localization; import 'package:registration_delivery/blocs/app_localization.dart' as registration_delivery_localization; -import 'package:digit_components/blocs/localization.dart' as component_localization; +import 'package:survey_form/blocs/app_localization.dart' + as survey_form_localization; import '../blocs/localization/app_localization.dart'; import '../data/local_store/no_sql/schema/app_configuration.dart'; @@ -32,6 +37,9 @@ getAppLocalizationDelegates({ GlobalWidgetsLocalizations.delegate, GlobalCupertinoLocalizations.delegate, GlobalMaterialLocalizations.delegate, + + // INFO : Need to add package delegates here + referral_reconciliation_localization.ReferralReconLocalization.getDelegate( LocalizationLocalRepository().returnLocalizationFromSQL(sql) as Future, appConfig.languages!, @@ -44,6 +52,10 @@ getAppLocalizationDelegates({ LocalizationLocalRepository().returnLocalizationFromSQL(sql) as Future, appConfig.languages!, ), + survey_form_localization.SurveyFormLocalization.getDelegate( + LocalizationLocalRepository().returnLocalizationFromSQL(sql) as Future, + appConfig.languages!, + ), scanner_localization.ScannerLocalization.getDelegate( LocalizationLocalRepository().returnLocalizationFromSQL(sql) as Future, appConfig.languages!, @@ -61,6 +73,10 @@ getAppLocalizationDelegates({ LocalizationLocalRepository().returnLocalizationFromSQL(sql) as Future, appConfig.languages!, ), + complaints_localization.ComplaintsLocalization.getDelegate( + LocalizationLocalRepository().returnLocalizationFromSQL(sql) as Future, + appConfig.languages!, + ), component_localization.ComponentLocalization.getDelegate( LocalizationLocalRepository().returnLocalizationFromSQL(sql) as Future, appConfig.languages!, diff --git a/apps/health_campaign_field_worker_app/lib/utils/typedefs.dart b/apps/health_campaign_field_worker_app/lib/utils/typedefs.dart index 1ad7ed7d9..9196fc719 100644 --- a/apps/health_campaign_field_worker_app/lib/utils/typedefs.dart +++ b/apps/health_campaign_field_worker_app/lib/utils/typedefs.dart @@ -21,13 +21,6 @@ typedef ProjectResourceDataRepository = DataRepository; typedef ProjectStaffDataRepository = DataRepository; -typedef ServiceDefinitionDataRepository - = DataRepository; -typedef ServiceDataRepository - = DataRepository; -typedef PgrServiceDataRepository - = DataRepository; - typedef UserDataRepository = DataRepository; typedef StockDataRepository = DataRepository; diff --git a/apps/health_campaign_field_worker_app/lib/utils/utils.dart b/apps/health_campaign_field_worker_app/lib/utils/utils.dart index 53065a7ee..fe1c005f5 100644 --- a/apps/health_campaign_field_worker_app/lib/utils/utils.dart +++ b/apps/health_campaign_field_worker_app/lib/utils/utils.dart @@ -5,12 +5,12 @@ import 'dart:io'; import 'package:attendance_management/attendance_management.dart' as attendance_mappers; +import 'package:complaints/complaints.init.dart' as complaints_mappers; import 'package:connectivity_plus/connectivity_plus.dart'; import 'package:digit_components/theme/digit_theme.dart'; import 'package:digit_components/widgets/atoms/digit_toaster.dart'; import 'package:digit_components/widgets/digit_dialog.dart'; import 'package:digit_components/widgets/digit_sync_dialog.dart'; -import 'package:digit_data_model/data_model.dart'; import 'package:digit_data_model/data_model.init.dart' as data_model_mappers; import 'package:digit_dss/digit_dss.dart' as dss_mappers; import 'package:disable_battery_optimization/disable_battery_optimization.dart'; @@ -25,6 +25,7 @@ import 'package:referral_reconciliation/referral_reconciliation.dart' as referral_reconciliation_mappers; import 'package:registration_delivery/registration_delivery.init.dart' as registration_delivery_mappers; +import 'package:survey_form/survey_form.init.dart' as survey_form_mappers; import '../blocs/app_initialization/app_initialization.dart'; import '../blocs/projects_beneficiary_downsync/project_beneficiaries_downsync.dart'; @@ -92,14 +93,14 @@ performBackgroundService({ }) async { final connectivityResult = await (Connectivity().checkConnectivity()); - final isOnline = connectivityResult == ConnectivityResult.wifi || - connectivityResult == ConnectivityResult.mobile; + final isOnline = connectivityResult.firstOrNull == ConnectivityResult.wifi || + connectivityResult.firstOrNull == ConnectivityResult.mobile; final service = FlutterBackgroundService(); var isRunning = await service.isRunning(); if (stopService) { if (isRunning) { - if (!isBackground && context != null) { + if (!isBackground && context != null && context.mounted) { if (context.mounted) { DigitToast.show( context, @@ -399,55 +400,12 @@ initializeAllMappers() async { Future(() => data_model_mappers.initializeMappers()), Future(() => registration_delivery_mappers.initializeMappers()), Future(() => dss_mappers.initializeMappers()), + Future(() => survey_form_mappers.initializeMappers()), + Future(() => complaints_mappers.initializeMappers()) ]; await Future.wait(initializations); } -int getSyncCount(List oplogs) { - int count = oplogs.where((element) { - if (element.syncedDown == false && element.syncedUp == true) { - switch (element.entityType) { - case DataModelType.household: - case DataModelType.individual: - case DataModelType.householdMember: - case DataModelType.projectBeneficiary: - case DataModelType.task: - case DataModelType.stock: - case DataModelType.stockReconciliation: - case DataModelType.sideEffect: - case DataModelType.referral: - case DataModelType.hFReferral: - case DataModelType.attendance: - return true; - default: - return false; - } - } else { - switch (element.entityType) { - case DataModelType.household: - case DataModelType.individual: - case DataModelType.householdMember: - case DataModelType.projectBeneficiary: - case DataModelType.task: - case DataModelType.stock: - case DataModelType.stockReconciliation: - case DataModelType.service: - case DataModelType.complaints: - case DataModelType.sideEffect: - case DataModelType.referral: - case DataModelType.hFReferral: - case DataModelType.attendance: - case DataModelType.userLocation: - return true; - default: - return false; - } - } - }).length; - - return count; -} - class LocalizationParams { static final LocalizationParams _singleton = LocalizationParams._internal(); diff --git a/apps/health_campaign_field_worker_app/lib/widgets/header/back_navigation_help_header.dart b/apps/health_campaign_field_worker_app/lib/widgets/header/back_navigation_help_header.dart index 4ed1bb053..e59929a49 100644 --- a/apps/health_campaign_field_worker_app/lib/widgets/header/back_navigation_help_header.dart +++ b/apps/health_campaign_field_worker_app/lib/widgets/header/back_navigation_help_header.dart @@ -41,11 +41,11 @@ class BackNavigationHelpHeaderWidget extends StatelessWidget { Flexible( child: TextButton.icon( style: TextButton.styleFrom( - foregroundColor: theme.colorScheme.onBackground, + foregroundColor: theme.colorScheme.onSurface, padding: EdgeInsets.zero, ), onPressed: () { - context.router.pop(); + context.router.maybePop(); handleback != null ? handleback!() : null; }, icon: const Icon(Icons.arrow_left_sharp), diff --git a/apps/health_campaign_field_worker_app/lib/widgets/network_manager_provider_wrapper.dart b/apps/health_campaign_field_worker_app/lib/widgets/network_manager_provider_wrapper.dart index 4cb9d89ba..7b00ea572 100644 --- a/apps/health_campaign_field_worker_app/lib/widgets/network_manager_provider_wrapper.dart +++ b/apps/health_campaign_field_worker_app/lib/widgets/network_manager_provider_wrapper.dart @@ -1,6 +1,7 @@ import 'dart:io'; import 'package:attendance_management/attendance_management.dart'; +import 'package:complaints/complaints.dart'; import 'package:digit_components/theme/digit_theme.dart'; import 'package:digit_components/widgets/digit_card.dart'; import 'package:digit_components/widgets/digit_elevated_button.dart'; @@ -18,6 +19,7 @@ import 'package:isar/isar.dart'; import 'package:provider/provider.dart'; import 'package:referral_reconciliation/referral_reconciliation.dart'; import 'package:registration_delivery/registration_delivery.dart'; +import 'package:survey_form/survey_form.dart'; import '../blocs/app_initialization/app_initialization.dart'; import '../data/local_store/downsync/downsync.dart'; @@ -182,13 +184,6 @@ class NetworkManagerProviderWrapper extends StatelessWidget { BoundaryOpLogManager(isar), ), ), - RepositoryProvider< - LocalRepository>( - create: (_) => PgrServiceLocalRepository( - sql, - PgrServiceOpLogManager(isar), - ), - ), RepositoryProvider< LocalRepository>( create: (_) => HouseholdMemberLocalRepository( @@ -275,6 +270,14 @@ class NetworkManagerProviderWrapper extends StatelessWidget { ), ), // INFO Need to add packages here + + RepositoryProvider< + LocalRepository>( + create: (_) => PgrServiceLocalRepository( + sql, + PgrServiceOpLogManager(isar), + ), + ), ]; } @@ -396,14 +399,7 @@ class NetworkManagerProviderWrapper extends StatelessWidget { actionMap: actions, ), ), - if (value == DataModelType.complaints) - RepositoryProvider< - RemoteRepository>( - create: (_) => PgrServiceRemoteRepository( - dio, - actionMap: actions, - ), - ), + if (value == DataModelType.user) RepositoryProvider>( create: (_) => UserRemoteRepository( @@ -502,6 +498,15 @@ class NetworkManagerProviderWrapper extends StatelessWidget { LocationTrackerRemoteRepository(dio, actionMap: actions), ), // INFO Need to add packages here + + if (value == DataModelType.complaints) + RepositoryProvider< + RemoteRepository>( + create: (_) => PgrServiceRemoteRepository( + dio, + actionMap: actions, + ), + ), ]); } diff --git a/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/checklist_data.dart b/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/checklist_data.dart deleted file mode 100644 index a81c6c73e..000000000 --- a/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/checklist_data.dart +++ /dev/null @@ -1,23 +0,0 @@ -part of 'showcase_constants.dart'; - -class _ChecklistDataShowcaseData { - static final _ChecklistDataShowcaseData _instance = - _ChecklistDataShowcaseData._(); - - _ChecklistDataShowcaseData._(); - - factory _ChecklistDataShowcaseData() => _instance; - - List get showcaseData => [ - date, - administrativeUnit, - ]; - - final date = ShowcaseItemBuilder( - messageLocalizationKey: i18.checklistDataShowcase.date, - ); - - final administrativeUnit = ShowcaseItemBuilder( - messageLocalizationKey: i18.checklistDataShowcase.administrativeUnit, - ); -} diff --git a/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/checklist_list.dart b/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/checklist_list.dart deleted file mode 100644 index da2297571..000000000 --- a/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/checklist_list.dart +++ /dev/null @@ -1,16 +0,0 @@ -part of 'showcase_constants.dart'; - -class _ChecklistListShowcaseData { - static final _ChecklistListShowcaseData _instance = - _ChecklistListShowcaseData._(); - - _ChecklistListShowcaseData._(); - - factory _ChecklistListShowcaseData() => _instance; - - List get showcaseData => [open]; - - final open = ShowcaseItemBuilder( - messageLocalizationKey: i18.checklistListShowcase.open, - ); -} diff --git a/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/home_showcase.dart b/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/home_showcase.dart index 0d712dc39..c5bc7380e 100644 --- a/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/home_showcase.dart +++ b/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/home_showcase.dart @@ -19,7 +19,7 @@ class _HomePageShowcaseData { warehouseManagerSyncData, inventoryReport, supervisorProgressBar, - supervisorMyChecklist, + supervisorMySurveyForm, supervisorComplaints, supervisorSyncData, deleteAll, @@ -68,8 +68,8 @@ class _HomePageShowcaseData { messageLocalizationKey: i18.homeShowcase.supervisorProgressBar, ); - final supervisorMyChecklist = ShowcaseItemBuilder( - messageLocalizationKey: i18.homeShowcase.supervisorMyChecklist, + final supervisorMySurveyForm = ShowcaseItemBuilder( + messageLocalizationKey: i18.homeShowcase.supervisorMySurveyForm, ); final supervisorComplaints = ShowcaseItemBuilder( diff --git a/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/select_checklist.dart b/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/select_checklist.dart deleted file mode 100644 index 87b725c9f..000000000 --- a/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/select_checklist.dart +++ /dev/null @@ -1,18 +0,0 @@ -part of 'showcase_constants.dart'; - -class _SelectChecklistShowcaseData { - static final _SelectChecklistShowcaseData _instance = - _SelectChecklistShowcaseData._(); - - _SelectChecklistShowcaseData._(); - - factory _SelectChecklistShowcaseData() => _instance; - - List get showcaseData => [ - selectChecklist, - ]; - - final selectChecklist = ShowcaseItemBuilder( - messageLocalizationKey: i18.selectChecklistShowcase.selectChecklist, - ); -} diff --git a/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/select_survey_form.dart b/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/select_survey_form.dart new file mode 100644 index 000000000..52c59b8d6 --- /dev/null +++ b/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/select_survey_form.dart @@ -0,0 +1,18 @@ +part of 'showcase_constants.dart'; + +class _SelectSurveyFormShowcaseData { + static final _SelectSurveyFormShowcaseData _instance = + _SelectSurveyFormShowcaseData._(); + + _SelectSurveyFormShowcaseData._(); + + factory _SelectSurveyFormShowcaseData() => _instance; + + List get showcaseData => [ + selectSurveyForm, + ]; + + final selectSurveyForm = ShowcaseItemBuilder( + messageLocalizationKey: i18.selectSurveyFormShowcase.selectSurveyForm, + ); +} diff --git a/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/showcase_constants.dart b/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/showcase_constants.dart index 89a6fe8f0..54e64a0d3 100644 --- a/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/showcase_constants.dart +++ b/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/showcase_constants.dart @@ -1,10 +1,10 @@ import '../../../utils/i18_key_constants.dart' as i18; import '../showcase_wrappers.dart'; -part 'checklist_data.dart'; -part 'checklist_list.dart'; +part 'survey_form_data.dart'; +part 'survey_form_list.dart'; part 'home_showcase.dart'; -part 'select_checklist.dart'; +part 'select_survey_form.dart'; part 'select_stock_showcase.dart'; part 'stock_details.dart'; part 'stock_reconciliation.dart'; @@ -19,9 +19,9 @@ final selectStockShowcaseData = _SelectStockShowcaseData(); final warehouseDetailsShowcaseData = _WarehouseDetailsShowcaseData(); final stockDetailsShowcaseData = _StockDetailsShowcaseData(); final stockReconciliationShowcaseData = _StockReconciliationShowcaseData(); -final selectChecklistShowcaseData = _SelectChecklistShowcaseData(); -final checklistDataShowcaseData = _ChecklistDataShowcaseData(); -final checklistListShowcaseData = _ChecklistListShowcaseData(); +final selectSurveyFormShowcaseData = _SelectSurveyFormShowcaseData(); +final surveyFormDataShowcaseData = _SurveyFormDataShowcaseData(); +final surveyFormListShowcaseData = _SurveyFormListShowcaseData(); final complaintsInboxShowcaseData = _ComplaintsInboxShowcaseData(); final complaintsDetailsViewShowcaseData = _ComplaintsDetailsViewShowcaseData(); final complaintTypeShowcaseData = _ComplaintTypeShowcaseData(); diff --git a/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/survey_form_data.dart b/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/survey_form_data.dart new file mode 100644 index 000000000..0f2bdb86b --- /dev/null +++ b/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/survey_form_data.dart @@ -0,0 +1,24 @@ + +part of 'showcase_constants.dart'; + +class _SurveyFormDataShowcaseData { + static final _SurveyFormDataShowcaseData _instance = + _SurveyFormDataShowcaseData._(); + + _SurveyFormDataShowcaseData._(); + + factory _SurveyFormDataShowcaseData() => _instance; + + List get showcaseData => [ + date, + administrativeUnit, + ]; + + final date = ShowcaseItemBuilder( + messageLocalizationKey: i18.surveyFormDataShowcase.date, + ); + + final administrativeUnit = ShowcaseItemBuilder( + messageLocalizationKey: i18.surveyFormDataShowcase.administrativeUnit, + ); +} diff --git a/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/survey_form_list.dart b/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/survey_form_list.dart new file mode 100644 index 000000000..61de98372 --- /dev/null +++ b/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/survey_form_list.dart @@ -0,0 +1,16 @@ +part of 'showcase_constants.dart'; + +class _SurveyFormListShowcaseData { + static final _SurveyFormListShowcaseData _instance = + _SurveyFormListShowcaseData._(); + + _SurveyFormListShowcaseData._(); + + factory _SurveyFormListShowcaseData() => _instance; + + List get showcaseData => [open]; + + final open = ShowcaseItemBuilder( + messageLocalizationKey: i18.surveyFormListShowcase.open, + ); +} diff --git a/apps/health_campaign_field_worker_app/lib/widgets/showcase/showcase_button.dart b/apps/health_campaign_field_worker_app/lib/widgets/showcase/showcase_button.dart index 347693423..79b803f8e 100644 --- a/apps/health_campaign_field_worker_app/lib/widgets/showcase/showcase_button.dart +++ b/apps/health_campaign_field_worker_app/lib/widgets/showcase/showcase_button.dart @@ -1,3 +1,4 @@ +import 'package:complaints/router/complaints_router.gm.dart'; import 'package:digit_components/theme/digit_theme.dart'; import 'package:digit_showcase/showcase_widget.dart'; import 'package:flutter/material.dart'; @@ -73,18 +74,6 @@ class _ShowcaseButtonState extends LocalizedState { return stockReconciliationShowcaseData.showcaseData.map( (e) => e.showcaseKey, ); - case ChecklistRoute.name: - return selectChecklistShowcaseData.showcaseData.map( - (e) => e.showcaseKey, - ); - case ChecklistBoundaryViewRoute.name: - return checklistDataShowcaseData.showcaseData.map( - (e) => e.showcaseKey, - ); - case ChecklistPreviewRoute.name: - return checklistListShowcaseData.showcaseData.map( - (e) => e.showcaseKey, - ); case ComplaintTypeRoute.name: return complaintTypeShowcaseData.showcaseData.map( (e) => e.showcaseKey, diff --git a/apps/health_campaign_field_worker_app/lib/widgets/sidebar/side_bar.dart b/apps/health_campaign_field_worker_app/lib/widgets/sidebar/side_bar.dart index 07530a05d..688e0984b 100644 --- a/apps/health_campaign_field_worker_app/lib/widgets/sidebar/side_bar.dart +++ b/apps/health_campaign_field_worker_app/lib/widgets/sidebar/side_bar.dart @@ -13,6 +13,7 @@ import '../../blocs/localization/localization.dart'; import '../../models/data_model.dart'; import '../../models/entities/roles_type.dart'; import '../../router/app_router.dart'; +import '../../utils/environment_config.dart'; import '../../utils/i18_key_constants.dart' as i18; import '../../utils/utils.dart'; @@ -33,13 +34,12 @@ class SideBar extends StatelessWidget { : false; return BlocBuilder(builder: (context, state) { - return Column( - children: [ + return SingleChildScrollView( + child: Column(children: [ Container( color: theme.colorScheme.secondary.withOpacity(0.12), child: SizedBox( width: MediaQuery.of(context).size.width, - height: 280, child: state.maybeMap( authenticated: (value) => Column( mainAxisAlignment: MainAxisAlignment.center, @@ -110,9 +110,7 @@ class SideBar extends StatelessWidget { i18.common.coreCommonlanguage, ), icon: Icons.language, - onPressed: () { - - }, + onPressed: () {}, content: Offstage( offstage: languages == null, child: BlocBuilder( @@ -130,14 +128,8 @@ class SideBar extends StatelessWidget { context .read() .add(LocalizationEvent.onLoadLocalization( - module: localizationModulesList - .interfaces - .where((element) => - element.type == - Modules.localizationModule) - .map((e) => e.name.toString()) - .join(',') - .toString(), + module: + "hcm-boundary-${envConfig.variables.hierarchyType.toLowerCase()},${localizationModulesList.interfaces.where((element) => element.type == Modules.localizationModule).map((e) => e.name.toString()).join(',')}", tenantId: appConfig.tenantId ?? "default", locale: value.value.toString(), @@ -185,9 +177,9 @@ class SideBar extends StatelessWidget { onPressed: () async { final connectivityResult = await (Connectivity().checkConnectivity()); - final isOnline = - connectivityResult == ConnectivityResult.wifi || - connectivityResult == ConnectivityResult.mobile; + final isOnline = connectivityResult.firstOrNull == + ConnectivityResult.wifi || + connectivityResult.firstOrNull == ConnectivityResult.mobile; if (isOnline) { if (context.mounted) { @@ -242,7 +234,7 @@ class SideBar extends StatelessWidget { PoweredByDigit( version: Constants().version, ), - ], + ]), ); }); } diff --git a/apps/health_campaign_field_worker_app/pubspec.lock b/apps/health_campaign_field_worker_app/pubspec.lock index 20561c7a7..dff3b3736 100644 --- a/apps/health_campaign_field_worker_app/pubspec.lock +++ b/apps/health_campaign_field_worker_app/pubspec.lock @@ -13,10 +13,10 @@ packages: dependency: transitive description: name: _flutterfire_internals - sha256: "4eec93681221723a686ad580c2e7d960e1017cf1a4e0a263c2573c2c6b0bf5cd" + sha256: "37a42d06068e2fe3deddb2da079a8c4d105f241225ba27b7122b37e9865fd8f7" url: "https://pub.dev" source: hosted - version: "1.3.25" + version: "1.3.35" analyzer: dependency: transitive description: @@ -37,26 +37,26 @@ packages: dependency: transitive description: name: ansicolor - sha256: "8bf17a8ff6ea17499e40a2d2542c2f481cd7615760c6d34065cb22bfd22e6880" + sha256: "50e982d500bc863e1d703448afdbf9e5a72eb48840a4f766fa361ffd6877055f" url: "https://pub.dev" source: hosted - version: "2.0.2" + version: "2.0.3" archive: dependency: transitive description: name: archive - sha256: "6bd38d335f0954f5fad9c79e614604fbf03a0e5b975923dd001b6ea965ef5b4b" + sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d url: "https://pub.dev" source: hosted - version: "3.6.0" + version: "3.6.1" args: dependency: transitive description: name: args - sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" + sha256: bf9f5caeea8d8fe6721a9c358dd8a5c1947b27f1cfaa18b39c301273594919e6 url: "https://pub.dev" source: hosted - version: "2.5.0" + version: "2.6.0" async: dependency: transitive description: @@ -69,12 +69,12 @@ packages: dependency: "direct main" description: name: attendance_management - sha256: "8a09814ca11cca736d771be70fb6174303ea0cb3525aa72e7239cbc14b915303" + sha256: "7221a7ed0d20cbbb45357dca59c6f6aa247e935247eeb5a8991b79fa809200e4" url: "https://pub.dev" source: hosted - version: "1.0.2+4" + version: "1.0.3" audioplayers: - dependency: "direct main" + dependency: transitive description: name: audioplayers sha256: c05c6147124cd63e725e861335a8b4d57300b80e6e92cea7c145c739223bbaef @@ -133,34 +133,34 @@ packages: dependency: "direct main" description: name: auto_route - sha256: eb33554581a0a4aa7e6da0f13a44291a55bf71359012f1d9feb41634ff908ff8 + sha256: a9001a90539ca3effc168f7e1029a5885c7326b9032c09ac895e303c1d137704 url: "https://pub.dev" source: hosted - version: "7.9.2" + version: "8.3.0" auto_route_generator: dependency: "direct dev" description: name: auto_route_generator - sha256: "11067a3bcd643812518fe26c0c9ec073990286cabfd9d74b6da9ef9b913c4d22" + sha256: ba28133d3a3bf0a66772bcc98dade5843753cd9f1a8fb4802b842895515b67d3 url: "https://pub.dev" source: hosted - version: "7.3.2" + version: "8.0.0" battery_plus: dependency: "direct main" description: name: battery_plus - sha256: ba605aeafd6609cb5f8020c609a51941803a5fb2b6a7576f7c7eeeb52d29e750 + sha256: ccc1322fee1153a0f89e663e0eac2f64d659da506454cf24dcad75eb08ae138b url: "https://pub.dev" source: hosted - version: "5.0.3" + version: "6.0.2" battery_plus_platform_interface: dependency: transitive description: name: battery_plus_platform_interface - sha256: "942707f90e2f7481dcb178df02e22a9c6971b3562b848d6a1b8c7cff9f1a1fec" + sha256: e8342c0f32de4b1dfd0223114b6785e48e579bfc398da9471c9179b907fa4910 url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "2.0.1" bloc: dependency: transitive description: @@ -213,10 +213,10 @@ packages: dependency: transitive description: name: build_daemon - sha256: "0343061a33da9c5810b2d6cee51945127d8f4c060b7fbdd9d54917f0a3feaaa1" + sha256: "79b2aef6ac2ed00046867ed354c88778c9c0f029df8a20fe10b5436826721ef9" url: "https://pub.dev" source: hosted - version: "4.0.1" + version: "4.0.2" build_resolvers: dependency: transitive description: @@ -229,18 +229,18 @@ packages: dependency: "direct dev" description: name: build_runner - sha256: "3ac61a79bfb6f6cc11f693591063a7f19a7af628dc52f141743edac5c16e8c22" + sha256: "644dc98a0f179b872f612d3eb627924b578897c629788e858157fa5e704ca0c7" url: "https://pub.dev" source: hosted - version: "2.4.9" + version: "2.4.11" build_runner_core: dependency: transitive description: name: build_runner_core - sha256: "4ae8ffe5ac758da294ecf1802f2aff01558d8b1b00616aa7538ea9a8a5d50799" + sha256: e3c79f69a64bdfcd8a776a3c28db4eb6e3fb5356d013ae5eb2e52007706d5dbe url: "https://pub.dev" source: hosted - version: "7.3.0" + version: "7.3.1" built_collection: dependency: transitive description: @@ -258,45 +258,45 @@ packages: source: hosted version: "8.9.2" camera: - dependency: "direct main" + dependency: transitive description: name: camera - sha256: "9499cbc2e51d8eb0beadc158b288380037618ce4e30c9acbc4fae1ac3ecb5797" + sha256: "26ff41045772153f222ffffecba711a206f670f5834d40ebf5eed3811692f167" url: "https://pub.dev" source: hosted - version: "0.10.5+9" - camera_android: + version: "0.11.0+2" + camera_android_camerax: dependency: transitive description: - name: camera_android - sha256: b350ac087f111467e705b2b76cc1322f7f5bdc122aa83b4b243b0872f390d229 + name: camera_android_camerax + sha256: "594b40a5ea0e144fdfe49e4036abe4ec9bd578b2ce3aabdb0668a02db376a1e8" url: "https://pub.dev" source: hosted - version: "0.10.9+2" + version: "0.6.7" camera_avfoundation: dependency: transitive description: name: camera_avfoundation - sha256: "608b56b0880722f703871329c4d7d4c2f379c8e2936940851df7fc041abc6f51" + sha256: "2e4c568f70e406ccb87376bc06b53d2f5bebaab71e2fbcc1a950e31449381bcf" url: "https://pub.dev" source: hosted - version: "0.9.13+10" + version: "0.9.17+5" camera_platform_interface: dependency: transitive description: name: camera_platform_interface - sha256: a250314a48ea337b35909a4c9d5416a208d736dcb01d0b02c6af122be66660b0 + sha256: b3ede1f171532e0d83111fe0980b46d17f1aa9788a07a2fbed07366bbdbb9061 url: "https://pub.dev" source: hosted - version: "2.7.4" + version: "2.8.0" camera_web: dependency: transitive description: name: camera_web - sha256: "9e9aba2fbab77ce2472924196ff8ac4dd8f9126c4f9a3096171cd1d870d6b26c" + sha256: "595f28c89d1fb62d77c73c633193755b781c6d2e0ebcd8dc25b763b514e6ba8f" url: "https://pub.dev" source: hosted - version: "0.3.3" + version: "0.3.5" characters: dependency: transitive description: @@ -309,10 +309,10 @@ packages: dependency: transitive description: name: charcode - sha256: fb98c0f6d12c920a02ee2d998da788bca066ca5f148492b7085ee23372b12306 + sha256: fb0f1107cac15a5ea6ef0a6ef71a807b9e4267c713bb93e00e92d737cc8dbd8a url: "https://pub.dev" source: hosted - version: "1.3.1" + version: "1.4.0" checked_yaml: dependency: transitive description: @@ -325,10 +325,10 @@ packages: dependency: transitive description: name: cli_util - sha256: c05b7406fdabc7a49a3929d4af76bcaccbbffcbcdcf185b082e1ae07da323d19 + sha256: ff6785f7e9e3c38ac98b2fb035701789de90154024a75b6cb926445e83197d1c url: "https://pub.dev" source: hosted - version: "0.4.1" + version: "0.4.2" clock: dependency: transitive description: @@ -341,10 +341,10 @@ packages: dependency: "direct main" description: name: closed_household - sha256: d216dbc8e263c9be576e3747ceee9715a6a96e6056a7a812847fb44589f515e8 + sha256: d3e78f1a1f65a88b695d37d4fbf217cd3e259c8fdb11402dfb821225a11726c2 url: "https://pub.dev" source: hosted - version: "1.0.1+1" + version: "1.0.3" code_builder: dependency: transitive description: @@ -361,54 +361,70 @@ packages: url: "https://pub.dev" source: hosted version: "1.18.0" + complaints: + dependency: "direct main" + description: + name: complaints + sha256: "6e383d4be32cee58696258c2f58176ef9869b2afc4aeed252e4b3757eb4bfb76" + url: "https://pub.dev" + source: hosted + version: "1.0.0" connectivity_plus: dependency: "direct main" description: name: connectivity_plus - sha256: "224a77051d52a11fbad53dd57827594d3bd24f945af28bd70bab376d68d437f0" + sha256: "876849631b0c7dc20f8b471a2a03142841b482438e3b707955464f5ffca3e4c3" url: "https://pub.dev" source: hosted - version: "5.0.2" + version: "6.1.0" connectivity_plus_platform_interface: dependency: transitive description: name: connectivity_plus_platform_interface - sha256: cf1d1c28f4416f8c654d7dc3cd638ec586076255d407cef3ddbdaf178272a71a + sha256: "42657c1715d48b167930d5f34d00222ac100475f73d10162ddf43e714932f204" url: "https://pub.dev" source: hosted - version: "1.2.4" + version: "2.0.1" convert: dependency: transitive description: name: convert - sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68 url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "3.1.2" coverage: dependency: transitive description: name: coverage - sha256: "595a29b55ce82d53398e1bcc2cba525d7bd7c59faeb2d2540e9d42c390cfeeeb" + sha256: e3493833ea012784c740e341952298f1cc77f1f01b1bbc3eb4eecf6984fb7f43 url: "https://pub.dev" source: hosted - version: "1.6.4" + version: "1.11.1" cross_file: dependency: transitive description: name: cross_file - sha256: fedaadfa3a6996f75211d835aaeb8fede285dae94262485698afd832371b9a5e + sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670" url: "https://pub.dev" source: hosted - version: "0.3.3+8" + version: "0.3.4+2" crypto: dependency: transitive description: name: crypto - sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855" url: "https://pub.dev" source: hosted - version: "3.0.3" + version: "3.0.6" + csslib: + dependency: transitive + description: + name: csslib + sha256: "09bad715f418841f976c77db72d5398dc1253c21fb9c0c7f0b0b985860b2d58e" + url: "https://pub.dev" + source: hosted + version: "1.0.2" cupertino_icons: dependency: "direct main" description: @@ -421,19 +437,18 @@ packages: dependency: "direct main" description: name: dart_mappable - sha256: "47269caf2060533c29b823ff7fa9706502355ffcb61e7f2a374e3a0fb2f2c3f0" + sha256: f69a961ae8589724ebb542e588f228ae844c5f78028899cbe2cc718977c1b382 url: "https://pub.dev" source: hosted - version: "4.2.2" + version: "4.3.0" dart_mappable_builder: dependency: "direct dev" description: - path: "packages/dart_mappable_builder" - ref: master - resolved-ref: e3d8ac43f70568b4a17c200cae5cde285050ef23 - url: "https://github.com/egovernments/health-campaign-field-worker-app/" - source: git - version: "4.2.0" + name: dart_mappable_builder + sha256: "04a6e7117382f8a8689b3e363bee6c3de8c9ea4332e664148fe01bd576eb1126" + url: "https://pub.dev" + source: hosted + version: "4.3.0" dart_style: dependency: transitive description: @@ -478,10 +493,10 @@ packages: dependency: transitive description: name: device_info_plus_platform_interface - sha256: d3b01d5868b50ae571cd1dc6e502fc94d956b665756180f7b16ead09e836fd64 + sha256: "282d3cf731045a2feb66abfe61bbc40870ae50a3ed10a4d3d217556c35c8c2ba" url: "https://pub.dev" source: hosted - version: "7.0.0" + version: "7.0.1" diff_match_patch: dependency: transitive description: @@ -494,26 +509,26 @@ packages: dependency: "direct main" description: name: digit_components - sha256: "07b585e5d8010639366da72a4a8b215ce9b8790c75b2162b66af3cea57ca35d9" + sha256: "7097c7e8bd2fa96415eb4049a7fc2e4cb3dcb5a913d63703ca69cb785a069300" url: "https://pub.dev" source: hosted - version: "1.0.2+1" + version: "1.0.3" digit_data_model: dependency: "direct main" description: name: digit_data_model - sha256: "08f5273e691cc16e0f89aefac97887abb63739b7db3a00165c1be269aacedffd" + sha256: c3bc7299a7d927ebb83d8e91c1d7a8a51f6a1d1295dafeacb642012b72b99a2f url: "https://pub.dev" source: hosted - version: "1.0.4+1" + version: "1.0.5" digit_dss: dependency: "direct main" description: name: digit_dss - sha256: "32e2173ae52e7fd9fb53fa435fb21466248029366584f44a0c0f2c6836267a98" + sha256: cb5ae888503260dff1df2d4785ba2cac39a20348cfcd660e2212a8965b948dba url: "https://pub.dev" source: hosted - version: "1.0.1" + version: "1.0.3" digit_firebase_services: dependency: "direct main" description: @@ -526,18 +541,18 @@ packages: dependency: "direct main" description: name: digit_location_tracker - sha256: "1ea40a1373cac2c90659432a5531cd96489d2bd4d9a719f2ae3978ea60662ab6" + sha256: a93bda5b07db112210e08c7a76f0627957d931d5106c8a7db8876503cc2fd06f url: "https://pub.dev" source: hosted - version: "0.0.1-dev.1" + version: "1.0.0" digit_scanner: dependency: "direct main" description: name: digit_scanner - sha256: "9862c4885465bb1942e36dc9b42596c201648db9b0f5ffb8ad768e2409fc2742" + sha256: c33af61ed9ab3d7740fc3c8948af4b763d946cba5e902f8bfb00948d4d69d60a url: "https://pub.dev" source: hosted - version: "1.0.3+1" + version: "1.0.4" digit_showcase: dependency: "direct main" description: @@ -546,14 +561,30 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.0" + digit_ui_components: + dependency: "direct main" + description: + name: digit_ui_components + sha256: "57c4da5237be6025783e7357a02b6b492f02e38f711d674bf46f5f8c8a93ad76" + url: "https://pub.dev" + source: hosted + version: "0.0.2-dev.4" dio: dependency: "direct main" description: name: dio - sha256: "11e40df547d418cc0c4900a9318b26304e665da6fa4755399a9ff9efd09034b5" + sha256: "5598aa796bbf4699afd5c67c0f5f6e2ed542afc956884b9cd58c306966efc260" + url: "https://pub.dev" + source: hosted + version: "5.7.0" + dio_web_adapter: + dependency: transitive + description: + name: dio_web_adapter + sha256: "33259a9276d6cea88774a0000cfae0d861003497755969c92faa223108620dc8" url: "https://pub.dev" source: hosted - version: "5.4.3+1" + version: "2.0.0" disable_battery_optimization: dependency: "direct main" description: @@ -562,22 +593,30 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.1" - disk_space: + disk_space_update: dependency: "direct main" description: - name: disk_space - sha256: fb27eb2d09ac04784f45b95b1355538b2355c76a081eeaa8439d1a5cfa263888 + name: disk_space_update + sha256: "65e19384334779537f7ec83a939c5991bf56bfe016672335ea47d62374f08a3c" url: "https://pub.dev" source: hosted - version: "0.2.1" + version: "0.0.2" + dotted_border: + dependency: transitive + description: + name: dotted_border + sha256: "108837e11848ca776c53b30bc870086f84b62ed6e01c503ed976e8f8c7df9c04" + url: "https://pub.dev" + source: hosted + version: "2.1.0" drift: dependency: "direct main" description: name: drift - sha256: b50a8342c6ddf05be53bda1d246404cbad101b64dc73e8d6d1ac1090d119b4e2 + sha256: "6acedc562ffeed308049f78fb1906abad3d65714580b6745441ee6d50ec564cd" url: "https://pub.dev" source: hosted - version: "2.15.0" + version: "2.18.0" drift_db_viewer: dependency: "direct main" description: @@ -590,26 +629,26 @@ packages: dependency: "direct dev" description: name: drift_dev - sha256: c037d9431b6f8dc633652b1469e5f53aaec6e4eb405ed29dd232fa888ef10d88 + sha256: d9b020736ea85fff1568699ce18b89fabb3f0f042e8a7a05e84a3ec20d39acde url: "https://pub.dev" source: hosted - version: "2.15.0" + version: "2.18.0" easy_stepper: dependency: transitive description: name: easy_stepper - sha256: "77f3ab4ee3c867b5a2236bf712abb08fed2b1c533cf24cf3fcd46c2821072ffd" + sha256: "63f66314a509ec690c8152a41288961fd96ba9e92ef184299f068a5e78bd16ad" url: "https://pub.dev" source: hosted - version: "0.5.2+1" + version: "0.8.5+1" equatable: dependency: transitive description: name: equatable - sha256: c2b87cb7756efdf69892005af546c56c0b5037f54d2a88269b4f347a505e3ca2 + sha256: "567c64b3cb4cf82397aac55f4f0cbd3ca20d77c6c03bedbc4ceaddc08904aef7" url: "https://pub.dev" source: hosted - version: "2.0.5" + version: "2.0.7" expandable: dependency: "direct main" description: @@ -630,66 +669,106 @@ packages: dependency: transitive description: name: ffi - sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" + sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.3" file: dependency: transitive description: name: file - sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" + sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" url: "https://pub.dev" source: hosted - version: "6.1.4" + version: "7.0.0" + file_picker: + dependency: transitive + description: + name: file_picker + sha256: "825aec673606875c33cd8d3c4083f1a3c3999015a84178b317b7ef396b7384f3" + url: "https://pub.dev" + source: hosted + version: "8.0.7" + file_selector_linux: + dependency: transitive + description: + name: file_selector_linux + sha256: "54cbbd957e1156d29548c7d9b9ec0c0ebb6de0a90452198683a7d23aed617a33" + url: "https://pub.dev" + source: hosted + version: "0.9.3+2" + file_selector_macos: + dependency: transitive + description: + name: file_selector_macos + sha256: "271ab9986df0c135d45c3cdb6bd0faa5db6f4976d3e4b437cf7d0f258d941bfc" + url: "https://pub.dev" + source: hosted + version: "0.9.4+2" + file_selector_platform_interface: + dependency: transitive + description: + name: file_selector_platform_interface + sha256: a3994c26f10378a039faa11de174d7b78eb8f79e4dd0af2a451410c1a5c3f66b + url: "https://pub.dev" + source: hosted + version: "2.6.2" + file_selector_windows: + dependency: transitive + description: + name: file_selector_windows + sha256: "8f5d2f6590d51ecd9179ba39c64f722edc15226cc93dcc8698466ad36a4a85a4" + url: "https://pub.dev" + source: hosted + version: "0.9.3+3" firebase_core: dependency: transitive description: name: firebase_core - sha256: "53316975310c8af75a96e365f9fccb67d1c544ef0acdbf0d88bbe30eedd1c4f9" + sha256: "26de145bb9688a90962faec6f838247377b0b0d32cc0abecd9a4e43525fc856c" url: "https://pub.dev" source: hosted - version: "2.27.0" + version: "2.32.0" firebase_core_platform_interface: dependency: transitive description: name: firebase_core_platform_interface - sha256: c437ae5d17e6b5cc7981cf6fd458a5db4d12979905f9aafd1fea930428a9fe63 + sha256: b94b217e3ad745e784960603d33d99471621ecca151c99c670869b76e50ad2a6 url: "https://pub.dev" source: hosted - version: "5.0.0" + version: "5.3.1" firebase_core_web: dependency: transitive description: name: firebase_core_web - sha256: c8e1d59385eee98de63c92f961d2a7062c5d9a65e7f45bdc7f1b0b205aab2492 + sha256: "362e52457ed2b7b180964769c1e04d1e0ea0259fdf7025fdfedd019d4ae2bd88" url: "https://pub.dev" source: hosted - version: "2.11.5" + version: "2.17.5" firebase_crashlytics: dependency: transitive description: name: firebase_crashlytics - sha256: c4f1b723d417bc9c4774810e774ff91df8fb0032d33fb2888b2c887e865581b8 + sha256: "9897c01efaa950d2f6da8317d12452749a74dc45f33b46390a14cfe28067f271" url: "https://pub.dev" source: hosted - version: "3.4.18" + version: "3.5.7" firebase_crashlytics_platform_interface: dependency: transitive description: name: firebase_crashlytics_platform_interface - sha256: c5a11fca3df76a98e3fa68fde8b10a08aacb9a7639f619fbfd4dad6c67a08643 + sha256: "16a71e08fbf6e00382816e1b13397898c29a54fa0ad969c2c2a3b82a704877f0" url: "https://pub.dev" source: hosted - version: "3.6.25" + version: "3.6.35" fixnum: dependency: transitive description: name: fixnum - sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.1" flutter: dependency: "direct main" description: flutter @@ -731,23 +810,47 @@ packages: dependency: "direct main" description: name: flutter_bloc - sha256: f0ecf6e6eb955193ca60af2d5ca39565a86b8a142452c5b24d96fb477428f4d2 + sha256: b594505eac31a0518bdcb4b5b79573b8d9117b193cc80cc12e17d639b10aa27a url: "https://pub.dev" source: hosted - version: "8.1.5" + version: "8.1.6" flutter_dotenv: dependency: "direct main" description: name: flutter_dotenv - sha256: "9357883bdd153ab78cbf9ffa07656e336b8bbb2b5a3ca596b0b27e119f7c7d77" + sha256: b7c7be5cd9f6ef7a78429cabd2774d3c4af50e79cb2b7593e3d5d763ef95c61b url: "https://pub.dev" source: hosted - version: "5.1.0" + version: "5.2.1" flutter_driver: dependency: transitive description: flutter source: sdk version: "0.0.0" + flutter_dropzone: + dependency: transitive + description: + name: flutter_dropzone + sha256: b399c60411f9bf9c4c2f97933c6a3a185859e75aade8897831e76cee4346c8e1 + url: "https://pub.dev" + source: hosted + version: "3.0.7" + flutter_dropzone_platform_interface: + dependency: transitive + description: + name: flutter_dropzone_platform_interface + sha256: b4e2df75364bab2f4c3ca32b87193267d786b6e158c3f345c3a1daeb911d82b9 + url: "https://pub.dev" + source: hosted + version: "2.0.6" + flutter_dropzone_web: + dependency: transitive + description: + name: flutter_dropzone_web + sha256: c5a0fdb63b7216352a01761ec1b6eba1982e49541e60675735e2d3d95e207b19 + url: "https://pub.dev" + source: hosted + version: "3.0.13" flutter_focus_watcher: dependency: transitive description: @@ -816,34 +919,34 @@ packages: dependency: "direct dev" description: name: flutter_lints - sha256: "9e8c3858111da373efc5aa341de011d9bd23e2c5c5e0c62bccf32438e192d7b1" + sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c" url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "4.0.0" flutter_local_notifications: dependency: "direct main" description: name: flutter_local_notifications - sha256: "55b9b229307a10974b26296ff29f2e132256ba4bd74266939118eaefa941cb00" + sha256: "674173fd3c9eda9d4c8528da2ce0ea69f161577495a9cc835a2a4ecd7eadeb35" url: "https://pub.dev" source: hosted - version: "16.3.3" + version: "17.2.4" flutter_local_notifications_linux: dependency: transitive description: name: flutter_local_notifications_linux - sha256: "33f741ef47b5f63cc7f78fe75eeeac7e19f171ff3c3df054d84c1e38bedb6a03" + sha256: c49bd06165cad9beeb79090b18cd1eb0296f4bf4b23b84426e37dd7c027fc3af url: "https://pub.dev" source: hosted - version: "4.0.0+1" + version: "4.0.1" flutter_local_notifications_platform_interface: dependency: transitive description: name: flutter_local_notifications_platform_interface - sha256: "340abf67df238f7f0ef58f4a26d2a83e1ab74c77ab03cd2b2d5018ac64db30b7" + sha256: "85f8d07fe708c1bdcf45037f2c0109753b26ae077e9d9e899d55971711a4ea66" url: "https://pub.dev" source: hosted - version: "7.1.0" + version: "7.2.0" flutter_localizations: dependency: "direct main" description: flutter @@ -853,10 +956,10 @@ packages: dependency: transitive description: name: flutter_plugin_android_lifecycle - sha256: "8cf40eebf5dec866a6d1956ad7b4f7016e6c0cc69847ab946833b7d43743809f" + sha256: "9ee02950848f61c4129af3d6ec84a1cfc0e47931abc746b03e7a3bc3e8ff6eda" url: "https://pub.dev" source: hosted - version: "2.0.19" + version: "2.0.22" flutter_portal: dependency: "direct main" description: @@ -921,14 +1024,22 @@ packages: url: "https://pub.dev" source: hosted version: "5.2.1" + flutter_styled_toast: + dependency: transitive + description: + name: flutter_styled_toast + sha256: e667f13a665820eb0fa8506547e47eacbcddf1948d6d3036cfd3b089bd4b0516 + url: "https://pub.dev" + source: hosted + version: "2.2.1" flutter_svg: dependency: "direct main" description: name: flutter_svg - sha256: "7b4ca6cf3304575fe9c8ec64813c8d02ee41d2afe60bcfe0678bcb5375d596a2" + sha256: "54900a1a1243f3c4a5506d853a2b5c2dbc38d5f27e52a52618a8054401431123" url: "https://pub.dev" source: hosted - version: "2.0.10+1" + version: "2.0.16" flutter_test: dependency: "direct dev" description: flutter @@ -948,13 +1059,13 @@ packages: source: sdk version: "0.0.0" fluttertoast: - dependency: "direct main" + dependency: transitive description: name: fluttertoast - sha256: "81b68579e23fcbcada2db3d50302813d2371664afe6165bc78148050ab94bf66" + sha256: "95f349437aeebe524ef7d6c9bde3e6b4772717cf46a0eb6a3ceaddc740b297cc" url: "https://pub.dev" source: hosted - version: "8.2.5" + version: "8.2.8" formula_parser: dependency: transitive description: @@ -975,23 +1086,71 @@ packages: dependency: "direct main" description: name: freezed_annotation - sha256: c3fd9336eb55a38cc1bbd79ab17573113a8deccd0ecbbf926cca3c62803b5c2d + sha256: c2e2d632dd9b8a2b7751117abcfc2b4888ecfe181bd9fca7170d9ef02e595fe2 url: "https://pub.dev" source: hosted - version: "2.4.1" + version: "2.4.4" frontend_server_client: dependency: transitive description: name: frontend_server_client - sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" + sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 url: "https://pub.dev" source: hosted - version: "3.2.0" + version: "4.0.0" fuchsia_remote_debug_protocol: dependency: transitive description: flutter source: sdk version: "0.0.0" + geolocator: + dependency: transitive + description: + name: geolocator + sha256: f4efb8d3c4cdcad2e226af9661eb1a0dd38c71a9494b22526f9da80ab79520e5 + url: "https://pub.dev" + source: hosted + version: "10.1.1" + geolocator_android: + dependency: transitive + description: + name: geolocator_android + sha256: "7aefc530db47d90d0580b552df3242440a10fe60814496a979aa67aa98b1fd47" + url: "https://pub.dev" + source: hosted + version: "4.6.1" + geolocator_apple: + dependency: transitive + description: + name: geolocator_apple + sha256: "6154ea2682563f69fc0125762ed7e91e7ed85d0b9776595653be33918e064807" + url: "https://pub.dev" + source: hosted + version: "2.3.8+1" + geolocator_platform_interface: + dependency: transitive + description: + name: geolocator_platform_interface + sha256: "386ce3d9cce47838355000070b1d0b13efb5bc430f8ecda7e9238c8409ace012" + url: "https://pub.dev" + source: hosted + version: "4.2.4" + geolocator_web: + dependency: transitive + description: + name: geolocator_web + sha256: "102e7da05b48ca6bf0a5bda0010f886b171d1a08059f01bfe02addd0175ebece" + url: "https://pub.dev" + source: hosted + version: "2.2.1" + geolocator_windows: + dependency: transitive + description: + name: geolocator_windows + sha256: "53da08937d07c24b0d9952eb57a3b474e29aae2abf9dd717f7e1230995f13f0e" + url: "https://pub.dev" + source: hosted + version: "0.2.3" glob: dependency: transitive description: @@ -1004,36 +1163,36 @@ packages: dependency: transitive description: name: google_fonts - sha256: "2776c66b3e97c6cdd58d1bd3281548b074b64f1fd5c8f82391f7456e38849567" + sha256: b1ac0fe2832c9cc95e5e88b57d627c5e68c223b9657f4b96e1487aa9098c7b82 url: "https://pub.dev" source: hosted - version: "4.0.5" + version: "6.2.1" google_mlkit_barcode_scanning: - dependency: "direct main" + dependency: transitive description: name: google_mlkit_barcode_scanning - sha256: "965183a8cd5cef8477ceea5dbdf29c34a739cf0cfbf1bdad54cd3f9f1807afe5" + sha256: f1a2a39cf1730b9a5e2784a07efa1ca5bfdfdde6aa00b193b3f8cd1953c638ec url: "https://pub.dev" source: hosted - version: "0.10.0" + version: "0.12.0" google_mlkit_commons: dependency: transitive description: name: google_mlkit_commons - sha256: "046586b381cdd139f7f6a05ad6998f7e339d061bd70158249907358394b5f496" + sha256: "27d626c66a181351a953eba5b6ff1ff123aadb891b4dab085b292118f039d6ac" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.1" graphs: dependency: transitive description: name: graphs - sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19 + sha256: "741bbf84165310a68ff28fe9e727332eef1407342fca52759cb21ad8177bb8d0" url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.3.2" group_radio_button: - dependency: "direct main" + dependency: transitive description: name: group_radio_button sha256: "204de8d16b224be7fc72dade0c3afd410ff5a34417d89f74f0fd8be7a8c2b4d6" @@ -1041,13 +1200,13 @@ packages: source: hosted version: "1.3.0" gs1_barcode_parser: - dependency: "direct main" + dependency: transitive description: name: gs1_barcode_parser - sha256: "9aaff47bdab7177deaf9248cc861ef41cf611d3f828498cb40b64bedcbf53391" + sha256: ff171bc40038de3f7178fbc32eaf9eebc3d35a3c4c00bb0281fe4a976d853a42 url: "https://pub.dev" source: hosted - version: "1.0.5" + version: "1.1.0" horizontal_data_table: dependency: transitive description: @@ -1060,10 +1219,10 @@ packages: dependency: transitive description: name: hrk_batteries - sha256: "8ecfdee8268d480a700153a006f7c622c922fbfba4d8f576438c8c41ea9efdf2" + sha256: "35bc2be10bb64284b04d3cd944c24eecf304747fc64b34e2d27ef1a3ac75ab49" url: "https://pub.dev" source: hosted - version: "0.9.2" + version: "2.2.0" hrk_flutter_test_batteries: dependency: "direct dev" description: @@ -1076,18 +1235,26 @@ packages: dependency: transitive description: name: hrk_logging - sha256: "7ea3d02ed46f19533a8cae075cafe636757548a300a0e404193f6dd142c024b5" + sha256: "2e6501f4b78439bec4c367a94b14f792fd17fe1c94f18d903086c7b8a48402f5" url: "https://pub.dev" source: hosted - version: "0.1.3" + version: "0.3.1" + html: + dependency: transitive + description: + name: html + sha256: "1fc58edeaec4307368c60d59b7e15b9d658b57d7f3125098b6294153c75337ec" + url: "https://pub.dev" + source: hosted + version: "0.15.5" http: dependency: transitive description: name: http - sha256: a2bbf9d017fcced29139daa8ed2bba4ece450ab222871df93ca9eec6f80c34ba + sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.2" http_multi_server: dependency: transitive description: @@ -1108,10 +1275,74 @@ packages: dependency: transitive description: name: image - sha256: "4c68bfd5ae83e700b5204c1e74451e7bf3cf750e6843c6e158289cf56bda018e" + sha256: f31d52537dc417fdcde36088fdf11d191026fd5e4fae742491ebd40e5a8bea7d url: "https://pub.dev" source: hosted - version: "4.1.7" + version: "4.3.0" + image_picker: + dependency: transitive + description: + name: image_picker + sha256: "021834d9c0c3de46bf0fe40341fa07168407f694d9b2bb18d532dc1261867f7a" + url: "https://pub.dev" + source: hosted + version: "1.1.2" + image_picker_android: + dependency: transitive + description: + name: image_picker_android + sha256: "8c5abf0dcc24fe6e8e0b4a5c0b51a5cf30cefdf6407a3213dae61edc75a70f56" + url: "https://pub.dev" + source: hosted + version: "0.8.12+12" + image_picker_for_web: + dependency: transitive + description: + name: image_picker_for_web + sha256: "717eb042ab08c40767684327be06a5d8dbb341fe791d514e4b92c7bbe1b7bb83" + url: "https://pub.dev" + source: hosted + version: "3.0.6" + image_picker_ios: + dependency: transitive + description: + name: image_picker_ios + sha256: "4f0568120c6fcc0aaa04511cb9f9f4d29fc3d0139884b1d06be88dcec7641d6b" + url: "https://pub.dev" + source: hosted + version: "0.8.12+1" + image_picker_linux: + dependency: transitive + description: + name: image_picker_linux + sha256: "4ed1d9bb36f7cd60aa6e6cd479779cc56a4cb4e4de8f49d487b1aaad831300fa" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + image_picker_macos: + dependency: transitive + description: + name: image_picker_macos + sha256: "3f5ad1e8112a9a6111c46d0b57a7be2286a9a07fc6e1976fdf5be2bd31d4ff62" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + image_picker_platform_interface: + dependency: transitive + description: + name: image_picker_platform_interface + sha256: "9ec26d410ff46f483c5519c29c02ef0e02e13a543f882b152d4bfd2f06802f80" + url: "https://pub.dev" + source: hosted + version: "2.10.0" + image_picker_windows: + dependency: transitive + description: + name: image_picker_windows + sha256: "6ad07afc4eb1bc25f3a01084d28520496c4a3bb0cb13685435838167c9dcedeb" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" integration_test: dependency: "direct dev" description: flutter @@ -1121,26 +1352,26 @@ packages: dependency: "direct main" description: name: intl - sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" + sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf url: "https://pub.dev" source: hosted - version: "0.18.1" + version: "0.19.0" inventory_management: dependency: "direct main" description: name: inventory_management - sha256: "1d0dd4f7811941092653426a86548a31d475237d318eee71505b21a57ebc310b" + sha256: e8ac85b2a4cfdcabdb9a0e49bc3231953b9c5c7e02c6aabadda6ffc3b78ef128 url: "https://pub.dev" source: hosted - version: "1.0.3+4" + version: "1.0.4" io: dependency: transitive description: name: io - sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" + sha256: dfd5a80599cf0165756e3181807ed3e77daf6dd4137caaad72d0b7931597650b url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "1.0.5" isar: dependency: "direct main" description: @@ -1189,70 +1420,94 @@ packages: url: "https://pub.dev" source: hosted version: "6.8.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + url: "https://pub.dev" + source: hosted + version: "10.0.4" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + url: "https://pub.dev" + source: hosted + version: "3.0.3" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" lints: dependency: transitive description: name: lints - sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290 + sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235" url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "4.0.0" location: dependency: "direct main" description: name: location - sha256: "06be54f682c9073cbfec3899eb9bc8ed90faa0e17735c9d9fa7fe426f5be1dd1" + sha256: "37ffdadcd4b1498b769824f45ebb4de8ed46663a4a67ac27b33a590ee486579f" url: "https://pub.dev" source: hosted - version: "5.0.3" + version: "6.0.2" location_platform_interface: dependency: transitive description: name: location_platform_interface - sha256: "8aa1d34eeecc979d7c9fe372931d84f6d2ebbd52226a54fe1620de6fdc0753b1" + sha256: "2ecde6bb0f88032b0bbbde37e18975b4468711dd92619c2235cc0c0ee93b4b8e" url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "4.0.0" location_web: dependency: transitive description: name: location_web - sha256: ec484c66e8a4ff1ee5d044c203f4b6b71e3a0556a97b739a5bc9616de672412b + sha256: "49dda13d415c4603c5775a33fb22f575e0aa3f0ec2916644ddcd722db31ee884" url: "https://pub.dev" source: hosted - version: "4.2.0" + version: "5.0.2" logging: dependency: transitive description: name: logging - sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" + sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61 url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.3.0" lottie: dependency: transitive description: name: lottie - sha256: a93542cc2d60a7057255405f62252533f8e8956e7e06754955669fd32fb4b216 + sha256: "7afc60865a2429d994144f7d66ced2ae4305fe35d82890b8766e3359872d872c" url: "https://pub.dev" source: hosted - version: "2.7.0" + version: "3.1.3" matcher: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.8.0" material_design_icons_flutter: dependency: "direct main" description: @@ -1265,26 +1520,26 @@ packages: dependency: transitive description: name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.12.0" mime: dependency: transitive description: name: mime - sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2" + sha256: "801fd0b26f14a4a58ccb09d5892c3fbdeff209594300a542492cf13fba9d247a" url: "https://pub.dev" source: hosted - version: "1.0.5" + version: "1.0.6" mocktail: dependency: "direct dev" description: name: mocktail - sha256: c4b5007d91ca4f67256e720cb1b6d704e79a510183a12fa551021f652577dce6 + sha256: "890df3f9688106f25755f26b1c60589a92b3ab91a22b8b224947ad041bf172d8" url: "https://pub.dev" source: hosted - version: "1.0.3" + version: "1.0.4" nested: dependency: "direct main" description: @@ -1321,66 +1576,74 @@ packages: dependency: transitive description: name: package_config - sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" + sha256: "92d4488434b520a62570293fbd33bb556c7d49230791c1b4bbd973baf6d2dc67" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" package_info_plus: dependency: "direct main" description: name: package_info_plus - sha256: "88bc797f44a94814f2213db1c9bd5badebafdfb8290ca9f78d4b9ee2a3db4d79" + sha256: da8d9ac8c4b1df253d1a328b7bf01ae77ef132833479ab40763334db13b91cce url: "https://pub.dev" source: hosted - version: "5.0.1" + version: "8.1.1" package_info_plus_platform_interface: dependency: transitive description: name: package_info_plus_platform_interface - sha256: "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6" + sha256: ac1f4a4847f1ade8e6a87d1f39f5d7c67490738642e2542f559ec38c37489a66 url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.1" path: dependency: "direct main" description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + url: "https://pub.dev" + source: hosted + version: "1.9.0" + path_drawing: + dependency: transitive + description: + name: path_drawing + sha256: bbb1934c0cbb03091af082a6389ca2080345291ef07a5fa6d6e078ba8682f977 url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.0.1" path_parsing: dependency: transitive description: name: path_parsing - sha256: e3e67b1629e6f7e8100b367d3db6ba6af4b1f0bb80f64db18ef1fbabd2fa9ccf + sha256: "883402936929eac138ee0a45da5b0f2c80f89913e6dc3bf77eb65b84b409c6ca" url: "https://pub.dev" source: hosted - version: "1.0.1" + version: "1.1.0" path_provider: dependency: "direct main" description: name: path_provider - sha256: c9e7d3a4cd1410877472158bee69963a4579f78b68c65a2b7d40d1a7a88bb161 + sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd" url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.1.5" path_provider_android: dependency: transitive description: name: path_provider_android - sha256: a248d8146ee5983446bf03ed5ea8f6533129a12b11f12057ad1b4a67a2b3b41d + sha256: "6f01f8e37ec30b07bc424b4deabac37cacb1bc7e2e515ad74486039918a37eb7" url: "https://pub.dev" source: hosted - version: "2.2.4" + version: "2.2.10" path_provider_foundation: dependency: transitive description: name: path_provider_foundation - sha256: "5a7999be66e000916500be4f15a3633ebceb8302719b47b9cc49ce924125350f" + sha256: "4843174df4d288f5e29185bd6e72a6fbdf5a4a4602717eed565497429f179942" url: "https://pub.dev" source: hosted - version: "2.3.2" + version: "2.4.1" path_provider_linux: dependency: transitive description: @@ -1401,18 +1664,10 @@ packages: dependency: transitive description: name: path_provider_windows - sha256: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170" - url: "https://pub.dev" - source: hosted - version: "2.2.1" - pedantic: - dependency: transitive - description: - name: pedantic - sha256: "67fc27ed9639506c856c840ccce7594d0bdcd91bc8d53d6e52359449a1d50602" + sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 url: "https://pub.dev" source: hosted - version: "1.11.1" + version: "2.3.0" permission_handler: dependency: "direct main" description: @@ -1425,10 +1680,10 @@ packages: dependency: transitive description: name: permission_handler_android - sha256: "76e4ab092c1b240d31177bb64d2b0bea43f43d0e23541ec866151b9f7b2490fa" + sha256: "71bbecfee799e65aff7c744761a57e817e73b738fedf62ab7afd5593da21f9f1" url: "https://pub.dev" source: hosted - version: "12.0.12" + version: "12.0.13" permission_handler_apple: dependency: transitive description: @@ -1441,10 +1696,10 @@ packages: dependency: transitive description: name: permission_handler_html - sha256: "54bf176b90f6eddd4ece307e2c06cf977fb3973719c35a93b85cc7093eb6070d" + sha256: "38f000e83355abb3392140f6bc3030660cfaef189e1f87824facb76300b4ff24" url: "https://pub.dev" source: hosted - version: "0.1.1" + version: "0.1.3+5" permission_handler_platform_interface: dependency: transitive description: @@ -1473,10 +1728,10 @@ packages: dependency: transitive description: name: platform - sha256: ae68c7bfcd7383af3629daafb32fb4e8681c7154428da4febcff06200585f102 + sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec" url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "3.1.4" plugin_platform_interface: dependency: transitive description: @@ -1489,10 +1744,10 @@ packages: dependency: "direct main" description: name: pluto_grid - sha256: e77c34a33dd9d74abbe20ba1df96474dded150dd042c7f7495be1bc2c26bd37f + sha256: "1d4cd9d2652742b556aa9b3230cc64672a3f63c34a9acc80fef794ab36ad903b" url: "https://pub.dev" source: hosted - version: "7.0.2" + version: "8.0.0" pointer_interceptor: dependency: transitive description: @@ -1513,18 +1768,18 @@ packages: dependency: "direct main" description: name: pretty_dio_logger - sha256: "00b80053063935cf9a6190da344c5373b9d0e92da4c944c878ff2fbef0ef6dc2" + sha256: "36f2101299786d567869493e2f5731de61ce130faa14679473b26905a92b6407" url: "https://pub.dev" source: hosted - version: "1.3.1" + version: "1.4.0" process: dependency: transitive description: name: process - sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09" + sha256: "21e54fd2faf1b5bdd5102afd25012184a6793927648ea81eea80552ac9405b32" url: "https://pub.dev" source: hosted - version: "4.2.4" + version: "5.0.2" provider: dependency: "direct main" description: @@ -1537,26 +1792,26 @@ packages: dependency: transitive description: name: pub_semver - sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" + sha256: "7b3cfbf654f3edd0c6298ecd5be782ce997ddf0e00531b9464b55245185bbbbd" url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.1.5" pubspec_parse: dependency: transitive description: name: pubspec_parse - sha256: c63b2876e58e194e4b0828fcb080ad0e06d051cb607a6be51a9e084f47cb9367 + sha256: c799b721d79eb6ee6fa56f00c04b472dcd44a30d258fac2174a6ec57302678f8 url: "https://pub.dev" source: hosted - version: "1.2.3" + version: "1.3.0" qr: dependency: transitive description: name: qr - sha256: "64957a3930367bf97cc211a5af99551d630f2f4625e38af10edd6b19131b64b3" + sha256: "5a1d2586170e172b8a8c8470bbbffd5eb0cd38a66c0d77155ea138d3af3a4445" url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.2" qr_flutter: dependency: "direct main" description: @@ -1569,18 +1824,18 @@ packages: dependency: transitive description: name: reactive_flutter_typeahead - sha256: ef91627df8cef70e603e8a6458749d8a99a385b78854332602fd08ad905cdab8 + sha256: a5dbca4b537bd9dde245d4228e1a6ce937c05cd77c57ed45b9c05135540d5f1a url: "https://pub.dev" source: hosted - version: "0.8.1" + version: "2.1.1" reactive_forms: dependency: "direct main" description: name: reactive_forms - sha256: "5aa9c48a0626c20d00a005e597cb10efbdebbfeecb9c4227b03a5945fbb91ec4" + sha256: "9b1fb18e0aae9c50cfa0aaabaaa38bc4d78eefc9b7b95fa9c947b051f6524b8e" url: "https://pub.dev" source: hosted - version: "14.3.0" + version: "17.0.1" recase: dependency: "direct main" description: @@ -1593,18 +1848,18 @@ packages: dependency: "direct main" description: name: referral_reconciliation - sha256: "8aa550fe43e59b9d61ca958a50d9bb90860081807314e376b93f34c879e96569" + sha256: "0b7e439b105b7cc4c89cff822b801ab8eecce497031be1572e5415aa1e871208" url: "https://pub.dev" source: hosted - version: "1.0.2+2" + version: "1.0.3" registration_delivery: dependency: "direct main" description: name: registration_delivery - sha256: b7074bf7115e375b9df2ad2937891139fea163024a35958ff177af137574c047 + sha256: "4dd6e6781e367edf806d838e58771dff838eeff0d444534079a468789cadfbcb" url: "https://pub.dev" source: hosted - version: "1.0.3+3" + version: "1.0.5+2" remove_emoji_input_formatter: dependency: transitive description: @@ -1625,58 +1880,58 @@ packages: dependency: "direct main" description: name: shared_preferences - sha256: d3bbe5553a986e83980916ded2f0b435ef2e1893dfaa29d5a7a790d0eca12180 + sha256: "95f9997ca1fb9799d494d0cb2a780fd7be075818d59f00c43832ed112b158a82" url: "https://pub.dev" source: hosted - version: "2.2.3" + version: "2.3.3" shared_preferences_android: dependency: transitive description: name: shared_preferences_android - sha256: "1ee8bf911094a1b592de7ab29add6f826a7331fb854273d55918693d5364a1f2" + sha256: "480ba4345773f56acda9abf5f50bd966f581dac5d514e5fc4a18c62976bbba7e" url: "https://pub.dev" source: hosted - version: "2.2.2" + version: "2.3.2" shared_preferences_foundation: dependency: transitive description: name: shared_preferences_foundation - sha256: "7708d83064f38060c7b39db12aefe449cb8cdc031d6062280087bc4cdb988f5c" + sha256: "07e050c7cd39bad516f8d64c455f04508d09df104be326d8c02551590a0d513d" url: "https://pub.dev" source: hosted - version: "2.3.5" + version: "2.5.3" shared_preferences_linux: dependency: transitive description: name: shared_preferences_linux - sha256: "9f2cbcf46d4270ea8be39fa156d86379077c8a5228d9dfdb1164ae0bb93f1faa" + sha256: "580abfd40f415611503cae30adf626e6656dfb2f0cee8f465ece7b6defb40f2f" url: "https://pub.dev" source: hosted - version: "2.3.2" + version: "2.4.1" shared_preferences_platform_interface: dependency: transitive description: name: shared_preferences_platform_interface - sha256: "22e2ecac9419b4246d7c22bfbbda589e3acf5c0351137d87dd2939d984d37c3b" + sha256: "57cbf196c486bc2cf1f02b85784932c6094376284b3ad5779d1b1c6c6a816b80" url: "https://pub.dev" source: hosted - version: "2.3.2" + version: "2.4.1" shared_preferences_web: dependency: transitive description: name: shared_preferences_web - sha256: "7b15ffb9387ea3e237bb7a66b8a23d2147663d391cafc5c8f37b2e7b4bde5d21" + sha256: d2ca4132d3946fec2184261726b355836a82c33d7d5b67af32692aff18a4684e url: "https://pub.dev" source: hosted - version: "2.2.2" + version: "2.4.2" shared_preferences_windows: dependency: transitive description: name: shared_preferences_windows - sha256: "841ad54f3c8381c480d0c9b508b89a34036f512482c407e6df7a9c4aa2ef8f59" + sha256: "94ef0f72b2d71bc3e700e025db3710911bd51a71cefb65cc609dd0d9a982e3c1" url: "https://pub.dev" source: hosted - version: "2.3.2" + version: "2.4.1" shelf: dependency: transitive description: @@ -1697,10 +1952,10 @@ packages: dependency: transitive description: name: shelf_static - sha256: a41d3f53c4adf0f57480578c1d61d90342cd617de7fc8077b1304643c2d85c1e + sha256: c87c3875f91262785dade62d135760c2c69cb217ac759485334c5857ad89f6e3 url: "https://pub.dev" source: hosted - version: "1.1.2" + version: "1.1.3" shelf_web_socket: dependency: transitive description: @@ -1734,18 +1989,18 @@ packages: dependency: transitive description: name: source_map_stack_trace - sha256: "84cf769ad83aa6bb61e0aa5a18e53aea683395f196a6f39c4c881fb90ed4f7ae" + sha256: c0713a43e323c3302c2abe2a1cc89aa057a387101ebd280371d6a6c9fa68516b url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" source_maps: dependency: transitive description: name: source_maps - sha256: "708b3f6b97248e5781f493b765c3337db11c5d2c81c3094f10904bfa8004c703" + sha256: "190222579a448b03896e0ca6eca5998fa810fda630c1d65e2f78b3f638f54812" url: "https://pub.dev" source: hosted - version: "0.10.12" + version: "0.10.13" source_span: dependency: transitive description: @@ -1754,54 +2009,38 @@ packages: url: "https://pub.dev" source: hosted version: "1.10.0" - speech_to_text: - dependency: "direct main" - description: - name: speech_to_text - sha256: "57fef1d41bdebe298e84842c89bb4ac91f31cdbec7830c8cb1fc6b91d03abd42" - url: "https://pub.dev" - source: hosted - version: "6.6.0" - speech_to_text_macos: + sprintf: dependency: transitive description: - name: speech_to_text_macos - sha256: e685750f7542fcaa087a5396ee471e727ec648bf681f4da83c84d086322173f6 + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" url: "https://pub.dev" source: hosted - version: "1.1.0" - speech_to_text_platform_interface: - dependency: transitive - description: - name: speech_to_text_platform_interface - sha256: a0df1a907091ea09880077dc25aae02af9f79811264e6e97ddb08639b7f771c2 - url: "https://pub.dev" - source: hosted - version: "2.2.0" + version: "7.0.0" sqlite3: dependency: transitive description: name: sqlite3 - sha256: "072128763f1547e3e9b4735ce846bfd226d68019ccda54db4cd427b12dfdedc9" + sha256: fde692580bee3379374af1f624eb3e113ab2865ecb161dbe2d8ac2de9735dbdb url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.4.5" sqlite3_flutter_libs: dependency: "direct main" description: name: sqlite3_flutter_libs - sha256: fb2a106a2ea6042fe57de2c47074cc31539a941819c91e105b864744605da3f5 + sha256: "636b0fe8a2de894e5455572f6cbbc458f4ffecfe9f860b79439e27041ea4f0b9" url: "https://pub.dev" source: hosted - version: "0.5.21" + version: "0.5.27" sqlparser: dependency: transitive description: name: sqlparser - sha256: "7b20045d1ccfb7bc1df7e8f9fee5ae58673fce6ff62cefbb0e0fd7214e90e5a0" + sha256: ade9a67fd70d0369329ed3373208de7ebd8662470e8c396fc8d0d60f9acdfc9f url: "https://pub.dev" source: hosted - version: "0.34.1" + version: "0.36.0" stack_trace: dependency: transitive description: @@ -1819,7 +2058,7 @@ packages: source: hosted version: "2.1.2" stream_transform: - dependency: "direct main" + dependency: transitive description: name: stream_transform sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" @@ -1834,6 +2073,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.0" + survey_form: + dependency: "direct main" + description: + name: survey_form + sha256: "5e3a08570fe8c97d7dfd0bc6f28b2ae829e2fe66ce987504920c20d091c47c19" + url: "https://pub.dev" + source: hosted + version: "1.0.0" sync_http: dependency: transitive description: @@ -1842,6 +2089,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.3.1" + sync_service: + dependency: "direct main" + description: + name: sync_service + sha256: ba4720b48bf4a80c3299118000bf7851dae871480b75ab95f0e5a830cddc2e39 + url: "https://pub.dev" + source: hosted + version: "0.0.1-dev.1" synchronized: dependency: transitive description: @@ -1862,42 +2117,42 @@ packages: dependency: transitive description: name: test - sha256: a1f7595805820fcc05e5c52e3a231aedd0b72972cb333e8c738a8b1239448b6f + sha256: "7ee446762c2c50b3bd4ea96fe13ffac69919352bd3b4b17bac3f3465edc58073" url: "https://pub.dev" source: hosted - version: "1.24.9" + version: "1.25.2" test_api: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.0" test_core: dependency: transitive description: name: test_core - sha256: a757b14fc47507060a162cc2530d9a4a2f92f5100a952c7443b5cad5ef5b106a + sha256: "2bc4b4ecddd75309300d8096f781c0e3280ca1ef85beda558d33fcbedc2eead4" url: "https://pub.dev" source: hosted - version: "0.5.9" + version: "0.6.0" time: dependency: transitive description: name: time - sha256: ad8e018a6c9db36cb917a031853a1aae49467a93e0d464683e029537d848c221 + sha256: "370572cf5d1e58adcb3e354c47515da3f7469dac3a95b447117e728e7be6f461" url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.1.5" timezone: dependency: transitive description: name: timezone - sha256: a6ccda4a69a442098b602c44e61a1e2b4bf6f5516e875bbf0f427d5df14745d5 + sha256: "2236ec079a174ce07434e89fcd3fcda430025eb7692244139a9cf54fdcf1fc7d" url: "https://pub.dev" source: hosted - version: "0.9.3" + version: "0.9.4" timing: dependency: transitive description: @@ -1922,6 +2177,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.2" + universal_html: + dependency: transitive + description: + name: universal_html + sha256: "56536254004e24d9d8cfdb7dbbf09b74cf8df96729f38a2f5c238163e3d58971" + url: "https://pub.dev" + source: hosted + version: "2.2.4" + universal_io: + dependency: transitive + description: + name: universal_io + sha256: "1722b2dcc462b4b2f3ee7d188dad008b6eb4c40bbd03a3de451d82c78bba9aad" + url: "https://pub.dev" + source: hosted + version: "2.2.2" upower: dependency: transitive description: @@ -1931,45 +2202,45 @@ packages: source: hosted version: "0.7.0" url_launcher: - dependency: "direct main" + dependency: transitive description: name: url_launcher - sha256: "6ce1e04375be4eed30548f10a315826fd933c1e493206eab82eed01f438c8d2e" + sha256: "9d06212b1362abc2f0f0d78e6f09f726608c74e3b9462e8368bb03314aa8d603" url: "https://pub.dev" source: hosted - version: "6.2.6" + version: "6.3.1" url_launcher_android: dependency: transitive description: name: url_launcher_android - sha256: "17cd5e205ea615e2c6ea7a77323a11712dffa0720a8a90540db57a01347f9ad9" + sha256: f0c73347dfcfa5b3db8bc06e1502668265d39c08f310c29bff4e28eea9699f79 url: "https://pub.dev" source: hosted - version: "6.3.2" + version: "6.3.9" url_launcher_ios: dependency: transitive description: name: url_launcher_ios - sha256: "75bb6fe3f60070407704282a2d295630cab232991eb52542b18347a8a941df03" + sha256: "16a513b6c12bb419304e72ea0ae2ab4fed569920d1c7cb850263fe3acc824626" url: "https://pub.dev" source: hosted - version: "6.2.4" + version: "6.3.2" url_launcher_linux: dependency: transitive description: name: url_launcher_linux - sha256: ab360eb661f8879369acac07b6bb3ff09d9471155357da8443fd5d3cf7363811 + sha256: "4e9ba368772369e3e08f231d2301b4ef72b9ff87c31192ef471b380ef29a4935" url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "3.2.1" url_launcher_macos: dependency: transitive description: name: url_launcher_macos - sha256: "9a1a42d5d2d95400c795b2914c36fdcb525870c752569438e4ebb09a2b5d90de" + sha256: "17ba2000b847f334f16626a574c702b196723af2a289e7a93ffcb79acff855c2" url: "https://pub.dev" source: hosted - version: "3.2.0" + version: "3.2.2" url_launcher_platform_interface: dependency: transitive description: @@ -1982,50 +2253,50 @@ packages: dependency: transitive description: name: url_launcher_web - sha256: fff0932192afeedf63cdd50ecbb1bc825d31aed259f02bb8dba0f3b729a5e88b + sha256: "772638d3b34c779ede05ba3d38af34657a05ac55b06279ea6edd409e323dca8e" url: "https://pub.dev" source: hosted - version: "2.2.3" + version: "2.3.3" url_launcher_windows: dependency: transitive description: name: url_launcher_windows - sha256: ecf9725510600aa2bb6d7ddabe16357691b6d2805f66216a97d1b881e21beff7 + sha256: "44cf3aabcedde30f2dba119a9dea3b0f2672fbe6fa96e85536251d678216b3c4" url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "3.1.3" uuid: dependency: "direct main" description: name: uuid - sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" + sha256: a5be9ef6618a7ac1e964353ef476418026db906c4facdedaa299b7a2e71690ff url: "https://pub.dev" source: hosted - version: "3.0.7" + version: "4.5.1" vector_graphics: dependency: transitive description: name: vector_graphics - sha256: "32c3c684e02f9bc0afb0ae0aa653337a2fe022e8ab064bcd7ffda27a74e288e3" + sha256: "27d5fefe86fb9aace4a9f8375b56b3c292b64d8c04510df230f849850d912cb7" url: "https://pub.dev" source: hosted - version: "1.1.11+1" + version: "1.1.15" vector_graphics_codec: dependency: transitive description: name: vector_graphics_codec - sha256: c86987475f162fadff579e7320c7ddda04cd2fdeffbe1129227a85d9ac9e03da + sha256: "2430b973a4ca3c4dbc9999b62b8c719a160100dcbae5c819bae0cacce32c9cdb" url: "https://pub.dev" source: hosted - version: "1.1.11+1" + version: "1.1.12" vector_graphics_compiler: dependency: transitive description: name: vector_graphics_compiler - sha256: "12faff3f73b1741a36ca7e31b292ddeb629af819ca9efe9953b70bd63fc8cd81" + sha256: "1b4b9e706a10294258727674a340ae0d6e64a7231980f9f9a3d12e4b42407aad" url: "https://pub.dev" source: hosted - version: "1.1.11+1" + version: "1.1.16" vector_math: dependency: transitive description: @@ -2034,14 +2305,22 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" + visibility_detector: + dependency: transitive + description: + name: visibility_detector + sha256: dd5cc11e13494f432d15939c3aa8ae76844c42b723398643ce9addb88a5ed420 + url: "https://pub.dev" + source: hosted + version: "0.4.0+2" vm_service: dependency: transitive description: name: vm_service - sha256: c538be99af830f478718b51630ec1b6bee5e74e52c8a802d328d9e71d35d2583 + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" url: "https://pub.dev" source: hosted - version: "11.10.0" + version: "14.2.1" watcher: dependency: transitive description: @@ -2054,26 +2333,26 @@ packages: dependency: transitive description: name: web - sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "0.5.1" web_socket_channel: dependency: transitive description: name: web_socket_channel - sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b + sha256: "58c6666b342a38816b2e7e50ed0f1e261959630becd4c879c4f26bfa14aa5a42" url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.4.5" webdriver: dependency: transitive description: name: webdriver - sha256: "3c923e918918feeb90c4c9fdf1fe39220fa4c0e8e2c0fffaded174498ef86c49" + sha256: "003d7da9519e1e5f329422b36c4dcdf18d7d2978d1ba099ea4e45ba490ed845e" url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "3.0.3" webkit_inspection_protocol: dependency: transitive description: @@ -2086,18 +2365,18 @@ packages: dependency: transitive description: name: win32 - sha256: "464f5674532865248444b4c3daca12bd9bf2d7c47f759ce2617986e7229494a8" + sha256: "68d1e89a91ed61ad9c370f9f8b6effed9ae5e0ede22a270bdfa6daf79fc2290a" url: "https://pub.dev" source: hosted - version: "5.2.0" + version: "5.5.4" win32_registry: dependency: transitive description: name: win32_registry - sha256: "41fd8a189940d8696b1b810efb9abcf60827b6cbfab90b0c43e8439e3a39d85a" + sha256: "21ec76dfc731550fd3e2ce7a33a9ea90b828fdf19a5c3bcf556fa992cfa99852" url: "https://pub.dev" source: hosted - version: "1.1.2" + version: "1.1.5" workmanager: dependency: "direct main" description: @@ -2110,10 +2389,10 @@ packages: dependency: transitive description: name: xdg_directories - sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d + sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15" url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "1.1.0" xml: dependency: transitive description: @@ -2126,10 +2405,10 @@ packages: dependency: transitive description: name: xxh3 - sha256: a92b30944a9aeb4e3d4f3c3d4ddb3c7816ca73475cd603682c4f8149690f56d7 + sha256: "399a0438f5d426785723c99da6b16e136f4953fb1e9db0bf270bd41dd4619916" url: "https://pub.dev" source: hosted - version: "1.0.1" + version: "1.2.0" yaml: dependency: transitive description: @@ -2139,5 +2418,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.2.3 <3.9.0" - flutter: ">=3.16.0" + dart: ">=3.4.1 <3.9.0" + flutter: ">=3.22.0" diff --git a/apps/health_campaign_field_worker_app/pubspec.yaml b/apps/health_campaign_field_worker_app/pubspec.yaml index 28a15c64d..c85e790ba 100644 --- a/apps/health_campaign_field_worker_app/pubspec.yaml +++ b/apps/health_campaign_field_worker_app/pubspec.yaml @@ -1,7 +1,7 @@ name: health_campaign_field_worker_app description: A new Flutter project. publish_to: 'none' -version: 1.5.0+0 +version: 1.6.0+0 environment: sdk: '>=3.0.0 <=4.0.0' @@ -10,98 +10,86 @@ dependencies: flutter: sdk: flutter cupertino_icons: ^1.0.2 - freezed_annotation: ^2.1.0 - json_annotation: ^4.7.0 - uuid: ^3.0.6 - intl: ^0.18.0 - drift: ^2.0.0 - sqlite3_flutter_libs: ^0.5.10 - path_provider: ^2.0.11 - path: ^1.8.2 - digit_components: ^1.0.2 - auto_route: ^7.8.4 - flutter_bloc: ^8.1.1 - collection: ^1.16.0 - reactive_forms: ^14.1.0 - location: ^5.0.0 - dart_mappable: ^4.2.0 - dio: ^5.4.2+1 - flutter_keyboard_visibility: ^5.4.0 - isar: ^3.0.5 - isar_flutter_libs: ^3.0.5 + freezed_annotation: ^2.4.1 + json_annotation: ^4.9.0 + uuid: ^4.4.0 + intl: ^0.19.0 + drift: ^2.18.0 + sqlite3_flutter_libs: ^0.5.11+1 + path_provider: ^2.1.3 + path: ^1.9.0 + digit_ui_components: ^0.0.2-dev.4 + digit_components: ^1.0.3 + auto_route: ^8.3.0 + flutter_bloc: ^8.1.5 + collection: ^1.18.0 + reactive_forms: ^17.0.0 + location: ^6.0.2 + dart_mappable: ^4.2.2 + dio: ^5.4.3+1 + flutter_keyboard_visibility: ^5.4.1 + isar: ^3.1.0+1 + isar_flutter_libs: ^3.1.0+1 nested: ^1.0.0 - flutter_dotenv: ^5.0.2 + flutter_dotenv: ^5.1.0 flutter_localizations: sdk: flutter - provider: ^6.0.5 + provider: ^6.1.2 recase: ^4.1.0 - drift_db_viewer: ^2.0.0 - bloc_concurrency: ^0.2.1 - stream_transform: ^2.1.0 - fluttertoast: ^8.1.2 - flutter_secure_storage: ^9.0.0 - group_radio_button: ^1.3.0 - flutter_portal: ^1.1.3 - url_launcher: ^6.1.10 - connectivity_plus: ^5.0.2 + drift_db_viewer: ^2.1.0 + bloc_concurrency: ^0.2.5 + flutter_secure_storage: ^9.2.2 + connectivity_plus: ^6.0.3 material_design_icons_flutter: ^7.0.7296 - shared_preferences: ^2.1.0 - pretty_dio_logger: ^1.2.0-beta-1 - pluto_grid: ^7.0.1 - speech_to_text: ^6.1.1 + shared_preferences: ^2.2.3 + pretty_dio_logger: ^1.3.1 + pluto_grid: ^8.0.0 + flutter_portal: ^1.1.4 flutter_background_service: ^5.0.5 - flutter_local_notifications: ^16.3.0 - device_info_plus: ^9.0.1 - battery_plus: ^5.0.2 - workmanager: ^0.5.1 + flutter_local_notifications: ^17.1.2 + device_info_plus: ^9.1.2 + battery_plus: ^6.0.1 + workmanager: ^0.5.2 digit_firebase_services: ^0.0.1 - package_info_plus: ^5.0.1 + package_info_plus: ^8.0.0 expandable: ^5.0.1 - flutter_svg: ^2.0.8 + flutter_svg: ^2.0.10+1 digit_showcase: ^1.0.0 - audioplayers: ^5.2.0 - gs1_barcode_parser: ^1.0.5 qr_flutter: ^4.1.0 - disk_space: ^0.2.1 - google_mlkit_barcode_scanning: ^0.10.0 - camera: ^0.10.5+7 - attendance_management: ^1.0.2+4 - digit_scanner: ^1.0.3+1 - inventory_management: ^1.0.3+4 - referral_reconciliation: ^1.0.2+2 - digit_data_model: ^1.0.4+1 - registration_delivery: ^1.0.3+2 + disk_space_update: ^0.0.2 + sync_service: ^0.0.1-dev.1 + attendance_management: ^1.0.3 + digit_scanner: ^1.0.4 + inventory_management: ^1.0.4 + referral_reconciliation: ^1.0.3 + digit_data_model: ^1.0.5 + registration_delivery: ^1.0.5+2 disable_battery_optimization: ^1.1.1 - digit_dss: ^1.0.1 - closed_household: ^1.0.1+1 - digit_location_tracker: ^0.0.1-dev.1 + digit_dss: ^1.0.3 + closed_household: ^1.0.3 + digit_location_tracker: ^1.0.0 permission_handler: ^11.3.1 + survey_form: ^1.0.0 + complaints: ^1.0.0 dev_dependencies: flutter_test: sdk: flutter integration_test: sdk: flutter - flutter_lints: ^3.0.1 - freezed: ^2.1.0+1 - build_runner: ^2.4.7 - json_serializable: ^6.4.0 - drift_dev: ^2.14.1 - auto_route_generator: ^7.3.2 + flutter_lints: ^4.0.0 + freezed: ^2.5.2 + build_runner: ^2.4.11 + json_serializable: ^6.8.0 + drift_dev: ^2.18.0 + auto_route_generator: ^8.0.0 bloc_test: ^9.1.0 mocktail: ^1.0.2 - dart_mappable_builder: - git: - url: https://github.com/egovernments/health-campaign-field-worker-app/ - ref: master - path: ./packages/dart_mappable_builder - isar_generator: ^3.0.5 + dart_mappable_builder: ^4.2.2 + isar_generator: ^3.1.0+1 flutter_launcher_icons: ^0.13.1 hrk_flutter_test_batteries: ^0.8.0 -dependency_overrides: - intl: ^0.18.0 - flutter_icons: android: 'ic_launcher' ios: true @@ -112,7 +100,8 @@ flutter: assets: - ./ - assets/icons/svg/ - + - assets/animated_json/ + fonts: - family: Roboto fonts: diff --git a/mason_templates/digit_entity/hooks/lib/models.mapper.dart b/mason_templates/digit_entity/hooks/lib/models.mapper.dart index 8d504b44e..fd19a57f5 100644 --- a/mason_templates/digit_entity/hooks/lib/models.mapper.dart +++ b/mason_templates/digit_entity/hooks/lib/models.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'models.dart'; @@ -135,10 +135,8 @@ mixin ConfigModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ConfigModelMapper.ensureInitialized() - .isValueEqual(this as ConfigModel, other)); + return ConfigModelMapper.ensureInitialized() + .equalsValue(this as ConfigModel, other); } @override @@ -356,10 +354,8 @@ mixin EnumValuesMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - EnumValuesMapper.ensureInitialized() - .isValueEqual(this as EnumValues, other)); + return EnumValuesMapper.ensureInitialized() + .equalsValue(this as EnumValues, other); } @override @@ -528,10 +524,8 @@ mixin AttributeModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - AttributeModelMapper.ensureInitialized() - .isValueEqual(this as AttributeModel, other)); + return AttributeModelMapper.ensureInitialized() + .equalsValue(this as AttributeModel, other); } @override @@ -719,10 +713,8 @@ mixin TableReferenceModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - TableReferenceModelMapper.ensureInitialized() - .isValueEqual(this as TableReferenceModel, other)); + return TableReferenceModelMapper.ensureInitialized() + .equalsValue(this as TableReferenceModel, other); } @override diff --git a/mason_templates/digit_entity/hooks/pubspec.lock b/mason_templates/digit_entity/hooks/pubspec.lock index eb6d23478..336b23c54 100644 --- a/mason_templates/digit_entity/hooks/pubspec.lock +++ b/mason_templates/digit_entity/hooks/pubspec.lock @@ -93,10 +93,10 @@ packages: dependency: "direct dev" description: name: build_runner - sha256: "220ae4553e50d7c21a17c051afc7b183d28a24a420502e842f303f8e4e6edced" + sha256: "644dc98a0f179b872f612d3eb627924b578897c629788e858157fa5e704ca0c7" url: "https://pub.dev" source: hosted - version: "2.4.4" + version: "2.4.11" build_runner_core: dependency: transitive description: @@ -173,17 +173,17 @@ packages: dependency: "direct main" description: name: dart_mappable - sha256: "7b6d38ae95f1ae8ffa65df9a5464f14b56c2de94699a035202ca4cd3a0ba249e" + sha256: "47269caf2060533c29b823ff7fa9706502355ffcb61e7f2a374e3a0fb2f2c3f0" url: "https://pub.dev" source: hosted - version: "4.2.0" + version: "4.2.2" dart_mappable_builder: dependency: "direct dev" description: path: "../../../packages/dart_mappable_builder" relative: true source: path - version: "4.2.0" + version: "4.2.3" dart_style: dependency: transitive description: @@ -284,10 +284,10 @@ packages: dependency: "direct dev" description: name: lints - sha256: "6b0206b0bf4f04961fc5438198ccb3a885685cd67d4d4a32cc20ad7f8adbe015" + sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "4.0.0" logging: dependency: transitive description: @@ -364,10 +364,10 @@ packages: dependency: "direct main" description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.9.0" pointycastle: dependency: transitive description: @@ -548,10 +548,10 @@ packages: dependency: transitive description: name: type_plus - sha256: "2e33cfac2e129297d5874567bdf7587502ec359881e9318551e014d91b02f84a" + sha256: d5d1019471f0d38b91603adb9b5fd4ce7ab903c879d2fbf1a3f80a630a03fcc9 url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" typed_data: dependency: transitive description: @@ -601,4 +601,4 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.0.0 <4.0.0" + dart: ">=3.4.0 <4.0.0" diff --git a/mason_templates/digit_entity/hooks/pubspec.yaml b/mason_templates/digit_entity/hooks/pubspec.yaml index 26db869d1..159b35c54 100644 --- a/mason_templates/digit_entity/hooks/pubspec.yaml +++ b/mason_templates/digit_entity/hooks/pubspec.yaml @@ -6,14 +6,14 @@ environment: sdk: '>=3.0.0 <=4.0.0' dev_dependencies: - build_runner: ^2.3.3 + build_runner: ^2.4.11 dart_mappable_builder: path: ../../../packages/dart_mappable_builder - lints: ^2.0.0 + lints: ^4.0.0 test: ^1.16.0 dependencies: collection: ^1.17.0 - dart_mappable: ^4.2.0 + dart_mappable: ^4.2.2 mason: any - path: ^1.8.3 + path: ^1.9.0 recase: ^4.1.0 diff --git a/mason_templates/freezed_bloc/hooks/pubspec.lock b/mason_templates/freezed_bloc/hooks/pubspec.lock index 13b67253e..c65f972de 100644 --- a/mason_templates/freezed_bloc/hooks/pubspec.lock +++ b/mason_templates/freezed_bloc/hooks/pubspec.lock @@ -85,10 +85,10 @@ packages: dependency: "direct main" description: name: build_runner - sha256: "220ae4553e50d7c21a17c051afc7b183d28a24a420502e842f303f8e4e6edced" + sha256: "644dc98a0f179b872f612d3eb627924b578897c629788e858157fa5e704ca0c7" url: "https://pub.dev" source: hosted - version: "2.4.4" + version: "2.4.11" build_runner_core: dependency: transitive description: @@ -474,4 +474,4 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.0.0 <4.0.0" + dart: ">=3.4.0 <4.0.0" diff --git a/mason_templates/freezed_bloc/hooks/pubspec.yaml b/mason_templates/freezed_bloc/hooks/pubspec.yaml index 36a6f8093..f1cd2fc92 100644 --- a/mason_templates/freezed_bloc/hooks/pubspec.yaml +++ b/mason_templates/freezed_bloc/hooks/pubspec.yaml @@ -6,4 +6,4 @@ environment: dependencies: mason: any recase: ^4.1.0 - build_runner: ^2.2.1 + build_runner: ^2.4.11 diff --git a/melos.yaml b/melos.yaml index 7e89a33b8..b2010b918 100644 --- a/melos.yaml +++ b/melos.yaml @@ -14,15 +14,15 @@ command: post: melos generate scripts: - generate: - description: Generate code for all packages. - run: melos run generate-flutter --no-select && melos run generate-dart --no-select + description: Generate code for all packages (Flutter and Dart). + run: | + melos run generate-flutter --no-select & exec: - concurrency: 1 + concurrency: 2 generate-flutter: - description: Generate code for all flutter packages. + description: Generate code for all Flutter packages. run: flutter packages run build_runner build --delete-conflicting-outputs exec: concurrency: 1 @@ -31,17 +31,6 @@ scripts: dependsOn: - build_runner - generate-dart: - description: Generate code for all packages. - run: dart run build_runner build --delete-conflicting-outputs - exec: - concurrency: 1 - packageFilters: - dart: true - flutter: false - dependsOn: - - build_runner - generate-hooks: description: Generate hooks for all packages. run: dart run build_runner build --delete-conflicting-outputs @@ -80,7 +69,7 @@ scripts: description: Run all Flutter tests in this project. run: melos run test --no-select exec: - concurrency: 1 + concurrency: 2 packageFilters: flutter: true dirExists: test @@ -100,4 +89,3 @@ scripts: concurrency: 1 packageFilters: dart: true - diff --git a/packages/attendance_management/CHANGELOG.md b/packages/attendance_management/CHANGELOG.md index 297336973..3eba96001 100644 --- a/packages/attendance_management/CHANGELOG.md +++ b/packages/attendance_management/CHANGELOG.md @@ -1,27 +1,38 @@ +## 1.0.3 + +* Updated digit_data_model to latest version +* Updated flutter version to 3.22 +* Migrated to digit_ui_components + ## 1.0.2+4 + * Fix for boundaryCode in attendance logs ## 1.0.2+3 + * Updated Attendance Singleton to add boundary ## 1.0.2+2 + * Updated digit_components, digit_data_model * Added boundaryCode to additionalDetails of attendanceLogs ## 1.0.2+1 + * Updated Digit_components ## 1.0.2 + * Capturing location on attendance submit * Pagination issue fix to fetch all attendees ## 0.0.0-dev.1 -* Initial release of the package +* Initial release of the package * Features: - - Manage Attendance: Mark attendance of the employees and send the data to parent application. - - Select Session: Select the session for which the attendance is to be marked. - - Mark Attendance: Mark the attendance of the employees. + - Manage Attendance: Mark attendance of the employees and send the data to parent application. + - Select Session: Select the session for which the attendance is to be marked. + - Mark Attendance: Mark the attendance of the employees. ## 0.0.0-dev.2 @@ -31,7 +42,6 @@ * Updated intl package version - ## 0.0.0-dev.4 * Updated digit_components version for dropdown fix @@ -57,10 +67,13 @@ * Added try catch for local repository to handle db lock ## 1.0.1+1 + * Get Precise location on Submitting latitude longitude details ## 1.0.2-dev.1 + * Removed captured Location Dialog on attendance submit ## 1.0.2-dev.2 + * Updated registers search to fetch all attendees to avoid limit on overall query \ No newline at end of file diff --git a/packages/attendance_management/lib/blocs/attendance_bloc.dart b/packages/attendance_management/lib/blocs/attendance_bloc.dart index 9c4766635..dee2199b7 100644 --- a/packages/attendance_management/lib/blocs/attendance_bloc.dart +++ b/packages/attendance_management/lib/blocs/attendance_bloc.dart @@ -6,7 +6,6 @@ import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; import '../utils/typedefs.dart'; -import '../utils/utils.dart'; // Part of the code generated by Freezed for immutable classes part 'attendance_bloc.freezed.dart'; @@ -84,7 +83,7 @@ class AttendanceBloc extends Bloc { emit(const RegisterLoading()); // Finding and emitting the selected register based on ID final selectedRegister = - await event.registers.where((e) => e.id == event.registerID).first; + event.registers.where((e) => e.id == event.registerID).first; emit(SelectedRegisterLoaded( selectedRegister: selectedRegister, )); diff --git a/packages/attendance_management/lib/blocs/attendance_individual_bloc.dart b/packages/attendance_management/lib/blocs/attendance_individual_bloc.dart index 049d06088..a1678f173 100644 --- a/packages/attendance_management/lib/blocs/attendance_individual_bloc.dart +++ b/packages/attendance_management/lib/blocs/attendance_individual_bloc.dart @@ -82,9 +82,7 @@ class AttendanceIndividualBloc checkResponse(filteredLogs ?? [], attendees, event); } catch (ex) { - String? error = ex as String; - - emit(AttendanceIndividualState.error(error)); + emit(AttendanceIndividualState.error(ex.toString())); } } @@ -176,7 +174,10 @@ class AttendanceIndividualBloc "latitude": event.latitude, "longitude": event.longitude, } - : null), + : { + EnumValues.boundaryCode.toValue(): + AttendanceSingleton().boundary?.code, + }), AttendanceLogModel( individualId: e.individualId, registerId: e.registerId, @@ -196,11 +197,13 @@ class AttendanceIndividualBloc ? { EnumValues.latitude.toValue(): event.latitude, EnumValues.longitude.toValue(): event.longitude, - EnumValues.boundaryCode.toValue(): AttendanceSingleton().boundary?.code, + EnumValues.boundaryCode.toValue(): + AttendanceSingleton().boundary?.code, } : { - EnumValues.boundaryCode.toValue(): AttendanceSingleton().boundary?.code, - }) + EnumValues.boundaryCode.toValue(): + AttendanceSingleton().boundary?.code, + }) ]); } }); @@ -406,6 +409,7 @@ class AttendanceIndividualEvent with _$AttendanceIndividualEvent { required int limit, @Default(false) bool isSingleSession, }) = AttendanceIndividualLogSearchEvent; + // Event for marking individual attendance const factory AttendanceIndividualEvent.individualAttendanceMark({ @Default(0) int entryTime, @@ -415,6 +419,7 @@ class AttendanceIndividualEvent with _$AttendanceIndividualEvent { required String individualId, required String registerId, }) = AttendanceMarkEvent; + // Event for saving attendance as draft const factory AttendanceIndividualEvent.saveAsDraft({ required int entryTime, @@ -436,10 +441,13 @@ class AttendanceIndividualEvent with _$AttendanceIndividualEvent { @freezed class AttendanceIndividualState with _$AttendanceIndividualState { const AttendanceIndividualState._(); + // Initial state const factory AttendanceIndividualState.initial() = _Initial; + // Loading state const factory AttendanceIndividualState.loading() = _Loading; + // Loaded state with attendance data factory AttendanceIndividualState.loaded({ List? attendanceSearchModelList, @@ -450,6 +458,7 @@ class AttendanceIndividualState with _$AttendanceIndividualState { @Default(10) int limitData, @Default(false) bool viewOnly, }) = _AttendanceRowModelLoaded; + // Error state const factory AttendanceIndividualState.error(String? error) = _Error; } diff --git a/packages/attendance_management/lib/data/repositories/remote/attendance_logs.dart b/packages/attendance_management/lib/data/repositories/remote/attendance_logs.dart index bb334b754..0b3a67bd3 100644 --- a/packages/attendance_management/lib/data/repositories/remote/attendance_logs.dart +++ b/packages/attendance_management/lib/data/repositories/remote/attendance_logs.dart @@ -7,7 +7,6 @@ import 'package:attendance_management/attendance_management.dart'; import 'package:digit_data_model/utils/constants.dart'; import 'package:dio/dio.dart'; -import '../../../utils/utils.dart'; class AttendanceLogRemoteRepository extends RemoteRepository { diff --git a/packages/attendance_management/lib/data/repositories/remote/attendance_register.dart b/packages/attendance_management/lib/data/repositories/remote/attendance_register.dart index 260df0672..917603e03 100644 --- a/packages/attendance_management/lib/data/repositories/remote/attendance_register.dart +++ b/packages/attendance_management/lib/data/repositories/remote/attendance_register.dart @@ -7,7 +7,6 @@ import 'package:attendance_management/attendance_management.dart'; import 'package:digit_data_model/utils/constants.dart'; import 'package:dio/dio.dart'; -import '../../../utils/utils.dart'; class AttendanceRemoteRepository extends RemoteRepository< AttendanceRegisterModel, AttendanceRegisterSearchModel> { diff --git a/packages/attendance_management/lib/models/entities/attendance_log.mapper.dart b/packages/attendance_management/lib/models/entities/attendance_log.mapper.dart index 8b69af9a6..adda2fee0 100644 --- a/packages/attendance_management/lib/models/entities/attendance_log.mapper.dart +++ b/packages/attendance_management/lib/models/entities/attendance_log.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'attendance_log.dart'; @@ -149,10 +149,8 @@ mixin AttendanceLogSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - AttendanceLogSearchModelMapper.ensureInitialized() - .isValueEqual(this as AttendanceLogSearchModel, other)); + return AttendanceLogSearchModelMapper.ensureInitialized() + .equalsValue(this as AttendanceLogSearchModel, other); } @override @@ -416,10 +414,8 @@ mixin AttendanceLogModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - AttendanceLogModelMapper.ensureInitialized() - .isValueEqual(this as AttendanceLogModel, other)); + return AttendanceLogModelMapper.ensureInitialized() + .equalsValue(this as AttendanceLogModel, other); } @override diff --git a/packages/attendance_management/lib/models/entities/attendance_register.mapper.dart b/packages/attendance_management/lib/models/entities/attendance_register.mapper.dart index 53331fead..ef49e4603 100644 --- a/packages/attendance_management/lib/models/entities/attendance_register.mapper.dart +++ b/packages/attendance_management/lib/models/entities/attendance_register.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'attendance_register.dart'; @@ -140,10 +140,8 @@ mixin AttendanceRegisterSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - AttendanceRegisterSearchModelMapper.ensureInitialized() - .isValueEqual(this as AttendanceRegisterSearchModel, other)); + return AttendanceRegisterSearchModelMapper.ensureInitialized() + .equalsValue(this as AttendanceRegisterSearchModel, other); } @override @@ -414,10 +412,8 @@ mixin AttendanceRegisterModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - AttendanceRegisterModelMapper.ensureInitialized() - .isValueEqual(this as AttendanceRegisterModel, other)); + return AttendanceRegisterModelMapper.ensureInitialized() + .equalsValue(this as AttendanceRegisterModel, other); } @override diff --git a/packages/attendance_management/lib/models/entities/attendee.mapper.dart b/packages/attendance_management/lib/models/entities/attendee.mapper.dart index c4f7680a5..49bd9c081 100644 --- a/packages/attendance_management/lib/models/entities/attendee.mapper.dart +++ b/packages/attendance_management/lib/models/entities/attendee.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'attendee.dart'; @@ -92,10 +92,8 @@ mixin AttendeeSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - AttendeeSearchModelMapper.ensureInitialized() - .isValueEqual(this as AttendeeSearchModel, other)); + return AttendeeSearchModelMapper.ensureInitialized() + .equalsValue(this as AttendeeSearchModel, other); } @override @@ -295,10 +293,8 @@ mixin AttendeeModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - AttendeeModelMapper.ensureInitialized() - .isValueEqual(this as AttendeeModel, other)); + return AttendeeModelMapper.ensureInitialized() + .equalsValue(this as AttendeeModel, other); } @override @@ -509,10 +505,8 @@ mixin AttendeeAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - AttendeeAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as AttendeeAdditionalFields, other)); + return AttendeeAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as AttendeeAdditionalFields, other); } @override diff --git a/packages/attendance_management/lib/models/entities/enum_values.mapper.dart b/packages/attendance_management/lib/models/entities/enum_values.mapper.dart index b553a3b88..314ca9539 100644 --- a/packages/attendance_management/lib/models/entities/enum_values.mapper.dart +++ b/packages/attendance_management/lib/models/entities/enum_values.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'enum_values.dart'; diff --git a/packages/attendance_management/lib/models/entities/register_status.mapper.dart b/packages/attendance_management/lib/models/entities/register_status.mapper.dart index 159b11caf..476d9bfd6 100644 --- a/packages/attendance_management/lib/models/entities/register_status.mapper.dart +++ b/packages/attendance_management/lib/models/entities/register_status.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'register_status.dart'; diff --git a/packages/attendance_management/lib/models/entities/staff.mapper.dart b/packages/attendance_management/lib/models/entities/staff.mapper.dart index 299ed1d01..134b80c4b 100644 --- a/packages/attendance_management/lib/models/entities/staff.mapper.dart +++ b/packages/attendance_management/lib/models/entities/staff.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'staff.dart'; @@ -97,10 +97,8 @@ mixin StaffSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - StaffSearchModelMapper.ensureInitialized() - .isValueEqual(this as StaffSearchModel, other)); + return StaffSearchModelMapper.ensureInitialized() + .equalsValue(this as StaffSearchModel, other); } @override @@ -290,10 +288,8 @@ mixin StaffModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - StaffModelMapper.ensureInitialized() - .isValueEqual(this as StaffModel, other)); + return StaffModelMapper.ensureInitialized() + .equalsValue(this as StaffModel, other); } @override @@ -492,10 +488,8 @@ mixin StaffAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - StaffAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as StaffAdditionalFields, other)); + return StaffAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as StaffAdditionalFields, other); } @override diff --git a/packages/attendance_management/lib/pages/manage_attendance.dart b/packages/attendance_management/lib/pages/manage_attendance.dart index 0d8b6f0b2..59f6975be 100644 --- a/packages/attendance_management/lib/pages/manage_attendance.dart +++ b/packages/attendance_management/lib/pages/manage_attendance.dart @@ -2,15 +2,18 @@ import 'package:attendance_management/attendance_management.dart'; import 'package:attendance_management/blocs/date_session_bloc.dart'; import 'package:attendance_management/utils/extensions/extensions.dart'; import 'package:auto_route/auto_route.dart'; -import 'package:digit_components/digit_components.dart'; -import 'package:digit_components/utils/date_utils.dart'; -import 'package:digit_components/widgets/atoms/digit_toaster.dart'; import 'package:digit_data_model/models/entities/individual.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/atoms/label_value_list.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; +import 'package:digit_ui_components/widgets/molecules/label_value_summary.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import '../../utils/i18_key_constants.dart' as i18; import '../router/attendance_router.gm.dart'; +import '../utils/date_util_attendance.dart'; import '../widgets/back_navigation_help_header.dart'; import '../widgets/localized.dart'; import '../widgets/no_result_card.dart'; @@ -57,6 +60,7 @@ class _ManageAttendancePageState extends State { @override Widget build(BuildContext context) { + final theme = Theme.of(context); var localization = AttendanceLocalization.of(context); return BlocProvider( create: (context) => @@ -87,13 +91,13 @@ class _ManageAttendancePageState extends State { register.attendees?.length ?? 0, localization.translate(i18.attendance.startDateLabel): register.startDate != null - ? DigitDateUtils.getDateFromTimestamp( - register.startDate!) + ? AttendanceDateTimeManagement + .getDateFromTimestamp(register.startDate!) : localization.translate(i18.common.coreCommonNA), localization.translate(i18.attendance.endDateLabel): register.endDate != null - ? DigitDateUtils.getDateFromTimestamp( - register.endDate!) + ? AttendanceDateTimeManagement + .getDateFromTimestamp(register.endDate!) : localization.translate(i18.common.coreCommonNA), localization.translate(i18.attendance.statusLabel): register.endDate != null && @@ -171,16 +175,17 @@ class _ManageAttendancePageState extends State { children: [ Padding( padding: - const EdgeInsets.all(kPadding).copyWith( + EdgeInsets.all(theme.spacerTheme.spacer2) + .copyWith( top: 2, - left: kPadding * 2, + left: theme.spacerTheme.spacer2 * 2, ), child: Text( AttendanceLocalization.of(context).translate( i18.attendance.attendanceRegistarLabel), style: DigitTheme.instance.mobileTheme .textTheme.displayMedium - ?.apply(color: const DigitColors().black), + ?.apply(color: Colors.black), textAlign: TextAlign.left, ), ), @@ -194,8 +199,8 @@ class _ManageAttendancePageState extends State { ...list, if (list.length > 1) PoweredByDigit( - version: AttendanceSingleton() - .appVersion), // Show here if more than one register + version: AttendanceSingleton().appVersion), + // Show here if more than one register ], ), registerLoading: () => const Center( @@ -263,43 +268,43 @@ class RegisterCard extends StatelessWidget { @override Widget build(BuildContext context) { + final theme = Theme.of(context); var localization = AttendanceLocalization.of(context); return DigitCard( - padding: const EdgeInsets.all(kPadding), - child: Column( + padding: EdgeInsets.all(theme.spacerTheme.spacer2), + margin: EdgeInsets.all(theme.spacerTheme.spacer2), children: [ - DigitTableCard( - element: data, + LabelValueSummary( + padding: EdgeInsets.all(theme.spacerTheme.spacer3), + items: data.keys.map((e) { + return LabelValueItem( + label: e, labelFlex: 5, value: data[e]?.toString() ?? ''); + }).toList(), ), show - ? DigitElevatedButton( - child: Text( - AttendanceLocalization.of(context) - .translate(i18.attendance.openRegister), - ), + ? DigitButton( + size: DigitButtonSize.large, + type: DigitButtonType.primary, + mainAxisSize: MainAxisSize.max, + label: AttendanceLocalization.of(context) + .translate(i18.attendance.openRegister), onPressed: () async { if (noOfAttendees == 0) { - DigitToast.show( + Toast.showToast( context, - options: DigitToastOptions( - localization.translate( - i18.attendance.noAttendeesEnrolledMessage), - true, - DigitTheme.instance.mobileTheme, - ), + message: localization.translate( + i18.attendance.noAttendeesEnrolledMessage), + type: ToastType.error, ); } else if (startDate != null && startDate!.millisecondsSinceEpoch > DateTime.now().millisecondsSinceEpoch) { - DigitToast.show( + Toast.showToast( context, - options: DigitToastOptions( - localization - .translate(i18.attendance.registerNotStarted), - true, - DigitTheme.instance.mobileTheme, - ), + message: localization + .translate(i18.attendance.registerNotStarted), + type: ToastType.error, ); } else { await context.router.push( @@ -313,8 +318,6 @@ class RegisterCard extends StatelessWidget { }, ) : const Offstage(), - ], - ), - ); + ]); } } diff --git a/packages/attendance_management/lib/pages/mark_attendance.dart b/packages/attendance_management/lib/pages/mark_attendance.dart index 4f18cc14a..22c34b733 100644 --- a/packages/attendance_management/lib/pages/mark_attendance.dart +++ b/packages/attendance_management/lib/pages/mark_attendance.dart @@ -3,11 +3,18 @@ import 'dart:async'; import 'package:attendance_management/attendance_management.dart'; import 'package:attendance_management/utils/extensions/extensions.dart'; import 'package:auto_route/auto_route.dart'; -import 'package:digit_components/digit_components.dart'; -import 'package:digit_components/models/digit_table_model.dart'; -import 'package:digit_components/widgets/atoms/digit_toaster.dart'; -import 'package:digit_components/widgets/digit_sync_dialog.dart'; import 'package:digit_data_model/data/data_repository.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/services/location_bloc.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/utils/component_utils.dart'; +import 'package:digit_ui_components/widgets/atoms/digit_loader.dart'; +import 'package:digit_ui_components/widgets/atoms/digit_search_bar.dart'; +import 'package:digit_ui_components/widgets/atoms/pop_up_card.dart'; +import 'package:digit_ui_components/widgets/atoms/table_cell.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_table.dart' + as table; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:intl/intl.dart'; @@ -32,12 +39,12 @@ class MarkAttendancePage extends LocalizedStatefulWidget { final int? session; const MarkAttendancePage({ - required this.exitTime, - required this.entryTime, - required this.dateTime, required this.attendees, required this.registerId, required this.tenantId, + required this.dateTime, + required this.entryTime, + required this.exitTime, this.session, super.key, super.appLocalizations, @@ -57,7 +64,6 @@ class _MarkAttendancePageState extends State { void initState() { controller = TextEditingController(); controller.addListener(searchByName); - context.read().add(const LoadLocationEvent()); individualLogBloc = AttendanceIndividualBloc( const AttendanceIndividualState.loading(), attendanceLogDataRepository: context @@ -141,7 +147,7 @@ class _MarkAttendancePageState extends State { limitData, viewOnly, ) { - List tableData = []; + List tableData = []; tableData = attendanceSearchModelList != null ? getAttendanceData( @@ -150,76 +156,58 @@ class _MarkAttendancePageState extends State { attendanceCollectionModel!, viewOnly); return ScrollableContent( - enableFixedButton: true, + enableFixedDigitButton: true, footer: viewOnly ? const SizedBox.shrink() - : SizedBox( - height: 140, - child: Card( - margin: const EdgeInsets.all(0), - child: Container( - padding: const EdgeInsets.fromLTRB( - kPadding, 0, kPadding, 0), - child: Column( - children: [ - DigitOutlineIconButton( - buttonStyle: - OutlinedButton.styleFrom( - shape: - const RoundedRectangleBorder( - borderRadius: - BorderRadius.zero, - ), - ), - onPressed: () { - checkIfAllAttendeesMarked( - state, - localizations, - theme, - EnumValues.draft.toValue(), - locationState.latitude, - locationState.longitude, - context, - ); - }, - icon: Icons.drafts_outlined, - label: localizations.translate( - i18.attendance - .saveAndMarkLaterLabel, - ), - ), - DigitElevatedButton( - onPressed: !viewOnly - ? () { - checkIfAllAttendeesMarked( - state, - localizations, - theme, - EnumValues.submit - .toValue(), - locationState.latitude, - locationState.longitude, - context, - ); - } - : () { - // context.router.pop(); - }, - child: Text( - localizations.translate( - (!viewOnly) - ? i18.common - .coreCommonSubmit - : i18.attendance - .closeButton, - ), - ), - ), - ], + : DigitCard( + margin: EdgeInsets.only( + top: theme.spacerTheme.spacer4), + children: [ + DigitButton( + size: DigitButtonSize.large, + type: DigitButtonType.secondary, + mainAxisSize: MainAxisSize.max, + onPressed: () { + checkIfAllAttendeesMarked( + state, + localizations, + theme, + EnumValues.draft.toValue(), + locationState.latitude, + locationState.longitude, + context, + ); + }, + prefixIcon: Icons.drafts_outlined, + label: localizations.translate( + i18.attendance + .saveAndMarkLaterLabel, + ), ), - ), - ), - ), + DigitButton( + size: DigitButtonSize.large, + type: DigitButtonType.primary, + mainAxisSize: MainAxisSize.max, + onPressed: !viewOnly + ? () { + checkIfAllAttendeesMarked( + state, + localizations, + theme, + EnumValues.submit.toValue(), + locationState.latitude, + locationState.longitude, + context, + ); + } + : () {}, + label: localizations.translate( + (!viewOnly) + ? i18.common.coreCommonSubmit + : i18.attendance.closeButton, + ), + ), + ]), mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, header: const BackNavigationHelpHeaderWidget( @@ -227,8 +215,8 @@ class _MarkAttendancePageState extends State { ), children: [ Padding( - padding: const EdgeInsets.only( - left: kPadding * 2, + padding: EdgeInsets.only( + left: theme.spacerTheme.spacer2 * 2, ), child: SizedBox( width: MediaQuery.of(context).size.width, @@ -242,8 +230,10 @@ class _MarkAttendancePageState extends State { ), ), Padding( - padding: const EdgeInsets.only( - left: kPadding * 2, top: 4, bottom: 16), + padding: EdgeInsets.only( + left: theme.spacerTheme.spacer2 * 2, + top: theme.spacerTheme.spacer1, + bottom: theme.spacerTheme.spacer4), child: SizedBox( width: MediaQuery.of(context).size.width, child: Text( @@ -261,7 +251,8 @@ class _MarkAttendancePageState extends State { ), ), Padding( - padding: const EdgeInsets.all(8.0), + padding: + EdgeInsets.all(theme.spacerTheme.spacer3), child: DigitSearchBar( controller: controller, hintText: localizations @@ -272,42 +263,46 @@ class _MarkAttendancePageState extends State { ), ), DigitCard( - child: Column( - mainAxisAlignment: MainAxisAlignment.start, + margin: + EdgeInsets.all(theme.spacerTheme.spacer3), children: [ - Padding( - padding: - const EdgeInsets.only(bottom: 8.0), - child: tableData.isNotEmpty - ? DigitTable( - height: tableData.length > 2 - ? (tableData.length + 1) * 57 - : (tableData.length + 1) * 65, - headerList: headerList( - widget.dateTime, - localizations, - ), - tableData: tableData, - columnWidth: 140, - scrollPhysics: - const NeverScrollableScrollPhysics(), - ) - : NoResultCard( - align: Alignment.center, - label: localizations.translate( - i18.common.noResultsFound, - ), + tableData.isNotEmpty + ? table.DigitTable( + showSelectedState: false, + tableHeight: viewOnly + ? MediaQuery.of(context) + .size + .height * + .55 + : MediaQuery.of(context) + .size + .height * + .4, + tableWidth: MediaQuery.of(context) + .size + .width, + showPagination: false, + showRowsPerPage: false, + withColumnDividers: false, + columns: headerList( + widget.dateTime, + localizations, ), - ), - ], - ), - ), + rows: tableData, + ) + : NoResultCard( + align: Alignment.center, + label: localizations.translate( + i18.common.noResultsFound, + ), + ), + ]), ], ); }, loading: () { return Center( - child: Loaders.circularLoader(context), + child: DigitLoaders.inlineLoader(), ); }, ); @@ -318,20 +313,20 @@ class _MarkAttendancePageState extends State { ))); } - List getAttendanceData( + List getAttendanceData( List? list, bool viewOnly, ) { return list!.map((e) => getAttendanceRow(e, viewOnly)).toList(); } - TableDataRow getAttendanceRow(AttendeeModel tableDataModel, bool viewOnly) { - return TableDataRow([ - TableData( + DigitTableRow getAttendanceRow(AttendeeModel tableDataModel, bool viewOnly) { + return DigitTableRow(tableRow: [ + DigitTableData( tableDataModel.name.toString(), - cellKey: tableDataModel.name, + cellKey: tableDataModel.name ?? '', ), - TableData( + DigitTableData( '', cellKey: tableDataModel.status.toString(), widget: CircularButton( @@ -353,26 +348,26 @@ class _MarkAttendancePageState extends State { }, ), ), - TableData( + DigitTableData( tableDataModel.individualNumber.toString(), - cellKey: tableDataModel.individualNumber, + cellKey: tableDataModel.individualNumber ?? "", ), ]); } - List headerList(DateTime s, dynamic localizations) { + List headerList(DateTime s, dynamic localizations) { return [ - TableHeader( - localizations.translate(i18.attendance.tableHeaderName), - cellKey: 'name', + DigitTableColumn( + header: localizations.translate(i18.attendance.tableHeaderName), + cellValue: 'name', ), - TableHeader( - localizations.translate(i18.attendance.tableHeaderAttendance), - cellKey: 'date', + DigitTableColumn( + header: localizations.translate(i18.attendance.tableHeaderAttendance), + cellValue: 'date', ), - TableHeader( - localizations.translate(i18.attendance.tableHeaderUserId), - cellKey: "userId", + DigitTableColumn( + header: localizations.translate(i18.attendance.tableHeaderUserId), + cellValue: "userId", ), ]; } @@ -414,11 +409,12 @@ class _MarkAttendancePageState extends State { SizedBox( width: 100, height: 40, - child: DigitElevatedButton( - child: Text( - k.translate( - i18.attendance.closeButton, - ), + child: DigitButton( + size: DigitButtonSize.large, + type: DigitButtonType.primary, + mainAxisSize: MainAxisSize.max, + label: k.translate( + i18.attendance.closeButton, ), onPressed: () { context.router.maybePop(); @@ -443,12 +439,12 @@ class _MarkAttendancePageState extends State { double? longitude, BuildContext context) { context.read().add(const LoadLocationEvent()); - DigitComponentsUtils().showLocationCapturingDialog( + DigitComponentsUtils.showDialog( context, localizations.translate(i18.common.locationCapturing), - DigitSyncDialogType.inProgress); + DialogType.inProgress); Future.delayed(const Duration(seconds: 2), () async { - DigitComponentsUtils().hideDialog(context); + DigitComponentsUtils.hideDialog(context); state.maybeWhen( orElse: () {}, loaded: ( @@ -466,14 +462,11 @@ class _MarkAttendancePageState extends State { ((attendanceCollectionModel ?? []) .every((a) => a.status == -1 || a.status == null) && type == EnumValues.draft.toValue())) { - DigitToast.show( + Toast.showToast( context, - options: DigitToastOptions( - localizations - .translate(i18.attendance.pleaseMarkAttForIndividuals), - true, - theme, - ), + message: localizations + .translate(i18.attendance.pleaseMarkAttForIndividuals), + type: ToastType.error, ); } else { if (type == EnumValues.draft.toValue()) { @@ -486,48 +479,61 @@ class _MarkAttendancePageState extends State { latitude: latitude, longitude: longitude, )); - DigitToast.show( + Toast.showToast( context, - options: DigitToastOptions( - localizations.translate(i18.attendance.draftSavedMessage), - false, - theme, - ), + message: + localizations.translate(i18.attendance.draftSavedMessage), + type: ToastType.success, ); } else { - DigitDialog.show(context, - options: DigitDialogOptions( - titleText: localizations.translate( - i18.attendance.confirmationLabel, - ), - contentText: - '${localizations.translate(i18.attendance.confirmationDesc)} \n\n${localizations.translate(i18.attendance.confirmationDescNote)}', - primaryAction: DigitDialogActions( - label: localizations.translate( - i18.attendance.proceed, + showDialog( + context: context, + builder: (BuildContext ctx) { + return Popup( + title: localizations.translate( + i18.attendance.confirmationLabel, ), - action: (context) { - individualLogBloc?.add(SaveAsDraftEvent( - entryTime: widget.entryTime, - exitTime: widget.exitTime, - selectedDate: widget.dateTime, - isSingleSession: widget.session == null, - createOplog: type != EnumValues.draft.toValue(), - latitude: latitude, - longitude: longitude, - )); - Navigator.of(context).pop(); - navigateToAcknowledgement(localizations); - }, - ), - secondaryAction: DigitDialogActions( - label: localizations - .translate(i18.common.coreCommonGoback), - action: (context) { - Navigator.of(context).pop(); - }, - ), - )); + description: + '${localizations.translate(i18.attendance.confirmationDesc)} \n\n${localizations.translate(i18.attendance.confirmationDescNote)}', + actions: [ + DigitButton( + label: localizations.translate( + i18.attendance.proceed, + ), + type: DigitButtonType.primary, + size: DigitButtonSize.large, + onPressed: () { + individualLogBloc?.add(SaveAsDraftEvent( + entryTime: widget.entryTime, + exitTime: widget.exitTime, + selectedDate: widget.dateTime, + isSingleSession: widget.session == null, + createOplog: type != EnumValues.draft.toValue(), + latitude: latitude, + longitude: longitude, + )); + Navigator.of( + context, + rootNavigator: true, + ).pop(true); + navigateToAcknowledgement(localizations); + }, + ), + DigitButton( + label: localizations + .translate(i18.common.coreCommonGoback), + type: DigitButtonType.secondary, + size: DigitButtonSize.large, + onPressed: () { + Navigator.of( + context, + rootNavigator: true, + ).pop(false); + }, + ) + ], + ); + }); } } }); diff --git a/packages/attendance_management/lib/pages/session_select.dart b/packages/attendance_management/lib/pages/session_select.dart index 080d4a428..a79de6369 100644 --- a/packages/attendance_management/lib/pages/session_select.dart +++ b/packages/attendance_management/lib/pages/session_select.dart @@ -1,10 +1,11 @@ import 'package:attendance_management/blocs/date_session_bloc.dart'; import 'package:attendance_management/utils/extensions/extensions.dart'; import 'package:auto_route/auto_route.dart'; -import 'package:digit_components/digit_components.dart'; -import 'package:digit_components/utils/date_utils.dart'; -import 'package:digit_components/widgets/atoms/digit_radio_button_list.dart'; import 'package:digit_data_model/data_model.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/models/RadioButtonModel.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:reactive_forms/reactive_forms.dart'; @@ -17,7 +18,6 @@ import '../models/entities/attendance_log.dart'; import '../models/entities/attendance_register.dart'; import '../models/entities/enum_values.dart'; import '../router/attendance_router.gm.dart'; -import '../utils/constants.dart'; import '../utils/date_util_attendance.dart'; import '../widgets/back_navigation_help_header.dart'; @@ -71,8 +71,8 @@ class _AttendanceDateSessionSelectionPageState @override Widget build(BuildContext context) { + final theme = Theme.of(context); final localizations = AttendanceLocalization.of(context); - return Scaffold( body: BlocProvider( create: (context) => sessionBloc @@ -99,228 +99,275 @@ class _AttendanceDateSessionSelectionPageState showHelp: true, showLogoutCTA: false, ), - enableFixedButton: true, + enableFixedDigitButton: true, footer: DigitCard( - margin: const EdgeInsets.fromLTRB( - 0, kPadding, 0, 0), - padding: const EdgeInsets.fromLTRB( - kPadding, 0, kPadding, 0), - child: ReactiveValueListenableBuilder( - formControlName: _dateOfSession, - builder: (context, value, _) { - return DigitElevatedButton( - child: Text(localizations.translate( - isAttendanceCompleted( - value.value as DateTime) - ? i18.attendance.viewAttendance - : i18.attendance.markAttendance, - )), - onPressed: () async { - if (selectedRegister + padding: + EdgeInsets.all(theme.spacerTheme.spacer2), + children: [ + DigitButton( + size: DigitButtonSize.large, + type: DigitButtonType.primary, + mainAxisSize: MainAxisSize.max, + label: localizations.translate( + isAttendanceCompleted(form + .control(_dateOfSession) + .value as DateTime) + ? i18.attendance.viewAttendance + : i18.attendance.markAttendance, + ), + onPressed: () async { + form.markAllAsTouched(); + if (selectedRegister.additionalDetails?[ + EnumValues.sessions + .toValue()] == + 2 && + form.control(_sessionRadio).value == + null) { + form + .control(_sessionRadio) + .setErrors({'': true}); + + form + .control(_sessionRadio) + .setValidators( + [Validators.required]); + + // Ensure form control is updated after changing validators + form + .control(_sessionRadio) + .updateValueAndValidity(); + } else { + if (!form.valid) { + return; + } else { + final session = form + .control(_sessionRadio) + .value; + DateTime dateSession = form + .control(_dateOfSession) + .value; + + final entryTime = selectedRegister .additionalDetails?[ EnumValues.sessions .toValue()] == - 2 && - form - .control(_sessionRadio) - .value == - null) { - form - .control(_sessionRadio) - .setErrors({'': true}); - } else { - form.markAllAsTouched(); - - if (!form.valid) { - return; - } else { - final session = form - .control(_sessionRadio) - .value as KeyValue?; - DateTime dateSession = form - .control(_dateOfSession) - .value; - - final entryTime = selectedRegister - .additionalDetails?[ - EnumValues.sessions - .toValue()] == - 2 - ? AttendanceDateTimeManagement - .getMillisecondEpoch( - dateSession, - form - .control( - _sessionRadio) - .value != - null - ? form + 2 + ? AttendanceDateTimeManagement + .getMillisecondEpoch( + dateSession, + form .control( _sessionRadio) - .value - .key - : 0, - "entryTime", - ) - : (DateTime( - dateSession.year, - dateSession.month, - dateSession.day, - 9) - .millisecondsSinceEpoch); + .value != + null + ? int.parse(form + .control( + _sessionRadio) + .value) + : 0, + "entryTime", + ) + : (DateTime( + dateSession.year, + dateSession.month, + dateSession.day, + 9) + .millisecondsSinceEpoch); - final exitTime = selectedRegister - .additionalDetails?[ - EnumValues.sessions - .toValue()] == - 2 - ? AttendanceDateTimeManagement - .getMillisecondEpoch( - dateSession, - form - .control( - _sessionRadio) - .value != - null - ? form + final exitTime = selectedRegister + .additionalDetails?[ + EnumValues.sessions + .toValue()] == + 2 + ? AttendanceDateTimeManagement + .getMillisecondEpoch( + dateSession, + form .control( _sessionRadio) - .value - .key - : 1, - "exitTime", - ) - : (DateTime( - dateSession.year, - dateSession.month, - dateSession.day, - 18) - .millisecondsSinceEpoch); - - final submit = - await context.router.push( - MarkAttendanceRoute( - attendees: selectedRegister - .attendees != + .value != null - //Filtering attendees based on current time and enrollment date of the attendee - ? (selectedRegister - .attendees ?? - []) - .where((att) => - att.enrollmentDate != - null && - att.enrollmentDate! <= - entryTime) - .toList() - : [], - dateTime: dateSession, - session: session?.key, - entryTime: entryTime, - exitTime: exitTime, - registerId: - selectedRegister.id, - tenantId: selectedRegister - .tenantId - .toString(), - ), - ); - if (submit == null) { - form - .control(_sessionRadio) - .value = null; - } - } + ? int.parse(form + .control( + _sessionRadio) + .value) + : 1, + "exitTime", + ) + : (DateTime( + dateSession.year, + dateSession.month, + dateSession.day, + 18) + .millisecondsSinceEpoch); + + final submit = + await context.router.push( + MarkAttendanceRoute( + attendees: selectedRegister + .attendees != + null + //Filtering attendees based on current time and enrollment date of the attendee + ? (selectedRegister + .attendees ?? + []) + .where((att) => + att.enrollmentDate != + null && + att.enrollmentDate! <= + entryTime) + .toList() + : [], + dateTime: dateSession, + session: session != null + ? int.parse(session) + : null, + entryTime: entryTime, + exitTime: exitTime, + registerId: selectedRegister.id, + tenantId: selectedRegister + .tenantId + .toString(), + ), + ); + if (submit == null) { + form + .control(_sessionRadio) + .value = null; } - }, - ); - })), + } + } + }, + ) + ]), children: [ - DigitCard( - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Text( - localizations.translate( - i18.attendance.selectSession, - ), - style: DigitTheme.instance.mobileTheme - .textTheme.displayMedium, - ), - DigitDateFormPicker( - start: selectedRegister.startDate != - null - ? DateTime - .fromMillisecondsSinceEpoch( - selectedRegister.startDate!) - : null, - end: selectedRegister.endDate != null - ? selectedRegister.endDate! < - DateTime.now() - .millisecondsSinceEpoch + DigitCard(children: [ + Text( + localizations.translate( + i18.attendance.selectSession, + ), + style: DigitTheme.instance.mobileTheme + .textTheme.displayMedium, + ), + ReactiveWrapperField( + formControlName: _dateOfSession, + builder: (field) { + return LabeledField( + label: localizations.translate( + i18.attendance.dateOfSession, + ), + child: DigitDateFormInput( + onChange: (val) => { + form + .control(_dateOfSession) + .markAsTouched(), + form + .control(_dateOfSession) + .value = + AttendanceDateTimeManagement + .getFormattedDateToDateTime( + val), + }, + initialValue: + AttendanceDateTimeManagement + .getDateString(form + .control(_dateOfSession) + .value), + firstDate: selectedRegister + .startDate != + null ? DateTime .fromMillisecondsSinceEpoch( selectedRegister - .endDate!) - : DateTime.now() - : null, - label: localizations.translate( - i18.attendance.dateOfSession, - ), - formControlName: _dateOfSession, - cancelText: localizations.translate( - i18.common.coreCommonCancel), - confirmText: localizations - .translate(i18.common.coreCommonOk), - ), - if (selectedRegister.additionalDetails?[ - EnumValues.sessions.toValue()] == - 2) - DigitRadioButtonList( - labelText: localizations.translate(i18 - .attendance.sessionDescForRadio), - labelStyle: DigitTheme - .instance - .mobileTheme - .textTheme - .headlineSmall - ?.copyWith( - fontWeight: FontWeight.w400, - fontSize: 16, + .startDate!) + : null, + lastDate: selectedRegister + .endDate != + null + ? selectedRegister.endDate! < + DateTime.now() + .millisecondsSinceEpoch + ? DateTime + .fromMillisecondsSinceEpoch( + selectedRegister + .endDate!) + : DateTime.now() + : null, + cancelText: localizations.translate( + i18.common.coreCommonCancel), + confirmText: + localizations.translate( + i18.common.coreCommonOk), ), - isRequired: true, - errorMessage: localizations.translate( - i18.attendance.plzSelectSession), - formControlName: _sessionRadio, - options: [ - KeyValue( - i18.attendance.morningSession, - 0), - KeyValue( - i18.attendance.eveningSession, - 1), - ], - valueMapper: (value) { - return localizations - .translate(value.label); - }, - ), - ], - ), - ), + ); + }), + if (selectedRegister.additionalDetails?[ + EnumValues.sessions.toValue()] == + 2) + ReactiveWrapperField( + formControlName: _sessionRadio, + validationMessages: { + 'required': (_) => + localizations.translate(i18 + .attendance.plzSelectSession), + }, + showErrors: (control) => + control.invalid && control.touched, + // Ensures error is shown if invalid and touched + builder: (field) { + return LabeledField( + isRequired: true, + label: localizations.translate(i18 + .attendance + .sessionDescForRadio), + child: RadioList( + onChanged: (val) { + form + .control(_sessionRadio) + .markAsTouched(); + form + .control(_sessionRadio) + .value = val.code; + }, + groupValue: form + .control(_sessionRadio) + .value ?? + "", + errorMessage: field.errorText, + radioDigitButtons: [ + RadioButtonModel( + code: "0", + name: localizations + .translate( + i18.attendance + .morningSession, + )), + RadioButtonModel( + code: "1", + name: localizations + .translate( + i18.attendance + .eveningSession, + )) + ]), + ); + }), + ]), if (showInfoCard( selectedRegister, DateTime.now(), )) - DigitInfoCard( - title: localizations.translate( - i18.attendance.missedAttendanceHeader, - ), - description: localizations.translate( - getMissedDays(context), + DigitCard(children: [ + InfoCard( + title: localizations.translate( + i18.attendance.missedAttendanceHeader, + ), + type: InfoType.info, + description: localizations.translate( + getMissedDays(context), + ), ), - ) + ]) else const SizedBox(), ], @@ -335,7 +382,7 @@ class _AttendanceDateSessionSelectionPageState return fb.group({ _dateOfSession: FormControl(value: DateTime.now(), validators: []), - _sessionRadio: FormControl(value: null), + _sessionRadio: FormControl(value: null, validators: []), }); } @@ -378,11 +425,13 @@ class _AttendanceDateSessionSelectionPageState if ((register.attendanceLog ?? []).isNotEmpty) { final selectDateCompleted = register.attendanceLog ?.where((l) => - DigitDateUtils.getFilteredDate(l.keys.first.toString()) == - DigitDateUtils.getFilteredDate(selectedDate.toString())) - .first - .values - .first; + AttendanceDateTimeManagement.getFilteredDate( + l.keys.first.toString()) == + AttendanceDateTimeManagement.getFilteredDate( + selectedDate.toString())) + .firstOrNull + ?.values + .firstOrNull; return selectDateCompleted; } diff --git a/packages/attendance_management/lib/router/attendance_router.dart b/packages/attendance_management/lib/router/attendance_router.dart index 686402c6d..941cf3044 100644 --- a/packages/attendance_management/lib/router/attendance_router.dart +++ b/packages/attendance_management/lib/router/attendance_router.dart @@ -4,14 +4,16 @@ import 'attendance_router.gm.dart'; @AutoRouterConfig.module() class AttendanceRoute extends $AttendanceRoute { - @override RouteType get defaultRouteType => const RouteType.material(); - @override List routes = [ AutoRoute(page: ManageAttendanceRoute.page), - AutoRoute(page: AttendanceDateSessionSelectionRoute.page,), - AutoRoute(page: MarkAttendanceRoute.page,), + AutoRoute( + page: AttendanceDateSessionSelectionRoute.page, + ), + AutoRoute( + page: MarkAttendanceRoute.page, + ), AutoRoute(page: AttendanceAcknowledgementRoute.page), ]; } diff --git a/packages/attendance_management/lib/router/attendance_router.gm.dart b/packages/attendance_management/lib/router/attendance_router.gm.dart index 8fbef1426..9508c4211 100644 --- a/packages/attendance_management/lib/router/attendance_router.gm.dart +++ b/packages/attendance_management/lib/router/attendance_router.gm.dart @@ -8,12 +8,10 @@ // coverage:ignore-file // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:ui' as _i8; - -import 'package:attendance_management/attendance_management.dart' as _i10; +import 'package:attendance_management/attendance_management.dart' as _i9; import 'package:attendance_management/blocs/app_localization.dart' as _i7; import 'package:attendance_management/models/entities/attendance_register.dart' - as _i9; + as _i8; import 'package:attendance_management/pages/manage_attendance.dart' as _i3; import 'package:attendance_management/pages/mark_attendance.dart' as _i4; import 'package:attendance_management/pages/session_select.dart' as _i2; @@ -38,8 +36,6 @@ abstract class $AttendanceRoute extends _i5.AutoRouterModule { descriptionWidget: args.descriptionWidget, action: args.action, actionLabel: args.actionLabel, - icon: args.icon, - color: args.color, enableBackToSearch: args.enableBackToSearch, secondaryAction: args.secondaryAction, secondaryLabel: args.secondaryLabel, @@ -69,12 +65,12 @@ abstract class $AttendanceRoute extends _i5.AutoRouterModule { return _i5.AutoRoutePage( routeData: routeData, child: _i4.MarkAttendancePage( - exitTime: args.exitTime, - entryTime: args.entryTime, - dateTime: args.dateTime, attendees: args.attendees, registerId: args.registerId, tenantId: args.tenantId, + dateTime: args.dateTime, + entryTime: args.entryTime, + exitTime: args.exitTime, session: args.session, key: args.key, appLocalizations: args.appLocalizations, @@ -97,8 +93,6 @@ class AttendanceAcknowledgementRoute _i6.Widget? descriptionWidget, void Function()? action, String? actionLabel, - _i6.IconData? icon, - _i8.Color? color, bool enableBackToSearch = true, void Function()? secondaryAction, String? secondaryLabel, @@ -114,8 +108,6 @@ class AttendanceAcknowledgementRoute descriptionWidget: descriptionWidget, action: action, actionLabel: actionLabel, - icon: icon, - color: color, enableBackToSearch: enableBackToSearch, secondaryAction: secondaryAction, secondaryLabel: secondaryLabel, @@ -139,8 +131,6 @@ class AttendanceAcknowledgementRouteArgs { this.descriptionWidget, this.action, this.actionLabel, - this.icon, - this.color, this.enableBackToSearch = true, this.secondaryAction, this.secondaryLabel, @@ -162,10 +152,6 @@ class AttendanceAcknowledgementRouteArgs { final String? actionLabel; - final _i6.IconData? icon; - - final _i8.Color? color; - final bool enableBackToSearch; final void Function()? secondaryAction; @@ -174,7 +160,7 @@ class AttendanceAcknowledgementRouteArgs { @override String toString() { - return 'AttendanceAcknowledgementRouteArgs{key: $key, appLocalizations: $appLocalizations, label: $label, subLabel: $subLabel, description: $description, descriptionWidget: $descriptionWidget, action: $action, actionLabel: $actionLabel, icon: $icon, color: $color, enableBackToSearch: $enableBackToSearch, secondaryAction: $secondaryAction, secondaryLabel: $secondaryLabel}'; + return 'AttendanceAcknowledgementRouteArgs{key: $key, appLocalizations: $appLocalizations, label: $label, subLabel: $subLabel, description: $description, descriptionWidget: $descriptionWidget, action: $action, actionLabel: $actionLabel, enableBackToSearch: $enableBackToSearch, secondaryAction: $secondaryAction, secondaryLabel: $secondaryLabel}'; } } @@ -183,7 +169,7 @@ class AttendanceAcknowledgementRouteArgs { class AttendanceDateSessionSelectionRoute extends _i5.PageRouteInfo { AttendanceDateSessionSelectionRoute({ - required List<_i9.AttendanceRegisterModel> registers, + required List<_i8.AttendanceRegisterModel> registers, required String registerID, _i6.Key? key, _i7.AttendanceLocalization? appLocalizations, @@ -213,7 +199,7 @@ class AttendanceDateSessionSelectionRouteArgs { this.appLocalizations, }); - final List<_i9.AttendanceRegisterModel> registers; + final List<_i8.AttendanceRegisterModel> registers; final String registerID; @@ -245,25 +231,25 @@ class ManageAttendanceRoute extends _i5.PageRouteInfo { /// [_i4.MarkAttendancePage] class MarkAttendanceRoute extends _i5.PageRouteInfo { MarkAttendanceRoute({ - required int exitTime, - required int entryTime, - required DateTime dateTime, - required List<_i10.AttendeeModel> attendees, + required List<_i9.AttendeeModel> attendees, required String registerId, required String tenantId, + required DateTime dateTime, + required int entryTime, + required int exitTime, int? session, _i6.Key? key, - _i10.AttendanceLocalization? appLocalizations, + _i9.AttendanceLocalization? appLocalizations, List<_i5.PageRouteInfo>? children, }) : super( MarkAttendanceRoute.name, args: MarkAttendanceRouteArgs( - exitTime: exitTime, - entryTime: entryTime, - dateTime: dateTime, attendees: attendees, registerId: registerId, tenantId: tenantId, + dateTime: dateTime, + entryTime: entryTime, + exitTime: exitTime, session: session, key: key, appLocalizations: appLocalizations, @@ -279,37 +265,37 @@ class MarkAttendanceRoute extends _i5.PageRouteInfo { class MarkAttendanceRouteArgs { const MarkAttendanceRouteArgs({ - required this.exitTime, - required this.entryTime, - required this.dateTime, required this.attendees, required this.registerId, required this.tenantId, + required this.dateTime, + required this.entryTime, + required this.exitTime, this.session, this.key, this.appLocalizations, }); - final int exitTime; + final List<_i9.AttendeeModel> attendees; - final int entryTime; + final String registerId; - final DateTime dateTime; + final String tenantId; - final List<_i10.AttendeeModel> attendees; + final DateTime dateTime; - final String registerId; + final int entryTime; - final String tenantId; + final int exitTime; final int? session; final _i6.Key? key; - final _i10.AttendanceLocalization? appLocalizations; + final _i9.AttendanceLocalization? appLocalizations; @override String toString() { - return 'MarkAttendanceRouteArgs{exitTime: $exitTime, entryTime: $entryTime, dateTime: $dateTime, attendees: $attendees, registerId: $registerId, tenantId: $tenantId, session: $session, key: $key, appLocalizations: $appLocalizations}'; + return 'MarkAttendanceRouteArgs{attendees: $attendees, registerId: $registerId, tenantId: $tenantId, dateTime: $dateTime, entryTime: $entryTime, exitTime: $exitTime, session: $session, key: $key, appLocalizations: $appLocalizations}'; } } diff --git a/packages/attendance_management/lib/utils/date_util_attendance.dart b/packages/attendance_management/lib/utils/date_util_attendance.dart index 4b06a5c5f..2473fecf7 100644 --- a/packages/attendance_management/lib/utils/date_util_attendance.dart +++ b/packages/attendance_management/lib/utils/date_util_attendance.dart @@ -1,3 +1,6 @@ +import 'package:flutter/foundation.dart'; +import 'package:intl/intl.dart'; + class AttendanceDateTimeManagement { static int getMillisecondEpoch( DateTime k, @@ -34,4 +37,47 @@ class AttendanceDateTimeManagement { } } } + + static String getDateString(DateTime date) { + final DateFormat formatter = DateFormat('dd/MM/yyyy'); + return formatter.format(date); + } + + // Function to parse the provided date string and return a DateTime object. + static DateTime? getFormattedDateToDateTime(String date) { + try { + DateFormat inputFormat; + inputFormat = date.contains('-') + ? DateFormat('dd-MM-yyyy') + : DateFormat('dd/MM/yyyy'); + DateTime inputDate = inputFormat.parse(date); + + return inputDate; + } on Exception catch (e) { + if (kDebugMode) { + print(e); + } + + return null; + } + } + + // Function to get a formatted date string based on the provided date string and date format. + static getFilteredDate(String date, {String? dateFormat}) { + if (date.trim().isEmpty) return ''; + try { + var dateTime = DateTime.parse(date).toLocal(); + return DateFormat(dateFormat ?? "dd/MM/yyyy").format(dateTime); + } on Exception catch (e) { + if (kDebugMode) { + print(e); + } + } + } + + // Function to get a formatted date string from the provided timestamp in milliseconds. + static String getDateFromTimestamp(int timestamp, {String? dateFormat}) { + DateTime date = DateTime.fromMillisecondsSinceEpoch(timestamp); + return DateFormat(dateFormat ?? "dd/MM/yyyy").format(date); + } } diff --git a/packages/attendance_management/lib/widgets/attendance_acknowledgement.dart b/packages/attendance_management/lib/widgets/attendance_acknowledgement.dart index 3e0de14ae..eb912631c 100644 --- a/packages/attendance_management/lib/widgets/attendance_acknowledgement.dart +++ b/packages/attendance_management/lib/widgets/attendance_acknowledgement.dart @@ -1,9 +1,6 @@ import 'package:auto_route/auto_route.dart'; -import 'package:digit_components/theme/digit_theme.dart'; -import 'package:digit_components/widgets/digit_card.dart'; -import 'package:digit_components/widgets/digit_elevated_button.dart'; -import 'package:digit_components/widgets/digit_outline_button.dart'; -import 'package:digit_components/widgets/scrollable_content.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/widgets/molecules/panel_cards.dart'; import 'package:flutter/material.dart'; import '../../../widgets/localized.dart'; @@ -16,15 +13,13 @@ class AttendanceAcknowledgementPage extends LocalizedStatefulWidget { final String? subLabel; final String? description; final Widget? descriptionWidget; - final IconData icon; final VoidCallback? action; final String? actionLabel; - final Color color; final bool enableBackToSearch; final VoidCallback? secondaryAction; final String? secondaryLabel; - AttendanceAcknowledgementPage({ + const AttendanceAcknowledgementPage({ super.key, super.appLocalizations, required this.label, @@ -33,13 +28,10 @@ class AttendanceAcknowledgementPage extends LocalizedStatefulWidget { this.descriptionWidget, this.action, this.actionLabel, - IconData? icon, - Color? color, this.enableBackToSearch = true, this.secondaryAction, this.secondaryLabel, - }) : color = color ?? DigitTheme.instance.colors.darkSpringGreen, - icon = icon ?? Icons.check_circle; + }); @override State createState() => @@ -55,104 +47,33 @@ class _AttendanceAcknowledgementPageState @override Widget build(BuildContext context) { - final theme = Theme.of(context); var localizations = AttendanceLocalization.of(context); return Scaffold( body: ScrollableContent( children: [ - DigitCard( - padding: EdgeInsets.zero, - child: Column(children: [ - Container( - padding: const EdgeInsets.symmetric( - horizontal: kPadding * 2, - vertical: kPadding * 4, - ), - constraints: BoxConstraints( - minWidth: MediaQuery.of(context).size.width, - minHeight: MediaQuery.of(context).size.height / 3, - ), - color: widget.color, - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - textAlign: TextAlign.center, - localizations.translate( - i18.attendance.attendanceSubmittedSuccessMsg, - ), - style: DigitTheme - .instance.mobileTheme.textTheme.displayMedium - ?.apply( - color: theme.colorScheme.onPrimary, - ), - ), - Padding( - padding: DigitTheme.instance.containerMargin, - child: Icon( - widget.icon, - size: 32, - color: theme.colorScheme.onPrimary, - ), - ), - ], - ), - ), - Padding( - padding: DigitTheme.instance.containerMargin, - child: Align( - alignment: Alignment.centerLeft, - child: widget.descriptionWidget ?? - Text( - widget.description ?? '', - style: theme.textTheme.bodyMedium, - ), - ), - ), - if (widget.enableBackToSearch) - Padding( - padding: const EdgeInsets.fromLTRB( - kPadding, - kPadding, - kPadding, - kPadding * 2, - ), - child: Column( - children: [ - Column( - children: [ - DigitElevatedButton( - onPressed: widget.action, - child: Text(widget.actionLabel ?? ''), - ), - const SizedBox( - height: kPadding, - ), - if (widget.secondaryLabel != null) - DigitOutLineButton( - buttonStyle: OutlinedButton.styleFrom( - backgroundColor: Colors.white, - side: BorderSide( - width: 1.0, - color: Theme.of(context).colorScheme.secondary, - ), - minimumSize: Size( - MediaQuery.of(context).size.width / 1, - 50, - ), - shape: null, - ), - label: widget.secondaryLabel ?? '', - onPressed: widget.secondaryAction, - ), - ], - ), - ], + PanelCard( + type: PanelType.success, + title: widget.label, + description: widget.description ?? + localizations.translate( + i18.acknowledgementSuccess.acknowledgementDescriptionText, ), + actions: [ + DigitButton( + label: widget.actionLabel ?? '', + onPressed: widget.action ?? () {}, + type: DigitButtonType.primary, + size: DigitButtonSize.large, + mainAxisSize: MainAxisSize.max, + ), + DigitButton( + type: DigitButtonType.secondary, + size: DigitButtonSize.large, + label: widget.secondaryLabel ?? '', + onPressed: widget.secondaryAction ?? () {}, ), - ]), - ), + ]), ], )); } diff --git a/packages/attendance_management/lib/widgets/back_navigation_help_header.dart b/packages/attendance_management/lib/widgets/back_navigation_help_header.dart index 886f6e828..3989fc620 100644 --- a/packages/attendance_management/lib/widgets/back_navigation_help_header.dart +++ b/packages/attendance_management/lib/widgets/back_navigation_help_header.dart @@ -35,7 +35,7 @@ class BackNavigationHelpHeaderWidget extends StatelessWidget { Flexible( child: TextButton.icon( style: TextButton.styleFrom( - foregroundColor: theme.colorScheme.onBackground, + foregroundColor: theme.colorScheme.onSurface, padding: EdgeInsets.zero, ), onPressed: () { diff --git a/packages/attendance_management/lib/widgets/circular_button.dart b/packages/attendance_management/lib/widgets/circular_button.dart index 90f4c4d1b..cd47dc48d 100644 --- a/packages/attendance_management/lib/widgets/circular_button.dart +++ b/packages/attendance_management/lib/widgets/circular_button.dart @@ -1,7 +1,8 @@ import 'dart:math'; import 'package:attendance_management/attendance_management.dart'; -import 'package:digit_components/digit_components.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; import 'package:flutter/material.dart'; import '../../utils/i18_key_constants.dart' as i18; @@ -34,6 +35,7 @@ class CircularButton extends StatelessWidget { @override Widget build(BuildContext context) { + final theme = Theme.of(context); return Align( alignment: Alignment.centerLeft, child: GestureDetector( @@ -42,8 +44,8 @@ class CircularButton extends StatelessWidget { ? Row( children: [ Padding( - padding: const EdgeInsets.all( - kPadding / 4, + padding: EdgeInsets.all( + theme.spacerTheme.spacer2 / 4, ), child: CustomPaint( size: const Size( @@ -51,13 +53,13 @@ class CircularButton extends StatelessWidget { 30, ), painter: HalfCirclePainter( - color: const DigitColors().amber, + color: theme.colorTheme.alert.warning, ), ), ), Padding( - padding: const EdgeInsets.only( - left: kPadding / 2, + padding: EdgeInsets.only( + left: theme.spacerTheme.spacer2 / 2, ), child: Text( AttendanceLocalization.of(context) @@ -65,7 +67,7 @@ class CircularButton extends StatelessWidget { style: DigitTheme .instance.mobileTheme.textTheme.labelSmall ?.apply( - color: const DigitColors().amber, + color: theme.colorTheme.alert.warning, ), ), ), @@ -76,35 +78,35 @@ class CircularButton extends StatelessWidget { Container( height: 30, width: 30, - margin: const EdgeInsets.all( - kPadding / 4, + margin: EdgeInsets.all( + theme.spacerTheme.spacer2 / 4, ), decoration: BoxDecoration( shape: BoxShape.circle, color: index.isNegative || index == 0.0 ? Colors.white : index == 0.5 - ? const DigitColors().amber - : const DigitColors().darkSpringGreen, + ? theme.colorTheme.alert.warning + : theme.colorTheme.alert.success, border: Border.all( width: 2, color: onTap != null ? index.isNegative ? Colors.black : index == 0.0 - ? const DigitColors().lavaRed + ? theme.colorTheme.alert.error : index == 0.5 - ? const DigitColors().amber - : const DigitColors().darkSpringGreen - : const DigitColors().cloudGray, + ? theme.colorTheme.alert.warning + : theme.colorTheme.alert.success + : Colors.grey, style: BorderStyle.solid, ), ), ), if (index != -1) Padding( - padding: const EdgeInsets.only( - left: kPadding / 2, + padding: EdgeInsets.only( + left: theme.spacerTheme.spacer2 / 2, ), child: Text( AttendanceLocalization.of(context).translate( @@ -115,9 +117,9 @@ class CircularButton extends StatelessWidget { .instance.mobileTheme.textTheme.labelSmall ?.apply( color: index == 0.0 - ? const DigitColors().lavaRed - : const DigitColors().darkSpringGreen, - ), + ? theme.colorTheme.alert.error + : theme.colorTheme.alert.success + ) ), ), ], diff --git a/packages/attendance_management/lib/widgets/no_result_card.dart b/packages/attendance_management/lib/widgets/no_result_card.dart index c1f9f7f0b..49f8413ac 100644 --- a/packages/attendance_management/lib/widgets/no_result_card.dart +++ b/packages/attendance_management/lib/widgets/no_result_card.dart @@ -1,4 +1,4 @@ -import 'package:digit_components/digit_components.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; @@ -21,7 +21,7 @@ class NoResultCard extends StatelessWidget { return Align( alignment: align, child: Padding( - padding: const EdgeInsets.all(kPadding), + padding: EdgeInsets.all(theme.spacerTheme.spacer2), child: Column( children: [ SvgPicture.asset(noResultSvg), diff --git a/packages/attendance_management/pubspec.lock b/packages/attendance_management/pubspec.lock index 065d42847..1ac5cfd25 100644 --- a/packages/attendance_management/pubspec.lock +++ b/packages/attendance_management/pubspec.lock @@ -29,18 +29,18 @@ packages: dependency: transitive description: name: ansicolor - sha256: "8bf17a8ff6ea17499e40a2d2542c2f481cd7615760c6d34065cb22bfd22e6880" + sha256: "50e982d500bc863e1d703448afdbf9e5a72eb48840a4f766fa361ffd6877055f" url: "https://pub.dev" source: hosted - version: "2.0.2" + version: "2.0.3" archive: dependency: transitive description: name: archive - sha256: "6bd38d335f0954f5fad9c79e614604fbf03a0e5b975923dd001b6ea965ef5b4b" + sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d url: "https://pub.dev" source: hosted - version: "3.6.0" + version: "3.6.1" args: dependency: transitive description: @@ -61,18 +61,18 @@ packages: dependency: "direct main" description: name: auto_route - sha256: eb33554581a0a4aa7e6da0f13a44291a55bf71359012f1d9feb41634ff908ff8 + sha256: a9001a90539ca3effc168f7e1029a5885c7326b9032c09ac895e303c1d137704 url: "https://pub.dev" source: hosted - version: "7.9.2" + version: "8.3.0" auto_route_generator: dependency: "direct dev" description: name: auto_route_generator - sha256: "11067a3bcd643812518fe26c0c9ec073990286cabfd9d74b6da9ef9b913c4d22" + sha256: ba28133d3a3bf0a66772bcc98dade5843753cd9f1a8fb4802b842895515b67d3 url: "https://pub.dev" source: hosted - version: "7.3.2" + version: "8.0.0" bloc: dependency: transitive description: @@ -130,13 +130,13 @@ packages: source: hosted version: "2.4.2" build_runner: - dependency: "direct main" + dependency: "direct dev" description: name: build_runner - sha256: "3ac61a79bfb6f6cc11f693591063a7f19a7af628dc52f141743edac5c16e8c22" + sha256: "644dc98a0f179b872f612d3eb627924b578897c629788e858157fa5e704ca0c7" url: "https://pub.dev" source: hosted - version: "2.4.9" + version: "2.4.11" build_runner_core: dependency: transitive description: @@ -161,6 +161,46 @@ packages: url: "https://pub.dev" source: hosted version: "8.9.2" + camera: + dependency: transitive + description: + name: camera + sha256: "26ff41045772153f222ffffecba711a206f670f5834d40ebf5eed3811692f167" + url: "https://pub.dev" + source: hosted + version: "0.11.0+2" + camera_android_camerax: + dependency: transitive + description: + name: camera_android_camerax + sha256: "011be2ab0e5b3e3aa8094413fa890f8c5c5afd7cfdaef353a992047d4dab5780" + url: "https://pub.dev" + source: hosted + version: "0.6.8+2" + camera_avfoundation: + dependency: transitive + description: + name: camera_avfoundation + sha256: "2e4c568f70e406ccb87376bc06b53d2f5bebaab71e2fbcc1a950e31449381bcf" + url: "https://pub.dev" + source: hosted + version: "0.9.17+5" + camera_platform_interface: + dependency: transitive + description: + name: camera_platform_interface + sha256: b3ede1f171532e0d83111fe0980b46d17f1aa9788a07a2fbed07366bbdbb9061 + url: "https://pub.dev" + source: hosted + version: "2.8.0" + camera_web: + dependency: transitive + description: + name: camera_web + sha256: b9235ec0a2ce949daec546f1f3d86f05c3921ed31c7d9ab6b7c03214d152fc2d + url: "https://pub.dev" + source: hosted + version: "0.3.4" characters: dependency: transitive description: @@ -217,22 +257,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.18.0" - connectivity_plus: - dependency: "direct main" - description: - name: connectivity_plus - sha256: "224a77051d52a11fbad53dd57827594d3bd24f945af28bd70bab376d68d437f0" - url: "https://pub.dev" - source: hosted - version: "5.0.2" - connectivity_plus_platform_interface: - dependency: transitive - description: - name: connectivity_plus_platform_interface - sha256: cf1d1c28f4416f8c654d7dc3cd638ec586076255d407cef3ddbdaf178272a71a - url: "https://pub.dev" - source: hosted - version: "1.2.4" convert: dependency: transitive description: @@ -249,6 +273,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.8.0" + cross_file: + dependency: transitive + description: + name: cross_file + sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670" + url: "https://pub.dev" + source: hosted + version: "0.3.4+2" crypto: dependency: transitive description: @@ -257,14 +289,14 @@ packages: url: "https://pub.dev" source: hosted version: "3.0.3" - cupertino_icons: + csslib: dependency: transitive description: - name: cupertino_icons - sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 + name: csslib + sha256: "706b5707578e0c1b4b7550f64078f0a0f19dec3f50a178ffae7006b0a9ca58fb" url: "https://pub.dev" source: hosted - version: "1.0.8" + version: "1.0.0" dart_mappable: dependency: "direct main" description: @@ -277,11 +309,11 @@ packages: dependency: "direct dev" description: path: "packages/dart_mappable_builder" - ref: master - resolved-ref: "9b887d24c05459c027a92391869d4c10b440e00f" + ref: "1.6-final-dev" + resolved-ref: "1e7467577a9701d396f7e23afbf00065e54c5469" url: "https://github.com/egovernments/health-campaign-field-worker-app/" source: git - version: "4.2.0" + version: "4.2.3" dart_style: dependency: transitive description: @@ -298,14 +330,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.0" - dbus: - dependency: transitive - description: - name: dbus - sha256: "365c771ac3b0e58845f39ec6deebc76e3276aa9922b0cc60840712094d9047ac" - url: "https://pub.dev" - source: hosted - version: "0.7.10" diff_match_patch: dependency: transitive description: @@ -314,38 +338,54 @@ packages: url: "https://pub.dev" source: hosted version: "0.4.1" - digit_components: + digit_data_model: dependency: "direct main" description: - name: digit_components - sha256: "9cca4d9a546037080afe02b6ade82fdf01574e11f5656ad12120fd6966578616" + name: digit_data_model + sha256: c3bc7299a7d927ebb83d8e91c1d7a8a51f6a1d1295dafeacb642012b72b99a2f url: "https://pub.dev" source: hosted - version: "1.0.1+1" - digit_data_model: + version: "1.0.5" + digit_ui_components: dependency: "direct main" description: - name: digit_data_model - sha256: "0e5a1f8c5f0548e573af9c0279942f2dbc332042865614e0b89fe5952002ef1f" + name: digit_ui_components + sha256: "57c4da5237be6025783e7357a02b6b492f02e38f711d674bf46f5f8c8a93ad76" url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "0.0.2-dev.4" dio: dependency: "direct main" description: name: dio - sha256: "11e40df547d418cc0c4900a9318b26304e665da6fa4755399a9ff9efd09034b5" + sha256: "5598aa796bbf4699afd5c67c0f5f6e2ed542afc956884b9cd58c306966efc260" + url: "https://pub.dev" + source: hosted + version: "5.7.0" + dio_web_adapter: + dependency: transitive + description: + name: dio_web_adapter + sha256: "36c5b2d79eb17cdae41e974b7a8284fec631651d2a6f39a8a2ff22327e90aeac" + url: "https://pub.dev" + source: hosted + version: "1.0.1" + dotted_border: + dependency: transitive + description: + name: dotted_border + sha256: "108837e11848ca776c53b30bc870086f84b62ed6e01c503ed976e8f8c7df9c04" url: "https://pub.dev" source: hosted - version: "5.4.3+1" + version: "2.1.0" drift: dependency: "direct main" description: name: drift - sha256: b50a8342c6ddf05be53bda1d246404cbad101b64dc73e8d6d1ac1090d119b4e2 + sha256: "6acedc562ffeed308049f78fb1906abad3d65714580b6745441ee6d50ec564cd" url: "https://pub.dev" source: hosted - version: "2.15.0" + version: "2.18.0" drift_db_viewer: dependency: "direct main" description: @@ -358,18 +398,10 @@ packages: dependency: "direct dev" description: name: drift_dev - sha256: c037d9431b6f8dc633652b1469e5f53aaec6e4eb405ed29dd232fa888ef10d88 - url: "https://pub.dev" - source: hosted - version: "2.15.0" - easy_stepper: - dependency: transitive - description: - name: easy_stepper - sha256: "77f3ab4ee3c867b5a2236bf712abb08fed2b1c533cf24cf3fcd46c2821072ffd" + sha256: d9b020736ea85fff1568699ce18b89fabb3f0f042e8a7a05e84a3ec20d39acde url: "https://pub.dev" source: hosted - version: "0.5.2+1" + version: "2.18.0" fake_async: dependency: transitive description: @@ -394,91 +426,112 @@ packages: url: "https://pub.dev" source: hosted version: "7.0.0" - fixnum: + file_picker: dependency: transitive description: - name: fixnum - sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + name: file_picker + sha256: d1d0ac3966b36dc3e66eeefb40280c17feb87fa2099c6e22e6a1fc959327bd03 url: "https://pub.dev" source: hosted - version: "1.1.0" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_bloc: - dependency: "direct main" + version: "8.0.0+1" + file_selector_linux: + dependency: transitive description: - name: flutter_bloc - sha256: f0ecf6e6eb955193ca60af2d5ca39565a86b8a142452c5b24d96fb477428f4d2 + name: file_selector_linux + sha256: "045d372bf19b02aeb69cacf8b4009555fb5f6f0b7ad8016e5f46dd1387ddd492" url: "https://pub.dev" source: hosted - version: "8.1.5" - flutter_focus_watcher: + version: "0.9.2+1" + file_selector_macos: dependency: transitive description: - name: flutter_focus_watcher - sha256: a72ee539ae0237961308a25839887ca93a0b1cb6f87b0d492b139c8fccff8e79 + name: file_selector_macos + sha256: f42eacb83b318e183b1ae24eead1373ab1334084404c8c16e0354f9a3e55d385 url: "https://pub.dev" source: hosted - version: "2.0.0" - flutter_keyboard_visibility: + version: "0.9.4" + file_selector_platform_interface: dependency: transitive description: - name: flutter_keyboard_visibility - sha256: "4983655c26ab5b959252ee204c2fffa4afeb4413cd030455194ec0caa3b8e7cb" + name: file_selector_platform_interface + sha256: a3994c26f10378a039faa11de174d7b78eb8f79e4dd0af2a451410c1a5c3f66b url: "https://pub.dev" source: hosted - version: "5.4.1" - flutter_keyboard_visibility_linux: + version: "2.6.2" + file_selector_windows: dependency: transitive description: - name: flutter_keyboard_visibility_linux - sha256: "6fba7cd9bb033b6ddd8c2beb4c99ad02d728f1e6e6d9b9446667398b2ac39f08" + name: file_selector_windows + sha256: "2ad726953f6e8affbc4df8dc78b77c3b4a060967a291e528ef72ae846c60fb69" url: "https://pub.dev" source: hosted - version: "1.0.0" - flutter_keyboard_visibility_macos: + version: "0.9.3+2" + fixnum: dependency: transitive description: - name: flutter_keyboard_visibility_macos - sha256: c5c49b16fff453dfdafdc16f26bdd8fb8d55812a1d50b0ce25fc8d9f2e53d086 + name: fixnum + sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" url: "https://pub.dev" source: hosted - version: "1.0.0" - flutter_keyboard_visibility_platform_interface: + version: "1.1.0" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_bloc: + dependency: "direct main" + description: + name: flutter_bloc + sha256: b594505eac31a0518bdcb4b5b79573b8d9117b193cc80cc12e17d639b10aa27a + url: "https://pub.dev" + source: hosted + version: "8.1.6" + flutter_dropzone: dependency: transitive description: - name: flutter_keyboard_visibility_platform_interface - sha256: e43a89845873f7be10cb3884345ceb9aebf00a659f479d1c8f4293fcb37022a4 + name: flutter_dropzone + sha256: b399c60411f9bf9c4c2f97933c6a3a185859e75aade8897831e76cee4346c8e1 url: "https://pub.dev" source: hosted - version: "2.0.0" - flutter_keyboard_visibility_web: + version: "3.0.7" + flutter_dropzone_platform_interface: dependency: transitive description: - name: flutter_keyboard_visibility_web - sha256: d3771a2e752880c79203f8d80658401d0c998e4183edca05a149f5098ce6e3d1 + name: flutter_dropzone_platform_interface + sha256: b4e2df75364bab2f4c3ca32b87193267d786b6e158c3f345c3a1daeb911d82b9 url: "https://pub.dev" source: hosted - version: "2.0.0" - flutter_keyboard_visibility_windows: + version: "2.0.6" + flutter_dropzone_web: dependency: transitive description: - name: flutter_keyboard_visibility_windows - sha256: fc4b0f0b6be9b93ae527f3d527fb56ee2d918cd88bbca438c478af7bcfd0ef73 + name: flutter_dropzone_web + sha256: c5a0fdb63b7216352a01761ec1b6eba1982e49541e60675735e2d3d95e207b19 url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "3.0.13" flutter_lints: dependency: "direct dev" description: name: flutter_lints - sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04 + sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c" url: "https://pub.dev" source: hosted - version: "2.0.3" + version: "4.0.0" + flutter_localizations: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + flutter_plugin_android_lifecycle: + dependency: transitive + description: + name: flutter_plugin_android_lifecycle + sha256: "8cf40eebf5dec866a6d1956ad7b4f7016e6c0cc69847ab946833b7d43743809f" + url: "https://pub.dev" + source: hosted + version: "2.0.19" flutter_spinkit: dependency: transitive description: @@ -487,6 +540,14 @@ packages: url: "https://pub.dev" source: hosted version: "5.2.1" + flutter_styled_toast: + dependency: transitive + description: + name: flutter_styled_toast + sha256: e667f13a665820eb0fa8506547e47eacbcddf1948d6d3036cfd3b089bd4b0516 + url: "https://pub.dev" + source: hosted + version: "2.2.1" flutter_svg: dependency: "direct main" description: @@ -500,14 +561,6 @@ packages: description: flutter source: sdk version: "0.0.0" - flutter_typeahead: - dependency: transitive - description: - name: flutter_typeahead - sha256: b9942bd5b7611a6ec3f0730c477146cffa4cd4b051077983ba67ddfc9e7ee818 - url: "https://pub.dev" - source: hosted - version: "4.8.0" flutter_web_plugins: dependency: transitive description: flutter @@ -533,10 +586,10 @@ packages: dependency: "direct main" description: name: freezed_annotation - sha256: c3fd9336eb55a38cc1bbd79ab17573113a8deccd0ecbbf926cca3c62803b5c2d + sha256: c2e2d632dd9b8a2b7751117abcfc2b4888ecfe181bd9fca7170d9ef02e595fe2 url: "https://pub.dev" source: hosted - version: "2.4.1" + version: "2.4.4" frontend_server_client: dependency: transitive description: @@ -545,6 +598,54 @@ packages: url: "https://pub.dev" source: hosted version: "3.2.0" + geolocator: + dependency: transitive + description: + name: geolocator + sha256: f4efb8d3c4cdcad2e226af9661eb1a0dd38c71a9494b22526f9da80ab79520e5 + url: "https://pub.dev" + source: hosted + version: "10.1.1" + geolocator_android: + dependency: transitive + description: + name: geolocator_android + sha256: "7aefc530db47d90d0580b552df3242440a10fe60814496a979aa67aa98b1fd47" + url: "https://pub.dev" + source: hosted + version: "4.6.1" + geolocator_apple: + dependency: transitive + description: + name: geolocator_apple + sha256: bc2aca02423ad429cb0556121f56e60360a2b7d694c8570301d06ea0c00732fd + url: "https://pub.dev" + source: hosted + version: "2.3.7" + geolocator_platform_interface: + dependency: transitive + description: + name: geolocator_platform_interface + sha256: "386ce3d9cce47838355000070b1d0b13efb5bc430f8ecda7e9238c8409ace012" + url: "https://pub.dev" + source: hosted + version: "4.2.4" + geolocator_web: + dependency: transitive + description: + name: geolocator_web + sha256: "102e7da05b48ca6bf0a5bda0010f886b171d1a08059f01bfe02addd0175ebece" + url: "https://pub.dev" + source: hosted + version: "2.2.1" + geolocator_windows: + dependency: transitive + description: + name: geolocator_windows + sha256: "53da08937d07c24b0d9952eb57a3b474e29aae2abf9dd717f7e1230995f13f0e" + url: "https://pub.dev" + source: hosted + version: "0.2.3" glob: dependency: transitive description: @@ -557,10 +658,10 @@ packages: dependency: transitive description: name: google_fonts - sha256: "2776c66b3e97c6cdd58d1bd3281548b074b64f1fd5c8f82391f7456e38849567" + sha256: b1ac0fe2832c9cc95e5e88b57d627c5e68c223b9657f4b96e1487aa9098c7b82 url: "https://pub.dev" source: hosted - version: "4.0.5" + version: "6.2.1" graphs: dependency: transitive description: @@ -577,14 +678,22 @@ packages: url: "https://pub.dev" source: hosted version: "4.3.1" + html: + dependency: transitive + description: + name: html + sha256: "3a7812d5bcd2894edf53dfaf8cd640876cf6cef50a8f238745c8b8120ea74d3a" + url: "https://pub.dev" + source: hosted + version: "0.15.4" http: dependency: transitive description: name: http - sha256: a2bbf9d017fcced29139daa8ed2bba4ece450ab222871df93ca9eec6f80c34ba + sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.2" http_multi_server: dependency: transitive description: @@ -601,14 +710,78 @@ packages: url: "https://pub.dev" source: hosted version: "4.0.2" + image_picker: + dependency: transitive + description: + name: image_picker + sha256: "1f498d086203360cca099d20ffea2963f48c39ce91bdd8a3b6d4a045786b02c8" + url: "https://pub.dev" + source: hosted + version: "1.0.8" + image_picker_android: + dependency: transitive + description: + name: image_picker_android + sha256: "844c6da4e4f2829dffdab97816bca09d0e0977e8dcef7450864aba4e07967a58" + url: "https://pub.dev" + source: hosted + version: "0.8.9+6" + image_picker_for_web: + dependency: transitive + description: + name: image_picker_for_web + sha256: e2423c53a68b579a7c37a1eda967b8ae536c3d98518e5db95ca1fe5719a730a3 + url: "https://pub.dev" + source: hosted + version: "3.0.2" + image_picker_ios: + dependency: transitive + description: + name: image_picker_ios + sha256: fadafce49e8569257a0cad56d24438a6fa1f0cbd7ee0af9b631f7492818a4ca3 + url: "https://pub.dev" + source: hosted + version: "0.8.9+1" + image_picker_linux: + dependency: transitive + description: + name: image_picker_linux + sha256: "4ed1d9bb36f7cd60aa6e6cd479779cc56a4cb4e4de8f49d487b1aaad831300fa" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + image_picker_macos: + dependency: transitive + description: + name: image_picker_macos + sha256: "3f5ad1e8112a9a6111c46d0b57a7be2286a9a07fc6e1976fdf5be2bd31d4ff62" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + image_picker_platform_interface: + dependency: transitive + description: + name: image_picker_platform_interface + sha256: fa4e815e6fcada50e35718727d83ba1c92f1edf95c0b4436554cec301b56233b + url: "https://pub.dev" + source: hosted + version: "2.9.3" + image_picker_windows: + dependency: transitive + description: + name: image_picker_windows + sha256: "6ad07afc4eb1bc25f3a01084d28520496c4a3bb0cb13685435838167c9dcedeb" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" intl: dependency: "direct main" description: name: intl - sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" + sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf url: "https://pub.dev" source: hosted - version: "0.18.1" + version: "0.19.0" io: dependency: transitive description: @@ -657,38 +830,62 @@ packages: url: "https://pub.dev" source: hosted version: "6.8.0" - lints: + leak_tracker: dependency: transitive + description: + name: leak_tracker + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + url: "https://pub.dev" + source: hosted + version: "10.0.4" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + url: "https://pub.dev" + source: hosted + version: "3.0.3" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" + lints: + dependency: "direct dev" description: name: lints - sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452" + sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235" url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "4.0.0" location: dependency: "direct main" description: name: location - sha256: "06be54f682c9073cbfec3899eb9bc8ed90faa0e17735c9d9fa7fe426f5be1dd1" + sha256: "37ffdadcd4b1498b769824f45ebb4de8ed46663a4a67ac27b33a590ee486579f" url: "https://pub.dev" source: hosted - version: "5.0.3" + version: "6.0.2" location_platform_interface: dependency: transitive description: name: location_platform_interface - sha256: "8aa1d34eeecc979d7c9fe372931d84f6d2ebbd52226a54fe1620de6fdc0753b1" + sha256: "2ecde6bb0f88032b0bbbde37e18975b4468711dd92619c2235cc0c0ee93b4b8e" url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "4.0.0" location_web: dependency: transitive description: name: location_web - sha256: ec484c66e8a4ff1ee5d044c203f4b6b71e3a0556a97b739a5bc9616de672412b + sha256: "49dda13d415c4603c5775a33fb22f575e0aa3f0ec2916644ddcd722db31ee884" url: "https://pub.dev" source: hosted - version: "4.2.0" + version: "5.0.2" logging: dependency: transitive description: @@ -701,50 +898,50 @@ packages: dependency: transitive description: name: lottie - sha256: a93542cc2d60a7057255405f62252533f8e8956e7e06754955669fd32fb4b216 + sha256: "7afc60865a2429d994144f7d66ced2ae4305fe35d82890b8766e3359872d872c" url: "https://pub.dev" source: hosted - version: "2.7.0" + version: "3.1.3" matcher: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.12.0" mime: dependency: transitive description: name: mime - sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2" + sha256: "801fd0b26f14a4a58ccb09d5892c3fbdeff209594300a542492cf13fba9d247a" url: "https://pub.dev" source: hosted - version: "1.0.5" + version: "1.0.6" mocktail: dependency: "direct dev" description: name: mocktail - sha256: c4b5007d91ca4f67256e720cb1b6d704e79a510183a12fa551021f652577dce6 + sha256: "890df3f9688106f25755f26b1c60589a92b3ab91a22b8b224947ad041bf172d8" url: "https://pub.dev" source: hosted - version: "1.0.3" + version: "1.0.4" nested: dependency: transitive description: @@ -753,14 +950,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.0" - nm: - dependency: transitive - description: - name: nm - sha256: "2c9aae4127bdc8993206464fcc063611e0e36e72018696cd9631023a31b24254" - url: "https://pub.dev" - source: hosted - version: "0.5.0" node_preamble: dependency: transitive description: @@ -785,30 +974,22 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.0" - package_info_plus: - dependency: transitive + path: + dependency: "direct main" description: - name: package_info_plus - sha256: "88bc797f44a94814f2213db1c9bd5badebafdfb8290ca9f78d4b9ee2a3db4d79" + name: path + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "5.0.1" - package_info_plus_platform_interface: + version: "1.9.0" + path_drawing: dependency: transitive description: - name: package_info_plus_platform_interface - sha256: "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6" - url: "https://pub.dev" - source: hosted - version: "2.0.1" - path: - dependency: "direct main" - description: - name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + name: path_drawing + sha256: bbb1934c0cbb03091af082a6389ca2080345291ef07a5fa6d6e078ba8682f977 url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.0.1" path_parsing: dependency: transitive description: @@ -821,10 +1002,10 @@ packages: dependency: "direct main" description: name: path_provider - sha256: c9e7d3a4cd1410877472158bee69963a4579f78b68c65a2b7d40d1a7a88bb161 + sha256: fec0d61223fba3154d87759e3cc27fe2c8dc498f6386c6d6fc80d1afdd1bf378 url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.1.4" path_provider_android: dependency: transitive description: @@ -861,10 +1042,10 @@ packages: dependency: transitive description: name: path_provider_windows - sha256: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170" + sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 url: "https://pub.dev" source: hosted - version: "2.2.1" + version: "2.3.0" petitparser: dependency: transitive description: @@ -877,10 +1058,10 @@ packages: dependency: transitive description: name: platform - sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec" + sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" url: "https://pub.dev" source: hosted - version: "3.1.4" + version: "3.1.5" plugin_platform_interface: dependency: transitive description: @@ -889,14 +1070,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.8" - pointer_interceptor: - dependency: transitive - description: - name: pointer_interceptor - sha256: adf7a637f97c077041d36801b43be08559fd4322d2127b3f20bb7be1b9eebc22 - url: "https://pub.dev" - source: hosted - version: "0.9.3+7" pool: dependency: transitive description: @@ -925,26 +1098,18 @@ packages: dependency: transitive description: name: pubspec_parse - sha256: c63b2876e58e194e4b0828fcb080ad0e06d051cb607a6be51a9e084f47cb9367 - url: "https://pub.dev" - source: hosted - version: "1.2.3" - reactive_flutter_typeahead: - dependency: transitive - description: - name: reactive_flutter_typeahead - sha256: ef91627df8cef70e603e8a6458749d8a99a385b78854332602fd08ad905cdab8 + sha256: c799b721d79eb6ee6fa56f00c04b472dcd44a30d258fac2174a6ec57302678f8 url: "https://pub.dev" source: hosted - version: "0.8.1" + version: "1.3.0" reactive_forms: dependency: "direct main" description: name: reactive_forms - sha256: "5aa9c48a0626c20d00a005e597cb10efbdebbfeecb9c4227b03a5945fbb91ec4" + sha256: "9b1fb18e0aae9c50cfa0aaabaaa38bc4d78eefc9b7b95fa9c947b051f6524b8e" url: "https://pub.dev" source: hosted - version: "14.3.0" + version: "17.0.1" recase: dependency: transitive description: @@ -953,14 +1118,6 @@ packages: url: "https://pub.dev" source: hosted version: "4.1.0" - remove_emoji_input_formatter: - dependency: transitive - description: - name: remove_emoji_input_formatter - sha256: "82d195984f890de7a8fea936c698848e78c1a67ccefe18db3baf9f7a3bc0177f" - url: "https://pub.dev" - source: hosted - version: "0.0.1+1" shelf: dependency: transitive description: @@ -1038,6 +1195,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.10.0" + sprintf: + dependency: transitive + description: + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" + url: "https://pub.dev" + source: hosted + version: "7.0.0" sqlite3: dependency: transitive description: @@ -1050,18 +1215,18 @@ packages: dependency: "direct main" description: name: sqlite3_flutter_libs - sha256: fb2a106a2ea6042fe57de2c47074cc31539a941819c91e105b864744605da3f5 + sha256: "62bbb4073edbcdf53f40c80775f33eea01d301b7b81417e5b3fb7395416258c1" url: "https://pub.dev" source: hosted - version: "0.5.21" + version: "0.5.24" sqlparser: dependency: transitive description: name: sqlparser - sha256: "7b20045d1ccfb7bc1df7e8f9fee5ae58673fce6ff62cefbb0e0fd7214e90e5a0" + sha256: ade9a67fd70d0369329ed3373208de7ebd8662470e8c396fc8d0d60f9acdfc9f url: "https://pub.dev" source: hosted - version: "0.34.1" + version: "0.36.0" stack_trace: dependency: transitive description: @@ -1106,26 +1271,26 @@ packages: dependency: transitive description: name: test - sha256: a1f7595805820fcc05e5c52e3a231aedd0b72972cb333e8c738a8b1239448b6f + sha256: "7ee446762c2c50b3bd4ea96fe13ffac69919352bd3b4b17bac3f3465edc58073" url: "https://pub.dev" source: hosted - version: "1.24.9" + version: "1.25.2" test_api: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.0" test_core: dependency: transitive description: name: test_core - sha256: a757b14fc47507060a162cc2530d9a4a2f92f5100a952c7443b5cad5ef5b106a + sha256: "2bc4b4ecddd75309300d8096f781c0e3280ca1ef85beda558d33fcbedc2eead4" url: "https://pub.dev" source: hosted - version: "0.5.9" + version: "0.6.0" timing: dependency: transitive description: @@ -1150,14 +1315,94 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.2" + universal_html: + dependency: transitive + description: + name: universal_html + sha256: "56536254004e24d9d8cfdb7dbbf09b74cf8df96729f38a2f5c238163e3d58971" + url: "https://pub.dev" + source: hosted + version: "2.2.4" + universal_io: + dependency: transitive + description: + name: universal_io + sha256: "1722b2dcc462b4b2f3ee7d188dad008b6eb4c40bbd03a3de451d82c78bba9aad" + url: "https://pub.dev" + source: hosted + version: "2.2.2" + url_launcher: + dependency: transitive + description: + name: url_launcher + sha256: "21b704ce5fa560ea9f3b525b43601c678728ba46725bab9b01187b4831377ed3" + url: "https://pub.dev" + source: hosted + version: "6.3.0" + url_launcher_android: + dependency: transitive + description: + name: url_launcher_android + sha256: "17cd5e205ea615e2c6ea7a77323a11712dffa0720a8a90540db57a01347f9ad9" + url: "https://pub.dev" + source: hosted + version: "6.3.2" + url_launcher_ios: + dependency: transitive + description: + name: url_launcher_ios + sha256: "75bb6fe3f60070407704282a2d295630cab232991eb52542b18347a8a941df03" + url: "https://pub.dev" + source: hosted + version: "6.2.4" + url_launcher_linux: + dependency: transitive + description: + name: url_launcher_linux + sha256: ab360eb661f8879369acac07b6bb3ff09d9471155357da8443fd5d3cf7363811 + url: "https://pub.dev" + source: hosted + version: "3.1.1" + url_launcher_macos: + dependency: transitive + description: + name: url_launcher_macos + sha256: "9a1a42d5d2d95400c795b2914c36fdcb525870c752569438e4ebb09a2b5d90de" + url: "https://pub.dev" + source: hosted + version: "3.2.0" + url_launcher_platform_interface: + dependency: transitive + description: + name: url_launcher_platform_interface + sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + url_launcher_web: + dependency: transitive + description: + name: url_launcher_web + sha256: "772638d3b34c779ede05ba3d38af34657a05ac55b06279ea6edd409e323dca8e" + url: "https://pub.dev" + source: hosted + version: "2.3.3" + url_launcher_windows: + dependency: transitive + description: + name: url_launcher_windows + sha256: "49c10f879746271804767cb45551ec5592cdab00ee105c06dddde1a98f73b185" + url: "https://pub.dev" + source: hosted + version: "3.1.2" uuid: dependency: transitive description: name: uuid - sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" + sha256: a5be9ef6618a7ac1e964353ef476418026db906c4facdedaa299b7a2e71690ff url: "https://pub.dev" source: hosted - version: "3.0.7" + version: "4.5.1" vector_graphics: dependency: transitive description: @@ -1190,14 +1435,22 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" + visibility_detector: + dependency: transitive + description: + name: visibility_detector + sha256: dd5cc11e13494f432d15939c3aa8ae76844c42b723398643ce9addb88a5ed420 + url: "https://pub.dev" + source: hosted + version: "0.4.0+2" vm_service: dependency: transitive description: name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" url: "https://pub.dev" source: hosted - version: "13.0.0" + version: "14.2.1" watcher: dependency: transitive description: @@ -1210,10 +1463,10 @@ packages: dependency: transitive description: name: web - sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "0.5.1" web_socket_channel: dependency: transitive description: @@ -1263,5 +1516,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.2.0 <3.9.0" - flutter: ">=3.16.0" + dart: ">=3.4.0 <4.0.0" + flutter: ">=3.22.0" diff --git a/packages/attendance_management/pubspec.yaml b/packages/attendance_management/pubspec.yaml index 76f8fe39d..be9f0307b 100644 --- a/packages/attendance_management/pubspec.yaml +++ b/packages/attendance_management/pubspec.yaml @@ -1,6 +1,6 @@ name: attendance_management description: Digit UI attendance management specification - This tool is designed for tracking user attendance with customizable session counts per day. -version: 1.0.2+4 +version: 1.0.3 homepage: "https://github.com/egovernments/health-campaign-field-worker-app/tree/master/packages/attendance_management" repository: "https://github.com/egovernments/health-campaign-field-worker-app" @@ -11,43 +11,43 @@ environment: dependencies: flutter: sdk: flutter - digit_components: ^1.0.1+1 - flutter_bloc: ^8.1.1 - freezed_annotation: ^2.1.0 - build_runner: ^2.2.1 - reactive_forms: ^14.1.0 + digit_ui_components: ^0.0.2-dev.4 + flutter_bloc: ^8.1.5 + freezed_annotation: ^2.4.1 + intl: ^0.19.0 + flutter_svg: ^2.0.10+1 + dart_mappable: ^4.2.2 + drift: ^2.18.0 + auto_route: ^8.1.3 + collection: ^1.18.0 + dio: ^5.4.3+1 + location: ^6.0.2 fluttertoast: ^8.1.2 overlay_builder: ^1.1.0 - intl: ^0.18.0 - flutter_svg: ^2.0.8 - dart_mappable: ^4.2.0 - drift: ^2.0.0 sqlite3_flutter_libs: ^0.5.10 path_provider: ^2.0.11 path: ^1.8.2 drift_db_viewer: ^2.0.0 - auto_route: ^7.8.4 - digit_data_model: ^1.0.3+1 - connectivity_plus: ^5.0.2 - collection: ^1.16.0 - location: ^5.0.0 - dio: ^5.1.2 + digit_data_model: ^1.0.5 + reactive_forms: ^17.0.0 dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^2.0.0 + flutter_lints: ^4.0.0 + lints: ^4.0.0 json_serializable: ^6.4.0 - freezed: ^2.2.0 + freezed: ^2.5.2 bloc_test: ^9.1.0 mocktail: ^1.0.2 dart_mappable_builder: git: url: https://github.com/egovernments/health-campaign-field-worker-app/ - ref: master + ref: 1.6-final-dev path: ./packages/dart_mappable_builder - drift_dev: ^2.14.1 - auto_route_generator: ^7.3.2 + drift_dev: ^2.18.0 + build_runner: ^2.4.11 + auto_route_generator: 8.0.0 flutter: assets: diff --git a/packages/attendance_management/test/unit/search_attendee_by_name_test.dart b/packages/attendance_management/test/unit/search_attendee_by_name_test.dart index 5247ab06f..af8ff53c3 100644 --- a/packages/attendance_management/test/unit/search_attendee_by_name_test.dart +++ b/packages/attendance_management/test/unit/search_attendee_by_name_test.dart @@ -1,6 +1,5 @@ // Import necessary packages for testing. import 'package:attendance_management/data/repositories/local/attendance_logs.dart'; -import 'package:attendance_management/models/entities/attendee.dart'; import 'package:attendance_management/utils/typedefs.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:attendance_management/blocs/attendance_individual_bloc.dart'; diff --git a/packages/auto_route/pubspec.lock b/packages/auto_route/pubspec.lock deleted file mode 100644 index 0d28f4bc7..000000000 --- a/packages/auto_route/pubspec.lock +++ /dev/null @@ -1,541 +0,0 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - _fe_analyzer_shared: - dependency: transitive - description: - name: _fe_analyzer_shared - sha256: eb376e9acf6938204f90eb3b1f00b578640d3188b4c8a8ec054f9f479af8d051 - url: "https://pub.dev" - source: hosted - version: "64.0.0" - analyzer: - dependency: transitive - description: - name: analyzer - sha256: "69f54f967773f6c26c7dcb13e93d7ccee8b17a641689da39e878d5cf13b06893" - url: "https://pub.dev" - source: hosted - version: "6.2.0" - args: - dependency: transitive - description: - name: args - sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" - url: "https://pub.dev" - source: hosted - version: "2.5.0" - async: - dependency: transitive - description: - name: async - sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" - url: "https://pub.dev" - source: hosted - version: "2.11.0" - auto_route_generator: - dependency: "direct dev" - description: - name: auto_route_generator - sha256: "11067a3bcd643812518fe26c0c9ec073990286cabfd9d74b6da9ef9b913c4d22" - url: "https://pub.dev" - source: hosted - version: "7.3.2" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" - url: "https://pub.dev" - source: hosted - version: "2.1.1" - build: - dependency: transitive - description: - name: build - sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" - url: "https://pub.dev" - source: hosted - version: "2.4.1" - build_config: - dependency: transitive - description: - name: build_config - sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1 - url: "https://pub.dev" - source: hosted - version: "1.1.1" - build_daemon: - dependency: transitive - description: - name: build_daemon - sha256: "0343061a33da9c5810b2d6cee51945127d8f4c060b7fbdd9d54917f0a3feaaa1" - url: "https://pub.dev" - source: hosted - version: "4.0.1" - build_resolvers: - dependency: transitive - description: - name: build_resolvers - sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a" - url: "https://pub.dev" - source: hosted - version: "2.4.2" - build_runner: - dependency: "direct dev" - description: - name: build_runner - sha256: "3ac61a79bfb6f6cc11f693591063a7f19a7af628dc52f141743edac5c16e8c22" - url: "https://pub.dev" - source: hosted - version: "2.4.9" - build_runner_core: - dependency: transitive - description: - name: build_runner_core - sha256: "4ae8ffe5ac758da294ecf1802f2aff01558d8b1b00616aa7538ea9a8a5d50799" - url: "https://pub.dev" - source: hosted - version: "7.3.0" - built_collection: - dependency: transitive - description: - name: built_collection - sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" - url: "https://pub.dev" - source: hosted - version: "5.1.1" - built_value: - dependency: transitive - description: - name: built_value - sha256: c7913a9737ee4007efedaffc968c049fd0f3d0e49109e778edc10de9426005cb - url: "https://pub.dev" - source: hosted - version: "8.9.2" - characters: - dependency: transitive - description: - name: characters - sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" - url: "https://pub.dev" - source: hosted - version: "1.3.0" - checked_yaml: - dependency: transitive - description: - name: checked_yaml - sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff - url: "https://pub.dev" - source: hosted - version: "2.0.3" - clock: - dependency: transitive - description: - name: clock - sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf - url: "https://pub.dev" - source: hosted - version: "1.1.1" - code_builder: - dependency: transitive - description: - name: code_builder - sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37 - url: "https://pub.dev" - source: hosted - version: "4.10.0" - collection: - dependency: "direct main" - description: - name: collection - sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a - url: "https://pub.dev" - source: hosted - version: "1.18.0" - convert: - dependency: transitive - description: - name: convert - sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" - url: "https://pub.dev" - source: hosted - version: "3.1.1" - crypto: - dependency: transitive - description: - name: crypto - sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab - url: "https://pub.dev" - source: hosted - version: "3.0.3" - dart_style: - dependency: transitive - description: - name: dart_style - sha256: "99e066ce75c89d6b29903d788a7bb9369cf754f7b24bf70bf4b6d6d6b26853b9" - url: "https://pub.dev" - source: hosted - version: "2.3.6" - fake_async: - dependency: transitive - description: - name: fake_async - sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" - url: "https://pub.dev" - source: hosted - version: "1.3.1" - file: - dependency: transitive - description: - name: file - sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" - url: "https://pub.dev" - source: hosted - version: "7.0.0" - fixnum: - dependency: transitive - description: - name: fixnum - sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" - url: "https://pub.dev" - source: hosted - version: "1.1.0" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_lints: - dependency: "direct dev" - description: - name: flutter_lints - sha256: "9e8c3858111da373efc5aa341de011d9bd23e2c5c5e0c62bccf32438e192d7b1" - url: "https://pub.dev" - source: hosted - version: "3.0.2" - flutter_test: - dependency: "direct dev" - description: flutter - source: sdk - version: "0.0.0" - frontend_server_client: - dependency: transitive - description: - name: frontend_server_client - sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 - url: "https://pub.dev" - source: hosted - version: "4.0.0" - glob: - dependency: transitive - description: - name: glob - sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" - url: "https://pub.dev" - source: hosted - version: "2.1.2" - graphs: - dependency: transitive - description: - name: graphs - sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19 - url: "https://pub.dev" - source: hosted - version: "2.3.1" - http_multi_server: - dependency: transitive - description: - name: http_multi_server - sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" - url: "https://pub.dev" - source: hosted - version: "3.2.1" - http_parser: - dependency: transitive - description: - name: http_parser - sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" - url: "https://pub.dev" - source: hosted - version: "4.0.2" - io: - dependency: transitive - description: - name: io - sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" - url: "https://pub.dev" - source: hosted - version: "1.0.4" - js: - dependency: transitive - description: - name: js - sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf - url: "https://pub.dev" - source: hosted - version: "0.7.1" - json_annotation: - dependency: transitive - description: - name: json_annotation - sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" - url: "https://pub.dev" - source: hosted - version: "4.9.0" - lints: - dependency: transitive - description: - name: lints - sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290 - url: "https://pub.dev" - source: hosted - version: "3.0.0" - logging: - dependency: transitive - description: - name: logging - sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" - url: "https://pub.dev" - source: hosted - version: "1.2.0" - matcher: - dependency: transitive - description: - name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" - url: "https://pub.dev" - source: hosted - version: "0.12.16" - material_color_utilities: - dependency: transitive - description: - name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" - url: "https://pub.dev" - source: hosted - version: "0.5.0" - meta: - dependency: "direct main" - description: - name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e - url: "https://pub.dev" - source: hosted - version: "1.10.0" - mime: - dependency: transitive - description: - name: mime - sha256: "801fd0b26f14a4a58ccb09d5892c3fbdeff209594300a542492cf13fba9d247a" - url: "https://pub.dev" - source: hosted - version: "1.0.6" - mockito: - dependency: "direct dev" - description: - name: mockito - sha256: "6841eed20a7befac0ce07df8116c8b8233ed1f4486a7647c7fc5a02ae6163917" - url: "https://pub.dev" - source: hosted - version: "5.4.4" - package_config: - dependency: transitive - description: - name: package_config - sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" - url: "https://pub.dev" - source: hosted - version: "2.1.0" - path: - dependency: "direct main" - description: - name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" - url: "https://pub.dev" - source: hosted - version: "1.8.3" - petitparser: - dependency: transitive - description: - name: petitparser - sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27 - url: "https://pub.dev" - source: hosted - version: "6.0.2" - pool: - dependency: transitive - description: - name: pool - sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" - url: "https://pub.dev" - source: hosted - version: "1.5.1" - pub_semver: - dependency: transitive - description: - name: pub_semver - sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" - url: "https://pub.dev" - source: hosted - version: "2.1.4" - pubspec_parse: - dependency: transitive - description: - name: pubspec_parse - sha256: c799b721d79eb6ee6fa56f00c04b472dcd44a30d258fac2174a6ec57302678f8 - url: "https://pub.dev" - source: hosted - version: "1.3.0" - shelf: - dependency: transitive - description: - name: shelf - sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 - url: "https://pub.dev" - source: hosted - version: "1.4.1" - shelf_web_socket: - dependency: transitive - description: - name: shelf_web_socket - sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" - url: "https://pub.dev" - source: hosted - version: "1.0.4" - sky_engine: - dependency: transitive - description: flutter - source: sdk - version: "0.0.99" - source_gen: - dependency: transitive - description: - name: source_gen - sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832" - url: "https://pub.dev" - source: hosted - version: "1.5.0" - source_span: - dependency: transitive - description: - name: source_span - sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" - url: "https://pub.dev" - source: hosted - version: "1.10.0" - stack_trace: - dependency: transitive - description: - name: stack_trace - sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" - url: "https://pub.dev" - source: hosted - version: "1.11.1" - stream_channel: - dependency: transitive - description: - name: stream_channel - sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 - url: "https://pub.dev" - source: hosted - version: "2.1.2" - stream_transform: - dependency: transitive - description: - name: stream_transform - sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" - url: "https://pub.dev" - source: hosted - version: "2.1.0" - string_scanner: - dependency: transitive - description: - name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" - url: "https://pub.dev" - source: hosted - version: "1.2.0" - term_glyph: - dependency: transitive - description: - name: term_glyph - sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 - url: "https://pub.dev" - source: hosted - version: "1.2.1" - test_api: - dependency: transitive - description: - name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" - url: "https://pub.dev" - source: hosted - version: "0.6.1" - timing: - dependency: transitive - description: - name: timing - sha256: "70a3b636575d4163c477e6de42f247a23b315ae20e86442bebe32d3cabf61c32" - url: "https://pub.dev" - source: hosted - version: "1.0.1" - typed_data: - dependency: transitive - description: - name: typed_data - sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c - url: "https://pub.dev" - source: hosted - version: "1.3.2" - vector_math: - dependency: transitive - description: - name: vector_math - sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" - url: "https://pub.dev" - source: hosted - version: "2.1.4" - watcher: - dependency: transitive - description: - name: watcher - sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" - url: "https://pub.dev" - source: hosted - version: "1.1.0" - web: - dependency: transitive - description: - name: web - sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 - url: "https://pub.dev" - source: hosted - version: "0.3.0" - web_socket_channel: - dependency: transitive - description: - name: web_socket_channel - sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b - url: "https://pub.dev" - source: hosted - version: "2.4.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: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" - url: "https://pub.dev" - source: hosted - version: "3.1.2" -sdks: - dart: ">=3.2.0 <4.0.0" - flutter: ">=3.16.0" diff --git a/packages/closed_household/.gitignore b/packages/closed_household/.gitignore index ac5aa9893..a68ac422a 100644 --- a/packages/closed_household/.gitignore +++ b/packages/closed_household/.gitignore @@ -23,7 +23,6 @@ migrate_working_dir/ # Flutter/Dart/Pub related # Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. -/pubspec.lock **/doc/api/ .dart_tool/ build/ diff --git a/packages/closed_household/CHANGELOG.md b/packages/closed_household/CHANGELOG.md index a3f6ce26a..122b4041a 100644 --- a/packages/closed_household/CHANGELOG.md +++ b/packages/closed_household/CHANGELOG.md @@ -1,3 +1,9 @@ +## 1.0.3 + +* Updated digit_data_model to latest version +* Updated flutter version to 3.22 +* Migrated to digit_ui_components + ## 1.0.1+1 * Updated digit_data_model, digit_components and registration_delivery diff --git a/packages/closed_household/lib/pages/closed_household_acknowledgement.dart b/packages/closed_household/lib/pages/closed_household_acknowledgement.dart index 8cdc00795..8aba0f1de 100644 --- a/packages/closed_household/lib/pages/closed_household_acknowledgement.dart +++ b/packages/closed_household/lib/pages/closed_household_acknowledgement.dart @@ -1,5 +1,7 @@ import 'package:auto_route/auto_route.dart'; -import 'package:digit_components/digit_components.dart'; +import 'package:digit_ui_components/enum/app_enums.dart'; +import 'package:digit_ui_components/widgets/atoms/digit_button.dart'; +import 'package:digit_ui_components/widgets/molecules/panel_cards.dart'; import 'package:flutter/material.dart'; import '../../../utils/i18_key_constants.dart' as i18; @@ -7,7 +9,6 @@ import '../../../widgets/localized.dart'; @RoutePage() class ClosedHouseholdAcknowledgementPage extends LocalizedStatefulWidget { - const ClosedHouseholdAcknowledgementPage({ super.key, super.appLocalizations, @@ -25,22 +26,28 @@ class _ClosedHouseholdAcknowledgementPageState return PopScope( canPop: false, child: Scaffold( - body: DigitAcknowledgement.success( - action: () { - final parent = context.router.parent() as StackRouter; - // Pop twice to navigate back to the previous screen - parent.popUntilRoot(); - }, - enableViewHousehold: false, - actionLabel: localizations - .translate(i18.acknowledgementSuccess.actionLabelText), - description: localizations.translate( - i18.acknowledgementSuccess.acknowledgementDescriptionText, - ), - label: localizations.translate( - i18.acknowledgementSuccess.acknowledgementLabelText, - ), + body: PanelCard( + type: PanelType.success, + title: localizations.translate( + i18.acknowledgementSuccess.acknowledgementLabelText, + ), + description: localizations.translate( + i18.acknowledgementSuccess.acknowledgementDescriptionText, ), + actions: [ + DigitButton( + label: localizations + .translate(i18.acknowledgementSuccess.actionLabelText), + onPressed: () { + final parent = context.router.parent() as StackRouter; + // Pop twice to navigate back to the previous screen + parent.popUntilRoot(); + }, + type: DigitButtonType.primary, + size: DigitButtonSize.large, + mainAxisSize: MainAxisSize.max, + ) + ]), ), ); } diff --git a/packages/closed_household/lib/pages/closed_household_details.dart b/packages/closed_household/lib/pages/closed_household_details.dart index 58f3454ff..55e1e4559 100644 --- a/packages/closed_household/lib/pages/closed_household_details.dart +++ b/packages/closed_household/lib/pages/closed_household_details.dart @@ -1,8 +1,11 @@ import 'package:auto_route/auto_route.dart'; import 'package:closed_household/closed_household.dart'; -import 'package:digit_components/digit_components.dart'; -import 'package:digit_components/widgets/digit_sync_dialog.dart'; -import 'package:digit_components/widgets/atoms/text_block.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/services/location_bloc.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/utils/component_utils.dart'; +import 'package:digit_ui_components/widgets/atoms/text_block.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:reactive_forms/reactive_forms.dart'; @@ -40,10 +43,10 @@ class ClosedHouseholdDetailsPageState WidgetsBinding.instance.addPostFrameCallback((_) { // Show the dialog after the first frame is built - DigitComponentsUtils().showLocationCapturingDialog( + DigitComponentsUtils.showDialog( context, localizations.translate(i18.common.locationCapturing), - DigitSyncDialogType.inProgress, + DialogType.inProgress, ); }); super.initState(); @@ -53,6 +56,7 @@ class ClosedHouseholdDetailsPageState Widget build(BuildContext context) { final theme = Theme.of(context); final bloc = context.read(); + final textTheme = theme.digitTextTheme(context); return Scaffold( body: ReactiveFormBuilder( @@ -62,7 +66,7 @@ class ClosedHouseholdDetailsPageState if (locationState.accuracy != null) { //Hide the dialog after 1 seconds Future.delayed(const Duration(seconds: 1), () { - DigitComponentsUtils().hideDialog(context); + DigitComponentsUtils.hideDialog(context); }); } final lat = locationState.latitude; @@ -84,7 +88,7 @@ class ClosedHouseholdDetailsPageState child: BlocBuilder( builder: (context, state) { return ScrollableContent( - enableFixedButton: true, + enableFixedDigitButton: true, header: const Column( children: [ BackNavigationHelpHeaderWidget( @@ -93,87 +97,151 @@ class ClosedHouseholdDetailsPageState ], ), footer: DigitCard( - margin: const EdgeInsets.fromLTRB(0, kPadding, 0, 0), - padding: const EdgeInsets.fromLTRB(kPadding, 0, kPadding, 0), - child: BlocBuilder( - builder: (context, locationState) { - return DigitElevatedButton( - onPressed: () { - final String? householdHeadName = form - .control(_householdHeadNameKey) - .value as String?; + margin: const EdgeInsets.only(top: spacer2), + children: [ + BlocBuilder( + builder: (context, locationState) { + return DigitButton( + size: DigitButtonSize.large, + type: DigitButtonType.primary, + mainAxisSize: MainAxisSize.max, + onPressed: () { + if (!form.valid && + form + .control( + _householdHeadNameKey, + ) + .value + .length > + 0) { + return; + } + final String? householdHeadName = form + .control(_householdHeadNameKey) + .value as String?; - context.read().add( - ClosedHouseholdEvent.handleSummary( - latitude: locationState.latitude!, - longitude: locationState.longitude!, - locationAccuracy: locationState.accuracy!, - householdHeadName: householdHeadName != null && - householdHeadName.trim().isNotEmpty - ? householdHeadName - : null, - ), - ); + context.read().add( + ClosedHouseholdEvent.handleSummary( + latitude: locationState.latitude!, + longitude: locationState.longitude!, + locationAccuracy: locationState.accuracy!, + householdHeadName: householdHeadName != + null && + householdHeadName.trim().isNotEmpty + ? householdHeadName + : null, + ), + ); - context.router.push(ClosedHouseholdSummaryRoute()); - }, - child: Center( - child: Text( - localizations.translate( + context.router.push(ClosedHouseholdSummaryRoute()); + }, + label: localizations.translate( i18.common.coreCommonNext, ), - ), - ), - ); - }, - ), - ), + ); + }, + ), + ]), slivers: [ SliverToBoxAdapter( child: DigitCard( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, + margin: const EdgeInsets.all(spacer2), children: [ - TextBlock( - heading: localizations.translate( - i18.closeHousehold.closeHouseHoldDetailLabel, - ), - headingStyle: theme.textTheme.displayMedium, - body: localizations.translate( - i18.closeHousehold.closeHouseHoldDetailDescLabel, - ), - ), - Column(children: [ - DigitTextFormField( - formControlName: _administrationAreaKey, - label: localizations.translate( - i18.closeHousehold.villageName, - ), - readOnly: true, - ), - DigitTextFormField( - readOnly: true, - formControlName: _accuracyKey, - label: localizations.translate( - i18.closeHousehold.accuracyLabel, - ), - ), - DigitTextFormField( - formControlName: _householdHeadNameKey, - label: localizations.translate( - i18.closeHousehold.headNameLabel, - ), - validationMessages: { - 'maxLength': (object) => localizations - .translate(i18.common.maxCharsRequired) - .replaceAll('{}', maxLength.toString()), - }, - ), - ]), - ], + DigitTextBlock( + padding: const EdgeInsets.all(0), + heading: localizations.translate( + i18.closeHousehold.closeHouseHoldDetailLabel, + ), + headingStyle: textTheme.headingXl, + description: localizations.translate( + i18.closeHousehold.closeHouseHoldDetailDescLabel, + ), ), - ), + ReactiveWrapperField( + formControlName: _administrationAreaKey, + showErrors: (control) => + control.invalid && control.touched, + // Ensures error is shown if invalid and touched + builder: (field) { + return LabeledField( + label: localizations.translate( + i18.closeHousehold.villageName, + ), + child: DigitTextFormInput( + errorMessage: field.errorText, + readOnly: true, + initialValue: + form.control(_administrationAreaKey).value, + ), + ); + }), + ReactiveWrapperField( + formControlName: _accuracyKey, + showErrors: (control) => + control.invalid && control.touched, + // Ensures error is shown if invalid and touched + builder: (field) { + return LabeledField( + label: localizations.translate( + i18.closeHousehold.accuracyLabel, + ), + child: DigitTextFormInput( + errorMessage: field.errorText, + readOnly: true, + initialValue: (form + .control( + _accuracyKey, + ) + .value) + .toString(), + ), + ); + }), + ReactiveWrapperField( + validationMessages: { + 'maxLength': (_) => localizations + .translate(i18.common.maxCharsRequired) + .replaceAll('{}', maxLength.toString()), + 'minLength': (_) => localizations + .translate(i18.common.min2CharsRequired) + .replaceAll('{}', '2'), + }, + formControlName: _householdHeadNameKey, + showErrors: (control) => + control.invalid && + control.touched && + control.value != '', + // Ensures error is shown if invalid and touched + builder: (field) { + return LabeledField( + label: localizations.translate( + i18.closeHousehold.headNameLabel, + ), + child: DigitTextFormInput( + maxLength: 64, + charCount: true, + onChange: (val) => { + form + .control( + _householdHeadNameKey, + ) + .markAsTouched(), + form + .control( + _householdHeadNameKey, + ) + .value = val, + }, + errorMessage: field.errorText, + initialValue: form + .control( + _householdHeadNameKey, + ) + .value, + ), + ); + }), + ]), ), ], ); @@ -193,8 +261,11 @@ class ClosedHouseholdDetailsPageState _householdHeadNameKey: FormControl( value: null, validators: [ - CustomValidator.requiredMin, + Validators.delegate( + CustomValidator.requiredMin, + ), Validators.maxLength(200), + Validators.minLength(2), ], ), _latKey: FormControl(validators: []), diff --git a/packages/closed_household/lib/pages/closed_household_summary.dart b/packages/closed_household/lib/pages/closed_household_summary.dart index 826af79f4..52915aadf 100644 --- a/packages/closed_household/lib/pages/closed_household_summary.dart +++ b/packages/closed_household/lib/pages/closed_household_summary.dart @@ -1,11 +1,14 @@ import 'package:auto_route/auto_route.dart'; import 'package:closed_household/blocs/closed_household.dart'; import 'package:closed_household/router/closed_household_router.gm.dart'; -import 'package:digit_components/digit_components.dart'; -import 'package:digit_components/utils/date_utils.dart'; -import 'package:digit_components/widgets/atoms/details_card.dart'; import 'package:digit_scanner/blocs/scanner.dart'; import 'package:digit_scanner/pages/qr_scanner.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/utils/date_utils.dart'; +import 'package:digit_ui_components/widgets/atoms/label_value_list.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; +import 'package:digit_ui_components/widgets/molecules/label_value_summary.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; @@ -13,7 +16,6 @@ import '../../../widgets/localized.dart'; import '../../utils/i18_key_constants.dart' as i18; import '../../utils/utils.dart'; import '../widgets/back_navigation_help_header.dart'; -import '../widgets/showcase/showcase_button.dart'; @RoutePage() class ClosedHouseholdSummaryPage extends LocalizedStatefulWidget { @@ -43,138 +45,147 @@ class ClosedHouseholdSummaryPageState @override Widget build(BuildContext context) { + final theme = Theme.of(context); + return BlocBuilder( builder: (context, householdState) { return Scaffold( body: ScrollableContent( - enableFixedButton: true, + enableFixedDigitButton: true, header: const BackNavigationHelpHeaderWidget( showHelp: false, - showcaseButton: ShowcaseButton(), ), footer: DigitCard( - margin: const EdgeInsets.fromLTRB(0, kPadding, 0, 0), - padding: - const EdgeInsets.fromLTRB(kPadding, kPadding, kPadding, 0), - child: BlocBuilder( - builder: (context, scannerState) { - return Column( - mainAxisSize: MainAxisSize.min, - children: [ - DigitOutlineIconButton( - buttonStyle: OutlinedButton.styleFrom( - shape: const RoundedRectangleBorder( - borderRadius: BorderRadius.zero, + margin: const EdgeInsets.only(top: spacer2), + children: [ + BlocBuilder( + builder: (context, scannerState) { + return Column( + mainAxisSize: MainAxisSize.min, + children: [ + DigitButton( + size: DigitButtonSize.large, + type: DigitButtonType.secondary, + mainAxisSize: MainAxisSize.max, + onPressed: () { + Navigator.of(context).push( + // [TODO: Add the route to auto_route] + MaterialPageRoute( + builder: (context) => const DigitScannerPage( + quantity: 1, + isGS1code: false, + singleValue: true, + ), + settings: + const RouteSettings(name: '/qr-scanner'), + ), + ); + }, + prefixIcon: Icons.qr_code, + label: localizations.translate(i18.closeHousehold + .closeHouseholdVoucherScannerLabel), ), - ), - onPressed: () { - Navigator.of(context).push( - // [TODO: Add the route to auto_route] - MaterialPageRoute( - builder: (context) => const DigitScannerPage( - quantity: 1, - isGS1code: false, - singleValue: true, - ), - settings: - const RouteSettings(name: '/qr-scanner'), - ), - ); - }, - icon: Icons.qr_code, - label: localizations.translate(i18 - .closeHousehold.closeHouseholdVoucherScannerLabel), - ), - DigitElevatedButton( - onPressed: () { - context.read().add( - ClosedHouseholdEvent.handleSubmit( - context: context, - householdHeadName: - householdState.householdHeadName, - locationAccuracy: - householdState.locationAccuracy, - longitude: householdState.longitude, - latitude: householdState.latitude, - tag: scannerState.qrCodes.isNotEmpty - ? scannerState.qrCodes.first - : null)); + SizedBox( + height: theme.spacerTheme.spacer3, + ), + DigitButton( + size: DigitButtonSize.large, + type: DigitButtonType.primary, + mainAxisSize: MainAxisSize.max, + onPressed: () { + context.read().add( + ClosedHouseholdEvent.handleSubmit( + context: context, + householdHeadName: + householdState.householdHeadName, + locationAccuracy: + householdState.locationAccuracy, + longitude: householdState.longitude, + latitude: householdState.latitude, + tag: scannerState.qrCodes.isNotEmpty + ? scannerState.qrCodes.first + : null)); - ///clear the scanner - context.router - .push(ClosedHouseholdAcknowledgementRoute()); - }, - child: Center( - child: Text( - localizations + ///clear the scanner + context.router + .push(ClosedHouseholdAcknowledgementRoute()); + }, + label: localizations .translate(i18.common.coreCommonSubmit), ), - ), - ), - ], - ); - }), - ), + ], + ); + }), + ]), slivers: [ SliverToBoxAdapter( child: Column( children: [ - DigitCard( - child: LabelValueList( + DigitCard(margin: const EdgeInsets.all(spacer2), children: [ + LabelValueSummary( + padding: EdgeInsets.zero, heading: localizations.translate( i18.closeHousehold.closeHouseholdSummaryLabel), withDivider: false, items: [ - LabelValuePair( + LabelValueItem( label: localizations.translate( i18.closeHousehold.closeHouseholdDate), value: (DigitDateUtils.getDateFromTimestamp( DateTime.now().millisecondsSinceEpoch, dateFormat: 'dd MMM yyyy')) .toString(), + labelFlex: 5, ), - LabelValuePair( + LabelValueItem( label: localizations.translate( i18.closeHousehold.closeHouseholdVillageName), value: ClosedHouseholdSingleton() .boundary! .name .toString(), + labelFlex: 5, ), - LabelValuePair( + LabelValueItem( label: localizations.translate( i18.closeHousehold.closeHouseholdHeadName), value: householdState.householdHeadName ?? localizations .translate(i18.common.coreCommonNA), + labelFlex: 5, ), - LabelValuePair( + LabelValueItem( label: localizations.translate(i18 .closeHousehold.closeHouseholdGpsAccuracyLabel), - value: householdState.locationAccuracy != null - ? '${householdState.locationAccuracy.toStringAsFixed(2)} ${localizations.translate(i18.common.coreCommonMeters)}' - : localizations - .translate(i18.common.coreCommonNA), + value: + '${householdState.locationAccuracy.toStringAsFixed(2)} ${localizations.translate(i18.common.coreCommonMeters)}', + labelFlex: 5, ), ]), - ), + ]), BlocBuilder( builder: (context, state) { if (state.qrCodes.isNotEmpty) { return DigitCard( - child: LabelValueList( - heading: localizations.translate(i18.closeHousehold - .closeHouseholdVoucherSummaryLabel), - withDivider: false, - items: [ - LabelValuePair( - label: localizations.translate(i18.closeHousehold - .closeHouseholdVoucherCodeLabel), - value: state.qrCodes.first, + margin: const EdgeInsets.all(spacer2), + children: [ + LabelValueSummary( + padding: EdgeInsets.zero, + heading: localizations.translate(i18 + .closeHousehold + .closeHouseholdVoucherSummaryLabel), + withDivider: false, + items: [ + LabelValueItem( + label: localizations.translate(i18 + .closeHousehold + .closeHouseholdVoucherCodeLabel), + value: state.qrCodes.first, + labelFlex: 5, + ), + ], ), - ], - ), - ); + ]); } else { return const SizedBox(); } diff --git a/packages/closed_household/lib/pages/closed_household_wrapper.dart b/packages/closed_household/lib/pages/closed_household_wrapper.dart index 3bcab0b3b..f202fa42d 100644 --- a/packages/closed_household/lib/pages/closed_household_wrapper.dart +++ b/packages/closed_household/lib/pages/closed_household_wrapper.dart @@ -3,8 +3,10 @@ import 'package:closed_household/blocs/closed_household.dart'; import 'package:closed_household/closed_household.dart'; import 'package:closed_household/utils/extensions/extensions.dart'; import 'package:digit_data_model/models/entities/individual.dart'; +import 'package:digit_ui_components/services/location_bloc.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:location/location.dart'; import 'package:registration_delivery/models/entities/household.dart'; import 'package:registration_delivery/models/entities/household_member.dart'; import 'package:registration_delivery/models/entities/project_beneficiary.dart'; @@ -20,6 +22,13 @@ class ClosedHouseholdWrapperPage extends StatelessWidget { Widget build(BuildContext context) { return MultiBlocProvider( providers: [ + BlocProvider( + create: (_) { + return LocationBloc(location: Location()) + ..add(const LoadLocationEvent()); + }, + lazy: false, + ), BlocProvider( create: (_) { return ClosedHouseholdBloc( diff --git a/packages/closed_household/lib/router/closed_household_router.dart b/packages/closed_household/lib/router/closed_household_router.dart index ead0995e8..29c5b6526 100644 --- a/packages/closed_household/lib/router/closed_household_router.dart +++ b/packages/closed_household/lib/router/closed_household_router.dart @@ -2,21 +2,18 @@ import 'package:auto_route/auto_route.dart'; import 'closed_household_router.gm.dart'; - @AutoRouterConfig.module() class ClosedHouseholdPackageRoute extends $ClosedHouseholdPackageRoute { - @override RouteType get defaultRouteType => const RouteType.material(); - @override List routes = [ AutoRoute( page: ClosedHouseholdWrapperRoute.page, path: 'closed-household-wrapper', children: [ AutoRoute( - page: ClosedHouseholdDetailsRoute.page, - path: 'closed-household-details', + page: ClosedHouseholdDetailsRoute.page, + path: 'closed-household-details', initial: true, ), AutoRoute( @@ -26,6 +23,5 @@ class ClosedHouseholdPackageRoute extends $ClosedHouseholdPackageRoute { page: ClosedHouseholdAcknowledgementRoute.page, path: 'closed-household-acknowledgement'), ]), - ]; } diff --git a/packages/closed_household/lib/widgets/back_navigation_help_header.dart b/packages/closed_household/lib/widgets/back_navigation_help_header.dart index 251c8e6a3..4d80b066c 100644 --- a/packages/closed_household/lib/widgets/back_navigation_help_header.dart +++ b/packages/closed_household/lib/widgets/back_navigation_help_header.dart @@ -1,7 +1,9 @@ import 'package:auto_route/auto_route.dart'; import 'package:closed_household/blocs/app_localization.dart'; import 'package:closed_household/widgets/showcase/showcase_button.dart'; -import 'package:digit_components/digit_components.dart'; +import 'package:digit_ui_components/theme/ComponentTheme/back_button_theme.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/atoms/digit_back_button.dart'; import 'package:flutter/material.dart'; import '../../utils/i18_key_constants.dart' as i18; @@ -29,36 +31,36 @@ class BackNavigationHelpHeaderWidget extends StatelessWidget { final theme = Theme.of(context); return Padding( - padding: const EdgeInsets.all(kPadding / 2), + padding: EdgeInsets.all( theme.spacerTheme.spacer2), child: Row( children: [ Expanded( child: Row( children: [ if (showBackNavigation) - Flexible( - child: TextButton.icon( - style: TextButton.styleFrom( - foregroundColor: theme.colorScheme.onBackground, - padding: EdgeInsets.zero, - ), - onPressed: () { - context.router.maybePop(); - handleBack != null ? handleBack!() : null; - }, - icon: const Icon(Icons.arrow_left_sharp), - label: Text( - ClosedHouseholdLocalization.of(context).translate( - i18.common.coreCommonBack, - ), - overflow: TextOverflow.ellipsis, + DigitBackButton(label: ClosedHouseholdLocalization.of(context).translate( + i18.common.coreCommonBack, + ), + digitBackButtonThemeData: + const DigitBackButtonThemeData().copyWith( + context: context, + backDigitButtonIcon: Icon( + Icons.arrow_left, + size: MediaQuery.of(context).size.width < 500 + ? Theme.of(context).spacerTheme.spacer5 + : Theme.of(context).spacerTheme.spacer6, + color: Theme.of(context).colorTheme.primary.primary2, ), ), - ), + handleBack: () { + context.router.maybePop(); + handleBack != null ? handleBack!() : null; + }, + ) ], ), ), - SizedBox(width: showHelp ? kPadding * 2 : 0), + SizedBox(width: showHelp ? theme.spacerTheme.spacer2 * 2 : 0), if (showHelp) TextButton( style: TextButton.styleFrom(padding: EdgeInsets.zero), diff --git a/packages/closed_household/lib/widgets/showcase/showcase_button.dart b/packages/closed_household/lib/widgets/showcase/showcase_button.dart index 9e7b1f968..990367372 100644 --- a/packages/closed_household/lib/widgets/showcase/showcase_button.dart +++ b/packages/closed_household/lib/widgets/showcase/showcase_button.dart @@ -1,8 +1,8 @@ import 'package:auto_route/auto_route.dart'; import 'package:closed_household/blocs/app_localization.dart'; import 'package:closed_household/router/closed_household_router.gm.dart'; -import 'package:digit_components/theme/digit_theme.dart'; import 'package:digit_showcase/showcase_widget.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; import 'package:flutter/material.dart'; import '../../utils/i18_key_constants.dart' as i18; import '../localized.dart'; @@ -20,6 +20,8 @@ class ShowcaseButton extends LocalizedStatefulWidget { class _ShowcaseButtonState extends LocalizedState { @override Widget build(BuildContext context) { + final theme = Theme.of(context); + return TextButton( style: TextButton.styleFrom(padding: EdgeInsets.zero), onPressed: () { @@ -42,11 +44,11 @@ class _ShowcaseButtonState extends LocalizedState { child: Row( children: [ Padding( - padding: const EdgeInsets.fromLTRB( - kPadding, - kPadding, - kPadding / 2, - kPadding, + padding: EdgeInsets.fromLTRB( + theme.spacerTheme.spacer2, + theme.spacerTheme.spacer2, + theme.spacerTheme.spacer2 / 2, + theme.spacerTheme.spacer2, ), child: Text( ClosedHouseholdLocalization.of(context) diff --git a/packages/closed_household/lib/widgets/showcase/showcase_wrappers.dart b/packages/closed_household/lib/widgets/showcase/showcase_wrappers.dart index a2ac9e398..b4e19d8b5 100644 --- a/packages/closed_household/lib/widgets/showcase/showcase_wrappers.dart +++ b/packages/closed_household/lib/widgets/showcase/showcase_wrappers.dart @@ -1,10 +1,9 @@ import 'package:digit_showcase/showcase.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; import 'package:flutter/material.dart'; import '../localized.dart'; -const kPadding = 8.0; - class ShowcaseItemBuilder { final GlobalKey showcaseKey; final String messageLocalizationKey; @@ -40,23 +39,25 @@ class _ShowcaseItemWrapperWidgetState extends LocalizedState { @override Widget build(BuildContext context) { + final theme = Theme.of(context); + return Showcase( key: widget.showcaseKey, disableMovingAnimation: true, disableScaleAnimation: true, description: localizations.translate(widget.messageLocalizationKey), - targetPadding: const EdgeInsets.fromLTRB( - kPadding / 2, - kPadding / 2, - kPadding / 2, - kPadding / 2, + targetPadding: EdgeInsets.fromLTRB( + theme.spacerTheme.spacer2 / 2, + theme.spacerTheme.spacer2 / 2, + theme.spacerTheme.spacer2 / 2, + theme.spacerTheme.spacer2 / 2, ), child: Container( - padding: const EdgeInsets.fromLTRB( - kPadding / 2, - kPadding / 2, - kPadding / 2, - kPadding / 2, + padding: EdgeInsets.fromLTRB( + theme.spacerTheme.spacer2 / 2, + theme.spacerTheme.spacer2 / 2, + theme.spacerTheme.spacer2 / 2, + theme.spacerTheme.spacer2 / 2, ), child: widget.child, ), diff --git a/packages/closed_household/pubspec.lock b/packages/closed_household/pubspec.lock new file mode 100644 index 000000000..704277232 --- /dev/null +++ b/packages/closed_household/pubspec.lock @@ -0,0 +1,1776 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + sha256: ae92f5d747aee634b87f89d9946000c2de774be1d6ac3e58268224348cd0101a + url: "https://pub.dev" + source: hosted + version: "61.0.0" + analyzer: + dependency: transitive + description: + name: analyzer + sha256: ea3d8652bda62982addfd92fdc2d0214e5f82e43325104990d4f4c4a2a313562 + url: "https://pub.dev" + source: hosted + version: "5.13.0" + analyzer_plugin: + dependency: transitive + description: + name: analyzer_plugin + sha256: c1d5f167683de03d5ab6c3b53fc9aeefc5d59476e7810ba7bbddff50c6f4392d + url: "https://pub.dev" + source: hosted + version: "0.11.2" + ansicolor: + dependency: transitive + description: + name: ansicolor + sha256: "50e982d500bc863e1d703448afdbf9e5a72eb48840a4f766fa361ffd6877055f" + url: "https://pub.dev" + source: hosted + version: "2.0.3" + archive: + dependency: transitive + description: + name: archive + sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d + url: "https://pub.dev" + source: hosted + version: "3.6.1" + args: + dependency: transitive + description: + name: args + sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" + url: "https://pub.dev" + source: hosted + version: "2.5.0" + async: + dependency: "direct main" + description: + name: async + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" + source: hosted + version: "2.11.0" + audioplayers: + dependency: transitive + description: + name: audioplayers + sha256: c05c6147124cd63e725e861335a8b4d57300b80e6e92cea7c145c739223bbaef + url: "https://pub.dev" + source: hosted + version: "5.2.1" + audioplayers_android: + dependency: transitive + description: + name: audioplayers_android + sha256: b00e1a0e11365d88576320ec2d8c192bc21f1afb6c0e5995d1c57ae63156acb5 + url: "https://pub.dev" + source: hosted + version: "4.0.3" + audioplayers_darwin: + dependency: transitive + description: + name: audioplayers_darwin + sha256: "3034e99a6df8d101da0f5082dcca0a2a99db62ab1d4ddb3277bed3f6f81afe08" + url: "https://pub.dev" + source: hosted + version: "5.0.2" + audioplayers_linux: + dependency: transitive + description: + name: audioplayers_linux + sha256: "60787e73fefc4d2e0b9c02c69885402177e818e4e27ef087074cf27c02246c9e" + url: "https://pub.dev" + source: hosted + version: "3.1.0" + audioplayers_platform_interface: + dependency: transitive + description: + name: audioplayers_platform_interface + sha256: "365c547f1bb9e77d94dd1687903a668d8f7ac3409e48e6e6a3668a1ac2982adb" + url: "https://pub.dev" + source: hosted + version: "6.1.0" + audioplayers_web: + dependency: transitive + description: + name: audioplayers_web + sha256: "22cd0173e54d92bd9b2c80b1204eb1eb159ece87475ab58c9788a70ec43c2a62" + url: "https://pub.dev" + source: hosted + version: "4.1.0" + audioplayers_windows: + dependency: transitive + description: + name: audioplayers_windows + sha256: "9536812c9103563644ada2ef45ae523806b0745f7a78e89d1b5fb1951de90e1a" + url: "https://pub.dev" + source: hosted + version: "3.1.0" + auto_route: + dependency: "direct main" + description: + name: auto_route + sha256: a9001a90539ca3effc168f7e1029a5885c7326b9032c09ac895e303c1d137704 + url: "https://pub.dev" + source: hosted + version: "8.3.0" + auto_route_generator: + dependency: "direct dev" + description: + name: auto_route_generator + sha256: ba28133d3a3bf0a66772bcc98dade5843753cd9f1a8fb4802b842895515b67d3 + url: "https://pub.dev" + source: hosted + version: "8.0.0" + bloc: + dependency: transitive + description: + name: bloc + sha256: "106842ad6569f0b60297619e9e0b1885c2fb9bf84812935490e6c5275777804e" + url: "https://pub.dev" + source: hosted + version: "8.1.4" + bloc_test: + dependency: "direct dev" + description: + name: bloc_test + sha256: "165a6ec950d9252ebe36dc5335f2e6eb13055f33d56db0eeb7642768849b43d2" + url: "https://pub.dev" + source: hosted + version: "9.1.7" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + build: + dependency: transitive + description: + name: build + sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" + url: "https://pub.dev" + source: hosted + version: "2.4.1" + build_config: + dependency: transitive + description: + name: build_config + sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1 + url: "https://pub.dev" + source: hosted + version: "1.1.1" + build_daemon: + dependency: transitive + description: + name: build_daemon + sha256: "0343061a33da9c5810b2d6cee51945127d8f4c060b7fbdd9d54917f0a3feaaa1" + url: "https://pub.dev" + source: hosted + version: "4.0.1" + build_resolvers: + dependency: transitive + description: + name: build_resolvers + sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a" + url: "https://pub.dev" + source: hosted + version: "2.4.2" + build_runner: + dependency: "direct dev" + description: + name: build_runner + sha256: "644dc98a0f179b872f612d3eb627924b578897c629788e858157fa5e704ca0c7" + url: "https://pub.dev" + source: hosted + version: "2.4.11" + build_runner_core: + dependency: transitive + description: + name: build_runner_core + sha256: "4ae8ffe5ac758da294ecf1802f2aff01558d8b1b00616aa7538ea9a8a5d50799" + url: "https://pub.dev" + source: hosted + version: "7.3.0" + built_collection: + dependency: transitive + description: + name: built_collection + sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" + url: "https://pub.dev" + source: hosted + version: "5.1.1" + built_value: + dependency: transitive + description: + name: built_value + sha256: c7913a9737ee4007efedaffc968c049fd0f3d0e49109e778edc10de9426005cb + url: "https://pub.dev" + source: hosted + version: "8.9.2" + camera: + dependency: transitive + description: + name: camera + sha256: "26ff41045772153f222ffffecba711a206f670f5834d40ebf5eed3811692f167" + url: "https://pub.dev" + source: hosted + version: "0.11.0+2" + camera_android_camerax: + dependency: transitive + description: + name: camera_android_camerax + sha256: "011be2ab0e5b3e3aa8094413fa890f8c5c5afd7cfdaef353a992047d4dab5780" + url: "https://pub.dev" + source: hosted + version: "0.6.8+2" + camera_avfoundation: + dependency: transitive + description: + name: camera_avfoundation + sha256: "2e4c568f70e406ccb87376bc06b53d2f5bebaab71e2fbcc1a950e31449381bcf" + url: "https://pub.dev" + source: hosted + version: "0.9.17+5" + camera_platform_interface: + dependency: transitive + description: + name: camera_platform_interface + sha256: b3ede1f171532e0d83111fe0980b46d17f1aa9788a07a2fbed07366bbdbb9061 + url: "https://pub.dev" + source: hosted + version: "2.8.0" + camera_web: + dependency: transitive + description: + name: camera_web + sha256: b9235ec0a2ce949daec546f1f3d86f05c3921ed31c7d9ab6b7c03214d152fc2d + url: "https://pub.dev" + source: hosted + version: "0.3.4" + characters: + dependency: transitive + description: + name: characters + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" + source: hosted + version: "1.3.0" + charcode: + dependency: transitive + description: + name: charcode + sha256: fb98c0f6d12c920a02ee2d998da788bca066ca5f148492b7085ee23372b12306 + url: "https://pub.dev" + source: hosted + version: "1.3.1" + checked_yaml: + dependency: transitive + description: + name: checked_yaml + sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff + url: "https://pub.dev" + source: hosted + version: "2.0.3" + cli_util: + dependency: transitive + description: + name: cli_util + sha256: c05b7406fdabc7a49a3929d4af76bcaccbbffcbcdcf185b082e1ae07da323d19 + url: "https://pub.dev" + source: hosted + version: "0.4.1" + clock: + dependency: transitive + description: + name: clock + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" + source: hosted + version: "1.1.1" + code_builder: + dependency: transitive + description: + name: code_builder + sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37 + url: "https://pub.dev" + source: hosted + version: "4.10.0" + collection: + dependency: "direct main" + description: + name: collection + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + url: "https://pub.dev" + source: hosted + version: "1.18.0" + convert: + dependency: transitive + description: + name: convert + sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + url: "https://pub.dev" + source: hosted + version: "3.1.1" + coverage: + dependency: transitive + description: + name: coverage + sha256: "3945034e86ea203af7a056d98e98e42a5518fff200d6e8e6647e1886b07e936e" + url: "https://pub.dev" + source: hosted + version: "1.8.0" + cross_file: + dependency: transitive + description: + name: cross_file + sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670" + url: "https://pub.dev" + source: hosted + version: "0.3.4+2" + crypto: + dependency: transitive + description: + name: crypto + sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + url: "https://pub.dev" + source: hosted + version: "3.0.3" + csslib: + dependency: transitive + description: + name: csslib + sha256: "09bad715f418841f976c77db72d5398dc1253c21fb9c0c7f0b0b985860b2d58e" + url: "https://pub.dev" + source: hosted + version: "1.0.2" + cupertino_icons: + dependency: transitive + description: + name: cupertino_icons + sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 + url: "https://pub.dev" + source: hosted + version: "1.0.8" + dart_mappable: + dependency: "direct main" + description: + name: dart_mappable + sha256: "47269caf2060533c29b823ff7fa9706502355ffcb61e7f2a374e3a0fb2f2c3f0" + url: "https://pub.dev" + source: hosted + version: "4.2.2" + dart_mappable_builder: + dependency: "direct dev" + description: + path: "packages/dart_mappable_builder" + ref: "1.6-final-dev" + resolved-ref: "1e7467577a9701d396f7e23afbf00065e54c5469" + url: "https://github.com/egovernments/health-campaign-field-worker-app/" + source: git + version: "4.2.3" + dart_style: + dependency: transitive + description: + name: dart_style + sha256: "1efa911ca7086affd35f463ca2fc1799584fb6aa89883cf0af8e3664d6a02d55" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + dartx: + dependency: transitive + description: + name: dartx + sha256: "8b25435617027257d43e6508b5fe061012880ddfdaa75a71d607c3de2a13d244" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + db_viewer: + dependency: transitive + description: + name: db_viewer + sha256: "5f7e3cfcde9663321797d8f6f0c876f7c13f0825a2e77ec1ef065656797144d9" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + diff_match_patch: + dependency: transitive + description: + name: diff_match_patch + sha256: "2efc9e6e8f449d0abe15be240e2c2a3bcd977c8d126cfd70598aee60af35c0a4" + url: "https://pub.dev" + source: hosted + version: "0.4.1" + digit_data_model: + dependency: "direct main" + description: + name: digit_data_model + sha256: c3bc7299a7d927ebb83d8e91c1d7a8a51f6a1d1295dafeacb642012b72b99a2f + url: "https://pub.dev" + source: hosted + version: "1.0.5" + digit_scanner: + dependency: "direct main" + description: + name: digit_scanner + sha256: c33af61ed9ab3d7740fc3c8948af4b763d946cba5e902f8bfb00948d4d69d60a + url: "https://pub.dev" + source: hosted + version: "1.0.4" + digit_showcase: + dependency: "direct main" + description: + name: digit_showcase + sha256: "75b67298f1860ad757827b15af752b677f934b5275b887e36b15e25a5285e498" + url: "https://pub.dev" + source: hosted + version: "1.0.0" + digit_ui_components: + dependency: "direct main" + description: + name: digit_ui_components + sha256: "57c4da5237be6025783e7357a02b6b492f02e38f711d674bf46f5f8c8a93ad76" + url: "https://pub.dev" + source: hosted + version: "0.0.2-dev.4" + dio: + dependency: transitive + description: + name: dio + sha256: "5598aa796bbf4699afd5c67c0f5f6e2ed542afc956884b9cd58c306966efc260" + url: "https://pub.dev" + source: hosted + version: "5.7.0" + dio_web_adapter: + dependency: transitive + description: + name: dio_web_adapter + sha256: "36c5b2d79eb17cdae41e974b7a8284fec631651d2a6f39a8a2ff22327e90aeac" + url: "https://pub.dev" + source: hosted + version: "1.0.1" + dotted_border: + dependency: transitive + description: + name: dotted_border + sha256: "108837e11848ca776c53b30bc870086f84b62ed6e01c503ed976e8f8c7df9c04" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + drift: + dependency: "direct main" + description: + name: drift + sha256: "6acedc562ffeed308049f78fb1906abad3d65714580b6745441ee6d50ec564cd" + url: "https://pub.dev" + source: hosted + version: "2.18.0" + drift_db_viewer: + dependency: "direct main" + description: + name: drift_db_viewer + sha256: "5ea77858c52b55460a1e8f34ab5f88324621d486717d876fd745765fbc227f3f" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + drift_dev: + dependency: "direct dev" + description: + name: drift_dev + sha256: d9b020736ea85fff1568699ce18b89fabb3f0f042e8a7a05e84a3ec20d39acde + url: "https://pub.dev" + source: hosted + version: "2.18.0" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" + source: hosted + version: "1.3.1" + ffi: + dependency: transitive + description: + name: ffi + sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + file: + dependency: transitive + description: + name: file + sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" + url: "https://pub.dev" + source: hosted + version: "6.1.4" + file_picker: + dependency: transitive + description: + name: file_picker + sha256: d1d0ac3966b36dc3e66eeefb40280c17feb87fa2099c6e22e6a1fc959327bd03 + url: "https://pub.dev" + source: hosted + version: "8.0.0+1" + file_selector_linux: + dependency: transitive + description: + name: file_selector_linux + sha256: "045d372bf19b02aeb69cacf8b4009555fb5f6f0b7ad8016e5f46dd1387ddd492" + url: "https://pub.dev" + source: hosted + version: "0.9.2+1" + file_selector_macos: + dependency: transitive + description: + name: file_selector_macos + sha256: f42eacb83b318e183b1ae24eead1373ab1334084404c8c16e0354f9a3e55d385 + url: "https://pub.dev" + source: hosted + version: "0.9.4" + file_selector_platform_interface: + dependency: transitive + description: + name: file_selector_platform_interface + sha256: a3994c26f10378a039faa11de174d7b78eb8f79e4dd0af2a451410c1a5c3f66b + url: "https://pub.dev" + source: hosted + version: "2.6.2" + file_selector_windows: + dependency: transitive + description: + name: file_selector_windows + sha256: "2ad726953f6e8affbc4df8dc78b77c3b4a060967a291e528ef72ae846c60fb69" + url: "https://pub.dev" + source: hosted + version: "0.9.3+2" + fixnum: + dependency: transitive + description: + name: fixnum + sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_bloc: + dependency: "direct main" + description: + name: flutter_bloc + sha256: b594505eac31a0518bdcb4b5b79573b8d9117b193cc80cc12e17d639b10aa27a + url: "https://pub.dev" + source: hosted + version: "8.1.6" + flutter_dropzone: + dependency: transitive + description: + name: flutter_dropzone + sha256: b399c60411f9bf9c4c2f97933c6a3a185859e75aade8897831e76cee4346c8e1 + url: "https://pub.dev" + source: hosted + version: "3.0.7" + flutter_dropzone_platform_interface: + dependency: transitive + description: + name: flutter_dropzone_platform_interface + sha256: "96d2c51c86063ba150551c3b40fd26c5a18785bee071c0c751502d28a545df3b" + url: "https://pub.dev" + source: hosted + version: "2.2.0" + flutter_dropzone_web: + dependency: transitive + description: + name: flutter_dropzone_web + sha256: c5a0fdb63b7216352a01761ec1b6eba1982e49541e60675735e2d3d95e207b19 + url: "https://pub.dev" + source: hosted + version: "3.0.13" + flutter_keyboard_visibility: + dependency: "direct main" + description: + name: flutter_keyboard_visibility + sha256: "4983655c26ab5b959252ee204c2fffa4afeb4413cd030455194ec0caa3b8e7cb" + url: "https://pub.dev" + source: hosted + version: "5.4.1" + flutter_keyboard_visibility_linux: + dependency: transitive + description: + name: flutter_keyboard_visibility_linux + sha256: "6fba7cd9bb033b6ddd8c2beb4c99ad02d728f1e6e6d9b9446667398b2ac39f08" + url: "https://pub.dev" + source: hosted + version: "1.0.0" + flutter_keyboard_visibility_macos: + dependency: transitive + description: + name: flutter_keyboard_visibility_macos + sha256: c5c49b16fff453dfdafdc16f26bdd8fb8d55812a1d50b0ce25fc8d9f2e53d086 + url: "https://pub.dev" + source: hosted + version: "1.0.0" + flutter_keyboard_visibility_platform_interface: + dependency: transitive + description: + name: flutter_keyboard_visibility_platform_interface + sha256: e43a89845873f7be10cb3884345ceb9aebf00a659f479d1c8f4293fcb37022a4 + url: "https://pub.dev" + source: hosted + version: "2.0.0" + flutter_keyboard_visibility_web: + dependency: transitive + description: + name: flutter_keyboard_visibility_web + sha256: d3771a2e752880c79203f8d80658401d0c998e4183edca05a149f5098ce6e3d1 + url: "https://pub.dev" + source: hosted + version: "2.0.0" + flutter_keyboard_visibility_windows: + dependency: transitive + description: + name: flutter_keyboard_visibility_windows + sha256: fc4b0f0b6be9b93ae527f3d527fb56ee2d918cd88bbca438c478af7bcfd0ef73 + url: "https://pub.dev" + source: hosted + version: "1.0.0" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + sha256: "9e8c3858111da373efc5aa341de011d9bd23e2c5c5e0c62bccf32438e192d7b1" + url: "https://pub.dev" + source: hosted + version: "3.0.2" + flutter_localizations: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + flutter_plugin_android_lifecycle: + dependency: transitive + description: + name: flutter_plugin_android_lifecycle + sha256: "8cf40eebf5dec866a6d1956ad7b4f7016e6c0cc69847ab946833b7d43743809f" + url: "https://pub.dev" + source: hosted + version: "2.0.19" + flutter_spinkit: + dependency: transitive + description: + name: flutter_spinkit + sha256: d2696eed13732831414595b98863260e33e8882fc069ee80ec35d4ac9ddb0472 + url: "https://pub.dev" + source: hosted + version: "5.2.1" + flutter_styled_toast: + dependency: transitive + description: + name: flutter_styled_toast + sha256: e667f13a665820eb0fa8506547e47eacbcddf1948d6d3036cfd3b089bd4b0516 + url: "https://pub.dev" + source: hosted + version: "2.2.1" + flutter_svg: + dependency: "direct main" + description: + name: flutter_svg + sha256: "7b4ca6cf3304575fe9c8ec64813c8d02ee41d2afe60bcfe0678bcb5375d596a2" + url: "https://pub.dev" + source: hosted + version: "2.0.10+1" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + fluttertoast: + dependency: "direct main" + description: + name: fluttertoast + sha256: "95f349437aeebe524ef7d6c9bde3e6b4772717cf46a0eb6a3ceaddc740b297cc" + url: "https://pub.dev" + source: hosted + version: "8.2.8" + formula_parser: + dependency: "direct main" + description: + name: formula_parser + sha256: af9e9ae2961ec1dab54c5de97d9a6bef0593ddb998720e3785bd91ef05353359 + url: "https://pub.dev" + source: hosted + version: "2.0.1" + freezed: + dependency: "direct dev" + description: + name: freezed + sha256: a434911f643466d78462625df76fd9eb13e57348ff43fe1f77bbe909522c67a1 + url: "https://pub.dev" + source: hosted + version: "2.5.2" + freezed_annotation: + dependency: "direct main" + description: + name: freezed_annotation + sha256: c2e2d632dd9b8a2b7751117abcfc2b4888ecfe181bd9fca7170d9ef02e595fe2 + url: "https://pub.dev" + source: hosted + version: "2.4.4" + frontend_server_client: + dependency: transitive + description: + name: frontend_server_client + sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" + url: "https://pub.dev" + source: hosted + version: "3.2.0" + geolocator: + dependency: transitive + description: + name: geolocator + sha256: f4efb8d3c4cdcad2e226af9661eb1a0dd38c71a9494b22526f9da80ab79520e5 + url: "https://pub.dev" + source: hosted + version: "10.1.1" + geolocator_android: + dependency: transitive + description: + name: geolocator_android + sha256: "7aefc530db47d90d0580b552df3242440a10fe60814496a979aa67aa98b1fd47" + url: "https://pub.dev" + source: hosted + version: "4.6.1" + geolocator_apple: + dependency: transitive + description: + name: geolocator_apple + sha256: "6154ea2682563f69fc0125762ed7e91e7ed85d0b9776595653be33918e064807" + url: "https://pub.dev" + source: hosted + version: "2.3.8+1" + geolocator_platform_interface: + dependency: transitive + description: + name: geolocator_platform_interface + sha256: "386ce3d9cce47838355000070b1d0b13efb5bc430f8ecda7e9238c8409ace012" + url: "https://pub.dev" + source: hosted + version: "4.2.4" + geolocator_web: + dependency: transitive + description: + name: geolocator_web + sha256: "102e7da05b48ca6bf0a5bda0010f886b171d1a08059f01bfe02addd0175ebece" + url: "https://pub.dev" + source: hosted + version: "2.2.1" + geolocator_windows: + dependency: transitive + description: + name: geolocator_windows + sha256: "53da08937d07c24b0d9952eb57a3b474e29aae2abf9dd717f7e1230995f13f0e" + url: "https://pub.dev" + source: hosted + version: "0.2.3" + glob: + dependency: transitive + description: + name: glob + sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + google_fonts: + dependency: transitive + description: + name: google_fonts + sha256: b1ac0fe2832c9cc95e5e88b57d627c5e68c223b9657f4b96e1487aa9098c7b82 + url: "https://pub.dev" + source: hosted + version: "6.2.1" + google_mlkit_barcode_scanning: + dependency: transitive + description: + name: google_mlkit_barcode_scanning + sha256: f1a2a39cf1730b9a5e2784a07efa1ca5bfdfdde6aa00b193b3f8cd1953c638ec + url: "https://pub.dev" + source: hosted + version: "0.12.0" + google_mlkit_commons: + dependency: transitive + description: + name: google_mlkit_commons + sha256: "27d626c66a181351a953eba5b6ff1ff123aadb891b4dab085b292118f039d6ac" + url: "https://pub.dev" + source: hosted + version: "0.7.1" + graphs: + dependency: transitive + description: + name: graphs + sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19 + url: "https://pub.dev" + source: hosted + version: "2.3.1" + group_radio_button: + dependency: transitive + description: + name: group_radio_button + sha256: "204de8d16b224be7fc72dade0c3afd410ff5a34417d89f74f0fd8be7a8c2b4d6" + url: "https://pub.dev" + source: hosted + version: "1.3.0" + gs1_barcode_parser: + dependency: "direct main" + description: + name: gs1_barcode_parser + sha256: ff171bc40038de3f7178fbc32eaf9eebc3d35a3c4c00bb0281fe4a976d853a42 + url: "https://pub.dev" + source: hosted + version: "1.1.0" + horizontal_data_table: + dependency: transitive + description: + name: horizontal_data_table + sha256: c8ab5256bbced698a729f3e0ff2cb0e8e97416cdbb082860370eaf883badf722 + url: "https://pub.dev" + source: hosted + version: "4.3.1" + html: + dependency: transitive + description: + name: html + sha256: "1fc58edeaec4307368c60d59b7e15b9d658b57d7f3125098b6294153c75337ec" + url: "https://pub.dev" + source: hosted + version: "0.15.5" + http: + dependency: transitive + description: + name: http + sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 + url: "https://pub.dev" + source: hosted + version: "1.2.2" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" + url: "https://pub.dev" + source: hosted + version: "3.2.1" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" + source: hosted + version: "4.0.2" + image_picker: + dependency: transitive + description: + name: image_picker + sha256: "1f498d086203360cca099d20ffea2963f48c39ce91bdd8a3b6d4a045786b02c8" + url: "https://pub.dev" + source: hosted + version: "1.0.8" + image_picker_android: + dependency: transitive + description: + name: image_picker_android + sha256: "844c6da4e4f2829dffdab97816bca09d0e0977e8dcef7450864aba4e07967a58" + url: "https://pub.dev" + source: hosted + version: "0.8.9+6" + image_picker_for_web: + dependency: transitive + description: + name: image_picker_for_web + sha256: e2423c53a68b579a7c37a1eda967b8ae536c3d98518e5db95ca1fe5719a730a3 + url: "https://pub.dev" + source: hosted + version: "3.0.2" + image_picker_ios: + dependency: transitive + description: + name: image_picker_ios + sha256: fadafce49e8569257a0cad56d24438a6fa1f0cbd7ee0af9b631f7492818a4ca3 + url: "https://pub.dev" + source: hosted + version: "0.8.9+1" + image_picker_linux: + dependency: transitive + description: + name: image_picker_linux + sha256: "4ed1d9bb36f7cd60aa6e6cd479779cc56a4cb4e4de8f49d487b1aaad831300fa" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + image_picker_macos: + dependency: transitive + description: + name: image_picker_macos + sha256: "3f5ad1e8112a9a6111c46d0b57a7be2286a9a07fc6e1976fdf5be2bd31d4ff62" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + image_picker_platform_interface: + dependency: transitive + description: + name: image_picker_platform_interface + sha256: fa4e815e6fcada50e35718727d83ba1c92f1edf95c0b4436554cec301b56233b + url: "https://pub.dev" + source: hosted + version: "2.9.3" + image_picker_windows: + dependency: transitive + description: + name: image_picker_windows + sha256: "6ad07afc4eb1bc25f3a01084d28520496c4a3bb0cb13685435838167c9dcedeb" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + intl: + dependency: "direct main" + description: + name: intl + sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf + url: "https://pub.dev" + source: hosted + version: "0.19.0" + io: + dependency: transitive + description: + name: io + sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" + url: "https://pub.dev" + source: hosted + version: "1.0.4" + isar: + dependency: transitive + description: + name: isar + sha256: "99165dadb2cf2329d3140198363a7e7bff9bbd441871898a87e26914d25cf1ea" + url: "https://pub.dev" + source: hosted + version: "3.1.0+1" + isar_flutter_libs: + dependency: transitive + description: + name: isar_flutter_libs + sha256: bc6768cc4b9c61aabff77152e7f33b4b17d2fc93134f7af1c3dd51500fe8d5e8 + url: "https://pub.dev" + source: hosted + version: "3.1.0+1" + isar_generator: + dependency: "direct dev" + description: + name: isar_generator + sha256: "76c121e1295a30423604f2f819bc255bc79f852f3bc8743a24017df6068ad133" + url: "https://pub.dev" + source: hosted + version: "3.1.0+1" + js: + dependency: transitive + description: + name: js + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 + url: "https://pub.dev" + source: hosted + version: "0.6.7" + json_annotation: + dependency: transitive + description: + name: json_annotation + sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" + url: "https://pub.dev" + source: hosted + version: "4.9.0" + json_serializable: + dependency: "direct dev" + description: + name: json_serializable + sha256: ea1432d167339ea9b5bb153f0571d0039607a873d6e04e0117af043f14a1fd4b + url: "https://pub.dev" + source: hosted + version: "6.8.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + url: "https://pub.dev" + source: hosted + version: "10.0.4" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + url: "https://pub.dev" + source: hosted + version: "3.0.3" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" + lints: + dependency: transitive + description: + name: lints + sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290 + url: "https://pub.dev" + source: hosted + version: "3.0.0" + location: + dependency: "direct main" + description: + name: location + sha256: "37ffdadcd4b1498b769824f45ebb4de8ed46663a4a67ac27b33a590ee486579f" + url: "https://pub.dev" + source: hosted + version: "6.0.2" + location_platform_interface: + dependency: transitive + description: + name: location_platform_interface + sha256: "2ecde6bb0f88032b0bbbde37e18975b4468711dd92619c2235cc0c0ee93b4b8e" + url: "https://pub.dev" + source: hosted + version: "4.0.0" + location_web: + dependency: transitive + description: + name: location_web + sha256: "49dda13d415c4603c5775a33fb22f575e0aa3f0ec2916644ddcd722db31ee884" + url: "https://pub.dev" + source: hosted + version: "5.0.2" + logging: + dependency: transitive + description: + name: logging + sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + lottie: + dependency: transitive + description: + name: lottie + sha256: "7afc60865a2429d994144f7d66ced2ae4305fe35d82890b8766e3359872d872c" + url: "https://pub.dev" + source: hosted + version: "3.1.3" + matcher: + dependency: transitive + description: + name: matcher + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + url: "https://pub.dev" + source: hosted + version: "0.12.16+1" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + url: "https://pub.dev" + source: hosted + version: "0.8.0" + meta: + dependency: transitive + description: + name: meta + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" + url: "https://pub.dev" + source: hosted + version: "1.12.0" + mime: + dependency: transitive + description: + name: mime + sha256: "801fd0b26f14a4a58ccb09d5892c3fbdeff209594300a542492cf13fba9d247a" + url: "https://pub.dev" + source: hosted + version: "1.0.6" + mocktail: + dependency: "direct dev" + description: + name: mocktail + sha256: "890df3f9688106f25755f26b1c60589a92b3ab91a22b8b224947ad041bf172d8" + url: "https://pub.dev" + source: hosted + version: "1.0.4" + nested: + dependency: transitive + description: + name: nested + sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20" + url: "https://pub.dev" + source: hosted + version: "1.0.0" + node_preamble: + dependency: transitive + description: + name: node_preamble + sha256: "6e7eac89047ab8a8d26cf16127b5ed26de65209847630400f9aefd7cd5c730db" + url: "https://pub.dev" + source: hosted + version: "2.0.2" + overlay_builder: + dependency: "direct main" + description: + name: overlay_builder + sha256: "58b97bc5f67a2e2bb7006dd88e697ac757dfffc9dbd1e7dfc1917fb510a4b5c8" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + package_config: + dependency: transitive + description: + name: package_config + sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + package_info_plus: + dependency: "direct main" + description: + name: package_info_plus + sha256: a75164ade98cb7d24cfd0a13c6408927c6b217fa60dee5a7ff5c116a58f28918 + url: "https://pub.dev" + source: hosted + version: "8.0.2" + package_info_plus_platform_interface: + dependency: transitive + description: + name: package_info_plus_platform_interface + sha256: ac1f4a4847f1ade8e6a87d1f39f5d7c67490738642e2542f559ec38c37489a66 + url: "https://pub.dev" + source: hosted + version: "3.0.1" + path: + dependency: "direct main" + description: + name: path + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + url: "https://pub.dev" + source: hosted + version: "1.9.0" + path_drawing: + dependency: transitive + description: + name: path_drawing + sha256: bbb1934c0cbb03091af082a6389ca2080345291ef07a5fa6d6e078ba8682f977 + url: "https://pub.dev" + source: hosted + version: "1.0.1" + path_parsing: + dependency: transitive + description: + name: path_parsing + sha256: e3e67b1629e6f7e8100b367d3db6ba6af4b1f0bb80f64db18ef1fbabd2fa9ccf + url: "https://pub.dev" + source: hosted + version: "1.0.1" + path_provider: + dependency: "direct main" + description: + name: path_provider + sha256: fec0d61223fba3154d87759e3cc27fe2c8dc498f6386c6d6fc80d1afdd1bf378 + url: "https://pub.dev" + source: hosted + version: "2.1.4" + path_provider_android: + dependency: transitive + description: + name: path_provider_android + sha256: a248d8146ee5983446bf03ed5ea8f6533129a12b11f12057ad1b4a67a2b3b41d + url: "https://pub.dev" + source: hosted + version: "2.2.4" + path_provider_foundation: + dependency: transitive + description: + name: path_provider_foundation + sha256: "5a7999be66e000916500be4f15a3633ebceb8302719b47b9cc49ce924125350f" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + path_provider_linux: + dependency: transitive + description: + name: path_provider_linux + sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 + url: "https://pub.dev" + source: hosted + version: "2.2.1" + path_provider_platform_interface: + dependency: transitive + description: + name: path_provider_platform_interface + sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + path_provider_windows: + dependency: transitive + description: + name: path_provider_windows + sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 + url: "https://pub.dev" + source: hosted + version: "2.3.0" + petitparser: + dependency: transitive + description: + name: petitparser + sha256: cb3798bef7fc021ac45b308f4b51208a152792445cce0448c9a4ba5879dd8750 + url: "https://pub.dev" + source: hosted + version: "5.4.0" + platform: + dependency: transitive + description: + name: platform + sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" + url: "https://pub.dev" + source: hosted + version: "3.1.5" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" + url: "https://pub.dev" + source: hosted + version: "2.1.8" + pluto_grid: + dependency: "direct main" + description: + name: pluto_grid + sha256: "1d4cd9d2652742b556aa9b3230cc64672a3f63c34a9acc80fef794ab36ad903b" + url: "https://pub.dev" + source: hosted + version: "8.0.0" + pool: + dependency: transitive + description: + name: pool + sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" + url: "https://pub.dev" + source: hosted + version: "1.5.1" + provider: + dependency: transitive + description: + name: provider + sha256: c8a055ee5ce3fd98d6fc872478b03823ffdb448699c6ebdbbc71d59b596fd48c + url: "https://pub.dev" + source: hosted + version: "6.1.2" + pub_semver: + dependency: transitive + description: + name: pub_semver + sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + pubspec_parse: + dependency: transitive + description: + name: pubspec_parse + sha256: c799b721d79eb6ee6fa56f00c04b472dcd44a30d258fac2174a6ec57302678f8 + url: "https://pub.dev" + source: hosted + version: "1.3.0" + reactive_forms: + dependency: "direct main" + description: + name: reactive_forms + sha256: "9b1fb18e0aae9c50cfa0aaabaaa38bc4d78eefc9b7b95fa9c947b051f6524b8e" + url: "https://pub.dev" + source: hosted + version: "17.0.1" + recase: + dependency: "direct main" + description: + name: recase + sha256: e4eb4ec2dcdee52dcf99cb4ceabaffc631d7424ee55e56f280bc039737f89213 + url: "https://pub.dev" + source: hosted + version: "4.1.0" + registration_delivery: + dependency: "direct main" + description: + name: registration_delivery + sha256: "8f6843cb5e1acd5e44026b663a28e80086e791107b9131487c7e3a38e43b1229" + url: "https://pub.dev" + source: hosted + version: "1.0.5" + rxdart: + dependency: transitive + description: + name: rxdart + sha256: "0c7c0cedd93788d996e33041ffecda924cc54389199cde4e6a34b440f50044cb" + url: "https://pub.dev" + source: hosted + version: "0.27.7" + shelf: + dependency: transitive + description: + name: shelf + sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 + url: "https://pub.dev" + source: hosted + version: "1.4.1" + shelf_packages_handler: + dependency: transitive + description: + name: shelf_packages_handler + sha256: "89f967eca29607c933ba9571d838be31d67f53f6e4ee15147d5dc2934fee1b1e" + url: "https://pub.dev" + source: hosted + version: "3.0.2" + shelf_static: + dependency: transitive + description: + name: shelf_static + sha256: a41d3f53c4adf0f57480578c1d61d90342cd617de7fc8077b1304643c2d85c1e + url: "https://pub.dev" + source: hosted + version: "1.1.2" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" + url: "https://pub.dev" + source: hosted + version: "1.0.4" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.99" + source_gen: + dependency: transitive + description: + name: source_gen + sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832" + url: "https://pub.dev" + source: hosted + version: "1.5.0" + source_helper: + dependency: transitive + description: + name: source_helper + sha256: "6adebc0006c37dd63fe05bca0a929b99f06402fc95aa35bf36d67f5c06de01fd" + url: "https://pub.dev" + source: hosted + version: "1.3.4" + source_map_stack_trace: + dependency: transitive + description: + name: source_map_stack_trace + sha256: "84cf769ad83aa6bb61e0aa5a18e53aea683395f196a6f39c4c881fb90ed4f7ae" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + source_maps: + dependency: transitive + description: + name: source_maps + sha256: "708b3f6b97248e5781f493b765c3337db11c5d2c81c3094f10904bfa8004c703" + url: "https://pub.dev" + source: hosted + version: "0.10.12" + source_span: + dependency: transitive + description: + name: source_span + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" + source: hosted + version: "1.10.0" + sprintf: + dependency: transitive + description: + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" + url: "https://pub.dev" + source: hosted + version: "7.0.0" + sqlite3: + dependency: transitive + description: + name: sqlite3 + sha256: "072128763f1547e3e9b4735ce846bfd226d68019ccda54db4cd427b12dfdedc9" + url: "https://pub.dev" + source: hosted + version: "2.4.0" + sqlite3_flutter_libs: + dependency: "direct main" + description: + name: sqlite3_flutter_libs + sha256: "62bbb4073edbcdf53f40c80775f33eea01d301b7b81417e5b3fb7395416258c1" + url: "https://pub.dev" + source: hosted + version: "0.5.24" + sqlparser: + dependency: transitive + description: + name: sqlparser + sha256: ade9a67fd70d0369329ed3373208de7ebd8662470e8c396fc8d0d60f9acdfc9f + url: "https://pub.dev" + source: hosted + version: "0.36.0" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + url: "https://pub.dev" + source: hosted + version: "1.11.1" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + url: "https://pub.dev" + source: hosted + version: "2.1.2" + stream_transform: + dependency: "direct main" + description: + name: stream_transform + sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + survey_form: + dependency: transitive + description: + name: survey_form + sha256: "5e3a08570fe8c97d7dfd0bc6f28b2ae829e2fe66ce987504920c20d091c47c19" + url: "https://pub.dev" + source: hosted + version: "1.0.0" + synchronized: + dependency: transitive + description: + name: synchronized + sha256: "539ef412b170d65ecdafd780f924e5be3f60032a1128df156adad6c5b373d558" + url: "https://pub.dev" + source: hosted + version: "3.1.0+1" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" + source: hosted + version: "1.2.1" + test: + dependency: transitive + description: + name: test + sha256: "7ee446762c2c50b3bd4ea96fe13ffac69919352bd3b4b17bac3f3465edc58073" + url: "https://pub.dev" + source: hosted + version: "1.25.2" + test_api: + dependency: transitive + description: + name: test_api + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" + url: "https://pub.dev" + source: hosted + version: "0.7.0" + test_core: + dependency: transitive + description: + name: test_core + sha256: "2bc4b4ecddd75309300d8096f781c0e3280ca1ef85beda558d33fcbedc2eead4" + url: "https://pub.dev" + source: hosted + version: "0.6.0" + time: + dependency: transitive + description: + name: time + sha256: "370572cf5d1e58adcb3e354c47515da3f7469dac3a95b447117e728e7be6f461" + url: "https://pub.dev" + source: hosted + version: "2.1.5" + timing: + dependency: transitive + description: + name: timing + sha256: "70a3b636575d4163c477e6de42f247a23b315ae20e86442bebe32d3cabf61c32" + url: "https://pub.dev" + source: hosted + version: "1.0.1" + type_plus: + dependency: transitive + description: + name: type_plus + sha256: d5d1019471f0d38b91603adb9b5fd4ce7ab903c879d2fbf1a3f80a630a03fcc9 + url: "https://pub.dev" + source: hosted + version: "2.1.1" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + url: "https://pub.dev" + source: hosted + version: "1.3.2" + universal_html: + dependency: transitive + description: + name: universal_html + sha256: "56536254004e24d9d8cfdb7dbbf09b74cf8df96729f38a2f5c238163e3d58971" + url: "https://pub.dev" + source: hosted + version: "2.2.4" + universal_io: + dependency: transitive + description: + name: universal_io + sha256: "1722b2dcc462b4b2f3ee7d188dad008b6eb4c40bbd03a3de451d82c78bba9aad" + url: "https://pub.dev" + source: hosted + version: "2.2.2" + url_launcher: + dependency: transitive + description: + name: url_launcher + sha256: "21b704ce5fa560ea9f3b525b43601c678728ba46725bab9b01187b4831377ed3" + url: "https://pub.dev" + source: hosted + version: "6.3.0" + url_launcher_android: + dependency: transitive + description: + name: url_launcher_android + sha256: "17cd5e205ea615e2c6ea7a77323a11712dffa0720a8a90540db57a01347f9ad9" + url: "https://pub.dev" + source: hosted + version: "6.3.2" + url_launcher_ios: + dependency: transitive + description: + name: url_launcher_ios + sha256: "75bb6fe3f60070407704282a2d295630cab232991eb52542b18347a8a941df03" + url: "https://pub.dev" + source: hosted + version: "6.2.4" + url_launcher_linux: + dependency: transitive + description: + name: url_launcher_linux + sha256: ab360eb661f8879369acac07b6bb3ff09d9471155357da8443fd5d3cf7363811 + url: "https://pub.dev" + source: hosted + version: "3.1.1" + url_launcher_macos: + dependency: transitive + description: + name: url_launcher_macos + sha256: "9a1a42d5d2d95400c795b2914c36fdcb525870c752569438e4ebb09a2b5d90de" + url: "https://pub.dev" + source: hosted + version: "3.2.0" + url_launcher_platform_interface: + dependency: transitive + description: + name: url_launcher_platform_interface + sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + url_launcher_web: + dependency: transitive + description: + name: url_launcher_web + sha256: "772638d3b34c779ede05ba3d38af34657a05ac55b06279ea6edd409e323dca8e" + url: "https://pub.dev" + source: hosted + version: "2.3.3" + url_launcher_windows: + dependency: transitive + description: + name: url_launcher_windows + sha256: "49c10f879746271804767cb45551ec5592cdab00ee105c06dddde1a98f73b185" + url: "https://pub.dev" + source: hosted + version: "3.1.2" + uuid: + dependency: "direct main" + description: + name: uuid + sha256: a5be9ef6618a7ac1e964353ef476418026db906c4facdedaa299b7a2e71690ff + url: "https://pub.dev" + source: hosted + version: "4.5.1" + vector_graphics: + dependency: transitive + description: + name: vector_graphics + sha256: "32c3c684e02f9bc0afb0ae0aa653337a2fe022e8ab064bcd7ffda27a74e288e3" + url: "https://pub.dev" + source: hosted + version: "1.1.11+1" + vector_graphics_codec: + dependency: transitive + description: + name: vector_graphics_codec + sha256: c86987475f162fadff579e7320c7ddda04cd2fdeffbe1129227a85d9ac9e03da + url: "https://pub.dev" + source: hosted + version: "1.1.11+1" + vector_graphics_compiler: + dependency: transitive + description: + name: vector_graphics_compiler + sha256: "12faff3f73b1741a36ca7e31b292ddeb629af819ca9efe9953b70bd63fc8cd81" + url: "https://pub.dev" + source: hosted + version: "1.1.11+1" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + visibility_detector: + dependency: transitive + description: + name: visibility_detector + sha256: dd5cc11e13494f432d15939c3aa8ae76844c42b723398643ce9addb88a5ed420 + url: "https://pub.dev" + source: hosted + version: "0.4.0+2" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" + url: "https://pub.dev" + source: hosted + version: "14.2.1" + watcher: + dependency: transitive + description: + name: watcher + sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + web: + dependency: transitive + description: + name: web + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" + url: "https://pub.dev" + source: hosted + version: "0.5.1" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b + url: "https://pub.dev" + source: hosted + version: "2.4.0" + webkit_inspection_protocol: + dependency: transitive + description: + name: webkit_inspection_protocol + sha256: "87d3f2333bb240704cd3f1c6b5b7acd8a10e7f0bc28c28dcf14e782014f4a572" + url: "https://pub.dev" + source: hosted + version: "1.2.1" + win32: + dependency: transitive + description: + name: win32 + sha256: "464f5674532865248444b4c3daca12bd9bf2d7c47f759ce2617986e7229494a8" + url: "https://pub.dev" + source: hosted + version: "5.2.0" + xdg_directories: + dependency: transitive + description: + name: xdg_directories + sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d + url: "https://pub.dev" + source: hosted + version: "1.0.4" + xml: + dependency: transitive + description: + name: xml + sha256: "5bc72e1e45e941d825fd7468b9b4cc3b9327942649aeb6fc5cdbf135f0a86e84" + url: "https://pub.dev" + source: hosted + version: "6.3.0" + xxh3: + dependency: transitive + description: + name: xxh3 + sha256: "399a0438f5d426785723c99da6b16e136f4953fb1e9db0bf270bd41dd4619916" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + yaml: + dependency: transitive + description: + name: yaml + sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" + url: "https://pub.dev" + source: hosted + version: "3.1.2" +sdks: + dart: ">=3.4.0 <3.9.0" + flutter: ">=3.22.0" diff --git a/packages/closed_household/pubspec.yaml b/packages/closed_household/pubspec.yaml index 6dccba824..27394bd01 100644 --- a/packages/closed_household/pubspec.yaml +++ b/packages/closed_household/pubspec.yaml @@ -1,6 +1,6 @@ name: closed_household description: This package enables health facility workers to mark household closed and update. -version: 1.0.1+1 +version: 1.0.3 homepage: https://github.com/egovernments/health-campaign-field-worker-app/tree/develop/packages/closed_household repository: https://github.com/egovernments/health-campaign-field-worker-app @@ -11,14 +11,13 @@ environment: dependencies: flutter: sdk: flutter - digit_components: ^1.0.1+1 + digit_ui_components: ^0.0.2-dev.4 flutter_bloc: ^8.1.1 freezed_annotation: ^2.1.0 - build_runner: ^2.2.1 - reactive_forms: ^14.1.0 + reactive_forms: ^17.0.0 fluttertoast: ^8.1.2 overlay_builder: ^1.1.0 - intl: ^0.18.0 + intl: ^0.19.0 flutter_svg: ^2.0.8 dart_mappable: ^4.2.0 drift: ^2.0.0 @@ -26,28 +25,28 @@ dependencies: path_provider: ^2.0.11 path: ^1.8.2 drift_db_viewer: ^2.0.0 - uuid: ^3.0.6 + uuid: ^4.4.0 recase: ^4.1.0 - pluto_grid: ^7.0.1 - digit_scanner: ^1.0.2 + pluto_grid: ^8.0.0 + digit_scanner: ^1.0.4 gs1_barcode_parser: ^1.0.5 - auto_route: ^7.8.4 - digit_data_model: ^1.0.3+1 - package_info_plus: ^5.0.1 + auto_route: ^8.1.3 + digit_data_model: ^1.0.5 + package_info_plus: ^8.0.0 digit_showcase: ^1.0.0 collection: ^1.16.0 flutter_keyboard_visibility: ^5.4.0 stream_transform: ^2.1.0 async: ^2.11.0 formula_parser: ^2.0.1 - registration_delivery: ^1.0.3+1 + registration_delivery: ^1.0.5 + location: ^6.0.2 dev_dependencies: flutter_test: sdk: flutter flutter_lints: ^3.0.1 - dart_code_metrics: ^5.7.6 freezed: ^2.1.0+1 json_serializable: ^6.4.0 drift_dev: ^2.14.1 @@ -56,9 +55,11 @@ dev_dependencies: dart_mappable_builder: git: url: https://github.com/egovernments/health-campaign-field-worker-app/ - ref: master + ref: 1.6-final-dev path: ./packages/dart_mappable_builder - auto_route_generator: ^7.3.2 + auto_route_generator: ^8.0.0 + build_runner: ^2.4.11 + isar_generator: ^3.1.0+1 flutter: assets: diff --git a/packages/complaints/.gitignore b/packages/complaints/.gitignore new file mode 100644 index 000000000..a68ac422a --- /dev/null +++ b/packages/complaints/.gitignore @@ -0,0 +1,28 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. +**/doc/api/ +.dart_tool/ +build/ diff --git a/packages/complaints/.metadata b/packages/complaints/.metadata new file mode 100644 index 000000000..b2c661a57 --- /dev/null +++ b/packages/complaints/.metadata @@ -0,0 +1,10 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "67457e669f79e9f8d13d7a68fe09775fefbb79f4" + channel: "stable" + +project_type: package diff --git a/packages/complaints/CHANGELOG.md b/packages/complaints/CHANGELOG.md new file mode 100644 index 000000000..215f5481b --- /dev/null +++ b/packages/complaints/CHANGELOG.md @@ -0,0 +1,15 @@ +## 1.0.0 + +* Upgrade to Flutter 3.22 +* Updated digit_data_model to latest version + +## 0.0.1-dev.1 + +* Migrated to digit_ui_components +* Updated digit_data_model to latest version + +## 0.0.1-dev.1 + +* Moved pgr models, blocs, local remote repository from digit_data_model +* Updated digit_data_model +* PGR Complaints Initial Release \ No newline at end of file diff --git a/packages/complaints/LICENSE b/packages/complaints/LICENSE new file mode 100644 index 000000000..f7d7ac958 --- /dev/null +++ b/packages/complaints/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 eGovernments Foundation + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/packages/complaints/README.md b/packages/complaints/README.md new file mode 100644 index 000000000..5593a8162 --- /dev/null +++ b/packages/complaints/README.md @@ -0,0 +1,50 @@ +Complaints package helps people to file complaints , they can provide Complaint type , location and details about the Complaint. + +## Features + +- **Complaints Pages**: The package includes several pages like `complaints_type.dart`, `complaints_location.dart`, `complaints_details.dart` that provide the user interface for Filing Complaint. + + + + + + + +- **Complaints Blocs**: It provides various BLoCs Like `ComplaintsInboxBloc`,`ComplaintsRegistrationBloc` for state management using the BLoC pattern. These BLoCs handle the business logic for Filing Complaints. +- **Complaints Models**: It defines various data models like `PgrAddressModel`, `PgrComplaintModel`, `PgrServiceModel` etc. used in the attendance management process. +- **Complaints Repositories**: The package provides abstract classes for data repositories, `PgrServiceLocalRepository`, `PgrServiceRemoteRepository`, which can be extended to create repositories for different complaint models. + + +## Getting started + +To use this package, add the following dependency to your `pubspec.yaml` file: + +```yaml +dependencies: + complaints: ^any +``` + +## Usage + + +To Navigate to any screens of the package: + +First add complaint_router to your main app router + +Navigate to the required screen using the below code: + +```dart +context.router.push(ComplaintsInboxWrapperRoute()), +``` + +Complaints package requires below data to be passed from main app: + +```dart + String? tenantId; + String? loggedInUserUuid; + String? userMobileNumber; + String? loggedInUserName; + List? complaintTypes; + String? userName; +``` + diff --git a/packages/complaints/analysis_options.yaml b/packages/complaints/analysis_options.yaml new file mode 100644 index 000000000..a5744c1cf --- /dev/null +++ b/packages/complaints/analysis_options.yaml @@ -0,0 +1,4 @@ +include: package:flutter_lints/flutter.yaml + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/packages/complaints/assets/animated_json/alert.json b/packages/complaints/assets/animated_json/alert.json new file mode 100644 index 000000000..171b416cd --- /dev/null +++ b/packages/complaints/assets/animated_json/alert.json @@ -0,0 +1,1127 @@ +{ + "nm": "48 - Warning", + "ddd": 0, + "h": 500, + "w": 500, + "meta": { + "g": "LottieFiles AE " + }, + "layers": [ + { + "ty": 3, + "nm": "48 - Warning", + "sr": 1, + "st": 0, + "op": 144, + "ip": 0, + "hd": false, + "ddd": 0, + "bm": 0, + "hasMask": false, + "ao": 0, + "ks": { + "a": { + "a": 0, + "k": [ + 60, + 60, + 0 + ], + "ix": 1 + }, + "s": { + "a": 0, + "k": [ + 180, + 180, + 100 + ], + "ix": 6 + }, + "sk": { + "a": 0, + "k": 0 + }, + "p": { + "a": 0, + "k": [ + 250.045, + 290.339, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 10 + }, + "sa": { + "a": 0, + "k": 0 + }, + "o": { + "a": 0, + "k": 0, + "ix": 11 + } + }, + "ef": [], + "ind": 1 + }, + { + "ty": 4, + "nm": "Line", + "sr": 1, + "st": 0, + "op": 144, + "ip": 12, + "hd": false, + "ddd": 0, + "bm": 0, + "hasMask": false, + "ao": 0, + "ks": { + "a": { + "a": 0, + "k": [ + -1, + 21.25, + 0 + ], + "ix": 1 + }, + "s": { + "a": 1, + "k": [ + { + "o": { + "x": 0.167, + "y": 0.167 + }, + "i": { + "x": 0, + "y": 1 + }, + "s": [ + 0, + 0, + 100 + ], + "t": 12 + }, + { + "s": [ + 55.556, + 55.556, + 100 + ], + "t": 32 + } + ], + "ix": 6 + }, + "sk": { + "a": 0, + "k": 0 + }, + "p": { + "a": 0, + "k": [ + 85.533, + 85.887, + 0 + ], + "ix": 2 + }, + "r": { + "a": 1, + "k": [ + { + "o": { + "x": 0.167, + "y": 0.167 + }, + "i": { + "x": 0, + "y": 1 + }, + "s": [ + 180 + ], + "t": 12 + }, + { + "s": [ + 0 + ], + "t": 32 + } + ], + "ix": 10 + }, + "sa": { + "a": 0, + "k": 0 + }, + "o": { + "a": 0, + "k": 100, + "ix": 11 + } + }, + "ef": [], + "shapes": [ + { + "ty": "gr", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Group", + "nm": "Shape 1", + "ix": 1, + "cix": 2, + "np": 3, + "it": [ + { + "ty": "sh", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Shape - Group", + "nm": "Path 1", + "ix": 1, + "d": 1, + "ks": { + "a": 0, + "k": { + "c": false, + "i": [ + [ + 0, + 0 + ], + [ + 0, + 0 + ] + ], + "o": [ + [ + 0, + 0 + ], + [ + 0, + 0 + ] + ], + "v": [ + [ + -1, + 80 + ], + [ + -1, + -37.5 + ] + ] + }, + "ix": 2 + } + }, + { + "ty": "st", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Graphic - Stroke", + "nm": "Stroke 1", + "lc": 2, + "lj": 1, + "ml": 4, + "o": { + "a": 0, + "k": 100, + "ix": 4 + }, + "w": { + "a": 0, + "k": 28, + "ix": 5 + }, + "c": { + "a": 0, + "k": [ + 1, + 1, + 1 + ], + "ix": 3 + } + }, + { + "ty": "tr", + "a": { + "a": 0, + "k": [ + 0, + 0 + ], + "ix": 1 + }, + "s": { + "a": 0, + "k": [ + 100, + 100 + ], + "ix": 3 + }, + "sk": { + "a": 0, + "k": 0, + "ix": 4 + }, + "p": { + "a": 0, + "k": [ + 0, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 6 + }, + "sa": { + "a": 0, + "k": 0, + "ix": 5 + }, + "o": { + "a": 0, + "k": 100, + "ix": 7 + } + } + ] + }, + { + "ty": "tm", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Filter - Trim", + "nm": "Trim Paths 1", + "ix": 2, + "e": { + "a": 0, + "k": 100, + "ix": 2 + }, + "o": { + "a": 0, + "k": 0, + "ix": 3 + }, + "s": { + "a": 1, + "k": [ + { + "o": { + "x": 0.167, + "y": 0.167 + }, + "i": { + "x": 0, + "y": 1 + }, + "s": [ + 0 + ], + "t": 22 + }, + { + "s": [ + 40 + ], + "t": 42 + } + ], + "ix": 1 + }, + "m": 1 + } + ], + "ind": 2, + "parent": 5 + }, + { + "ty": 4, + "nm": "Dot", + "sr": 1, + "st": 0, + "op": 144, + "ip": 12, + "hd": false, + "ddd": 0, + "bm": 0, + "hasMask": false, + "ao": 0, + "ks": { + "a": { + "a": 0, + "k": [ + 0, + 0, + 0 + ], + "ix": 1 + }, + "s": { + "a": 0, + "k": [ + 100, + 100, + 100 + ], + "ix": 6 + }, + "sk": { + "a": 0, + "k": 0 + }, + "p": { + "a": 0, + "k": [ + 0, + 0, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 10 + }, + "sa": { + "a": 0, + "k": 0 + }, + "o": { + "a": 0, + "k": 100, + "ix": 11 + } + }, + "ef": [], + "shapes": [ + { + "ty": "gr", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Group", + "nm": "Shape 1", + "ix": 1, + "cix": 2, + "np": 4, + "it": [ + { + "ty": "sh", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Shape - Group", + "nm": "Path 1", + "ix": 1, + "d": 1, + "ks": { + "a": 0, + "k": { + "c": false, + "i": [ + [ + 0, + 0 + ], + [ + 0, + 0 + ] + ], + "o": [ + [ + 0, + 0 + ], + [ + 0, + 0 + ] + ], + "v": [ + [ + -1, + 80 + ], + [ + -1, + -37.5 + ] + ] + }, + "ix": 2 + } + }, + { + "ty": "tm", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Filter - Trim", + "nm": "Trim Paths 1", + "ix": 2, + "e": { + "a": 0, + "k": 0.1, + "ix": 2 + }, + "o": { + "a": 0, + "k": 0, + "ix": 3 + }, + "s": { + "a": 0, + "k": 0, + "ix": 1 + }, + "m": 1 + }, + { + "ty": "st", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Graphic - Stroke", + "nm": "Stroke 1", + "lc": 2, + "lj": 1, + "ml": 4, + "o": { + "a": 0, + "k": 100, + "ix": 4 + }, + "w": { + "a": 0, + "k": 33, + "ix": 5 + }, + "c": { + "a": 0, + "k": [ + 1, + 1, + 1 + ], + "ix": 3 + } + }, + { + "ty": "tr", + "a": { + "a": 0, + "k": [ + 0, + 0 + ], + "ix": 1 + }, + "s": { + "a": 0, + "k": [ + 100, + 100 + ], + "ix": 3 + }, + "sk": { + "a": 0, + "k": 0, + "ix": 4 + }, + "p": { + "a": 0, + "k": [ + 0, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 6 + }, + "sa": { + "a": 0, + "k": 0, + "ix": 5 + }, + "o": { + "a": 0, + "k": 100, + "ix": 7 + } + } + ] + } + ], + "ind": 3, + "parent": 2 + }, + { + "ty": 4, + "nm": "Tri Outlines", + "sr": 1, + "st": 0, + "op": 144, + "ip": 10, + "hd": false, + "ddd": 0, + "bm": 0, + "hasMask": false, + "ao": 0, + "ks": { + "a": { + "a": 0, + "k": [ + 85.513, + 72.848, + 0 + ], + "ix": 1 + }, + "s": { + "a": 1, + "k": [ + { + "o": { + "x": 0.167, + "y": 0.167 + }, + "i": { + "x": 0.833, + "y": 0.833 + }, + "s": [ + 0, + 0, + 100 + ], + "t": 10 + }, + { + "s": [ + 100, + 100, + 100 + ], + "t": 15 + } + ], + "ix": 6, + "x": "var $bm_rt;\nvar amp, freq, decay, n, t, v;\ntry {\n amp = $bm_div(effect('Scale - Overshoot')('ADBE Slider Control-0001'), 2.5), freq = $bm_div(effect('Scale - Bounce')('ADBE Slider Control-0001'), 20), decay = $bm_div(effect('Scale - Friction')('ADBE Slider Control-0001'), 20), n = 0, 0 < numKeys && (n = nearestKey(time).index, key(n).time > time && n--), t = 0 === n ? 0 : $bm_sub(time, key(n).time), $bm_rt = 0 < n ? (v = velocityAtTime($bm_sub(key(n).time, $bm_div(thisComp.frameDuration, 10))), $bm_sum(value, $bm_div($bm_mul($bm_mul($bm_div(v, 100), amp), Math.sin($bm_mul($bm_mul($bm_mul(freq, t), 2), Math.PI))), Math.exp($bm_mul(decay, t))))) : value;\n} catch (e$$4) {\n $bm_rt = value = value;\n}" + }, + "sk": { + "a": 0, + "k": 0 + }, + "p": { + "a": 0, + "k": [ + 59.955, + 37.467, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 10 + }, + "sa": { + "a": 0, + "k": 0 + }, + "o": { + "a": 0, + "k": 100, + "ix": 11 + } + }, + "ef": [ + { + "ty": 5, + "mn": "ADBE Slider Control", + "nm": "Scale - Overshoot", + "ix": 1, + "en": 1, + "ef": [ + { + "ty": 0, + "mn": "ADBE Slider Control-0001", + "nm": "Slider", + "ix": 1, + "v": { + "a": 0, + "k": 10, + "ix": 1, + "x": "var $bm_rt;\n$bm_rt = clamp(value, 0, 100);" + } + } + ] + }, + { + "ty": 5, + "mn": "ADBE Slider Control", + "nm": "Scale - Bounce", + "ix": 2, + "en": 1, + "ef": [ + { + "ty": 0, + "mn": "ADBE Slider Control-0001", + "nm": "Slider", + "ix": 1, + "v": { + "a": 0, + "k": 35, + "ix": 1, + "x": "var $bm_rt;\n$bm_rt = clamp(value, 0, 100);" + } + } + ] + }, + { + "ty": 5, + "mn": "ADBE Slider Control", + "nm": "Scale - Friction", + "ix": 3, + "en": 1, + "ef": [ + { + "ty": 0, + "mn": "ADBE Slider Control-0001", + "nm": "Slider", + "ix": 1, + "v": { + "a": 0, + "k": 65, + "ix": 1, + "x": "var $bm_rt;\n$bm_rt = clamp(value, 0, 100);" + } + } + ] + } + ], + "shapes": [ + { + "ty": "gr", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Group", + "nm": "Group 1", + "ix": 1, + "cix": 2, + "np": 2, + "it": [ + { + "ty": "sh", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Shape - Group", + "nm": "Path 1", + "ix": 1, + "d": 1, + "ks": { + "a": 0, + "k": { + "c": true, + "i": [ + [ + -3.315, + 5.634 + ], + [ + 0, + 0 + ], + [ + -3.267, + -5.554 + ], + [ + 0, + 0 + ], + [ + 6.537, + 0 + ], + [ + 0, + 0 + ] + ], + "o": [ + [ + 0, + 0 + ], + [ + 3.268, + -5.554 + ], + [ + 0, + 0 + ], + [ + 3.315, + 5.634 + ], + [ + 0, + 0 + ], + [ + -6.536, + 0 + ] + ], + "v": [ + [ + -81.948, + 59.861 + ], + [ + -7.284, + -67.044 + ], + [ + 7.284, + -67.044 + ], + [ + 81.948, + 59.861 + ], + [ + 74.664, + 72.598 + ], + [ + -74.664, + 72.598 + ] + ] + }, + "ix": 2 + } + }, + { + "ty": "fl", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Graphic - Fill", + "nm": "Fill 1", + "c": { + "a": 0, + "k": [ + 0.7255, + 0.098, + 0 + ], + "ix": 4 + }, + "r": 1, + "o": { + "a": 0, + "k": 100, + "ix": 5 + } + }, + { + "ty": "tr", + "a": { + "a": 0, + "k": [ + 0, + 0 + ], + "ix": 1 + }, + "s": { + "a": 0, + "k": [ + 100, + 100 + ], + "ix": 3 + }, + "sk": { + "a": 0, + "k": 0, + "ix": 4 + }, + "p": { + "a": 0, + "k": [ + 85.513, + 72.848 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 6 + }, + "sa": { + "a": 0, + "k": 0, + "ix": 5 + }, + "o": { + "a": 0, + "k": 100, + "ix": 7 + } + } + ] + } + ], + "ind": 4, + "parent": 1 + }, + { + "ty": 3, + "nm": "Tri", + "sr": 1, + "st": 0, + "op": 144, + "ip": 10, + "hd": false, + "ddd": 0, + "bm": 0, + "hasMask": false, + "ao": 0, + "ks": { + "a": { + "a": 0, + "k": [ + 85.513, + 72.848, + 0 + ], + "ix": 1 + }, + "s": { + "a": 1, + "k": [ + { + "o": { + "x": 0.167, + "y": 0.167 + }, + "i": { + "x": 0.833, + "y": 0.833 + }, + "s": [ + 0, + 0, + 100 + ], + "t": 10 + }, + { + "s": [ + 100, + 100, + 100 + ], + "t": 15 + } + ], + "ix": 6, + "x": "var $bm_rt;\nvar amp, freq, decay, n, t, v;\ntry {\n amp = $bm_div(effect('Scale - Overshoot')('ADBE Slider Control-0001'), 2.5), freq = $bm_div(effect('Scale - Bounce')('ADBE Slider Control-0001'), 20), decay = $bm_div(effect('Scale - Friction')('ADBE Slider Control-0001'), 20), n = 0, 0 < numKeys && (n = nearestKey(time).index, key(n).time > time && n--), t = 0 === n ? 0 : $bm_sub(time, key(n).time), $bm_rt = 0 < n ? (v = velocityAtTime($bm_sub(key(n).time, $bm_div(thisComp.frameDuration, 10))), $bm_sum(value, $bm_div($bm_mul($bm_mul($bm_div(v, 100), amp), Math.sin($bm_mul($bm_mul($bm_mul(freq, t), 2), Math.PI))), Math.exp($bm_mul(decay, t))))) : value;\n} catch (e$$4) {\n $bm_rt = value = value;\n}" + }, + "sk": { + "a": 0, + "k": 0 + }, + "p": { + "a": 0, + "k": [ + 59.955, + 37.467, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 10 + }, + "sa": { + "a": 0, + "k": 0 + }, + "o": { + "a": 0, + "k": 100, + "ix": 11 + } + }, + "ef": [ + { + "ty": 5, + "mn": "ADBE Slider Control", + "nm": "Scale - Overshoot", + "ix": 1, + "en": 1, + "ef": [ + { + "ty": 0, + "mn": "ADBE Slider Control-0001", + "nm": "Slider", + "ix": 1, + "v": { + "a": 0, + "k": 10, + "ix": 1, + "x": "var $bm_rt;\n$bm_rt = clamp(value, 0, 100);" + } + } + ] + }, + { + "ty": 5, + "mn": "ADBE Slider Control", + "nm": "Scale - Bounce", + "ix": 2, + "en": 1, + "ef": [ + { + "ty": 0, + "mn": "ADBE Slider Control-0001", + "nm": "Slider", + "ix": 1, + "v": { + "a": 0, + "k": 35, + "ix": 1, + "x": "var $bm_rt;\n$bm_rt = clamp(value, 0, 100);" + } + } + ] + }, + { + "ty": 5, + "mn": "ADBE Slider Control", + "nm": "Scale - Friction", + "ix": 3, + "en": 1, + "ef": [ + { + "ty": 0, + "mn": "ADBE Slider Control-0001", + "nm": "Slider", + "ix": 1, + "v": { + "a": 0, + "k": 65, + "ix": 1, + "x": "var $bm_rt;\n$bm_rt = clamp(value, 0, 100);" + } + } + ] + } + ], + "ind": 5, + "parent": 1 + }, + { + "ty": 1, + "nm": "Plate_white", + "sr": 1, + "st": 0, + "op": 144, + "ip": 0, + "hd": false, + "ddd": 0, + "bm": 0, + "hasMask": false, + "ao": 0, + "ks": { + "a": { + "a": 0, + "k": [ + 250, + 250, + 0 + ], + "ix": 1 + }, + "s": { + "a": 0, + "k": [ + 100, + 100, + 100 + ], + "ix": 6 + }, + "sk": { + "a": 0, + "k": 0 + }, + "p": { + "a": 0, + "k": [ + 250, + 250, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 10 + }, + "sa": { + "a": 0, + "k": 0 + }, + "o": { + "a": 0, + "k": 100, + "ix": 11 + } + }, + "ef": [], + "sc": "#ffffff", + "sh": 500, + "sw": 500, + "ind": 6 + } + ], + "v": "5.5.7", + "fr": 48, + "op": 144, + "ip": 0, + "assets": [] +} \ No newline at end of file diff --git a/packages/complaints/assets/animated_json/error.json b/packages/complaints/assets/animated_json/error.json new file mode 100644 index 000000000..96b4f9626 --- /dev/null +++ b/packages/complaints/assets/animated_json/error.json @@ -0,0 +1,728 @@ +{ + "nm": "ckeck", + "ddd": 0, + "h": 50, + "w": 50, + "meta": { + "g": "@lottiefiles/toolkit-js 0.33.2" + }, + "layers": [ + { + "ty": 4, + "nm": "! Outlines", + "sr": 1, + "st": 0, + "op": 213, + "ip": 0, + "hd": false, + "ddd": 0, + "bm": 0, + "hasMask": false, + "ao": 0, + "ks": { + "a": { + "a": 0, + "k": [ + 2, + 12, + 0 + ], + "ix": 1 + }, + "s": { + "a": 1, + "k": [ + { + "o": { + "x": 0.653, + "y": -0.834 + }, + "i": { + "x": 0.667, + "y": 1 + }, + "s": [ + 100, + 100, + 100 + ], + "t": 60 + }, + { + "o": { + "x": 0.167, + "y": 0.167 + }, + "i": { + "x": 0.833, + "y": 0.833 + }, + "s": [ + 115, + 115, + 100 + ], + "t": 73 + }, + { + "o": { + "x": 0.333, + "y": 0 + }, + "i": { + "x": 0.127, + "y": 1.695 + }, + "s": [ + 115, + 115, + 100 + ], + "t": 83 + }, + { + "s": [ + 100, + 100, + 100 + ], + "t": 90 + } + ], + "ix": 6 + }, + "sk": { + "a": 0, + "k": 0 + }, + "p": { + "a": 0, + "k": [ + 25, + 25, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 10 + }, + "sa": { + "a": 0, + "k": 0 + }, + "o": { + "a": 0, + "k": 100, + "ix": 11 + } + }, + "ef": [], + "shapes": [ + { + "ty": "gr", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Group", + "nm": "Group 1", + "ix": 1, + "cix": 2, + "np": 4, + "it": [ + { + "ty": "sh", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Shape - Group", + "nm": "Path 1", + "ix": 1, + "d": 1, + "ks": { + "a": 0, + "k": { + "c": true, + "i": [ + [ + 0, + 1.104 + ], + [ + -1.104, + 0 + ], + [ + 0, + -1.104 + ], + [ + 1.104, + 0 + ] + ], + "o": [ + [ + 0, + -1.104 + ], + [ + 1.104, + 0 + ], + [ + 0, + 1.104 + ], + [ + -1.104, + 0 + ] + ], + "v": [ + [ + -2, + 10 + ], + [ + 0, + 8 + ], + [ + 2, + 10 + ], + [ + 0, + 12 + ] + ] + }, + "ix": 2 + } + }, + { + "ty": "sh", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Shape - Group", + "nm": "Path 2", + "ix": 2, + "d": 1, + "ks": { + "a": 0, + "k": { + "c": true, + "i": [ + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ] + ], + "o": [ + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ] + ], + "v": [ + [ + -1.036, + 5 + ], + [ + -2, + -6.625 + ], + [ + -2, + -12 + ], + [ + 2, + -12 + ], + [ + 2, + -6.625 + ], + [ + 1.052, + 5 + ] + ] + }, + "ix": 2 + } + }, + { + "ty": "mm", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Filter - Merge", + "nm": "Merge Paths 1", + "mm": 1 + }, + { + "ty": "fl", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Graphic - Fill", + "nm": "Fill 1", + "c": { + "a": 0, + "k": [ + 1, + 1, + 1 + ], + "ix": 4 + }, + "r": 1, + "o": { + "a": 0, + "k": 100, + "ix": 5 + } + }, + { + "ty": "tr", + "a": { + "a": 0, + "k": [ + 0.099, + 9.982 + ], + "ix": 1 + }, + "s": { + "a": 0, + "k": [ + 100, + 100 + ], + "ix": 3 + }, + "sk": { + "a": 0, + "k": 0, + "ix": 4 + }, + "p": { + "a": 0, + "k": [ + 2.099, + 21.982 + ], + "ix": 2 + }, + "r": { + "a": 1, + "k": [ + { + "o": { + "x": 0.167, + "y": 0.167 + }, + "i": { + "x": 0.833, + "y": 0.833 + }, + "s": [ + 0 + ], + "t": 10 + }, + { + "o": { + "x": 0.167, + "y": 0.167 + }, + "i": { + "x": 0.833, + "y": 0.833 + }, + "s": [ + 5 + ], + "t": 12 + }, + { + "o": { + "x": 0.167, + "y": 0.167 + }, + "i": { + "x": 0.833, + "y": 0.833 + }, + "s": [ + -5 + ], + "t": 14 + }, + { + "o": { + "x": 0.167, + "y": 0.167 + }, + "i": { + "x": 0.833, + "y": 0.833 + }, + "s": [ + 5 + ], + "t": 16 + }, + { + "o": { + "x": 0.167, + "y": 0.167 + }, + "i": { + "x": 0.833, + "y": 0.833 + }, + "s": [ + -5 + ], + "t": 18 + }, + { + "o": { + "x": 0.167, + "y": 0.167 + }, + "i": { + "x": 0.833, + "y": 0.833 + }, + "s": [ + 5 + ], + "t": 20 + }, + { + "o": { + "x": 0.167, + "y": 0.167 + }, + "i": { + "x": 0.833, + "y": 0.833 + }, + "s": [ + -5 + ], + "t": 22 + }, + { + "s": [ + 0 + ], + "t": 24 + } + ], + "ix": 6 + }, + "sa": { + "a": 0, + "k": 0, + "ix": 5 + }, + "o": { + "a": 0, + "k": 100, + "ix": 7 + } + } + ] + } + ], + "ind": 1 + }, + { + "ty": 4, + "nm": "Shape Layer 1", + "sr": 1, + "st": 0, + "op": 193, + "ip": 0, + "hd": false, + "ddd": 0, + "bm": 0, + "hasMask": false, + "ao": 0, + "ks": { + "a": { + "a": 0, + "k": [ + 0, + 10, + 0 + ], + "ix": 1 + }, + "s": { + "a": 1, + "k": [ + { + "o": { + "x": 0.41, + "y": -0.602 + }, + "i": { + "x": 0.667, + "y": 1 + }, + "s": [ + 100, + 100, + 100 + ], + "t": 60 + }, + { + "o": { + "x": 0.333, + "y": 0 + }, + "i": { + "x": 0.436, + "y": 1.492 + }, + "s": [ + 115, + 115, + 100 + ], + "t": 83 + }, + { + "s": [ + 100, + 100, + 100 + ], + "t": 90 + } + ], + "ix": 6 + }, + "sk": { + "a": 0, + "k": 0 + }, + "p": { + "a": 0, + "k": [ + 25, + 35, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 10 + }, + "sa": { + "a": 0, + "k": 0 + }, + "o": { + "a": 0, + "k": 100, + "ix": 11 + } + }, + "ef": [], + "shapes": [ + { + "ty": "gr", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Group", + "nm": "Ellipse 1", + "ix": 1, + "cix": 2, + "np": 3, + "it": [ + { + "ty": "el", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Shape - Ellipse", + "nm": "Ellipse Path 1", + "d": 1, + "p": { + "a": 0, + "k": [ + 0, + 0 + ], + "ix": 3 + }, + "s": { + "a": 0, + "k": [ + 40, + 40 + ], + "ix": 2 + } + }, + { + "ty": "st", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Graphic - Stroke", + "nm": "Stroke 1", + "lc": 1, + "lj": 1, + "ml": 4, + "o": { + "a": 0, + "k": 100, + "ix": 4 + }, + "w": { + "a": 0, + "k": 2, + "ix": 5 + }, + "c": { + "a": 0, + "k": [ + 1, + 1, + 1 + ], + "ix": 3 + } + }, + { + "ty": "tr", + "a": { + "a": 0, + "k": [ + 0, + 0 + ], + "ix": 1 + }, + "s": { + "a": 0, + "k": [ + 100, + 100 + ], + "ix": 3 + }, + "sk": { + "a": 0, + "k": 0, + "ix": 4 + }, + "p": { + "a": 0, + "k": [ + 0, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 6 + }, + "sa": { + "a": 0, + "k": 0, + "ix": 5 + }, + "o": { + "a": 0, + "k": 100, + "ix": 7 + } + } + ] + }, + { + "ty": "tm", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Filter - Trim", + "nm": "Trim Paths 1", + "ix": 2, + "e": { + "a": 0, + "k": 100, + "ix": 2 + }, + "o": { + "a": 0, + "k": 0, + "ix": 3 + }, + "s": { + "a": 0, + "k": 0, + "ix": 1 + }, + "m": 1 + } + ], + "ind": 2 + } + ], + "v": "5.6.5", + "fr": 60, + "op": 180, + "ip": 0, + "assets": [] +} \ No newline at end of file diff --git a/packages/complaints/assets/animated_json/success.json b/packages/complaints/assets/animated_json/success.json new file mode 100644 index 000000000..43192f708 --- /dev/null +++ b/packages/complaints/assets/animated_json/success.json @@ -0,0 +1,917 @@ +{ + "nm": "sucess", + "ddd": 0, + "h": 120, + "w": 120, + "meta": { + "g": "LottieFiles AE 0.1.21" + }, + "layers": [ + { + "ty": 3, + "nm": "scale up null", + "sr": 1, + "st": 0, + "op": 300.00001221925, + "ip": 0, + "hd": false, + "ddd": 0, + "bm": 0, + "hasMask": false, + "ao": 0, + "ks": { + "a": { + "a": 0, + "k": [ + 0, + 0, + 0 + ], + "ix": 1 + }, + "s": { + "a": 1, + "k": [ + { + "o": { + "x": 0.167, + "y": 0 + }, + "i": { + "x": 0.833, + "y": 1 + }, + "s": [ + 111, + 111, + 100 + ], + "t": 27 + }, + { + "o": { + "x": 0.167, + "y": 0 + }, + "i": { + "x": 0.833, + "y": 1 + }, + "s": [ + 101, + 101, + 100 + ], + "t": 36 + }, + { + "s": [ + 121, + 121, + 100 + ], + "t": 42.0000017106951 + } + ], + "ix": 6 + }, + "sk": { + "a": 0, + "k": 0 + }, + "p": { + "a": 0, + "k": [ + 60, + 60, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 10 + }, + "sa": { + "a": 0, + "k": 0 + }, + "o": { + "a": 0, + "k": 0, + "ix": 11 + } + }, + "ef": [], + "ind": 1 + }, + { + "ty": 4, + "nm": "spark", + "sr": 1, + "st": 35.0000014255792, + "op": 335.00001364483, + "ip": 35.0000014255792, + "hd": false, + "ddd": 0, + "bm": 0, + "hasMask": false, + "ao": 0, + "ks": { + "a": { + "a": 0, + "k": [ + 0, + 0, + 0 + ], + "ix": 1 + }, + "s": { + "a": 0, + "k": [ + 100, + 100, + 100 + ], + "ix": 6 + }, + "sk": { + "a": 0, + "k": 0 + }, + "p": { + "a": 0, + "k": [ + 0, + 0.5, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 10 + }, + "sa": { + "a": 0, + "k": 0 + }, + "o": { + "a": 0, + "k": 100, + "ix": 11 + } + }, + "ef": [], + "shapes": [ + { + "ty": "gr", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Group", + "nm": "Rectangle 1", + "ix": 1, + "cix": 2, + "np": 3, + "it": [ + { + "ty": "rc", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Shape - Rect", + "nm": "Rectangle Path 1", + "d": 1, + "p": { + "a": 1, + "k": [ + { + "o": { + "x": 0.333, + "y": 0 + }, + "i": { + "x": 0.667, + "y": 1 + }, + "s": [ + 0, + -21 + ], + "t": 35, + "ti": [ + 0, + 1.5 + ], + "to": [ + 0, + -1.5 + ] + }, + { + "s": [ + 0, + -30 + ], + "t": 53.0000021587343 + } + ], + "ix": 3 + }, + "r": { + "a": 0, + "k": 0, + "ix": 4 + }, + "s": { + "a": 1, + "k": [ + { + "o": { + "x": 0.976, + "y": 0 + }, + "i": { + "x": 0.667, + "y": 1 + }, + "s": [ + 2, + 0 + ], + "t": 35 + }, + { + "o": { + "x": 0.33299999999999996, + "y": 0 + }, + "i": { + "x": 0.15355432054499818, + "y": 0.9999999999999999 + }, + "s": [ + 2, + 8 + ], + "t": 42 + }, + { + "s": [ + 1.633, + 0 + ], + "t": 53.0000021587343 + } + ], + "ix": 2 + } + }, + { + "ty": "fl", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Graphic - Fill", + "nm": "Fill 1", + "c": { + "a": 0, + "k": [ + 0.9804, + 0.9804, + 0.9804 + ], + "ix": 4 + }, + "r": 1, + "o": { + "a": 0, + "k": 100, + "ix": 5 + } + }, + { + "ty": "tr", + "a": { + "a": 0, + "k": [ + 0, + 0 + ], + "ix": 1 + }, + "s": { + "a": 0, + "k": [ + 100, + 100 + ], + "ix": 3 + }, + "sk": { + "a": 0, + "k": 0, + "ix": 4 + }, + "p": { + "a": 0, + "k": [ + 0, + -8 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 6 + }, + "sa": { + "a": 0, + "k": 0, + "ix": 5 + }, + "o": { + "a": 0, + "k": 100, + "ix": 7 + } + } + ] + }, + { + "ty": "rp", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Filter - Repeater", + "nm": "Repeater 1", + "ix": 2, + "m": 1, + "c": { + "a": 0, + "k": 8, + "ix": 1 + }, + "o": { + "a": 0, + "k": 0, + "ix": 2 + }, + "tr": { + "a": { + "a": 0, + "k": [ + 0, + 0 + ], + "ix": 1 + }, + "s": { + "a": 0, + "k": [ + 100, + 100 + ], + "ix": 3 + }, + "sk": { + "a": 0, + "k": 0 + }, + "p": { + "a": 0, + "k": [ + 0, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 45, + "ix": 4 + }, + "sa": { + "a": 0, + "k": 0 + }, + "so": { + "a": 0, + "k": 100, + "ix": 5 + }, + "eo": { + "a": 0, + "k": 100, + "ix": 6 + } + } + } + ], + "ind": 2, + "parent": 1 + }, + { + "ty": 4, + "nm": "check", + "sr": 1, + "st": 10.0000004073083, + "op": 310.000012626559, + "ip": 22.0000008960784, + "hd": false, + "ddd": 0, + "bm": 0, + "hasMask": false, + "ao": 0, + "ks": { + "a": { + "a": 0, + "k": [ + 0, + 0, + 0 + ], + "ix": 1 + }, + "s": { + "a": 0, + "k": [ + 100, + 100, + 100 + ], + "ix": 6 + }, + "sk": { + "a": 0, + "k": 0 + }, + "p": { + "a": 0, + "k": [ + 0, + 0, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 10 + }, + "sa": { + "a": 0, + "k": 0 + }, + "o": { + "a": 0, + "k": 100, + "ix": 11 + } + }, + "ef": [], + "shapes": [ + { + "ty": "sh", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Shape - Group", + "nm": "Path 1", + "ix": 1, + "d": 1, + "ks": { + "a": 0, + "k": { + "c": false, + "i": [ + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 3.5, + 3.75 + ], + [ + -12.973, + 5.349 + ], + [ + -6.124, + -9.992 + ], + [ + 12.125, + -7.431 + ], + [ + 7.431, + 12.125 + ] + ], + "o": [ + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + -3.5, + -3.75 + ], + [ + 10.764, + -2.941 + ], + [ + 7.431, + 12.125 + ], + [ + -12.125, + 7.431 + ], + [ + -7.431, + -12.125 + ] + ], + "v": [ + [ + 15.25, + -9.688 + ], + [ + -5.75, + 10.062 + ], + [ + -16, + 0.25 + ], + [ + -6.777, + -24.849 + ], + [ + 21.955, + -13.456 + ], + [ + 13.456, + 21.955 + ], + [ + -21.955, + 13.456 + ] + ] + }, + "ix": 2 + } + }, + { + "ty": "tm", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Filter - Trim", + "nm": "Trim Paths 1", + "ix": 2, + "e": { + "a": 1, + "k": [ + { + "o": { + "x": 0.714, + "y": 0 + }, + "i": { + "x": 0.351, + "y": 1 + }, + "s": [ + 100 + ], + "t": 10 + }, + { + "s": [ + 23 + ], + "t": 40.0000016292334 + } + ], + "ix": 2 + }, + "o": { + "a": 0, + "k": 0, + "ix": 3 + }, + "s": { + "a": 1, + "k": [ + { + "o": { + "x": 0.742, + "y": 0 + }, + "i": { + "x": 0.363, + "y": 1 + }, + "s": [ + 100 + ], + "t": 17 + }, + { + "s": [ + 0 + ], + "t": 45.0000018328876 + } + ], + "ix": 1 + }, + "m": 1 + }, + { + "ty": "st", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Graphic - Stroke", + "nm": "Stroke 1", + "lc": 1, + "lj": 1, + "ml": 4, + "o": { + "a": 0, + "k": 100, + "ix": 4 + }, + "w": { + "a": 0, + "k": 4, + "ix": 5 + }, + "c": { + "a": 0, + "k": [ + 0.9804, + 0.9804, + 0.9804 + ], + "ix": 3 + } + } + ], + "ind": 3, + "parent": 1 + }, + { + "ty": 4, + "nm": "circle", + "sr": 1, + "st": 0, + "op": 300.00001221925, + "ip": 0, + "hd": false, + "ddd": 0, + "bm": 0, + "hasMask": false, + "ao": 0, + "ks": { + "a": { + "a": 0, + "k": [ + 0, + 0, + 0 + ], + "ix": 1 + }, + "s": { + "a": 0, + "k": [ + 100, + 100, + 100 + ], + "ix": 6 + }, + "sk": { + "a": 0, + "k": 0 + }, + "p": { + "a": 0, + "k": [ + 0, + 0, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 10 + }, + "sa": { + "a": 0, + "k": 0 + }, + "o": { + "a": 0, + "k": 100, + "ix": 11 + } + }, + "ef": [], + "shapes": [ + { + "ty": "sh", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Shape - Group", + "nm": "Path 1", + "ix": 1, + "d": 1, + "ks": { + "a": 0, + "k": { + "c": true, + "i": [ + [ + -14.221, + 0 + ], + [ + 0, + -14.221 + ], + [ + 14.221, + 0 + ], + [ + 0, + 14.221 + ] + ], + "o": [ + [ + 14.221, + 0 + ], + [ + 0, + 14.221 + ], + [ + -14.221, + 0 + ], + [ + 0, + -14.221 + ] + ], + "v": [ + [ + 0, + -25.75 + ], + [ + 25.75, + 0 + ], + [ + 0, + 25.75 + ], + [ + -25.75, + 0 + ] + ] + }, + "ix": 2 + } + }, + { + "ty": "st", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Graphic - Stroke", + "nm": "Stroke 1", + "lc": 1, + "lj": 1, + "ml": 4, + "o": { + "a": 0, + "k": 100, + "ix": 4 + }, + "w": { + "a": 0, + "k": 2, + "ix": 5 + }, + "c": { + "a": 0, + "k": [ + 0.9804, + 0.9804, + 0.9804 + ], + "ix": 3 + } + }, + { + "ty": "tm", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Filter - Trim", + "nm": "Trim Paths 1", + "ix": 3, + "e": { + "a": 1, + "k": [ + { + "o": { + "x": 0.714, + "y": 0 + }, + "i": { + "x": 0.351, + "y": 1 + }, + "s": [ + 100 + ], + "t": 0 + }, + { + "s": [ + 100 + ], + "t": 30.0000012219251 + } + ], + "ix": 2 + }, + "o": { + "a": 0, + "k": 0, + "ix": 3 + }, + "s": { + "a": 1, + "k": [ + { + "o": { + "x": 0.742, + "y": 0 + }, + "i": { + "x": 0.363, + "y": 1 + }, + "s": [ + 100 + ], + "t": 7 + }, + { + "s": [ + 0 + ], + "t": 33.0000013441176 + } + ], + "ix": 1 + }, + "m": 1 + } + ], + "ind": 4, + "parent": 1 + } + ], + "v": "5.5.7", + "fr": 29.9700012207031, + "op": 60.0000024438501, + "ip": 0, + "assets": [] +} \ No newline at end of file diff --git a/packages/complaints/assets/icons/svg/no_result.svg b/packages/complaints/assets/icons/svg/no_result.svg new file mode 100644 index 000000000..df2b14869 --- /dev/null +++ b/packages/complaints/assets/icons/svg/no_result.svg @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/complaints/example/.gitignore b/packages/complaints/example/.gitignore new file mode 100644 index 000000000..29a3a5017 --- /dev/null +++ b/packages/complaints/example/.gitignore @@ -0,0 +1,43 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.pub-cache/ +.pub/ +/build/ + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release diff --git a/packages/complaints/example/.metadata b/packages/complaints/example/.metadata new file mode 100644 index 000000000..eea2802f1 --- /dev/null +++ b/packages/complaints/example/.metadata @@ -0,0 +1,45 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "67457e669f79e9f8d13d7a68fe09775fefbb79f4" + channel: "stable" + +project_type: app + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: 67457e669f79e9f8d13d7a68fe09775fefbb79f4 + base_revision: 67457e669f79e9f8d13d7a68fe09775fefbb79f4 + - platform: android + create_revision: 67457e669f79e9f8d13d7a68fe09775fefbb79f4 + base_revision: 67457e669f79e9f8d13d7a68fe09775fefbb79f4 + - platform: ios + create_revision: 67457e669f79e9f8d13d7a68fe09775fefbb79f4 + base_revision: 67457e669f79e9f8d13d7a68fe09775fefbb79f4 + - platform: linux + create_revision: 67457e669f79e9f8d13d7a68fe09775fefbb79f4 + base_revision: 67457e669f79e9f8d13d7a68fe09775fefbb79f4 + - platform: macos + create_revision: 67457e669f79e9f8d13d7a68fe09775fefbb79f4 + base_revision: 67457e669f79e9f8d13d7a68fe09775fefbb79f4 + - platform: web + create_revision: 67457e669f79e9f8d13d7a68fe09775fefbb79f4 + base_revision: 67457e669f79e9f8d13d7a68fe09775fefbb79f4 + - platform: windows + create_revision: 67457e669f79e9f8d13d7a68fe09775fefbb79f4 + base_revision: 67457e669f79e9f8d13d7a68fe09775fefbb79f4 + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/packages/complaints/example/README.md b/packages/complaints/example/README.md new file mode 100644 index 000000000..2b3fce4c8 --- /dev/null +++ b/packages/complaints/example/README.md @@ -0,0 +1,16 @@ +# example + +A new Flutter project. + +## Getting Started + +This project is a starting point for a Flutter application. + +A few resources to get you started if this is your first Flutter project: + +- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) +- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) + +For help getting started with Flutter development, view the +[online documentation](https://docs.flutter.dev/), which offers tutorials, +samples, guidance on mobile development, and a full API reference. diff --git a/packages/complaints/example/analysis_options.yaml b/packages/complaints/example/analysis_options.yaml new file mode 100644 index 000000000..0d2902135 --- /dev/null +++ b/packages/complaints/example/analysis_options.yaml @@ -0,0 +1,28 @@ +# This file configures the analyzer, which statically analyzes Dart code to +# check for errors, warnings, and lints. +# +# The issues identified by the analyzer are surfaced in the UI of Dart-enabled +# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be +# invoked from the command line by running `flutter analyze`. + +# The following line activates a set of recommended lints for Flutter apps, +# packages, and plugins designed to encourage good coding practices. +include: package:flutter_lints/flutter.yaml + +linter: + # The lint rules applied to this project can be customized in the + # section below to disable rules from the `package:flutter_lints/flutter.yaml` + # included above or to enable additional rules. A list of all available lints + # and their documentation is published at https://dart.dev/lints. + # + # Instead of disabling a lint rule for the entire project in the + # section below, it can also be suppressed for a single line of code + # or a specific dart file by using the `// ignore: name_of_lint` and + # `// ignore_for_file: name_of_lint` syntax on the line or in the file + # producing the lint. + rules: + # avoid_print: false # Uncomment to disable the `avoid_print` rule + # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/packages/complaints/example/android/.gitignore b/packages/complaints/example/android/.gitignore new file mode 100644 index 000000000..6f568019d --- /dev/null +++ b/packages/complaints/example/android/.gitignore @@ -0,0 +1,13 @@ +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat +/local.properties +GeneratedPluginRegistrant.java + +# Remember to never publicly share your keystore. +# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +key.properties +**/*.keystore +**/*.jks diff --git a/packages/complaints/example/android/app/build.gradle b/packages/complaints/example/android/app/build.gradle new file mode 100644 index 000000000..118ee1d92 --- /dev/null +++ b/packages/complaints/example/android/app/build.gradle @@ -0,0 +1,67 @@ +plugins { + id "com.android.application" + id "kotlin-android" + id "dev.flutter.flutter-gradle-plugin" +} + +def localProperties = new Properties() +def localPropertiesFile = rootProject.file('local.properties') +if (localPropertiesFile.exists()) { + localPropertiesFile.withReader('UTF-8') { reader -> + localProperties.load(reader) + } +} + +def flutterVersionCode = localProperties.getProperty('flutter.versionCode') +if (flutterVersionCode == null) { + flutterVersionCode = '1' +} + +def flutterVersionName = localProperties.getProperty('flutter.versionName') +if (flutterVersionName == null) { + flutterVersionName = '1.0' +} + +android { + namespace "com.example.example" + compileSdkVersion flutter.compileSdkVersion + ndkVersion flutter.ndkVersion + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + kotlinOptions { + jvmTarget = '1.8' + } + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId "com.example.example" + // You can update the following values to match your application needs. + // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. + minSdkVersion flutter.minSdkVersion + targetSdkVersion flutter.targetSdkVersion + versionCode flutterVersionCode.toInteger() + versionName flutterVersionName + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig signingConfigs.debug + } + } +} + +flutter { + source '../..' +} + +dependencies {} diff --git a/packages/complaints/example/android/app/src/debug/AndroidManifest.xml b/packages/complaints/example/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 000000000..399f6981d --- /dev/null +++ b/packages/complaints/example/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/packages/complaints/example/android/app/src/main/AndroidManifest.xml b/packages/complaints/example/android/app/src/main/AndroidManifest.xml new file mode 100644 index 000000000..19b862ec8 --- /dev/null +++ b/packages/complaints/example/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + diff --git a/packages/complaints/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt b/packages/complaints/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt new file mode 100644 index 000000000..e793a000d --- /dev/null +++ b/packages/complaints/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt @@ -0,0 +1,6 @@ +package com.example.example + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() { +} diff --git a/packages/complaints/example/android/app/src/main/res/drawable-v21/launch_background.xml b/packages/complaints/example/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 000000000..f74085f3f --- /dev/null +++ b/packages/complaints/example/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/packages/complaints/example/android/app/src/main/res/drawable/launch_background.xml b/packages/complaints/example/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 000000000..304732f88 --- /dev/null +++ b/packages/complaints/example/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/packages/complaints/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/packages/complaints/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..7eb65cb8d Binary files /dev/null and b/packages/complaints/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/packages/complaints/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/packages/complaints/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..7021b6ace Binary files /dev/null and b/packages/complaints/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/packages/complaints/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/packages/complaints/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..f55918dc1 Binary files /dev/null and b/packages/complaints/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/packages/complaints/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/packages/complaints/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..910eafa1d Binary files /dev/null and b/packages/complaints/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/packages/complaints/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/packages/complaints/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..67b1e5f25 Binary files /dev/null and b/packages/complaints/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/packages/complaints/example/android/app/src/main/res/values-night/styles.xml b/packages/complaints/example/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 000000000..06952be74 --- /dev/null +++ b/packages/complaints/example/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/packages/complaints/example/android/app/src/main/res/values/styles.xml b/packages/complaints/example/android/app/src/main/res/values/styles.xml new file mode 100644 index 000000000..cb1ef8805 --- /dev/null +++ b/packages/complaints/example/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/packages/complaints/example/android/app/src/profile/AndroidManifest.xml b/packages/complaints/example/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 000000000..399f6981d --- /dev/null +++ b/packages/complaints/example/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/packages/complaints/example/android/build.gradle b/packages/complaints/example/android/build.gradle new file mode 100644 index 000000000..2a2de2524 --- /dev/null +++ b/packages/complaints/example/android/build.gradle @@ -0,0 +1,30 @@ +buildscript { + ext.kotlin_version = '1.9.0' + repositories { + google() + mavenCentral() + } + + dependencies { + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + } +} + +allprojects { + repositories { + google() + mavenCentral() + } +} + +rootProject.buildDir = '../build' +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" +} +subprojects { + project.evaluationDependsOn(':app') +} + +tasks.register("clean", Delete) { + delete rootProject.buildDir +} diff --git a/packages/complaints/example/android/settings.gradle b/packages/complaints/example/android/settings.gradle new file mode 100644 index 000000000..7cd712855 --- /dev/null +++ b/packages/complaints/example/android/settings.gradle @@ -0,0 +1,29 @@ +pluginManagement { + def flutterSdkPath = { + def properties = new Properties() + file("local.properties").withInputStream { properties.load(it) } + def flutterSdkPath = properties.getProperty("flutter.sdk") + assert flutterSdkPath != null, "flutter.sdk not set in local.properties" + return flutterSdkPath + } + settings.ext.flutterSdkPath = flutterSdkPath() + + includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle") + + repositories { + google() + mavenCentral() + gradlePluginPortal() + } + + plugins { + id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false + } +} + +plugins { + id "dev.flutter.flutter-plugin-loader" version "1.0.0" + id "com.android.application" version "7.3.0" apply false +} + +include ":app" diff --git a/packages/complaints/example/ios/.gitignore b/packages/complaints/example/ios/.gitignore new file mode 100644 index 000000000..7a7f9873a --- /dev/null +++ b/packages/complaints/example/ios/.gitignore @@ -0,0 +1,34 @@ +**/dgph +*.mode1v3 +*.mode2v3 +*.moved-aside +*.pbxuser +*.perspectivev3 +**/*sync/ +.sconsign.dblite +.tags* +**/.vagrant/ +**/DerivedData/ +Icon? +**/Pods/ +**/.symlinks/ +profile +xcuserdata +**/.generated/ +Flutter/App.framework +Flutter/Flutter.framework +Flutter/Flutter.podspec +Flutter/Generated.xcconfig +Flutter/ephemeral/ +Flutter/app.flx +Flutter/app.zip +Flutter/flutter_assets/ +Flutter/flutter_export_environment.sh +ServiceDefinitions.json +Runner/GeneratedPluginRegistrant.* + +# Exceptions to above rules. +!default.mode1v3 +!default.mode2v3 +!default.pbxuser +!default.perspectivev3 diff --git a/packages/complaints/example/ios/Flutter/AppFrameworkInfo.plist b/packages/complaints/example/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 000000000..7c5696400 --- /dev/null +++ b/packages/complaints/example/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 12.0 + + diff --git a/packages/complaints/example/ios/Flutter/Debug.xcconfig b/packages/complaints/example/ios/Flutter/Debug.xcconfig new file mode 100644 index 000000000..592ceee85 --- /dev/null +++ b/packages/complaints/example/ios/Flutter/Debug.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/packages/complaints/example/ios/Flutter/Release.xcconfig b/packages/complaints/example/ios/Flutter/Release.xcconfig new file mode 100644 index 000000000..592ceee85 --- /dev/null +++ b/packages/complaints/example/ios/Flutter/Release.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/packages/complaints/example/ios/Podfile b/packages/complaints/example/ios/Podfile new file mode 100644 index 000000000..fdcc671eb --- /dev/null +++ b/packages/complaints/example/ios/Podfile @@ -0,0 +1,44 @@ +# Uncomment this line to define a global platform for your project +# platform :ios, '11.0' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_ios_podfile_setup + +target 'Runner' do + use_frameworks! + use_modular_headers! + + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) + target 'RunnerTests' do + inherit! :search_paths + end +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_ios_build_settings(target) + end +end diff --git a/packages/complaints/example/ios/Runner.xcodeproj/project.pbxproj b/packages/complaints/example/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 000000000..69cdaed8d --- /dev/null +++ b/packages/complaints/example/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,614 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXBuildFile section */ + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 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 */; }; + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 97C146E61CF9000F007C117D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 97C146ED1CF9000F007C117D; + remoteInfo = Runner; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* 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 = ""; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; 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 = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/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; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 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 = ""; }; + 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; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 331C8082294A63A400263BE5 /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 331C807B294A618700263BE5 /* RunnerTests.swift */, + ); + path = RunnerTests; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + 331C8082294A63A400263BE5 /* RunnerTests */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + 331C8081294A63A400263BE5 /* RunnerTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, + ); + path = Runner; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 331C8080294A63A400263BE5 /* RunnerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; + buildPhases = ( + 331C807D294A63A400263BE5 /* Sources */, + 331C807E294A63A400263BE5 /* Frameworks */, + 331C807F294A63A400263BE5 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 331C8086294A63A400263BE5 /* PBXTargetDependency */, + ); + name = RunnerTests; + productName = RunnerTests; + productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = YES; + LastUpgradeCheck = 1430; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 331C8080294A63A400263BE5 = { + CreatedOnToolsVersion = 14.0; + TestTargetID = 97C146ED1CF9000F007C117D; + }; + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1100; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + 331C8080294A63A400263BE5 /* RunnerTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 331C807F294A63A400263BE5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 331C807D294A63A400263BE5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 331C8086294A63A400263BE5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 97C146ED1CF9000F007C117D /* Runner */; + targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.example; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; + 331C8088294A63A400263BE5 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = AE0B7B92F70575B8D7E0D07E /* Pods-RunnerTests.debug.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.example.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Debug; + }; + 331C8089294A63A400263BE5 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 89B67EB44CE7B6631473024E /* Pods-RunnerTests.release.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.example.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Release; + }; + 331C808A294A63A400263BE5 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 640959BDD8F10B91D80A66BE /* Pods-RunnerTests.profile.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.example.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Profile; + }; + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.example; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.example; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 331C8088294A63A400263BE5 /* Debug */, + 331C8089294A63A400263BE5 /* Release */, + 331C808A294A63A400263BE5 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug */, + 97C147041CF9000F007C117D /* Release */, + 249021D3217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + 249021D4217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/packages/complaints/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/complaints/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..919434a62 --- /dev/null +++ b/packages/complaints/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/packages/complaints/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/complaints/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 000000000..18d981003 --- /dev/null +++ b/packages/complaints/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/packages/complaints/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/complaints/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 000000000..f9b0d7c5e --- /dev/null +++ b/packages/complaints/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/packages/complaints/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/complaints/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 000000000..87131a09b --- /dev/null +++ b/packages/complaints/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/complaints/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/packages/complaints/example/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..1d526a16e --- /dev/null +++ b/packages/complaints/example/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/packages/complaints/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/complaints/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 000000000..18d981003 --- /dev/null +++ b/packages/complaints/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/packages/complaints/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/complaints/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 000000000..f9b0d7c5e --- /dev/null +++ b/packages/complaints/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/packages/complaints/example/ios/Runner/AppDelegate.swift b/packages/complaints/example/ios/Runner/AppDelegate.swift new file mode 100644 index 000000000..70693e4a8 --- /dev/null +++ b/packages/complaints/example/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import UIKit +import Flutter + +@UIApplicationMain +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} diff --git a/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000..d36b1fab2 --- /dev/null +++ b/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "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" + } +} diff --git a/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 000000000..4def64261 Binary files /dev/null and b/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 000000000..56e650ace Binary files /dev/null and b/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 000000000..37eca2b4b Binary files /dev/null and b/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 000000000..0b29a04f1 Binary files /dev/null and b/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 000000000..0bd0125e0 Binary files /dev/null and b/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 000000000..eaf2dee37 Binary files /dev/null and b/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 000000000..3fd69bf85 Binary files /dev/null and b/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 000000000..37eca2b4b Binary files /dev/null and b/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 000000000..b7649c3e2 Binary files /dev/null and b/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 000000000..44d138309 Binary files /dev/null and b/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png b/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png new file mode 100644 index 000000000..9a22b7fc3 Binary files /dev/null and b/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png differ diff --git a/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png b/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png new file mode 100644 index 000000000..f64ce7730 Binary files /dev/null and b/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png differ diff --git a/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png b/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png new file mode 100644 index 000000000..72baec5a1 Binary files /dev/null and b/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png differ diff --git a/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png b/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png new file mode 100644 index 000000000..fd77b7e7a Binary files /dev/null and b/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png differ diff --git a/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 000000000..44d138309 Binary files /dev/null and b/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 000000000..41b217a5b Binary files /dev/null and b/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png b/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png new file mode 100644 index 000000000..7eb65cb8d Binary files /dev/null and b/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png differ diff --git a/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png b/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png new file mode 100644 index 000000000..910eafa1d Binary files /dev/null and b/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png differ diff --git a/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 000000000..b9811544e Binary files /dev/null and b/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 000000000..5047fef8e Binary files /dev/null and b/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 000000000..9fee6d1eb Binary files /dev/null and b/packages/complaints/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/packages/complaints/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/packages/complaints/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 000000000..0bedcf2fd --- /dev/null +++ b/packages/complaints/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchImage.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/packages/complaints/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/packages/complaints/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/packages/complaints/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/packages/complaints/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/packages/complaints/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/packages/complaints/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/packages/complaints/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/packages/complaints/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/packages/complaints/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/packages/complaints/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/packages/complaints/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 000000000..89c2725b7 --- /dev/null +++ b/packages/complaints/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# Launch Screen Assets + +You can customize the launch screen with your own desired assets by replacing the image files in this directory. + +You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. \ No newline at end of file diff --git a/packages/complaints/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/packages/complaints/example/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 000000000..f2e259c7c --- /dev/null +++ b/packages/complaints/example/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/complaints/example/ios/Runner/Base.lproj/Main.storyboard b/packages/complaints/example/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 000000000..f3c28516f --- /dev/null +++ b/packages/complaints/example/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/complaints/example/ios/Runner/Info.plist b/packages/complaints/example/ios/Runner/Info.plist new file mode 100644 index 000000000..5458fc418 --- /dev/null +++ b/packages/complaints/example/ios/Runner/Info.plist @@ -0,0 +1,49 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Example + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + example + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + CADisableMinimumFrameDurationOnPhone + + UIApplicationSupportsIndirectInputEvents + + + diff --git a/packages/complaints/example/ios/Runner/Runner-Bridging-Header.h b/packages/complaints/example/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 000000000..308a2a560 --- /dev/null +++ b/packages/complaints/example/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/packages/complaints/example/ios/RunnerTests/RunnerTests.swift b/packages/complaints/example/ios/RunnerTests/RunnerTests.swift new file mode 100644 index 000000000..86a7c3b1b --- /dev/null +++ b/packages/complaints/example/ios/RunnerTests/RunnerTests.swift @@ -0,0 +1,12 @@ +import Flutter +import UIKit +import XCTest + +class RunnerTests: XCTestCase { + + func testExample() { + // If you add code to the Runner application, consider adding tests here. + // See https://developer.apple.com/documentation/xctest for more information about using XCTest. + } + +} diff --git a/packages/complaints/example/lib/localization_strings.json b/packages/complaints/example/lib/localization_strings.json new file mode 100644 index 000000000..0da33f0ec --- /dev/null +++ b/packages/complaints/example/lib/localization_strings.json @@ -0,0 +1,68 @@ +[ + { + "code": "COMPLAINTS_INBOX_HEADING", + "locale": "en_US", + "message": "Complaints Inbox", + "module": "hcm-common" + }, + { + "code": "COMPLAINTS_INBOX_SEARCH_CTA", + "locale": "en_US", + "message": "Search", + "module": "hcm-common" + }, + { + "code": "COMPLAINTS_INBOX_FILTER_CTA", + "locale": "en_US", + "message": "Filter", + "module": "hcm-common" + }, + { + "code": "COMPLAINTS_INBOX_SORT_CTA", + "locale": "en_US", + "message": "Sort", + "module": "hcm-common" + }, + { + "code": "COMPLAINTS_NO_COMPLAINTS_EXIST", + "locale": "en_US", + "message": "No Complaints Exist", + "module": "hcm-common" + }, + { + "code": "COMPLAINTS_FILE_COMPLAINT_ACTION", + "locale": "en_MZ", + "message": "File Complaint", + "module": "hcm-common" + }, + { + "code": "COMPLAINTS_ACKNOWLEDGEMENT_LABEL", + "locale": "en_MZ", + "message": "File Complaint", + "module": "hcm-common" + }, + { + "code": "COMPLAINTS_ACKNOWLEDGEMENT_SUB_LABEL_MAIN", + "locale": "en_MZ", + "message": "Complaint No.", + "module": "hcm-common" + }, + { + "code": "COMPLAINTS_ACKNOWLEDGEMENT_SUB_LABEL_SUB", + "locale": "en_MZ", + "message": "(Please sync the data to generate)", + "module": "hcm-common" + }, + { + "code": "COMPLAINTS_ACKNOWLEDGEMENT_ACTION", + "locale": "en_MZ", + "message": "Back to Complaints", + "module": "hcm-common" + }, + { + "code": "COMPLAINTS_ACKNOWLEDGEMENT_DESCRIPTION", + "locale": "en_MZ", + "message": "The complaint has been registered successfully and sent to the concerned person.", + "module": "hcm-common" + } +] \ No newline at end of file diff --git a/packages/complaints/example/lib/main.dart b/packages/complaints/example/lib/main.dart new file mode 100644 index 000000000..eafbce267 --- /dev/null +++ b/packages/complaints/example/lib/main.dart @@ -0,0 +1,110 @@ +import 'dart:convert'; + +import 'package:complaints/blocs/localization/app_localization.dart'; +import 'package:complaints/complaints.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +void main() { + runApp(MyApp()); +} + +class Language { + late String label; + late String value; + + Language(this.label, this.value); +} + +class Localization { + late String code; + + late String message; + + late String module; + + late String locale; +} + +Future loadLocalizedStrings() async { + final String jsonString = + await rootBundle.loadString('lib/localization_strings.json'); + final decode = json.decode(jsonString); + + List localizationList; + localizationList = decode.map((e) { + final data = e; + return Localization() + ..code = data['code'] + ..locale = data['locale'] + ..module = data['module'] + ..message = data['message']; + }).toList(); + + return Future.value(localizationList); +} + +class MyApp extends StatelessWidget { + late Future localizedStrings = loadLocalizedStrings(); + MyApp({super.key}); + + // This widget is the root of your application. + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'Flutter Demo', + theme: ThemeData( + colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), + useMaterial3: true, + ), + home: MyHomePage(title: "Complaints Package Demo"), + locale: Locale('en', 'MZ'), + supportedLocales: [const Locale('en', 'MZ')], + localizationsDelegates: [ + ComplaintsLocalization.getDelegate( + loadLocalizedStrings(), [Language("English", "en_MZ")]), + // Add other localizations delegates if needed + ], + ); + } +} + +class MyHomePage extends StatefulWidget { + final String title; + MyHomePage({super.key, required this.title}); + + @override + State createState() => _MyHomePageState(); +} + +class _MyHomePageState extends State { + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + final theme = Theme.of(context); + return Scaffold( + appBar: AppBar( + title: Text("PGR-Complaints Example"), + ), + body: Center( + child: DigitButton( + onPressed: () { + Navigator.of(context).push( + MaterialPageRoute( + builder: (BuildContext context) => + ComplaintsAcknowledgementPage(), + ), + ); + }, + label: "Demo Acknowledgemnet", + type: DigitButtonType.secondary, + size: DigitButtonSize.large, + ), + )); + } +} diff --git a/packages/complaints/example/pubspec.lock b/packages/complaints/example/pubspec.lock new file mode 100644 index 000000000..5cf8bac6d --- /dev/null +++ b/packages/complaints/example/pubspec.lock @@ -0,0 +1,1350 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + sha256: eb376e9acf6938204f90eb3b1f00b578640d3188b4c8a8ec054f9f479af8d051 + url: "https://pub.dev" + source: hosted + version: "64.0.0" + analyzer: + dependency: transitive + description: + name: analyzer + sha256: "69f54f967773f6c26c7dcb13e93d7ccee8b17a641689da39e878d5cf13b06893" + url: "https://pub.dev" + source: hosted + version: "6.2.0" + archive: + dependency: transitive + description: + name: archive + sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d + url: "https://pub.dev" + source: hosted + version: "3.6.1" + args: + dependency: transitive + description: + name: args + sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" + url: "https://pub.dev" + source: hosted + version: "2.5.0" + async: + dependency: transitive + description: + name: async + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" + source: hosted + version: "2.11.0" + auto_route: + dependency: transitive + description: + name: auto_route + sha256: "8de4a280ce7861ef24a6baa14c2b02b77a8c31b4a4c4f12d7b608678cc657c7f" + url: "https://pub.dev" + source: hosted + version: "8.1.4" + bloc: + dependency: transitive + description: + name: bloc + sha256: "106842ad6569f0b60297619e9e0b1885c2fb9bf84812935490e6c5275777804e" + url: "https://pub.dev" + source: hosted + version: "8.1.4" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + build: + dependency: transitive + description: + name: build + sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" + url: "https://pub.dev" + source: hosted + version: "2.4.1" + build_config: + dependency: transitive + description: + name: build_config + sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1 + url: "https://pub.dev" + source: hosted + version: "1.1.1" + build_daemon: + dependency: transitive + description: + name: build_daemon + sha256: "0343061a33da9c5810b2d6cee51945127d8f4c060b7fbdd9d54917f0a3feaaa1" + url: "https://pub.dev" + source: hosted + version: "4.0.1" + build_resolvers: + dependency: transitive + description: + name: build_resolvers + sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a" + url: "https://pub.dev" + source: hosted + version: "2.4.2" + build_runner: + dependency: transitive + description: + name: build_runner + sha256: "3ac61a79bfb6f6cc11f693591063a7f19a7af628dc52f141743edac5c16e8c22" + url: "https://pub.dev" + source: hosted + version: "2.4.9" + build_runner_core: + dependency: transitive + description: + name: build_runner_core + sha256: "4ae8ffe5ac758da294ecf1802f2aff01558d8b1b00616aa7538ea9a8a5d50799" + url: "https://pub.dev" + source: hosted + version: "7.3.0" + built_collection: + dependency: transitive + description: + name: built_collection + sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" + url: "https://pub.dev" + source: hosted + version: "5.1.1" + built_value: + dependency: transitive + description: + name: built_value + sha256: c7913a9737ee4007efedaffc968c049fd0f3d0e49109e778edc10de9426005cb + url: "https://pub.dev" + source: hosted + version: "8.9.2" + camera: + dependency: transitive + description: + name: camera + sha256: "26ff41045772153f222ffffecba711a206f670f5834d40ebf5eed3811692f167" + url: "https://pub.dev" + source: hosted + version: "0.11.0+2" + camera_android_camerax: + dependency: transitive + description: + name: camera_android_camerax + sha256: "011be2ab0e5b3e3aa8094413fa890f8c5c5afd7cfdaef353a992047d4dab5780" + url: "https://pub.dev" + source: hosted + version: "0.6.8+2" + camera_avfoundation: + dependency: transitive + description: + name: camera_avfoundation + sha256: "2e4c568f70e406ccb87376bc06b53d2f5bebaab71e2fbcc1a950e31449381bcf" + url: "https://pub.dev" + source: hosted + version: "0.9.17+5" + camera_platform_interface: + dependency: transitive + description: + name: camera_platform_interface + sha256: b3ede1f171532e0d83111fe0980b46d17f1aa9788a07a2fbed07366bbdbb9061 + url: "https://pub.dev" + source: hosted + version: "2.8.0" + camera_web: + dependency: transitive + description: + name: camera_web + sha256: b9235ec0a2ce949daec546f1f3d86f05c3921ed31c7d9ab6b7c03214d152fc2d + url: "https://pub.dev" + source: hosted + version: "0.3.4" + characters: + dependency: transitive + description: + name: characters + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" + source: hosted + version: "1.3.0" + charcode: + dependency: transitive + description: + name: charcode + sha256: fb98c0f6d12c920a02ee2d998da788bca066ca5f148492b7085ee23372b12306 + url: "https://pub.dev" + source: hosted + version: "1.3.1" + checked_yaml: + dependency: transitive + description: + name: checked_yaml + sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff + url: "https://pub.dev" + source: hosted + version: "2.0.3" + clock: + dependency: transitive + description: + name: clock + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" + source: hosted + version: "1.1.1" + code_builder: + dependency: transitive + description: + name: code_builder + sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37 + url: "https://pub.dev" + source: hosted + version: "4.10.0" + collection: + dependency: transitive + description: + name: collection + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + url: "https://pub.dev" + source: hosted + version: "1.18.0" + complaints: + dependency: "direct main" + description: + path: ".." + relative: true + source: path + version: "1.0.0" + convert: + dependency: transitive + description: + name: convert + sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + url: "https://pub.dev" + source: hosted + version: "3.1.1" + cross_file: + dependency: transitive + description: + name: cross_file + sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670" + url: "https://pub.dev" + source: hosted + version: "0.3.4+2" + crypto: + dependency: transitive + description: + name: crypto + sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + url: "https://pub.dev" + source: hosted + version: "3.0.3" + csslib: + dependency: transitive + description: + name: csslib + sha256: "706b5707578e0c1b4b7550f64078f0a0f19dec3f50a178ffae7006b0a9ca58fb" + url: "https://pub.dev" + source: hosted + version: "1.0.0" + cupertino_icons: + dependency: "direct main" + description: + name: cupertino_icons + sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 + url: "https://pub.dev" + source: hosted + version: "1.0.8" + dart_mappable: + dependency: transitive + description: + name: dart_mappable + sha256: "47269caf2060533c29b823ff7fa9706502355ffcb61e7f2a374e3a0fb2f2c3f0" + url: "https://pub.dev" + source: hosted + version: "4.2.2" + dart_style: + dependency: transitive + description: + name: dart_style + sha256: "99e066ce75c89d6b29903d788a7bb9369cf754f7b24bf70bf4b6d6d6b26853b9" + url: "https://pub.dev" + source: hosted + version: "2.3.6" + digit_data_model: + dependency: transitive + description: + name: digit_data_model + sha256: c3bc7299a7d927ebb83d8e91c1d7a8a51f6a1d1295dafeacb642012b72b99a2f + url: "https://pub.dev" + source: hosted + version: "1.0.5" + digit_ui_components: + dependency: transitive + description: + name: digit_ui_components + sha256: "57c4da5237be6025783e7357a02b6b492f02e38f711d674bf46f5f8c8a93ad76" + url: "https://pub.dev" + source: hosted + version: "0.0.2-dev.4" + dio: + dependency: transitive + description: + name: dio + sha256: "0dfb6b6a1979dac1c1245e17cef824d7b452ea29bd33d3467269f9bef3715fb0" + url: "https://pub.dev" + source: hosted + version: "5.6.0" + dio_web_adapter: + dependency: transitive + description: + name: dio_web_adapter + sha256: "36c5b2d79eb17cdae41e974b7a8284fec631651d2a6f39a8a2ff22327e90aeac" + url: "https://pub.dev" + source: hosted + version: "1.0.1" + dotted_border: + dependency: transitive + description: + name: dotted_border + sha256: "108837e11848ca776c53b30bc870086f84b62ed6e01c503ed976e8f8c7df9c04" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + drift: + dependency: transitive + description: + name: drift + sha256: c2d073d35ad441730812f4ea05b5dd031fb81c5f9786a4f5fb77ecd6307b6f74 + url: "https://pub.dev" + source: hosted + version: "2.22.1" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" + source: hosted + version: "1.3.1" + ffi: + dependency: transitive + description: + name: ffi + sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + file: + dependency: transitive + description: + name: file + sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" + url: "https://pub.dev" + source: hosted + version: "7.0.0" + file_picker: + dependency: transitive + description: + name: file_picker + sha256: d1d0ac3966b36dc3e66eeefb40280c17feb87fa2099c6e22e6a1fc959327bd03 + url: "https://pub.dev" + source: hosted + version: "8.0.0+1" + file_selector_linux: + dependency: transitive + description: + name: file_selector_linux + sha256: "045d372bf19b02aeb69cacf8b4009555fb5f6f0b7ad8016e5f46dd1387ddd492" + url: "https://pub.dev" + source: hosted + version: "0.9.2+1" + file_selector_macos: + dependency: transitive + description: + name: file_selector_macos + sha256: f42eacb83b318e183b1ae24eead1373ab1334084404c8c16e0354f9a3e55d385 + url: "https://pub.dev" + source: hosted + version: "0.9.4" + file_selector_platform_interface: + dependency: transitive + description: + name: file_selector_platform_interface + sha256: a3994c26f10378a039faa11de174d7b78eb8f79e4dd0af2a451410c1a5c3f66b + url: "https://pub.dev" + source: hosted + version: "2.6.2" + file_selector_windows: + dependency: transitive + description: + name: file_selector_windows + sha256: "2ad726953f6e8affbc4df8dc78b77c3b4a060967a291e528ef72ae846c60fb69" + url: "https://pub.dev" + source: hosted + version: "0.9.3+2" + fixnum: + dependency: transitive + description: + name: fixnum + sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_bloc: + dependency: transitive + description: + name: flutter_bloc + sha256: b594505eac31a0518bdcb4b5b79573b8d9117b193cc80cc12e17d639b10aa27a + url: "https://pub.dev" + source: hosted + version: "8.1.6" + flutter_dropzone: + dependency: transitive + description: + name: flutter_dropzone + sha256: b399c60411f9bf9c4c2f97933c6a3a185859e75aade8897831e76cee4346c8e1 + url: "https://pub.dev" + source: hosted + version: "3.0.7" + flutter_dropzone_platform_interface: + dependency: transitive + description: + name: flutter_dropzone_platform_interface + sha256: b4e2df75364bab2f4c3ca32b87193267d786b6e158c3f345c3a1daeb911d82b9 + url: "https://pub.dev" + source: hosted + version: "2.0.6" + flutter_dropzone_web: + dependency: transitive + description: + name: flutter_dropzone_web + sha256: c5a0fdb63b7216352a01761ec1b6eba1982e49541e60675735e2d3d95e207b19 + url: "https://pub.dev" + source: hosted + version: "3.0.13" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04 + url: "https://pub.dev" + source: hosted + version: "2.0.3" + flutter_localizations: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + flutter_plugin_android_lifecycle: + dependency: transitive + description: + name: flutter_plugin_android_lifecycle + sha256: "8cf40eebf5dec866a6d1956ad7b4f7016e6c0cc69847ab946833b7d43743809f" + url: "https://pub.dev" + source: hosted + version: "2.0.19" + flutter_spinkit: + dependency: transitive + description: + name: flutter_spinkit + sha256: d2696eed13732831414595b98863260e33e8882fc069ee80ec35d4ac9ddb0472 + url: "https://pub.dev" + source: hosted + version: "5.2.1" + flutter_styled_toast: + dependency: transitive + description: + name: flutter_styled_toast + sha256: e667f13a665820eb0fa8506547e47eacbcddf1948d6d3036cfd3b089bd4b0516 + url: "https://pub.dev" + source: hosted + version: "2.2.1" + flutter_svg: + dependency: transitive + description: + name: flutter_svg + sha256: "7b4ca6cf3304575fe9c8ec64813c8d02ee41d2afe60bcfe0678bcb5375d596a2" + url: "https://pub.dev" + source: hosted + version: "2.0.10+1" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + fluttertoast: + dependency: transitive + description: + name: fluttertoast + sha256: "81b68579e23fcbcada2db3d50302813d2371664afe6165bc78148050ab94bf66" + url: "https://pub.dev" + source: hosted + version: "8.2.5" + freezed_annotation: + dependency: transitive + description: + name: freezed_annotation + sha256: c2e2d632dd9b8a2b7751117abcfc2b4888ecfe181bd9fca7170d9ef02e595fe2 + url: "https://pub.dev" + source: hosted + version: "2.4.4" + frontend_server_client: + dependency: transitive + description: + name: frontend_server_client + sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 + url: "https://pub.dev" + source: hosted + version: "4.0.0" + geolocator: + dependency: transitive + description: + name: geolocator + sha256: f4efb8d3c4cdcad2e226af9661eb1a0dd38c71a9494b22526f9da80ab79520e5 + url: "https://pub.dev" + source: hosted + version: "10.1.1" + geolocator_android: + dependency: transitive + description: + name: geolocator_android + sha256: "7aefc530db47d90d0580b552df3242440a10fe60814496a979aa67aa98b1fd47" + url: "https://pub.dev" + source: hosted + version: "4.6.1" + geolocator_apple: + dependency: transitive + description: + name: geolocator_apple + sha256: bc2aca02423ad429cb0556121f56e60360a2b7d694c8570301d06ea0c00732fd + url: "https://pub.dev" + source: hosted + version: "2.3.7" + geolocator_platform_interface: + dependency: transitive + description: + name: geolocator_platform_interface + sha256: "386ce3d9cce47838355000070b1d0b13efb5bc430f8ecda7e9238c8409ace012" + url: "https://pub.dev" + source: hosted + version: "4.2.4" + geolocator_web: + dependency: transitive + description: + name: geolocator_web + sha256: "102e7da05b48ca6bf0a5bda0010f886b171d1a08059f01bfe02addd0175ebece" + url: "https://pub.dev" + source: hosted + version: "2.2.1" + geolocator_windows: + dependency: transitive + description: + name: geolocator_windows + sha256: "53da08937d07c24b0d9952eb57a3b474e29aae2abf9dd717f7e1230995f13f0e" + url: "https://pub.dev" + source: hosted + version: "0.2.3" + glob: + dependency: transitive + description: + name: glob + sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + google_fonts: + dependency: transitive + description: + name: google_fonts + sha256: b1ac0fe2832c9cc95e5e88b57d627c5e68c223b9657f4b96e1487aa9098c7b82 + url: "https://pub.dev" + source: hosted + version: "6.2.1" + graphs: + dependency: transitive + description: + name: graphs + sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19 + url: "https://pub.dev" + source: hosted + version: "2.3.1" + group_radio_button: + dependency: transitive + description: + name: group_radio_button + sha256: "204de8d16b224be7fc72dade0c3afd410ff5a34417d89f74f0fd8be7a8c2b4d6" + url: "https://pub.dev" + source: hosted + version: "1.3.0" + horizontal_data_table: + dependency: transitive + description: + name: horizontal_data_table + sha256: c8ab5256bbced698a729f3e0ff2cb0e8e97416cdbb082860370eaf883badf722 + url: "https://pub.dev" + source: hosted + version: "4.3.1" + html: + dependency: transitive + description: + name: html + sha256: "3a7812d5bcd2894edf53dfaf8cd640876cf6cef50a8f238745c8b8120ea74d3a" + url: "https://pub.dev" + source: hosted + version: "0.15.4" + http: + dependency: transitive + description: + name: http + sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 + url: "https://pub.dev" + source: hosted + version: "1.2.2" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" + url: "https://pub.dev" + source: hosted + version: "3.2.1" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" + source: hosted + version: "4.0.2" + image_picker: + dependency: transitive + description: + name: image_picker + sha256: "1f498d086203360cca099d20ffea2963f48c39ce91bdd8a3b6d4a045786b02c8" + url: "https://pub.dev" + source: hosted + version: "1.0.8" + image_picker_android: + dependency: transitive + description: + name: image_picker_android + sha256: "844c6da4e4f2829dffdab97816bca09d0e0977e8dcef7450864aba4e07967a58" + url: "https://pub.dev" + source: hosted + version: "0.8.9+6" + image_picker_for_web: + dependency: transitive + description: + name: image_picker_for_web + sha256: e2423c53a68b579a7c37a1eda967b8ae536c3d98518e5db95ca1fe5719a730a3 + url: "https://pub.dev" + source: hosted + version: "3.0.2" + image_picker_ios: + dependency: transitive + description: + name: image_picker_ios + sha256: fadafce49e8569257a0cad56d24438a6fa1f0cbd7ee0af9b631f7492818a4ca3 + url: "https://pub.dev" + source: hosted + version: "0.8.9+1" + image_picker_linux: + dependency: transitive + description: + name: image_picker_linux + sha256: "4ed1d9bb36f7cd60aa6e6cd479779cc56a4cb4e4de8f49d487b1aaad831300fa" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + image_picker_macos: + dependency: transitive + description: + name: image_picker_macos + sha256: "3f5ad1e8112a9a6111c46d0b57a7be2286a9a07fc6e1976fdf5be2bd31d4ff62" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + image_picker_platform_interface: + dependency: transitive + description: + name: image_picker_platform_interface + sha256: fa4e815e6fcada50e35718727d83ba1c92f1edf95c0b4436554cec301b56233b + url: "https://pub.dev" + source: hosted + version: "2.9.3" + image_picker_windows: + dependency: transitive + description: + name: image_picker_windows + sha256: "6ad07afc4eb1bc25f3a01084d28520496c4a3bb0cb13685435838167c9dcedeb" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + intl: + dependency: transitive + description: + name: intl + sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf + url: "https://pub.dev" + source: hosted + version: "0.19.0" + io: + dependency: transitive + description: + name: io + sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" + url: "https://pub.dev" + source: hosted + version: "1.0.4" + isar: + dependency: transitive + description: + name: isar + sha256: "99165dadb2cf2329d3140198363a7e7bff9bbd441871898a87e26914d25cf1ea" + url: "https://pub.dev" + source: hosted + version: "3.1.0+1" + isar_flutter_libs: + dependency: transitive + description: + name: isar_flutter_libs + sha256: bc6768cc4b9c61aabff77152e7f33b4b17d2fc93134f7af1c3dd51500fe8d5e8 + url: "https://pub.dev" + source: hosted + version: "3.1.0+1" + js: + dependency: transitive + description: + name: js + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 + url: "https://pub.dev" + source: hosted + version: "0.6.7" + 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: + name: leak_tracker + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + url: "https://pub.dev" + source: hosted + version: "10.0.4" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + url: "https://pub.dev" + source: hosted + version: "3.0.3" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" + lints: + dependency: transitive + description: + name: lints + sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + location: + dependency: transitive + description: + name: location + sha256: "37ffdadcd4b1498b769824f45ebb4de8ed46663a4a67ac27b33a590ee486579f" + url: "https://pub.dev" + source: hosted + version: "6.0.2" + location_platform_interface: + dependency: transitive + description: + name: location_platform_interface + sha256: "2ecde6bb0f88032b0bbbde37e18975b4468711dd92619c2235cc0c0ee93b4b8e" + url: "https://pub.dev" + source: hosted + version: "4.0.0" + location_web: + dependency: transitive + description: + name: location_web + sha256: "15ad7b4c8a9f55abee513373755e093a40c04d7e24fc1b4f89676fe99523d034" + url: "https://pub.dev" + source: hosted + version: "5.0.1" + logging: + dependency: transitive + description: + name: logging + sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + lottie: + dependency: transitive + description: + name: lottie + sha256: "7afc60865a2429d994144f7d66ced2ae4305fe35d82890b8766e3359872d872c" + url: "https://pub.dev" + source: hosted + version: "3.1.3" + matcher: + dependency: transitive + description: + name: matcher + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + url: "https://pub.dev" + source: hosted + version: "0.12.16+1" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + url: "https://pub.dev" + source: hosted + version: "0.8.0" + meta: + dependency: transitive + description: + name: meta + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" + url: "https://pub.dev" + source: hosted + version: "1.12.0" + mime: + dependency: transitive + description: + name: mime + sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2" + url: "https://pub.dev" + source: hosted + version: "1.0.5" + mocktail: + dependency: transitive + description: + name: mocktail + sha256: "890df3f9688106f25755f26b1c60589a92b3ab91a22b8b224947ad041bf172d8" + url: "https://pub.dev" + source: hosted + version: "1.0.4" + nested: + dependency: transitive + description: + name: nested + sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20" + url: "https://pub.dev" + source: hosted + version: "1.0.0" + overlay_builder: + dependency: transitive + description: + name: overlay_builder + sha256: "58b97bc5f67a2e2bb7006dd88e697ac757dfffc9dbd1e7dfc1917fb510a4b5c8" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + package_config: + dependency: transitive + description: + name: package_config + sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + path: + dependency: transitive + description: + name: path + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + url: "https://pub.dev" + source: hosted + version: "1.9.0" + path_drawing: + dependency: transitive + description: + name: path_drawing + sha256: bbb1934c0cbb03091af082a6389ca2080345291ef07a5fa6d6e078ba8682f977 + url: "https://pub.dev" + source: hosted + version: "1.0.1" + path_parsing: + dependency: transitive + description: + name: path_parsing + sha256: e3e67b1629e6f7e8100b367d3db6ba6af4b1f0bb80f64db18ef1fbabd2fa9ccf + url: "https://pub.dev" + source: hosted + version: "1.0.1" + path_provider: + dependency: transitive + description: + name: path_provider + sha256: fec0d61223fba3154d87759e3cc27fe2c8dc498f6386c6d6fc80d1afdd1bf378 + url: "https://pub.dev" + source: hosted + version: "2.1.4" + path_provider_android: + dependency: transitive + description: + name: path_provider_android + sha256: a248d8146ee5983446bf03ed5ea8f6533129a12b11f12057ad1b4a67a2b3b41d + url: "https://pub.dev" + source: hosted + version: "2.2.4" + path_provider_foundation: + dependency: transitive + description: + name: path_provider_foundation + sha256: "5a7999be66e000916500be4f15a3633ebceb8302719b47b9cc49ce924125350f" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + path_provider_linux: + dependency: transitive + description: + name: path_provider_linux + sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 + url: "https://pub.dev" + source: hosted + version: "2.2.1" + path_provider_platform_interface: + dependency: transitive + description: + name: path_provider_platform_interface + sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + path_provider_windows: + dependency: transitive + description: + name: path_provider_windows + sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 + url: "https://pub.dev" + source: hosted + version: "2.3.0" + petitparser: + dependency: transitive + description: + name: petitparser + sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27 + url: "https://pub.dev" + source: hosted + version: "6.0.2" + platform: + dependency: transitive + description: + name: platform + sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" + url: "https://pub.dev" + source: hosted + version: "3.1.5" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" + url: "https://pub.dev" + source: hosted + version: "2.1.8" + pool: + dependency: transitive + description: + name: pool + sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" + url: "https://pub.dev" + source: hosted + version: "1.5.1" + provider: + dependency: transitive + description: + name: provider + sha256: c8a055ee5ce3fd98d6fc872478b03823ffdb448699c6ebdbbc71d59b596fd48c + url: "https://pub.dev" + source: hosted + version: "6.1.2" + pub_semver: + dependency: transitive + description: + name: pub_semver + sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + pubspec_parse: + dependency: transitive + description: + name: pubspec_parse + sha256: c799b721d79eb6ee6fa56f00c04b472dcd44a30d258fac2174a6ec57302678f8 + url: "https://pub.dev" + source: hosted + version: "1.3.0" + reactive_forms: + dependency: transitive + description: + name: reactive_forms + sha256: "9b1fb18e0aae9c50cfa0aaabaaa38bc4d78eefc9b7b95fa9c947b051f6524b8e" + url: "https://pub.dev" + source: hosted + version: "17.0.1" + recase: + dependency: transitive + description: + name: recase + sha256: e4eb4ec2dcdee52dcf99cb4ceabaffc631d7424ee55e56f280bc039737f89213 + url: "https://pub.dev" + source: hosted + version: "4.1.0" + shelf: + dependency: transitive + description: + name: shelf + sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 + url: "https://pub.dev" + source: hosted + version: "1.4.1" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" + url: "https://pub.dev" + source: hosted + version: "1.0.4" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.99" + source_span: + dependency: transitive + description: + name: source_span + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" + source: hosted + version: "1.10.0" + sprintf: + dependency: transitive + description: + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" + url: "https://pub.dev" + source: hosted + version: "7.0.0" + sqlite3: + dependency: transitive + description: + name: sqlite3 + sha256: bb174b3ec2527f9c5f680f73a89af8149dd99782fbb56ea88ad0807c5638f2ed + url: "https://pub.dev" + source: hosted + version: "2.4.7" + sqlite3_flutter_libs: + dependency: transitive + description: + name: sqlite3_flutter_libs + sha256: "62bbb4073edbcdf53f40c80775f33eea01d301b7b81417e5b3fb7395416258c1" + url: "https://pub.dev" + source: hosted + version: "0.5.24" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + url: "https://pub.dev" + source: hosted + version: "1.11.1" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + url: "https://pub.dev" + source: hosted + version: "2.1.2" + stream_transform: + dependency: transitive + description: + name: stream_transform + sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" + source: hosted + version: "1.2.1" + test_api: + dependency: transitive + description: + name: test_api + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" + url: "https://pub.dev" + source: hosted + version: "0.7.0" + timing: + dependency: transitive + description: + name: timing + sha256: "70a3b636575d4163c477e6de42f247a23b315ae20e86442bebe32d3cabf61c32" + url: "https://pub.dev" + source: hosted + version: "1.0.1" + type_plus: + dependency: transitive + description: + name: type_plus + sha256: d5d1019471f0d38b91603adb9b5fd4ce7ab903c879d2fbf1a3f80a630a03fcc9 + url: "https://pub.dev" + source: hosted + version: "2.1.1" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + url: "https://pub.dev" + source: hosted + version: "1.3.2" + universal_html: + dependency: transitive + description: + name: universal_html + sha256: "56536254004e24d9d8cfdb7dbbf09b74cf8df96729f38a2f5c238163e3d58971" + url: "https://pub.dev" + source: hosted + version: "2.2.4" + universal_io: + dependency: transitive + description: + name: universal_io + sha256: "1722b2dcc462b4b2f3ee7d188dad008b6eb4c40bbd03a3de451d82c78bba9aad" + url: "https://pub.dev" + source: hosted + version: "2.2.2" + url_launcher: + dependency: transitive + description: + name: url_launcher + sha256: "6ce1e04375be4eed30548f10a315826fd933c1e493206eab82eed01f438c8d2e" + url: "https://pub.dev" + source: hosted + version: "6.2.6" + url_launcher_android: + dependency: transitive + description: + name: url_launcher_android + sha256: "17cd5e205ea615e2c6ea7a77323a11712dffa0720a8a90540db57a01347f9ad9" + url: "https://pub.dev" + source: hosted + version: "6.3.2" + url_launcher_ios: + dependency: transitive + description: + name: url_launcher_ios + sha256: "75bb6fe3f60070407704282a2d295630cab232991eb52542b18347a8a941df03" + url: "https://pub.dev" + source: hosted + version: "6.2.4" + url_launcher_linux: + dependency: transitive + description: + name: url_launcher_linux + sha256: ab360eb661f8879369acac07b6bb3ff09d9471155357da8443fd5d3cf7363811 + url: "https://pub.dev" + source: hosted + version: "3.1.1" + url_launcher_macos: + dependency: transitive + description: + name: url_launcher_macos + sha256: "9a1a42d5d2d95400c795b2914c36fdcb525870c752569438e4ebb09a2b5d90de" + url: "https://pub.dev" + source: hosted + version: "3.2.0" + url_launcher_platform_interface: + dependency: transitive + description: + name: url_launcher_platform_interface + sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + url_launcher_web: + dependency: transitive + description: + name: url_launcher_web + sha256: "772638d3b34c779ede05ba3d38af34657a05ac55b06279ea6edd409e323dca8e" + url: "https://pub.dev" + source: hosted + version: "2.3.3" + url_launcher_windows: + dependency: transitive + description: + name: url_launcher_windows + sha256: "49c10f879746271804767cb45551ec5592cdab00ee105c06dddde1a98f73b185" + url: "https://pub.dev" + source: hosted + version: "3.1.2" + uuid: + dependency: transitive + description: + name: uuid + sha256: a5be9ef6618a7ac1e964353ef476418026db906c4facdedaa299b7a2e71690ff + url: "https://pub.dev" + source: hosted + version: "4.5.1" + vector_graphics: + dependency: transitive + description: + name: vector_graphics + sha256: "32c3c684e02f9bc0afb0ae0aa653337a2fe022e8ab064bcd7ffda27a74e288e3" + url: "https://pub.dev" + source: hosted + version: "1.1.11+1" + vector_graphics_codec: + dependency: transitive + description: + name: vector_graphics_codec + sha256: c86987475f162fadff579e7320c7ddda04cd2fdeffbe1129227a85d9ac9e03da + url: "https://pub.dev" + source: hosted + version: "1.1.11+1" + vector_graphics_compiler: + dependency: transitive + description: + name: vector_graphics_compiler + sha256: "12faff3f73b1741a36ca7e31b292ddeb629af819ca9efe9953b70bd63fc8cd81" + url: "https://pub.dev" + source: hosted + version: "1.1.11+1" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + visibility_detector: + dependency: transitive + description: + name: visibility_detector + sha256: dd5cc11e13494f432d15939c3aa8ae76844c42b723398643ce9addb88a5ed420 + url: "https://pub.dev" + source: hosted + version: "0.4.0+2" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" + url: "https://pub.dev" + source: hosted + version: "14.2.1" + watcher: + dependency: transitive + description: + name: watcher + sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + web: + dependency: transitive + description: + name: web + sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb + url: "https://pub.dev" + source: hosted + version: "1.1.0" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b + url: "https://pub.dev" + source: hosted + version: "2.4.0" + win32: + dependency: transitive + description: + name: win32 + sha256: "464f5674532865248444b4c3daca12bd9bf2d7c47f759ce2617986e7229494a8" + url: "https://pub.dev" + source: hosted + version: "5.2.0" + xdg_directories: + dependency: transitive + description: + name: xdg_directories + sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d + url: "https://pub.dev" + source: hosted + version: "1.0.4" + 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: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" + url: "https://pub.dev" + source: hosted + version: "3.1.2" +sdks: + dart: ">=3.4.0 <4.0.0" + flutter: ">=3.22.0" diff --git a/packages/complaints/example/pubspec.yaml b/packages/complaints/example/pubspec.yaml new file mode 100644 index 000000000..f582f74fe --- /dev/null +++ b/packages/complaints/example/pubspec.yaml @@ -0,0 +1,97 @@ +name: example +description: "A new Flutter project." +# The following line prevents the package from being accidentally published to +# pub.dev using `flutter pub publish`. This is preferred for private packages. +publish_to: 'none' # Remove this line if you wish to publish to pub.dev + +# The following defines the version and build number for your application. +# A version number is three numbers separated by dots, like 1.2.43 +# followed by an optional build number separated by a +. +# Both the version and the builder number may be overridden in flutter +# build by specifying --build-name and --build-number, respectively. +# In Android, build-name is used as versionName while build-number used as versionCode. +# Read more about Android versioning at https://developer.android.com/studio/publish/versioning +# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion. +# Read more about iOS versioning at +# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html +# In Windows, build-name is used as the major, minor, and patch parts +# of the product and file versions while build-number is used as the build suffix. +version: 1.0.0+1 + +environment: + sdk: '>=3.0.0 <4.0.0' + +# Dependencies specify other packages that your package needs in order to work. +# To automatically upgrade your package dependencies to the latest versions +# consider running `flutter pub upgrade --major-versions`. Alternatively, +# dependencies can be manually updated by changing the version numbers below to +# the latest version available on pub.dev. To see which dependencies have newer +# versions available, run `flutter pub outdated`. +dependencies: + flutter: + sdk: flutter + + + # The following adds the Cupertino Icons font to your application. + # Use with the CupertinoIcons class for iOS style icons. + cupertino_icons: ^1.0.2 + complaints: + path: ../ + + + +dev_dependencies: + flutter_test: + sdk: flutter + + # The "flutter_lints" package below contains a set of recommended lints to + # encourage good coding practices. The lint set provided by the package is + # activated in the `analysis_options.yaml` file located at the root of your + # package. See that file for information about deactivating specific lint + # rules and activating additional ones. + flutter_lints: ^2.0.0 + + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter packages. +flutter: + + # The following line ensures that the Material Icons font is + # included with your application, so that you can use the icons in + # the material Icons class. + uses-material-design: true + assets: + - lib/localization_strings.json + + # To add assets to your application, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/assets-and-images/#resolution-aware + + # For details regarding adding assets from package dependencies, see + # https://flutter.dev/assets-and-images/#from-packages + + # To add custom fonts to your application, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts from package dependencies, + # see https://flutter.dev/custom-fonts/#from-packages diff --git a/apps/health_campaign_field_worker_app/lib/blocs/complaints_inbox/complaints_inbox.dart b/packages/complaints/lib/blocs/complaints_inbox/complaints_inbox.dart similarity index 83% rename from apps/health_campaign_field_worker_app/lib/blocs/complaints_inbox/complaints_inbox.dart rename to packages/complaints/lib/blocs/complaints_inbox/complaints_inbox.dart index 9bfb05c5f..689327ddf 100644 --- a/apps/health_campaign_field_worker_app/lib/blocs/complaints_inbox/complaints_inbox.dart +++ b/packages/complaints/lib/blocs/complaints_inbox/complaints_inbox.dart @@ -1,26 +1,30 @@ // GENERATED using mason_cli import 'dart:async'; +import 'package:digit_data_model/models/entities/pgr_application_status.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; -import 'package:digit_data_model/data_model.dart'; -import '../../models/complaints/complaints.dart'; -import '../../utils/environment_config.dart'; -import '../../utils/typedefs.dart'; +import '../../data/repositories/local/pgr_service.dart'; +import '../../data/repositories/remote/pgr_service.dart'; +import '../../models/pgr_complaints.dart'; +import '/models/complaints.dart'; +import '/utils/typedefs.dart'; +import '/utils/utils.dart'; part 'complaints_inbox.freezed.dart'; typedef ComplaintsInboxEmitter = Emitter; +/// Complaint inbox Bloc for Loading Complaints, Filtering Complaints, Sorting Complaints and Searching Complaints class ComplaintsInboxBloc extends Bloc { final PgrServiceDataRepository pgrRepository; ComplaintsInboxBloc( - super.initialState, { - required this.pgrRepository, - }) { + super.initialState, { + required this.pgrRepository, + }) { on(_handleLoadComplaints); on(_handleFilterComplaints); on(_handleSortComplaints); @@ -28,9 +32,9 @@ class ComplaintsInboxBloc } FutureOr _handleLoadComplaints( - ComplaintInboxLoadComplaintsEvent event, - ComplaintsInboxEmitter emit, - ) async { + ComplaintInboxLoadComplaintsEvent event, + ComplaintsInboxEmitter emit, + ) async { if (event.updatedModels != null) { emit(state.copyWith( complaints: event.updatedModels!, @@ -45,14 +49,14 @@ class ComplaintsInboxBloc if (pgrRepository is PgrServiceLocalRepository) { complaints = await (pgrRepository as PgrServiceLocalRepository).search( PgrServiceSearchModel( - tenantId: envConfig.variables.tenantId, + tenantId: ComplaintsSingleton().tenantId ), event.createdByUserId, ); } else if (pgrRepository is PgrServiceRemoteRepository) { complaints = await pgrRepository.search( PgrServiceSearchModel( - tenantId: envConfig.variables.tenantId, + tenantId: ComplaintsSingleton().tenantId ), ); } @@ -65,9 +69,9 @@ class ComplaintsInboxBloc } FutureOr _handleFilterComplaints( - ComplaintInboxFilterComplaintsEvent event, - ComplaintsInboxEmitter emit, - ) async { + ComplaintInboxFilterComplaintsEvent event, + ComplaintsInboxEmitter emit, + ) async { emit(state.copyWith(loading: true)); List complaints = []; @@ -75,7 +79,7 @@ class ComplaintsInboxBloc if (pgrRepository is PgrServiceLocalRepository) { complaints = await (pgrRepository as PgrServiceLocalRepository).search( PgrServiceSearchModel( - tenantId: envConfig.variables.tenantId, + tenantId: ComplaintsSingleton().tenantId, complaintAssignedTo: event.complaintAssignedTo, currentUserName: event.currentUserName, complaintStatus: event.complaintStatus, @@ -87,7 +91,7 @@ class ComplaintsInboxBloc } else if (pgrRepository is PgrServiceRemoteRepository) { complaints = await pgrRepository.search( PgrServiceSearchModel( - tenantId: envConfig.variables.tenantId, + tenantId: ComplaintsSingleton().tenantId, complaintAssignedTo: event.complaintAssignedTo, currentUserName: event.currentUserName, complaintStatus: event.complaintStatus, @@ -114,16 +118,16 @@ class ComplaintsInboxBloc } FutureOr _handleSortComplaints( - ComplaintInboxSortComplaintsEvent event, - ComplaintsInboxEmitter emit, - ) async { + ComplaintInboxSortComplaintsEvent event, + ComplaintsInboxEmitter emit, + ) async { var listToSort = (state.filteredComplaints.isNotEmpty) ? [...state.filteredComplaints] : [...state.complaints]; if (event.sortOrder == "COMPLAINT_SORT_DATE_ASC") { listToSort.sort( - (a, b) { + (a, b) { final d1 = a.auditDetails?.createdTime ?? 0; final d2 = b.auditDetails?.createdTime ?? 0; @@ -132,7 +136,7 @@ class ComplaintsInboxBloc ); } else { listToSort.sort( - (a, b) { + (a, b) { final d1 = b.auditDetails?.createdTime ?? 0; final d2 = a.auditDetails?.createdTime ?? 0; @@ -149,9 +153,9 @@ class ComplaintsInboxBloc } FutureOr _handleSearchComplaints( - ComplaintInboxSearchComplaintsEvent event, - ComplaintsInboxEmitter emit, - ) async { + ComplaintInboxSearchComplaintsEvent event, + ComplaintsInboxEmitter emit, + ) async { emit(state.copyWith(loading: true)); emit(state.copyWith( @@ -177,7 +181,7 @@ class ComplaintsInboxBloc if (pgrRepository is PgrServiceLocalRepository) { complaints = await (pgrRepository as PgrServiceLocalRepository).search( PgrServiceSearchModel( - tenantId: envConfig.variables.tenantId, + tenantId: ComplaintsSingleton().tenantId, complaintNumber: event.complaintNumber, complainantMobileNumber: event.mobileNumber, ), @@ -186,7 +190,7 @@ class ComplaintsInboxBloc } else if (pgrRepository is PgrServiceRemoteRepository) { complaints = await pgrRepository.search( PgrServiceSearchModel( - tenantId: envConfig.variables.tenantId, + tenantId: ComplaintsSingleton().tenantId, complaintNumber: event.complaintNumber, complainantMobileNumber: event.mobileNumber, ), diff --git a/apps/health_campaign_field_worker_app/lib/blocs/complaints_inbox/complaints_inbox.freezed.dart b/packages/complaints/lib/blocs/complaints_inbox/complaints_inbox.freezed.dart similarity index 100% rename from apps/health_campaign_field_worker_app/lib/blocs/complaints_inbox/complaints_inbox.freezed.dart rename to packages/complaints/lib/blocs/complaints_inbox/complaints_inbox.freezed.dart diff --git a/apps/health_campaign_field_worker_app/lib/blocs/complaints_registration/complaints_registration.dart b/packages/complaints/lib/blocs/complaints_registration/complaints_registration.dart similarity index 91% rename from apps/health_campaign_field_worker_app/lib/blocs/complaints_registration/complaints_registration.dart rename to packages/complaints/lib/blocs/complaints_registration/complaints_registration.dart index 2f08d9f79..145d775b7 100644 --- a/apps/health_campaign_field_worker_app/lib/blocs/complaints_registration/complaints_registration.dart +++ b/packages/complaints/lib/blocs/complaints_registration/complaints_registration.dart @@ -2,18 +2,22 @@ import 'dart:async'; import 'package:digit_data_model/data_model.dart'; +import 'package:digit_data_model/models/entities/pgr_application_status.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; -import '../../models/complaints/complaints.dart'; -import '../../models/entities/additional_fields_type.dart'; -import '../../utils/environment_config.dart'; -import '../../utils/typedefs.dart'; +import '../../models/pgr_address.dart'; +import '../../models/pgr_complaints.dart'; +import '/models/complaints.dart'; +import '/models/entities/additional_fields_type.dart'; +import '/utils/typedefs.dart'; +import '/utils/utils.dart'; part 'complaints_registration.freezed.dart'; typedef ComplaintsRegistrationEmitter = Emitter; +/// Complaints Registration Bloc for managing Complaint state (i.e. complaint type, complaint location and complaint details) class ComplaintsRegistrationBloc extends Bloc { final PgrServiceDataRepository pgrServiceRepository; @@ -28,10 +32,12 @@ class ComplaintsRegistrationBloc on(_handleSubmitComplaints); } + FutureOr _handleSaveComplaintType( ComplaintsRegistrationSaveComplaintTypeEvent event, ComplaintsRegistrationEmitter emit, ) async { + state.maybeMap( orElse: () => throw (const InvalidComplaintsRegistrationStateException()), create: (value) { @@ -83,9 +89,12 @@ class ComplaintsRegistrationBloc ComplaintsRegistrationSubmitComplaintEvent event, ComplaintsRegistrationEmitter emit, ) async { + + await state.maybeMap( orElse: () => throw (const InvalidComplaintsRegistrationStateException()), create: (value) async { + emit(value.copyWith(loading: true)); final serviceCode = value.complaintType; @@ -93,13 +102,14 @@ class ComplaintsRegistrationBloc value.otherComplaintTypeDescription; final complaintDetailsModel = value.complaintsDetailsModel; final address = value.addressModel; - if (serviceCode == null) { throw (const InvalidComplaintsRegistrationStateException( 'Complaint type is not provided', )); } + + if (complaintDetailsModel == null) { throw (const InvalidComplaintsRegistrationStateException( 'Complaint details are not provided', @@ -125,13 +135,15 @@ class ComplaintsRegistrationBloc final pgrServiceModel = PgrServiceModel( clientReferenceId: referenceId, - tenantId: envConfig.variables.tenantId, + tenantId: ComplaintsSingleton().tenantId, serviceCode: serviceCode, description: description, + source: AdditionalFieldsType.mobile.toValue(), + /// created Enum for application status in Digit Data model entities and using it here applicationStatus: PgrServiceApplicationStatus.created, user: PgrComplainantModel( - tenantId: envConfig.variables.tenantId, + tenantId: ComplaintsSingleton().tenantId, clientReferenceId: IdGen.i.identifier, complaintClientReferenceId: referenceId, name: complaintDetailsModel.complainantName, diff --git a/apps/health_campaign_field_worker_app/lib/blocs/complaints_registration/complaints_registration.freezed.dart b/packages/complaints/lib/blocs/complaints_registration/complaints_registration.freezed.dart similarity index 100% rename from apps/health_campaign_field_worker_app/lib/blocs/complaints_registration/complaints_registration.freezed.dart rename to packages/complaints/lib/blocs/complaints_registration/complaints_registration.freezed.dart diff --git a/packages/complaints/lib/blocs/localization/app_localization.dart b/packages/complaints/lib/blocs/localization/app_localization.dart new file mode 100644 index 000000000..7d1980c19 --- /dev/null +++ b/packages/complaints/lib/blocs/localization/app_localization.dart @@ -0,0 +1,51 @@ +import 'package:flutter/material.dart'; + +import '/blocs/localization/complaints_localization_delegate.dart'; + +// Class responsible for handling complaints localization +class ComplaintsLocalization { + final Locale locale; + final Future localizedStrings; + final List languages; + + ComplaintsLocalization(this.locale, this.localizedStrings, this.languages); + + // Method to get the current localization instance from context + static ComplaintsLocalization of(BuildContext context) { + return Localizations.of( + context, ComplaintsLocalization)!; + } + + static final List _localizedStrings = []; + + // Method to get the delegate for localization + static LocalizationsDelegate getDelegate( + Future localizedStrings, List languages) => + ComplaintsLocalizationDelegate(localizedStrings, languages); + + // Method to load localized strings + Future load() async { + _localizedStrings.clear(); + // Iterate over localized strings and filter based on locale + for (var element in await localizedStrings) { + if (element.locale == '${locale.languageCode}_${locale.countryCode}') { + _localizedStrings.add(element); + } + } + + return true; + } + + // Method to translate a given localized value + String translate(String localizedValues) { + if (_localizedStrings.isEmpty) { + return localizedValues; + } else { + final index = _localizedStrings.indexWhere( + (medium) => medium.code == localizedValues, + ); + + return index != -1 ? _localizedStrings[index].message : localizedValues; + } + } +} \ No newline at end of file diff --git a/packages/complaints/lib/blocs/localization/complaints_localization_delegate.dart b/packages/complaints/lib/blocs/localization/complaints_localization_delegate.dart new file mode 100644 index 000000000..cc94a2ad5 --- /dev/null +++ b/packages/complaints/lib/blocs/localization/complaints_localization_delegate.dart @@ -0,0 +1,34 @@ +import 'package:flutter/material.dart'; + +import 'app_localization.dart'; + +class ComplaintsLocalizationDelegate + extends LocalizationsDelegate { + final Future localizedStrings; + final List languages; + + const ComplaintsLocalizationDelegate(this.localizedStrings, this.languages); + + @override + bool isSupported(Locale locale) { + return languages.map((e) { + final results = e.value.split('_'); + if (results.isNotEmpty) return results.first; + }).contains(locale.languageCode); + } + + @override + Future load(Locale locale) async { + ComplaintsLocalization localization = + ComplaintsLocalization(locale, localizedStrings, languages); + await localization.load(); + + return localization; + } + + @override + bool shouldReload( + covariant LocalizationsDelegate old) { + return true; + } +} diff --git a/packages/complaints/lib/complaints.dart b/packages/complaints/lib/complaints.dart new file mode 100644 index 000000000..6b79e911e --- /dev/null +++ b/packages/complaints/lib/complaints.dart @@ -0,0 +1,29 @@ +@MappableLib( + generateInitializerForScope: InitializerScope.package, +) + +library complaints; + + +import 'package:dart_mappable/dart_mappable.dart'; +export 'pages/inbox/complaints_inbox_wrapper.dart'; +export 'pages/inbox/complaints_details_view.dart'; +export 'pages/inbox/complaints_inbox.dart'; +export 'pages/inbox/complaints_inbox_filter.dart'; +export 'pages/inbox/complaints_inbox_search.dart'; +export 'pages/inbox/complaints_inbox_sort.dart'; +export 'pages/registration/complaint_type.dart'; +export 'pages/registration/complaints_details.dart'; +export 'pages/registration/complaints_location.dart'; +export 'pages/registration/complaints_registration_wrapper.dart'; +export 'pages/complaints_acknowledgement.dart'; +export 'utils/utils.dart'; +export 'models/complaints.dart'; +export 'models/pgr_complaints.dart'; +export 'models/pgr_address.dart'; +export 'models/pgr_complaints_response.dart'; +export 'data/repositories/local/pgr_service.dart'; +export 'data/repositories/remote/pgr_service.dart'; +export 'data/repositories/oplog/oplog.dart'; +export 'blocs/complaints_inbox/complaints_inbox.dart'; +export 'blocs/complaints_registration/complaints_registration.dart'; \ No newline at end of file diff --git a/packages/complaints/lib/complaints.init.dart b/packages/complaints/lib/complaints.init.dart new file mode 100644 index 000000000..58b0922f9 --- /dev/null +++ b/packages/complaints/lib/complaints.init.dart @@ -0,0 +1,28 @@ +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element + +import 'models/entities/additional_fields_type.dart' as p0; +import 'models/pgr_address.dart' as p1; +import 'models/pgr_complaints.dart' as p2; +import 'models/pgr_complaints_response.dart' as p3; + +void initializeMappers() { + p0.AdditionalFieldsTypeMapper.ensureInitialized(); + p1.PgrAddressModelMapper.ensureInitialized(); + p1.GeoLocationMapper.ensureInitialized(); + p2.PgrComplaintModelMapper.ensureInitialized(); + p2.PgrComplainantModelMapper.ensureInitialized(); + p2.PgrRolesModelMapper.ensureInitialized(); + p2.PgrServiceSearchModelMapper.ensureInitialized(); + p2.PgrServiceModelMapper.ensureInitialized(); + p2.PgrWorkflowModelMapper.ensureInitialized(); + p2.PgrFiltersMapper.ensureInitialized(); + p2.PgrSearchKeysMapper.ensureInitialized(); + p2.PgrAdditionalDetailsMapper.ensureInitialized(); + p3.PgrServiceCreateResponseModelMapper.ensureInitialized(); + p3.PgrComplaintResponseModelMapper.ensureInitialized(); + p3.PgrComplainantResponseModelMapper.ensureInitialized(); + p3.PgrServiceResponseModelMapper.ensureInitialized(); +} diff --git a/packages/digit_data_model/lib/data/repositories/local/pgr_service.dart b/packages/complaints/lib/data/repositories/local/pgr_service.dart similarity index 98% rename from packages/digit_data_model/lib/data/repositories/local/pgr_service.dart rename to packages/complaints/lib/data/repositories/local/pgr_service.dart index ecdae8103..5b2283941 100644 --- a/packages/digit_data_model/lib/data/repositories/local/pgr_service.dart +++ b/packages/complaints/lib/data/repositories/local/pgr_service.dart @@ -3,6 +3,10 @@ import 'dart:async'; import 'package:digit_data_model/data_model.dart'; import 'package:drift/drift.dart'; +import '../../../models/pgr_address.dart'; +import '../../../models/pgr_complaints.dart'; + +// This will create , update and search data from local Repository class PgrServiceLocalRepository extends LocalRepository { PgrServiceLocalRepository(super.sql, super.opLogManager); @@ -189,7 +193,6 @@ class PgrServiceLocalRepository code: address.localityBoundaryCode ?? "", ), - /// boundary: address.boundary, geoLocation: GeoLocation( latitude: address.latitude, longitude: address.longitude, diff --git a/packages/complaints/lib/data/repositories/oplog/oplog.dart b/packages/complaints/lib/data/repositories/oplog/oplog.dart new file mode 100644 index 000000000..6472721fc --- /dev/null +++ b/packages/complaints/lib/data/repositories/oplog/oplog.dart @@ -0,0 +1,95 @@ +import 'dart:async'; + +import 'package:digit_data_model/data_model.dart'; +import 'package:isar/isar.dart'; + +import '../../../models/pgr_complaints.dart'; + +class PgrServiceOpLogManager extends OpLogManager { + PgrServiceOpLogManager(super.isar); + + @override + PgrServiceModel applyServerGeneratedIdToEntity( + PgrServiceModel entity, + String serverGeneratedId, + int rowVersion, + ) => + entity.copyWith( + serviceRequestId: serverGeneratedId, + rowVersion: rowVersion, + ); + + @override + String getClientReferenceId(PgrServiceModel entity) { + return entity.clientReferenceId; + } + + @override + String? getServerGeneratedId(PgrServiceModel entity) { + return entity.serviceRequestId; + } + + @override + int? getRowVersion(PgrServiceModel entity) => entity.rowVersion; + + @override + bool? getNonRecoverableError(PgrServiceModel entity) => + entity.nonRecoverableError; + + @override + Future>> getPendingUpSync( + DataModelType type, { + required String createdBy, + }) async { + final pendingEntries = await isar.opLogs + .filter() + .entityTypeEqualTo(type) + .operationEqualTo(DataOperation.create) + .serverGeneratedIdIsNull() + .syncedUpEqualTo(false) + .syncedDownEqualTo(false) + .createdByEqualTo(createdBy) + .sortByCreatedAt() + .findAll(); + + final entriesList = pendingEntries.map((e) { + return OpLogEntry.fromOpLog(e); + }).toList(); + + return entriesList; + } + +//Note: PendingDownSync is not required for PGR Create Oplogs. This creates Mapper Exception issue for checking pending downsync entries of complaints type +// @override +// Future>> getPendingDownSync( +// DataModelType type, { +// required String createdBy, +// }) async { +// final pendingEntries = await isar.opLogs +// .filter() +// .entityTypeEqualTo(type) +// .serverGeneratedIdIsNotNull() +// .syncedUpEqualTo(true) +// .syncedDownEqualTo(false) +// .createdByEqualTo(createdBy) +// .sortByCreatedAt() +// .findAll(); +// +// final entriesList = pendingEntries +// .map((e) { +// final entity = e.getEntity(); +// if ([ +// PgrServiceApplicationStatus.created, +// PgrServiceApplicationStatus.pendingAssignment, +// ].contains(entity.applicationStatus)) { +// return OpLogEntry.fromOpLog(e); +// } +// +// return null; +// }) +// .whereNotNull() +// .toList(); +// +// return entriesList; +// } +} diff --git a/packages/digit_data_model/lib/data/repositories/remote/pgr_service.dart b/packages/complaints/lib/data/repositories/remote/pgr_service.dart similarity index 94% rename from packages/digit_data_model/lib/data/repositories/remote/pgr_service.dart rename to packages/complaints/lib/data/repositories/remote/pgr_service.dart index 0e11a5a89..6db675651 100644 --- a/packages/digit_data_model/lib/data/repositories/remote/pgr_service.dart +++ b/packages/complaints/lib/data/repositories/remote/pgr_service.dart @@ -3,6 +3,10 @@ import 'dart:async'; import 'package:digit_data_model/data_model.dart'; import 'package:dio/dio.dart'; +import '../../../models/pgr_complaints.dart'; +import '../../../models/pgr_complaints_response.dart'; + +// This will create , update and search data from remote Repository class PgrServiceRemoteRepository extends RemoteRepository { PgrServiceRemoteRepository( diff --git a/apps/health_campaign_field_worker_app/lib/models/complaints/complaints.dart b/packages/complaints/lib/models/complaints.dart similarity index 100% rename from apps/health_campaign_field_worker_app/lib/models/complaints/complaints.dart rename to packages/complaints/lib/models/complaints.dart diff --git a/apps/health_campaign_field_worker_app/lib/models/complaints/complaints.freezed.dart b/packages/complaints/lib/models/complaints.freezed.dart similarity index 100% rename from apps/health_campaign_field_worker_app/lib/models/complaints/complaints.freezed.dart rename to packages/complaints/lib/models/complaints.freezed.dart diff --git a/apps/health_campaign_field_worker_app/lib/models/complaints/complaints.g.dart b/packages/complaints/lib/models/complaints.g.dart similarity index 100% rename from apps/health_campaign_field_worker_app/lib/models/complaints/complaints.g.dart rename to packages/complaints/lib/models/complaints.g.dart diff --git a/packages/complaints/lib/models/entities/additional_fields_type.dart b/packages/complaints/lib/models/entities/additional_fields_type.dart new file mode 100644 index 000000000..32370f908 --- /dev/null +++ b/packages/complaints/lib/models/entities/additional_fields_type.dart @@ -0,0 +1,10 @@ +// Generated using mason. Do not modify by hand +import 'package:dart_mappable/dart_mappable.dart'; + +part 'additional_fields_type.mapper.dart'; +@MappableEnum(caseStyle: CaseStyle.upperCase) +enum AdditionalFieldsType { + @MappableValue("mobile") mobile, + @MappableValue("EMPLOYEE") employee, + ; +} \ No newline at end of file diff --git a/packages/complaints/lib/models/entities/additional_fields_type.mapper.dart b/packages/complaints/lib/models/entities/additional_fields_type.mapper.dart new file mode 100644 index 000000000..256792837 --- /dev/null +++ b/packages/complaints/lib/models/entities/additional_fields_type.mapper.dart @@ -0,0 +1,53 @@ +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member +// ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter + +part of 'additional_fields_type.dart'; + +class AdditionalFieldsTypeMapper extends EnumMapper { + AdditionalFieldsTypeMapper._(); + + static AdditionalFieldsTypeMapper? _instance; + static AdditionalFieldsTypeMapper ensureInitialized() { + if (_instance == null) { + MapperContainer.globals.use(_instance = AdditionalFieldsTypeMapper._()); + } + return _instance!; + } + + static AdditionalFieldsType fromValue(dynamic value) { + ensureInitialized(); + return MapperContainer.globals.fromValue(value); + } + + @override + AdditionalFieldsType decode(dynamic value) { + switch (value) { + case "mobile": + return AdditionalFieldsType.mobile; + case "EMPLOYEE": + return AdditionalFieldsType.employee; + default: + throw MapperException.unknownEnumValue(value); + } + } + + @override + dynamic encode(AdditionalFieldsType self) { + switch (self) { + case AdditionalFieldsType.mobile: + return "mobile"; + case AdditionalFieldsType.employee: + return "EMPLOYEE"; + } + } +} + +extension AdditionalFieldsTypeMapperExtension on AdditionalFieldsType { + dynamic toValue() { + AdditionalFieldsTypeMapper.ensureInitialized(); + return MapperContainer.globals.toValue(this); + } +} diff --git a/packages/complaints/lib/models/entities/complaint_types.dart b/packages/complaints/lib/models/entities/complaint_types.dart new file mode 100644 index 000000000..21b8fb33a --- /dev/null +++ b/packages/complaints/lib/models/entities/complaint_types.dart @@ -0,0 +1,5 @@ + +class ComplaintTypes { + late String name; + late String code; +} diff --git a/packages/digit_data_model/lib/models/pgr_complaints/pgr_address.dart b/packages/complaints/lib/models/pgr_address.dart similarity index 99% rename from packages/digit_data_model/lib/models/pgr_complaints/pgr_address.dart rename to packages/complaints/lib/models/pgr_address.dart index 8ad0b89e3..195b74e08 100644 --- a/packages/digit_data_model/lib/models/pgr_complaints/pgr_address.dart +++ b/packages/complaints/lib/models/pgr_address.dart @@ -49,10 +49,8 @@ class PgrAddressModel extends EntityModel with PgrAddressModelMappable { this.isDeleted, this.rowVersion, super.auditDetails, - }) : super(isDeleted: false); - AddressCompanion get companion { return AddressCompanion( auditCreatedBy: Value(auditDetails?.createdBy), diff --git a/packages/digit_data_model/lib/models/pgr_complaints/pgr_address.mapper.dart b/packages/complaints/lib/models/pgr_address.mapper.dart similarity index 97% rename from packages/digit_data_model/lib/models/pgr_complaints/pgr_address.mapper.dart rename to packages/complaints/lib/models/pgr_address.mapper.dart index 9eeb30f87..3bfdb6804 100644 --- a/packages/digit_data_model/lib/models/pgr_complaints/pgr_address.mapper.dart +++ b/packages/complaints/lib/models/pgr_address.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'pgr_address.dart'; @@ -181,10 +181,8 @@ mixin PgrAddressModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - PgrAddressModelMapper.ensureInitialized() - .isValueEqual(this as PgrAddressModel, other)); + return PgrAddressModelMapper.ensureInitialized() + .equalsValue(this as PgrAddressModel, other); } @override @@ -408,10 +406,8 @@ mixin GeoLocationMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - GeoLocationMapper.ensureInitialized() - .isValueEqual(this as GeoLocation, other)); + return GeoLocationMapper.ensureInitialized() + .equalsValue(this as GeoLocation, other); } @override diff --git a/packages/digit_data_model/lib/models/pgr_complaints/pgr_complaints.dart b/packages/complaints/lib/models/pgr_complaints.dart similarity index 96% rename from packages/digit_data_model/lib/models/pgr_complaints/pgr_complaints.dart rename to packages/complaints/lib/models/pgr_complaints.dart index a28dbf64f..d061228ab 100644 --- a/packages/digit_data_model/lib/models/pgr_complaints/pgr_complaints.dart +++ b/packages/complaints/lib/models/pgr_complaints.dart @@ -1,7 +1,9 @@ import 'dart:convert'; +import 'package:complaints/models/pgr_address.dart'; import 'package:dart_mappable/dart_mappable.dart'; import 'package:digit_data_model/data_model.dart'; +import 'package:digit_data_model/models/entities/pgr_application_status.dart'; import 'package:drift/drift.dart'; part 'pgr_complaints.mapper.dart'; @@ -204,20 +206,6 @@ class PgrWorkflowModel extends EntityModel with PgrWorkflowModelMappable { }) : super(); } -@MappableEnum() -enum PgrServiceApplicationStatus { - @MappableValue('CREATED') - created, - @MappableValue('PENDING_ASSIGNMENT') - pendingAssignment, - @MappableValue('RESOLVED') - resolved, - @MappableValue('REJECTED') - rejected, - @MappableValue('CANCELLED') - cancelled, -} - @MappableClass(ignoreNull: true) class PgrFilters with PgrFiltersMappable { String? complaintAssignedTo; diff --git a/packages/digit_data_model/lib/models/pgr_complaints/pgr_complaints.mapper.dart b/packages/complaints/lib/models/pgr_complaints.mapper.dart similarity index 94% rename from packages/digit_data_model/lib/models/pgr_complaints/pgr_complaints.mapper.dart rename to packages/complaints/lib/models/pgr_complaints.mapper.dart index 87d606df4..6eeec0982 100644 --- a/packages/digit_data_model/lib/models/pgr_complaints/pgr_complaints.mapper.dart +++ b/packages/complaints/lib/models/pgr_complaints.mapper.dart @@ -1,72 +1,11 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'pgr_complaints.dart'; -class PgrServiceApplicationStatusMapper - extends EnumMapper { - PgrServiceApplicationStatusMapper._(); - - static PgrServiceApplicationStatusMapper? _instance; - static PgrServiceApplicationStatusMapper ensureInitialized() { - if (_instance == null) { - MapperContainer.globals - .use(_instance = PgrServiceApplicationStatusMapper._()); - } - return _instance!; - } - - static PgrServiceApplicationStatus fromValue(dynamic value) { - ensureInitialized(); - return MapperContainer.globals.fromValue(value); - } - - @override - PgrServiceApplicationStatus decode(dynamic value) { - switch (value) { - case 'CREATED': - return PgrServiceApplicationStatus.created; - case 'PENDING_ASSIGNMENT': - return PgrServiceApplicationStatus.pendingAssignment; - case 'RESOLVED': - return PgrServiceApplicationStatus.resolved; - case 'REJECTED': - return PgrServiceApplicationStatus.rejected; - case 'CANCELLED': - return PgrServiceApplicationStatus.cancelled; - default: - throw MapperException.unknownEnumValue(value); - } - } - - @override - dynamic encode(PgrServiceApplicationStatus self) { - switch (self) { - case PgrServiceApplicationStatus.created: - return 'CREATED'; - case PgrServiceApplicationStatus.pendingAssignment: - return 'PENDING_ASSIGNMENT'; - case PgrServiceApplicationStatus.resolved: - return 'RESOLVED'; - case PgrServiceApplicationStatus.rejected: - return 'REJECTED'; - case PgrServiceApplicationStatus.cancelled: - return 'CANCELLED'; - } - } -} - -extension PgrServiceApplicationStatusMapperExtension - on PgrServiceApplicationStatus { - dynamic toValue() { - PgrServiceApplicationStatusMapper.ensureInitialized(); - return MapperContainer.globals.toValue(this); - } -} - class PgrComplaintModelMapper extends ClassMapperBase { PgrComplaintModelMapper._(); @@ -154,10 +93,8 @@ mixin PgrComplaintModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - PgrComplaintModelMapper.ensureInitialized() - .isValueEqual(this as PgrComplaintModel, other)); + return PgrComplaintModelMapper.ensureInitialized() + .equalsValue(this as PgrComplaintModel, other); } @override @@ -382,10 +319,8 @@ mixin PgrServiceModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - PgrServiceModelMapper.ensureInitialized() - .isValueEqual(this as PgrServiceModel, other)); + return PgrServiceModelMapper.ensureInitialized() + .equalsValue(this as PgrServiceModel, other); } @override @@ -670,10 +605,8 @@ mixin PgrComplainantModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - PgrComplainantModelMapper.ensureInitialized() - .isValueEqual(this as PgrComplainantModel, other)); + return PgrComplainantModelMapper.ensureInitialized() + .equalsValue(this as PgrComplainantModel, other); } @override @@ -889,10 +822,8 @@ mixin PgrRolesModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - PgrRolesModelMapper.ensureInitialized() - .isValueEqual(this as PgrRolesModel, other)); + return PgrRolesModelMapper.ensureInitialized() + .equalsValue(this as PgrRolesModel, other); } @override @@ -1050,10 +981,8 @@ mixin PgrWorkflowModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - PgrWorkflowModelMapper.ensureInitialized() - .isValueEqual(this as PgrWorkflowModel, other)); + return PgrWorkflowModelMapper.ensureInitialized() + .equalsValue(this as PgrWorkflowModel, other); } @override @@ -1287,10 +1216,8 @@ mixin PgrServiceSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - PgrServiceSearchModelMapper.ensureInitialized() - .isValueEqual(this as PgrServiceSearchModel, other)); + return PgrServiceSearchModelMapper.ensureInitialized() + .equalsValue(this as PgrServiceSearchModel, other); } @override @@ -1511,10 +1438,8 @@ mixin PgrFiltersMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - PgrFiltersMapper.ensureInitialized() - .isValueEqual(this as PgrFilters, other)); + return PgrFiltersMapper.ensureInitialized() + .equalsValue(this as PgrFilters, other); } @override @@ -1662,10 +1587,8 @@ mixin PgrSearchKeysMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - PgrSearchKeysMapper.ensureInitialized() - .isValueEqual(this as PgrSearchKeys, other)); + return PgrSearchKeysMapper.ensureInitialized() + .equalsValue(this as PgrSearchKeys, other); } @override @@ -1795,10 +1718,8 @@ mixin PgrAdditionalDetailsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - PgrAdditionalDetailsMapper.ensureInitialized() - .isValueEqual(this as PgrAdditionalDetails, other)); + return PgrAdditionalDetailsMapper.ensureInitialized() + .equalsValue(this as PgrAdditionalDetails, other); } @override diff --git a/packages/digit_data_model/lib/models/pgr_complaints/pgr_complaints_response.dart b/packages/complaints/lib/models/pgr_complaints_response.dart similarity index 94% rename from packages/digit_data_model/lib/models/pgr_complaints/pgr_complaints_response.dart rename to packages/complaints/lib/models/pgr_complaints_response.dart index dd869dad6..fde4e7c88 100644 --- a/packages/digit_data_model/lib/models/pgr_complaints/pgr_complaints_response.dart +++ b/packages/complaints/lib/models/pgr_complaints_response.dart @@ -1,6 +1,8 @@ +import 'package:complaints/models/pgr_complaints.dart'; import 'package:dart_mappable/dart_mappable.dart'; import 'package:digit_data_model/data_model.dart'; +import 'package:digit_data_model/models/entities/pgr_application_status.dart'; part 'pgr_complaints_response.mapper.dart'; diff --git a/packages/digit_data_model/lib/models/pgr_complaints/pgr_complaints_response.mapper.dart b/packages/complaints/lib/models/pgr_complaints_response.mapper.dart similarity index 97% rename from packages/digit_data_model/lib/models/pgr_complaints/pgr_complaints_response.mapper.dart rename to packages/complaints/lib/models/pgr_complaints_response.mapper.dart index be1b0230e..7a21f6b75 100644 --- a/packages/digit_data_model/lib/models/pgr_complaints/pgr_complaints_response.mapper.dart +++ b/packages/complaints/lib/models/pgr_complaints_response.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'pgr_complaints_response.dart'; @@ -98,10 +98,8 @@ mixin PgrServiceCreateResponseModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - PgrServiceCreateResponseModelMapper.ensureInitialized() - .isValueEqual(this as PgrServiceCreateResponseModel, other)); + return PgrServiceCreateResponseModelMapper.ensureInitialized() + .equalsValue(this as PgrServiceCreateResponseModel, other); } @override @@ -281,10 +279,8 @@ mixin PgrComplaintResponseModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - PgrComplaintResponseModelMapper.ensureInitialized() - .isValueEqual(this as PgrComplaintResponseModel, other)); + return PgrComplaintResponseModelMapper.ensureInitialized() + .equalsValue(this as PgrComplaintResponseModel, other); } @override @@ -507,10 +503,8 @@ mixin PgrServiceResponseModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - PgrServiceResponseModelMapper.ensureInitialized() - .isValueEqual(this as PgrServiceResponseModel, other)); + return PgrServiceResponseModelMapper.ensureInitialized() + .equalsValue(this as PgrServiceResponseModel, other); } @override @@ -763,10 +757,8 @@ mixin PgrComplainantResponseModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - PgrComplainantResponseModelMapper.ensureInitialized() - .isValueEqual(this as PgrComplainantResponseModel, other)); + return PgrComplainantResponseModelMapper.ensureInitialized() + .equalsValue(this as PgrComplainantResponseModel, other); } @override diff --git a/packages/complaints/lib/pages/complaints_acknowledgement.dart b/packages/complaints/lib/pages/complaints_acknowledgement.dart new file mode 100644 index 000000000..09bc70f70 --- /dev/null +++ b/packages/complaints/lib/pages/complaints_acknowledgement.dart @@ -0,0 +1,64 @@ +import 'package:auto_route/auto_route.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/molecules/panel_cards.dart'; + +import 'package:flutter/material.dart'; + + +import '../utils/i18_key_constants.dart' as i18; +import '../widgets/localized.dart'; + +@RoutePage() +class ComplaintsAcknowledgementPage extends LocalizedStatefulWidget { + const ComplaintsAcknowledgementPage({ + super.key, + super.appLocalizations, + }); + + @override + State createState() => + ComplaintsAcknowledgementPageState(); +} + +class ComplaintsAcknowledgementPageState + extends LocalizedState { + @override + Widget build(BuildContext context) { + final theme= Theme.of(context); + final textTheme =theme.digitTextTheme(context); + return Scaffold( + body: PanelCard( + title: localizations.translate(i18.complaints.acknowledgementLabel), + type: PanelType.success, + additionalDetails: [ + Text(localizations.translate( + i18.complaints.acknowledgementSubLabelMain) + , + style: textTheme.bodyS.copyWith( + color: theme.colorTheme.paper.primary + ), + ), + Text(localizations.translate( + i18.complaints.acknowledgementSubLabelSub), + style: textTheme.bodyS.copyWith( + color: theme.colorTheme.paper.primary + ), + ), + ], + description: localizations.translate( + i18.complaints.acknowledgementDescription, + ), + actions: [ + DigitButton( + label: localizations.translate( + i18.complaints.acknowledgementAction), + onPressed: () => context.router.maybePop(), + type: DigitButtonType.primary, + size: DigitButtonSize.large, + ) + ], + ), + ); + } +} diff --git a/packages/complaints/lib/pages/inbox/complaints_details_view.dart b/packages/complaints/lib/pages/inbox/complaints_details_view.dart new file mode 100644 index 000000000..da65714e5 --- /dev/null +++ b/packages/complaints/lib/pages/inbox/complaints_details_view.dart @@ -0,0 +1,133 @@ +import 'package:auto_route/auto_route.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/atoms/label_value_list.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; +import 'package:digit_ui_components/widgets/molecules/label_value_summary.dart'; +import 'package:flutter/material.dart'; +import 'package:recase/recase.dart'; + +import '../../models/pgr_complaints.dart'; +import '/blocs/localization/app_localization.dart'; +import '/utils/i18_key_constants.dart' as i18; +import '/utils/utils.dart'; +import '/widgets/header/back_navigation_help_header.dart'; + +@RoutePage() +class ComplaintsDetailsViewPage extends StatelessWidget { + final PgrServiceModel complaint; + + const ComplaintsDetailsViewPage({ + Key? key, + required this.complaint, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + final router = context.router; + final theme = Theme.of(context); + final localizations = ComplaintsLocalization.of(context); + final textTheme = theme.digitTextTheme(context); + + return Scaffold( + body: ScrollableContent( + enableFixedDigitButton: true, + header: Column( + children: [ + const BackNavigationHelpHeaderWidget(), + Align( + alignment: Alignment.centerLeft, + child: Padding( + padding: const EdgeInsets.only(left: spacer2, top: spacer2, bottom: spacer2), + child: Text( + localizations + .translate(i18.complaints.complaintsDetailsLabel), + style: textTheme.headingXl, + ), + ), + ), + ], + ), + footer: DigitCard( + cardType: CardType.primary, + margin: const EdgeInsets.only(top: spacer2), + children: [ + DigitButton( + onPressed: () { + router.pop(); + }, + label: localizations.translate(i18.common.corecommonclose), + type: DigitButtonType.primary, + size: DigitButtonSize.large, + mainAxisSize: MainAxisSize.max, + ), + ]), + children: [ + DigitCard( + margin: const EdgeInsets.all(spacer2), + cardType: CardType.primary, + children: [ + LabelValueSummary( + padding: EdgeInsets.zero, + items: [ + LabelValueItem( + label: localizations.translate(i18.complaints.inboxNumberLabel), + value: complaint.serviceRequestId ?? + "${localizations.translate(i18.complaints.inboxNotGeneratedLabel)}\n${localizations.translate(i18.complaints.inboxSyncRequiredLabel)}", + valueTextStyle: complaint.serviceRequestId !=null ? textTheme.bodyS.copyWith(color: theme.colorTheme.primary.primary1) : null , + labelFlex: 5, + ), + LabelValueItem( + label: localizations.translate(i18.complaints.inboxTypeLabel), + value: localizations.translate( + complaint.serviceCode.snakeCase.toUpperCase().trim(), + ), + labelFlex: 5, + ), + LabelValueItem( + label: localizations.translate(i18.complaints.inboxDateLabel), + value: complaint.auditDetails?.createdTime.toDateTime + .getFormattedDate() ?? + "", + labelFlex: 5, + ), + LabelValueItem( + label: localizations.translate(i18.complaints.complainantName), + value: complaint.user.name ?? "", + labelFlex: 5, + ), + LabelValueItem( + label: localizations.translate(i18.complaints.inboxAreaLabel), + value: complaint.address.locality?.name ?? "", + labelFlex: 5, + ), + LabelValueItem( + label: localizations.translate( + i18.complaints.complainantContactNumber, + ), + value: complaint.user.mobileNumber ?? "", + labelFlex: 5, + ), + LabelValueItem( + label: localizations.translate(i18.complaints.inboxStatusLabel), + value: localizations.translate( + "COMPLAINTS_STATUS_${complaint.applicationStatus.name.snakeCase.toUpperCase()}", + ), + labelFlex: 5, + ), + LabelValueItem( + label: localizations + .translate(i18.complaints.complaintDescription), + value: localizations.translate( + complaint.description, + ), + labelFlex: 5, + ), + ] + ) + ]), + ], + ), + ); + } +} diff --git a/packages/complaints/lib/pages/inbox/complaints_inbox.dart b/packages/complaints/lib/pages/inbox/complaints_inbox.dart new file mode 100644 index 000000000..3f1df3037 --- /dev/null +++ b/packages/complaints/lib/pages/inbox/complaints_inbox.dart @@ -0,0 +1,274 @@ +import 'package:auto_route/auto_route.dart'; +import 'package:complaints/router/complaints_router.gm.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/utils/app_logger.dart'; +import 'package:digit_ui_components/widgets/atoms/label_value_list.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; +import 'package:digit_ui_components/widgets/molecules/label_value_summary.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:recase/recase.dart'; + +import '../../models/pgr_complaints.dart'; +import '/blocs/complaints_inbox/complaints_inbox.dart'; +import '/blocs/localization/app_localization.dart'; +import '/utils/i18_key_constants.dart' as i18; +import '/utils/utils.dart'; +import '/widgets/header/back_navigation_help_header.dart'; +import '/widgets/localized.dart'; +import '/widgets/no_result_card/no_result_card.dart'; + +@RoutePage() +class ComplaintsInboxPage extends LocalizedStatefulWidget { + const ComplaintsInboxPage({ + super.key, + super.appLocalizations, + }); + + @override + State createState() => ComplaintsInboxPageState(); +} + +class ComplaintsInboxPageState extends LocalizedState { + @override + Widget build(BuildContext context) { + final theme = Theme.of(context); + final textTheme = theme.digitTextTheme(context); + final router = context.router; + + return Scaffold( + body: BlocBuilder( + builder: (context, state) { + final inboxItems = + state.isFiltered ? state.filteredComplaints : state.complaints; + + return Column( + children: [ + Expanded( + child: ScrollableContent( + header: const Column( + children: [ + BackNavigationHelpHeaderWidget(), + ], + ), + slivers: [ + SliverToBoxAdapter( + child: Padding( + padding: const EdgeInsets.only( + left: spacer2 * 2, + bottom: spacer2, + ), + child: Text( + localizations.translate( + i18.complaints.inboxHeading, + ), + style: textTheme.headingXl, + ), + ), + ), + ...[ + SliverToBoxAdapter( + child: Padding( + padding: const EdgeInsets.only(bottom: spacer2), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Padding( + padding: const EdgeInsets.only(left: spacer2 * 2), + child: DigitButton( + type: DigitButtonType.tertiary, + size: DigitButtonSize.medium, + prefixIcon: Icons.search, + label: localizations.translate( + i18.complaints.searchCTA, + ), + onPressed: () { + router.push(ComplaintsInboxSearchRoute()); + }, + ), + ), + Padding( + padding: EdgeInsets.zero, + child: DigitButton( + type: DigitButtonType.tertiary, + size: DigitButtonSize.medium, + label: localizations.translate( + i18.complaints.filterCTA, + ), + prefixIcon: Icons.filter_list_alt, + onPressed: () { + router.push(ComplaintsInboxFilterRoute()); + }, + ), + ), + Padding( + padding: + const EdgeInsets.only(right: spacer2 * 2), + child: DigitButton( + type: DigitButtonType.tertiary, + size: DigitButtonSize.medium, + label: localizations.translate( + i18.complaints.sortCTA, + ), + prefixIcon: Icons.segment, + onPressed: () { + router.push(ComplaintsInboxSortRoute()); + }, + ), + ), + ], + ), + ), + ), + SliverList( + delegate: SliverChildBuilderDelegate( + (context, index) { + final item = inboxItems.elementAt(index); + + return _ComplaintsInboxItem( + item: item, + localizations: localizations, + ); + }, + childCount: inboxItems.length, + ), + ), + ], + ], + children: [ + if (inboxItems.isEmpty) + Expanded( + child: Center( + child: Padding( + padding: const EdgeInsets.all(10), + child: NoResultCard( + align: Alignment.center, + label: localizations + .translate(i18.complaints.noComplaintsExist), + ), + ), + ), + ), + ], + ), + ), + DigitCard( + cardType: CardType.primary, + margin: const EdgeInsets.fromLTRB(0, spacer2, 0, 0), + children: [ + DigitButton( + label: localizations.translate( + i18.complaints.fileComplaintAction, + ), + type: DigitButtonType.primary, + size: DigitButtonSize.large, + mainAxisSize: MainAxisSize.max, + onPressed: () async { + var loggedInUserUuid = + ComplaintsSingleton().loggedInUserUuid; + final bloc = context.read(); + + await router.push( + ComplaintsRegistrationWrapperRoute(), + ); + + try { + bloc.add( + ComplaintInboxLoadComplaintsEvent( + createdByUserId: loggedInUserUuid, + ), + ); + } catch (error) { + AppLogger.instance.error( + title: 'Error', + message: 'Error while loading complaints', + ); + } + }, + ), + ]), + ], + ); + }, + ), + ); + } +} + +class _ComplaintsInboxItem extends StatelessWidget { + final ComplaintsLocalization localizations; + final PgrServiceModel item; + + const _ComplaintsInboxItem({ + Key? key, + required this.localizations, + required this.item, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + final theme = Theme.of(context); + final textTheme = theme.digitTextTheme(context); + + return DigitCard( + margin: const EdgeInsets.all(spacer2), + cardType: CardType.primary, children: [ + LabelValueSummary( + padding: EdgeInsets.zero, + items: [ + LabelValueItem( + label: localizations + .translate(i18.complaints.inboxNumberLabel), + value: item.serviceRequestId ?? + "${localizations.translate(i18.complaints.inboxNotGeneratedLabel)}\n${localizations.translate(i18.complaints.inboxSyncRequiredLabel)}", + valueTextStyle: item.serviceRequestId !=null ? textTheme.bodyS.copyWith(color: theme.colorTheme.primary.primary1) : null , + labelFlex: 5, + ), + LabelValueItem( + label: localizations.translate(i18.complaints.inboxTypeLabel), + value: localizations.translate( + item.serviceCode.snakeCase.toUpperCase().trim(), + ), + labelFlex: 5, + ), + LabelValueItem( + label: + localizations.translate(i18.complaints.inboxDateLabel), + value: item.auditDetails?.createdTime.toDateTime + .getFormattedDate() ?? + "", + labelFlex: 5, + ), + + LabelValueItem( + label: + localizations.translate(i18.complaints.inboxAreaLabel), + value: item.address.locality?.name ?? "", + labelFlex: 5, + ), + LabelValueItem( + label: localizations + .translate(i18.complaints.inboxStatusLabel), + value: localizations.translate( + "COMPLAINTS_STATUS_${item.applicationStatus.name.snakeCase.toUpperCase()}", + ), + labelFlex: 5, + ), + ], + ), + DigitButton( + label: + localizations.translate(i18.searchBeneficiary.iconLabel), + type: DigitButtonType.secondary, + size: DigitButtonSize.large, + mainAxisSize: MainAxisSize.max, + onPressed: () { + context.router.push(ComplaintsDetailsViewRoute( + complaint: item, + )); + }, + ), + ]); + } +} diff --git a/packages/complaints/lib/pages/inbox/complaints_inbox_filter.dart b/packages/complaints/lib/pages/inbox/complaints_inbox_filter.dart new file mode 100644 index 000000000..1f643f9bc --- /dev/null +++ b/packages/complaints/lib/pages/inbox/complaints_inbox_filter.dart @@ -0,0 +1,412 @@ +import 'dart:collection'; +import 'package:auto_route/auto_route.dart'; +import 'package:digit_data_model/models/entities/pgr_application_status.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/models/RadioButtonModel.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:reactive_forms/reactive_forms.dart'; +import 'package:recase/recase.dart'; + +import '/blocs/complaints_inbox/complaints_inbox.dart'; + +import '/utils/i18_key_constants.dart' as i18; +import '/utils/utils.dart'; +import '/widgets/localized.dart'; + +@RoutePage() +class ComplaintsInboxFilterPage extends LocalizedStatefulWidget { + const ComplaintsInboxFilterPage({ + super.key, + super.appLocalizations, + }); + + @override + State createState() => + ComplaintsInboxFilterPageState(); +} + +class ComplaintsInboxFilterPageState + extends LocalizedState { + static const _complaintType = "complaintType"; + static const _complaintLocality = "complaintLocality"; + static const _complaintAssignmentType = "complaintAssignmentType"; + static const _complaintStatus = "complaintStatus"; + static final _complaintAssignmentTypes = [ + i18.complaints.assignedToAll, + i18.complaints.assignedToSelf, + ]; + Map selected = { + PgrServiceApplicationStatus.created: false, + PgrServiceApplicationStatus.cancelled: false, + PgrServiceApplicationStatus.pendingAssignment: false, + PgrServiceApplicationStatus.rejected: false, + PgrServiceApplicationStatus.resolved: false, + }; + bool isFirstBuild = true; + Set statuses = HashSet(); + + @override + Widget build(BuildContext context) { + final theme = Theme.of(context); + final textTheme = theme.digitTextTheme(context); + + return Scaffold( + backgroundColor: theme.colorScheme.onPrimary, + body: BlocBuilder( + builder: (context, state) { + return ReactiveFormBuilder( + form: () => buildForm(state), + builder: (context, formGroup, child) { + List selectedStatuses = + state.filters?.complaintStatus?.toList() ?? []; + + if (isFirstBuild) { + for (var element in selectedStatuses) { + selected[element] = true; + statuses.add(element); + } + isFirstBuild = false; + } + + return ScrollableContent( + header: Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Padding( + padding: EdgeInsets.zero, + child: DigitButton( + label: "", + type: DigitButtonType.tertiary, + size: DigitButtonSize.large, + onPressed: () => context.router.maybePop(), + prefixIcon: Icons.close, + ), + ) + ], + ), + Padding( + padding: const EdgeInsets.only(left: spacer4), + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + const Icon( + Icons.filter_alt, + size: 32, + ), + Text( + localizations.translate( + i18.complaints.complaintInboxFilterHeading, + ), + style: textTheme.headingXl, + ), + Padding( + padding: const EdgeInsets.only(left: spacer1), + child: DigitButton( + label: "", + type: DigitButtonType.tertiary, + size: DigitButtonSize.large, + onPressed: () { + clearFilters(formGroup); + }, + prefixIcon: Icons.autorenew, + )), + ], + ), + ), + ], + ), + enableFixedDigitButton: true, + footer: DigitCard( + cardType: CardType.primary, + margin: const EdgeInsets.fromLTRB(0, spacer2, 0, 0), + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Expanded( + flex: 1, + child: DigitButton( + type: DigitButtonType.secondary, + size: DigitButtonSize.large, + label: localizations.translate( + i18.complaints.complaintsFilterClearAll, + ), + onPressed: () { + clearFilters(formGroup); + }, + ), + ), + const SizedBox(width: 10), + Expanded( + flex: 1, + child: DigitButton( + label: localizations + .translate(i18.complaints.filterCTA), + type: DigitButtonType.primary, + size: DigitButtonSize.large, + onPressed: () { + if (!formGroup.valid) return; + + final bloc = + context.read(); + + final assignedTo = formGroup + .control(_complaintAssignmentType) + .value as String?; + + final complaintType = formGroup + .control(_complaintType) + .value as String?; + + final locality = formGroup + .control(_complaintLocality) + .value as String?; + + bloc.add( + ComplaintInboxFilterComplaintsEvent( + complaintAssignedTo: assignedTo, + currentUserName: + ComplaintsSingleton().loggedInUserName, + complaintTypeCode: complaintType, + locality: locality, + complaintStatus: statuses.toList(), + createdByUserId: + ComplaintsSingleton().loggedInUserUuid, + ), + ); + + context.router.pop(); + }, + ), + ), + ], + ), + ]), + children: [ + Padding( + padding: const EdgeInsets.all(spacer4), + child: Column( + children: [ + BlocBuilder( + builder: (context, state) { + Set complaintTypes = HashSet(); + Set locality = HashSet(); + + Set uniqueStatuses = + HashSet(); + Map statusCount = HashMap(); + + state.maybeWhen( + orElse: () { + return; + }, + complaints: ( + loading, + isFiltered, + complaints, + filteredComplaints, + filters, + searchKeys, + ) { + for (var e in complaints) { + complaintTypes.add(e.serviceCode.toString()); + + if (e.address.locality?.name != null) { + locality.add( + e.address.locality?.name ?? "", + ); + } + + var status = e.applicationStatus; + uniqueStatuses.add(status); + if (statusCount.containsKey(status.index)) { + int count = statusCount[status.index] ?? 0; + statusCount[status.index] = count + 1; + } else { + statusCount[status.index] = 1; + } + } + }, + ); + + return Column( + children: [ + BlocBuilder( + builder: (context, state) { + return Align( + alignment: Alignment.topLeft, + child: RadioList( + containerPadding: const EdgeInsets.only(bottom: spacer4), + radioDigitButtons: _complaintAssignmentTypes + .asMap() + .entries + .map((item) => RadioButtonModel( + code: item.value, + name: localizations.translate( + item.value.trim()), + )) + .toList(), + groupValue: formGroup + .control( + _complaintAssignmentType) + .value ?? + "", + onChanged: (changedValue) { + setState(() { + formGroup + .control( + _complaintAssignmentType) + .value = changedValue.code; + }); + }, + ), + ); + }, + ), + LabeledField( + label: localizations.translate( + i18.complaints.complaintsTypeHeading, + ), + child: DigitDropdown( + items: complaintTypes + .toList() + .asMap() + .entries + .map((item) => DropdownItem( + name: localizations.translate( + item.value + .toString() + .trim() + .snakeCase + .toUpperCase()), + code: item.value, + )) + .toList(), + emptyItemText: localizations + .translate(i18.common.noMatchFound), + isSearchable: true, + onSelect: (value) => formGroup + .control(_complaintType) + .value = value.code, + ), + ), + Padding( + padding: const EdgeInsets.only(top: spacer4), + child: LabeledField( + label: localizations + .translate(i18.complaints.locality), + child: DigitDropdown( + items: locality + .toList() + .asMap() + .entries + .map((item) => DropdownItem( + name: localizations.translate( + item.value + .toString() + .trim()), + code: item.value, + )) + .toList(), + emptyItemText: localizations + .translate(i18.common.noMatchFound), + onSelect: (value) => formGroup + .control(_complaintLocality) + .value = value.code, + ), + ), + ), + if (uniqueStatuses.isNotEmpty) ...[ + Padding( + padding: const EdgeInsets.only(top: spacer4), + child: LabeledField( + label: localizations.translate( + i18.complaints.inboxStatusLabel, + ), + child: Column( + children: [ + ...uniqueStatuses.map((e) => Padding( + padding: const EdgeInsets.only( + top: spacer2, + ), + child: DigitCheckbox( + label: + '${localizations.translate('COMPLAINTS_STATUS_${e.name.snakeCase.toUpperCase()}')} (${statusCount[e.index]})', + value: selected[e] ?? false, + onChanged: (value) { + setState(() { + if (selected[e]!) { + statuses.remove(e); + selected[e] = false; + + return; + } + + selected[e] = true; + statuses.add(e); + }); + }, + ), + )), + ], + ), + ), + ), + ], + ], + ); + }, + ), + ], + ), + ), + ], + ); + }, + ); + }, + ), + ); + } + + void clearFilters(FormGroup formGroup) { + setState(() { + selected.forEach((key, value) { + selected[key] = false; + }); + statuses.clear(); + formGroup.control(_complaintType).value = null; + formGroup.control(_complaintAssignmentType).value = null; + formGroup.control(_complaintStatus).value = null; + formGroup.control(_complaintLocality).value = null; + }); + } + + FormGroup buildForm(ComplaintInboxState state) { + return fb.group({ + _complaintType: FormControl( + value: state.filters?.complaintTypeCode, + validators: [], + ), + _complaintLocality: FormControl( + value: state.filters?.locality, + validators: [], + ), + _complaintAssignmentType: FormControl( + value: state.filters?.complaintAssignedTo, + validators: [], + ), + _complaintStatus: FormControl( + validators: [], + ), + }); + } +} diff --git a/packages/complaints/lib/pages/inbox/complaints_inbox_search.dart b/packages/complaints/lib/pages/inbox/complaints_inbox_search.dart new file mode 100644 index 000000000..50af6eb82 --- /dev/null +++ b/packages/complaints/lib/pages/inbox/complaints_inbox_search.dart @@ -0,0 +1,200 @@ +import 'package:auto_route/auto_route.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:reactive_forms/reactive_forms.dart'; + +import '/blocs/complaints_inbox/complaints_inbox.dart'; + +import '/utils/i18_key_constants.dart' as i18; +import '/utils/utils.dart'; +import '/widgets/localized.dart'; +import 'package:flutter/services.dart'; + +@RoutePage() +class ComplaintsInboxSearchPage extends LocalizedStatefulWidget { + const ComplaintsInboxSearchPage({ + super.key, + super.appLocalizations, + }); + + @override + State createState() => + ComplaintsInboxSearchPageState(); +} + +class ComplaintsInboxSearchPageState + extends LocalizedState { + static const _complaintNumber = "complaintNumber"; + static const _mobileNumber = "mobileNumber"; + + @override + Widget build(BuildContext context) { + final theme = Theme.of(context); + final textTheme = theme.digitTextTheme(context); + final bloc = context.read(); + + return Scaffold( + backgroundColor: theme.colorScheme.onPrimary, + body: BlocBuilder( + builder: (context, state) { + return ReactiveFormBuilder( + form: () => buildForm(state), + builder: (context, formGroup, child) { + return ScrollableContent( + header: Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Padding( + padding: EdgeInsets.zero, + child: DigitButton( + label: "", + onPressed: () => context.router.pop(), + type: DigitButtonType.tertiary, + size: DigitButtonSize.large, + prefixIcon: Icons.close, + ), + ) + ], + ), + Padding( + padding: const EdgeInsets.only(left: spacer5), + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + localizations.translate( + i18.complaints.complaintInboxSearchHeading, + ), + style: textTheme.headingXl, + ), + ], + ), + ), + ], + ), + footer: DigitCard( + cardType: CardType.primary, + margin: const EdgeInsets.fromLTRB(0, spacer2, 0, 0), + children: [ + DigitButton( + mainAxisSize: MainAxisSize.max, + type: DigitButtonType.primary, + size: DigitButtonSize.large, + label: localizations + .translate(i18.complaints.searchCTA), + onPressed: () { + formGroup.markAllAsTouched(); + + if (!formGroup.valid) return; + + final complaintNumberValue = + formGroup.control(_complaintNumber).value; + final mobileNumberValue = + formGroup.control(_mobileNumber).value; + + bloc.add( + ComplaintInboxSearchComplaintsEvent( + mobileNumber: mobileNumberValue == "" + ? null + : mobileNumberValue, + complaintNumber: + complaintNumberValue == "" + ? null + : complaintNumberValue, + createdByUserId: ComplaintsSingleton() + .loggedInUserUuid, + ), + ); + + context.router.pop(); + }, + ), + ]), + children: [ + Column( + children: [ + BlocBuilder( + builder: (context, state) { + return Padding( + padding: const EdgeInsets.all(spacer2 * 2), + child: Column( + children: [ + ReactiveWrapperField( + formControlName: _complaintNumber, + builder: (context) { + return LabeledField( + label: localizations.translate( + i18.complaints.inboxNumberLabel, + ), + child: DigitTextFormInput( + onChange: (value){ + formGroup.control(_complaintNumber).value = value; + }, + charCount: true, + maxLength: 65, + ), + ); + }), + ReactiveWrapperField( + formControlName: _mobileNumber, + showErrors: (control) => control.invalid && control.touched, + validationMessages: { + 'mobileNumber': (object) => + localizations.translate(i18 + .individualDetails + .mobileNumberInvalidFormatValidationMessage), + }, + builder: (field) { + return LabeledField( + label: localizations.translate( + i18.common.coreCommonMobileNumber, + ), + child: DigitTextFormInput( + charCount: true, + keyboardType: TextInputType.number, + inputFormatters: [ + FilteringTextInputFormatter + .digitsOnly, + ], + onChange: (value)=>formGroup.control(_mobileNumber).value=value, + errorMessage: field.errorText, + maxLength: 10, + ), + ); + }), + ], + ), + ); + }, + ), + ], + ), + ], + ); + }, + ); + }, + ), + ); + } + + FormGroup buildForm(ComplaintInboxState state) { + return fb.group({ + _complaintNumber: FormControl( + validators: [], + value: state.searchKeys?.complaintNumber, + ), + _mobileNumber: FormControl( + validators: [Validators.delegate( + (validator) => CustomValidator.validMobileNumber(validator))], + value: state.searchKeys?.complainantMobileNumber, + ), + }); + } +} diff --git a/packages/complaints/lib/pages/inbox/complaints_inbox_sort.dart b/packages/complaints/lib/pages/inbox/complaints_inbox_sort.dart new file mode 100644 index 000000000..57516c9fd --- /dev/null +++ b/packages/complaints/lib/pages/inbox/complaints_inbox_sort.dart @@ -0,0 +1,163 @@ + +import 'package:auto_route/auto_route.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/models/RadioButtonModel.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:reactive_forms/reactive_forms.dart'; + +import '/blocs/complaints_inbox/complaints_inbox.dart'; + +import '/utils/i18_key_constants.dart' as i18; +import '/widgets/localized.dart'; + +@RoutePage() +class ComplaintsInboxSortPage extends LocalizedStatefulWidget { + const ComplaintsInboxSortPage({ + super.key, + super.appLocalizations, + }); + + @override + State createState() => + ComplaintsInboxSortPageState(); +} + +class ComplaintsInboxSortPageState + extends LocalizedState { + static const _sortOrder = "sortOrder"; + static var sortOrders = [ + i18.complaints.complaintsSortDateDesc, + i18.complaints.complaintsSortDateAsc, + ]; + + @override + Widget build(BuildContext context) { + final theme = Theme.of(context); + final bloc = context.read(); + final router = context.router; + final textTheme = theme.digitTextTheme(context); + + return Scaffold( + backgroundColor: theme.colorScheme.onPrimary, + body: BlocBuilder( + builder: (context, state) { + return ReactiveFormBuilder( + form: () => buildForm(state), + builder: (context, formGroup, child) { + return BlocBuilder( + builder: (context, state) { + return ScrollableContent( + header: Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Padding( + padding: EdgeInsets.zero, + child: DigitButton( + label: "", + onPressed: () => context.router.pop(), + type: DigitButtonType.tertiary, + size: DigitButtonSize.large, + prefixIcon: Icons.close, + ), + ), + ], + ), + Padding( + padding: const EdgeInsets.only(left: spacer5), + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + localizations.translate( + i18.complaints.complaintInboxSortHeading, + ), + style: textTheme.headingXl, + ), + ], + ), + ), + ], + ), + footer: DigitCard( + cardType: CardType.primary, + margin: const EdgeInsets.fromLTRB(0, spacer2, 0, 0), + padding: const EdgeInsets.all(spacer2), + children: [DigitButton( + type: DigitButtonType.primary, + size: DigitButtonSize.large, + label: localizations + .translate(i18.complaints.sortCTA), + mainAxisSize: MainAxisSize.max, + onPressed: () { + formGroup.markAllAsTouched(); + + var sortOrder = + formGroup.control(_sortOrder).value; + + if (!formGroup.valid || sortOrder == null) { + return; + } + + bloc.add( + ComplaintInboxSortComplaintsEvent( + sortOrder, + ), + ); + router.pop(); + }, + ),] + ), + children: [ + BlocBuilder( + builder: (context, state) { + + return Padding( + padding: const EdgeInsets.only(top: spacer2), + child: RadioList( + radioDigitButtons: sortOrders + .asMap() + .entries + .map( + (item)=>RadioButtonModel( + code: item.value, + name: localizations.translate(item.value.trim()), + ) + ).toList(), + groupValue: + formGroup.control(_sortOrder).value ?? + "", + onChanged: (changedValue) { + formGroup.control(_sortOrder).value = + changedValue.code; + }, + ), + ); + }, + ), + ], + ); + }, + ); + }, + ); + }, + ), + ); + } + + FormGroup buildForm(ComplaintInboxState state) { + return fb.group({ + _sortOrder: FormControl( + validators: [], + value: "", + ), + }); + } +} diff --git a/apps/health_campaign_field_worker_app/lib/pages/complaints/inbox/complaints_inbox_wrapper.dart b/packages/complaints/lib/pages/inbox/complaints_inbox_wrapper.dart similarity index 58% rename from apps/health_campaign_field_worker_app/lib/pages/complaints/inbox/complaints_inbox_wrapper.dart rename to packages/complaints/lib/pages/inbox/complaints_inbox_wrapper.dart index fd110f711..27253c3a2 100644 --- a/apps/health_campaign_field_worker_app/lib/pages/complaints/inbox/complaints_inbox_wrapper.dart +++ b/packages/complaints/lib/pages/inbox/complaints_inbox_wrapper.dart @@ -1,10 +1,10 @@ import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:digit_data_model/data_model.dart'; -import '../../../blocs/complaints_inbox/complaints_inbox.dart'; -import '../../../utils/utils.dart'; +import 'package:complaints/blocs/complaints_inbox/complaints_inbox.dart'; +import 'package:complaints/utils/utils.dart'; +import '/models/pgr_complaints.dart'; @RoutePage() class ComplaintsInboxWrapperPage extends StatelessWidget { @@ -17,14 +17,14 @@ class ComplaintsInboxWrapperPage extends StatelessWidget { return BlocProvider( create: (context) => ComplaintsInboxBloc( const ComplaintInboxState.complaints(), - pgrRepository: - context.repository(), + pgrRepository:context.repository(context), )..add( - ComplaintInboxLoadComplaintsEvent( - createdByUserId: context.loggedInUserUuid, - ), + ComplaintInboxLoadComplaintsEvent( + createdByUserId: ComplaintsSingleton().loggedInUserUuid, ), + ), child: const AutoRouter(), ); + } } diff --git a/packages/complaints/lib/pages/registration/complaint_type.dart b/packages/complaints/lib/pages/registration/complaint_type.dart new file mode 100644 index 000000000..32e7de2d4 --- /dev/null +++ b/packages/complaints/lib/pages/registration/complaint_type.dart @@ -0,0 +1,215 @@ + +import 'package:auto_route/auto_route.dart'; +import 'package:complaints/complaints.dart'; +import 'package:complaints/router/complaints_router.gm.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/models/RadioButtonModel.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:reactive_forms/reactive_forms.dart'; +import 'package:recase/recase.dart'; + + +import '/utils/i18_key_constants.dart' as i18; +import '/widgets/header/back_navigation_help_header.dart'; +import '/widgets/localized.dart'; + +@RoutePage() +class ComplaintTypePage extends LocalizedStatefulWidget { + const ComplaintTypePage({ + super.key, + super.appLocalizations, + }); + + @override + State createState() => ComplaintTypePageState(); +} + +class ComplaintTypePageState extends LocalizedState { + static const _complaintType = 'complaintType'; + static const _otherComplaintType = 'otherComplaintType'; + + @override + Widget build(BuildContext context) { + final bloc = context.read(); + final router = context.router; + final theme = Theme.of(context); + final textTheme = theme.digitTextTheme(context); + + return Scaffold( + body: ReactiveFormBuilder( + form: () { + return bloc.state.map( + create: (value) => buildForm(value), + persisted: (value) { + throw const InvalidComplaintsRegistrationStateException(); + }, + view: (value) => buildForm(value), + ); + }, + builder: (context, form, child) => BlocBuilder< + ComplaintsRegistrationBloc, ComplaintsRegistrationState>( + builder: (context, state) { + return ScrollableContent( + header: const Column(children: [ + BackNavigationHelpHeaderWidget(), + ]), + enableFixedDigitButton: true, + footer: DigitCard( + cardType: CardType.primary, + margin: const EdgeInsets.only(top: spacer2), + children: [ + DigitButton( + mainAxisSize: MainAxisSize.max, + label: localizations.translate(i18.complaints.actionLabel), + type: DigitButtonType.primary, + size: DigitButtonSize.large, + onPressed: () async { + var complaintType = form.control(_complaintType).value; + var otherComplaintTypeValue = + form.control(_otherComplaintType).value; + + if (complaintType == "Other") { + form.control(_otherComplaintType).setValidators( + [Validators.required], + autoValidate: true, + ); + } else { + form.control(_otherComplaintType).setValidators( + [], + autoValidate: true, + ); + } + + setState(() { + form.markAllAsTouched(); + }); + + if (!form.valid) return; + + state.whenOrNull( + create: ( + loading, + complaintType, + _, + addressModel, + complaintsDetailsModel, + ) { + bloc.add( + ComplaintsRegistrationEvent.saveComplaintType( + complaintType: + form.control(_complaintType).value, + otherComplaintDescription: + otherComplaintTypeValue, + ), + ); + }, + ); + + router.push(ComplaintsLocationRoute()); + }, + ), + ]), + slivers: [ + SliverToBoxAdapter( + child: DigitCard( + margin: const EdgeInsets.all(spacer2), + cardType: CardType.primary, children: [ + Text( + localizations.translate( + i18.complaints.complaintsTypeHeading, + ), + style: textTheme.headingXl, + ), + LabeledField( + label: localizations.translate( + i18.complaints.complaintsTypeLabel, + ), + child: RadioList( + containerPadding: const EdgeInsets.only(bottom: spacer4), + radioDigitButtons: (ComplaintsSingleton().complaintTypes?.isNotEmpty ?? false) + ? ComplaintsSingleton().complaintTypes! + .map( + (item) => RadioButtonModel( + code: item, + name: localizations.translate( + item.toString().snakeCase.toUpperCase().trim(), + ), + ), + ).toList(): + [], + groupValue: + form.control(_complaintType).value ?? "", + onChanged: (changedValue) { + if (form.control(_complaintType).disabled) return; + setState(() { + form.control(_complaintType).value = + changedValue.code; + }); + }, + ), + ), + if (form.control(_complaintType).value == "Other") ...[ + ReactiveWrapperField( + formControlName: _otherComplaintType, + validationMessages: { + 'required': (object) => localizations.translate( + i18.complaints.validationRequiredError, + ), + }, + showErrors: (control)=>control.invalid && control.touched, + builder: (field) { + return DigitTextFormInput( + charCount: true, + errorMessage: field.errorText, + initialValue: field.value, + onChange: (value) => form.control(_otherComplaintType).value=value, + ); + }), + ], + if (form.touched && + form.control(_complaintType).invalid) ...[ + Align( + alignment: Alignment.topLeft, + child: Text( + localizations.translate( + i18.complaints.validationRadioRequiredError, + ), + style: TextStyle( + color: theme.colorTheme.alert.error, + ), + ), + ), + ], + ]), + ), + ], + ); + }, + ), + ), + ); + } + + FormGroup buildForm(ComplaintsRegistrationState state) { + final complaintTypeValue = state.mapOrNull( + view: (value) => value.complaintType, + ); + + final bool shouldDisableForm = + complaintTypeValue != null && complaintTypeValue.isNotEmpty; + + return fb.group({ + _complaintType: FormControl( + validators: [Validators.required], + value: complaintTypeValue, + disabled: shouldDisableForm, + ), + _otherComplaintType: FormControl( + value: complaintTypeValue, + ), + }); + } +} diff --git a/packages/complaints/lib/pages/registration/complaints_details.dart b/packages/complaints/lib/pages/registration/complaints_details.dart new file mode 100644 index 000000000..5ec000717 --- /dev/null +++ b/packages/complaints/lib/pages/registration/complaints_details.dart @@ -0,0 +1,553 @@ +import 'package:auto_route/auto_route.dart'; + +import 'package:complaints/router/complaints_router.gm.dart'; +import 'package:digit_data_model/data_model.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/models/RadioButtonModel.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/atoms/pop_up_card.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; +import 'package:digit_ui_components/widgets/molecules/show_pop_up.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:intl/intl.dart'; +import 'package:reactive_forms/reactive_forms.dart'; + +import '../../../blocs/complaints_registration/complaints_registration.dart'; +import '../../../models/complaints.dart'; + +import '../../../utils/i18_key_constants.dart' as i18; +import '../../../utils/utils.dart'; +import '../../../widgets/header/back_navigation_help_header.dart'; +import '../../../widgets/localized.dart'; + +@RoutePage() +class ComplaintsDetailsPage extends LocalizedStatefulWidget { + const ComplaintsDetailsPage({ + super.key, + super.appLocalizations, + }); + + @override + State createState() => ComplaintsDetailsPageState(); +} + +class ComplaintsDetailsPageState extends LocalizedState { + static const _dateOfComplaint = 'dateOfComplaint'; + static const _administrativeArea = 'administrativeArea'; + static const _complaintRaisedFor = 'complaintRaisedFor'; + static const _complainantName = 'complainantName'; + static const _complainantContactNumber = 'complainantContactNumber'; + static const _supervisorName = 'supervisorName'; + static const _supervisorContactNumber = 'supervisorContactNumber'; + static const _complaintDescription = 'complaintDescription'; + static const _complaintDetailsForm = 'complaintDetailsForm'; + + @override + Widget build(BuildContext context) { + final theme = Theme.of(context); + final bloc = context.read(); + final router = context.router; + final complainantRaisedFor = [ + i18.complaints.raisedForMyself, + i18.complaints.raisedForAnotherUser, + ]; + final textTheme = theme.digitTextTheme(context); + + return Scaffold( + body: ReactiveFormBuilder( + form: () => bloc.state.map( + create: (value) => buildForm(value), + persisted: (value) => + throw const InvalidComplaintsRegistrationStateException(), + view: (value) => buildForm(value), + ), + builder: (_, form, __) => BlocListener( + listener: (context, state) { + context.navigateTo(const ComplaintsInboxWrapperRoute()); + }, + child: BlocConsumer( + listener: (context, complaintState) { + complaintState.mapOrNull( + persisted: (value) { + router.replace(ComplaintsAcknowledgementRoute()); + }, + ); + }, + builder: (context, state) { + final isRaisedForSelf = form.control(_complaintRaisedFor).value == + i18.complaints.raisedForMyself; + + return ScrollableContent( + enableFixedDigitButton: true, + header: const Column( + children: [ + BackNavigationHelpHeaderWidget(), + ], + ), + footer: DigitCard( + cardType: CardType.primary, + margin: const EdgeInsets.fromLTRB(0, spacer2, 0, 0), + children: [ + DigitButton( + label: form.control(_complaintDetailsForm).disabled + ? localizations + .translate(i18.complaints.backToInbox) + : localizations + .translate(i18.common.coreCommonSubmit), + type: DigitButtonType.primary, + size: DigitButtonSize.large, + mainAxisSize: MainAxisSize.max, + onPressed: () async { + setState(() { + form.markAllAsTouched(); + }); + + if (form.control(_complaintDetailsForm).disabled) { + router.parent()?.maybePop(); + } + + if (!form.valid) { + return; + } + + FocusManager.instance.primaryFocus?.unfocus(); + + final dateOfComplaint = + form.control(_dateOfComplaint).value as DateTime; + + final complaintRaisedFor = + form.control(_complaintRaisedFor).value as String; + + final administrativeArea = + form.control(_administrativeArea).value as String; + + final complainantName = + form.control(_complainantName).value as String; + + final complainantContactNumber = form + .control(_complainantContactNumber) + .value as String; + + final supervisorName = + form.control(_supervisorName).value as String?; + + final supervisorContactNumber = form + .control(_supervisorContactNumber) + .value as String?; + + final complaintDescription = form + .control(_complaintDescription) + .value as String; + + state.whenOrNull( + create: ( + loading, + complaintType, + _, + addressModel, + complaintsDetailsModel, + ) { + bloc.add( + ComplaintsRegistrationEvent + .saveComplaintDetails( + boundaryModel: ComplaintsSingleton().boundary, + complaintsDetailsModel: + ComplaintsDetailsModel( + administrativeArea: ComplaintsSingleton() + .boundary + .code + .toString(), + dateOfComplaint: dateOfComplaint, + complaintRaisedFor: complaintRaisedFor, + complainantName: complainantName, + complainantContactNumber: + complainantContactNumber, + supervisorName: supervisorName, + supervisorContactNumber: + supervisorContactNumber, + complaintDescription: complaintDescription, + ), + ), + ); + }, + ); + + final userId = ComplaintsSingleton().loggedInUserUuid; + + showCustomPopup( + context: context, + builder: (popupContext) => Popup( + title: localizations.translate( + i18.complaints.dialogTitle, + ), + type: PopUpType.simple, + description: localizations.translate( + i18.complaints.dialogContent, + ), + actions: [ + DigitButton( + label: localizations.translate( + i18.common.coreCommonSubmit, + ), + onPressed: () { + bloc.add( + ComplaintsRegistrationSubmitComplaintEvent( + userId: userId, + ), + ); + Navigator.of(context, rootNavigator: true) + .pop(); + }, + type: DigitButtonType.primary, + size: DigitButtonSize.large, + ), + DigitButton( + label: localizations.translate( + i18.common.coreCommonCancel, + ), + onPressed: () { + Navigator.of( + context, + rootNavigator: true, + ).pop(); + }, + type: DigitButtonType.secondary, + size: DigitButtonSize.large), + ]), + ); + }, + ), + ]), + children: [ + DigitCard( + margin: const EdgeInsets.all(spacer2), + cardType: CardType.primary, children: [ + Text( + localizations.translate( + i18.complaints.complaintsDetailsLabel, + ), + style: textTheme.headingXl, + ), + LabeledField( + label: localizations.translate( + i18.complaints.dateOfComplaint, + ), + child: DigitDateFormInput( + isRequired: true, + readOnly: true, + initialValue: DateFormat('yyyy-MM-dd') + .format(form.control(_dateOfComplaint).value), + initialDate: DateTime.now(), + confirmText: localizations.translate( + i18.common.coreCommonOk, + ), + cancelText: localizations.translate( + i18.common.coreCommonCancel, + ), + ), + ), + LabeledField( + label: localizations.translate( + i18.householdLocation.administrationAreaFormLabel, + ), + child: DigitTextFormInput( + isRequired: true, + readOnly: true, + initialValue: form.control(_administrativeArea).value, + ), + ), + LabeledField( + label: localizations.translate( + i18.complaints.complainantTypeQuestion, + ), + isRequired: true, + child: Column( + children: [ + Align( + alignment: AlignmentDirectional.topStart, + child: Padding( + padding: const EdgeInsets.only(top: spacer2), + child: RadioList( + containerPadding: const EdgeInsets.only(bottom: spacer3), + radioDigitButtons: complainantRaisedFor + .map((item) => RadioButtonModel( + code: item, + name: + localizations.translate(item.trim()), + )) + .toList(), + groupValue: + form.control(_complaintRaisedFor).value ?? "", + onChanged: (changedValue) { + if (form.control(_complaintRaisedFor).disabled) + return; + + if (changedValue.code == + i18.complaints.raisedForAnotherUser) { + form.control(_complainantName).value = ""; + form.control(_complainantContactNumber).value = + ""; + } else { + form.control(_complainantName).value = + ComplaintsSingleton().userName; + form.control(_complainantContactNumber).value = + ComplaintsSingleton().userMobileNumber; + } + + setState(() { + form.control(_complaintRaisedFor).value = + changedValue.code; + }); + }, + ), + ), + ), + if (form.touched && + form.control(_complaintRaisedFor).invalid) ...[ + Align( + alignment: Alignment.topLeft, + child: Padding( + padding: const EdgeInsets.only( + top: spacer1, + bottom: spacer1, + ), + child: Text( + localizations.translate(i18 + .complaints.validationRadioRequiredError), + style: TextStyle( + color: theme.colorTheme.alert.error, + ), + ), + ), + ), + ], + ], + ), + ), + ReactiveWrapperField( + formControlName: _complainantName, + validationMessages: { + 'required': (object) => localizations.translate( + i18.complaints.validationRequiredError), + 'maxLength': (object) => localizations + .translate(i18.common.maxCharsRequired) + .replaceAll('{}', '64'), + }, + builder: (field) { + return LabeledField( + label: localizations.translate( + i18.complaints.complainantName, + ), + isRequired: true, + child: DigitTextFormInput( + readOnly:(isRaisedForSelf)? + (field.value == null || field.value.isEmpty) + ? false + : true:false, + initialValue: field.value, + isRequired: true, + errorMessage: field.errorText, + onChange: (value) => form + .control(_complainantName) + .value = value, + ), + ); + }), + ReactiveWrapperField( + formControlName: _complainantContactNumber, + validationMessages: { + 'mobileNumber': (object) => + localizations.translate(i18.individualDetails + .mobileNumberInvalidFormatValidationMessage), + 'required': (object) => localizations.translate( + i18.complaints.validationRequiredError), + 'minLength': (object) => localizations.translate( + i18.complaints.validationMinLengthError), + 'maxLength': (object) => localizations + .translate(i18.common.maxCharsRequired) + .replaceAll('{}', '10'), + }, + builder: (field) { + return LabeledField( + label: localizations.translate( + i18.complaints.complainantContactNumber, + ), + isRequired: true, + child: DigitTextFormInput( + readOnly: (isRaisedForSelf)?(field.value == + null || + field.value.isEmpty) + ? false + : true:false, + initialValue: field.value, + isRequired: true, + keyboardType: TextInputType.number, + inputFormatters: [ + FilteringTextInputFormatter.digitsOnly, + ], + errorMessage: field.errorText, + onChange: (value) => form + .control(_complainantContactNumber) + .value = value, + ), + ); + }), + ReactiveWrapperField( + formControlName: _supervisorName, + validationMessages: { + 'maxLength': (object) => localizations + .translate(i18.common.maxCharsRequired) + .replaceAll('{}', '64'), + }, + builder: (field) { + return LabeledField( + label: localizations.translate( + i18.complaints.supervisorName, + ), + child: DigitTextFormInput( + errorMessage: field.errorText, + initialValue: field.value, + onChange: (value) => + form.control(_supervisorName).value = value, + ), + ); + }), + ReactiveWrapperField( + formControlName: _supervisorContactNumber, + showErrors: (control)=>control.touched, + validationMessages: { + 'mobileNumber': (object) => localizations.translate( + i18.individualDetails + .mobileNumberInvalidFormatValidationMessage, + ), + 'minLength': (object) => localizations.translate( + i18.complaints.validationMinLengthError), + 'maxLength': (object) => localizations + .translate(i18.common.maxCharsRequired) + .replaceAll('{}', '10'), + }, + builder: (field) { + return LabeledField( + label: localizations.translate( + i18.complaints.supervisorContactNumber, + ), + child: DigitTextFormInput( + keyboardType: TextInputType.number, + initialValue: field.value, + inputFormatters: [ + FilteringTextInputFormatter.digitsOnly, + ], + errorMessage: field.errorText, + onChange: (value) => form + .control(_supervisorContactNumber) + .value = value, + ), + ); + }), + ReactiveWrapperField( + formControlName: _complaintDescription, + validationMessages: { + 'required': (object) => localizations.translate( + i18.complaints.validationRequiredError, + ), + 'maxLength': (object) => localizations + .translate(i18.common.maxCharsRequired) + .replaceAll('{}', '1000'), + }, + builder: (field) { + return LabeledField( + label: localizations.translate( + i18.complaints.complaintDescription, + ), + isRequired: true, + child: DigitTextAreaFormInput( + initialValue: field.value, + maxLine: 3, + errorMessage: field.errorText, + isRequired: true, + onChange: (value) => form + .control(_complaintDescription) + .value = value, + ), + ); + }), + ]), + ], + ); + }, + ), + ), + ), + ); + } + + FormGroup buildForm(ComplaintsRegistrationState state) { + final complaintDetails = state.mapOrNull( + view: (value) => value.complaintsDetailsModel, + ); + + final shouldDisableForm = complaintDetails != null; + + return fb.group({ + _dateOfComplaint: FormControl( + value: complaintDetails?.dateOfComplaint ?? DateTime.now(), + disabled: shouldDisableForm, + validators: [], + ), + _administrativeArea: FormControl( + value: localizations.translate((complaintDetails?.administrativeArea ?? + ComplaintsSingleton().boundary.name) + .toString()), + disabled: shouldDisableForm, + validators: [Validators.required], + ), + _complaintRaisedFor: FormControl( + value: complaintDetails?.complaintRaisedFor, + disabled: shouldDisableForm, + validators: [Validators.required], + ), + _complainantName: FormControl( + value: complaintDetails?.complainantName, + disabled: shouldDisableForm, + validators: [Validators.required, Validators.maxLength(64)], + ), + _complainantContactNumber: FormControl( + value: complaintDetails?.complainantContactNumber, + disabled: shouldDisableForm, + validators: [ + Validators.required, + Validators.delegate( + (validator) => CustomValidator.validMobileNumber(validator)), + Validators.minLength(10), + Validators.maxLength(10) + ], + ), + _supervisorName: FormControl( + value: complaintDetails?.supervisorName, + disabled: shouldDisableForm, + validators: [Validators.maxLength(64)], + ), + _supervisorContactNumber: FormControl( + value: complaintDetails?.supervisorContactNumber, + disabled: shouldDisableForm, + validators: [ + Validators.delegate( + (validator) => CustomValidator.validMobileNumber(validator)), + Validators.maxLength(10), + Validators.minLength(10), + ], + ), + _complaintDescription: FormControl( + value: complaintDetails?.complaintDescription, + disabled: shouldDisableForm, + validators: [Validators.required, Validators.maxLength(1000)], + ), + _complaintDetailsForm: FormControl( + disabled: shouldDisableForm, + ), + }); + } +} diff --git a/packages/complaints/lib/pages/registration/complaints_location.dart b/packages/complaints/lib/pages/registration/complaints_location.dart new file mode 100644 index 000000000..a7f5df7f4 --- /dev/null +++ b/packages/complaints/lib/pages/registration/complaints_location.dart @@ -0,0 +1,298 @@ +import 'dart:math'; + +import 'package:auto_route/auto_route.dart'; +import 'package:complaints/router/complaints_router.gm.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/services/location_bloc.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:reactive_forms/reactive_forms.dart'; + +import '../../models/pgr_address.dart'; +import '/blocs/complaints_registration/complaints_registration.dart'; +import '/utils/i18_key_constants.dart' as i18; +import '/utils/utils.dart'; +import '/widgets/header/back_navigation_help_header.dart'; +import '/widgets/localized.dart'; + +@RoutePage() +class ComplaintsLocationPage extends LocalizedStatefulWidget { + const ComplaintsLocationPage({ + super.key, + super.appLocalizations, + }); + + @override + State createState() => ComplaintsLocationPageState(); +} + +class ComplaintsLocationPageState + extends LocalizedState { + static const _addressLine1Key = 'addressLine1'; + static const _addressLine2Key = 'addressLine2'; + static const _landmarkKey = 'landmark'; + static const _postalCodeKey = 'postalCode'; + static const _latKey = 'latKey'; + static const _lngKey = 'lngKey'; + static const _accuracyKey = 'accuracyKey'; + int maxLength = 64; + + @override + Widget build(BuildContext context) { + final theme = Theme.of(context); + final bloc = context.read(); + final router = context.router; + final textTheme = theme.digitTextTheme(context); + + return Scaffold( + body: ReactiveFormBuilder( + form: () => bloc.state.map( + create: (value) => buildForm(value), + persisted: (value) => + throw const InvalidComplaintsRegistrationStateException(), + view: (value) => buildForm(value), + ), + builder: (_, form, __) => BlocListener( + listener: (context, locationState) { + final lat = locationState.latitude; + final lng = locationState.longitude; + final accuracy = locationState.accuracy; + + form.control(_latKey).value ??= lat; + form.control(_lngKey).value ??= lng; + form.control(_accuracyKey).value ??= accuracy; + }, + listenWhen: (previous, current) { + final lat = form.control(_latKey).value; + final lng = form.control(_lngKey).value; + final accuracy = form.control(_accuracyKey).value; + + return lat != null || lng != null || accuracy != null + ? false + : true; + }, + child: BlocBuilder( + builder: (context, state) { + return ScrollableContent( + enableFixedDigitButton: true, + header: const Column( + children: [ + BackNavigationHelpHeaderWidget(), + ], + ), + footer: DigitCard( + cardType: CardType.primary, + margin: const EdgeInsets.fromLTRB(0, spacer2, 0, 0), + children: [ + DigitButton( + label: + localizations.translate(i18.complaints.actionLabel), + type: DigitButtonType.primary, + size: DigitButtonSize.large, + mainAxisSize: MainAxisSize.max, + onPressed: () { + form.markAllAsTouched(); + + if (!form.valid) return; + FocusManager.instance.primaryFocus?.unfocus(); + + final addressLine1 = + form.control(_addressLine1Key).value as String?; + final addressLine2 = + form.control(_addressLine2Key).value as String?; + final landmark = + form.control(_landmarkKey).value as String?; + final postalCode = + form.control(_postalCodeKey).value as String?; + + state.whenOrNull( + create: ( + loading, + complaintType, + _, + addressModel, + complaintsDetailsModel, + ) { + bloc.add(ComplaintsRegistrationEvent.saveAddress( + addressModel: PgrAddressModel( + buildingName: addressLine1, + street: addressLine2, + landmark: landmark, + pincode: postalCode, + geoLocation: GeoLocation( + latitude: form.control(_latKey).value, + longitude: form.control(_lngKey).value, + ), + ), + )); + }, + ); + + router.push(ComplaintsDetailsRoute()); + }, + ), + ]), + children: [ + DigitCard( + margin: const EdgeInsets.all(spacer2), + cardType: CardType.primary, children: [ + Text( + localizations.translate( + i18.complaints.complaintsLocationLabel, + ), + style: textTheme.headingXl, + ), + ReactiveWrapperField( + formControlName: _addressLine1Key, + showErrors: (control) => control.invalid, + validationMessages: { + 'required': (_) => localizations.translate( + i18.common.min2CharsRequired, + ), + 'maxLength': (object) => localizations + .translate(i18.common.maxCharsRequired) + .replaceAll('{}', maxLength.toString()), + }, + builder: (field) { + return LabeledField( + label: localizations.translate( + i18.householdLocation + .householdAddressLine1LabelText, + ), + child: DigitTextFormInput( + errorMessage: field.errorText, + initialValue: field.value, + onChange: (value) => form + .control(_addressLine1Key) + .value = value, + ), + ); + }), + ReactiveWrapperField( + formControlName: _addressLine2Key, + builder: (field) { + return LabeledField( + label: localizations.translate( + i18.householdLocation + .householdAddressLine2LabelText, + ), + padding: const EdgeInsets.only(top: spacer2 / 2), + child: DigitTextFormInput( + maxLength: maxLength, + initialValue: field.value, + onChange: (value) => form + .control(_addressLine2Key) + .value = value, + errorMessage: field.errorText, + ), + ); + }), + ReactiveWrapperField( + formControlName: _landmarkKey, + builder: (field) { + return LabeledField( + label: localizations.translate( + i18.householdLocation.landmarkFormLabel, + ), + padding: const EdgeInsets.only(top: spacer2 / 2), + child: DigitTextFormInput( + initialValue: field.value, + onChange: (value) => form + .control(_landmarkKey) + .value = value, + errorMessage: field.errorText, + ), + ); + }), + ReactiveWrapperField( + formControlName: _postalCodeKey, + builder: (field) { + return LabeledField( + label: localizations.translate( + i18.householdLocation.postalCodeFormLabel, + ), + padding: const EdgeInsets.only(top: spacer2 / 3.5), + child: DigitTextFormInput( + keyboardType: TextInputType.text, + initialValue: field.value, + inputFormatters: [ + FilteringTextInputFormatter.digitsOnly, + ], + onChange: (value) => form + .control(_postalCodeKey) + .value = value, + ), + ); + }), + ]), + ], + ); + }, + ), + ), + ), + ); + } + + FormGroup buildForm(ComplaintsRegistrationState state) { + final addressModel = state.mapOrNull( + view: (value) => value.addressModel, + ); + + final shouldDisableForm = addressModel != null; + + return fb.group({ + _addressLine1Key: FormControl( + value: addressModel?.buildingName, + disabled: shouldDisableForm, + validators: [ + Validators.delegate( + (validator) => CustomValidator.requiredMin(validator)), + Validators.maxLength(maxLength), + ], + ), + _addressLine2Key: FormControl( + value: addressModel?.street, + disabled: shouldDisableForm, + validators: [ + Validators.delegate( + (validator) => CustomValidator.requiredMin(validator)), + Validators.maxLength(maxLength), + ], + ), + _landmarkKey: FormControl( + value: addressModel?.landmark, + disabled: shouldDisableForm, + validators: [ + Validators.delegate( + (validator) => CustomValidator.requiredMin(validator)), + Validators.maxLength(maxLength), + ], + ), + _postalCodeKey: FormControl( + value: addressModel?.pincode, + disabled: shouldDisableForm, + validators: [ + Validators.delegate( + (validator) => CustomValidator.requiredMin(validator)), + Validators.maxLength(6), + ], + ), + _latKey: FormControl( + value: addressModel?.geoLocation?.latitude, + validators: [ + Validators.delegate( + (validator) => CustomValidator.requiredMin(validator)), + ], + ), + _lngKey: FormControl( + value: addressModel?.geoLocation?.longitude, + ), + _accuracyKey: FormControl(), + }); + } +} diff --git a/packages/complaints/lib/pages/registration/complaints_registration_wrapper.dart b/packages/complaints/lib/pages/registration/complaints_registration_wrapper.dart new file mode 100644 index 000000000..50dc872dc --- /dev/null +++ b/packages/complaints/lib/pages/registration/complaints_registration_wrapper.dart @@ -0,0 +1,91 @@ +import 'dart:convert'; + +import 'package:auto_route/auto_route.dart'; +import 'package:digit_ui_components/services/location_bloc.dart'; +import 'package:location/location.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; + + + +import '../../models/pgr_complaints.dart'; +import '/blocs/complaints_registration/complaints_registration.dart'; +import '/models/complaints.dart'; +import '/utils/utils.dart'; +import '/widgets/boundary_selection_wrapper.dart'; + + +@RoutePage() +class ComplaintsRegistrationWrapperPage extends StatelessWidget + implements AutoRouteWrapper { + final PgrServiceModel? pgrServiceModel; + + const ComplaintsRegistrationWrapperPage({ + Key? key, + this.pgrServiceModel, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + + return const BoundarySelectionWrapper( + + child: AutoRouter(), + ); + } + + @override + Widget wrappedRoute(BuildContext context) { + return MultiBlocProvider( + providers: [ + BlocProvider(create: (context) => LocationBloc(location: Location()),), + BlocProvider(create: (context) { + ComplaintsRegistrationState initialState; + + final pgrItem = pgrServiceModel; + + if (pgrItem != null) { + final additionalDetails = PgrAdditionalDetails.fromJson( + jsonDecode(pgrItem.additionalDetail!), + ); + + initialState = ComplaintsRegistrationViewState( + complaintType: pgrItem.serviceCode, + addressModel: pgrItem.address, + complaintsDetailsModel: ComplaintsDetailsModel( + administrativeArea: pgrItem.address.locality?.name ?? '', + complainantContactNumber: pgrItem.user.mobileNumber ?? '', + complainantName: pgrItem.user.name ?? '', + complaintDescription: pgrItem.description, + complaintRaisedFor: + + ComplaintsSingleton().userMobileNumber != pgrItem.user.mobileNumber + ? 'Another user' + : 'Myself', + + dateOfComplaint: pgrItem.auditDetails?.createdTime.toDateTime ?? + DateTime.now(), + supervisorContactNumber: + additionalDetails.supervisorContactNumber ?? '', + supervisorName: additionalDetails.supervisorName ?? '', + ), + ); + } else { + initialState = const ComplaintsRegistrationCreateState(); + } + + return ComplaintsRegistrationBloc( + initialState, + + pgrServiceRepository: + context.repository(context), + + ); + }, + ) + ], + + child: this, + ); + } +} diff --git a/packages/complaints/lib/router/complaints_router.dart b/packages/complaints/lib/router/complaints_router.dart new file mode 100644 index 000000000..7df52f8a3 --- /dev/null +++ b/packages/complaints/lib/router/complaints_router.dart @@ -0,0 +1,71 @@ +import 'package:auto_route/auto_route.dart'; + +import 'complaints_router.gm.dart'; + +/// Complaint Inbox and registration Router +@AutoRouterConfig.module() +class ComplaintsRoute extends $ComplaintsRoute { + + RouteType get defaultRouteType => const RouteType.material(); + + + List routes = [ + /// Complaints Inbox + AutoRoute( + page: ComplaintsInboxWrapperRoute.page, + path: 'complaints-inbox', + children: [ + AutoRoute( + page: ComplaintsInboxRoute.page, + path: 'complaints-inbox-items', + initial: true, + ), + AutoRoute( + page: ComplaintsInboxFilterRoute.page, + path: 'complaints-inbox-filter', + ), + AutoRoute( + page: ComplaintsInboxSearchRoute.page, + path: 'complaints-inbox-search', + ), + AutoRoute( + page: ComplaintsInboxSortRoute.page, + path: 'complaints-inbox-sort', + ), + AutoRoute( + page: ComplaintsDetailsViewRoute.page, + path: 'complaints-inbox-view-details', + ), + ], + ), + + /// Complaints registration + AutoRoute( + page: ComplaintsRegistrationWrapperRoute.page, + path: 'complaints-registration', + children: [ + AutoRoute( + page: ComplaintTypeRoute.page, + path: 'complaints-type', + initial: true, + ), + AutoRoute( + page: ComplaintsLocationRoute.page, + path: 'complaints-location', + ), + AutoRoute( + page: ComplaintsDetailsRoute.page, + path: 'complaints-details', + ), + + ], + ), + + /// Complaints Acknowledgement + AutoRoute( + page: ComplaintsAcknowledgementRoute.page, + path: 'complaints-acknowledgement', + ), + + ]; +} diff --git a/packages/complaints/lib/router/complaints_router.gm.dart b/packages/complaints/lib/router/complaints_router.gm.dart new file mode 100644 index 000000000..f5fab4156 --- /dev/null +++ b/packages/complaints/lib/router/complaints_router.gm.dart @@ -0,0 +1,551 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +// ************************************************************************** +// AutoRouterGenerator +// ************************************************************************** + +// ignore_for_file: type=lint +// coverage:ignore-file + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'package:auto_route/auto_route.dart' as _i12; +import 'package:complaints/blocs/localization/app_localization.dart' as _i14; +import 'package:complaints/models/pgr_complaints.dart' as _i15; +import 'package:complaints/pages/complaints_acknowledgement.dart' as _i2; +import 'package:complaints/pages/inbox/complaints_details_view.dart' as _i4; +import 'package:complaints/pages/inbox/complaints_inbox.dart' as _i6; +import 'package:complaints/pages/inbox/complaints_inbox_filter.dart' as _i5; +import 'package:complaints/pages/inbox/complaints_inbox_search.dart' as _i7; +import 'package:complaints/pages/inbox/complaints_inbox_sort.dart' as _i8; +import 'package:complaints/pages/inbox/complaints_inbox_wrapper.dart' as _i9; +import 'package:complaints/pages/registration/complaint_type.dart' as _i1; +import 'package:complaints/pages/registration/complaints_details.dart' as _i3; +import 'package:complaints/pages/registration/complaints_location.dart' as _i10; +import 'package:complaints/pages/registration/complaints_registration_wrapper.dart' + as _i11; +import 'package:flutter/material.dart' as _i13; + +abstract class $ComplaintsRoute extends _i12.AutoRouterModule { + @override + final Map pagesMap = { + ComplaintTypeRoute.name: (routeData) { + final args = routeData.argsAs( + orElse: () => const ComplaintTypeRouteArgs()); + return _i12.AutoRoutePage( + routeData: routeData, + child: _i1.ComplaintTypePage( + key: args.key, + appLocalizations: args.appLocalizations, + ), + ); + }, + ComplaintsAcknowledgementRoute.name: (routeData) { + final args = routeData.argsAs( + orElse: () => const ComplaintsAcknowledgementRouteArgs()); + return _i12.AutoRoutePage( + routeData: routeData, + child: _i2.ComplaintsAcknowledgementPage( + key: args.key, + appLocalizations: args.appLocalizations, + ), + ); + }, + ComplaintsDetailsRoute.name: (routeData) { + final args = routeData.argsAs( + orElse: () => const ComplaintsDetailsRouteArgs()); + return _i12.AutoRoutePage( + routeData: routeData, + child: _i3.ComplaintsDetailsPage( + key: args.key, + appLocalizations: args.appLocalizations, + ), + ); + }, + ComplaintsDetailsViewRoute.name: (routeData) { + final args = routeData.argsAs(); + return _i12.AutoRoutePage( + routeData: routeData, + child: _i4.ComplaintsDetailsViewPage( + key: args.key, + complaint: args.complaint, + ), + ); + }, + ComplaintsInboxFilterRoute.name: (routeData) { + final args = routeData.argsAs( + orElse: () => const ComplaintsInboxFilterRouteArgs()); + return _i12.AutoRoutePage( + routeData: routeData, + child: _i5.ComplaintsInboxFilterPage( + key: args.key, + appLocalizations: args.appLocalizations, + ), + ); + }, + ComplaintsInboxRoute.name: (routeData) { + final args = routeData.argsAs( + orElse: () => const ComplaintsInboxRouteArgs()); + return _i12.AutoRoutePage( + routeData: routeData, + child: _i6.ComplaintsInboxPage( + key: args.key, + appLocalizations: args.appLocalizations, + ), + ); + }, + ComplaintsInboxSearchRoute.name: (routeData) { + final args = routeData.argsAs( + orElse: () => const ComplaintsInboxSearchRouteArgs()); + return _i12.AutoRoutePage( + routeData: routeData, + child: _i7.ComplaintsInboxSearchPage( + key: args.key, + appLocalizations: args.appLocalizations, + ), + ); + }, + ComplaintsInboxSortRoute.name: (routeData) { + final args = routeData.argsAs( + orElse: () => const ComplaintsInboxSortRouteArgs()); + return _i12.AutoRoutePage( + routeData: routeData, + child: _i8.ComplaintsInboxSortPage( + key: args.key, + appLocalizations: args.appLocalizations, + ), + ); + }, + ComplaintsInboxWrapperRoute.name: (routeData) { + return _i12.AutoRoutePage( + routeData: routeData, + child: const _i9.ComplaintsInboxWrapperPage(), + ); + }, + ComplaintsLocationRoute.name: (routeData) { + final args = routeData.argsAs( + orElse: () => const ComplaintsLocationRouteArgs()); + return _i12.AutoRoutePage( + routeData: routeData, + child: _i10.ComplaintsLocationPage( + key: args.key, + appLocalizations: args.appLocalizations, + ), + ); + }, + ComplaintsRegistrationWrapperRoute.name: (routeData) { + final args = routeData.argsAs( + orElse: () => const ComplaintsRegistrationWrapperRouteArgs()); + return _i12.AutoRoutePage( + routeData: routeData, + child: _i12.WrappedRoute( + child: _i11.ComplaintsRegistrationWrapperPage( + key: args.key, + pgrServiceModel: args.pgrServiceModel, + )), + ); + }, + }; +} + +/// generated route for +/// [_i1.ComplaintTypePage] +class ComplaintTypeRoute extends _i12.PageRouteInfo { + ComplaintTypeRoute({ + _i13.Key? key, + _i14.ComplaintsLocalization? appLocalizations, + List<_i12.PageRouteInfo>? children, + }) : super( + ComplaintTypeRoute.name, + args: ComplaintTypeRouteArgs( + key: key, + appLocalizations: appLocalizations, + ), + initialChildren: children, + ); + + static const String name = 'ComplaintTypeRoute'; + + static const _i12.PageInfo page = + _i12.PageInfo(name); +} + +class ComplaintTypeRouteArgs { + const ComplaintTypeRouteArgs({ + this.key, + this.appLocalizations, + }); + + final _i13.Key? key; + + final _i14.ComplaintsLocalization? appLocalizations; + + @override + String toString() { + return 'ComplaintTypeRouteArgs{key: $key, appLocalizations: $appLocalizations}'; + } +} + +/// generated route for +/// [_i2.ComplaintsAcknowledgementPage] +class ComplaintsAcknowledgementRoute + extends _i12.PageRouteInfo { + ComplaintsAcknowledgementRoute({ + _i13.Key? key, + _i14.ComplaintsLocalization? appLocalizations, + List<_i12.PageRouteInfo>? children, + }) : super( + ComplaintsAcknowledgementRoute.name, + args: ComplaintsAcknowledgementRouteArgs( + key: key, + appLocalizations: appLocalizations, + ), + initialChildren: children, + ); + + static const String name = 'ComplaintsAcknowledgementRoute'; + + static const _i12.PageInfo page = + _i12.PageInfo(name); +} + +class ComplaintsAcknowledgementRouteArgs { + const ComplaintsAcknowledgementRouteArgs({ + this.key, + this.appLocalizations, + }); + + final _i13.Key? key; + + final _i14.ComplaintsLocalization? appLocalizations; + + @override + String toString() { + return 'ComplaintsAcknowledgementRouteArgs{key: $key, appLocalizations: $appLocalizations}'; + } +} + +/// generated route for +/// [_i3.ComplaintsDetailsPage] +class ComplaintsDetailsRoute + extends _i12.PageRouteInfo { + ComplaintsDetailsRoute({ + _i13.Key? key, + _i14.ComplaintsLocalization? appLocalizations, + List<_i12.PageRouteInfo>? children, + }) : super( + ComplaintsDetailsRoute.name, + args: ComplaintsDetailsRouteArgs( + key: key, + appLocalizations: appLocalizations, + ), + initialChildren: children, + ); + + static const String name = 'ComplaintsDetailsRoute'; + + static const _i12.PageInfo page = + _i12.PageInfo(name); +} + +class ComplaintsDetailsRouteArgs { + const ComplaintsDetailsRouteArgs({ + this.key, + this.appLocalizations, + }); + + final _i13.Key? key; + + final _i14.ComplaintsLocalization? appLocalizations; + + @override + String toString() { + return 'ComplaintsDetailsRouteArgs{key: $key, appLocalizations: $appLocalizations}'; + } +} + +/// generated route for +/// [_i4.ComplaintsDetailsViewPage] +class ComplaintsDetailsViewRoute + extends _i12.PageRouteInfo { + ComplaintsDetailsViewRoute({ + _i13.Key? key, + required _i15.PgrServiceModel complaint, + List<_i12.PageRouteInfo>? children, + }) : super( + ComplaintsDetailsViewRoute.name, + args: ComplaintsDetailsViewRouteArgs( + key: key, + complaint: complaint, + ), + initialChildren: children, + ); + + static const String name = 'ComplaintsDetailsViewRoute'; + + static const _i12.PageInfo page = + _i12.PageInfo(name); +} + +class ComplaintsDetailsViewRouteArgs { + const ComplaintsDetailsViewRouteArgs({ + this.key, + required this.complaint, + }); + + final _i13.Key? key; + + final _i15.PgrServiceModel complaint; + + @override + String toString() { + return 'ComplaintsDetailsViewRouteArgs{key: $key, complaint: $complaint}'; + } +} + +/// generated route for +/// [_i5.ComplaintsInboxFilterPage] +class ComplaintsInboxFilterRoute + extends _i12.PageRouteInfo { + ComplaintsInboxFilterRoute({ + _i13.Key? key, + _i14.ComplaintsLocalization? appLocalizations, + List<_i12.PageRouteInfo>? children, + }) : super( + ComplaintsInboxFilterRoute.name, + args: ComplaintsInboxFilterRouteArgs( + key: key, + appLocalizations: appLocalizations, + ), + initialChildren: children, + ); + + static const String name = 'ComplaintsInboxFilterRoute'; + + static const _i12.PageInfo page = + _i12.PageInfo(name); +} + +class ComplaintsInboxFilterRouteArgs { + const ComplaintsInboxFilterRouteArgs({ + this.key, + this.appLocalizations, + }); + + final _i13.Key? key; + + final _i14.ComplaintsLocalization? appLocalizations; + + @override + String toString() { + return 'ComplaintsInboxFilterRouteArgs{key: $key, appLocalizations: $appLocalizations}'; + } +} + +/// generated route for +/// [_i6.ComplaintsInboxPage] +class ComplaintsInboxRoute + extends _i12.PageRouteInfo { + ComplaintsInboxRoute({ + _i13.Key? key, + _i14.ComplaintsLocalization? appLocalizations, + List<_i12.PageRouteInfo>? children, + }) : super( + ComplaintsInboxRoute.name, + args: ComplaintsInboxRouteArgs( + key: key, + appLocalizations: appLocalizations, + ), + initialChildren: children, + ); + + static const String name = 'ComplaintsInboxRoute'; + + static const _i12.PageInfo page = + _i12.PageInfo(name); +} + +class ComplaintsInboxRouteArgs { + const ComplaintsInboxRouteArgs({ + this.key, + this.appLocalizations, + }); + + final _i13.Key? key; + + final _i14.ComplaintsLocalization? appLocalizations; + + @override + String toString() { + return 'ComplaintsInboxRouteArgs{key: $key, appLocalizations: $appLocalizations}'; + } +} + +/// generated route for +/// [_i7.ComplaintsInboxSearchPage] +class ComplaintsInboxSearchRoute + extends _i12.PageRouteInfo { + ComplaintsInboxSearchRoute({ + _i13.Key? key, + _i14.ComplaintsLocalization? appLocalizations, + List<_i12.PageRouteInfo>? children, + }) : super( + ComplaintsInboxSearchRoute.name, + args: ComplaintsInboxSearchRouteArgs( + key: key, + appLocalizations: appLocalizations, + ), + initialChildren: children, + ); + + static const String name = 'ComplaintsInboxSearchRoute'; + + static const _i12.PageInfo page = + _i12.PageInfo(name); +} + +class ComplaintsInboxSearchRouteArgs { + const ComplaintsInboxSearchRouteArgs({ + this.key, + this.appLocalizations, + }); + + final _i13.Key? key; + + final _i14.ComplaintsLocalization? appLocalizations; + + @override + String toString() { + return 'ComplaintsInboxSearchRouteArgs{key: $key, appLocalizations: $appLocalizations}'; + } +} + +/// generated route for +/// [_i8.ComplaintsInboxSortPage] +class ComplaintsInboxSortRoute + extends _i12.PageRouteInfo { + ComplaintsInboxSortRoute({ + _i13.Key? key, + _i14.ComplaintsLocalization? appLocalizations, + List<_i12.PageRouteInfo>? children, + }) : super( + ComplaintsInboxSortRoute.name, + args: ComplaintsInboxSortRouteArgs( + key: key, + appLocalizations: appLocalizations, + ), + initialChildren: children, + ); + + static const String name = 'ComplaintsInboxSortRoute'; + + static const _i12.PageInfo page = + _i12.PageInfo(name); +} + +class ComplaintsInboxSortRouteArgs { + const ComplaintsInboxSortRouteArgs({ + this.key, + this.appLocalizations, + }); + + final _i13.Key? key; + + final _i14.ComplaintsLocalization? appLocalizations; + + @override + String toString() { + return 'ComplaintsInboxSortRouteArgs{key: $key, appLocalizations: $appLocalizations}'; + } +} + +/// generated route for +/// [_i9.ComplaintsInboxWrapperPage] +class ComplaintsInboxWrapperRoute extends _i12.PageRouteInfo { + const ComplaintsInboxWrapperRoute({List<_i12.PageRouteInfo>? children}) + : super( + ComplaintsInboxWrapperRoute.name, + initialChildren: children, + ); + + static const String name = 'ComplaintsInboxWrapperRoute'; + + static const _i12.PageInfo page = _i12.PageInfo(name); +} + +/// generated route for +/// [_i10.ComplaintsLocationPage] +class ComplaintsLocationRoute + extends _i12.PageRouteInfo { + ComplaintsLocationRoute({ + _i13.Key? key, + _i14.ComplaintsLocalization? appLocalizations, + List<_i12.PageRouteInfo>? children, + }) : super( + ComplaintsLocationRoute.name, + args: ComplaintsLocationRouteArgs( + key: key, + appLocalizations: appLocalizations, + ), + initialChildren: children, + ); + + static const String name = 'ComplaintsLocationRoute'; + + static const _i12.PageInfo page = + _i12.PageInfo(name); +} + +class ComplaintsLocationRouteArgs { + const ComplaintsLocationRouteArgs({ + this.key, + this.appLocalizations, + }); + + final _i13.Key? key; + + final _i14.ComplaintsLocalization? appLocalizations; + + @override + String toString() { + return 'ComplaintsLocationRouteArgs{key: $key, appLocalizations: $appLocalizations}'; + } +} + +/// generated route for +/// [_i11.ComplaintsRegistrationWrapperPage] +class ComplaintsRegistrationWrapperRoute + extends _i12.PageRouteInfo { + ComplaintsRegistrationWrapperRoute({ + _i13.Key? key, + _i15.PgrServiceModel? pgrServiceModel, + List<_i12.PageRouteInfo>? children, + }) : super( + ComplaintsRegistrationWrapperRoute.name, + args: ComplaintsRegistrationWrapperRouteArgs( + key: key, + pgrServiceModel: pgrServiceModel, + ), + initialChildren: children, + ); + + static const String name = 'ComplaintsRegistrationWrapperRoute'; + + static const _i12.PageInfo page = + _i12.PageInfo(name); +} + +class ComplaintsRegistrationWrapperRouteArgs { + const ComplaintsRegistrationWrapperRouteArgs({ + this.key, + this.pgrServiceModel, + }); + + final _i13.Key? key; + + final _i15.PgrServiceModel? pgrServiceModel; + + @override + String toString() { + return 'ComplaintsRegistrationWrapperRouteArgs{key: $key, pgrServiceModel: $pgrServiceModel}'; + } +} diff --git a/packages/complaints/lib/utils/constants.dart b/packages/complaints/lib/utils/constants.dart new file mode 100644 index 000000000..2f23f6f43 --- /dev/null +++ b/packages/complaints/lib/utils/constants.dart @@ -0,0 +1,5 @@ +class Constants { + static String noResultSvg = 'assets/icons/svg/no_result.svg'; + static RegExp mobileNumberRegExp = + RegExp(r'^(?=.{10}$)[+]*[(]{0,1}[0-9]{1,4}[)]{0,1}[-\s\./0-9]*$'); +} diff --git a/packages/complaints/lib/utils/extensions/context_utility.dart b/packages/complaints/lib/utils/extensions/context_utility.dart new file mode 100644 index 000000000..0a64c331f --- /dev/null +++ b/packages/complaints/lib/utils/extensions/context_utility.dart @@ -0,0 +1,22 @@ +part of 'extensions.dart'; + +extension ContextUtilityExtensions on BuildContext { + int millisecondsSinceEpoch([DateTime? dateTime]) { + return (dateTime ?? DateTime.now()).millisecondsSinceEpoch; + } + + DataRepository + repository( + BuildContext context, + ) { + switch (ComplaintsSingleton().persistenceConfiguration) { + case PersistenceConfiguration.offlineFirst: + return context.read>(); + case PersistenceConfiguration.onlineOnly: + return context.read>(); + default: + return context.read>(); + } + } + +} \ No newline at end of file diff --git a/packages/complaints/lib/utils/extensions/extensions.dart b/packages/complaints/lib/utils/extensions/extensions.dart new file mode 100644 index 000000000..cee3aa97f --- /dev/null +++ b/packages/complaints/lib/utils/extensions/extensions.dart @@ -0,0 +1,24 @@ +import 'package:digit_data_model/data_model.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:intl/intl.dart'; + + +import '/utils/utils.dart'; + +part 'context_utility.dart'; + +// Extension to convert an integer (epoch) to a DateTime object. +extension EpochToDateTime on int? { + DateTime? get toDateTime { + return this == null ? null : DateTime.fromMillisecondsSinceEpoch(this!); + } +} + +extension DateTimeExtension on DateTime? { + String? getFormattedDate([String format = 'dd-MM-yyyy']) { + if (this == null) return null; + + return DateFormat(format).format(this!); + } +} diff --git a/packages/complaints/lib/utils/i18_key_constants.dart b/packages/complaints/lib/utils/i18_key_constants.dart new file mode 100644 index 000000000..632aa53de --- /dev/null +++ b/packages/complaints/lib/utils/i18_key_constants.dart @@ -0,0 +1,450 @@ +const common = Common(); +const complaints = Complaints(); +const complaintTypeShowcase = ComplaintTypeShowcase(); +const complaintsDetailsShowcase = ComplaintsDetailsShowcase(); +const complaintsDetailsViewShowcase = ComplaintsDetailsViewShowcase(); +const complaintsInboxShowcase = ComplaintsInboxShowcase(); + +const householdLocation = HouseholdLocation(); + +const searchBeneficiary = SearchBeneficiary(); + +const individualDetails = IndividualDetails(); + +class Common { + const Common(); + + String get coreCommonContinue => 'CORE_COMMON_CONTINUE'; + + String get coreCommonAge => 'CORE_COMMON_AGE'; + + String get coreCommonName => 'CORE_COMMON_NAME'; + + String get coreCommonEmailId => 'CORE_COMMON_EMAIL_ID'; + + String get coreCommonGender => 'CORE_COMMON_GENDER'; + + String get coreCommonMobileNumber => 'CORE_COMMON_MOBILE_NUMBER'; + + String get coreCommonSubmit => 'CORE_COMMON_SUBMIT'; + + String get coreCommonSave => 'CORE_COMMON_SAVE'; + + String get coreCommonCancel => 'CORE_COMMON_CANCEL'; + + String get corecommonRequired => 'CORE_COMMON_REQUIRED'; + + String get coreCommonReasonRequired => 'CORE_COMMON_REASON_REQUIRED'; + + String get corecommonclose => 'CORE_COMMON_CLOSE'; + + String get coreCommonOk => 'CORE_COMMON_OK'; + + String get coreCommonNA => 'CORE_COMMON_NA'; + + String get coreCommonProfile => 'CORE_COMMON_PROFILE'; + + String get coreCommonLogout => 'CORE_COMMON_LOGOUT'; + + String get coreCommonBack => 'CORE_COMMON_BACK'; + + String get coreCommonHelp => 'CORE_COMMON_HELP'; + + String get coreCommonHome => 'CORE_COMMON_HOME'; + + String get coreCommonViewDownloadedData => 'CORE_COMMON_VIEW_DOWNLOADED_DATA'; + + String get coreCommonlanguage => 'CORE_COMMON_LANGUAGE'; + + String get coreCommonSyncProgress => 'CORE_COMMON_SYNC_PROGRESS'; + + String get coreCommonDataSynced => 'CORE_COMMON_DATA_SYNCED'; + + String get coreCommonDataSyncFailed => 'CORE_COMMON_DATA_SYNC_FAILED'; + + String get coreCommonDataSyncRetry => 'CORE_COMMON_DATA_SYNC_RETRY'; + + String get connectionLabel => 'CORE_COMMON_CONNECTION_LABEL'; + + String get connectionContent => 'CORE_COMMON_CONNECTION_CONTENT'; + + String get coreCommonSkip => 'CORE_COMMON_SKIP'; + + String get coreCommonNext => 'CORE_COMMON_NEXT'; + + String get coreCommonYes => 'CORE_COMMON_YES'; + + String get coreCommonNo => 'CORE_COMMON_NO'; + String get coreCommonGoback => 'CORE_COMMON_GO_BACK'; + + String get coreCommonRequiredItems => 'CORE_COMMON_REQUIRED_ITEMS'; + + String get min2CharsRequired => 'MIN_2_CHARS_REQUIRED'; + + String get maxCharsRequired => 'MAX_CHARS_ALLOWED'; + + String get maxValue => 'MAX_VALUE_ALLOWED'; + String get minValue => 'MIN_VALUE_ALLOWED'; + + String get noResultsFound => 'NO_RESULTS_FOUND'; + + String get coreCommonSyncInProgress => 'CORE_COMMON_SYNC_IN_PROGRESS'; + + String get facilitySearchHeaderLabel => 'FACILITY_SEARCH_HEADER_LABEL'; + String get projectFacilitySearchHeaderLabel => + 'PROJECT_FACILITY_SEARCH_HEADER_LABEL'; + + String get coreCommonDownload => 'CORE_COMMON_DOWNLOAD'; + + String get coreCommonDownloadFailed => 'CORE_COMMON_DOWNLOAD_FAILED'; + + String get noMatchFound => 'CORE_COMMON_NO_MATCH_FOUND'; + + String get scanBales => 'CORE_COMMON_SCAN_BALES'; + String get ageInMonths => 'AGE_IN_MONTHS_LABEL'; + + String get profileUpdateSuccess => 'PROFILE_UPDATE_SUCCESS'; +} + +class Complaints { + const Complaints(); + + String get complaintsTypeHeading => 'COMPLAINTS_TYPE_HEADING'; + + String get complaintsTypeLabel => 'COMPLAINTS_TYPE_LABEL'; + + String get actionLabel => 'HOUSEHOLD_LOCATION_ACTION_LABEL'; + + String get complaintsLocationLabel => 'COMPLAINTS_LOCATION_LABEL'; + + String get complaintsDetailsLabel => 'COMPLAINTS_DETAILS_LABEL'; + + String get dateOfComplaint => 'COMPLAINTS_DATE'; + + String get complainantTypeQuestion => 'COMPLAINTS_COMPLAINANT_TYPE_QUESTION'; + + String get complainantName => 'COMPLAINTS_COMPLAINANT_NAME'; + + String get complainantContactNumber => + 'COMPLAINTS_COMPLAINANT_CONTACT_NUMBER'; + + String get supervisorName => 'COMPLAINTS_SUPERVISOR_NAME'; + + String get supervisorContactNumber => 'COMPLAINTS_SUPERVISOR_CONTACT_NUMBER'; + + String get complaintDescription => 'COMPLAINTS_DESCRIPTION'; + + String get dialogTitle => 'COMPLAINTS_DIALOG_TITLE'; + + String get dialogContent => 'COMPLAINTS_DIALOG_MESSAGE'; + + String get fileComplaintAction => 'COMPLAINTS_FILE_COMPLAINT_ACTION'; + + String get inboxHeading => 'COMPLAINTS_INBOX_HEADING'; + + String get searchCTA => 'COMPLAINTS_INBOX_SEARCH_CTA'; + + String get filterCTA => 'COMPLAINTS_INBOX_FILTER_CTA'; + + String get sortCTA => 'COMPLAINTS_INBOX_SORT_CTA'; + + String get complaintInboxFilterHeading => 'COMPLAINTS_INBOX_FILTER_HEADING'; + + String get complaintsFilterClearAll => 'COMPLAINTS_FILTER_CLEAR_ALL'; + + String get complaintInboxSearchHeading => 'COMPLAINTS_INBOX_SEARCH_HEADING'; + + String get complaintInboxSortHeading => 'COMPLAINTS_INBOX_SORT_HEADING'; + + String get complaintsSortDateAsc => 'COMPLAINT_SORT_DATE_ASC'; + + String get complaintsSortDateDesc => 'COMPLAINT_SORT_DATE_DESC'; + + String get assignedToAll => 'COMPLAINTS_ASSIGNED_TO_ALL'; + + String get assignedToSelf => 'COMPLAINTS_ASSIGNED_TO_SELF'; + + String get noComplaintsExist => 'COMPLAINTS_NO_COMPLAINTS_EXIST'; + + String get validationRequiredError => 'COMPLAINTS_VALIDATION_REQUIRED_ERROR'; + + String get inboxDateLabel => 'COMPLAINTS_INBOX_DATE_LABEL'; + + String get inboxNumberLabel => 'COMPLAINTS_INBOX_NUMBER_LABEL'; + + String get inboxTypeLabel => 'COMPLAINTS_INBOX_TYPE_LABEL'; + + String get inboxAreaLabel => 'COMPLAINTS_INBOX_AREA_LABEL'; + + String get inboxStatusLabel => 'COMPLAINTS_INBOX_STATUS_LABEL'; + + String get inboxNotGeneratedLabel => 'COMPLAINTS_INBOX_NOT_GENERATED_LABEL'; + + String get inboxSyncRequiredLabel => 'COMPLAINTS_INBOX_SYNC_REQUIRED_LABEL'; + + String get raisedForMyself => 'COMPLAINTS_RAISED_FOR_MYSELF'; + String get validationMinLengthError => + 'COMPLAINTS_VALIDATION_MINLENGTH_ERROR'; + + String get raisedForAnotherUser => 'COMPLAINTS_RAISED_FOR_ANOTHER_USER'; + + String get locality => 'COMPLAINTS_LOCALITY'; + + String get backToInbox => 'COMPLAINTS_BACK_TO_INBOX'; + + String get acknowledgementAction => 'COMPLAINTS_ACKNOWLEDGEMENT_ACTION'; + + String get acknowledgementDescription => + 'COMPLAINTS_ACKNOWLEDGEMENT_DESCRIPTION'; + + String get acknowledgementLabel => 'COMPLAINTS_ACKNOWLEDGEMENT_LABEL'; + + String get acknowledgementSubLabelMain => + 'COMPLAINTS_ACKNOWLEDGEMENT_SUB_LABEL_MAIN'; + + String get acknowledgementSubLabelSub => + 'COMPLAINTS_ACKNOWLEDGEMENT_SUB_LABEL_SUB'; + + String get complaintsError => 'COMPLAINTS_VALIDATION_REQUIRED_ERROR'; + + String get validationRadioRequiredError => + 'COMPLAINTS_VALIDATION_RADIO_REQUIRED_ERROR'; +} + +class ComplaintTypeShowcase { + const ComplaintTypeShowcase(); + + String get complaintType { + return 'COMPLAINT_TYPE_SHOWCASE_COMPLAINT_TYPE'; + } + + String get complaintTypeNext { + return 'COMPLAINT_TYPE_SHOWCASE_COMPLAINT_TYPE_NEXT'; + } +} + +class ComplaintsDetailsShowcase { + const ComplaintsDetailsShowcase(); + + String get complaintDate { + return 'COMPLAINT_DETAILS_SHOWCASE_DATE'; + } + + String get complaintOrganizationUnit { + return 'COMPLAINT_DETAILS_SHOWCASE_ORGANIZATION_UNIT'; + } + + String get complaintSelfOrOther { + return 'COMPLAINT_DETAILS_SHOWCASE_SELF_OR_OTHER'; + } + + String get complaintName { + return 'COMPLAINT_DETAILS_SHOWCASE_NAME'; + } + + String get complaintContact { + return 'COMPLAINT_DETAILS_SHOWCASE_CONTACT'; + } + + String get complaintSupervisorName { + return 'COMPLAINT_DETAILS_SHOWCASE_SUPERVISOR_NAME'; + } + + String get complaintSupervisorContact { + return 'COMPLAINT_DETAILS_SHOWCASE_SUPERVISOR_CONTACT'; + } + + String get complaintDescription { + return 'COMPLAINT_DETAILS_SHOWCASE_DESCRIPTION'; + } + + String get complaintSubmit { + return 'COMPLAINT_DETAILS_SHOWCASE_SUBMIT'; + } +} + +class ComplaintsDetailsViewShowcase { + const ComplaintsDetailsViewShowcase(); + + String get complaintNumber { + return 'COMPLAINT_DETAILS_VIEW_SHOWCASE_NUMBER'; + } + + String get complaintType { + return 'COMPLAINT_DETAILS_VIEW_SHOWCASE_TYPE'; + } + + String get complaintDate { + return 'COMPLAINT_DETAILS_VIEW_SHOWCASE_DATE'; + } + + String get complaintName { + return 'COMPLAINT_DETAILS_VIEW_SHOWCASE_NAME'; + } + + String get complaintArea { + return 'COMPLAINT_DETAILS_VIEW_SHOWCASE_AREA'; + } + + String get complaintContact { + return 'COMPLAINT_DETAILS_VIEW_CONTACT'; + } + + String get complaintStatus { + return 'COMPLAINT_DETAILS_VIEW_SHOWCASE_STATUS'; + } + + String get complaintDescription { + return 'COMPLAINT_DETAILS_VIEW_SHOWCASE_DESCRIPTION'; + } + + String get complaintClose { + return 'COMPLAINT_DETAILS_VIEW_SHOWCASE_CLOSE'; + } +} + +class ComplaintsInboxShowcase { + const ComplaintsInboxShowcase(); + + String get complaintSearch { + return 'COMPLAINT_INBOX_SHOWCASE_SEARCH'; + } + + String get complaintFilter { + return 'COMPLAINT_INBOX_SHOWCASE_FILTER'; + } + + String get complaintSort { + return 'COMPLAINT_INBOX_SHOWCASE_SORT'; + } + + String get complaintNumber { + return 'COMPLAINT_INBOX_SHOWCASE_NUMBER'; + } + + String get complaintType { + return 'COMPLAINT_INBOX_SHOWCASE_TYPE'; + } + + String get complaintDate { + return 'COMPLAINT_INBOX_SHOWCASE_DATE'; + } + + String get complaintArea { + return 'COMPLAINT_INBOX_SHOWCASE_AREA'; + } + + String get complaintStatus { + return 'COMPLAINT_INBOX_SHOWCASE_STATUS'; + } + + String get complaintOpen { + return 'COMPLAINT_INBOX_SHOWCASE_OPEN'; + } + + String get complaintCreate { + return 'COMPLAINT_INBOX_SHOWCASE_CREATE'; + } +} + +class HouseholdLocation { + const HouseholdLocation(); + + String get householdLocationLabelText => 'HOUSEHOLD_LOCATION_LABEL_TEXT'; + + String get administrationAreaFormLabel => 'ADMINISTRATION_AREA_FORM_LABEL'; + + String get administrationAreaRequiredValidation => + 'HOUSEHOLD_LOCATION_ADMINISTRATION_AREA_REQUIRED_VALIDATION'; + + String get householdAddressLine1LabelText => + 'HOUSEHOLD_ADDRESS_LINE_1_FORM_LABEL'; + + String get landmarkFormLabel => 'LANDMARK_FORM_LABEL'; + + String get householdAddressLine2LabelText => + 'HOUSEHOLD_ADDRESS_LINE_2_FORM_LABEL'; + + String get postalCodeFormLabel => 'POSTAL_CODE_FORM_LABEL'; + + String get actionLabel => 'HOUSEHOLD_LOCATION_ACTION_LABEL'; +} + +class IndividualDetails { + const IndividualDetails(); + + String get individualsDetailsLabelText => 'INDIVIDUAL_LABEL_TEXT'; + + String get nameLabelText => 'INDIVIDUAL_NAME_LABEL_TEXT'; + + String get checkboxLabelText => 'HEAD_OF_HOUSEHOLD_LABEL_TEXT'; + + String get idTypeLabelText => 'ID_TYPE_LABEL_TEXT'; + + String get idNumberLabelText => 'ID_NUMBER_LABEL_TEXT'; + + String get idNumberSuggestionText => 'ID_NUMBER_SUGGESTION_TEXT'; + + String get dobLabelText => 'DOB_LABEL_TEXT'; + + String get ageLabelText => 'AGE_LABEL_TEXT'; + + String get separatorLabelText => 'SEPARATOR_LABEL_TEXT'; + + String get genderLabelText => 'GENDER_LABEL_TEXT'; + + String get dobErrorText => 'DOB_ERROR_MESSAGE'; + + String get mobileNumberLabelText => 'MOBILE_NUMBER_LABEL_TEXT'; + + String get heightLabelText => 'HEIGHT_LABEL_TEXT'; + + String get submitButtonLabelText => 'INDIVIDUAL_DETAILS_SUBMIT'; + + String get mobileNumberInvalidFormatValidationMessage => + 'INDIVIDUAL_DETAILS_INVALID_MOBILE_NUMBER'; + + String get yearsHintText => 'YEARS_HINT_TEXT'; + String get monthsHintText => 'MONTHS_HINT_TEXT'; + + String get yearsErrorText => 'ERR_YEARS'; + + String get monthsErrorText => 'ERR_MONTHS'; + + String get yearsAndMonthsErrorText => 'ERR_YEARS_AND_MONTHS'; + + String get linkVoucherToIndividual => 'LINK_VOUCHER_TO_INDIVIDUAL'; +} + +class SearchBeneficiary { + const SearchBeneficiary(); + + String get statisticsLabelText => 'BENEFICIARY_STATISTICS_LABEL_TEXT'; + + String get searchIndividualLabelText => + 'BENEFICIARY_STATISTICS_SEARCH_INDIVIDUAL_LABEL'; + + String get noOfHouseholdsRegistered => 'NO_OF_HOUSEHOLDS_REGISTERED'; + + String get noOfResourcesDelivered => 'NO_OF_RESOURCES_DELIVERED'; + + String get beneficiarySearchHintText => 'BENEFICIARY_SEARCH_HINT_TEXT'; + + String get beneficiaryIndividualSearchHintText => + 'BENEFICIARY_INDIVIDUAL_SEARCH_HINT_TEXT'; + + String get beneficiaryInfoDescription => 'BENEFICIARY_INFO_DESCRIPTION'; + + String get beneficiaryInfoTitle => 'BENEFICIARY_INFO_TITLE'; + + String get beneficiaryAddActionLabel => 'BENEFICIARY_ADD_ACTION_LABEL'; + + String get iconLabel => 'ICON_LABEL'; + + String get yearsAbbr => 'YEARS_ABBR'; + + String get monthsAbbr => 'MONTHS_ABBR'; + + String get proximityLabel => 'PROXIMITY_LABEL'; +} + diff --git a/packages/complaints/lib/utils/typedefs.dart b/packages/complaints/lib/utils/typedefs.dart new file mode 100644 index 000000000..9e1a900e3 --- /dev/null +++ b/packages/complaints/lib/utils/typedefs.dart @@ -0,0 +1,6 @@ +import 'package:digit_data_model/data_model.dart'; + +import '../models/pgr_complaints.dart'; + +typedef PgrServiceDataRepository += DataRepository; \ No newline at end of file diff --git a/packages/complaints/lib/utils/utils.dart b/packages/complaints/lib/utils/utils.dart new file mode 100644 index 000000000..3f12f1df0 --- /dev/null +++ b/packages/complaints/lib/utils/utils.dart @@ -0,0 +1,105 @@ +import 'package:digit_data_model/data_model.dart'; +import 'package:reactive_forms/reactive_forms.dart'; + + + +export 'extensions/extensions.dart'; + +//singleton class for complaints operations +class ComplaintsSingleton { + static final ComplaintsSingleton _singleton = ComplaintsSingleton._internal(); + + // Factory constructor that returns the singleton instance. + factory ComplaintsSingleton() { + return _singleton; + } + + //Private constructor for the singleton pattern + ComplaintsSingleton._internal(); + + //various properties related to the Complaints + String? _tenantId = ''; + String? _loggedInUserUuid = ''; + String? _userMobileNumber = ''; + String? _loggedInUserName = ''; + + List? _complaintTypes; + BoundaryModel? _boundaryModel; + String? _userName =''; + + PersistenceConfiguration _persistenceConfiguration = PersistenceConfiguration + .offlineFirst; // Default to offline first persistence configuration + + void setInitialData({ + String? tenantId, + String? loggedInUserUuid, + String? userMobileNumber, + String? loggedInUserName, + + List? complaintTypes, + String? userName, + }){ + + _tenantId = tenantId; + _loggedInUserUuid = loggedInUserUuid; + _userMobileNumber = userMobileNumber; + _loggedInUserName = loggedInUserName; + + _complaintTypes = complaintTypes; + _userName = userName; + + } + + void setPersistenceConfiguration(PersistenceConfiguration configuration) { + _persistenceConfiguration = configuration; + } + + void setTenantId({required String tenantId}) { + _tenantId = tenantId; + } + + void setBoundary({required BoundaryModel boundary}) { + _boundaryModel = boundary; + } + + get tenantId => _tenantId; + get loggedInUserUuid => _loggedInUserUuid; + get userMobileNumber => _userMobileNumber; + get loggedInUserName => _loggedInUserName; + get complaintTypes => _complaintTypes; + get persistenceConfiguration => _persistenceConfiguration; + + get boundary => _boundaryModel; + get userName => _userName; + + +} + +class CustomValidator { + /// Validates that control's value must be `true` + static Map? requiredMin( + AbstractControl control, + ) { + return control.value == null || + control.value.toString().length >= 2 || + control.value.toString().trim().isEmpty + ? null + : {'required': true}; + } + + static Map? validMobileNumber( + AbstractControl control, + ) { + if (control.value == null || control.value.toString().isEmpty) { + return null; + } + + const pattern = r'^[+]*[(]{0,1}[0-9]{1,4}[)]{0,1}[-\s\./0-9]*$'; + + if (RegExp(pattern).hasMatch(control.value.toString())) return null; + + if (control.value.toString().length < 10) return {'mobileNumber': true}; + + return {'mobileNumber': true}; + } +} diff --git a/packages/complaints/lib/widgets/boundary_selection_wrapper.dart b/packages/complaints/lib/widgets/boundary_selection_wrapper.dart new file mode 100644 index 000000000..176bbb9eb --- /dev/null +++ b/packages/complaints/lib/widgets/boundary_selection_wrapper.dart @@ -0,0 +1,37 @@ +import 'package:auto_route/auto_route.dart'; +import 'package:complaints/router/complaints_router.gm.dart'; +import 'package:digit_data_model/blocs/boundary/boundary.dart'; +import 'package:digit_ui_components/utils/app_logger.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; + + +/// Wraps the [child] widget with a [BlocListener] that listens to +/// [BoundaryState] changes and navigates to [HomeRoute] when submitted. +class BoundarySelectionWrapper extends StatelessWidget { + final Widget child; + + const BoundarySelectionWrapper({ + Key? key, + required this.child, + }) : super(key: key); + + @override + Widget build(BuildContext context) => + BlocListener( + listener: (context, state) { + if (state.hasSubmitted) { + context.navigateTo( + const ComplaintsInboxWrapperRoute(), + onFailure: (failure) { + AppLogger.instance.error( + title: 'BoundarySelectionWrapper', + message: failure.toString(), + ); + }, + ); + } + }, + child: child, + ); +} diff --git a/packages/complaints/lib/widgets/header/back_navigation_help_header.dart b/packages/complaints/lib/widgets/header/back_navigation_help_header.dart new file mode 100644 index 000000000..65f84d33d --- /dev/null +++ b/packages/complaints/lib/widgets/header/back_navigation_help_header.dart @@ -0,0 +1,82 @@ +import 'package:auto_route/auto_route.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/theme/ComponentTheme/back_button_theme.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/atoms/digit_back_button.dart'; +import 'package:flutter/material.dart'; + +import '/blocs/localization/app_localization.dart'; +import '/utils/i18_key_constants.dart' as i18; + +class BackNavigationHelpHeaderWidget extends StatelessWidget { + final bool showHelp; + final bool showBackNavigation; + final bool showLogoutCTA; + final VoidCallback? helpClicked; + final VoidCallback? handleBack; + + const BackNavigationHelpHeaderWidget({ + super.key, + this.showHelp = false, //hiding help + this.showBackNavigation = true, + this.showLogoutCTA = false, + this.helpClicked, + this.handleBack, + }); + + @override + Widget build(BuildContext context) { + final theme = Theme.of(context); + + return Padding( + padding: const EdgeInsets.all(spacer2), + child: Row( + children: [ + Expanded( + child: Row( + children: [ + if (showBackNavigation) + + DigitBackButton(label: ComplaintsLocalization.of(context).translate( + i18.common.coreCommonBack, + ), + digitBackButtonThemeData: + const DigitBackButtonThemeData().copyWith( + context: context, + backDigitButtonIcon: Icon( + Icons.arrow_left, + size:Theme.of(context).spacerTheme.spacer5, + color: Theme.of(context).colorTheme.primary.primary2, + ), + ), + handleBack: () { + context.router.maybePop(); + handleBack != null ? handleBack!() : null; + }, + ) + ], + ), + ), + SizedBox(width: showHelp ? spacer2 * 2 : 0), + if (showHelp) + TextButton( + style: TextButton.styleFrom(padding: EdgeInsets.zero), + onPressed: helpClicked, + child: Row( + children: [ + Text( + ComplaintsLocalization.of(context) + .translate(i18.common.coreCommonHelp), + overflow: TextOverflow.ellipsis, + ), + const Icon( + Icons.help_outline_outlined, + ), // Add the icon to the right + ], + ), + ), + ], + ), + ); + } +} diff --git a/packages/complaints/lib/widgets/localized.dart b/packages/complaints/lib/widgets/localized.dart new file mode 100644 index 000000000..c2a9e1ba1 --- /dev/null +++ b/packages/complaints/lib/widgets/localized.dart @@ -0,0 +1,34 @@ +import 'package:flutter/cupertino.dart'; + +import '/blocs/localization/app_localization.dart'; + +abstract class LocalizedStatefulWidget extends StatefulWidget { + final ComplaintsLocalization? appLocalizations; + + const LocalizedStatefulWidget({ + super.key, + this.appLocalizations, + }); +} + +abstract class LocalizedState + extends State { + late ComplaintsLocalization _localizations; + + ComplaintsLocalization get localizations => _localizations; + + set localizations(ComplaintsLocalization localizations) { + if (mounted) { + setState(() { + _localizations = localizations; + }); + } + } + + @override + @mustCallSuper + void didChangeDependencies() { + _localizations = widget.appLocalizations ?? ComplaintsLocalization.of(context); + super.didChangeDependencies(); + } +} diff --git a/packages/complaints/lib/widgets/no_result_card/no_result_card.dart b/packages/complaints/lib/widgets/no_result_card/no_result_card.dart new file mode 100644 index 000000000..f7b27c178 --- /dev/null +++ b/packages/complaints/lib/widgets/no_result_card/no_result_card.dart @@ -0,0 +1,40 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_svg/svg.dart'; + +import '/utils/constants.dart'; + +class NoResultCard extends StatelessWidget { + final AlignmentGeometry align; + final String? label; + const NoResultCard({ + super.key, + this.align = Alignment.centerLeft, + this.label, + }); + + @override + Widget build(BuildContext context) { + final theme = Theme.of(context); + + return Align( + alignment: align, + child: Padding( + padding: const EdgeInsets.only(top: 100, bottom: 10, right: 8), + child: Column( + children: [ + SvgPicture.asset( + Constants.noResultSvg, + width: 340, + height: 200, + ), + const SizedBox(height: 20), + Text( + label ?? '', + style: theme.textTheme.bodyMedium, + ), + ], + ), + ), + ); + } +} diff --git a/packages/complaints/pubspec.lock b/packages/complaints/pubspec.lock new file mode 100644 index 000000000..20435b65a --- /dev/null +++ b/packages/complaints/pubspec.lock @@ -0,0 +1,1480 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + sha256: "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7" + url: "https://pub.dev" + source: hosted + version: "67.0.0" + analyzer: + dependency: transitive + description: + name: analyzer + sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d" + url: "https://pub.dev" + source: hosted + version: "6.4.1" + ansicolor: + dependency: transitive + description: + name: ansicolor + sha256: "50e982d500bc863e1d703448afdbf9e5a72eb48840a4f766fa361ffd6877055f" + url: "https://pub.dev" + source: hosted + version: "2.0.3" + archive: + dependency: transitive + description: + name: archive + sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d + url: "https://pub.dev" + source: hosted + version: "3.6.1" + args: + dependency: transitive + description: + name: args + sha256: bf9f5caeea8d8fe6721a9c358dd8a5c1947b27f1cfaa18b39c301273594919e6 + url: "https://pub.dev" + source: hosted + version: "2.6.0" + async: + dependency: transitive + description: + name: async + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" + source: hosted + version: "2.11.0" + auto_route: + dependency: "direct main" + description: + name: auto_route + sha256: a9001a90539ca3effc168f7e1029a5885c7326b9032c09ac895e303c1d137704 + url: "https://pub.dev" + source: hosted + version: "8.3.0" + auto_route_generator: + dependency: "direct dev" + description: + name: auto_route_generator + sha256: ba28133d3a3bf0a66772bcc98dade5843753cd9f1a8fb4802b842895515b67d3 + url: "https://pub.dev" + source: hosted + version: "8.0.0" + bloc: + dependency: transitive + description: + name: bloc + sha256: "106842ad6569f0b60297619e9e0b1885c2fb9bf84812935490e6c5275777804e" + url: "https://pub.dev" + source: hosted + version: "8.1.4" + bloc_test: + dependency: "direct dev" + description: + name: bloc_test + sha256: "165a6ec950d9252ebe36dc5335f2e6eb13055f33d56db0eeb7642768849b43d2" + url: "https://pub.dev" + source: hosted + version: "9.1.7" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + build: + dependency: transitive + description: + name: build + sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" + url: "https://pub.dev" + source: hosted + version: "2.4.1" + build_config: + dependency: transitive + description: + name: build_config + sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1 + url: "https://pub.dev" + source: hosted + version: "1.1.1" + build_daemon: + dependency: transitive + description: + name: build_daemon + sha256: "79b2aef6ac2ed00046867ed354c88778c9c0f029df8a20fe10b5436826721ef9" + url: "https://pub.dev" + source: hosted + version: "4.0.2" + build_resolvers: + dependency: transitive + description: + name: build_resolvers + sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a" + url: "https://pub.dev" + source: hosted + version: "2.4.2" + build_runner: + dependency: "direct main" + description: + name: build_runner + sha256: "3ac61a79bfb6f6cc11f693591063a7f19a7af628dc52f141743edac5c16e8c22" + url: "https://pub.dev" + source: hosted + version: "2.4.9" + build_runner_core: + dependency: transitive + description: + name: build_runner_core + sha256: e3c79f69a64bdfcd8a776a3c28db4eb6e3fb5356d013ae5eb2e52007706d5dbe + url: "https://pub.dev" + source: hosted + version: "7.3.1" + built_collection: + dependency: transitive + description: + name: built_collection + sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" + url: "https://pub.dev" + source: hosted + version: "5.1.1" + built_value: + dependency: transitive + description: + name: built_value + sha256: c7913a9737ee4007efedaffc968c049fd0f3d0e49109e778edc10de9426005cb + url: "https://pub.dev" + source: hosted + version: "8.9.2" + camera: + dependency: transitive + description: + name: camera + sha256: "26ff41045772153f222ffffecba711a206f670f5834d40ebf5eed3811692f167" + url: "https://pub.dev" + source: hosted + version: "0.11.0+2" + camera_android_camerax: + dependency: transitive + description: + name: camera_android_camerax + sha256: "011be2ab0e5b3e3aa8094413fa890f8c5c5afd7cfdaef353a992047d4dab5780" + url: "https://pub.dev" + source: hosted + version: "0.6.8+2" + camera_avfoundation: + dependency: transitive + description: + name: camera_avfoundation + sha256: "2e4c568f70e406ccb87376bc06b53d2f5bebaab71e2fbcc1a950e31449381bcf" + url: "https://pub.dev" + source: hosted + version: "0.9.17+5" + camera_platform_interface: + dependency: transitive + description: + name: camera_platform_interface + sha256: b3ede1f171532e0d83111fe0980b46d17f1aa9788a07a2fbed07366bbdbb9061 + url: "https://pub.dev" + source: hosted + version: "2.8.0" + camera_web: + dependency: transitive + description: + name: camera_web + sha256: "595f28c89d1fb62d77c73c633193755b781c6d2e0ebcd8dc25b763b514e6ba8f" + url: "https://pub.dev" + source: hosted + version: "0.3.5" + characters: + dependency: transitive + description: + name: characters + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" + source: hosted + version: "1.3.0" + charcode: + dependency: transitive + description: + name: charcode + sha256: fb0f1107cac15a5ea6ef0a6ef71a807b9e4267c713bb93e00e92d737cc8dbd8a + url: "https://pub.dev" + source: hosted + version: "1.4.0" + checked_yaml: + dependency: transitive + description: + name: checked_yaml + sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff + url: "https://pub.dev" + source: hosted + version: "2.0.3" + clock: + dependency: transitive + description: + name: clock + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" + source: hosted + version: "1.1.1" + code_builder: + dependency: transitive + description: + name: code_builder + sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37 + url: "https://pub.dev" + source: hosted + version: "4.10.0" + collection: + dependency: transitive + description: + name: collection + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + url: "https://pub.dev" + source: hosted + version: "1.18.0" + convert: + dependency: transitive + description: + name: convert + sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68 + url: "https://pub.dev" + source: hosted + version: "3.1.2" + coverage: + dependency: transitive + description: + name: coverage + sha256: e3493833ea012784c740e341952298f1cc77f1f01b1bbc3eb4eecf6984fb7f43 + url: "https://pub.dev" + source: hosted + version: "1.11.1" + cross_file: + dependency: transitive + description: + name: cross_file + sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670" + url: "https://pub.dev" + source: hosted + version: "0.3.4+2" + crypto: + dependency: transitive + description: + name: crypto + sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855" + url: "https://pub.dev" + source: hosted + version: "3.0.6" + csslib: + dependency: transitive + description: + name: csslib + sha256: "09bad715f418841f976c77db72d5398dc1253c21fb9c0c7f0b0b985860b2d58e" + url: "https://pub.dev" + source: hosted + version: "1.0.2" + dart_mappable: + dependency: "direct main" + description: + name: dart_mappable + sha256: f69a961ae8589724ebb542e588f228ae844c5f78028899cbe2cc718977c1b382 + url: "https://pub.dev" + source: hosted + version: "4.3.0" + dart_mappable_builder: + dependency: "direct dev" + description: + path: "packages/dart_mappable_builder" + ref: "1.6-final-dev" + resolved-ref: "1e7467577a9701d396f7e23afbf00065e54c5469" + url: "https://github.com/egovernments/health-campaign-field-worker-app/" + source: git + version: "4.2.3" + dart_style: + dependency: transitive + description: + name: dart_style + sha256: "99e066ce75c89d6b29903d788a7bb9369cf754f7b24bf70bf4b6d6d6b26853b9" + url: "https://pub.dev" + source: hosted + version: "2.3.6" + diff_match_patch: + dependency: transitive + description: + name: diff_match_patch + sha256: "2efc9e6e8f449d0abe15be240e2c2a3bcd977c8d126cfd70598aee60af35c0a4" + url: "https://pub.dev" + source: hosted + version: "0.4.1" + digit_data_model: + dependency: "direct main" + description: + name: digit_data_model + sha256: c3bc7299a7d927ebb83d8e91c1d7a8a51f6a1d1295dafeacb642012b72b99a2f + url: "https://pub.dev" + source: hosted + version: "1.0.5" + digit_ui_components: + dependency: "direct main" + description: + name: digit_ui_components + sha256: "57c4da5237be6025783e7357a02b6b492f02e38f711d674bf46f5f8c8a93ad76" + url: "https://pub.dev" + source: hosted + version: "0.0.2-dev.4" + dio: + dependency: "direct main" + description: + name: dio + sha256: "5598aa796bbf4699afd5c67c0f5f6e2ed542afc956884b9cd58c306966efc260" + url: "https://pub.dev" + source: hosted + version: "5.7.0" + dio_web_adapter: + dependency: transitive + description: + name: dio_web_adapter + sha256: "33259a9276d6cea88774a0000cfae0d861003497755969c92faa223108620dc8" + url: "https://pub.dev" + source: hosted + version: "2.0.0" + dotted_border: + dependency: transitive + description: + name: dotted_border + sha256: "108837e11848ca776c53b30bc870086f84b62ed6e01c503ed976e8f8c7df9c04" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + drift: + dependency: "direct main" + description: + name: drift + sha256: "4e0ffee40d23f0b809e6cff1ad202886f51d629649073ed42d9cd1d194ea943e" + url: "https://pub.dev" + source: hosted + version: "2.19.1+1" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" + source: hosted + version: "1.3.1" + ffi: + dependency: transitive + description: + name: ffi + sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" + url: "https://pub.dev" + source: hosted + version: "2.1.3" + file: + dependency: transitive + description: + name: file + sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 + url: "https://pub.dev" + source: hosted + version: "7.0.1" + file_picker: + dependency: transitive + description: + name: file_picker + sha256: "825aec673606875c33cd8d3c4083f1a3c3999015a84178b317b7ef396b7384f3" + url: "https://pub.dev" + source: hosted + version: "8.0.7" + file_selector_linux: + dependency: transitive + description: + name: file_selector_linux + sha256: "54cbbd957e1156d29548c7d9b9ec0c0ebb6de0a90452198683a7d23aed617a33" + url: "https://pub.dev" + source: hosted + version: "0.9.3+2" + file_selector_macos: + dependency: transitive + description: + name: file_selector_macos + sha256: "271ab9986df0c135d45c3cdb6bd0faa5db6f4976d3e4b437cf7d0f258d941bfc" + url: "https://pub.dev" + source: hosted + version: "0.9.4+2" + file_selector_platform_interface: + dependency: transitive + description: + name: file_selector_platform_interface + sha256: a3994c26f10378a039faa11de174d7b78eb8f79e4dd0af2a451410c1a5c3f66b + url: "https://pub.dev" + source: hosted + version: "2.6.2" + file_selector_windows: + dependency: transitive + description: + name: file_selector_windows + sha256: "8f5d2f6590d51ecd9179ba39c64f722edc15226cc93dcc8698466ad36a4a85a4" + url: "https://pub.dev" + source: hosted + version: "0.9.3+3" + fixnum: + dependency: transitive + description: + name: fixnum + sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be + url: "https://pub.dev" + source: hosted + version: "1.1.1" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_bloc: + dependency: "direct main" + description: + name: flutter_bloc + sha256: b594505eac31a0518bdcb4b5b79573b8d9117b193cc80cc12e17d639b10aa27a + url: "https://pub.dev" + source: hosted + version: "8.1.6" + flutter_dropzone: + dependency: transitive + description: + name: flutter_dropzone + sha256: b399c60411f9bf9c4c2f97933c6a3a185859e75aade8897831e76cee4346c8e1 + url: "https://pub.dev" + source: hosted + version: "3.0.7" + flutter_dropzone_platform_interface: + dependency: transitive + description: + name: flutter_dropzone_platform_interface + sha256: "96d2c51c86063ba150551c3b40fd26c5a18785bee071c0c751502d28a545df3b" + url: "https://pub.dev" + source: hosted + version: "2.2.0" + flutter_dropzone_web: + dependency: transitive + description: + name: flutter_dropzone_web + sha256: c5a0fdb63b7216352a01761ec1b6eba1982e49541e60675735e2d3d95e207b19 + url: "https://pub.dev" + source: hosted + version: "3.0.13" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c" + url: "https://pub.dev" + source: hosted + version: "4.0.0" + flutter_localizations: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + flutter_plugin_android_lifecycle: + dependency: transitive + description: + name: flutter_plugin_android_lifecycle + sha256: "9ee02950848f61c4129af3d6ec84a1cfc0e47931abc746b03e7a3bc3e8ff6eda" + url: "https://pub.dev" + source: hosted + version: "2.0.22" + flutter_spinkit: + dependency: transitive + description: + name: flutter_spinkit + sha256: d2696eed13732831414595b98863260e33e8882fc069ee80ec35d4ac9ddb0472 + url: "https://pub.dev" + source: hosted + version: "5.2.1" + flutter_styled_toast: + dependency: transitive + description: + name: flutter_styled_toast + sha256: e667f13a665820eb0fa8506547e47eacbcddf1948d6d3036cfd3b089bd4b0516 + url: "https://pub.dev" + source: hosted + version: "2.2.1" + flutter_svg: + dependency: "direct main" + description: + name: flutter_svg + sha256: "54900a1a1243f3c4a5506d853a2b5c2dbc38d5f27e52a52618a8054401431123" + url: "https://pub.dev" + source: hosted + version: "2.0.16" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + fluttertoast: + dependency: transitive + description: + name: fluttertoast + sha256: "81b68579e23fcbcada2db3d50302813d2371664afe6165bc78148050ab94bf66" + url: "https://pub.dev" + source: hosted + version: "8.2.5" + freezed: + dependency: "direct dev" + description: + name: freezed + sha256: a434911f643466d78462625df76fd9eb13e57348ff43fe1f77bbe909522c67a1 + url: "https://pub.dev" + source: hosted + version: "2.5.2" + freezed_annotation: + dependency: "direct main" + description: + name: freezed_annotation + sha256: c2e2d632dd9b8a2b7751117abcfc2b4888ecfe181bd9fca7170d9ef02e595fe2 + url: "https://pub.dev" + source: hosted + version: "2.4.4" + frontend_server_client: + dependency: transitive + description: + name: frontend_server_client + sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 + url: "https://pub.dev" + source: hosted + version: "4.0.0" + geolocator: + dependency: transitive + description: + name: geolocator + sha256: f4efb8d3c4cdcad2e226af9661eb1a0dd38c71a9494b22526f9da80ab79520e5 + url: "https://pub.dev" + source: hosted + version: "10.1.1" + geolocator_android: + dependency: transitive + description: + name: geolocator_android + sha256: "7aefc530db47d90d0580b552df3242440a10fe60814496a979aa67aa98b1fd47" + url: "https://pub.dev" + source: hosted + version: "4.6.1" + geolocator_apple: + dependency: transitive + description: + name: geolocator_apple + sha256: "6154ea2682563f69fc0125762ed7e91e7ed85d0b9776595653be33918e064807" + url: "https://pub.dev" + source: hosted + version: "2.3.8+1" + geolocator_platform_interface: + dependency: transitive + description: + name: geolocator_platform_interface + sha256: "386ce3d9cce47838355000070b1d0b13efb5bc430f8ecda7e9238c8409ace012" + url: "https://pub.dev" + source: hosted + version: "4.2.4" + geolocator_web: + dependency: transitive + description: + name: geolocator_web + sha256: "102e7da05b48ca6bf0a5bda0010f886b171d1a08059f01bfe02addd0175ebece" + url: "https://pub.dev" + source: hosted + version: "2.2.1" + geolocator_windows: + dependency: transitive + description: + name: geolocator_windows + sha256: "53da08937d07c24b0d9952eb57a3b474e29aae2abf9dd717f7e1230995f13f0e" + url: "https://pub.dev" + source: hosted + version: "0.2.3" + glob: + dependency: transitive + description: + name: glob + sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + google_fonts: + dependency: transitive + description: + name: google_fonts + sha256: b1ac0fe2832c9cc95e5e88b57d627c5e68c223b9657f4b96e1487aa9098c7b82 + url: "https://pub.dev" + source: hosted + version: "6.2.1" + graphs: + dependency: transitive + description: + name: graphs + sha256: "741bbf84165310a68ff28fe9e727332eef1407342fca52759cb21ad8177bb8d0" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + group_radio_button: + dependency: "direct main" + description: + name: group_radio_button + sha256: "204de8d16b224be7fc72dade0c3afd410ff5a34417d89f74f0fd8be7a8c2b4d6" + url: "https://pub.dev" + source: hosted + version: "1.3.0" + horizontal_data_table: + dependency: transitive + description: + name: horizontal_data_table + sha256: c8ab5256bbced698a729f3e0ff2cb0e8e97416cdbb082860370eaf883badf722 + url: "https://pub.dev" + source: hosted + version: "4.3.1" + html: + dependency: transitive + description: + name: html + sha256: "1fc58edeaec4307368c60d59b7e15b9d658b57d7f3125098b6294153c75337ec" + url: "https://pub.dev" + source: hosted + version: "0.15.5" + http: + dependency: transitive + description: + name: http + sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 + url: "https://pub.dev" + source: hosted + version: "1.2.2" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" + url: "https://pub.dev" + source: hosted + version: "3.2.1" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" + source: hosted + version: "4.0.2" + image_picker: + dependency: transitive + description: + name: image_picker + sha256: "021834d9c0c3de46bf0fe40341fa07168407f694d9b2bb18d532dc1261867f7a" + url: "https://pub.dev" + source: hosted + version: "1.1.2" + image_picker_android: + dependency: transitive + description: + name: image_picker_android + sha256: "8c5abf0dcc24fe6e8e0b4a5c0b51a5cf30cefdf6407a3213dae61edc75a70f56" + url: "https://pub.dev" + source: hosted + version: "0.8.12+12" + image_picker_for_web: + dependency: transitive + description: + name: image_picker_for_web + sha256: "717eb042ab08c40767684327be06a5d8dbb341fe791d514e4b92c7bbe1b7bb83" + url: "https://pub.dev" + source: hosted + version: "3.0.6" + image_picker_ios: + dependency: transitive + description: + name: image_picker_ios + sha256: "4f0568120c6fcc0aaa04511cb9f9f4d29fc3d0139884b1d06be88dcec7641d6b" + url: "https://pub.dev" + source: hosted + version: "0.8.12+1" + image_picker_linux: + dependency: transitive + description: + name: image_picker_linux + sha256: "4ed1d9bb36f7cd60aa6e6cd479779cc56a4cb4e4de8f49d487b1aaad831300fa" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + image_picker_macos: + dependency: transitive + description: + name: image_picker_macos + sha256: "3f5ad1e8112a9a6111c46d0b57a7be2286a9a07fc6e1976fdf5be2bd31d4ff62" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + image_picker_platform_interface: + dependency: transitive + description: + name: image_picker_platform_interface + sha256: "9ec26d410ff46f483c5519c29c02ef0e02e13a543f882b152d4bfd2f06802f80" + url: "https://pub.dev" + source: hosted + version: "2.10.0" + image_picker_windows: + dependency: transitive + description: + name: image_picker_windows + sha256: "6ad07afc4eb1bc25f3a01084d28520496c4a3bb0cb13685435838167c9dcedeb" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + intl: + dependency: "direct main" + description: + name: intl + sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf + url: "https://pub.dev" + source: hosted + version: "0.19.0" + io: + dependency: transitive + description: + name: io + sha256: dfd5a80599cf0165756e3181807ed3e77daf6dd4137caaad72d0b7931597650b + url: "https://pub.dev" + source: hosted + version: "1.0.5" + isar: + dependency: "direct main" + description: + name: isar + sha256: "99165dadb2cf2329d3140198363a7e7bff9bbd441871898a87e26914d25cf1ea" + url: "https://pub.dev" + source: hosted + version: "3.1.0+1" + isar_flutter_libs: + dependency: transitive + description: + name: isar_flutter_libs + sha256: bc6768cc4b9c61aabff77152e7f33b4b17d2fc93134f7af1c3dd51500fe8d5e8 + url: "https://pub.dev" + source: hosted + version: "3.1.0+1" + js: + dependency: transitive + description: + name: js + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 + url: "https://pub.dev" + source: hosted + version: "0.6.7" + json_annotation: + dependency: transitive + description: + name: json_annotation + sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" + url: "https://pub.dev" + source: hosted + version: "4.9.0" + json_serializable: + dependency: "direct dev" + description: + name: json_serializable + sha256: ea1432d167339ea9b5bb153f0571d0039607a873d6e04e0117af043f14a1fd4b + url: "https://pub.dev" + source: hosted + version: "6.8.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + url: "https://pub.dev" + source: hosted + version: "10.0.4" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + url: "https://pub.dev" + source: hosted + version: "3.0.3" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" + lints: + dependency: transitive + description: + name: lints + sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235" + url: "https://pub.dev" + source: hosted + version: "4.0.0" + location: + dependency: "direct main" + description: + name: location + sha256: "37ffdadcd4b1498b769824f45ebb4de8ed46663a4a67ac27b33a590ee486579f" + url: "https://pub.dev" + source: hosted + version: "6.0.2" + location_platform_interface: + dependency: transitive + description: + name: location_platform_interface + sha256: "2ecde6bb0f88032b0bbbde37e18975b4468711dd92619c2235cc0c0ee93b4b8e" + url: "https://pub.dev" + source: hosted + version: "4.0.0" + location_web: + dependency: transitive + description: + name: location_web + sha256: "49dda13d415c4603c5775a33fb22f575e0aa3f0ec2916644ddcd722db31ee884" + url: "https://pub.dev" + source: hosted + version: "5.0.2" + logging: + dependency: transitive + description: + name: logging + sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61 + url: "https://pub.dev" + source: hosted + version: "1.3.0" + lottie: + dependency: transitive + description: + name: lottie + sha256: "7afc60865a2429d994144f7d66ced2ae4305fe35d82890b8766e3359872d872c" + url: "https://pub.dev" + source: hosted + version: "3.1.3" + matcher: + dependency: transitive + description: + name: matcher + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + url: "https://pub.dev" + source: hosted + version: "0.12.16+1" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + url: "https://pub.dev" + source: hosted + version: "0.8.0" + meta: + dependency: transitive + description: + name: meta + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" + url: "https://pub.dev" + source: hosted + version: "1.12.0" + mime: + dependency: transitive + description: + name: mime + sha256: "801fd0b26f14a4a58ccb09d5892c3fbdeff209594300a542492cf13fba9d247a" + url: "https://pub.dev" + source: hosted + version: "1.0.6" + mocktail: + dependency: "direct dev" + description: + name: mocktail + sha256: "890df3f9688106f25755f26b1c60589a92b3ab91a22b8b224947ad041bf172d8" + url: "https://pub.dev" + source: hosted + version: "1.0.4" + nested: + dependency: transitive + description: + name: nested + sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20" + url: "https://pub.dev" + source: hosted + version: "1.0.0" + node_preamble: + dependency: transitive + description: + name: node_preamble + sha256: "6e7eac89047ab8a8d26cf16127b5ed26de65209847630400f9aefd7cd5c730db" + url: "https://pub.dev" + source: hosted + version: "2.0.2" + overlay_builder: + dependency: transitive + description: + name: overlay_builder + sha256: "58b97bc5f67a2e2bb7006dd88e697ac757dfffc9dbd1e7dfc1917fb510a4b5c8" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + package_config: + dependency: transitive + description: + name: package_config + sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + path: + dependency: transitive + description: + name: path + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + url: "https://pub.dev" + source: hosted + version: "1.9.0" + path_drawing: + dependency: transitive + description: + name: path_drawing + sha256: bbb1934c0cbb03091af082a6389ca2080345291ef07a5fa6d6e078ba8682f977 + url: "https://pub.dev" + source: hosted + version: "1.0.1" + path_parsing: + dependency: transitive + description: + name: path_parsing + sha256: "883402936929eac138ee0a45da5b0f2c80f89913e6dc3bf77eb65b84b409c6ca" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + path_provider: + dependency: "direct main" + description: + name: path_provider + sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd" + url: "https://pub.dev" + source: hosted + version: "2.1.5" + path_provider_android: + dependency: transitive + description: + name: path_provider_android + sha256: "6f01f8e37ec30b07bc424b4deabac37cacb1bc7e2e515ad74486039918a37eb7" + url: "https://pub.dev" + source: hosted + version: "2.2.10" + path_provider_foundation: + dependency: transitive + description: + name: path_provider_foundation + sha256: "4843174df4d288f5e29185bd6e72a6fbdf5a4a4602717eed565497429f179942" + url: "https://pub.dev" + source: hosted + version: "2.4.1" + path_provider_linux: + dependency: transitive + description: + name: path_provider_linux + sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 + url: "https://pub.dev" + source: hosted + version: "2.2.1" + path_provider_platform_interface: + dependency: transitive + description: + name: path_provider_platform_interface + sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + path_provider_windows: + dependency: transitive + description: + name: path_provider_windows + sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 + url: "https://pub.dev" + source: hosted + version: "2.3.0" + petitparser: + dependency: transitive + description: + name: petitparser + sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27 + url: "https://pub.dev" + source: hosted + version: "6.0.2" + platform: + dependency: transitive + description: + name: platform + sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984" + url: "https://pub.dev" + source: hosted + version: "3.1.6" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" + url: "https://pub.dev" + source: hosted + version: "2.1.8" + pool: + dependency: transitive + description: + name: pool + sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" + url: "https://pub.dev" + source: hosted + version: "1.5.1" + provider: + dependency: transitive + description: + name: provider + sha256: c8a055ee5ce3fd98d6fc872478b03823ffdb448699c6ebdbbc71d59b596fd48c + url: "https://pub.dev" + source: hosted + version: "6.1.2" + pub_semver: + dependency: transitive + description: + name: pub_semver + sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + pubspec_parse: + dependency: transitive + description: + name: pubspec_parse + sha256: c799b721d79eb6ee6fa56f00c04b472dcd44a30d258fac2174a6ec57302678f8 + url: "https://pub.dev" + source: hosted + version: "1.3.0" + reactive_forms: + dependency: "direct main" + description: + name: reactive_forms + sha256: "9b1fb18e0aae9c50cfa0aaabaaa38bc4d78eefc9b7b95fa9c947b051f6524b8e" + url: "https://pub.dev" + source: hosted + version: "17.0.1" + recase: + dependency: "direct main" + description: + name: recase + sha256: e4eb4ec2dcdee52dcf99cb4ceabaffc631d7424ee55e56f280bc039737f89213 + url: "https://pub.dev" + source: hosted + version: "4.1.0" + shelf: + dependency: transitive + description: + name: shelf + sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 + url: "https://pub.dev" + source: hosted + version: "1.4.1" + shelf_packages_handler: + dependency: transitive + description: + name: shelf_packages_handler + sha256: "89f967eca29607c933ba9571d838be31d67f53f6e4ee15147d5dc2934fee1b1e" + url: "https://pub.dev" + source: hosted + version: "3.0.2" + shelf_static: + dependency: transitive + description: + name: shelf_static + sha256: c87c3875f91262785dade62d135760c2c69cb217ac759485334c5857ad89f6e3 + url: "https://pub.dev" + source: hosted + version: "1.1.3" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" + url: "https://pub.dev" + source: hosted + version: "1.0.4" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.99" + source_gen: + dependency: transitive + description: + name: source_gen + sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832" + url: "https://pub.dev" + source: hosted + version: "1.5.0" + source_helper: + dependency: transitive + description: + name: source_helper + sha256: "6adebc0006c37dd63fe05bca0a929b99f06402fc95aa35bf36d67f5c06de01fd" + url: "https://pub.dev" + source: hosted + version: "1.3.4" + source_map_stack_trace: + dependency: transitive + description: + name: source_map_stack_trace + sha256: c0713a43e323c3302c2abe2a1cc89aa057a387101ebd280371d6a6c9fa68516b + url: "https://pub.dev" + source: hosted + version: "2.1.2" + source_maps: + dependency: transitive + description: + name: source_maps + sha256: "708b3f6b97248e5781f493b765c3337db11c5d2c81c3094f10904bfa8004c703" + url: "https://pub.dev" + source: hosted + version: "0.10.12" + source_span: + dependency: transitive + description: + name: source_span + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" + source: hosted + version: "1.10.0" + sprintf: + dependency: transitive + description: + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" + url: "https://pub.dev" + source: hosted + version: "7.0.0" + sqlite3: + dependency: transitive + description: + name: sqlite3 + sha256: fde692580bee3379374af1f624eb3e113ab2865ecb161dbe2d8ac2de9735dbdb + url: "https://pub.dev" + source: hosted + version: "2.4.5" + sqlite3_flutter_libs: + dependency: transitive + description: + name: sqlite3_flutter_libs + sha256: "636b0fe8a2de894e5455572f6cbbc458f4ffecfe9f860b79439e27041ea4f0b9" + url: "https://pub.dev" + source: hosted + version: "0.5.27" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + url: "https://pub.dev" + source: hosted + version: "1.11.1" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + url: "https://pub.dev" + source: hosted + version: "2.1.2" + stream_transform: + dependency: transitive + description: + name: stream_transform + sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" + source: hosted + version: "1.2.1" + test: + dependency: transitive + description: + name: test + sha256: "7ee446762c2c50b3bd4ea96fe13ffac69919352bd3b4b17bac3f3465edc58073" + url: "https://pub.dev" + source: hosted + version: "1.25.2" + test_api: + dependency: transitive + description: + name: test_api + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" + url: "https://pub.dev" + source: hosted + version: "0.7.0" + test_core: + dependency: transitive + description: + name: test_core + sha256: "2bc4b4ecddd75309300d8096f781c0e3280ca1ef85beda558d33fcbedc2eead4" + url: "https://pub.dev" + source: hosted + version: "0.6.0" + timing: + dependency: transitive + description: + name: timing + sha256: "70a3b636575d4163c477e6de42f247a23b315ae20e86442bebe32d3cabf61c32" + url: "https://pub.dev" + source: hosted + version: "1.0.1" + type_plus: + dependency: transitive + description: + name: type_plus + sha256: d5d1019471f0d38b91603adb9b5fd4ce7ab903c879d2fbf1a3f80a630a03fcc9 + url: "https://pub.dev" + source: hosted + version: "2.1.1" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + url: "https://pub.dev" + source: hosted + version: "1.3.2" + universal_html: + dependency: transitive + description: + name: universal_html + sha256: "56536254004e24d9d8cfdb7dbbf09b74cf8df96729f38a2f5c238163e3d58971" + url: "https://pub.dev" + source: hosted + version: "2.2.4" + universal_io: + dependency: transitive + description: + name: universal_io + sha256: "1722b2dcc462b4b2f3ee7d188dad008b6eb4c40bbd03a3de451d82c78bba9aad" + url: "https://pub.dev" + source: hosted + version: "2.2.2" + url_launcher: + dependency: transitive + description: + name: url_launcher + sha256: "9d06212b1362abc2f0f0d78e6f09f726608c74e3b9462e8368bb03314aa8d603" + url: "https://pub.dev" + source: hosted + version: "6.3.1" + url_launcher_android: + dependency: transitive + description: + name: url_launcher_android + sha256: f0c73347dfcfa5b3db8bc06e1502668265d39c08f310c29bff4e28eea9699f79 + url: "https://pub.dev" + source: hosted + version: "6.3.9" + url_launcher_ios: + dependency: transitive + description: + name: url_launcher_ios + sha256: "16a513b6c12bb419304e72ea0ae2ab4fed569920d1c7cb850263fe3acc824626" + url: "https://pub.dev" + source: hosted + version: "6.3.2" + url_launcher_linux: + dependency: transitive + description: + name: url_launcher_linux + sha256: "4e9ba368772369e3e08f231d2301b4ef72b9ff87c31192ef471b380ef29a4935" + url: "https://pub.dev" + source: hosted + version: "3.2.1" + url_launcher_macos: + dependency: transitive + description: + name: url_launcher_macos + sha256: "17ba2000b847f334f16626a574c702b196723af2a289e7a93ffcb79acff855c2" + url: "https://pub.dev" + source: hosted + version: "3.2.2" + url_launcher_platform_interface: + dependency: transitive + description: + name: url_launcher_platform_interface + sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + url_launcher_web: + dependency: transitive + description: + name: url_launcher_web + sha256: "772638d3b34c779ede05ba3d38af34657a05ac55b06279ea6edd409e323dca8e" + url: "https://pub.dev" + source: hosted + version: "2.3.3" + url_launcher_windows: + dependency: transitive + description: + name: url_launcher_windows + sha256: "44cf3aabcedde30f2dba119a9dea3b0f2672fbe6fa96e85536251d678216b3c4" + url: "https://pub.dev" + source: hosted + version: "3.1.3" + uuid: + dependency: transitive + description: + name: uuid + sha256: a5be9ef6618a7ac1e964353ef476418026db906c4facdedaa299b7a2e71690ff + url: "https://pub.dev" + source: hosted + version: "4.5.1" + vector_graphics: + dependency: transitive + description: + name: vector_graphics + sha256: "27d5fefe86fb9aace4a9f8375b56b3c292b64d8c04510df230f849850d912cb7" + url: "https://pub.dev" + source: hosted + version: "1.1.15" + vector_graphics_codec: + dependency: transitive + description: + name: vector_graphics_codec + sha256: "2430b973a4ca3c4dbc9999b62b8c719a160100dcbae5c819bae0cacce32c9cdb" + url: "https://pub.dev" + source: hosted + version: "1.1.12" + vector_graphics_compiler: + dependency: transitive + description: + name: vector_graphics_compiler + sha256: "1b4b9e706a10294258727674a340ae0d6e64a7231980f9f9a3d12e4b42407aad" + url: "https://pub.dev" + source: hosted + version: "1.1.16" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + visibility_detector: + dependency: transitive + description: + name: visibility_detector + sha256: dd5cc11e13494f432d15939c3aa8ae76844c42b723398643ce9addb88a5ed420 + url: "https://pub.dev" + source: hosted + version: "0.4.0+2" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" + url: "https://pub.dev" + source: hosted + version: "14.2.1" + watcher: + dependency: transitive + description: + name: watcher + sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + web: + dependency: transitive + description: + name: web + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" + url: "https://pub.dev" + source: hosted + version: "0.5.1" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + sha256: "58c6666b342a38816b2e7e50ed0f1e261959630becd4c879c4f26bfa14aa5a42" + url: "https://pub.dev" + source: hosted + version: "2.4.5" + webkit_inspection_protocol: + dependency: transitive + description: + name: webkit_inspection_protocol + sha256: "87d3f2333bb240704cd3f1c6b5b7acd8a10e7f0bc28c28dcf14e782014f4a572" + url: "https://pub.dev" + source: hosted + version: "1.2.1" + win32: + dependency: transitive + description: + name: win32 + sha256: "68d1e89a91ed61ad9c370f9f8b6effed9ae5e0ede22a270bdfa6daf79fc2290a" + url: "https://pub.dev" + source: hosted + version: "5.5.4" + xdg_directories: + dependency: transitive + description: + name: xdg_directories + sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15" + 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: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" + url: "https://pub.dev" + source: hosted + version: "3.1.2" +sdks: + dart: ">=3.4.0 <4.0.0" + flutter: ">=3.22.0" diff --git a/packages/complaints/pubspec.yaml b/packages/complaints/pubspec.yaml new file mode 100644 index 000000000..462456135 --- /dev/null +++ b/packages/complaints/pubspec.yaml @@ -0,0 +1,87 @@ +name: complaints +description: This package offers filing complaints features, allowing users to file complaints. +version: 1.0.0 +homepage: https://github.com/egovernments/health-campaign-field-worker-app/tree/master/packages/referral_reconciliation +repository: https://github.com/egovernments/health-campaign-field-worker-app + +environment: + sdk: '>=3.0.0 <4.0.0' + flutter: ">=1.17.0" + +dependencies: + flutter: + sdk: flutter + digit_ui_components: ^0.0.2-dev.4 + flutter_bloc: ^8.1.1 + freezed_annotation: ^2.1.0 + build_runner: ^2.2.1 + auto_route: ^8.1.3 + intl: ^0.19.0 + location: ^6.0.2 + isar: ^3.1.0+1 + digit_data_model: ^1.0.5 + dart_mappable: ^4.2.0 + group_radio_button: ^1.3.0 + reactive_forms: ^17.0.0 + recase: ^4.1.0 + flutter_svg: ^2.0.8 + path_provider: ^2.0.11 + drift: ^2.0.0 + dio: ^5.1.2 + + + +dev_dependencies: + flutter_test: + sdk: flutter + flutter_lints: ^4.0.0 + auto_route_generator: ^8.0.0 + freezed: ^2.1.0+1 + json_serializable: ^6.4.0 + dart_mappable_builder: + git: + url: https://github.com/egovernments/health-campaign-field-worker-app/ + ref: 1.6-final-dev + path: ./packages/dart_mappable_builder + bloc_test: ^9.1.0 + mocktail: ^1.0.2 + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter packages. +flutter: + assets: + - assets/icons/svg/ + - assets/animated_json/ + + # To add assets to your package, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + # + # For details regarding assets in packages, see + # https://flutter.dev/assets-and-images/#from-packages + # + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/assets-and-images/#resolution-aware + + # To add custom fonts to your package, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts in packages, see + # https://flutter.dev/custom-fonts/#from-packages diff --git a/packages/complaints/test/complaints_inbox_bloc_test.dart b/packages/complaints/test/complaints_inbox_bloc_test.dart new file mode 100644 index 000000000..7f0f06a11 --- /dev/null +++ b/packages/complaints/test/complaints_inbox_bloc_test.dart @@ -0,0 +1,55 @@ +import 'package:complaints/blocs/complaints_inbox/complaints_inbox.dart'; +import 'package:complaints/utils/typedefs.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:mocktail/mocktail.dart'; +import 'package:bloc_test/bloc_test.dart'; + +import 'package:complaints/complaints.dart'; + +import 'constants/test_constants.dart'; + + +class MockPgrServiceDataRepository extends Mock implements + PgrServiceDataRepository {} + +void main(){ + //Define a test group for the Complaints Inbox Bloc + group('ComplaintsInboxBloc', () { + //Declare a variable for complaint inbox bloc + late ComplaintsInboxBloc complaintsInboxBloc; + + //Mock the required repositories + late MockPgrServiceDataRepository pgrServiceDataRepository; + + setUp((){ + pgrServiceDataRepository = MockPgrServiceDataRepository(); + complaintsInboxBloc = ComplaintsInboxBloc( + const ComplaintInboxState.complaints(), + pgrRepository: pgrServiceDataRepository + ); + }); + + + //Test case for _handleLoadComplaints + blocTest( + 'emits [ComplaintsInboxState with isFiltered false] when ComplaintInboxLoadComplaintEvent is added', + build: (){ + return complaintsInboxBloc; + }, + act: (bloc){ + bloc.add( + ComplaintInboxLoadComplaintsEvent( + updatedModels: [ComplaintsConstants.mockPgrServiceModel], + createdByUserId: ComplaintsConstants.createdByUserId)); + }, + expect: ()=>[ + ComplaintInboxState.complaints( + loading: false, + complaints: [ComplaintsConstants.mockPgrServiceModel], + isFiltered: false, + ), + ] + ); + + }); +} \ No newline at end of file diff --git a/packages/complaints/test/complaints_registration_bloc_test.dart b/packages/complaints/test/complaints_registration_bloc_test.dart new file mode 100644 index 000000000..139a48def --- /dev/null +++ b/packages/complaints/test/complaints_registration_bloc_test.dart @@ -0,0 +1,122 @@ +// Import necessary packages for Flutter testing and mocktail. +import 'package:complaints/blocs/complaints_registration/complaints_registration.dart'; +import 'package:complaints/utils/typedefs.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:complaints/complaints.dart'; +import 'package:mocktail/mocktail.dart'; +import 'package:bloc_test/bloc_test.dart'; + +import 'constants/test_constants.dart'; + +class MockPgrServiceDataRepository extends Mock + implements PgrServiceDataRepository {} + + +void main() { + // Define a test group for the ComplaintsRegistrationBloc + group('ComplaintRegistrationBloc', () + { + late ComplaintsRegistrationBloc + complaintsRegistrationBloc; // Declare a variable for the ComplaintsRegistrationBloc. + // Mock the required repositories + final pgrServiceDataRepository = MockPgrServiceDataRepository(); + + // Set up the test environment before each test. + setUp(() { + complaintsRegistrationBloc = ComplaintsRegistrationBloc( + const ComplaintsRegistrationState.create(), + pgrServiceRepository: pgrServiceDataRepository + ); + }); + + setUpAll(() { + registerFallbackValue(ComplaintsConstants.mockPgrServiceModel); + }); + + // Test the initial state of the ComplaintsRegistrationBloc. + test('Initial state is correct', () { + expect( + complaintsRegistrationBloc.state, + equals(const ComplaintsRegistrationState + .create())); // Ensure that the initial state matches the expected state. + }); + + //Test case for _handleSaveComplaintType in create state + blocTest( + 'emits [ComplaintsRegistrationState with complaintType] when _handleSaveComplaintType is called in create state', + build: () => complaintsRegistrationBloc, + act: (bloc) { + bloc.add(const ComplaintsRegistrationSaveComplaintTypeEvent( + complaintType: ComplaintsConstants.complaintType, + )); + }, + expect: ()=> [ + const ComplaintsRegistrationState.create( + complaintType: ComplaintsConstants.complaintType, + ), + ], + ); + + //Test case for _handleSaveAddress in create state + blocTest( + 'emits [ComplaintsRegistrationState with complaintAddress] when _handleSaveAddress is called in create state', + build: ()=>complaintsRegistrationBloc, + act: (bloc){ + bloc.add(ComplaintsRegistrationSaveAddressEvent( + addressModel: ComplaintsConstants.addressModel, + )); + }, + expect: ()=>[ + ComplaintsRegistrationState.create( + addressModel: ComplaintsConstants.addressModel, + ), + ], + ); + + //Test case for _handleComplaintDetails in create state + blocTest( + 'emits [ComplaintsRegistrationState with complaintsDetails] when _handleComplaintDetails is called in create state', + build: ()=>complaintsRegistrationBloc, + act: (bloc){ + bloc.add( + ComplaintsRegistrationSaveComplaintDetailsEvent( + complaintsDetailsModel: ComplaintsConstants.complaintsDetailsModel, + boundaryModel: ComplaintsConstants.boundaryModel, + ) + ); + }, + expect: ()=>[ + ComplaintsRegistrationState.create( + complaintsDetailsModel: ComplaintsConstants.complaintsDetailsModel, + ), + ], + ); + + //Test case for _handleSubmitComplaints in create state + blocTest( + 'emits [ComplaintsRegistrationPersistedState] when _handleSubmitComplaints is called', + build: () { + when(()=>pgrServiceDataRepository.create(any())) + .thenAnswer((_) async => ComplaintsConstants.mockPgrServiceModel); + return complaintsRegistrationBloc; + }, + + act: (bloc){ + bloc.emit(ComplaintsRegistrationState.create( + complaintType: ComplaintsConstants.complaintType, + addressModel: ComplaintsConstants.addressModel, + complaintsDetailsModel: ComplaintsConstants.complaintsDetailsModel, + )); + }, + expect: ()=>[ + ComplaintsRegistrationState.create( + complaintType: ComplaintsConstants.complaintType, + addressModel: ComplaintsConstants.addressModel, + complaintsDetailsModel: ComplaintsConstants.complaintsDetailsModel, + loading: false, + ), + ], + ); + + }); +} diff --git a/packages/complaints/test/constants/test_constants.dart b/packages/complaints/test/constants/test_constants.dart new file mode 100644 index 000000000..9f489b38d --- /dev/null +++ b/packages/complaints/test/constants/test_constants.dart @@ -0,0 +1,41 @@ +import 'package:complaints/complaints.dart'; +import 'package:digit_data_model/data_model.dart'; +import 'package:digit_data_model/models/entities/pgr_application_status.dart'; + +class ComplaintsConstants{ + static final ComplaintsDetailsModel complaintsDetailsModel = ComplaintsDetailsModel( + dateOfComplaint: DateTime(2024), + administrativeArea: "Settlement 1", + complaintRaisedFor: "myself", + complainantName: "Security Issues", + complainantContactNumber: "9192939495", + complaintDescription: "test complaint" + ); + + static final BoundaryModel boundaryModel = BoundaryModel( + latitude: "76", + longitude: "88", + ); + + static const String complaintType = "Security Issues"; + + static final PgrAddressModel addressModel = PgrAddressModel( + street: "Jane", + city: "NY", + ); + static const String createdByUserId = "123456789"; + + static var mockPgrServiceModel = PgrServiceModel( + clientReferenceId: '123', + tenantId: 'mz', + serviceCode: complaintType, + description: 'test-complaint', + applicationStatus: PgrServiceApplicationStatus.created, + user: const PgrComplainantModel( + clientReferenceId: '123', + complaintClientReferenceId: '123', + tenantId: 'mz', + ), + address: addressModel + ); +} \ No newline at end of file diff --git a/packages/dart_mappable_builder/CHANGELOG.md b/packages/dart_mappable_builder/CHANGELOG.md index f7193e5e2..3a56b9e64 100644 --- a/packages/dart_mappable_builder/CHANGELOG.md +++ b/packages/dart_mappable_builder/CHANGELOG.md @@ -1,3 +1,16 @@ +# 4.2.3 + +- Added lint ignores for 'override_on_non_overriding_member'. + +# 4.2.2 + +- Fixed issues with adding unnecessary '__type' property for nullable generics. +- Improved serialization consistency and equality handling. + +# 4.2.1 + +- Performance improvements. + # 4.2.0 - Added custom typedef for mapping fields to resolve naming conflict. @@ -16,7 +29,7 @@ # 4.0.1 - Added support for generic typed parameters for deep copyWith. -- Added lint ignores for 'unnecessary_cast', 'strict_raw_type' and 'inference_failure_on_untyped_parameter' +- Added lint ignores for 'unnecessary_cast', 'strict_raw_type' and 'inference_failure_on_untyped_parameter'. # 4.0.0 diff --git a/packages/dart_mappable_builder/lib/src/builders/mappable_builder.dart b/packages/dart_mappable_builder/lib/src/builders/mappable_builder.dart index 7948974c0..b9ea0c084 100644 --- a/packages/dart_mappable_builder/lib/src/builders/mappable_builder.dart +++ b/packages/dart_mappable_builder/lib/src/builders/mappable_builder.dart @@ -101,7 +101,7 @@ class MappableBuilder implements Builder { '// coverage:ignore-file\n' '// GENERATED CODE - DO NOT MODIFY BY HAND\n' '// ignore_for_file: type=lint\n' - '// ignore_for_file: unused_element, unnecessary_cast\n' + '// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member\n' '// ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter\n\n' 'part of \'$libraryPath\';\n\n' '${output.join('\n\n')}\n' //, diff --git a/packages/dart_mappable_builder/lib/src/generators/mixins/decoding_mixin.dart b/packages/dart_mappable_builder/lib/src/generators/mixins/decoding_mixin.dart index 33999abab..0a0948d3a 100644 --- a/packages/dart_mappable_builder/lib/src/generators/mixins/decoding_mixin.dart +++ b/packages/dart_mappable_builder/lib/src/generators/mixins/decoding_mixin.dart @@ -74,7 +74,7 @@ mixin DecodingMixin on MapperGenerator { output.write(''' @override DecodingContext inherit(DecodingContext context) { - return context.inherit(args: [${args.join(', ')}]); + return context.inherit(args: () => [${args.join(', ')}]); } '''); } diff --git a/packages/dart_mappable_builder/lib/src/generators/mixins/equals_mixin.dart b/packages/dart_mappable_builder/lib/src/generators/mixins/equals_mixin.dart index 6bf327061..245661e15 100644 --- a/packages/dart_mappable_builder/lib/src/generators/mixins/equals_mixin.dart +++ b/packages/dart_mappable_builder/lib/src/generators/mixins/equals_mixin.dart @@ -12,10 +12,7 @@ mixin EqualsMixin on MapperGenerator { return ''' @override bool operator ==(Object other) { - return identical(this, other) || ( - runtimeType == other.runtimeType && - ${element.mapperName}.ensureInitialized().isValueEqual(this as ${element.selfTypeParam}, other) - ); + return ${element.mapperName}.ensureInitialized().equalsValue(this as ${element.selfTypeParam}, other); } @override diff --git a/packages/dart_mappable_builder/pubspec.yaml b/packages/dart_mappable_builder/pubspec.yaml index e9060e895..fd1a7e646 100644 --- a/packages/dart_mappable_builder/pubspec.yaml +++ b/packages/dart_mappable_builder/pubspec.yaml @@ -1,6 +1,6 @@ name: dart_mappable_builder description: Improved json serialization and data classes with full support for generics, inheritance, customization and more. -version: 4.2.0 +version: 4.2.3 repository: https://github.com/schultek/dart_mappable issue_tracker: https://github.com/schultek/dart_mappable/issues funding: @@ -14,7 +14,7 @@ dependencies: ansicolor: ^2.0.1 build: ^2.0.0 collection: ^1.15.0 - dart_mappable: ^4.2.0 + dart_mappable: ^4.2.2 dart_style: ^2.2.4 glob: ^2.1.0 path: ^1.8.0 diff --git a/packages/dart_mappable_builder/test/utils/temp_asset_writer.dart b/packages/dart_mappable_builder/test/utils/temp_asset_writer.dart index d16954bf0..4e0a02a5f 100644 --- a/packages/dart_mappable_builder/test/utils/temp_asset_writer.dart +++ b/packages/dart_mappable_builder/test/utils/temp_asset_writer.dart @@ -46,7 +46,7 @@ class TempAssetWriter implements RecordingAssetWriter { } Stream _run(String code) async* { - var main = File(path.join(dir.path, 'lib/digit_scanner.dart')); + var main = File(path.join(dir.path, 'lib/main.dart')); main.writeAsStringSync(code); diff --git a/packages/digit_components/CHANGELOG.md b/packages/digit_components/CHANGELOG.md index 93100a196..f22e87447 100644 --- a/packages/digit_components/CHANGELOG.md +++ b/packages/digit_components/CHANGELOG.md @@ -1,121 +1,165 @@ +## 1.0.3 + +* Upgraded to Flutter 3.22 + ## 1.0.2+1 + * Added description field for Labeled Field component ## 1.0.2 + * Added privacy notice component ## 1.0.1+1 + * Changed similar dialogs to a common hideDialog ## 1.0.1 + * Added new loader dialog ## 1.0.0+9 + * Added maximum validation for digit_integer_form_picker ## 1.0.0+8 + * Added close icon button for digit_dialog ## 1.0.0+7 + * Added buttonDisabled for DigitIconButton ## 1.0.0+6 + * Added text direction for DigitIconButton * SelectionBox UI fixes * Details card UI fixes ## 1.0.0+5 + * Added new component details_card ## 1.0.0+4 + * Added new component selected box ## 1.0.0+3 + * Capture and Hide Location Dialog added to utils ## 1.0.0+2 + * DigitTextField component update ## 1.0.0+1 + * Stable release with searchable dropdown fix ## 1.0.0 + * Stable release ## 0.0.3+16 + * Removed flutter_localizations dependency ## 0.0.3+15 + * Updated digit_components to develop branch ## 0.0.3+14 + * Reactive Drop down fix ## 0.0.3+13 + * Fixed empty string issue in searchable_dropdown_field ## 0.0.3+12 + * Downgraded intl to 0.18.0 ## 0.0.3+11 + * Removed flutter localizations dependency ## 0.0.3+10 + * Updated homepage url ## 0.0.3+9 + * Updated homepage url ## 0.0.3+8 + * Updated intl version and added pubspec_override ## 0.0.3+7 + * Updated intl version and added pubspec_override ## 0.0.3+6 + * Updated flutter repository url ## 0.0.3+5 + * Updated flutter sdk version ## 0.0.3+4 + * Updated example folder ## 0.0.3+3 + * Updated intl version 0.18.1 ## 0.0.3+2 + * Updated repository URL and dart doc ## 0.0.3+1 + * Synced digit_components with flutter 3.16.5 version ## 0.0.2+1 + * Updated digit_components missing utils and components ## 0.0.2+0 + * Updated digit_components to the latest version ## 0.0.1+8 + * Updated Images in ReadMe File ## 0.0.1+6 + * Updated Components behaviour in ReadMe File ## 0.0.1+5 + * Example file with Reactive Forms ## 0.0.1+4 + * dart doc added and auto generated files added ## 0.0.1+3 + * example file added ## 0.0.1+2 + * Read Me file modified with Components example ## 0.0.1+1 + * Read Me file added ## 0.0.1 + * Initial Releaase \ No newline at end of file diff --git a/packages/digit_components/example/pubspec.lock b/packages/digit_components/example/pubspec.lock index 87767b83c..d3c1ce88c 100644 --- a/packages/digit_components/example/pubspec.lock +++ b/packages/digit_components/example/pubspec.lock @@ -5,26 +5,26 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: eb376e9acf6938204f90eb3b1f00b578640d3188b4c8a8ec054f9f479af8d051 + sha256: "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7" url: "https://pub.dev" source: hosted - version: "64.0.0" + version: "67.0.0" analyzer: dependency: transitive description: name: analyzer - sha256: "69f54f967773f6c26c7dcb13e93d7ccee8b17a641689da39e878d5cf13b06893" + sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d" url: "https://pub.dev" source: hosted - version: "6.2.0" + version: "6.4.1" archive: dependency: transitive description: name: archive - sha256: "6bd38d335f0954f5fad9c79e614604fbf03a0e5b975923dd001b6ea965ef5b4b" + sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d url: "https://pub.dev" source: hosted - version: "3.6.0" + version: "3.6.1" args: dependency: transitive description: @@ -85,10 +85,10 @@ packages: dependency: transitive description: name: build_daemon - sha256: "0343061a33da9c5810b2d6cee51945127d8f4c060b7fbdd9d54917f0a3feaaa1" + sha256: "79b2aef6ac2ed00046867ed354c88778c9c0f029df8a20fe10b5436826721ef9" url: "https://pub.dev" source: hosted - version: "4.0.1" + version: "4.0.2" build_resolvers: dependency: transitive description: @@ -101,18 +101,18 @@ packages: dependency: "direct dev" description: name: build_runner - sha256: "3ac61a79bfb6f6cc11f693591063a7f19a7af628dc52f141743edac5c16e8c22" + sha256: "644dc98a0f179b872f612d3eb627924b578897c629788e858157fa5e704ca0c7" url: "https://pub.dev" source: hosted - version: "2.4.9" + version: "2.4.11" build_runner_core: dependency: transitive description: name: build_runner_core - sha256: "4ae8ffe5ac758da294ecf1802f2aff01558d8b1b00616aa7538ea9a8a5d50799" + sha256: e3c79f69a64bdfcd8a776a3c28db4eb6e3fb5356d013ae5eb2e52007706d5dbe url: "https://pub.dev" source: hosted - version: "7.3.0" + version: "7.3.1" built_collection: dependency: transitive description: @@ -231,15 +231,15 @@ packages: path: ".." relative: true source: path - version: "1.0.2" + version: "1.0.2+1" easy_stepper: dependency: transitive description: name: easy_stepper - sha256: "77f3ab4ee3c867b5a2236bf712abb08fed2b1c533cf24cf3fcd46c2821072ffd" + sha256: d09e974ec9148480072f8a7d3b0779dfdbc1a3ec1ff7daa7fbda95b0c1fe7453 url: "https://pub.dev" source: hosted - version: "0.5.2+1" + version: "0.8.5" fake_async: dependency: transitive description: @@ -252,10 +252,10 @@ packages: dependency: transitive description: name: ffi - sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" + sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.2" file: dependency: transitive description: @@ -353,10 +353,15 @@ packages: dependency: "direct dev" description: name: flutter_lints - sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04 + sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c" url: "https://pub.dev" source: hosted - version: "2.0.3" + version: "4.0.0" + flutter_localizations: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" flutter_spinkit: dependency: transitive description: @@ -387,10 +392,10 @@ packages: dependency: transitive description: name: fluttertoast - sha256: "81b68579e23fcbcada2db3d50302813d2371664afe6165bc78148050ab94bf66" + sha256: "7eae679e596a44fdf761853a706f74979f8dd3cd92cf4e23cae161fda091b847" url: "https://pub.dev" source: hosted - version: "8.2.5" + version: "8.2.6" freezed: dependency: "direct dev" description: @@ -411,10 +416,10 @@ packages: dependency: transitive description: name: frontend_server_client - sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" + sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 url: "https://pub.dev" source: hosted - version: "3.2.0" + version: "4.0.0" glob: dependency: transitive description: @@ -427,10 +432,10 @@ packages: dependency: transitive description: name: google_fonts - sha256: "2776c66b3e97c6cdd58d1bd3281548b074b64f1fd5c8f82391f7456e38849567" + sha256: b1ac0fe2832c9cc95e5e88b57d627c5e68c223b9657f4b96e1487aa9098c7b82 url: "https://pub.dev" source: hosted - version: "4.0.5" + version: "6.2.1" graphs: dependency: transitive description: @@ -451,10 +456,10 @@ packages: dependency: transitive description: name: http - sha256: a2bbf9d017fcced29139daa8ed2bba4ece450ab222871df93ca9eec6f80c34ba + sha256: "761a297c042deedc1ffbb156d6e2af13886bb305c2a343a4d972504cd67dd938" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.1" http_multi_server: dependency: transitive description: @@ -483,10 +488,10 @@ packages: dependency: transitive description: name: intl - sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" + sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf url: "https://pub.dev" source: hosted - version: "0.18.1" + version: "0.19.0" io: dependency: transitive description: @@ -519,38 +524,62 @@ packages: url: "https://pub.dev" source: hosted version: "6.8.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + url: "https://pub.dev" + source: hosted + version: "10.0.4" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + url: "https://pub.dev" + source: hosted + version: "3.0.3" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" lints: dependency: transitive description: name: lints - sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452" + sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235" url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "4.0.0" location: dependency: transitive description: name: location - sha256: "06be54f682c9073cbfec3899eb9bc8ed90faa0e17735c9d9fa7fe426f5be1dd1" + sha256: "37ffdadcd4b1498b769824f45ebb4de8ed46663a4a67ac27b33a590ee486579f" url: "https://pub.dev" source: hosted - version: "5.0.3" + version: "6.0.2" location_platform_interface: dependency: transitive description: name: location_platform_interface - sha256: "8aa1d34eeecc979d7c9fe372931d84f6d2ebbd52226a54fe1620de6fdc0753b1" + sha256: "2ecde6bb0f88032b0bbbde37e18975b4468711dd92619c2235cc0c0ee93b4b8e" url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "4.0.0" location_web: dependency: transitive description: name: location_web - sha256: ec484c66e8a4ff1ee5d044c203f4b6b71e3a0556a97b739a5bc9616de672412b + sha256: "15ad7b4c8a9f55abee513373755e093a40c04d7e24fc1b4f89676fe99523d034" url: "https://pub.dev" source: hosted - version: "4.2.0" + version: "5.0.1" logging: dependency: transitive description: @@ -563,34 +592,34 @@ packages: dependency: transitive description: name: lottie - sha256: a93542cc2d60a7057255405f62252533f8e8956e7e06754955669fd32fb4b216 + sha256: "6a24ade5d3d918c306bb1c21a6b9a04aab0489d51a2582522eea820b4093b62b" url: "https://pub.dev" source: hosted - version: "2.7.0" + version: "3.1.2" matcher: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.12.0" mime: dependency: transitive description: @@ -643,26 +672,26 @@ packages: dependency: transitive description: name: package_info_plus - sha256: "88bc797f44a94814f2213db1c9bd5badebafdfb8290ca9f78d4b9ee2a3db4d79" + sha256: b93d8b4d624b4ea19b0a5a208b2d6eff06004bc3ce74c06040b120eeadd00ce0 url: "https://pub.dev" source: hosted - version: "5.0.1" + version: "8.0.0" package_info_plus_platform_interface: dependency: transitive description: name: package_info_plus_platform_interface - sha256: "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6" + sha256: f49918f3433a3146047372f9d4f1f847511f2acd5cd030e1f44fe5a50036b70e url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.0" path: dependency: transitive description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.9.0" path_provider: dependency: transitive description: @@ -675,18 +704,18 @@ packages: dependency: transitive description: name: path_provider_android - sha256: a248d8146ee5983446bf03ed5ea8f6533129a12b11f12057ad1b4a67a2b3b41d + sha256: "9c96da072b421e98183f9ea7464898428e764bc0ce5567f27ec8693442e72514" url: "https://pub.dev" source: hosted - version: "2.2.4" + version: "2.2.5" path_provider_foundation: dependency: transitive description: name: path_provider_foundation - sha256: "5a7999be66e000916500be4f15a3633ebceb8302719b47b9cc49ce924125350f" + sha256: f234384a3fdd67f989b4d54a5d73ca2a6c422fa55ae694381ae0f4375cd1ea16 url: "https://pub.dev" source: hosted - version: "2.3.2" + version: "2.4.0" path_provider_linux: dependency: transitive description: @@ -771,26 +800,26 @@ packages: dependency: transitive description: name: pubspec_parse - sha256: c63b2876e58e194e4b0828fcb080ad0e06d051cb607a6be51a9e084f47cb9367 + sha256: c799b721d79eb6ee6fa56f00c04b472dcd44a30d258fac2174a6ec57302678f8 url: "https://pub.dev" source: hosted - version: "1.2.3" + version: "1.3.0" reactive_flutter_typeahead: dependency: transitive description: name: reactive_flutter_typeahead - sha256: ef91627df8cef70e603e8a6458749d8a99a385b78854332602fd08ad905cdab8 + sha256: a5dbca4b537bd9dde245d4228e1a6ce937c05cd77c57ed45b9c05135540d5f1a url: "https://pub.dev" source: hosted - version: "0.8.1" + version: "2.1.1" reactive_forms: dependency: "direct main" description: name: reactive_forms - sha256: "5aa9c48a0626c20d00a005e597cb10efbdebbfeecb9c4227b03a5945fbb91ec4" + sha256: "9b1fb18e0aae9c50cfa0aaabaaa38bc4d78eefc9b7b95fa9c947b051f6524b8e" url: "https://pub.dev" source: hosted - version: "14.3.0" + version: "17.0.1" remove_emoji_input_formatter: dependency: transitive description: @@ -920,26 +949,26 @@ packages: dependency: transitive description: name: test - sha256: a1f7595805820fcc05e5c52e3a231aedd0b72972cb333e8c738a8b1239448b6f + sha256: "7ee446762c2c50b3bd4ea96fe13ffac69919352bd3b4b17bac3f3465edc58073" url: "https://pub.dev" source: hosted - version: "1.24.9" + version: "1.25.2" test_api: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.0" test_core: dependency: transitive description: name: test_core - sha256: a757b14fc47507060a162cc2530d9a4a2f92f5100a952c7443b5cad5ef5b106a + sha256: "2bc4b4ecddd75309300d8096f781c0e3280ca1ef85beda558d33fcbedc2eead4" url: "https://pub.dev" source: hosted - version: "0.5.9" + version: "0.6.0" timing: dependency: transitive description: @@ -968,10 +997,10 @@ packages: dependency: transitive description: name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" url: "https://pub.dev" source: hosted - version: "13.0.0" + version: "14.2.1" watcher: dependency: transitive description: @@ -984,18 +1013,18 @@ packages: dependency: transitive description: name: web - sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "0.5.1" web_socket_channel: dependency: transitive description: name: web_socket_channel - sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b + sha256: "58c6666b342a38816b2e7e50ed0f1e261959630becd4c879c4f26bfa14aa5a42" url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.4.5" webkit_inspection_protocol: dependency: transitive description: @@ -1008,10 +1037,10 @@ packages: dependency: transitive description: name: win32 - sha256: "464f5674532865248444b4c3daca12bd9bf2d7c47f759ce2617986e7229494a8" + sha256: a79dbe579cb51ecd6d30b17e0cae4e0ea15e2c0e66f69ad4198f22a6789e94f4 url: "https://pub.dev" source: hosted - version: "5.2.0" + version: "5.5.1" xdg_directories: dependency: transitive description: @@ -1037,5 +1066,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.2.0 <3.9.0" - flutter: ">=3.16.0" + dart: ">=3.4.0 <3.9.0" + flutter: ">=3.22.0" diff --git a/packages/digit_components/example/pubspec.yaml b/packages/digit_components/example/pubspec.yaml index b45e84d18..2ae7a4779 100644 --- a/packages/digit_components/example/pubspec.yaml +++ b/packages/digit_components/example/pubspec.yaml @@ -34,7 +34,7 @@ dependencies: digit_components: path: ../../digit_components collection: ^1.16.0 - reactive_forms: ^14.1.0 + reactive_forms: ^17.0.0 # The following adds the Cupertino Icons font to your application. @@ -44,7 +44,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - freezed: ^2.1.0+1 + freezed: ^2.5.2 build_runner: ^2.2.1 json_serializable: ^6.4.0 bloc_test: ^9.1.0 @@ -56,7 +56,7 @@ dev_dependencies: # activated in the `analysis_options.yaml` file located at the root of your # package. See that file for information about deactivating specific lint # rules and activating additional ones. - flutter_lints: ^2.0.0 + flutter_lints: ^4.0.0 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec diff --git a/packages/digit_components/lib/theme/digit_theme.dart b/packages/digit_components/lib/theme/digit_theme.dart index f6fa1b73a..7352ebda3 100644 --- a/packages/digit_components/lib/theme/digit_theme.dart +++ b/packages/digit_components/lib/theme/digit_theme.dart @@ -32,7 +32,7 @@ class DigitTheme { return ThemeData( colorScheme: colorScheme, useMaterial3: false, - scaffoldBackgroundColor: colorScheme.background, + scaffoldBackgroundColor: colorScheme.surface, textTheme: mobileTypography.textTheme, appBarTheme: const AppBarTheme(elevation: 0), elevatedButtonTheme: elevatedButtonTheme, @@ -52,9 +52,7 @@ class DigitTheme { onSecondary: colors.white, error: colors.lavaRed, onError: colors.white, - background: colors.seaShellGray, - onBackground: colors.woodsmokeBlack, - surface: colors.alabasterWhite, + surface: colors.seaShellGray, onSurface: colors.woodsmokeBlack, onSurfaceVariant: colors.darkSpringGreen, tertiaryContainer: colors.tropicalBlue, diff --git a/packages/digit_components/lib/widgets/atoms/digit_integer_form_picker.dart b/packages/digit_components/lib/widgets/atoms/digit_integer_form_picker.dart index 22bb2ce2d..5ae868fdf 100644 --- a/packages/digit_components/lib/widgets/atoms/digit_integer_form_picker.dart +++ b/packages/digit_components/lib/widgets/atoms/digit_integer_form_picker.dart @@ -108,7 +108,7 @@ class DigitIntegerFormPicker extends StatelessWidget { height: kPadding * 5, child: Material( shape: border, - color: Theme.of(context).colorScheme.background, + color: Theme.of(context).colorScheme.surface, child: InkWell(onTap: onPressed, child: Icon(icon)), ), ); diff --git a/packages/digit_components/lib/widgets/atoms/digit_stepper.dart b/packages/digit_components/lib/widgets/atoms/digit_stepper.dart index 71d3163bb..4b45e2ff9 100644 --- a/packages/digit_components/lib/widgets/atoms/digit_stepper.dart +++ b/packages/digit_components/lib/widgets/atoms/digit_stepper.dart @@ -1,6 +1,7 @@ import 'package:digit_components/theme/colors.dart'; import 'package:digit_components/theme/digit_theme.dart'; import 'package:easy_stepper/easy_stepper.dart'; +import 'package:flutter/material.dart'; class DigitStepper extends StatelessWidget { final int activeStep; @@ -112,21 +113,26 @@ class DigitStepper extends StatelessWidget { Widget build(BuildContext context) { return EasyStepper( activeStep: activeStep, - lineLength: lineLength, - lineSpace: lineSpace, - lineType: lineType, + lineStyle: LineStyle( + lineLength: lineLength, + lineSpace: lineSpace, + lineType: lineType, + defaultLineColor: defaultLineColor ?? const DigitColors().cloudGray, + lineThickness: lineThickness, + activeLineColor: activeLineColor, + unreachedLineColor: + unreachedLineColor ?? const DigitColors().cloudGray, + finishedLineColor: finishedLineColor ?? const DigitColors().cloudGray, + ), maxReachedStep: maxStepReached, - defaultLineColor: defaultLineColor ?? const DigitColors().cloudGray, activeStepBackgroundColor: activeStepBackgroundColor ?? const DigitColors().burningOrange, activeStepBorderColor: activeStepBorderColor, activeStepTextColor: activeStepTextColor ?? DigitTheme.instance.colorScheme.onSurface, - activeLineColor: activeLineColor, activeStepBorderType: activeStepBorderType ?? defaultStepBorderType, activeStepIconColor: activeStepIconColor, alignment: alignment, - unreachedLineColor: unreachedLineColor ?? const DigitColors().cloudGray, unreachedStepBorderColor: unreachedStepBorderColor ?? const DigitColors().cloudGray, unreachedStepBorderType: @@ -137,7 +143,6 @@ class DigitStepper extends StatelessWidget { unreachedStepBackgroundColor ?? const DigitColors().cloudGray, unreachedStepTextColor: unreachedStepTextColor ?? DigitTheme.instance.colorScheme.onSurface, - finishedLineColor: finishedLineColor ?? const DigitColors().cloudGray, finishedStepBackgroundColor: finishedStepBackgroundColor ?? const DigitColors().burningOrange, finishedStepTextColor: @@ -151,7 +156,6 @@ class DigitStepper extends StatelessWidget { showLoadingAnimation: showLoadingAnimation, stepRadius: stepRadius, showStepBorder: showStepBorder, - lineThickness: lineThickness, onStepReached: onStepReached, disableScroll: disableScroll, enableStepTapping: enableStepTapping, @@ -162,7 +166,7 @@ class DigitStepper extends StatelessWidget { loadingAnimation: loadingAnimation, padding: padding, showTitle: showTitle, - stepAnimationCurve: stepAnimationCurve ?? stepReachedAnimationEffect, + stepAnimationCurve: stepAnimationCurve ?? stepReachedAnimationEffect ?? Curves.easeInOut, stepAnimationDuration: stepAnimationDuration ?? stepReachedAnimationDuration, stepBorderRadius: stepBorderRadius, diff --git a/packages/digit_components/lib/widgets/atoms/searchable_dropdown_field.dart b/packages/digit_components/lib/widgets/atoms/searchable_dropdown_field.dart index e6ef894b8..d2f4c5e23 100644 --- a/packages/digit_components/lib/widgets/atoms/searchable_dropdown_field.dart +++ b/packages/digit_components/lib/widgets/atoms/searchable_dropdown_field.dart @@ -1,4 +1,5 @@ import 'dart:async'; +import 'dart:math'; import 'package:digit_components/digit_components.dart'; import 'package:flutter/foundation.dart'; @@ -262,6 +263,10 @@ class SearchDropdownFormFieldState extends State OverlayEntry _createOverlayEntry() { final renderObject = context.findRenderObject() as RenderBox; final Size size = renderObject.size; + // Calculate the available height below the dropdown + final double availableHeight = MediaQuery.of(context).size.height - + (renderObject.localToGlobal(Offset.zero).dy + size.height) - + MediaQuery.of(context).viewInsets.bottom; var overlay = OverlayEntry(builder: (context) { return Positioned( @@ -274,7 +279,7 @@ class SearchDropdownFormFieldState extends State elevation: 4.0, child: SizedBox( height: _options != null && _options!.length > 2 - ? widget.dropdownHeight ?? 140 + ? min(availableHeight, widget.dropdownHeight ?? 140) : (_options ?? []).length * 45, child: Container( color: widget.dropdownColor ?? Colors.white70, diff --git a/packages/digit_components/lib/widgets/atoms/selection_card.dart b/packages/digit_components/lib/widgets/atoms/selection_card.dart index 1a9191c2f..3c1e256b5 100644 --- a/packages/digit_components/lib/widgets/atoms/selection_card.dart +++ b/packages/digit_components/lib/widgets/atoms/selection_card.dart @@ -43,7 +43,9 @@ class _SelectionBoxState extends State> { } if (widget.equalWidthOptions) { + WidgetsBinding.instance.addPostFrameCallback((_) { _calculateMaxOptionWidth(); + }); } } @@ -51,7 +53,9 @@ class _SelectionBoxState extends State> { void didChangeDependencies() { super.didChangeDependencies(); if (widget.equalWidthOptions) { + WidgetsBinding.instance.addPostFrameCallback((_) { _calculateMaxOptionWidth(); + }); } } @override diff --git a/packages/digit_components/lib/widgets/molecules/digit_table.dart b/packages/digit_components/lib/widgets/molecules/digit_table.dart index d966c40cc..75cfbb9d0 100644 --- a/packages/digit_components/lib/widgets/molecules/digit_table.dart +++ b/packages/digit_components/lib/widgets/molecules/digit_table.dart @@ -111,7 +111,7 @@ class DigitTable extends StatelessWidget { color: index == selectedIndex ? DigitTheme.instance.colorScheme.tertiary : index % 2 == 0 - ? DigitTheme.instance.colorScheme.background + ? DigitTheme.instance.colorScheme.surface : DigitTheme.instance.colorScheme.surface, child: Row( mainAxisAlignment: centerData == null @@ -175,7 +175,7 @@ class DigitTable extends StatelessWidget { color: selectedIndex == index ? DigitTheme.instance.colorScheme.tertiary : index % 2 == 0 - ? DigitTheme.instance.colorScheme.background + ? DigitTheme.instance.colorScheme.surface : DigitTheme.instance.colorScheme.surface, border: Border( left: tableCellBorder, diff --git a/packages/digit_components/lib/widgets/privacy_notice/privacy_notice_dialog.dart b/packages/digit_components/lib/widgets/privacy_notice/privacy_notice_dialog.dart index 696b2c681..cd1c06e2e 100644 --- a/packages/digit_components/lib/widgets/privacy_notice/privacy_notice_dialog.dart +++ b/packages/digit_components/lib/widgets/privacy_notice/privacy_notice_dialog.dart @@ -4,6 +4,7 @@ import 'package:digit_components/widgets/digit_card.dart'; import 'package:digit_components/widgets/digit_elevated_button.dart'; import 'package:digit_components/widgets/digit_outline_button.dart'; import 'package:flutter/material.dart'; +import '../../models/privacy_policy_model.dart'; import '../../theme/digit_theme.dart'; import '../localized.dart'; import 'privacy_notice_expand_component.dart'; @@ -44,20 +45,24 @@ class FullPageDialogState extends LocalizedState { crossAxisAlignment: CrossAxisAlignment.start, children: [ Row( + crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Padding( padding: const EdgeInsets.only(top: kPadding*3, left: 0), - child: Text( - localizations.translate(widget.privacyPolicy.header ?? ''), - maxLines: 3, - style: Theme.of(context).textTheme.displayMedium?.copyWith( - color: const DigitColors().woodsmokeBlack, + child: Container( + width: MediaQuery.of(context).size.width*.7, + child: Text( + localizations.translate(widget.privacyPolicy.header ?? ''), + maxLines: 3, + style: Theme.of(context).textTheme.displayMedium?.copyWith( + color: const DigitColors().woodsmokeBlack, + ), ), ), ), Padding( - padding: EdgeInsets.zero, + padding: const EdgeInsets.only(top: kPadding), child: InkWell( onTap: () { Navigator.of(context).pop(); diff --git a/packages/digit_components/lib/widgets/privacy_notice/privacy_notice_expand_component.dart b/packages/digit_components/lib/widgets/privacy_notice/privacy_notice_expand_component.dart index 50bf2eb05..1301d78c7 100644 --- a/packages/digit_components/lib/widgets/privacy_notice/privacy_notice_expand_component.dart +++ b/packages/digit_components/lib/widgets/privacy_notice/privacy_notice_expand_component.dart @@ -1,6 +1,7 @@ import 'package:digit_components/theme/colors.dart'; import 'package:flutter/material.dart'; import '../../models/privacy_notice/privacy_notice_model.dart'; +import '../../models/privacy_policy_model.dart'; import '../../theme/digit_theme.dart'; import '../localized.dart'; @@ -149,12 +150,14 @@ class DescriptionWidgetState extends LocalizedState { text: TextSpan( text: '$stepNumber. ', style: TextStyle( + color: const DigitColors().woodsmokeBlack, fontWeight: isBold ? FontWeight.bold : FontWeight.normal, ), children: [ TextSpan( text: localizations.translate(descriptionText), style: TextStyle( + color: const DigitColors().woodsmokeBlack, fontWeight: isBold ? FontWeight.bold : FontWeight.normal, ), ), diff --git a/packages/digit_components/pubspec.lock b/packages/digit_components/pubspec.lock index 7c84c45c4..d224d1427 100644 --- a/packages/digit_components/pubspec.lock +++ b/packages/digit_components/pubspec.lock @@ -5,26 +5,26 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: eb376e9acf6938204f90eb3b1f00b578640d3188b4c8a8ec054f9f479af8d051 + sha256: "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7" url: "https://pub.dev" source: hosted - version: "64.0.0" + version: "67.0.0" analyzer: dependency: transitive description: name: analyzer - sha256: "69f54f967773f6c26c7dcb13e93d7ccee8b17a641689da39e878d5cf13b06893" + sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d" url: "https://pub.dev" source: hosted - version: "6.2.0" + version: "6.4.1" archive: dependency: transitive description: name: archive - sha256: "6bd38d335f0954f5fad9c79e614604fbf03a0e5b975923dd001b6ea965ef5b4b" + sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d url: "https://pub.dev" source: hosted - version: "3.6.0" + version: "3.6.1" args: dependency: transitive description: @@ -85,10 +85,10 @@ packages: dependency: transitive description: name: build_daemon - sha256: "0343061a33da9c5810b2d6cee51945127d8f4c060b7fbdd9d54917f0a3feaaa1" + sha256: "79b2aef6ac2ed00046867ed354c88778c9c0f029df8a20fe10b5436826721ef9" url: "https://pub.dev" source: hosted - version: "4.0.1" + version: "4.0.2" build_resolvers: dependency: transitive description: @@ -101,18 +101,18 @@ packages: dependency: "direct main" description: name: build_runner - sha256: "3ac61a79bfb6f6cc11f693591063a7f19a7af628dc52f141743edac5c16e8c22" + sha256: "644dc98a0f179b872f612d3eb627924b578897c629788e858157fa5e704ca0c7" url: "https://pub.dev" source: hosted - version: "2.4.9" + version: "2.4.11" build_runner_core: dependency: transitive description: name: build_runner_core - sha256: "4ae8ffe5ac758da294ecf1802f2aff01558d8b1b00616aa7538ea9a8a5d50799" + sha256: e3c79f69a64bdfcd8a776a3c28db4eb6e3fb5356d013ae5eb2e52007706d5dbe url: "https://pub.dev" source: hosted - version: "7.3.0" + version: "7.3.1" built_collection: dependency: transitive description: @@ -181,18 +181,18 @@ packages: dependency: transitive description: name: coverage - sha256: "3945034e86ea203af7a056d98e98e42a5518fff200d6e8e6647e1886b07e936e" + sha256: c1fb2dce3c0085f39dc72668e85f8e0210ec7de05345821ff58530567df345a5 url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.9.2" crypto: dependency: transitive description: name: crypto - sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + sha256: ec30d999af904f33454ba22ed9a86162b35e52b44ac4807d1d93c288041d7d27 url: "https://pub.dev" source: hosted - version: "3.0.3" + version: "3.0.5" cupertino_icons: dependency: transitive description: @@ -221,10 +221,10 @@ packages: dependency: "direct main" description: name: easy_stepper - sha256: "77f3ab4ee3c867b5a2236bf712abb08fed2b1c533cf24cf3fcd46c2821072ffd" + sha256: "63f66314a509ec690c8152a41288961fd96ba9e92ef184299f068a5e78bd16ad" url: "https://pub.dev" source: hosted - version: "0.5.2+1" + version: "0.8.5+1" fake_async: dependency: transitive description: @@ -237,10 +237,10 @@ packages: dependency: transitive description: name: ffi - sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" + sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.3" file: dependency: transitive description: @@ -266,10 +266,10 @@ packages: dependency: "direct main" description: name: flutter_bloc - sha256: f0ecf6e6eb955193ca60af2d5ca39565a86b8a142452c5b24d96fb477428f4d2 + sha256: b594505eac31a0518bdcb4b5b79573b8d9117b193cc80cc12e17d639b10aa27a url: "https://pub.dev" source: hosted - version: "8.1.5" + version: "8.1.6" flutter_focus_watcher: dependency: "direct main" description: @@ -330,10 +330,15 @@ packages: dependency: "direct dev" description: name: flutter_lints - sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04 + sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c" url: "https://pub.dev" source: hosted - version: "2.0.3" + version: "4.0.0" + flutter_localizations: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" flutter_spinkit: dependency: "direct main" description: @@ -364,10 +369,10 @@ packages: dependency: "direct main" description: name: fluttertoast - sha256: "81b68579e23fcbcada2db3d50302813d2371664afe6165bc78148050ab94bf66" + sha256: "95f349437aeebe524ef7d6c9bde3e6b4772717cf46a0eb6a3ceaddc740b297cc" url: "https://pub.dev" source: hosted - version: "8.2.5" + version: "8.2.8" freezed: dependency: "direct dev" description: @@ -380,18 +385,18 @@ packages: dependency: "direct main" description: name: freezed_annotation - sha256: c3fd9336eb55a38cc1bbd79ab17573113a8deccd0ecbbf926cca3c62803b5c2d + sha256: c2e2d632dd9b8a2b7751117abcfc2b4888ecfe181bd9fca7170d9ef02e595fe2 url: "https://pub.dev" source: hosted - version: "2.4.1" + version: "2.4.4" frontend_server_client: dependency: transitive description: name: frontend_server_client - sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" + sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 url: "https://pub.dev" source: hosted - version: "3.2.0" + version: "4.0.0" glob: dependency: transitive description: @@ -404,18 +409,18 @@ packages: dependency: "direct main" description: name: google_fonts - sha256: "2776c66b3e97c6cdd58d1bd3281548b074b64f1fd5c8f82391f7456e38849567" + sha256: b1ac0fe2832c9cc95e5e88b57d627c5e68c223b9657f4b96e1487aa9098c7b82 url: "https://pub.dev" source: hosted - version: "4.0.5" + version: "6.2.1" graphs: dependency: transitive description: name: graphs - sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19 + sha256: "741bbf84165310a68ff28fe9e727332eef1407342fca52759cb21ad8177bb8d0" url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.3.2" horizontal_data_table: dependency: "direct main" description: @@ -428,10 +433,10 @@ packages: dependency: transitive description: name: http - sha256: a2bbf9d017fcced29139daa8ed2bba4ece450ab222871df93ca9eec6f80c34ba + sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.2" http_multi_server: dependency: transitive description: @@ -452,10 +457,10 @@ packages: dependency: "direct main" description: name: intl - sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" + sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf url: "https://pub.dev" source: hosted - version: "0.18.1" + version: "0.19.0" io: dependency: transitive description: @@ -488,38 +493,62 @@ packages: url: "https://pub.dev" source: hosted version: "6.8.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + url: "https://pub.dev" + source: hosted + version: "10.0.4" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + url: "https://pub.dev" + source: hosted + version: "3.0.3" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" lints: dependency: transitive description: name: lints - sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452" + sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235" url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "4.0.0" location: dependency: "direct main" description: name: location - sha256: "06be54f682c9073cbfec3899eb9bc8ed90faa0e17735c9d9fa7fe426f5be1dd1" + sha256: "37ffdadcd4b1498b769824f45ebb4de8ed46663a4a67ac27b33a590ee486579f" url: "https://pub.dev" source: hosted - version: "5.0.3" + version: "6.0.2" location_platform_interface: dependency: "direct main" description: name: location_platform_interface - sha256: "8aa1d34eeecc979d7c9fe372931d84f6d2ebbd52226a54fe1620de6fdc0753b1" + sha256: "2ecde6bb0f88032b0bbbde37e18975b4468711dd92619c2235cc0c0ee93b4b8e" url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "4.0.0" location_web: dependency: transitive description: name: location_web - sha256: ec484c66e8a4ff1ee5d044c203f4b6b71e3a0556a97b739a5bc9616de672412b + sha256: "15ad7b4c8a9f55abee513373755e093a40c04d7e24fc1b4f89676fe99523d034" url: "https://pub.dev" source: hosted - version: "4.2.0" + version: "5.0.1" logging: dependency: "direct main" description: @@ -532,50 +561,50 @@ packages: dependency: transitive description: name: lottie - sha256: a93542cc2d60a7057255405f62252533f8e8956e7e06754955669fd32fb4b216 + sha256: "6a24ade5d3d918c306bb1c21a6b9a04aab0489d51a2582522eea820b4093b62b" url: "https://pub.dev" source: hosted - version: "2.7.0" + version: "3.1.2" matcher: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.12.0" mime: dependency: transitive description: name: mime - sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2" + sha256: "801fd0b26f14a4a58ccb09d5892c3fbdeff209594300a542492cf13fba9d247a" url: "https://pub.dev" source: hosted - version: "1.0.5" + version: "1.0.6" mocktail: dependency: "direct dev" description: name: mocktail - sha256: "80a996cd9a69284b3dc521ce185ffe9150cde69767c2d3a0720147d93c0cef53" + sha256: "890df3f9688106f25755f26b1c60589a92b3ab91a22b8b224947ad041bf172d8" url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "1.0.4" nested: dependency: transitive description: @@ -612,50 +641,50 @@ packages: dependency: "direct main" description: name: package_info_plus - sha256: "88bc797f44a94814f2213db1c9bd5badebafdfb8290ca9f78d4b9ee2a3db4d79" + sha256: a75164ade98cb7d24cfd0a13c6408927c6b217fa60dee5a7ff5c116a58f28918 url: "https://pub.dev" source: hosted - version: "5.0.1" + version: "8.0.2" package_info_plus_platform_interface: dependency: transitive description: name: package_info_plus_platform_interface - sha256: "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6" + sha256: ac1f4a4847f1ade8e6a87d1f39f5d7c67490738642e2542f559ec38c37489a66 url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.1" path: dependency: transitive description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.9.0" path_provider: dependency: transitive description: name: path_provider - sha256: c9e7d3a4cd1410877472158bee69963a4579f78b68c65a2b7d40d1a7a88bb161 + sha256: fec0d61223fba3154d87759e3cc27fe2c8dc498f6386c6d6fc80d1afdd1bf378 url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.1.4" path_provider_android: dependency: transitive description: name: path_provider_android - sha256: a248d8146ee5983446bf03ed5ea8f6533129a12b11f12057ad1b4a67a2b3b41d + sha256: "6f01f8e37ec30b07bc424b4deabac37cacb1bc7e2e515ad74486039918a37eb7" url: "https://pub.dev" source: hosted - version: "2.2.4" + version: "2.2.10" path_provider_foundation: dependency: transitive description: name: path_provider_foundation - sha256: "5a7999be66e000916500be4f15a3633ebceb8302719b47b9cc49ce924125350f" + sha256: f234384a3fdd67f989b4d54a5d73ca2a6c422fa55ae694381ae0f4375cd1ea16 url: "https://pub.dev" source: hosted - version: "2.3.2" + version: "2.4.0" path_provider_linux: dependency: transitive description: @@ -676,18 +705,18 @@ packages: dependency: transitive description: name: path_provider_windows - sha256: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170" + sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 url: "https://pub.dev" source: hosted - version: "2.2.1" + version: "2.3.0" platform: dependency: transitive description: name: platform - sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec" + sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" url: "https://pub.dev" source: hosted - version: "3.1.4" + version: "3.1.5" plugin_platform_interface: dependency: "direct main" description: @@ -732,26 +761,26 @@ packages: dependency: transitive description: name: pubspec_parse - sha256: c63b2876e58e194e4b0828fcb080ad0e06d051cb607a6be51a9e084f47cb9367 + sha256: c799b721d79eb6ee6fa56f00c04b472dcd44a30d258fac2174a6ec57302678f8 url: "https://pub.dev" source: hosted - version: "1.2.3" + version: "1.3.0" reactive_flutter_typeahead: dependency: "direct main" description: name: reactive_flutter_typeahead - sha256: ef91627df8cef70e603e8a6458749d8a99a385b78854332602fd08ad905cdab8 + sha256: a5dbca4b537bd9dde245d4228e1a6ce937c05cd77c57ed45b9c05135540d5f1a url: "https://pub.dev" source: hosted - version: "0.8.1" + version: "2.1.1" reactive_forms: dependency: "direct main" description: name: reactive_forms - sha256: "5aa9c48a0626c20d00a005e597cb10efbdebbfeecb9c4227b03a5945fbb91ec4" + sha256: "9b1fb18e0aae9c50cfa0aaabaaa38bc4d78eefc9b7b95fa9c947b051f6524b8e" url: "https://pub.dev" source: hosted - version: "14.3.0" + version: "17.0.1" remove_emoji_input_formatter: dependency: "direct main" description: @@ -817,10 +846,10 @@ packages: dependency: transitive description: name: source_map_stack_trace - sha256: "84cf769ad83aa6bb61e0aa5a18e53aea683395f196a6f39c4c881fb90ed4f7ae" + sha256: c0713a43e323c3302c2abe2a1cc89aa057a387101ebd280371d6a6c9fa68516b url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" source_maps: dependency: transitive description: @@ -881,26 +910,26 @@ packages: dependency: transitive description: name: test - sha256: a1f7595805820fcc05e5c52e3a231aedd0b72972cb333e8c738a8b1239448b6f + sha256: "7ee446762c2c50b3bd4ea96fe13ffac69919352bd3b4b17bac3f3465edc58073" url: "https://pub.dev" source: hosted - version: "1.24.9" + version: "1.25.2" test_api: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.0" test_core: dependency: transitive description: name: test_core - sha256: a757b14fc47507060a162cc2530d9a4a2f92f5100a952c7443b5cad5ef5b106a + sha256: "2bc4b4ecddd75309300d8096f781c0e3280ca1ef85beda558d33fcbedc2eead4" url: "https://pub.dev" source: hosted - version: "0.5.9" + version: "0.6.0" timing: dependency: transitive description: @@ -929,10 +958,10 @@ packages: dependency: transitive description: name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" url: "https://pub.dev" source: hosted - version: "13.0.0" + version: "14.2.1" watcher: dependency: transitive description: @@ -945,10 +974,10 @@ packages: dependency: transitive description: name: web - sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 + sha256: d43c1d6b787bf0afad444700ae7f4db8827f701bc61c255ac8d328c6f4d52062 url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "1.0.0" web_socket_channel: dependency: transitive description: @@ -969,10 +998,10 @@ packages: dependency: transitive description: name: win32 - sha256: "464f5674532865248444b4c3daca12bd9bf2d7c47f759ce2617986e7229494a8" + sha256: "68d1e89a91ed61ad9c370f9f8b6effed9ae5e0ede22a270bdfa6daf79fc2290a" url: "https://pub.dev" source: hosted - version: "5.2.0" + version: "5.5.4" xdg_directories: dependency: transitive description: @@ -990,5 +1019,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.2.0 <3.9.0" - flutter: ">=3.16.0" + dart: ">=3.4.0 <3.9.0" + flutter: ">=3.22.0" diff --git a/packages/digit_components/pubspec.yaml b/packages/digit_components/pubspec.yaml index b1b428884..10ea58d9c 100644 --- a/packages/digit_components/pubspec.yaml +++ b/packages/digit_components/pubspec.yaml @@ -1,6 +1,6 @@ name: digit_components description: Digit UI Design specification Flutter widgets. Import this package by adding digit_components in respective pubspec.yaml dependencies. -version: 1.0.2+1 +version: 1.0.3 homepage: https://github.com/egovernments/health-campaign-field-worker-app/tree/master/packages/digit_components repository: https://github.com/egovernments/health-campaign-field-worker-app @@ -13,23 +13,23 @@ dependencies: sdk: flutter flutter_bloc: ^8.1.1 freezed_annotation: ^2.2.0 - google_fonts: ^4.0.4 + google_fonts: ^6.2.0 horizontal_data_table: ^4.1.3 - location: ^5.0.0 - location_platform_interface: ^3.0.0 + location: ^6.0.2 + location_platform_interface: ^4.0.0 json_annotation: ^4.7.0 logging: ^1.1.0 - build_runner: ^2.2.1 - reactive_forms: ^14.1.0 + build_runner: ^2.4.10 + reactive_forms: ^17.0.0 plugin_platform_interface: ^2.1.3 - fluttertoast: ^8.1.2 + fluttertoast: ^8.2.6 flutter_spinkit: ^5.1.0 - reactive_flutter_typeahead: ^0.8.1 - flutter_typeahead: ^4.3.7 + reactive_flutter_typeahead: ^2.1.1 + flutter_typeahead: ^4.6.2 overlay_builder: ^1.1.0 - package_info_plus: ^5.0.1 - easy_stepper: ^0.5.2+1 - intl: ^0.18.0 + package_info_plus: ^8.0.0 + easy_stepper: ^0.8.5 + intl: ^0.19.0 flutter_focus_watcher: ^2.0.0 remove_emoji_input_formatter: ^0.0.1+1 @@ -37,11 +37,11 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^2.0.0 + flutter_lints: ^4.0.0 json_serializable: ^6.4.0 freezed: ^2.2.0 bloc_test: ^9.1.0 - mocktail: ^0.3.0 + mocktail: ^1.0.3 flutter: assets: diff --git a/packages/digit_data_model/CHANGELOG.md b/packages/digit_data_model/CHANGELOG.md index f433699dd..87e9b781f 100644 --- a/packages/digit_data_model/CHANGELOG.md +++ b/packages/digit_data_model/CHANGELOG.md @@ -1,7 +1,17 @@ +## 1.0.5 + +* Upgrade to Flutter 3.22 +* Added project_type in Project Table +* Changed isActive to bool in Service Attribute table + +## 1.0.5-dev.1 + +* Merged pgr and survey_form package changes + ## 1.0.4+1 * Bug Fix: - * Updated syncRetryCount,syncRetryInterval and errorPath to dynamic + * Updated syncRetryCount,syncRetryInterval and errorPath to dynamic ## 1.0.4 @@ -22,11 +32,25 @@ * Updated oplog transactions to synchronous - fix for write transaction lock +## 1.0.4-dev.4 + +* synced with 1.0.4-dev.3 changes + ## 1.0.4-dev.3 * Updated oplog transactions to synchronous - fix for write transaction lock * Same change in 1.0.3-hotfix, 1.0.4-dev.3 +## 1.0.4-dev.2 + +* Removed Service and Service Definition models + - Removed Service repositories and Service blocs to integrate in checklist package + +## 1.0.4-dev.1 + +* Separated PGR Package +* Moved Models, Bloc, Repositories related to PGR Package + ## 1.0.3 * Added localization table @@ -35,11 +59,11 @@ ## 1.0.3-dev.4 * Updated individual local search results with user uuid mapping - + ## 1.0.3-dev.3 -* Created localization table - - Creation of the localization table. +* Created localization table + - Creation of the localization table. ## 1.0.3-dev.2 @@ -73,7 +97,7 @@ ## 0.0.0-dev.2 -* Boundary v2 Integrated, to use Boundary v1 0.0.0-dev.1 version can be used +* Boundary v2 Integrated, to use Boundary v1 0.0.0-dev.1 version can be used - Integration of Boundary v2 with the option to use Boundary v1 version 0.0.0-dev.1. ## 0.0.0-dev.1 diff --git a/packages/digit_data_model/lib/data/local_store/sql_store/sql_store.dart b/packages/digit_data_model/lib/data/local_store/sql_store/sql_store.dart index 5ac28bd5d..4dc193a34 100644 --- a/packages/digit_data_model/lib/data/local_store/sql_store/sql_store.dart +++ b/packages/digit_data_model/lib/data/local_store/sql_store/sql_store.dart @@ -11,7 +11,7 @@ import '../../../models/entities/address_type.dart'; import '../../../models/entities/beneficiary_type.dart'; import '../../../models/entities/blood_group.dart'; import '../../../models/entities/gender.dart'; -import '../../../models/pgr_complaints/pgr_complaints.dart'; +import '../../../models/entities/pgr_application_status.dart'; import 'tables/address.dart'; import 'tables/attributes.dart'; import 'tables/boundary.dart'; @@ -108,7 +108,74 @@ class LocalSqlDataStore extends _$LocalSqlDataStore { /// The `schemaVersion` getter returns the schema version of the database. @override - int get schemaVersion => 4; + int get schemaVersion => 5; // Increment schema version + + @override + MigrationStrategy get migration => + MigrationStrategy( + onUpgrade: (migrator, from, to) async { + if (from < 5) { + //Add column for projectType in Project Table + try { + await migrator.addColumn(project, project.projectType); + } catch (e) {} + } + if (from < 5) { + await customStatement(''' + CREATE TABLE attributes_temp ( + id TEXT, + dataType TEXT, + referenceId TEXT, + tenantId TEXT, + code TEXT, + values TEXT, + isActive BOOLEAN, + required BOOLEAN, + regex TEXT, + "order" INTEGER, + auditCreatedBy TEXT, + nonRecoverableError BOOLEAN DEFAULT 0, + auditCreatedTime INTEGER, + clientCreatedTime INTEGER, + clientModifiedBy TEXT, + clientCreatedBy TEXT, + clientModifiedTime INTEGER, + auditModifiedBy TEXT, + auditModifiedTime INTEGER, + isDeleted BOOLEAN DEFAULT 0, + rowVersion INTEGER, + additionalFields TEXT, + additionalDetails TEXT + ); + '''); + + // Step 2: Copy data from the old table to the new table + await customStatement(''' + INSERT INTO attributes_temp ( + id, dataType, referenceId, tenantId, code, values, isActive, required, regex, "order", + auditCreatedBy, nonRecoverableError, auditCreatedTime, clientCreatedTime, + clientModifiedBy, clientCreatedBy, clientModifiedTime, auditModifiedBy, + auditModifiedTime, isDeleted, rowVersion, additionalFields, additionalDetails + ) + SELECT + id, dataType, referenceId, tenantId, code, values, + CASE isActive WHEN 'true' THEN 1 WHEN 'false' THEN 0 ELSE NULL END, + required, regex, "order", + auditCreatedBy, nonRecoverableError, auditCreatedTime, clientCreatedTime, + clientModifiedBy, clientCreatedBy, clientModifiedTime, auditModifiedBy, + auditModifiedTime, isDeleted, rowVersion, additionalFields, additionalDetails + FROM attributes; + '''); + + // Step 3: Drop the old table + await migrator.deleteTable('attributes'); + + // Step 4: Rename the new table to the old table's name + await customStatement( + 'ALTER TABLE attributes_temp RENAME TO attributes;'); + } + }, + ); /// The `_openConnection` method opens a connection to the database. /// It returns a `LazyDatabase` that opens the database when it is first accessed. diff --git a/packages/digit_data_model/lib/data/local_store/sql_store/sql_store.g.dart b/packages/digit_data_model/lib/data/local_store/sql_store/sql_store.g.dart index 67c31d083..cef14c5c3 100644 --- a/packages/digit_data_model/lib/data/local_store/sql_store/sql_store.g.dart +++ b/packages/digit_data_model/lib/data/local_store/sql_store/sql_store.g.dart @@ -6875,6 +6875,11 @@ class $FacilityTable extends Facility late final GeneratedColumn tenantId = GeneratedColumn( 'tenant_id', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false); + static const VerificationMeta _nameMeta = const VerificationMeta('name'); + @override + late final GeneratedColumn name = GeneratedColumn( + 'name', aliasedName, true, + type: DriftSqlType.string, requiredDuringInsert: false); static const VerificationMeta _isDeletedMeta = const VerificationMeta('isDeleted'); @override @@ -6913,6 +6918,7 @@ class $FacilityTable extends Facility auditModifiedBy, auditModifiedTime, tenantId, + name, isDeleted, rowVersion, additionalFields @@ -7006,6 +7012,10 @@ class $FacilityTable extends Facility context.handle(_tenantIdMeta, tenantId.isAcceptableOrUnknown(data['tenant_id']!, _tenantIdMeta)); } + if (data.containsKey('name')) { + context.handle( + _nameMeta, name.isAcceptableOrUnknown(data['name']!, _nameMeta)); + } if (data.containsKey('is_deleted')) { context.handle(_isDeletedMeta, isDeleted.isAcceptableOrUnknown(data['is_deleted']!, _isDeletedMeta)); @@ -7059,6 +7069,8 @@ class $FacilityTable extends Facility DriftSqlType.int, data['${effectivePrefix}audit_modified_time']), tenantId: attachedDatabase.typeMapping .read(DriftSqlType.string, data['${effectivePrefix}tenant_id']), + name: attachedDatabase.typeMapping + .read(DriftSqlType.string, data['${effectivePrefix}name']), isDeleted: attachedDatabase.typeMapping .read(DriftSqlType.bool, data['${effectivePrefix}is_deleted']), rowVersion: attachedDatabase.typeMapping @@ -7089,6 +7101,7 @@ class FacilityData extends DataClass implements Insertable { final String? auditModifiedBy; final int? auditModifiedTime; final String? tenantId; + final String? name; final bool? isDeleted; final int? rowVersion; final String? additionalFields; @@ -7107,6 +7120,7 @@ class FacilityData extends DataClass implements Insertable { this.auditModifiedBy, this.auditModifiedTime, this.tenantId, + this.name, this.isDeleted, this.rowVersion, this.additionalFields}); @@ -7153,6 +7167,9 @@ class FacilityData extends DataClass implements Insertable { if (!nullToAbsent || tenantId != null) { map['tenant_id'] = Variable(tenantId); } + if (!nullToAbsent || name != null) { + map['name'] = Variable(name); + } if (!nullToAbsent || isDeleted != null) { map['is_deleted'] = Variable(isDeleted); } @@ -7206,6 +7223,7 @@ class FacilityData extends DataClass implements Insertable { tenantId: tenantId == null && nullToAbsent ? const Value.absent() : Value(tenantId), + name: name == null && nullToAbsent ? const Value.absent() : Value(name), isDeleted: isDeleted == null && nullToAbsent ? const Value.absent() : Value(isDeleted), @@ -7237,6 +7255,7 @@ class FacilityData extends DataClass implements Insertable { auditModifiedBy: serializer.fromJson(json['auditModifiedBy']), auditModifiedTime: serializer.fromJson(json['auditModifiedTime']), tenantId: serializer.fromJson(json['tenantId']), + name: serializer.fromJson(json['name']), isDeleted: serializer.fromJson(json['isDeleted']), rowVersion: serializer.fromJson(json['rowVersion']), additionalFields: serializer.fromJson(json['additionalFields']), @@ -7260,6 +7279,7 @@ class FacilityData extends DataClass implements Insertable { 'auditModifiedBy': serializer.toJson(auditModifiedBy), 'auditModifiedTime': serializer.toJson(auditModifiedTime), 'tenantId': serializer.toJson(tenantId), + 'name': serializer.toJson(name), 'isDeleted': serializer.toJson(isDeleted), 'rowVersion': serializer.toJson(rowVersion), 'additionalFields': serializer.toJson(additionalFields), @@ -7281,6 +7301,7 @@ class FacilityData extends DataClass implements Insertable { Value auditModifiedBy = const Value.absent(), Value auditModifiedTime = const Value.absent(), Value tenantId = const Value.absent(), + Value name = const Value.absent(), Value isDeleted = const Value.absent(), Value rowVersion = const Value.absent(), Value additionalFields = const Value.absent()}) => @@ -7318,6 +7339,7 @@ class FacilityData extends DataClass implements Insertable { ? auditModifiedTime.value : this.auditModifiedTime, tenantId: tenantId.present ? tenantId.value : this.tenantId, + name: name.present ? name.value : this.name, isDeleted: isDeleted.present ? isDeleted.value : this.isDeleted, rowVersion: rowVersion.present ? rowVersion.value : this.rowVersion, additionalFields: additionalFields.present @@ -7341,6 +7363,7 @@ class FacilityData extends DataClass implements Insertable { ..write('auditModifiedBy: $auditModifiedBy, ') ..write('auditModifiedTime: $auditModifiedTime, ') ..write('tenantId: $tenantId, ') + ..write('name: $name, ') ..write('isDeleted: $isDeleted, ') ..write('rowVersion: $rowVersion, ') ..write('additionalFields: $additionalFields') @@ -7364,6 +7387,7 @@ class FacilityData extends DataClass implements Insertable { auditModifiedBy, auditModifiedTime, tenantId, + name, isDeleted, rowVersion, additionalFields); @@ -7385,6 +7409,7 @@ class FacilityData extends DataClass implements Insertable { other.auditModifiedBy == this.auditModifiedBy && other.auditModifiedTime == this.auditModifiedTime && other.tenantId == this.tenantId && + other.name == this.name && other.isDeleted == this.isDeleted && other.rowVersion == this.rowVersion && other.additionalFields == this.additionalFields); @@ -7405,6 +7430,7 @@ class FacilityCompanion extends UpdateCompanion { final Value auditModifiedBy; final Value auditModifiedTime; final Value tenantId; + final Value name; final Value isDeleted; final Value rowVersion; final Value additionalFields; @@ -7424,6 +7450,7 @@ class FacilityCompanion extends UpdateCompanion { this.auditModifiedBy = const Value.absent(), this.auditModifiedTime = const Value.absent(), this.tenantId = const Value.absent(), + this.name = const Value.absent(), this.isDeleted = const Value.absent(), this.rowVersion = const Value.absent(), this.additionalFields = const Value.absent(), @@ -7444,6 +7471,7 @@ class FacilityCompanion extends UpdateCompanion { this.auditModifiedBy = const Value.absent(), this.auditModifiedTime = const Value.absent(), this.tenantId = const Value.absent(), + this.name = const Value.absent(), this.isDeleted = const Value.absent(), this.rowVersion = const Value.absent(), this.additionalFields = const Value.absent(), @@ -7464,6 +7492,7 @@ class FacilityCompanion extends UpdateCompanion { Expression? auditModifiedBy, Expression? auditModifiedTime, Expression? tenantId, + Expression? name, Expression? isDeleted, Expression? rowVersion, Expression? additionalFields, @@ -7486,6 +7515,7 @@ class FacilityCompanion extends UpdateCompanion { if (auditModifiedBy != null) 'audit_modified_by': auditModifiedBy, if (auditModifiedTime != null) 'audit_modified_time': auditModifiedTime, if (tenantId != null) 'tenant_id': tenantId, + if (name != null) 'name': name, if (isDeleted != null) 'is_deleted': isDeleted, if (rowVersion != null) 'row_version': rowVersion, if (additionalFields != null) 'additional_fields': additionalFields, @@ -7508,6 +7538,7 @@ class FacilityCompanion extends UpdateCompanion { Value? auditModifiedBy, Value? auditModifiedTime, Value? tenantId, + Value? name, Value? isDeleted, Value? rowVersion, Value? additionalFields, @@ -7527,6 +7558,7 @@ class FacilityCompanion extends UpdateCompanion { auditModifiedBy: auditModifiedBy ?? this.auditModifiedBy, auditModifiedTime: auditModifiedTime ?? this.auditModifiedTime, tenantId: tenantId ?? this.tenantId, + name: name ?? this.name, isDeleted: isDeleted ?? this.isDeleted, rowVersion: rowVersion ?? this.rowVersion, additionalFields: additionalFields ?? this.additionalFields, @@ -7579,6 +7611,9 @@ class FacilityCompanion extends UpdateCompanion { if (tenantId.present) { map['tenant_id'] = Variable(tenantId.value); } + if (name.present) { + map['name'] = Variable(name.value); + } if (isDeleted.present) { map['is_deleted'] = Variable(isDeleted.value); } @@ -7611,6 +7646,7 @@ class FacilityCompanion extends UpdateCompanion { ..write('auditModifiedBy: $auditModifiedBy, ') ..write('auditModifiedTime: $auditModifiedTime, ') ..write('tenantId: $tenantId, ') + ..write('name: $name, ') ..write('isDeleted: $isDeleted, ') ..write('rowVersion: $rowVersion, ') ..write('additionalFields: $additionalFields, ') @@ -9324,6 +9360,12 @@ class $ProjectTable extends Project with TableInfo<$ProjectTable, ProjectData> { final GeneratedDatabase attachedDatabase; final String? _alias; $ProjectTable(this.attachedDatabase, [this._alias]); + static const VerificationMeta _projectTypeMeta = + const VerificationMeta('projectType'); + @override + late final GeneratedColumn projectType = GeneratedColumn( + 'project_type', aliasedName, true, + type: DriftSqlType.string, requiredDuringInsert: false); static const VerificationMeta _idMeta = const VerificationMeta('id'); @override late final GeneratedColumn id = GeneratedColumn( @@ -9490,6 +9532,7 @@ class $ProjectTable extends Project with TableInfo<$ProjectTable, ProjectData> { type: DriftSqlType.string, requiredDuringInsert: false); @override List get $columns => [ + projectType, id, projectTypeId, projectNumber, @@ -9527,6 +9570,12 @@ class $ProjectTable extends Project with TableInfo<$ProjectTable, ProjectData> { {bool isInserting = false}) { final context = VerificationContext(); final data = instance.toColumns(true); + if (data.containsKey('project_type')) { + context.handle( + _projectTypeMeta, + projectType.isAcceptableOrUnknown( + data['project_type']!, _projectTypeMeta)); + } if (data.containsKey('id')) { context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); } else if (isInserting) { @@ -9681,6 +9730,8 @@ class $ProjectTable extends Project with TableInfo<$ProjectTable, ProjectData> { ProjectData map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return ProjectData( + projectType: attachedDatabase.typeMapping + .read(DriftSqlType.string, data['${effectivePrefix}project_type']), id: attachedDatabase.typeMapping .read(DriftSqlType.string, data['${effectivePrefix}id'])!, projectTypeId: attachedDatabase.typeMapping @@ -9743,6 +9794,7 @@ class $ProjectTable extends Project with TableInfo<$ProjectTable, ProjectData> { } class ProjectData extends DataClass implements Insertable { + final String? projectType; final String id; final String? projectTypeId; final String? projectNumber; @@ -9770,7 +9822,8 @@ class ProjectData extends DataClass implements Insertable { final int? endDate; final String? additionalFields; const ProjectData( - {required this.id, + {this.projectType, + required this.id, this.projectTypeId, this.projectNumber, this.subProjectTypeId, @@ -9799,6 +9852,9 @@ class ProjectData extends DataClass implements Insertable { @override Map toColumns(bool nullToAbsent) { final map = {}; + if (!nullToAbsent || projectType != null) { + map['project_type'] = Variable(projectType); + } map['id'] = Variable(id); if (!nullToAbsent || projectTypeId != null) { map['project_type_id'] = Variable(projectTypeId); @@ -9878,6 +9934,9 @@ class ProjectData extends DataClass implements Insertable { ProjectCompanion toCompanion(bool nullToAbsent) { return ProjectCompanion( + projectType: projectType == null && nullToAbsent + ? const Value.absent() + : Value(projectType), id: Value(id), projectTypeId: projectTypeId == null && nullToAbsent ? const Value.absent() @@ -9958,6 +10017,7 @@ class ProjectData extends DataClass implements Insertable { {ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return ProjectData( + projectType: serializer.fromJson(json['projectType']), id: serializer.fromJson(json['id']), projectTypeId: serializer.fromJson(json['projectTypeId']), projectNumber: serializer.fromJson(json['projectNumber']), @@ -9991,6 +10051,7 @@ class ProjectData extends DataClass implements Insertable { Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { + 'projectType': serializer.toJson(projectType), 'id': serializer.toJson(id), 'projectTypeId': serializer.toJson(projectTypeId), 'projectNumber': serializer.toJson(projectNumber), @@ -10021,7 +10082,8 @@ class ProjectData extends DataClass implements Insertable { } ProjectData copyWith( - {String? id, + {Value projectType = const Value.absent(), + String? id, Value projectTypeId = const Value.absent(), Value projectNumber = const Value.absent(), Value subProjectTypeId = const Value.absent(), @@ -10048,6 +10110,7 @@ class ProjectData extends DataClass implements Insertable { Value endDate = const Value.absent(), Value additionalFields = const Value.absent()}) => ProjectData( + projectType: projectType.present ? projectType.value : this.projectType, id: id ?? this.id, projectTypeId: projectTypeId.present ? projectTypeId.value : this.projectTypeId, @@ -10104,6 +10167,7 @@ class ProjectData extends DataClass implements Insertable { @override String toString() { return (StringBuffer('ProjectData(') + ..write('projectType: $projectType, ') ..write('id: $id, ') ..write('projectTypeId: $projectTypeId, ') ..write('projectNumber: $projectNumber, ') @@ -10136,6 +10200,7 @@ class ProjectData extends DataClass implements Insertable { @override int get hashCode => Object.hashAll([ + projectType, id, projectTypeId, projectNumber, @@ -10167,6 +10232,7 @@ class ProjectData extends DataClass implements Insertable { bool operator ==(Object other) => identical(this, other) || (other is ProjectData && + other.projectType == this.projectType && other.id == this.id && other.projectTypeId == this.projectTypeId && other.projectNumber == this.projectNumber && @@ -10196,6 +10262,7 @@ class ProjectData extends DataClass implements Insertable { } class ProjectCompanion extends UpdateCompanion { + final Value projectType; final Value id; final Value projectTypeId; final Value projectNumber; @@ -10224,6 +10291,7 @@ class ProjectCompanion extends UpdateCompanion { final Value additionalFields; final Value rowid; const ProjectCompanion({ + this.projectType = const Value.absent(), this.id = const Value.absent(), this.projectTypeId = const Value.absent(), this.projectNumber = const Value.absent(), @@ -10253,6 +10321,7 @@ class ProjectCompanion extends UpdateCompanion { this.rowid = const Value.absent(), }); ProjectCompanion.insert({ + this.projectType = const Value.absent(), required String id, this.projectTypeId = const Value.absent(), this.projectNumber = const Value.absent(), @@ -10283,6 +10352,7 @@ class ProjectCompanion extends UpdateCompanion { }) : id = Value(id), name = Value(name); static Insertable custom({ + Expression? projectType, Expression? id, Expression? projectTypeId, Expression? projectNumber, @@ -10312,6 +10382,7 @@ class ProjectCompanion extends UpdateCompanion { Expression? rowid, }) { return RawValuesInsertable({ + if (projectType != null) 'project_type': projectType, if (id != null) 'id': id, if (projectTypeId != null) 'project_type_id': projectTypeId, if (projectNumber != null) 'project_number': projectNumber, @@ -10345,7 +10416,8 @@ class ProjectCompanion extends UpdateCompanion { } ProjectCompanion copyWith( - {Value? id, + {Value? projectType, + Value? id, Value? projectTypeId, Value? projectNumber, Value? subProjectTypeId, @@ -10373,6 +10445,7 @@ class ProjectCompanion extends UpdateCompanion { Value? additionalFields, Value? rowid}) { return ProjectCompanion( + projectType: projectType ?? this.projectType, id: id ?? this.id, projectTypeId: projectTypeId ?? this.projectTypeId, projectNumber: projectNumber ?? this.projectNumber, @@ -10406,6 +10479,9 @@ class ProjectCompanion extends UpdateCompanion { @override Map toColumns(bool nullToAbsent) { final map = {}; + if (projectType.present) { + map['project_type'] = Variable(projectType.value); + } if (id.present) { map['id'] = Variable(id.value); } @@ -10493,6 +10569,7 @@ class ProjectCompanion extends UpdateCompanion { @override String toString() { return (StringBuffer('ProjectCompanion(') + ..write('projectType: $projectType, ') ..write('id: $id, ') ..write('projectTypeId: $projectTypeId, ') ..write('projectNumber: $projectNumber, ') @@ -18025,6 +18102,12 @@ class $StockTable extends Stock with TableInfo<$StockTable, StockData> { late final GeneratedColumn senderType = GeneratedColumn( 'sender_type', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false); + static const VerificationMeta _dateOfEntryMeta = + const VerificationMeta('dateOfEntry'); + @override + late final GeneratedColumn dateOfEntry = GeneratedColumn( + 'date_of_entry', aliasedName, true, + type: DriftSqlType.int, requiredDuringInsert: false); static const VerificationMeta _auditCreatedByMeta = const VerificationMeta('auditCreatedBy'); @override @@ -18139,6 +18222,7 @@ class $StockTable extends Stock with TableInfo<$StockTable, StockData> { receiverType, senderId, senderType, + dateOfEntry, auditCreatedBy, nonRecoverableError, auditCreatedTime, @@ -18240,6 +18324,12 @@ class $StockTable extends Stock with TableInfo<$StockTable, StockData> { senderType.isAcceptableOrUnknown( data['sender_type']!, _senderTypeMeta)); } + if (data.containsKey('date_of_entry')) { + context.handle( + _dateOfEntryMeta, + dateOfEntry.isAcceptableOrUnknown( + data['date_of_entry']!, _dateOfEntryMeta)); + } if (data.containsKey('audit_created_by')) { context.handle( _auditCreatedByMeta, @@ -18368,6 +18458,8 @@ class $StockTable extends Stock with TableInfo<$StockTable, StockData> { .read(DriftSqlType.string, data['${effectivePrefix}sender_id']), senderType: attachedDatabase.typeMapping .read(DriftSqlType.string, data['${effectivePrefix}sender_type']), + dateOfEntry: attachedDatabase.typeMapping + .read(DriftSqlType.int, data['${effectivePrefix}date_of_entry']), auditCreatedBy: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}audit_created_by']), nonRecoverableError: attachedDatabase.typeMapping.read( @@ -18422,6 +18514,7 @@ class StockData extends DataClass implements Insertable { final String? receiverType; final String? senderId; final String? senderType; + final int? dateOfEntry; final String? auditCreatedBy; final bool? nonRecoverableError; final int? auditCreatedTime; @@ -18452,6 +18545,7 @@ class StockData extends DataClass implements Insertable { this.receiverType, this.senderId, this.senderType, + this.dateOfEntry, this.auditCreatedBy, this.nonRecoverableError, this.auditCreatedTime, @@ -18512,6 +18606,9 @@ class StockData extends DataClass implements Insertable { if (!nullToAbsent || senderType != null) { map['sender_type'] = Variable(senderType); } + if (!nullToAbsent || dateOfEntry != null) { + map['date_of_entry'] = Variable(dateOfEntry); + } if (!nullToAbsent || auditCreatedBy != null) { map['audit_created_by'] = Variable(auditCreatedBy); } @@ -18600,6 +18697,9 @@ class StockData extends DataClass implements Insertable { senderType: senderType == null && nullToAbsent ? const Value.absent() : Value(senderType), + dateOfEntry: dateOfEntry == null && nullToAbsent + ? const Value.absent() + : Value(dateOfEntry), auditCreatedBy: auditCreatedBy == null && nullToAbsent ? const Value.absent() : Value(auditCreatedBy), @@ -18666,6 +18766,7 @@ class StockData extends DataClass implements Insertable { receiverType: serializer.fromJson(json['receiverType']), senderId: serializer.fromJson(json['senderId']), senderType: serializer.fromJson(json['senderType']), + dateOfEntry: serializer.fromJson(json['dateOfEntry']), auditCreatedBy: serializer.fromJson(json['auditCreatedBy']), nonRecoverableError: serializer.fromJson(json['nonRecoverableError']), @@ -18703,6 +18804,7 @@ class StockData extends DataClass implements Insertable { 'receiverType': serializer.toJson(receiverType), 'senderId': serializer.toJson(senderId), 'senderType': serializer.toJson(senderType), + 'dateOfEntry': serializer.toJson(dateOfEntry), 'auditCreatedBy': serializer.toJson(auditCreatedBy), 'nonRecoverableError': serializer.toJson(nonRecoverableError), 'auditCreatedTime': serializer.toJson(auditCreatedTime), @@ -18736,6 +18838,7 @@ class StockData extends DataClass implements Insertable { Value receiverType = const Value.absent(), Value senderId = const Value.absent(), Value senderType = const Value.absent(), + Value dateOfEntry = const Value.absent(), Value auditCreatedBy = const Value.absent(), Value nonRecoverableError = const Value.absent(), Value auditCreatedTime = const Value.absent(), @@ -18776,6 +18879,7 @@ class StockData extends DataClass implements Insertable { receiverType.present ? receiverType.value : this.receiverType, senderId: senderId.present ? senderId.value : this.senderId, senderType: senderType.present ? senderType.value : this.senderType, + dateOfEntry: dateOfEntry.present ? dateOfEntry.value : this.dateOfEntry, auditCreatedBy: auditCreatedBy.present ? auditCreatedBy.value : this.auditCreatedBy, nonRecoverableError: nonRecoverableError.present @@ -18832,6 +18936,7 @@ class StockData extends DataClass implements Insertable { ..write('receiverType: $receiverType, ') ..write('senderId: $senderId, ') ..write('senderType: $senderType, ') + ..write('dateOfEntry: $dateOfEntry, ') ..write('auditCreatedBy: $auditCreatedBy, ') ..write('nonRecoverableError: $nonRecoverableError, ') ..write('auditCreatedTime: $auditCreatedTime, ') @@ -18867,6 +18972,7 @@ class StockData extends DataClass implements Insertable { receiverType, senderId, senderType, + dateOfEntry, auditCreatedBy, nonRecoverableError, auditCreatedTime, @@ -18901,6 +19007,7 @@ class StockData extends DataClass implements Insertable { other.receiverType == this.receiverType && other.senderId == this.senderId && other.senderType == this.senderType && + other.dateOfEntry == this.dateOfEntry && other.auditCreatedBy == this.auditCreatedBy && other.nonRecoverableError == this.nonRecoverableError && other.auditCreatedTime == this.auditCreatedTime && @@ -18933,6 +19040,7 @@ class StockCompanion extends UpdateCompanion { final Value receiverType; final Value senderId; final Value senderType; + final Value dateOfEntry; final Value auditCreatedBy; final Value nonRecoverableError; final Value auditCreatedTime; @@ -18964,6 +19072,7 @@ class StockCompanion extends UpdateCompanion { this.receiverType = const Value.absent(), this.senderId = const Value.absent(), this.senderType = const Value.absent(), + this.dateOfEntry = const Value.absent(), this.auditCreatedBy = const Value.absent(), this.nonRecoverableError = const Value.absent(), this.auditCreatedTime = const Value.absent(), @@ -18996,6 +19105,7 @@ class StockCompanion extends UpdateCompanion { this.receiverType = const Value.absent(), this.senderId = const Value.absent(), this.senderType = const Value.absent(), + this.dateOfEntry = const Value.absent(), this.auditCreatedBy = const Value.absent(), this.nonRecoverableError = const Value.absent(), this.auditCreatedTime = const Value.absent(), @@ -19028,6 +19138,7 @@ class StockCompanion extends UpdateCompanion { Expression? receiverType, Expression? senderId, Expression? senderType, + Expression? dateOfEntry, Expression? auditCreatedBy, Expression? nonRecoverableError, Expression? auditCreatedTime, @@ -19062,6 +19173,7 @@ class StockCompanion extends UpdateCompanion { if (receiverType != null) 'receiver_type': receiverType, if (senderId != null) 'sender_id': senderId, if (senderType != null) 'sender_type': senderType, + if (dateOfEntry != null) 'date_of_entry': dateOfEntry, if (auditCreatedBy != null) 'audit_created_by': auditCreatedBy, if (nonRecoverableError != null) 'non_recoverable_error': nonRecoverableError, @@ -19098,6 +19210,7 @@ class StockCompanion extends UpdateCompanion { Value? receiverType, Value? senderId, Value? senderType, + Value? dateOfEntry, Value? auditCreatedBy, Value? nonRecoverableError, Value? auditCreatedTime, @@ -19129,6 +19242,7 @@ class StockCompanion extends UpdateCompanion { receiverType: receiverType ?? this.receiverType, senderId: senderId ?? this.senderId, senderType: senderType ?? this.senderType, + dateOfEntry: dateOfEntry ?? this.dateOfEntry, auditCreatedBy: auditCreatedBy ?? this.auditCreatedBy, nonRecoverableError: nonRecoverableError ?? this.nonRecoverableError, auditCreatedTime: auditCreatedTime ?? this.auditCreatedTime, @@ -19194,6 +19308,9 @@ class StockCompanion extends UpdateCompanion { if (senderType.present) { map['sender_type'] = Variable(senderType.value); } + if (dateOfEntry.present) { + map['date_of_entry'] = Variable(dateOfEntry.value); + } if (auditCreatedBy.present) { map['audit_created_by'] = Variable(auditCreatedBy.value); } @@ -19262,6 +19379,7 @@ class StockCompanion extends UpdateCompanion { ..write('receiverType: $receiverType, ') ..write('senderId: $senderId, ') ..write('senderType: $senderType, ') + ..write('dateOfEntry: $dateOfEntry, ') ..write('auditCreatedBy: $auditCreatedBy, ') ..write('nonRecoverableError: $nonRecoverableError, ') ..write('auditCreatedTime: $auditCreatedTime, ') @@ -20500,9 +20618,12 @@ class $TargetTable extends Target with TableInfo<$TargetTable, TargetData> { static const VerificationMeta _beneficiaryTypeMeta = const VerificationMeta('beneficiaryType'); @override - late final GeneratedColumn beneficiaryType = GeneratedColumn( - 'beneficiary_type', aliasedName, true, - type: DriftSqlType.string, requiredDuringInsert: false); + late final GeneratedColumnWithTypeConverter + beneficiaryType = GeneratedColumn( + 'beneficiary_type', aliasedName, true, + type: DriftSqlType.int, requiredDuringInsert: false) + .withConverter( + $TargetTable.$converterbeneficiaryTypen); static const VerificationMeta _additionalFieldsMeta = const VerificationMeta('additionalFields'); @override @@ -20627,12 +20748,7 @@ class $TargetTable extends Target with TableInfo<$TargetTable, TargetData> { rowVersion.isAcceptableOrUnknown( data['row_version']!, _rowVersionMeta)); } - if (data.containsKey('beneficiary_type')) { - context.handle( - _beneficiaryTypeMeta, - beneficiaryType.isAcceptableOrUnknown( - data['beneficiary_type']!, _beneficiaryTypeMeta)); - } + context.handle(_beneficiaryTypeMeta, const VerificationResult.success()); if (data.containsKey('additional_fields')) { context.handle( _additionalFieldsMeta, @@ -20680,8 +20796,9 @@ class $TargetTable extends Target with TableInfo<$TargetTable, TargetData> { .read(DriftSqlType.bool, data['${effectivePrefix}is_deleted']), rowVersion: attachedDatabase.typeMapping .read(DriftSqlType.int, data['${effectivePrefix}row_version']), - beneficiaryType: attachedDatabase.typeMapping.read( - DriftSqlType.string, data['${effectivePrefix}beneficiary_type']), + beneficiaryType: $TargetTable.$converterbeneficiaryTypen.fromSql( + attachedDatabase.typeMapping.read( + DriftSqlType.int, data['${effectivePrefix}beneficiary_type'])), additionalFields: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}additional_fields']), ); @@ -20691,6 +20808,13 @@ class $TargetTable extends Target with TableInfo<$TargetTable, TargetData> { $TargetTable createAlias(String alias) { return $TargetTable(attachedDatabase, alias); } + + static JsonTypeConverter2 + $converterbeneficiaryType = + const EnumIndexConverter(BeneficiaryType.values); + static JsonTypeConverter2 + $converterbeneficiaryTypen = + JsonTypeConverter2.asNullable($converterbeneficiaryType); } class TargetData extends DataClass implements Insertable { @@ -20710,7 +20834,7 @@ class TargetData extends DataClass implements Insertable { final String? tenantId; final bool? isDeleted; final int? rowVersion; - final String? beneficiaryType; + final BeneficiaryType? beneficiaryType; final String? additionalFields; const TargetData( {required this.id, @@ -20781,7 +20905,8 @@ class TargetData extends DataClass implements Insertable { map['row_version'] = Variable(rowVersion); } if (!nullToAbsent || beneficiaryType != null) { - map['beneficiary_type'] = Variable(beneficiaryType); + map['beneficiary_type'] = Variable( + $TargetTable.$converterbeneficiaryTypen.toSql(beneficiaryType)); } if (!nullToAbsent || additionalFields != null) { map['additional_fields'] = Variable(additionalFields); @@ -20868,7 +20993,8 @@ class TargetData extends DataClass implements Insertable { tenantId: serializer.fromJson(json['tenantId']), isDeleted: serializer.fromJson(json['isDeleted']), rowVersion: serializer.fromJson(json['rowVersion']), - beneficiaryType: serializer.fromJson(json['beneficiaryType']), + beneficiaryType: $TargetTable.$converterbeneficiaryTypen + .fromJson(serializer.fromJson(json['beneficiaryType'])), additionalFields: serializer.fromJson(json['additionalFields']), ); } @@ -20892,7 +21018,8 @@ class TargetData extends DataClass implements Insertable { 'tenantId': serializer.toJson(tenantId), 'isDeleted': serializer.toJson(isDeleted), 'rowVersion': serializer.toJson(rowVersion), - 'beneficiaryType': serializer.toJson(beneficiaryType), + 'beneficiaryType': serializer.toJson( + $TargetTable.$converterbeneficiaryTypen.toJson(beneficiaryType)), 'additionalFields': serializer.toJson(additionalFields), }; } @@ -20914,7 +21041,7 @@ class TargetData extends DataClass implements Insertable { Value tenantId = const Value.absent(), Value isDeleted = const Value.absent(), Value rowVersion = const Value.absent(), - Value beneficiaryType = const Value.absent(), + Value beneficiaryType = const Value.absent(), Value additionalFields = const Value.absent()}) => TargetData( id: id ?? this.id, @@ -21045,7 +21172,7 @@ class TargetCompanion extends UpdateCompanion { final Value tenantId; final Value isDeleted; final Value rowVersion; - final Value beneficiaryType; + final Value beneficiaryType; final Value additionalFields; final Value rowid; const TargetCompanion({ @@ -21107,7 +21234,7 @@ class TargetCompanion extends UpdateCompanion { Expression? tenantId, Expression? isDeleted, Expression? rowVersion, - Expression? beneficiaryType, + Expression? beneficiaryType, Expression? additionalFields, Expression? rowid, }) { @@ -21153,7 +21280,7 @@ class TargetCompanion extends UpdateCompanion { Value? tenantId, Value? isDeleted, Value? rowVersion, - Value? beneficiaryType, + Value? beneficiaryType, Value? additionalFields, Value? rowid}) { return TargetCompanion( @@ -21231,7 +21358,8 @@ class TargetCompanion extends UpdateCompanion { map['row_version'] = Variable(rowVersion.value); } if (beneficiaryType.present) { - map['beneficiary_type'] = Variable(beneficiaryType.value); + map['beneficiary_type'] = Variable( + $TargetTable.$converterbeneficiaryTypen.toSql(beneficiaryType.value)); } if (additionalFields.present) { map['additional_fields'] = Variable(additionalFields.value); @@ -25087,9 +25215,12 @@ class $AttributesTable extends Attributes static const VerificationMeta _isActiveMeta = const VerificationMeta('isActive'); @override - late final GeneratedColumn isActive = GeneratedColumn( + late final GeneratedColumn isActive = GeneratedColumn( 'is_active', aliasedName, true, - type: DriftSqlType.string, requiredDuringInsert: false); + type: DriftSqlType.bool, + requiredDuringInsert: false, + defaultConstraints: + GeneratedColumn.constraintIsAlways('CHECK ("is_active" IN (0, 1))')); static const VerificationMeta _requiredMeta = const VerificationMeta('required'); @override @@ -25370,7 +25501,7 @@ class $AttributesTable extends Attributes values: attachedDatabase.typeMapping .read(DriftSqlType.string, data['${effectivePrefix}values']), isActive: attachedDatabase.typeMapping - .read(DriftSqlType.string, data['${effectivePrefix}is_active']), + .read(DriftSqlType.bool, data['${effectivePrefix}is_active']), required: attachedDatabase.typeMapping .read(DriftSqlType.bool, data['${effectivePrefix}required']), regex: attachedDatabase.typeMapping @@ -25419,7 +25550,7 @@ class Attribute extends DataClass implements Insertable { final String? tenantId; final String? code; final String? values; - final String? isActive; + final bool? isActive; final bool? required; final String? regex; final int? order; @@ -25482,7 +25613,7 @@ class Attribute extends DataClass implements Insertable { map['values'] = Variable(values); } if (!nullToAbsent || isActive != null) { - map['is_active'] = Variable(isActive); + map['is_active'] = Variable(isActive); } if (!nullToAbsent || required != null) { map['required'] = Variable(required); @@ -25612,7 +25743,7 @@ class Attribute extends DataClass implements Insertable { tenantId: serializer.fromJson(json['tenantId']), code: serializer.fromJson(json['code']), values: serializer.fromJson(json['values']), - isActive: serializer.fromJson(json['isActive']), + isActive: serializer.fromJson(json['isActive']), required: serializer.fromJson(json['required']), regex: serializer.fromJson(json['regex']), order: serializer.fromJson(json['order']), @@ -25643,7 +25774,7 @@ class Attribute extends DataClass implements Insertable { 'tenantId': serializer.toJson(tenantId), 'code': serializer.toJson(code), 'values': serializer.toJson(values), - 'isActive': serializer.toJson(isActive), + 'isActive': serializer.toJson(isActive), 'required': serializer.toJson(required), 'regex': serializer.toJson(regex), 'order': serializer.toJson(order), @@ -25670,7 +25801,7 @@ class Attribute extends DataClass implements Insertable { Value tenantId = const Value.absent(), Value code = const Value.absent(), Value values = const Value.absent(), - Value isActive = const Value.absent(), + Value isActive = const Value.absent(), Value required = const Value.absent(), Value regex = const Value.absent(), Value order = const Value.absent(), @@ -25825,7 +25956,7 @@ class AttributesCompanion extends UpdateCompanion { final Value tenantId; final Value code; final Value values; - final Value isActive; + final Value isActive; final Value required; final Value regex; final Value order; @@ -25902,7 +26033,7 @@ class AttributesCompanion extends UpdateCompanion { Expression? tenantId, Expression? code, Expression? values, - Expression? isActive, + Expression? isActive, Expression? required, Expression? regex, Expression? order, @@ -25958,7 +26089,7 @@ class AttributesCompanion extends UpdateCompanion { Value? tenantId, Value? code, Value? values, - Value? isActive, + Value? isActive, Value? required, Value? regex, Value? order, @@ -26026,7 +26157,7 @@ class AttributesCompanion extends UpdateCompanion { map['values'] = Variable(values.value); } if (isActive.present) { - map['is_active'] = Variable(isActive.value); + map['is_active'] = Variable(isActive.value); } if (required.present) { map['required'] = Variable(required.value); @@ -36822,6 +36953,13 @@ class $SideEffectTable extends SideEffect late final GeneratedColumn taskClientReferenceId = GeneratedColumn('task_client_reference_id', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false); + static const VerificationMeta _projectBeneficiaryClientReferenceIdMeta = + const VerificationMeta('projectBeneficiaryClientReferenceId'); + @override + late final GeneratedColumn projectBeneficiaryClientReferenceId = + GeneratedColumn( + 'project_beneficiary_client_reference_id', aliasedName, true, + type: DriftSqlType.string, requiredDuringInsert: false); static const VerificationMeta _reAttemptsMeta = const VerificationMeta('reAttempts'); @override @@ -36931,6 +37069,7 @@ class $SideEffectTable extends SideEffect id, projectId, taskClientReferenceId, + projectBeneficiaryClientReferenceId, reAttempts, symptoms, auditCreatedBy, @@ -36971,6 +37110,13 @@ class $SideEffectTable extends SideEffect taskClientReferenceId.isAcceptableOrUnknown( data['task_client_reference_id']!, _taskClientReferenceIdMeta)); } + if (data.containsKey('project_beneficiary_client_reference_id')) { + context.handle( + _projectBeneficiaryClientReferenceIdMeta, + projectBeneficiaryClientReferenceId.isAcceptableOrUnknown( + data['project_beneficiary_client_reference_id']!, + _projectBeneficiaryClientReferenceIdMeta)); + } if (data.containsKey('re_attempts')) { context.handle( _reAttemptsMeta, @@ -37079,6 +37225,9 @@ class $SideEffectTable extends SideEffect taskClientReferenceId: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}task_client_reference_id']), + projectBeneficiaryClientReferenceId: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}project_beneficiary_client_reference_id']), reAttempts: attachedDatabase.typeMapping .read(DriftSqlType.int, data['${effectivePrefix}re_attempts']), symptoms: attachedDatabase.typeMapping @@ -37124,6 +37273,7 @@ class SideEffectData extends DataClass implements Insertable { final String? id; final String? projectId; final String? taskClientReferenceId; + final String? projectBeneficiaryClientReferenceId; final int? reAttempts; final String? symptoms; final String? auditCreatedBy; @@ -37144,6 +37294,7 @@ class SideEffectData extends DataClass implements Insertable { {this.id, this.projectId, this.taskClientReferenceId, + this.projectBeneficiaryClientReferenceId, this.reAttempts, this.symptoms, this.auditCreatedBy, @@ -37172,6 +37323,10 @@ class SideEffectData extends DataClass implements Insertable { if (!nullToAbsent || taskClientReferenceId != null) { map['task_client_reference_id'] = Variable(taskClientReferenceId); } + if (!nullToAbsent || projectBeneficiaryClientReferenceId != null) { + map['project_beneficiary_client_reference_id'] = + Variable(projectBeneficiaryClientReferenceId); + } if (!nullToAbsent || reAttempts != null) { map['re_attempts'] = Variable(reAttempts); } @@ -37230,6 +37385,10 @@ class SideEffectData extends DataClass implements Insertable { taskClientReferenceId: taskClientReferenceId == null && nullToAbsent ? const Value.absent() : Value(taskClientReferenceId), + projectBeneficiaryClientReferenceId: + projectBeneficiaryClientReferenceId == null && nullToAbsent + ? const Value.absent() + : Value(projectBeneficiaryClientReferenceId), reAttempts: reAttempts == null && nullToAbsent ? const Value.absent() : Value(reAttempts), @@ -37287,6 +37446,8 @@ class SideEffectData extends DataClass implements Insertable { projectId: serializer.fromJson(json['projectId']), taskClientReferenceId: serializer.fromJson(json['taskClientReferenceId']), + projectBeneficiaryClientReferenceId: serializer + .fromJson(json['projectBeneficiaryClientReferenceId']), reAttempts: serializer.fromJson(json['reAttempts']), symptoms: serializer.fromJson(json['symptoms']), auditCreatedBy: serializer.fromJson(json['auditCreatedBy']), @@ -37314,6 +37475,8 @@ class SideEffectData extends DataClass implements Insertable { 'projectId': serializer.toJson(projectId), 'taskClientReferenceId': serializer.toJson(taskClientReferenceId), + 'projectBeneficiaryClientReferenceId': + serializer.toJson(projectBeneficiaryClientReferenceId), 'reAttempts': serializer.toJson(reAttempts), 'symptoms': serializer.toJson(symptoms), 'auditCreatedBy': serializer.toJson(auditCreatedBy), @@ -37337,6 +37500,8 @@ class SideEffectData extends DataClass implements Insertable { {Value id = const Value.absent(), Value projectId = const Value.absent(), Value taskClientReferenceId = const Value.absent(), + Value projectBeneficiaryClientReferenceId = + const Value.absent(), Value reAttempts = const Value.absent(), Value symptoms = const Value.absent(), Value auditCreatedBy = const Value.absent(), @@ -37359,6 +37524,10 @@ class SideEffectData extends DataClass implements Insertable { taskClientReferenceId: taskClientReferenceId.present ? taskClientReferenceId.value : this.taskClientReferenceId, + projectBeneficiaryClientReferenceId: + projectBeneficiaryClientReferenceId.present + ? projectBeneficiaryClientReferenceId.value + : this.projectBeneficiaryClientReferenceId, reAttempts: reAttempts.present ? reAttempts.value : this.reAttempts, symptoms: symptoms.present ? symptoms.value : this.symptoms, auditCreatedBy: @@ -37401,6 +37570,8 @@ class SideEffectData extends DataClass implements Insertable { ..write('id: $id, ') ..write('projectId: $projectId, ') ..write('taskClientReferenceId: $taskClientReferenceId, ') + ..write( + 'projectBeneficiaryClientReferenceId: $projectBeneficiaryClientReferenceId, ') ..write('reAttempts: $reAttempts, ') ..write('symptoms: $symptoms, ') ..write('auditCreatedBy: $auditCreatedBy, ') @@ -37426,6 +37597,7 @@ class SideEffectData extends DataClass implements Insertable { id, projectId, taskClientReferenceId, + projectBeneficiaryClientReferenceId, reAttempts, symptoms, auditCreatedBy, @@ -37449,6 +37621,8 @@ class SideEffectData extends DataClass implements Insertable { other.id == this.id && other.projectId == this.projectId && other.taskClientReferenceId == this.taskClientReferenceId && + other.projectBeneficiaryClientReferenceId == + this.projectBeneficiaryClientReferenceId && other.reAttempts == this.reAttempts && other.symptoms == this.symptoms && other.auditCreatedBy == this.auditCreatedBy && @@ -37471,6 +37645,7 @@ class SideEffectCompanion extends UpdateCompanion { final Value id; final Value projectId; final Value taskClientReferenceId; + final Value projectBeneficiaryClientReferenceId; final Value reAttempts; final Value symptoms; final Value auditCreatedBy; @@ -37492,6 +37667,7 @@ class SideEffectCompanion extends UpdateCompanion { this.id = const Value.absent(), this.projectId = const Value.absent(), this.taskClientReferenceId = const Value.absent(), + this.projectBeneficiaryClientReferenceId = const Value.absent(), this.reAttempts = const Value.absent(), this.symptoms = const Value.absent(), this.auditCreatedBy = const Value.absent(), @@ -37514,6 +37690,7 @@ class SideEffectCompanion extends UpdateCompanion { this.id = const Value.absent(), this.projectId = const Value.absent(), this.taskClientReferenceId = const Value.absent(), + this.projectBeneficiaryClientReferenceId = const Value.absent(), this.reAttempts = const Value.absent(), this.symptoms = const Value.absent(), this.auditCreatedBy = const Value.absent(), @@ -37536,6 +37713,7 @@ class SideEffectCompanion extends UpdateCompanion { Expression? id, Expression? projectId, Expression? taskClientReferenceId, + Expression? projectBeneficiaryClientReferenceId, Expression? reAttempts, Expression? symptoms, Expression? auditCreatedBy, @@ -37559,6 +37737,9 @@ class SideEffectCompanion extends UpdateCompanion { if (projectId != null) 'project_id': projectId, if (taskClientReferenceId != null) 'task_client_reference_id': taskClientReferenceId, + if (projectBeneficiaryClientReferenceId != null) + 'project_beneficiary_client_reference_id': + projectBeneficiaryClientReferenceId, if (reAttempts != null) 're_attempts': reAttempts, if (symptoms != null) 'symptoms': symptoms, if (auditCreatedBy != null) 'audit_created_by': auditCreatedBy, @@ -37585,6 +37766,7 @@ class SideEffectCompanion extends UpdateCompanion { {Value? id, Value? projectId, Value? taskClientReferenceId, + Value? projectBeneficiaryClientReferenceId, Value? reAttempts, Value? symptoms, Value? auditCreatedBy, @@ -37607,6 +37789,9 @@ class SideEffectCompanion extends UpdateCompanion { projectId: projectId ?? this.projectId, taskClientReferenceId: taskClientReferenceId ?? this.taskClientReferenceId, + projectBeneficiaryClientReferenceId: + projectBeneficiaryClientReferenceId ?? + this.projectBeneficiaryClientReferenceId, reAttempts: reAttempts ?? this.reAttempts, symptoms: symptoms ?? this.symptoms, auditCreatedBy: auditCreatedBy ?? this.auditCreatedBy, @@ -37640,6 +37825,10 @@ class SideEffectCompanion extends UpdateCompanion { map['task_client_reference_id'] = Variable(taskClientReferenceId.value); } + if (projectBeneficiaryClientReferenceId.present) { + map['project_beneficiary_client_reference_id'] = + Variable(projectBeneficiaryClientReferenceId.value); + } if (reAttempts.present) { map['re_attempts'] = Variable(reAttempts.value); } @@ -37700,6 +37889,8 @@ class SideEffectCompanion extends UpdateCompanion { ..write('id: $id, ') ..write('projectId: $projectId, ') ..write('taskClientReferenceId: $taskClientReferenceId, ') + ..write( + 'projectBeneficiaryClientReferenceId: $projectBeneficiaryClientReferenceId, ') ..write('reAttempts: $reAttempts, ') ..write('symptoms: $symptoms, ') ..write('auditCreatedBy: $auditCreatedBy, ') @@ -39013,6 +39204,7 @@ class LocalizationCompanion extends UpdateCompanion { abstract class _$LocalSqlDataStore extends GeneratedDatabase { _$LocalSqlDataStore(QueryExecutor e) : super(e); + _$LocalSqlDataStoreManager get managers => _$LocalSqlDataStoreManager(this); late final $AttendanceRegisterTable attendanceRegister = $AttendanceRegisterTable(this); late final $AttendanceTable attendance = $AttendanceTable(this); @@ -39209,3 +39401,15771 @@ abstract class _$LocalSqlDataStore extends GeneratedDatabase { localizationModule ]; } + +typedef $$AttendanceRegisterTableInsertCompanionBuilder + = AttendanceRegisterCompanion Function({ + Value id, + required String tenantId, + required String registerNumber, + required String name, + required String referenceId, + required String serviceCode, + required String status, + Value startDate, + Value endDate, + Value additionalFields, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value isDeleted, + Value rowVersion, + Value rowid, +}); +typedef $$AttendanceRegisterTableUpdateCompanionBuilder + = AttendanceRegisterCompanion Function({ + Value id, + Value tenantId, + Value registerNumber, + Value name, + Value referenceId, + Value serviceCode, + Value status, + Value startDate, + Value endDate, + Value additionalFields, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value isDeleted, + Value rowVersion, + Value rowid, +}); + +class $$AttendanceRegisterTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $AttendanceRegisterTable, + AttendanceRegisterData, + $$AttendanceRegisterTableFilterComposer, + $$AttendanceRegisterTableOrderingComposer, + $$AttendanceRegisterTableProcessedTableManager, + $$AttendanceRegisterTableInsertCompanionBuilder, + $$AttendanceRegisterTableUpdateCompanionBuilder> { + $$AttendanceRegisterTableTableManager( + _$LocalSqlDataStore db, $AttendanceRegisterTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$AttendanceRegisterTableFilterComposer(ComposerState(db, table)), + orderingComposer: $$AttendanceRegisterTableOrderingComposer( + ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$AttendanceRegisterTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value tenantId = const Value.absent(), + Value registerNumber = const Value.absent(), + Value name = const Value.absent(), + Value referenceId = const Value.absent(), + Value serviceCode = const Value.absent(), + Value status = const Value.absent(), + Value startDate = const Value.absent(), + Value endDate = const Value.absent(), + Value additionalFields = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value rowid = const Value.absent(), + }) => + AttendanceRegisterCompanion( + id: id, + tenantId: tenantId, + registerNumber: registerNumber, + name: name, + referenceId: referenceId, + serviceCode: serviceCode, + status: status, + startDate: startDate, + endDate: endDate, + additionalFields: additionalFields, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + isDeleted: isDeleted, + rowVersion: rowVersion, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value id = const Value.absent(), + required String tenantId, + required String registerNumber, + required String name, + required String referenceId, + required String serviceCode, + required String status, + Value startDate = const Value.absent(), + Value endDate = const Value.absent(), + Value additionalFields = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value rowid = const Value.absent(), + }) => + AttendanceRegisterCompanion.insert( + id: id, + tenantId: tenantId, + registerNumber: registerNumber, + name: name, + referenceId: referenceId, + serviceCode: serviceCode, + status: status, + startDate: startDate, + endDate: endDate, + additionalFields: additionalFields, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + isDeleted: isDeleted, + rowVersion: rowVersion, + rowid: rowid, + ), + )); +} + +class $$AttendanceRegisterTableProcessedTableManager + extends ProcessedTableManager< + _$LocalSqlDataStore, + $AttendanceRegisterTable, + AttendanceRegisterData, + $$AttendanceRegisterTableFilterComposer, + $$AttendanceRegisterTableOrderingComposer, + $$AttendanceRegisterTableProcessedTableManager, + $$AttendanceRegisterTableInsertCompanionBuilder, + $$AttendanceRegisterTableUpdateCompanionBuilder> { + $$AttendanceRegisterTableProcessedTableManager(super.$state); +} + +class $$AttendanceRegisterTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $AttendanceRegisterTable> { + $$AttendanceRegisterTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get registerNumber => $state.composableBuilder( + column: $state.table.registerNumber, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get name => $state.composableBuilder( + column: $state.table.name, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get referenceId => $state.composableBuilder( + column: $state.table.referenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get serviceCode => $state.composableBuilder( + column: $state.table.serviceCode, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get status => $state.composableBuilder( + column: $state.table.status, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get startDate => $state.composableBuilder( + column: $state.table.startDate, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get endDate => $state.composableBuilder( + column: $state.table.endDate, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$AttendanceRegisterTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $AttendanceRegisterTable> { + $$AttendanceRegisterTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get registerNumber => $state.composableBuilder( + column: $state.table.registerNumber, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get name => $state.composableBuilder( + column: $state.table.name, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get referenceId => $state.composableBuilder( + column: $state.table.referenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get serviceCode => $state.composableBuilder( + column: $state.table.serviceCode, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get status => $state.composableBuilder( + column: $state.table.status, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get startDate => $state.composableBuilder( + column: $state.table.startDate, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get endDate => $state.composableBuilder( + column: $state.table.endDate, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$AttendanceTableInsertCompanionBuilder = AttendanceCompanion Function({ + Value id, + Value clientReferenceId, + required String tenantId, + required String registerId, + required String individualId, + Value time, + Value status, + Value type, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditCreatedBy, + Value auditModifiedBy, + Value auditModifiedTime, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value uploadToServer, + Value rowid, +}); +typedef $$AttendanceTableUpdateCompanionBuilder = AttendanceCompanion Function({ + Value id, + Value clientReferenceId, + Value tenantId, + Value registerId, + Value individualId, + Value time, + Value status, + Value type, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditCreatedBy, + Value auditModifiedBy, + Value auditModifiedTime, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value uploadToServer, + Value rowid, +}); + +class $$AttendanceTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $AttendanceTable, + AttendanceData, + $$AttendanceTableFilterComposer, + $$AttendanceTableOrderingComposer, + $$AttendanceTableProcessedTableManager, + $$AttendanceTableInsertCompanionBuilder, + $$AttendanceTableUpdateCompanionBuilder> { + $$AttendanceTableTableManager(_$LocalSqlDataStore db, $AttendanceTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$AttendanceTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$AttendanceTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$AttendanceTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value clientReferenceId = const Value.absent(), + Value tenantId = const Value.absent(), + Value registerId = const Value.absent(), + Value individualId = const Value.absent(), + Value time = const Value.absent(), + Value status = const Value.absent(), + Value type = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value uploadToServer = const Value.absent(), + Value rowid = const Value.absent(), + }) => + AttendanceCompanion( + id: id, + clientReferenceId: clientReferenceId, + tenantId: tenantId, + registerId: registerId, + individualId: individualId, + time: time, + status: status, + type: type, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditCreatedBy: auditCreatedBy, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + uploadToServer: uploadToServer, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value id = const Value.absent(), + Value clientReferenceId = const Value.absent(), + required String tenantId, + required String registerId, + required String individualId, + Value time = const Value.absent(), + Value status = const Value.absent(), + Value type = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value uploadToServer = const Value.absent(), + Value rowid = const Value.absent(), + }) => + AttendanceCompanion.insert( + id: id, + clientReferenceId: clientReferenceId, + tenantId: tenantId, + registerId: registerId, + individualId: individualId, + time: time, + status: status, + type: type, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditCreatedBy: auditCreatedBy, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + uploadToServer: uploadToServer, + rowid: rowid, + ), + )); +} + +class $$AttendanceTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $AttendanceTable, + AttendanceData, + $$AttendanceTableFilterComposer, + $$AttendanceTableOrderingComposer, + $$AttendanceTableProcessedTableManager, + $$AttendanceTableInsertCompanionBuilder, + $$AttendanceTableUpdateCompanionBuilder> { + $$AttendanceTableProcessedTableManager(super.$state); +} + +class $$AttendanceTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $AttendanceTable> { + $$AttendanceTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get registerId => $state.composableBuilder( + column: $state.table.registerId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get individualId => $state.composableBuilder( + column: $state.table.individualId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get time => $state.composableBuilder( + column: $state.table.time, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get status => $state.composableBuilder( + column: $state.table.status, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get type => $state.composableBuilder( + column: $state.table.type, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get uploadToServer => $state.composableBuilder( + column: $state.table.uploadToServer, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$AttendanceTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $AttendanceTable> { + $$AttendanceTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get registerId => $state.composableBuilder( + column: $state.table.registerId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get individualId => $state.composableBuilder( + column: $state.table.individualId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get time => $state.composableBuilder( + column: $state.table.time, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get status => $state.composableBuilder( + column: $state.table.status, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get type => $state.composableBuilder( + column: $state.table.type, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get uploadToServer => $state.composableBuilder( + column: $state.table.uploadToServer, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$AttendeeTableInsertCompanionBuilder = AttendeeCompanion Function({ + Value id, + required String tenantId, + required String registerId, + required String individualId, + Value status, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditCreatedBy, + Value auditModifiedBy, + Value auditModifiedTime, + Value enrollmentDate, + Value denrollmentDate, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); +typedef $$AttendeeTableUpdateCompanionBuilder = AttendeeCompanion Function({ + Value id, + Value tenantId, + Value registerId, + Value individualId, + Value status, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditCreatedBy, + Value auditModifiedBy, + Value auditModifiedTime, + Value enrollmentDate, + Value denrollmentDate, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); + +class $$AttendeeTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $AttendeeTable, + AttendeeData, + $$AttendeeTableFilterComposer, + $$AttendeeTableOrderingComposer, + $$AttendeeTableProcessedTableManager, + $$AttendeeTableInsertCompanionBuilder, + $$AttendeeTableUpdateCompanionBuilder> { + $$AttendeeTableTableManager(_$LocalSqlDataStore db, $AttendeeTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$AttendeeTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$AttendeeTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$AttendeeTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value tenantId = const Value.absent(), + Value registerId = const Value.absent(), + Value individualId = const Value.absent(), + Value status = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value enrollmentDate = const Value.absent(), + Value denrollmentDate = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + AttendeeCompanion( + id: id, + tenantId: tenantId, + registerId: registerId, + individualId: individualId, + status: status, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditCreatedBy: auditCreatedBy, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + enrollmentDate: enrollmentDate, + denrollmentDate: denrollmentDate, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value id = const Value.absent(), + required String tenantId, + required String registerId, + required String individualId, + Value status = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value enrollmentDate = const Value.absent(), + Value denrollmentDate = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + AttendeeCompanion.insert( + id: id, + tenantId: tenantId, + registerId: registerId, + individualId: individualId, + status: status, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditCreatedBy: auditCreatedBy, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + enrollmentDate: enrollmentDate, + denrollmentDate: denrollmentDate, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$AttendeeTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $AttendeeTable, + AttendeeData, + $$AttendeeTableFilterComposer, + $$AttendeeTableOrderingComposer, + $$AttendeeTableProcessedTableManager, + $$AttendeeTableInsertCompanionBuilder, + $$AttendeeTableUpdateCompanionBuilder> { + $$AttendeeTableProcessedTableManager(super.$state); +} + +class $$AttendeeTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $AttendeeTable> { + $$AttendeeTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get registerId => $state.composableBuilder( + column: $state.table.registerId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get individualId => $state.composableBuilder( + column: $state.table.individualId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get status => $state.composableBuilder( + column: $state.table.status, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get enrollmentDate => $state.composableBuilder( + column: $state.table.enrollmentDate, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get denrollmentDate => $state.composableBuilder( + column: $state.table.denrollmentDate, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$AttendeeTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $AttendeeTable> { + $$AttendeeTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get registerId => $state.composableBuilder( + column: $state.table.registerId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get individualId => $state.composableBuilder( + column: $state.table.individualId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get status => $state.composableBuilder( + column: $state.table.status, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get enrollmentDate => $state.composableBuilder( + column: $state.table.enrollmentDate, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get denrollmentDate => $state.composableBuilder( + column: $state.table.denrollmentDate, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$AddressTableInsertCompanionBuilder = AddressCompanion Function({ + Value id, + Value relatedClientReferenceId, + Value doorNo, + Value latitude, + Value longitude, + Value locationAccuracy, + Value addressLine1, + Value addressLine2, + Value landmark, + Value city, + Value pincode, + Value buildingName, + Value street, + Value boundaryType, + Value boundary, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value localityBoundaryCode, + Value localityBoundaryName, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value type, + Value additionalFields, + Value rowid, +}); +typedef $$AddressTableUpdateCompanionBuilder = AddressCompanion Function({ + Value id, + Value relatedClientReferenceId, + Value doorNo, + Value latitude, + Value longitude, + Value locationAccuracy, + Value addressLine1, + Value addressLine2, + Value landmark, + Value city, + Value pincode, + Value buildingName, + Value street, + Value boundaryType, + Value boundary, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value localityBoundaryCode, + Value localityBoundaryName, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value type, + Value additionalFields, + Value rowid, +}); + +class $$AddressTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $AddressTable, + Addres, + $$AddressTableFilterComposer, + $$AddressTableOrderingComposer, + $$AddressTableProcessedTableManager, + $$AddressTableInsertCompanionBuilder, + $$AddressTableUpdateCompanionBuilder> { + $$AddressTableTableManager(_$LocalSqlDataStore db, $AddressTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$AddressTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$AddressTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => $$AddressTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value relatedClientReferenceId = const Value.absent(), + Value doorNo = const Value.absent(), + Value latitude = const Value.absent(), + Value longitude = const Value.absent(), + Value locationAccuracy = const Value.absent(), + Value addressLine1 = const Value.absent(), + Value addressLine2 = const Value.absent(), + Value landmark = const Value.absent(), + Value city = const Value.absent(), + Value pincode = const Value.absent(), + Value buildingName = const Value.absent(), + Value street = const Value.absent(), + Value boundaryType = const Value.absent(), + Value boundary = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value localityBoundaryCode = const Value.absent(), + Value localityBoundaryName = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value type = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + AddressCompanion( + id: id, + relatedClientReferenceId: relatedClientReferenceId, + doorNo: doorNo, + latitude: latitude, + longitude: longitude, + locationAccuracy: locationAccuracy, + addressLine1: addressLine1, + addressLine2: addressLine2, + landmark: landmark, + city: city, + pincode: pincode, + buildingName: buildingName, + street: street, + boundaryType: boundaryType, + boundary: boundary, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + localityBoundaryCode: localityBoundaryCode, + localityBoundaryName: localityBoundaryName, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + type: type, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value id = const Value.absent(), + Value relatedClientReferenceId = const Value.absent(), + Value doorNo = const Value.absent(), + Value latitude = const Value.absent(), + Value longitude = const Value.absent(), + Value locationAccuracy = const Value.absent(), + Value addressLine1 = const Value.absent(), + Value addressLine2 = const Value.absent(), + Value landmark = const Value.absent(), + Value city = const Value.absent(), + Value pincode = const Value.absent(), + Value buildingName = const Value.absent(), + Value street = const Value.absent(), + Value boundaryType = const Value.absent(), + Value boundary = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value localityBoundaryCode = const Value.absent(), + Value localityBoundaryName = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value type = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + AddressCompanion.insert( + id: id, + relatedClientReferenceId: relatedClientReferenceId, + doorNo: doorNo, + latitude: latitude, + longitude: longitude, + locationAccuracy: locationAccuracy, + addressLine1: addressLine1, + addressLine2: addressLine2, + landmark: landmark, + city: city, + pincode: pincode, + buildingName: buildingName, + street: street, + boundaryType: boundaryType, + boundary: boundary, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + localityBoundaryCode: localityBoundaryCode, + localityBoundaryName: localityBoundaryName, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + type: type, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$AddressTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $AddressTable, + Addres, + $$AddressTableFilterComposer, + $$AddressTableOrderingComposer, + $$AddressTableProcessedTableManager, + $$AddressTableInsertCompanionBuilder, + $$AddressTableUpdateCompanionBuilder> { + $$AddressTableProcessedTableManager(super.$state); +} + +class $$AddressTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $AddressTable> { + $$AddressTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get relatedClientReferenceId => + $state.composableBuilder( + column: $state.table.relatedClientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get doorNo => $state.composableBuilder( + column: $state.table.doorNo, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get latitude => $state.composableBuilder( + column: $state.table.latitude, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get longitude => $state.composableBuilder( + column: $state.table.longitude, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get locationAccuracy => $state.composableBuilder( + column: $state.table.locationAccuracy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get addressLine1 => $state.composableBuilder( + column: $state.table.addressLine1, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get addressLine2 => $state.composableBuilder( + column: $state.table.addressLine2, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get landmark => $state.composableBuilder( + column: $state.table.landmark, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get city => $state.composableBuilder( + column: $state.table.city, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get pincode => $state.composableBuilder( + column: $state.table.pincode, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get buildingName => $state.composableBuilder( + column: $state.table.buildingName, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get street => $state.composableBuilder( + column: $state.table.street, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get boundaryType => $state.composableBuilder( + column: $state.table.boundaryType, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get boundary => $state.composableBuilder( + column: $state.table.boundary, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get localityBoundaryCode => $state.composableBuilder( + column: $state.table.localityBoundaryCode, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get localityBoundaryName => $state.composableBuilder( + column: $state.table.localityBoundaryName, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnWithTypeConverterFilters get type => + $state.composableBuilder( + column: $state.table.type, + builder: (column, joinBuilders) => ColumnWithTypeConverterFilters( + column, + joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$AddressTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $AddressTable> { + $$AddressTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get relatedClientReferenceId => + $state.composableBuilder( + column: $state.table.relatedClientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get doorNo => $state.composableBuilder( + column: $state.table.doorNo, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get latitude => $state.composableBuilder( + column: $state.table.latitude, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get longitude => $state.composableBuilder( + column: $state.table.longitude, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get locationAccuracy => $state.composableBuilder( + column: $state.table.locationAccuracy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get addressLine1 => $state.composableBuilder( + column: $state.table.addressLine1, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get addressLine2 => $state.composableBuilder( + column: $state.table.addressLine2, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get landmark => $state.composableBuilder( + column: $state.table.landmark, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get city => $state.composableBuilder( + column: $state.table.city, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get pincode => $state.composableBuilder( + column: $state.table.pincode, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get buildingName => $state.composableBuilder( + column: $state.table.buildingName, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get street => $state.composableBuilder( + column: $state.table.street, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get boundaryType => $state.composableBuilder( + column: $state.table.boundaryType, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get boundary => $state.composableBuilder( + column: $state.table.boundary, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get localityBoundaryCode => $state.composableBuilder( + column: $state.table.localityBoundaryCode, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get localityBoundaryName => $state.composableBuilder( + column: $state.table.localityBoundaryName, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get type => $state.composableBuilder( + column: $state.table.type, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$NameTableInsertCompanionBuilder = NameCompanion Function({ + Value id, + Value individualClientReferenceId, + Value givenName, + Value familyName, + Value otherNames, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); +typedef $$NameTableUpdateCompanionBuilder = NameCompanion Function({ + Value id, + Value individualClientReferenceId, + Value givenName, + Value familyName, + Value otherNames, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); + +class $$NameTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $NameTable, + NameData, + $$NameTableFilterComposer, + $$NameTableOrderingComposer, + $$NameTableProcessedTableManager, + $$NameTableInsertCompanionBuilder, + $$NameTableUpdateCompanionBuilder> { + $$NameTableTableManager(_$LocalSqlDataStore db, $NameTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$NameTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$NameTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => $$NameTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value individualClientReferenceId = const Value.absent(), + Value givenName = const Value.absent(), + Value familyName = const Value.absent(), + Value otherNames = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + NameCompanion( + id: id, + individualClientReferenceId: individualClientReferenceId, + givenName: givenName, + familyName: familyName, + otherNames: otherNames, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value id = const Value.absent(), + Value individualClientReferenceId = const Value.absent(), + Value givenName = const Value.absent(), + Value familyName = const Value.absent(), + Value otherNames = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + NameCompanion.insert( + id: id, + individualClientReferenceId: individualClientReferenceId, + givenName: givenName, + familyName: familyName, + otherNames: otherNames, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$NameTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $NameTable, + NameData, + $$NameTableFilterComposer, + $$NameTableOrderingComposer, + $$NameTableProcessedTableManager, + $$NameTableInsertCompanionBuilder, + $$NameTableUpdateCompanionBuilder> { + $$NameTableProcessedTableManager(super.$state); +} + +class $$NameTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $NameTable> { + $$NameTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get individualClientReferenceId => $state + .composableBuilder( + column: $state.table.individualClientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get givenName => $state.composableBuilder( + column: $state.table.givenName, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get familyName => $state.composableBuilder( + column: $state.table.familyName, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get otherNames => $state.composableBuilder( + column: $state.table.otherNames, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$NameTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $NameTable> { + $$NameTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get individualClientReferenceId => + $state.composableBuilder( + column: $state.table.individualClientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get givenName => $state.composableBuilder( + column: $state.table.givenName, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get familyName => $state.composableBuilder( + column: $state.table.familyName, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get otherNames => $state.composableBuilder( + column: $state.table.otherNames, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$BoundaryTableInsertCompanionBuilder = BoundaryCompanion Function({ + Value code, + Value name, + Value label, + Value latitude, + Value longitude, + Value materializedPath, + Value auditCreatedBy, + Value boundaryNum, + Value auditCreatedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value rowid, +}); +typedef $$BoundaryTableUpdateCompanionBuilder = BoundaryCompanion Function({ + Value code, + Value name, + Value label, + Value latitude, + Value longitude, + Value materializedPath, + Value auditCreatedBy, + Value boundaryNum, + Value auditCreatedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value rowid, +}); + +class $$BoundaryTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $BoundaryTable, + BoundaryData, + $$BoundaryTableFilterComposer, + $$BoundaryTableOrderingComposer, + $$BoundaryTableProcessedTableManager, + $$BoundaryTableInsertCompanionBuilder, + $$BoundaryTableUpdateCompanionBuilder> { + $$BoundaryTableTableManager(_$LocalSqlDataStore db, $BoundaryTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$BoundaryTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$BoundaryTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$BoundaryTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value code = const Value.absent(), + Value name = const Value.absent(), + Value label = const Value.absent(), + Value latitude = const Value.absent(), + Value longitude = const Value.absent(), + Value materializedPath = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value boundaryNum = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value rowid = const Value.absent(), + }) => + BoundaryCompanion( + code: code, + name: name, + label: label, + latitude: latitude, + longitude: longitude, + materializedPath: materializedPath, + auditCreatedBy: auditCreatedBy, + boundaryNum: boundaryNum, + auditCreatedTime: auditCreatedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value code = const Value.absent(), + Value name = const Value.absent(), + Value label = const Value.absent(), + Value latitude = const Value.absent(), + Value longitude = const Value.absent(), + Value materializedPath = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value boundaryNum = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value rowid = const Value.absent(), + }) => + BoundaryCompanion.insert( + code: code, + name: name, + label: label, + latitude: latitude, + longitude: longitude, + materializedPath: materializedPath, + auditCreatedBy: auditCreatedBy, + boundaryNum: boundaryNum, + auditCreatedTime: auditCreatedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + rowid: rowid, + ), + )); +} + +class $$BoundaryTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $BoundaryTable, + BoundaryData, + $$BoundaryTableFilterComposer, + $$BoundaryTableOrderingComposer, + $$BoundaryTableProcessedTableManager, + $$BoundaryTableInsertCompanionBuilder, + $$BoundaryTableUpdateCompanionBuilder> { + $$BoundaryTableProcessedTableManager(super.$state); +} + +class $$BoundaryTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $BoundaryTable> { + $$BoundaryTableFilterComposer(super.$state); + ColumnFilters get code => $state.composableBuilder( + column: $state.table.code, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get name => $state.composableBuilder( + column: $state.table.name, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get label => $state.composableBuilder( + column: $state.table.label, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get latitude => $state.composableBuilder( + column: $state.table.latitude, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get longitude => $state.composableBuilder( + column: $state.table.longitude, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get materializedPath => $state.composableBuilder( + column: $state.table.materializedPath, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get boundaryNum => $state.composableBuilder( + column: $state.table.boundaryNum, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$BoundaryTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $BoundaryTable> { + $$BoundaryTableOrderingComposer(super.$state); + ColumnOrderings get code => $state.composableBuilder( + column: $state.table.code, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get name => $state.composableBuilder( + column: $state.table.name, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get label => $state.composableBuilder( + column: $state.table.label, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get latitude => $state.composableBuilder( + column: $state.table.latitude, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get longitude => $state.composableBuilder( + column: $state.table.longitude, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get materializedPath => $state.composableBuilder( + column: $state.table.materializedPath, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get boundaryNum => $state.composableBuilder( + column: $state.table.boundaryNum, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$DocumentTableInsertCompanionBuilder = DocumentCompanion Function({ + Value id, + Value documentType, + Value fileStoreId, + Value documentUid, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + required String clientReferenceId, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); +typedef $$DocumentTableUpdateCompanionBuilder = DocumentCompanion Function({ + Value id, + Value documentType, + Value fileStoreId, + Value documentUid, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value clientReferenceId, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); + +class $$DocumentTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $DocumentTable, + DocumentData, + $$DocumentTableFilterComposer, + $$DocumentTableOrderingComposer, + $$DocumentTableProcessedTableManager, + $$DocumentTableInsertCompanionBuilder, + $$DocumentTableUpdateCompanionBuilder> { + $$DocumentTableTableManager(_$LocalSqlDataStore db, $DocumentTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$DocumentTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$DocumentTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$DocumentTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value documentType = const Value.absent(), + Value fileStoreId = const Value.absent(), + Value documentUid = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value clientReferenceId = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + DocumentCompanion( + id: id, + documentType: documentType, + fileStoreId: fileStoreId, + documentUid: documentUid, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value id = const Value.absent(), + Value documentType = const Value.absent(), + Value fileStoreId = const Value.absent(), + Value documentUid = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + required String clientReferenceId, + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + DocumentCompanion.insert( + id: id, + documentType: documentType, + fileStoreId: fileStoreId, + documentUid: documentUid, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$DocumentTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $DocumentTable, + DocumentData, + $$DocumentTableFilterComposer, + $$DocumentTableOrderingComposer, + $$DocumentTableProcessedTableManager, + $$DocumentTableInsertCompanionBuilder, + $$DocumentTableUpdateCompanionBuilder> { + $$DocumentTableProcessedTableManager(super.$state); +} + +class $$DocumentTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $DocumentTable> { + $$DocumentTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get documentType => $state.composableBuilder( + column: $state.table.documentType, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get fileStoreId => $state.composableBuilder( + column: $state.table.fileStoreId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get documentUid => $state.composableBuilder( + column: $state.table.documentUid, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$DocumentTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $DocumentTable> { + $$DocumentTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get documentType => $state.composableBuilder( + column: $state.table.documentType, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get fileStoreId => $state.composableBuilder( + column: $state.table.fileStoreId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get documentUid => $state.composableBuilder( + column: $state.table.documentUid, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$FacilityTableInsertCompanionBuilder = FacilityCompanion Function({ + required String id, + Value isPermanent, + Value usage, + Value storageCapacity, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value name, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); +typedef $$FacilityTableUpdateCompanionBuilder = FacilityCompanion Function({ + Value id, + Value isPermanent, + Value usage, + Value storageCapacity, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value name, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); + +class $$FacilityTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $FacilityTable, + FacilityData, + $$FacilityTableFilterComposer, + $$FacilityTableOrderingComposer, + $$FacilityTableProcessedTableManager, + $$FacilityTableInsertCompanionBuilder, + $$FacilityTableUpdateCompanionBuilder> { + $$FacilityTableTableManager(_$LocalSqlDataStore db, $FacilityTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$FacilityTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$FacilityTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$FacilityTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value isPermanent = const Value.absent(), + Value usage = const Value.absent(), + Value storageCapacity = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value name = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + FacilityCompanion( + id: id, + isPermanent: isPermanent, + usage: usage, + storageCapacity: storageCapacity, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + name: name, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + required String id, + Value isPermanent = const Value.absent(), + Value usage = const Value.absent(), + Value storageCapacity = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value name = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + FacilityCompanion.insert( + id: id, + isPermanent: isPermanent, + usage: usage, + storageCapacity: storageCapacity, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + name: name, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$FacilityTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $FacilityTable, + FacilityData, + $$FacilityTableFilterComposer, + $$FacilityTableOrderingComposer, + $$FacilityTableProcessedTableManager, + $$FacilityTableInsertCompanionBuilder, + $$FacilityTableUpdateCompanionBuilder> { + $$FacilityTableProcessedTableManager(super.$state); +} + +class $$FacilityTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $FacilityTable> { + $$FacilityTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isPermanent => $state.composableBuilder( + column: $state.table.isPermanent, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get usage => $state.composableBuilder( + column: $state.table.usage, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get storageCapacity => $state.composableBuilder( + column: $state.table.storageCapacity, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get name => $state.composableBuilder( + column: $state.table.name, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$FacilityTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $FacilityTable> { + $$FacilityTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isPermanent => $state.composableBuilder( + column: $state.table.isPermanent, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get usage => $state.composableBuilder( + column: $state.table.usage, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get storageCapacity => $state.composableBuilder( + column: $state.table.storageCapacity, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get name => $state.composableBuilder( + column: $state.table.name, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$ProductTableInsertCompanionBuilder = ProductCompanion Function({ + Value id, + Value type, + Value name, + Value manufacturer, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + required String clientReferenceId, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); +typedef $$ProductTableUpdateCompanionBuilder = ProductCompanion Function({ + Value id, + Value type, + Value name, + Value manufacturer, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value clientReferenceId, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); + +class $$ProductTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $ProductTable, + ProductData, + $$ProductTableFilterComposer, + $$ProductTableOrderingComposer, + $$ProductTableProcessedTableManager, + $$ProductTableInsertCompanionBuilder, + $$ProductTableUpdateCompanionBuilder> { + $$ProductTableTableManager(_$LocalSqlDataStore db, $ProductTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$ProductTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$ProductTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => $$ProductTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value type = const Value.absent(), + Value name = const Value.absent(), + Value manufacturer = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value clientReferenceId = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + ProductCompanion( + id: id, + type: type, + name: name, + manufacturer: manufacturer, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value id = const Value.absent(), + Value type = const Value.absent(), + Value name = const Value.absent(), + Value manufacturer = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + required String clientReferenceId, + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + ProductCompanion.insert( + id: id, + type: type, + name: name, + manufacturer: manufacturer, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$ProductTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $ProductTable, + ProductData, + $$ProductTableFilterComposer, + $$ProductTableOrderingComposer, + $$ProductTableProcessedTableManager, + $$ProductTableInsertCompanionBuilder, + $$ProductTableUpdateCompanionBuilder> { + $$ProductTableProcessedTableManager(super.$state); +} + +class $$ProductTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $ProductTable> { + $$ProductTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get type => $state.composableBuilder( + column: $state.table.type, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get name => $state.composableBuilder( + column: $state.table.name, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get manufacturer => $state.composableBuilder( + column: $state.table.manufacturer, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$ProductTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $ProductTable> { + $$ProductTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get type => $state.composableBuilder( + column: $state.table.type, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get name => $state.composableBuilder( + column: $state.table.name, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get manufacturer => $state.composableBuilder( + column: $state.table.manufacturer, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$ProductVariantTableInsertCompanionBuilder = ProductVariantCompanion + Function({ + required String id, + Value productId, + Value sku, + Value variation, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); +typedef $$ProductVariantTableUpdateCompanionBuilder = ProductVariantCompanion + Function({ + Value id, + Value productId, + Value sku, + Value variation, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); + +class $$ProductVariantTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $ProductVariantTable, + ProductVariantData, + $$ProductVariantTableFilterComposer, + $$ProductVariantTableOrderingComposer, + $$ProductVariantTableProcessedTableManager, + $$ProductVariantTableInsertCompanionBuilder, + $$ProductVariantTableUpdateCompanionBuilder> { + $$ProductVariantTableTableManager( + _$LocalSqlDataStore db, $ProductVariantTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$ProductVariantTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$ProductVariantTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$ProductVariantTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value productId = const Value.absent(), + Value sku = const Value.absent(), + Value variation = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + ProductVariantCompanion( + id: id, + productId: productId, + sku: sku, + variation: variation, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + required String id, + Value productId = const Value.absent(), + Value sku = const Value.absent(), + Value variation = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + ProductVariantCompanion.insert( + id: id, + productId: productId, + sku: sku, + variation: variation, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$ProductVariantTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $ProductVariantTable, + ProductVariantData, + $$ProductVariantTableFilterComposer, + $$ProductVariantTableOrderingComposer, + $$ProductVariantTableProcessedTableManager, + $$ProductVariantTableInsertCompanionBuilder, + $$ProductVariantTableUpdateCompanionBuilder> { + $$ProductVariantTableProcessedTableManager(super.$state); +} + +class $$ProductVariantTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $ProductVariantTable> { + $$ProductVariantTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get productId => $state.composableBuilder( + column: $state.table.productId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get sku => $state.composableBuilder( + column: $state.table.sku, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get variation => $state.composableBuilder( + column: $state.table.variation, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$ProductVariantTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $ProductVariantTable> { + $$ProductVariantTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get productId => $state.composableBuilder( + column: $state.table.productId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get sku => $state.composableBuilder( + column: $state.table.sku, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get variation => $state.composableBuilder( + column: $state.table.variation, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$ProjectTableInsertCompanionBuilder = ProjectCompanion Function({ + Value projectType, + required String id, + Value projectTypeId, + Value projectNumber, + Value subProjectTypeId, + Value isTaskEnabled, + Value parent, + required String name, + Value department, + Value description, + Value referenceId, + Value projectHierarchy, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value startDate, + Value endDate, + Value additionalFields, + Value rowid, +}); +typedef $$ProjectTableUpdateCompanionBuilder = ProjectCompanion Function({ + Value projectType, + Value id, + Value projectTypeId, + Value projectNumber, + Value subProjectTypeId, + Value isTaskEnabled, + Value parent, + Value name, + Value department, + Value description, + Value referenceId, + Value projectHierarchy, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value startDate, + Value endDate, + Value additionalFields, + Value rowid, +}); + +class $$ProjectTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $ProjectTable, + ProjectData, + $$ProjectTableFilterComposer, + $$ProjectTableOrderingComposer, + $$ProjectTableProcessedTableManager, + $$ProjectTableInsertCompanionBuilder, + $$ProjectTableUpdateCompanionBuilder> { + $$ProjectTableTableManager(_$LocalSqlDataStore db, $ProjectTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$ProjectTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$ProjectTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => $$ProjectTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value projectType = const Value.absent(), + Value id = const Value.absent(), + Value projectTypeId = const Value.absent(), + Value projectNumber = const Value.absent(), + Value subProjectTypeId = const Value.absent(), + Value isTaskEnabled = const Value.absent(), + Value parent = const Value.absent(), + Value name = const Value.absent(), + Value department = const Value.absent(), + Value description = const Value.absent(), + Value referenceId = const Value.absent(), + Value projectHierarchy = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value startDate = const Value.absent(), + Value endDate = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + ProjectCompanion( + projectType: projectType, + id: id, + projectTypeId: projectTypeId, + projectNumber: projectNumber, + subProjectTypeId: subProjectTypeId, + isTaskEnabled: isTaskEnabled, + parent: parent, + name: name, + department: department, + description: description, + referenceId: referenceId, + projectHierarchy: projectHierarchy, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + startDate: startDate, + endDate: endDate, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value projectType = const Value.absent(), + required String id, + Value projectTypeId = const Value.absent(), + Value projectNumber = const Value.absent(), + Value subProjectTypeId = const Value.absent(), + Value isTaskEnabled = const Value.absent(), + Value parent = const Value.absent(), + required String name, + Value department = const Value.absent(), + Value description = const Value.absent(), + Value referenceId = const Value.absent(), + Value projectHierarchy = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value startDate = const Value.absent(), + Value endDate = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + ProjectCompanion.insert( + projectType: projectType, + id: id, + projectTypeId: projectTypeId, + projectNumber: projectNumber, + subProjectTypeId: subProjectTypeId, + isTaskEnabled: isTaskEnabled, + parent: parent, + name: name, + department: department, + description: description, + referenceId: referenceId, + projectHierarchy: projectHierarchy, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + startDate: startDate, + endDate: endDate, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$ProjectTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $ProjectTable, + ProjectData, + $$ProjectTableFilterComposer, + $$ProjectTableOrderingComposer, + $$ProjectTableProcessedTableManager, + $$ProjectTableInsertCompanionBuilder, + $$ProjectTableUpdateCompanionBuilder> { + $$ProjectTableProcessedTableManager(super.$state); +} + +class $$ProjectTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $ProjectTable> { + $$ProjectTableFilterComposer(super.$state); + ColumnFilters get projectType => $state.composableBuilder( + column: $state.table.projectType, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get projectTypeId => $state.composableBuilder( + column: $state.table.projectTypeId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get projectNumber => $state.composableBuilder( + column: $state.table.projectNumber, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get subProjectTypeId => $state.composableBuilder( + column: $state.table.subProjectTypeId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isTaskEnabled => $state.composableBuilder( + column: $state.table.isTaskEnabled, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get parent => $state.composableBuilder( + column: $state.table.parent, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get name => $state.composableBuilder( + column: $state.table.name, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get department => $state.composableBuilder( + column: $state.table.department, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get description => $state.composableBuilder( + column: $state.table.description, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get referenceId => $state.composableBuilder( + column: $state.table.referenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get projectHierarchy => $state.composableBuilder( + column: $state.table.projectHierarchy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get startDate => $state.composableBuilder( + column: $state.table.startDate, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get endDate => $state.composableBuilder( + column: $state.table.endDate, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$ProjectTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $ProjectTable> { + $$ProjectTableOrderingComposer(super.$state); + ColumnOrderings get projectType => $state.composableBuilder( + column: $state.table.projectType, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get projectTypeId => $state.composableBuilder( + column: $state.table.projectTypeId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get projectNumber => $state.composableBuilder( + column: $state.table.projectNumber, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get subProjectTypeId => $state.composableBuilder( + column: $state.table.subProjectTypeId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isTaskEnabled => $state.composableBuilder( + column: $state.table.isTaskEnabled, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get parent => $state.composableBuilder( + column: $state.table.parent, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get name => $state.composableBuilder( + column: $state.table.name, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get department => $state.composableBuilder( + column: $state.table.department, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get description => $state.composableBuilder( + column: $state.table.description, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get referenceId => $state.composableBuilder( + column: $state.table.referenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get projectHierarchy => $state.composableBuilder( + column: $state.table.projectHierarchy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get startDate => $state.composableBuilder( + column: $state.table.startDate, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get endDate => $state.composableBuilder( + column: $state.table.endDate, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$ProjectBeneficiaryTableInsertCompanionBuilder + = ProjectBeneficiaryCompanion Function({ + Value id, + Value projectId, + Value beneficiaryId, + Value tag, + Value beneficiaryClientReferenceId, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + required String clientReferenceId, + Value tenantId, + Value isDeleted, + Value rowVersion, + required int dateOfRegistration, + Value additionalFields, + Value rowid, +}); +typedef $$ProjectBeneficiaryTableUpdateCompanionBuilder + = ProjectBeneficiaryCompanion Function({ + Value id, + Value projectId, + Value beneficiaryId, + Value tag, + Value beneficiaryClientReferenceId, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value clientReferenceId, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value dateOfRegistration, + Value additionalFields, + Value rowid, +}); + +class $$ProjectBeneficiaryTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $ProjectBeneficiaryTable, + ProjectBeneficiaryData, + $$ProjectBeneficiaryTableFilterComposer, + $$ProjectBeneficiaryTableOrderingComposer, + $$ProjectBeneficiaryTableProcessedTableManager, + $$ProjectBeneficiaryTableInsertCompanionBuilder, + $$ProjectBeneficiaryTableUpdateCompanionBuilder> { + $$ProjectBeneficiaryTableTableManager( + _$LocalSqlDataStore db, $ProjectBeneficiaryTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$ProjectBeneficiaryTableFilterComposer(ComposerState(db, table)), + orderingComposer: $$ProjectBeneficiaryTableOrderingComposer( + ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$ProjectBeneficiaryTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value projectId = const Value.absent(), + Value beneficiaryId = const Value.absent(), + Value tag = const Value.absent(), + Value beneficiaryClientReferenceId = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value clientReferenceId = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value dateOfRegistration = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + ProjectBeneficiaryCompanion( + id: id, + projectId: projectId, + beneficiaryId: beneficiaryId, + tag: tag, + beneficiaryClientReferenceId: beneficiaryClientReferenceId, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + dateOfRegistration: dateOfRegistration, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value id = const Value.absent(), + Value projectId = const Value.absent(), + Value beneficiaryId = const Value.absent(), + Value tag = const Value.absent(), + Value beneficiaryClientReferenceId = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + required String clientReferenceId, + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + required int dateOfRegistration, + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + ProjectBeneficiaryCompanion.insert( + id: id, + projectId: projectId, + beneficiaryId: beneficiaryId, + tag: tag, + beneficiaryClientReferenceId: beneficiaryClientReferenceId, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + dateOfRegistration: dateOfRegistration, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$ProjectBeneficiaryTableProcessedTableManager + extends ProcessedTableManager< + _$LocalSqlDataStore, + $ProjectBeneficiaryTable, + ProjectBeneficiaryData, + $$ProjectBeneficiaryTableFilterComposer, + $$ProjectBeneficiaryTableOrderingComposer, + $$ProjectBeneficiaryTableProcessedTableManager, + $$ProjectBeneficiaryTableInsertCompanionBuilder, + $$ProjectBeneficiaryTableUpdateCompanionBuilder> { + $$ProjectBeneficiaryTableProcessedTableManager(super.$state); +} + +class $$ProjectBeneficiaryTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $ProjectBeneficiaryTable> { + $$ProjectBeneficiaryTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get projectId => $state.composableBuilder( + column: $state.table.projectId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get beneficiaryId => $state.composableBuilder( + column: $state.table.beneficiaryId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tag => $state.composableBuilder( + column: $state.table.tag, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get beneficiaryClientReferenceId => + $state.composableBuilder( + column: $state.table.beneficiaryClientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get dateOfRegistration => $state.composableBuilder( + column: $state.table.dateOfRegistration, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$ProjectBeneficiaryTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $ProjectBeneficiaryTable> { + $$ProjectBeneficiaryTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get projectId => $state.composableBuilder( + column: $state.table.projectId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get beneficiaryId => $state.composableBuilder( + column: $state.table.beneficiaryId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tag => $state.composableBuilder( + column: $state.table.tag, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get beneficiaryClientReferenceId => + $state.composableBuilder( + column: $state.table.beneficiaryClientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get dateOfRegistration => $state.composableBuilder( + column: $state.table.dateOfRegistration, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$ProjectFacilityTableInsertCompanionBuilder = ProjectFacilityCompanion + Function({ + required String id, + required String facilityId, + required String projectId, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); +typedef $$ProjectFacilityTableUpdateCompanionBuilder = ProjectFacilityCompanion + Function({ + Value id, + Value facilityId, + Value projectId, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); + +class $$ProjectFacilityTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $ProjectFacilityTable, + ProjectFacilityData, + $$ProjectFacilityTableFilterComposer, + $$ProjectFacilityTableOrderingComposer, + $$ProjectFacilityTableProcessedTableManager, + $$ProjectFacilityTableInsertCompanionBuilder, + $$ProjectFacilityTableUpdateCompanionBuilder> { + $$ProjectFacilityTableTableManager( + _$LocalSqlDataStore db, $ProjectFacilityTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$ProjectFacilityTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$ProjectFacilityTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$ProjectFacilityTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value facilityId = const Value.absent(), + Value projectId = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + ProjectFacilityCompanion( + id: id, + facilityId: facilityId, + projectId: projectId, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + required String id, + required String facilityId, + required String projectId, + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + ProjectFacilityCompanion.insert( + id: id, + facilityId: facilityId, + projectId: projectId, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$ProjectFacilityTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $ProjectFacilityTable, + ProjectFacilityData, + $$ProjectFacilityTableFilterComposer, + $$ProjectFacilityTableOrderingComposer, + $$ProjectFacilityTableProcessedTableManager, + $$ProjectFacilityTableInsertCompanionBuilder, + $$ProjectFacilityTableUpdateCompanionBuilder> { + $$ProjectFacilityTableProcessedTableManager(super.$state); +} + +class $$ProjectFacilityTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $ProjectFacilityTable> { + $$ProjectFacilityTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get facilityId => $state.composableBuilder( + column: $state.table.facilityId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get projectId => $state.composableBuilder( + column: $state.table.projectId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$ProjectFacilityTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $ProjectFacilityTable> { + $$ProjectFacilityTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get facilityId => $state.composableBuilder( + column: $state.table.facilityId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get projectId => $state.composableBuilder( + column: $state.table.projectId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$ProjectProductVariantTableInsertCompanionBuilder + = ProjectProductVariantCompanion Function({ + required String productVariantId, + Value type, + Value isBaseUnitVariant, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); +typedef $$ProjectProductVariantTableUpdateCompanionBuilder + = ProjectProductVariantCompanion Function({ + Value productVariantId, + Value type, + Value isBaseUnitVariant, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); + +class $$ProjectProductVariantTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $ProjectProductVariantTable, + ProjectProductVariantData, + $$ProjectProductVariantTableFilterComposer, + $$ProjectProductVariantTableOrderingComposer, + $$ProjectProductVariantTableProcessedTableManager, + $$ProjectProductVariantTableInsertCompanionBuilder, + $$ProjectProductVariantTableUpdateCompanionBuilder> { + $$ProjectProductVariantTableTableManager( + _$LocalSqlDataStore db, $ProjectProductVariantTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: $$ProjectProductVariantTableFilterComposer( + ComposerState(db, table)), + orderingComposer: $$ProjectProductVariantTableOrderingComposer( + ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$ProjectProductVariantTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value productVariantId = const Value.absent(), + Value type = const Value.absent(), + Value isBaseUnitVariant = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + ProjectProductVariantCompanion( + productVariantId: productVariantId, + type: type, + isBaseUnitVariant: isBaseUnitVariant, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + required String productVariantId, + Value type = const Value.absent(), + Value isBaseUnitVariant = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + ProjectProductVariantCompanion.insert( + productVariantId: productVariantId, + type: type, + isBaseUnitVariant: isBaseUnitVariant, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$ProjectProductVariantTableProcessedTableManager + extends ProcessedTableManager< + _$LocalSqlDataStore, + $ProjectProductVariantTable, + ProjectProductVariantData, + $$ProjectProductVariantTableFilterComposer, + $$ProjectProductVariantTableOrderingComposer, + $$ProjectProductVariantTableProcessedTableManager, + $$ProjectProductVariantTableInsertCompanionBuilder, + $$ProjectProductVariantTableUpdateCompanionBuilder> { + $$ProjectProductVariantTableProcessedTableManager(super.$state); +} + +class $$ProjectProductVariantTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $ProjectProductVariantTable> { + $$ProjectProductVariantTableFilterComposer(super.$state); + ColumnFilters get productVariantId => $state.composableBuilder( + column: $state.table.productVariantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get type => $state.composableBuilder( + column: $state.table.type, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isBaseUnitVariant => $state.composableBuilder( + column: $state.table.isBaseUnitVariant, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ComposableFilter projectResourceRefs( + ComposableFilter Function($$ProjectResourceTableFilterComposer f) f) { + final $$ProjectResourceTableFilterComposer composer = + $state.composerBuilder( + composer: this, + getCurrentColumn: (t) => t.productVariantId, + referencedTable: $state.db.projectResource, + getReferencedColumn: (t) => t.resource, + builder: (joinBuilder, parentComposers) => + $$ProjectResourceTableFilterComposer(ComposerState($state.db, + $state.db.projectResource, joinBuilder, parentComposers))); + return f(composer); + } +} + +class $$ProjectProductVariantTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $ProjectProductVariantTable> { + $$ProjectProductVariantTableOrderingComposer(super.$state); + ColumnOrderings get productVariantId => $state.composableBuilder( + column: $state.table.productVariantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get type => $state.composableBuilder( + column: $state.table.type, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isBaseUnitVariant => $state.composableBuilder( + column: $state.table.isBaseUnitVariant, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$ProjectResourceTableInsertCompanionBuilder = ProjectResourceCompanion + Function({ + Value id, + Value projectId, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value isDeleted, + Value rowVersion, + required String resource, + Value additionalFields, + Value rowid, +}); +typedef $$ProjectResourceTableUpdateCompanionBuilder = ProjectResourceCompanion + Function({ + Value id, + Value projectId, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value resource, + Value additionalFields, + Value rowid, +}); + +class $$ProjectResourceTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $ProjectResourceTable, + ProjectResourceData, + $$ProjectResourceTableFilterComposer, + $$ProjectResourceTableOrderingComposer, + $$ProjectResourceTableProcessedTableManager, + $$ProjectResourceTableInsertCompanionBuilder, + $$ProjectResourceTableUpdateCompanionBuilder> { + $$ProjectResourceTableTableManager( + _$LocalSqlDataStore db, $ProjectResourceTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$ProjectResourceTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$ProjectResourceTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$ProjectResourceTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value projectId = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value resource = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + ProjectResourceCompanion( + id: id, + projectId: projectId, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + resource: resource, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value id = const Value.absent(), + Value projectId = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + required String resource, + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + ProjectResourceCompanion.insert( + id: id, + projectId: projectId, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + resource: resource, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$ProjectResourceTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $ProjectResourceTable, + ProjectResourceData, + $$ProjectResourceTableFilterComposer, + $$ProjectResourceTableOrderingComposer, + $$ProjectResourceTableProcessedTableManager, + $$ProjectResourceTableInsertCompanionBuilder, + $$ProjectResourceTableUpdateCompanionBuilder> { + $$ProjectResourceTableProcessedTableManager(super.$state); +} + +class $$ProjectResourceTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $ProjectResourceTable> { + $$ProjectResourceTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get projectId => $state.composableBuilder( + column: $state.table.projectId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + $$ProjectProductVariantTableFilterComposer get resource { + final $$ProjectProductVariantTableFilterComposer composer = + $state.composerBuilder( + composer: this, + getCurrentColumn: (t) => t.resource, + referencedTable: $state.db.projectProductVariant, + getReferencedColumn: (t) => t.productVariantId, + builder: (joinBuilder, parentComposers) => + $$ProjectProductVariantTableFilterComposer(ComposerState( + $state.db, + $state.db.projectProductVariant, + joinBuilder, + parentComposers))); + return composer; + } +} + +class $$ProjectResourceTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $ProjectResourceTable> { + $$ProjectResourceTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get projectId => $state.composableBuilder( + column: $state.table.projectId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + $$ProjectProductVariantTableOrderingComposer get resource { + final $$ProjectProductVariantTableOrderingComposer composer = + $state.composerBuilder( + composer: this, + getCurrentColumn: (t) => t.resource, + referencedTable: $state.db.projectProductVariant, + getReferencedColumn: (t) => t.productVariantId, + builder: (joinBuilder, parentComposers) => + $$ProjectProductVariantTableOrderingComposer(ComposerState( + $state.db, + $state.db.projectProductVariant, + joinBuilder, + parentComposers))); + return composer; + } +} + +typedef $$ProjectStaffTableInsertCompanionBuilder = ProjectStaffCompanion + Function({ + required String id, + Value staffId, + Value userId, + Value projectId, + Value channel, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value startDate, + Value endDate, + Value additionalFields, + Value rowid, +}); +typedef $$ProjectStaffTableUpdateCompanionBuilder = ProjectStaffCompanion + Function({ + Value id, + Value staffId, + Value userId, + Value projectId, + Value channel, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value startDate, + Value endDate, + Value additionalFields, + Value rowid, +}); + +class $$ProjectStaffTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $ProjectStaffTable, + ProjectStaffData, + $$ProjectStaffTableFilterComposer, + $$ProjectStaffTableOrderingComposer, + $$ProjectStaffTableProcessedTableManager, + $$ProjectStaffTableInsertCompanionBuilder, + $$ProjectStaffTableUpdateCompanionBuilder> { + $$ProjectStaffTableTableManager( + _$LocalSqlDataStore db, $ProjectStaffTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$ProjectStaffTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$ProjectStaffTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$ProjectStaffTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value staffId = const Value.absent(), + Value userId = const Value.absent(), + Value projectId = const Value.absent(), + Value channel = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value startDate = const Value.absent(), + Value endDate = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + ProjectStaffCompanion( + id: id, + staffId: staffId, + userId: userId, + projectId: projectId, + channel: channel, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + startDate: startDate, + endDate: endDate, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + required String id, + Value staffId = const Value.absent(), + Value userId = const Value.absent(), + Value projectId = const Value.absent(), + Value channel = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value startDate = const Value.absent(), + Value endDate = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + ProjectStaffCompanion.insert( + id: id, + staffId: staffId, + userId: userId, + projectId: projectId, + channel: channel, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + startDate: startDate, + endDate: endDate, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$ProjectStaffTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $ProjectStaffTable, + ProjectStaffData, + $$ProjectStaffTableFilterComposer, + $$ProjectStaffTableOrderingComposer, + $$ProjectStaffTableProcessedTableManager, + $$ProjectStaffTableInsertCompanionBuilder, + $$ProjectStaffTableUpdateCompanionBuilder> { + $$ProjectStaffTableProcessedTableManager(super.$state); +} + +class $$ProjectStaffTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $ProjectStaffTable> { + $$ProjectStaffTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get staffId => $state.composableBuilder( + column: $state.table.staffId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get userId => $state.composableBuilder( + column: $state.table.userId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get projectId => $state.composableBuilder( + column: $state.table.projectId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get channel => $state.composableBuilder( + column: $state.table.channel, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get startDate => $state.composableBuilder( + column: $state.table.startDate, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get endDate => $state.composableBuilder( + column: $state.table.endDate, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$ProjectStaffTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $ProjectStaffTable> { + $$ProjectStaffTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get staffId => $state.composableBuilder( + column: $state.table.staffId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get userId => $state.composableBuilder( + column: $state.table.userId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get projectId => $state.composableBuilder( + column: $state.table.projectId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get channel => $state.composableBuilder( + column: $state.table.channel, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get startDate => $state.composableBuilder( + column: $state.table.startDate, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get endDate => $state.composableBuilder( + column: $state.table.endDate, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$ProjectTypeTableInsertCompanionBuilder = ProjectTypeCompanion + Function({ + Value id, + Value name, + Value code, + Value group, + Value beneficiaryType, + Value eligibilityCriteria, + Value taskProcedure, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + required String clientReferenceId, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); +typedef $$ProjectTypeTableUpdateCompanionBuilder = ProjectTypeCompanion + Function({ + Value id, + Value name, + Value code, + Value group, + Value beneficiaryType, + Value eligibilityCriteria, + Value taskProcedure, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value clientReferenceId, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); + +class $$ProjectTypeTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $ProjectTypeTable, + ProjectTypeData, + $$ProjectTypeTableFilterComposer, + $$ProjectTypeTableOrderingComposer, + $$ProjectTypeTableProcessedTableManager, + $$ProjectTypeTableInsertCompanionBuilder, + $$ProjectTypeTableUpdateCompanionBuilder> { + $$ProjectTypeTableTableManager( + _$LocalSqlDataStore db, $ProjectTypeTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$ProjectTypeTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$ProjectTypeTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$ProjectTypeTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value name = const Value.absent(), + Value code = const Value.absent(), + Value group = const Value.absent(), + Value beneficiaryType = const Value.absent(), + Value eligibilityCriteria = const Value.absent(), + Value taskProcedure = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value clientReferenceId = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + ProjectTypeCompanion( + id: id, + name: name, + code: code, + group: group, + beneficiaryType: beneficiaryType, + eligibilityCriteria: eligibilityCriteria, + taskProcedure: taskProcedure, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value id = const Value.absent(), + Value name = const Value.absent(), + Value code = const Value.absent(), + Value group = const Value.absent(), + Value beneficiaryType = const Value.absent(), + Value eligibilityCriteria = const Value.absent(), + Value taskProcedure = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + required String clientReferenceId, + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + ProjectTypeCompanion.insert( + id: id, + name: name, + code: code, + group: group, + beneficiaryType: beneficiaryType, + eligibilityCriteria: eligibilityCriteria, + taskProcedure: taskProcedure, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$ProjectTypeTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $ProjectTypeTable, + ProjectTypeData, + $$ProjectTypeTableFilterComposer, + $$ProjectTypeTableOrderingComposer, + $$ProjectTypeTableProcessedTableManager, + $$ProjectTypeTableInsertCompanionBuilder, + $$ProjectTypeTableUpdateCompanionBuilder> { + $$ProjectTypeTableProcessedTableManager(super.$state); +} + +class $$ProjectTypeTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $ProjectTypeTable> { + $$ProjectTypeTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get name => $state.composableBuilder( + column: $state.table.name, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get code => $state.composableBuilder( + column: $state.table.code, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get group => $state.composableBuilder( + column: $state.table.group, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnWithTypeConverterFilters + get beneficiaryType => $state.composableBuilder( + column: $state.table.beneficiaryType, + builder: (column, joinBuilders) => ColumnWithTypeConverterFilters( + column, + joinBuilders: joinBuilders)); + + ColumnFilters get eligibilityCriteria => $state.composableBuilder( + column: $state.table.eligibilityCriteria, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get taskProcedure => $state.composableBuilder( + column: $state.table.taskProcedure, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$ProjectTypeTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $ProjectTypeTable> { + $$ProjectTypeTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get name => $state.composableBuilder( + column: $state.table.name, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get code => $state.composableBuilder( + column: $state.table.code, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get group => $state.composableBuilder( + column: $state.table.group, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get beneficiaryType => $state.composableBuilder( + column: $state.table.beneficiaryType, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get eligibilityCriteria => $state.composableBuilder( + column: $state.table.eligibilityCriteria, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get taskProcedure => $state.composableBuilder( + column: $state.table.taskProcedure, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$IndividualTableInsertCompanionBuilder = IndividualCompanion Function({ + Value id, + Value individualId, + Value userId, + Value userUuid, + Value dateOfBirth, + Value mobileNumber, + Value altContactNumber, + Value email, + Value fatherName, + Value husbandName, + Value photo, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + required String clientReferenceId, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value bloodGroup, + Value gender, + Value additionalFields, + Value rowid, +}); +typedef $$IndividualTableUpdateCompanionBuilder = IndividualCompanion Function({ + Value id, + Value individualId, + Value userId, + Value userUuid, + Value dateOfBirth, + Value mobileNumber, + Value altContactNumber, + Value email, + Value fatherName, + Value husbandName, + Value photo, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value clientReferenceId, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value bloodGroup, + Value gender, + Value additionalFields, + Value rowid, +}); + +class $$IndividualTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $IndividualTable, + IndividualData, + $$IndividualTableFilterComposer, + $$IndividualTableOrderingComposer, + $$IndividualTableProcessedTableManager, + $$IndividualTableInsertCompanionBuilder, + $$IndividualTableUpdateCompanionBuilder> { + $$IndividualTableTableManager(_$LocalSqlDataStore db, $IndividualTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$IndividualTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$IndividualTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$IndividualTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value individualId = const Value.absent(), + Value userId = const Value.absent(), + Value userUuid = const Value.absent(), + Value dateOfBirth = const Value.absent(), + Value mobileNumber = const Value.absent(), + Value altContactNumber = const Value.absent(), + Value email = const Value.absent(), + Value fatherName = const Value.absent(), + Value husbandName = const Value.absent(), + Value photo = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value clientReferenceId = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value bloodGroup = const Value.absent(), + Value gender = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + IndividualCompanion( + id: id, + individualId: individualId, + userId: userId, + userUuid: userUuid, + dateOfBirth: dateOfBirth, + mobileNumber: mobileNumber, + altContactNumber: altContactNumber, + email: email, + fatherName: fatherName, + husbandName: husbandName, + photo: photo, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + bloodGroup: bloodGroup, + gender: gender, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value id = const Value.absent(), + Value individualId = const Value.absent(), + Value userId = const Value.absent(), + Value userUuid = const Value.absent(), + Value dateOfBirth = const Value.absent(), + Value mobileNumber = const Value.absent(), + Value altContactNumber = const Value.absent(), + Value email = const Value.absent(), + Value fatherName = const Value.absent(), + Value husbandName = const Value.absent(), + Value photo = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + required String clientReferenceId, + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value bloodGroup = const Value.absent(), + Value gender = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + IndividualCompanion.insert( + id: id, + individualId: individualId, + userId: userId, + userUuid: userUuid, + dateOfBirth: dateOfBirth, + mobileNumber: mobileNumber, + altContactNumber: altContactNumber, + email: email, + fatherName: fatherName, + husbandName: husbandName, + photo: photo, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + bloodGroup: bloodGroup, + gender: gender, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$IndividualTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $IndividualTable, + IndividualData, + $$IndividualTableFilterComposer, + $$IndividualTableOrderingComposer, + $$IndividualTableProcessedTableManager, + $$IndividualTableInsertCompanionBuilder, + $$IndividualTableUpdateCompanionBuilder> { + $$IndividualTableProcessedTableManager(super.$state); +} + +class $$IndividualTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $IndividualTable> { + $$IndividualTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get individualId => $state.composableBuilder( + column: $state.table.individualId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get userId => $state.composableBuilder( + column: $state.table.userId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get userUuid => $state.composableBuilder( + column: $state.table.userUuid, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get dateOfBirth => $state.composableBuilder( + column: $state.table.dateOfBirth, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get mobileNumber => $state.composableBuilder( + column: $state.table.mobileNumber, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get altContactNumber => $state.composableBuilder( + column: $state.table.altContactNumber, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get email => $state.composableBuilder( + column: $state.table.email, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get fatherName => $state.composableBuilder( + column: $state.table.fatherName, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get husbandName => $state.composableBuilder( + column: $state.table.husbandName, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get photo => $state.composableBuilder( + column: $state.table.photo, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnWithTypeConverterFilters get bloodGroup => + $state.composableBuilder( + column: $state.table.bloodGroup, + builder: (column, joinBuilders) => ColumnWithTypeConverterFilters( + column, + joinBuilders: joinBuilders)); + + ColumnWithTypeConverterFilters get gender => + $state.composableBuilder( + column: $state.table.gender, + builder: (column, joinBuilders) => ColumnWithTypeConverterFilters( + column, + joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$IndividualTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $IndividualTable> { + $$IndividualTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get individualId => $state.composableBuilder( + column: $state.table.individualId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get userId => $state.composableBuilder( + column: $state.table.userId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get userUuid => $state.composableBuilder( + column: $state.table.userUuid, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get dateOfBirth => $state.composableBuilder( + column: $state.table.dateOfBirth, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get mobileNumber => $state.composableBuilder( + column: $state.table.mobileNumber, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get altContactNumber => $state.composableBuilder( + column: $state.table.altContactNumber, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get email => $state.composableBuilder( + column: $state.table.email, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get fatherName => $state.composableBuilder( + column: $state.table.fatherName, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get husbandName => $state.composableBuilder( + column: $state.table.husbandName, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get photo => $state.composableBuilder( + column: $state.table.photo, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get bloodGroup => $state.composableBuilder( + column: $state.table.bloodGroup, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get gender => $state.composableBuilder( + column: $state.table.gender, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$IdentifierTableInsertCompanionBuilder = IdentifierCompanion Function({ + Value id, + Value identifierType, + Value identifierId, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + required String clientReferenceId, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); +typedef $$IdentifierTableUpdateCompanionBuilder = IdentifierCompanion Function({ + Value id, + Value identifierType, + Value identifierId, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value clientReferenceId, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); + +class $$IdentifierTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $IdentifierTable, + IdentifierData, + $$IdentifierTableFilterComposer, + $$IdentifierTableOrderingComposer, + $$IdentifierTableProcessedTableManager, + $$IdentifierTableInsertCompanionBuilder, + $$IdentifierTableUpdateCompanionBuilder> { + $$IdentifierTableTableManager(_$LocalSqlDataStore db, $IdentifierTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$IdentifierTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$IdentifierTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$IdentifierTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value identifierType = const Value.absent(), + Value identifierId = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value clientReferenceId = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + IdentifierCompanion( + id: id, + identifierType: identifierType, + identifierId: identifierId, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value id = const Value.absent(), + Value identifierType = const Value.absent(), + Value identifierId = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + required String clientReferenceId, + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + IdentifierCompanion.insert( + id: id, + identifierType: identifierType, + identifierId: identifierId, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$IdentifierTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $IdentifierTable, + IdentifierData, + $$IdentifierTableFilterComposer, + $$IdentifierTableOrderingComposer, + $$IdentifierTableProcessedTableManager, + $$IdentifierTableInsertCompanionBuilder, + $$IdentifierTableUpdateCompanionBuilder> { + $$IdentifierTableProcessedTableManager(super.$state); +} + +class $$IdentifierTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $IdentifierTable> { + $$IdentifierTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get identifierType => $state.composableBuilder( + column: $state.table.identifierType, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get identifierId => $state.composableBuilder( + column: $state.table.identifierId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$IdentifierTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $IdentifierTable> { + $$IdentifierTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get identifierType => $state.composableBuilder( + column: $state.table.identifierType, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get identifierId => $state.composableBuilder( + column: $state.table.identifierId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$StockTableInsertCompanionBuilder = StockCompanion Function({ + Value id, + Value tenantId, + Value facilityId, + Value productVariantId, + Value referenceId, + Value referenceIdType, + Value transactingPartyId, + Value transactingPartyType, + Value quantity, + Value waybillNumber, + Value receiverId, + Value receiverType, + Value senderId, + Value senderType, + Value dateOfEntry, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + required String clientReferenceId, + Value isDeleted, + Value rowVersion, + Value transactionType, + Value transactionReason, + Value additionalFields, + Value rowid, +}); +typedef $$StockTableUpdateCompanionBuilder = StockCompanion Function({ + Value id, + Value tenantId, + Value facilityId, + Value productVariantId, + Value referenceId, + Value referenceIdType, + Value transactingPartyId, + Value transactingPartyType, + Value quantity, + Value waybillNumber, + Value receiverId, + Value receiverType, + Value senderId, + Value senderType, + Value dateOfEntry, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value clientReferenceId, + Value isDeleted, + Value rowVersion, + Value transactionType, + Value transactionReason, + Value additionalFields, + Value rowid, +}); + +class $$StockTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $StockTable, + StockData, + $$StockTableFilterComposer, + $$StockTableOrderingComposer, + $$StockTableProcessedTableManager, + $$StockTableInsertCompanionBuilder, + $$StockTableUpdateCompanionBuilder> { + $$StockTableTableManager(_$LocalSqlDataStore db, $StockTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$StockTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$StockTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => $$StockTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value tenantId = const Value.absent(), + Value facilityId = const Value.absent(), + Value productVariantId = const Value.absent(), + Value referenceId = const Value.absent(), + Value referenceIdType = const Value.absent(), + Value transactingPartyId = const Value.absent(), + Value transactingPartyType = const Value.absent(), + Value quantity = const Value.absent(), + Value waybillNumber = const Value.absent(), + Value receiverId = const Value.absent(), + Value receiverType = const Value.absent(), + Value senderId = const Value.absent(), + Value senderType = const Value.absent(), + Value dateOfEntry = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value clientReferenceId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value transactionType = const Value.absent(), + Value transactionReason = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + StockCompanion( + id: id, + tenantId: tenantId, + facilityId: facilityId, + productVariantId: productVariantId, + referenceId: referenceId, + referenceIdType: referenceIdType, + transactingPartyId: transactingPartyId, + transactingPartyType: transactingPartyType, + quantity: quantity, + waybillNumber: waybillNumber, + receiverId: receiverId, + receiverType: receiverType, + senderId: senderId, + senderType: senderType, + dateOfEntry: dateOfEntry, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + isDeleted: isDeleted, + rowVersion: rowVersion, + transactionType: transactionType, + transactionReason: transactionReason, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value id = const Value.absent(), + Value tenantId = const Value.absent(), + Value facilityId = const Value.absent(), + Value productVariantId = const Value.absent(), + Value referenceId = const Value.absent(), + Value referenceIdType = const Value.absent(), + Value transactingPartyId = const Value.absent(), + Value transactingPartyType = const Value.absent(), + Value quantity = const Value.absent(), + Value waybillNumber = const Value.absent(), + Value receiverId = const Value.absent(), + Value receiverType = const Value.absent(), + Value senderId = const Value.absent(), + Value senderType = const Value.absent(), + Value dateOfEntry = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + required String clientReferenceId, + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value transactionType = const Value.absent(), + Value transactionReason = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + StockCompanion.insert( + id: id, + tenantId: tenantId, + facilityId: facilityId, + productVariantId: productVariantId, + referenceId: referenceId, + referenceIdType: referenceIdType, + transactingPartyId: transactingPartyId, + transactingPartyType: transactingPartyType, + quantity: quantity, + waybillNumber: waybillNumber, + receiverId: receiverId, + receiverType: receiverType, + senderId: senderId, + senderType: senderType, + dateOfEntry: dateOfEntry, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + isDeleted: isDeleted, + rowVersion: rowVersion, + transactionType: transactionType, + transactionReason: transactionReason, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$StockTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $StockTable, + StockData, + $$StockTableFilterComposer, + $$StockTableOrderingComposer, + $$StockTableProcessedTableManager, + $$StockTableInsertCompanionBuilder, + $$StockTableUpdateCompanionBuilder> { + $$StockTableProcessedTableManager(super.$state); +} + +class $$StockTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $StockTable> { + $$StockTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get facilityId => $state.composableBuilder( + column: $state.table.facilityId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get productVariantId => $state.composableBuilder( + column: $state.table.productVariantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get referenceId => $state.composableBuilder( + column: $state.table.referenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get referenceIdType => $state.composableBuilder( + column: $state.table.referenceIdType, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get transactingPartyId => $state.composableBuilder( + column: $state.table.transactingPartyId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get transactingPartyType => $state.composableBuilder( + column: $state.table.transactingPartyType, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get quantity => $state.composableBuilder( + column: $state.table.quantity, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get waybillNumber => $state.composableBuilder( + column: $state.table.waybillNumber, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get receiverId => $state.composableBuilder( + column: $state.table.receiverId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get receiverType => $state.composableBuilder( + column: $state.table.receiverType, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get senderId => $state.composableBuilder( + column: $state.table.senderId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get senderType => $state.composableBuilder( + column: $state.table.senderType, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get dateOfEntry => $state.composableBuilder( + column: $state.table.dateOfEntry, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get transactionType => $state.composableBuilder( + column: $state.table.transactionType, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get transactionReason => $state.composableBuilder( + column: $state.table.transactionReason, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$StockTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $StockTable> { + $$StockTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get facilityId => $state.composableBuilder( + column: $state.table.facilityId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get productVariantId => $state.composableBuilder( + column: $state.table.productVariantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get referenceId => $state.composableBuilder( + column: $state.table.referenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get referenceIdType => $state.composableBuilder( + column: $state.table.referenceIdType, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get transactingPartyId => $state.composableBuilder( + column: $state.table.transactingPartyId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get transactingPartyType => $state.composableBuilder( + column: $state.table.transactingPartyType, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get quantity => $state.composableBuilder( + column: $state.table.quantity, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get waybillNumber => $state.composableBuilder( + column: $state.table.waybillNumber, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get receiverId => $state.composableBuilder( + column: $state.table.receiverId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get receiverType => $state.composableBuilder( + column: $state.table.receiverType, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get senderId => $state.composableBuilder( + column: $state.table.senderId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get senderType => $state.composableBuilder( + column: $state.table.senderType, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get dateOfEntry => $state.composableBuilder( + column: $state.table.dateOfEntry, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get transactionType => $state.composableBuilder( + column: $state.table.transactionType, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get transactionReason => $state.composableBuilder( + column: $state.table.transactionReason, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$StockReconciliationTableInsertCompanionBuilder + = StockReconciliationCompanion Function({ + Value id, + Value tenantId, + Value facilityId, + Value productVariantId, + Value referenceId, + Value referenceIdType, + Value physicalCount, + Value calculatedCount, + Value commentsOnReconciliation, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + required String clientReferenceId, + Value isDeleted, + Value rowVersion, + required int dateOfReconciliation, + Value additionalFields, + Value rowid, +}); +typedef $$StockReconciliationTableUpdateCompanionBuilder + = StockReconciliationCompanion Function({ + Value id, + Value tenantId, + Value facilityId, + Value productVariantId, + Value referenceId, + Value referenceIdType, + Value physicalCount, + Value calculatedCount, + Value commentsOnReconciliation, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value clientReferenceId, + Value isDeleted, + Value rowVersion, + Value dateOfReconciliation, + Value additionalFields, + Value rowid, +}); + +class $$StockReconciliationTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $StockReconciliationTable, + StockReconciliationData, + $$StockReconciliationTableFilterComposer, + $$StockReconciliationTableOrderingComposer, + $$StockReconciliationTableProcessedTableManager, + $$StockReconciliationTableInsertCompanionBuilder, + $$StockReconciliationTableUpdateCompanionBuilder> { + $$StockReconciliationTableTableManager( + _$LocalSqlDataStore db, $StockReconciliationTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: $$StockReconciliationTableFilterComposer( + ComposerState(db, table)), + orderingComposer: $$StockReconciliationTableOrderingComposer( + ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$StockReconciliationTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value tenantId = const Value.absent(), + Value facilityId = const Value.absent(), + Value productVariantId = const Value.absent(), + Value referenceId = const Value.absent(), + Value referenceIdType = const Value.absent(), + Value physicalCount = const Value.absent(), + Value calculatedCount = const Value.absent(), + Value commentsOnReconciliation = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value clientReferenceId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value dateOfReconciliation = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + StockReconciliationCompanion( + id: id, + tenantId: tenantId, + facilityId: facilityId, + productVariantId: productVariantId, + referenceId: referenceId, + referenceIdType: referenceIdType, + physicalCount: physicalCount, + calculatedCount: calculatedCount, + commentsOnReconciliation: commentsOnReconciliation, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + isDeleted: isDeleted, + rowVersion: rowVersion, + dateOfReconciliation: dateOfReconciliation, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value id = const Value.absent(), + Value tenantId = const Value.absent(), + Value facilityId = const Value.absent(), + Value productVariantId = const Value.absent(), + Value referenceId = const Value.absent(), + Value referenceIdType = const Value.absent(), + Value physicalCount = const Value.absent(), + Value calculatedCount = const Value.absent(), + Value commentsOnReconciliation = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + required String clientReferenceId, + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + required int dateOfReconciliation, + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + StockReconciliationCompanion.insert( + id: id, + tenantId: tenantId, + facilityId: facilityId, + productVariantId: productVariantId, + referenceId: referenceId, + referenceIdType: referenceIdType, + physicalCount: physicalCount, + calculatedCount: calculatedCount, + commentsOnReconciliation: commentsOnReconciliation, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + isDeleted: isDeleted, + rowVersion: rowVersion, + dateOfReconciliation: dateOfReconciliation, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$StockReconciliationTableProcessedTableManager + extends ProcessedTableManager< + _$LocalSqlDataStore, + $StockReconciliationTable, + StockReconciliationData, + $$StockReconciliationTableFilterComposer, + $$StockReconciliationTableOrderingComposer, + $$StockReconciliationTableProcessedTableManager, + $$StockReconciliationTableInsertCompanionBuilder, + $$StockReconciliationTableUpdateCompanionBuilder> { + $$StockReconciliationTableProcessedTableManager(super.$state); +} + +class $$StockReconciliationTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $StockReconciliationTable> { + $$StockReconciliationTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get facilityId => $state.composableBuilder( + column: $state.table.facilityId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get productVariantId => $state.composableBuilder( + column: $state.table.productVariantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get referenceId => $state.composableBuilder( + column: $state.table.referenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get referenceIdType => $state.composableBuilder( + column: $state.table.referenceIdType, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get physicalCount => $state.composableBuilder( + column: $state.table.physicalCount, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get calculatedCount => $state.composableBuilder( + column: $state.table.calculatedCount, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get commentsOnReconciliation => + $state.composableBuilder( + column: $state.table.commentsOnReconciliation, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get dateOfReconciliation => $state.composableBuilder( + column: $state.table.dateOfReconciliation, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$StockReconciliationTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $StockReconciliationTable> { + $$StockReconciliationTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get facilityId => $state.composableBuilder( + column: $state.table.facilityId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get productVariantId => $state.composableBuilder( + column: $state.table.productVariantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get referenceId => $state.composableBuilder( + column: $state.table.referenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get referenceIdType => $state.composableBuilder( + column: $state.table.referenceIdType, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get physicalCount => $state.composableBuilder( + column: $state.table.physicalCount, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get calculatedCount => $state.composableBuilder( + column: $state.table.calculatedCount, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get commentsOnReconciliation => + $state.composableBuilder( + column: $state.table.commentsOnReconciliation, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get dateOfReconciliation => $state.composableBuilder( + column: $state.table.dateOfReconciliation, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$TargetTableInsertCompanionBuilder = TargetCompanion Function({ + required String id, + Value clientReferenceId, + Value totalNo, + Value targetNo, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value beneficiaryType, + Value additionalFields, + Value rowid, +}); +typedef $$TargetTableUpdateCompanionBuilder = TargetCompanion Function({ + Value id, + Value clientReferenceId, + Value totalNo, + Value targetNo, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value beneficiaryType, + Value additionalFields, + Value rowid, +}); + +class $$TargetTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $TargetTable, + TargetData, + $$TargetTableFilterComposer, + $$TargetTableOrderingComposer, + $$TargetTableProcessedTableManager, + $$TargetTableInsertCompanionBuilder, + $$TargetTableUpdateCompanionBuilder> { + $$TargetTableTableManager(_$LocalSqlDataStore db, $TargetTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$TargetTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$TargetTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => $$TargetTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value clientReferenceId = const Value.absent(), + Value totalNo = const Value.absent(), + Value targetNo = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value beneficiaryType = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + TargetCompanion( + id: id, + clientReferenceId: clientReferenceId, + totalNo: totalNo, + targetNo: targetNo, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + beneficiaryType: beneficiaryType, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + required String id, + Value clientReferenceId = const Value.absent(), + Value totalNo = const Value.absent(), + Value targetNo = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value beneficiaryType = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + TargetCompanion.insert( + id: id, + clientReferenceId: clientReferenceId, + totalNo: totalNo, + targetNo: targetNo, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + beneficiaryType: beneficiaryType, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$TargetTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $TargetTable, + TargetData, + $$TargetTableFilterComposer, + $$TargetTableOrderingComposer, + $$TargetTableProcessedTableManager, + $$TargetTableInsertCompanionBuilder, + $$TargetTableUpdateCompanionBuilder> { + $$TargetTableProcessedTableManager(super.$state); +} + +class $$TargetTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $TargetTable> { + $$TargetTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get totalNo => $state.composableBuilder( + column: $state.table.totalNo, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get targetNo => $state.composableBuilder( + column: $state.table.targetNo, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnWithTypeConverterFilters + get beneficiaryType => $state.composableBuilder( + column: $state.table.beneficiaryType, + builder: (column, joinBuilders) => ColumnWithTypeConverterFilters( + column, + joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$TargetTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $TargetTable> { + $$TargetTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get totalNo => $state.composableBuilder( + column: $state.table.totalNo, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get targetNo => $state.composableBuilder( + column: $state.table.targetNo, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get beneficiaryType => $state.composableBuilder( + column: $state.table.beneficiaryType, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$ServiceTableInsertCompanionBuilder = ServiceCompanion Function({ + Value id, + required String clientId, + Value serviceDefId, + Value isActive, + Value accountId, + Value additionalDetails, + Value createdAt, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); +typedef $$ServiceTableUpdateCompanionBuilder = ServiceCompanion Function({ + Value id, + Value clientId, + Value serviceDefId, + Value isActive, + Value accountId, + Value additionalDetails, + Value createdAt, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); + +class $$ServiceTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $ServiceTable, + ServiceData, + $$ServiceTableFilterComposer, + $$ServiceTableOrderingComposer, + $$ServiceTableProcessedTableManager, + $$ServiceTableInsertCompanionBuilder, + $$ServiceTableUpdateCompanionBuilder> { + $$ServiceTableTableManager(_$LocalSqlDataStore db, $ServiceTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$ServiceTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$ServiceTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => $$ServiceTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value clientId = const Value.absent(), + Value serviceDefId = const Value.absent(), + Value isActive = const Value.absent(), + Value accountId = const Value.absent(), + Value additionalDetails = const Value.absent(), + Value createdAt = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + ServiceCompanion( + id: id, + clientId: clientId, + serviceDefId: serviceDefId, + isActive: isActive, + accountId: accountId, + additionalDetails: additionalDetails, + createdAt: createdAt, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value id = const Value.absent(), + required String clientId, + Value serviceDefId = const Value.absent(), + Value isActive = const Value.absent(), + Value accountId = const Value.absent(), + Value additionalDetails = const Value.absent(), + Value createdAt = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + ServiceCompanion.insert( + id: id, + clientId: clientId, + serviceDefId: serviceDefId, + isActive: isActive, + accountId: accountId, + additionalDetails: additionalDetails, + createdAt: createdAt, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$ServiceTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $ServiceTable, + ServiceData, + $$ServiceTableFilterComposer, + $$ServiceTableOrderingComposer, + $$ServiceTableProcessedTableManager, + $$ServiceTableInsertCompanionBuilder, + $$ServiceTableUpdateCompanionBuilder> { + $$ServiceTableProcessedTableManager(super.$state); +} + +class $$ServiceTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $ServiceTable> { + $$ServiceTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientId => $state.composableBuilder( + column: $state.table.clientId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get serviceDefId => $state.composableBuilder( + column: $state.table.serviceDefId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isActive => $state.composableBuilder( + column: $state.table.isActive, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get accountId => $state.composableBuilder( + column: $state.table.accountId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalDetails => $state.composableBuilder( + column: $state.table.additionalDetails, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get createdAt => $state.composableBuilder( + column: $state.table.createdAt, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$ServiceTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $ServiceTable> { + $$ServiceTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientId => $state.composableBuilder( + column: $state.table.clientId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get serviceDefId => $state.composableBuilder( + column: $state.table.serviceDefId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isActive => $state.composableBuilder( + column: $state.table.isActive, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get accountId => $state.composableBuilder( + column: $state.table.accountId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalDetails => $state.composableBuilder( + column: $state.table.additionalDetails, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get createdAt => $state.composableBuilder( + column: $state.table.createdAt, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$ServiceAttributesTableInsertCompanionBuilder + = ServiceAttributesCompanion Function({ + Value attributeCode, + Value value, + Value dataType, + Value referenceId, + Value additionalDetails, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + required String clientReferenceId, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); +typedef $$ServiceAttributesTableUpdateCompanionBuilder + = ServiceAttributesCompanion Function({ + Value attributeCode, + Value value, + Value dataType, + Value referenceId, + Value additionalDetails, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value clientReferenceId, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); + +class $$ServiceAttributesTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $ServiceAttributesTable, + ServiceAttribute, + $$ServiceAttributesTableFilterComposer, + $$ServiceAttributesTableOrderingComposer, + $$ServiceAttributesTableProcessedTableManager, + $$ServiceAttributesTableInsertCompanionBuilder, + $$ServiceAttributesTableUpdateCompanionBuilder> { + $$ServiceAttributesTableTableManager( + _$LocalSqlDataStore db, $ServiceAttributesTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$ServiceAttributesTableFilterComposer(ComposerState(db, table)), + orderingComposer: $$ServiceAttributesTableOrderingComposer( + ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$ServiceAttributesTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value attributeCode = const Value.absent(), + Value value = const Value.absent(), + Value dataType = const Value.absent(), + Value referenceId = const Value.absent(), + Value additionalDetails = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value clientReferenceId = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + ServiceAttributesCompanion( + attributeCode: attributeCode, + value: value, + dataType: dataType, + referenceId: referenceId, + additionalDetails: additionalDetails, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value attributeCode = const Value.absent(), + Value value = const Value.absent(), + Value dataType = const Value.absent(), + Value referenceId = const Value.absent(), + Value additionalDetails = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + required String clientReferenceId, + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + ServiceAttributesCompanion.insert( + attributeCode: attributeCode, + value: value, + dataType: dataType, + referenceId: referenceId, + additionalDetails: additionalDetails, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$ServiceAttributesTableProcessedTableManager + extends ProcessedTableManager< + _$LocalSqlDataStore, + $ServiceAttributesTable, + ServiceAttribute, + $$ServiceAttributesTableFilterComposer, + $$ServiceAttributesTableOrderingComposer, + $$ServiceAttributesTableProcessedTableManager, + $$ServiceAttributesTableInsertCompanionBuilder, + $$ServiceAttributesTableUpdateCompanionBuilder> { + $$ServiceAttributesTableProcessedTableManager(super.$state); +} + +class $$ServiceAttributesTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $ServiceAttributesTable> { + $$ServiceAttributesTableFilterComposer(super.$state); + ColumnFilters get attributeCode => $state.composableBuilder( + column: $state.table.attributeCode, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get value => $state.composableBuilder( + column: $state.table.value, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get dataType => $state.composableBuilder( + column: $state.table.dataType, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get referenceId => $state.composableBuilder( + column: $state.table.referenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalDetails => $state.composableBuilder( + column: $state.table.additionalDetails, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$ServiceAttributesTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $ServiceAttributesTable> { + $$ServiceAttributesTableOrderingComposer(super.$state); + ColumnOrderings get attributeCode => $state.composableBuilder( + column: $state.table.attributeCode, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get value => $state.composableBuilder( + column: $state.table.value, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get dataType => $state.composableBuilder( + column: $state.table.dataType, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get referenceId => $state.composableBuilder( + column: $state.table.referenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalDetails => $state.composableBuilder( + column: $state.table.additionalDetails, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$ServiceDefinitionTableInsertCompanionBuilder + = ServiceDefinitionCompanion Function({ + Value id, + Value tenantId, + Value code, + Value isActive, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); +typedef $$ServiceDefinitionTableUpdateCompanionBuilder + = ServiceDefinitionCompanion Function({ + Value id, + Value tenantId, + Value code, + Value isActive, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); + +class $$ServiceDefinitionTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $ServiceDefinitionTable, + ServiceDefinitionData, + $$ServiceDefinitionTableFilterComposer, + $$ServiceDefinitionTableOrderingComposer, + $$ServiceDefinitionTableProcessedTableManager, + $$ServiceDefinitionTableInsertCompanionBuilder, + $$ServiceDefinitionTableUpdateCompanionBuilder> { + $$ServiceDefinitionTableTableManager( + _$LocalSqlDataStore db, $ServiceDefinitionTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$ServiceDefinitionTableFilterComposer(ComposerState(db, table)), + orderingComposer: $$ServiceDefinitionTableOrderingComposer( + ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$ServiceDefinitionTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value tenantId = const Value.absent(), + Value code = const Value.absent(), + Value isActive = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + ServiceDefinitionCompanion( + id: id, + tenantId: tenantId, + code: code, + isActive: isActive, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value id = const Value.absent(), + Value tenantId = const Value.absent(), + Value code = const Value.absent(), + Value isActive = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + ServiceDefinitionCompanion.insert( + id: id, + tenantId: tenantId, + code: code, + isActive: isActive, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$ServiceDefinitionTableProcessedTableManager + extends ProcessedTableManager< + _$LocalSqlDataStore, + $ServiceDefinitionTable, + ServiceDefinitionData, + $$ServiceDefinitionTableFilterComposer, + $$ServiceDefinitionTableOrderingComposer, + $$ServiceDefinitionTableProcessedTableManager, + $$ServiceDefinitionTableInsertCompanionBuilder, + $$ServiceDefinitionTableUpdateCompanionBuilder> { + $$ServiceDefinitionTableProcessedTableManager(super.$state); +} + +class $$ServiceDefinitionTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $ServiceDefinitionTable> { + $$ServiceDefinitionTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get code => $state.composableBuilder( + column: $state.table.code, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isActive => $state.composableBuilder( + column: $state.table.isActive, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$ServiceDefinitionTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $ServiceDefinitionTable> { + $$ServiceDefinitionTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get code => $state.composableBuilder( + column: $state.table.code, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isActive => $state.composableBuilder( + column: $state.table.isActive, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$LocalityTableInsertCompanionBuilder = LocalityCompanion Function({ + required String code, + Value name, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); +typedef $$LocalityTableUpdateCompanionBuilder = LocalityCompanion Function({ + Value code, + Value name, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); + +class $$LocalityTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $LocalityTable, + LocalityData, + $$LocalityTableFilterComposer, + $$LocalityTableOrderingComposer, + $$LocalityTableProcessedTableManager, + $$LocalityTableInsertCompanionBuilder, + $$LocalityTableUpdateCompanionBuilder> { + $$LocalityTableTableManager(_$LocalSqlDataStore db, $LocalityTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$LocalityTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$LocalityTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$LocalityTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value code = const Value.absent(), + Value name = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + LocalityCompanion( + code: code, + name: name, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + required String code, + Value name = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + LocalityCompanion.insert( + code: code, + name: name, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$LocalityTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $LocalityTable, + LocalityData, + $$LocalityTableFilterComposer, + $$LocalityTableOrderingComposer, + $$LocalityTableProcessedTableManager, + $$LocalityTableInsertCompanionBuilder, + $$LocalityTableUpdateCompanionBuilder> { + $$LocalityTableProcessedTableManager(super.$state); +} + +class $$LocalityTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $LocalityTable> { + $$LocalityTableFilterComposer(super.$state); + ColumnFilters get code => $state.composableBuilder( + column: $state.table.code, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get name => $state.composableBuilder( + column: $state.table.name, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$LocalityTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $LocalityTable> { + $$LocalityTableOrderingComposer(super.$state); + ColumnOrderings get code => $state.composableBuilder( + column: $state.table.code, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get name => $state.composableBuilder( + column: $state.table.name, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$StaffTableInsertCompanionBuilder = StaffCompanion Function({ + Value id, + required String tenantId, + required String registerId, + required String userId, + Value enrollmentDate, + Value denrollmentDate, + Value rowid, +}); +typedef $$StaffTableUpdateCompanionBuilder = StaffCompanion Function({ + Value id, + Value tenantId, + Value registerId, + Value userId, + Value enrollmentDate, + Value denrollmentDate, + Value rowid, +}); + +class $$StaffTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $StaffTable, + StaffData, + $$StaffTableFilterComposer, + $$StaffTableOrderingComposer, + $$StaffTableProcessedTableManager, + $$StaffTableInsertCompanionBuilder, + $$StaffTableUpdateCompanionBuilder> { + $$StaffTableTableManager(_$LocalSqlDataStore db, $StaffTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$StaffTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$StaffTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => $$StaffTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value tenantId = const Value.absent(), + Value registerId = const Value.absent(), + Value userId = const Value.absent(), + Value enrollmentDate = const Value.absent(), + Value denrollmentDate = const Value.absent(), + Value rowid = const Value.absent(), + }) => + StaffCompanion( + id: id, + tenantId: tenantId, + registerId: registerId, + userId: userId, + enrollmentDate: enrollmentDate, + denrollmentDate: denrollmentDate, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value id = const Value.absent(), + required String tenantId, + required String registerId, + required String userId, + Value enrollmentDate = const Value.absent(), + Value denrollmentDate = const Value.absent(), + Value rowid = const Value.absent(), + }) => + StaffCompanion.insert( + id: id, + tenantId: tenantId, + registerId: registerId, + userId: userId, + enrollmentDate: enrollmentDate, + denrollmentDate: denrollmentDate, + rowid: rowid, + ), + )); +} + +class $$StaffTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $StaffTable, + StaffData, + $$StaffTableFilterComposer, + $$StaffTableOrderingComposer, + $$StaffTableProcessedTableManager, + $$StaffTableInsertCompanionBuilder, + $$StaffTableUpdateCompanionBuilder> { + $$StaffTableProcessedTableManager(super.$state); +} + +class $$StaffTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $StaffTable> { + $$StaffTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get registerId => $state.composableBuilder( + column: $state.table.registerId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get userId => $state.composableBuilder( + column: $state.table.userId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get enrollmentDate => $state.composableBuilder( + column: $state.table.enrollmentDate, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get denrollmentDate => $state.composableBuilder( + column: $state.table.denrollmentDate, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$StaffTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $StaffTable> { + $$StaffTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get registerId => $state.composableBuilder( + column: $state.table.registerId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get userId => $state.composableBuilder( + column: $state.table.userId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get enrollmentDate => $state.composableBuilder( + column: $state.table.enrollmentDate, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get denrollmentDate => $state.composableBuilder( + column: $state.table.denrollmentDate, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$AttributesTableInsertCompanionBuilder = AttributesCompanion Function({ + Value id, + Value dataType, + Value referenceId, + Value tenantId, + Value code, + Value values, + Value isActive, + Value required, + Value regex, + Value order, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value additionalDetails, + Value rowid, +}); +typedef $$AttributesTableUpdateCompanionBuilder = AttributesCompanion Function({ + Value id, + Value dataType, + Value referenceId, + Value tenantId, + Value code, + Value values, + Value isActive, + Value required, + Value regex, + Value order, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value additionalDetails, + Value rowid, +}); + +class $$AttributesTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $AttributesTable, + Attribute, + $$AttributesTableFilterComposer, + $$AttributesTableOrderingComposer, + $$AttributesTableProcessedTableManager, + $$AttributesTableInsertCompanionBuilder, + $$AttributesTableUpdateCompanionBuilder> { + $$AttributesTableTableManager(_$LocalSqlDataStore db, $AttributesTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$AttributesTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$AttributesTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$AttributesTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value dataType = const Value.absent(), + Value referenceId = const Value.absent(), + Value tenantId = const Value.absent(), + Value code = const Value.absent(), + Value values = const Value.absent(), + Value isActive = const Value.absent(), + Value required = const Value.absent(), + Value regex = const Value.absent(), + Value order = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value additionalDetails = const Value.absent(), + Value rowid = const Value.absent(), + }) => + AttributesCompanion( + id: id, + dataType: dataType, + referenceId: referenceId, + tenantId: tenantId, + code: code, + values: values, + isActive: isActive, + required: required, + regex: regex, + order: order, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + additionalDetails: additionalDetails, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value id = const Value.absent(), + Value dataType = const Value.absent(), + Value referenceId = const Value.absent(), + Value tenantId = const Value.absent(), + Value code = const Value.absent(), + Value values = const Value.absent(), + Value isActive = const Value.absent(), + Value required = const Value.absent(), + Value regex = const Value.absent(), + Value order = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value additionalDetails = const Value.absent(), + Value rowid = const Value.absent(), + }) => + AttributesCompanion.insert( + id: id, + dataType: dataType, + referenceId: referenceId, + tenantId: tenantId, + code: code, + values: values, + isActive: isActive, + required: required, + regex: regex, + order: order, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + additionalDetails: additionalDetails, + rowid: rowid, + ), + )); +} + +class $$AttributesTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $AttributesTable, + Attribute, + $$AttributesTableFilterComposer, + $$AttributesTableOrderingComposer, + $$AttributesTableProcessedTableManager, + $$AttributesTableInsertCompanionBuilder, + $$AttributesTableUpdateCompanionBuilder> { + $$AttributesTableProcessedTableManager(super.$state); +} + +class $$AttributesTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $AttributesTable> { + $$AttributesTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get dataType => $state.composableBuilder( + column: $state.table.dataType, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get referenceId => $state.composableBuilder( + column: $state.table.referenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get code => $state.composableBuilder( + column: $state.table.code, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get values => $state.composableBuilder( + column: $state.table.values, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isActive => $state.composableBuilder( + column: $state.table.isActive, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get required => $state.composableBuilder( + column: $state.table.required, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get regex => $state.composableBuilder( + column: $state.table.regex, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get order => $state.composableBuilder( + column: $state.table.order, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalDetails => $state.composableBuilder( + column: $state.table.additionalDetails, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$AttributesTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $AttributesTable> { + $$AttributesTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get dataType => $state.composableBuilder( + column: $state.table.dataType, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get referenceId => $state.composableBuilder( + column: $state.table.referenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get code => $state.composableBuilder( + column: $state.table.code, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get values => $state.composableBuilder( + column: $state.table.values, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isActive => $state.composableBuilder( + column: $state.table.isActive, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get required => $state.composableBuilder( + column: $state.table.required, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get regex => $state.composableBuilder( + column: $state.table.regex, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get order => $state.composableBuilder( + column: $state.table.order, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalDetails => $state.composableBuilder( + column: $state.table.additionalDetails, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$PgrServiceTableInsertCompanionBuilder = PgrServiceCompanion Function({ + required bool active, + required String clientReferenceId, + Value id, + required String tenantId, + required String serviceCode, + required String description, + Value serviceRequestId, + Value accountId, + required PgrServiceApplicationStatus applicationStatus, + Value source, + Value auditCreatedBy, + Value auditCreatedTime, + Value auditModifiedBy, + Value auditModifiedTime, + required bool isDeleted, + required int rowVersion, + Value additionalFields, + Value rowid, +}); +typedef $$PgrServiceTableUpdateCompanionBuilder = PgrServiceCompanion Function({ + Value active, + Value clientReferenceId, + Value id, + Value tenantId, + Value serviceCode, + Value description, + Value serviceRequestId, + Value accountId, + Value applicationStatus, + Value source, + Value auditCreatedBy, + Value auditCreatedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); + +class $$PgrServiceTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $PgrServiceTable, + PgrServiceData, + $$PgrServiceTableFilterComposer, + $$PgrServiceTableOrderingComposer, + $$PgrServiceTableProcessedTableManager, + $$PgrServiceTableInsertCompanionBuilder, + $$PgrServiceTableUpdateCompanionBuilder> { + $$PgrServiceTableTableManager(_$LocalSqlDataStore db, $PgrServiceTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$PgrServiceTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$PgrServiceTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$PgrServiceTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value active = const Value.absent(), + Value clientReferenceId = const Value.absent(), + Value id = const Value.absent(), + Value tenantId = const Value.absent(), + Value serviceCode = const Value.absent(), + Value description = const Value.absent(), + Value serviceRequestId = const Value.absent(), + Value accountId = const Value.absent(), + Value applicationStatus = + const Value.absent(), + Value source = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + PgrServiceCompanion( + active: active, + clientReferenceId: clientReferenceId, + id: id, + tenantId: tenantId, + serviceCode: serviceCode, + description: description, + serviceRequestId: serviceRequestId, + accountId: accountId, + applicationStatus: applicationStatus, + source: source, + auditCreatedBy: auditCreatedBy, + auditCreatedTime: auditCreatedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + required bool active, + required String clientReferenceId, + Value id = const Value.absent(), + required String tenantId, + required String serviceCode, + required String description, + Value serviceRequestId = const Value.absent(), + Value accountId = const Value.absent(), + required PgrServiceApplicationStatus applicationStatus, + Value source = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + required bool isDeleted, + required int rowVersion, + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + PgrServiceCompanion.insert( + active: active, + clientReferenceId: clientReferenceId, + id: id, + tenantId: tenantId, + serviceCode: serviceCode, + description: description, + serviceRequestId: serviceRequestId, + accountId: accountId, + applicationStatus: applicationStatus, + source: source, + auditCreatedBy: auditCreatedBy, + auditCreatedTime: auditCreatedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$PgrServiceTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $PgrServiceTable, + PgrServiceData, + $$PgrServiceTableFilterComposer, + $$PgrServiceTableOrderingComposer, + $$PgrServiceTableProcessedTableManager, + $$PgrServiceTableInsertCompanionBuilder, + $$PgrServiceTableUpdateCompanionBuilder> { + $$PgrServiceTableProcessedTableManager(super.$state); +} + +class $$PgrServiceTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $PgrServiceTable> { + $$PgrServiceTableFilterComposer(super.$state); + ColumnFilters get active => $state.composableBuilder( + column: $state.table.active, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get serviceCode => $state.composableBuilder( + column: $state.table.serviceCode, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get description => $state.composableBuilder( + column: $state.table.description, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get serviceRequestId => $state.composableBuilder( + column: $state.table.serviceRequestId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get accountId => $state.composableBuilder( + column: $state.table.accountId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnWithTypeConverterFilters + get applicationStatus => $state.composableBuilder( + column: $state.table.applicationStatus, + builder: (column, joinBuilders) => ColumnWithTypeConverterFilters( + column, + joinBuilders: joinBuilders)); + + ColumnFilters get source => $state.composableBuilder( + column: $state.table.source, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$PgrServiceTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $PgrServiceTable> { + $$PgrServiceTableOrderingComposer(super.$state); + ColumnOrderings get active => $state.composableBuilder( + column: $state.table.active, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get serviceCode => $state.composableBuilder( + column: $state.table.serviceCode, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get description => $state.composableBuilder( + column: $state.table.description, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get serviceRequestId => $state.composableBuilder( + column: $state.table.serviceRequestId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get accountId => $state.composableBuilder( + column: $state.table.accountId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get applicationStatus => $state.composableBuilder( + column: $state.table.applicationStatus, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get source => $state.composableBuilder( + column: $state.table.source, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$PgrComplainantTableInsertCompanionBuilder = PgrComplainantCompanion + Function({ + Value id, + required String clientReferenceId, + required String complaintClientReferenceId, + Value userName, + Value name, + Value type, + Value mobileNumber, + Value emailId, + required String tenantId, + Value uuid, + required bool active, + Value auditCreatedBy, + Value auditCreatedTime, + Value auditModifiedBy, + Value auditModifiedTime, + required bool isDeleted, + required int rowVersion, + Value rowid, +}); +typedef $$PgrComplainantTableUpdateCompanionBuilder = PgrComplainantCompanion + Function({ + Value id, + Value clientReferenceId, + Value complaintClientReferenceId, + Value userName, + Value name, + Value type, + Value mobileNumber, + Value emailId, + Value tenantId, + Value uuid, + Value active, + Value auditCreatedBy, + Value auditCreatedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value isDeleted, + Value rowVersion, + Value rowid, +}); + +class $$PgrComplainantTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $PgrComplainantTable, + PgrComplainantData, + $$PgrComplainantTableFilterComposer, + $$PgrComplainantTableOrderingComposer, + $$PgrComplainantTableProcessedTableManager, + $$PgrComplainantTableInsertCompanionBuilder, + $$PgrComplainantTableUpdateCompanionBuilder> { + $$PgrComplainantTableTableManager( + _$LocalSqlDataStore db, $PgrComplainantTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$PgrComplainantTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$PgrComplainantTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$PgrComplainantTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value clientReferenceId = const Value.absent(), + Value complaintClientReferenceId = const Value.absent(), + Value userName = const Value.absent(), + Value name = const Value.absent(), + Value type = const Value.absent(), + Value mobileNumber = const Value.absent(), + Value emailId = const Value.absent(), + Value tenantId = const Value.absent(), + Value uuid = const Value.absent(), + Value active = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value rowid = const Value.absent(), + }) => + PgrComplainantCompanion( + id: id, + clientReferenceId: clientReferenceId, + complaintClientReferenceId: complaintClientReferenceId, + userName: userName, + name: name, + type: type, + mobileNumber: mobileNumber, + emailId: emailId, + tenantId: tenantId, + uuid: uuid, + active: active, + auditCreatedBy: auditCreatedBy, + auditCreatedTime: auditCreatedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + isDeleted: isDeleted, + rowVersion: rowVersion, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value id = const Value.absent(), + required String clientReferenceId, + required String complaintClientReferenceId, + Value userName = const Value.absent(), + Value name = const Value.absent(), + Value type = const Value.absent(), + Value mobileNumber = const Value.absent(), + Value emailId = const Value.absent(), + required String tenantId, + Value uuid = const Value.absent(), + required bool active, + Value auditCreatedBy = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + required bool isDeleted, + required int rowVersion, + Value rowid = const Value.absent(), + }) => + PgrComplainantCompanion.insert( + id: id, + clientReferenceId: clientReferenceId, + complaintClientReferenceId: complaintClientReferenceId, + userName: userName, + name: name, + type: type, + mobileNumber: mobileNumber, + emailId: emailId, + tenantId: tenantId, + uuid: uuid, + active: active, + auditCreatedBy: auditCreatedBy, + auditCreatedTime: auditCreatedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + isDeleted: isDeleted, + rowVersion: rowVersion, + rowid: rowid, + ), + )); +} + +class $$PgrComplainantTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $PgrComplainantTable, + PgrComplainantData, + $$PgrComplainantTableFilterComposer, + $$PgrComplainantTableOrderingComposer, + $$PgrComplainantTableProcessedTableManager, + $$PgrComplainantTableInsertCompanionBuilder, + $$PgrComplainantTableUpdateCompanionBuilder> { + $$PgrComplainantTableProcessedTableManager(super.$state); +} + +class $$PgrComplainantTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $PgrComplainantTable> { + $$PgrComplainantTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get complaintClientReferenceId => + $state.composableBuilder( + column: $state.table.complaintClientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get userName => $state.composableBuilder( + column: $state.table.userName, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get name => $state.composableBuilder( + column: $state.table.name, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get type => $state.composableBuilder( + column: $state.table.type, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get mobileNumber => $state.composableBuilder( + column: $state.table.mobileNumber, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get emailId => $state.composableBuilder( + column: $state.table.emailId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get uuid => $state.composableBuilder( + column: $state.table.uuid, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get active => $state.composableBuilder( + column: $state.table.active, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$PgrComplainantTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $PgrComplainantTable> { + $$PgrComplainantTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get complaintClientReferenceId => + $state.composableBuilder( + column: $state.table.complaintClientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get userName => $state.composableBuilder( + column: $state.table.userName, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get name => $state.composableBuilder( + column: $state.table.name, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get type => $state.composableBuilder( + column: $state.table.type, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get mobileNumber => $state.composableBuilder( + column: $state.table.mobileNumber, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get emailId => $state.composableBuilder( + column: $state.table.emailId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get uuid => $state.composableBuilder( + column: $state.table.uuid, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get active => $state.composableBuilder( + column: $state.table.active, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$UserTableInsertCompanionBuilder = UserCompanion Function({ + Value id, + Value userName, + Value salutation, + Value name, + Value gender, + Value mobileNumber, + Value emailId, + Value altContactNumber, + Value pan, + Value aadhaarNumber, + Value permanentAddress, + Value permanentCity, + Value permanentPinCode, + Value correspondenceAddress, + Value correspondenceCity, + Value correspondencePinCode, + Value alternatemobilenumber, + Value active, + Value locale, + Value type, + Value accountLocked, + Value accountLockedDate, + Value fatherOrHusbandName, + Value relationship, + Value signature, + Value bloodGroup, + Value photo, + Value identificationMark, + Value createdBy, + Value lastModifiedBy, + Value tenantId, + Value uuid, + Value createdDate, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); +typedef $$UserTableUpdateCompanionBuilder = UserCompanion Function({ + Value id, + Value userName, + Value salutation, + Value name, + Value gender, + Value mobileNumber, + Value emailId, + Value altContactNumber, + Value pan, + Value aadhaarNumber, + Value permanentAddress, + Value permanentCity, + Value permanentPinCode, + Value correspondenceAddress, + Value correspondenceCity, + Value correspondencePinCode, + Value alternatemobilenumber, + Value active, + Value locale, + Value type, + Value accountLocked, + Value accountLockedDate, + Value fatherOrHusbandName, + Value relationship, + Value signature, + Value bloodGroup, + Value photo, + Value identificationMark, + Value createdBy, + Value lastModifiedBy, + Value tenantId, + Value uuid, + Value createdDate, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); + +class $$UserTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $UserTable, + UserData, + $$UserTableFilterComposer, + $$UserTableOrderingComposer, + $$UserTableProcessedTableManager, + $$UserTableInsertCompanionBuilder, + $$UserTableUpdateCompanionBuilder> { + $$UserTableTableManager(_$LocalSqlDataStore db, $UserTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$UserTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$UserTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => $$UserTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value userName = const Value.absent(), + Value salutation = const Value.absent(), + Value name = const Value.absent(), + Value gender = const Value.absent(), + Value mobileNumber = const Value.absent(), + Value emailId = const Value.absent(), + Value altContactNumber = const Value.absent(), + Value pan = const Value.absent(), + Value aadhaarNumber = const Value.absent(), + Value permanentAddress = const Value.absent(), + Value permanentCity = const Value.absent(), + Value permanentPinCode = const Value.absent(), + Value correspondenceAddress = const Value.absent(), + Value correspondenceCity = const Value.absent(), + Value correspondencePinCode = const Value.absent(), + Value alternatemobilenumber = const Value.absent(), + Value active = const Value.absent(), + Value locale = const Value.absent(), + Value type = const Value.absent(), + Value accountLocked = const Value.absent(), + Value accountLockedDate = const Value.absent(), + Value fatherOrHusbandName = const Value.absent(), + Value relationship = const Value.absent(), + Value signature = const Value.absent(), + Value bloodGroup = const Value.absent(), + Value photo = const Value.absent(), + Value identificationMark = const Value.absent(), + Value createdBy = const Value.absent(), + Value lastModifiedBy = const Value.absent(), + Value tenantId = const Value.absent(), + Value uuid = const Value.absent(), + Value createdDate = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + UserCompanion( + id: id, + userName: userName, + salutation: salutation, + name: name, + gender: gender, + mobileNumber: mobileNumber, + emailId: emailId, + altContactNumber: altContactNumber, + pan: pan, + aadhaarNumber: aadhaarNumber, + permanentAddress: permanentAddress, + permanentCity: permanentCity, + permanentPinCode: permanentPinCode, + correspondenceAddress: correspondenceAddress, + correspondenceCity: correspondenceCity, + correspondencePinCode: correspondencePinCode, + alternatemobilenumber: alternatemobilenumber, + active: active, + locale: locale, + type: type, + accountLocked: accountLocked, + accountLockedDate: accountLockedDate, + fatherOrHusbandName: fatherOrHusbandName, + relationship: relationship, + signature: signature, + bloodGroup: bloodGroup, + photo: photo, + identificationMark: identificationMark, + createdBy: createdBy, + lastModifiedBy: lastModifiedBy, + tenantId: tenantId, + uuid: uuid, + createdDate: createdDate, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value id = const Value.absent(), + Value userName = const Value.absent(), + Value salutation = const Value.absent(), + Value name = const Value.absent(), + Value gender = const Value.absent(), + Value mobileNumber = const Value.absent(), + Value emailId = const Value.absent(), + Value altContactNumber = const Value.absent(), + Value pan = const Value.absent(), + Value aadhaarNumber = const Value.absent(), + Value permanentAddress = const Value.absent(), + Value permanentCity = const Value.absent(), + Value permanentPinCode = const Value.absent(), + Value correspondenceAddress = const Value.absent(), + Value correspondenceCity = const Value.absent(), + Value correspondencePinCode = const Value.absent(), + Value alternatemobilenumber = const Value.absent(), + Value active = const Value.absent(), + Value locale = const Value.absent(), + Value type = const Value.absent(), + Value accountLocked = const Value.absent(), + Value accountLockedDate = const Value.absent(), + Value fatherOrHusbandName = const Value.absent(), + Value relationship = const Value.absent(), + Value signature = const Value.absent(), + Value bloodGroup = const Value.absent(), + Value photo = const Value.absent(), + Value identificationMark = const Value.absent(), + Value createdBy = const Value.absent(), + Value lastModifiedBy = const Value.absent(), + Value tenantId = const Value.absent(), + Value uuid = const Value.absent(), + Value createdDate = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + UserCompanion.insert( + id: id, + userName: userName, + salutation: salutation, + name: name, + gender: gender, + mobileNumber: mobileNumber, + emailId: emailId, + altContactNumber: altContactNumber, + pan: pan, + aadhaarNumber: aadhaarNumber, + permanentAddress: permanentAddress, + permanentCity: permanentCity, + permanentPinCode: permanentPinCode, + correspondenceAddress: correspondenceAddress, + correspondenceCity: correspondenceCity, + correspondencePinCode: correspondencePinCode, + alternatemobilenumber: alternatemobilenumber, + active: active, + locale: locale, + type: type, + accountLocked: accountLocked, + accountLockedDate: accountLockedDate, + fatherOrHusbandName: fatherOrHusbandName, + relationship: relationship, + signature: signature, + bloodGroup: bloodGroup, + photo: photo, + identificationMark: identificationMark, + createdBy: createdBy, + lastModifiedBy: lastModifiedBy, + tenantId: tenantId, + uuid: uuid, + createdDate: createdDate, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$UserTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $UserTable, + UserData, + $$UserTableFilterComposer, + $$UserTableOrderingComposer, + $$UserTableProcessedTableManager, + $$UserTableInsertCompanionBuilder, + $$UserTableUpdateCompanionBuilder> { + $$UserTableProcessedTableManager(super.$state); +} + +class $$UserTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $UserTable> { + $$UserTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get userName => $state.composableBuilder( + column: $state.table.userName, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get salutation => $state.composableBuilder( + column: $state.table.salutation, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get name => $state.composableBuilder( + column: $state.table.name, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get gender => $state.composableBuilder( + column: $state.table.gender, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get mobileNumber => $state.composableBuilder( + column: $state.table.mobileNumber, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get emailId => $state.composableBuilder( + column: $state.table.emailId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get altContactNumber => $state.composableBuilder( + column: $state.table.altContactNumber, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get pan => $state.composableBuilder( + column: $state.table.pan, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get aadhaarNumber => $state.composableBuilder( + column: $state.table.aadhaarNumber, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get permanentAddress => $state.composableBuilder( + column: $state.table.permanentAddress, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get permanentCity => $state.composableBuilder( + column: $state.table.permanentCity, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get permanentPinCode => $state.composableBuilder( + column: $state.table.permanentPinCode, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get correspondenceAddress => $state.composableBuilder( + column: $state.table.correspondenceAddress, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get correspondenceCity => $state.composableBuilder( + column: $state.table.correspondenceCity, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get correspondencePinCode => $state.composableBuilder( + column: $state.table.correspondencePinCode, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get alternatemobilenumber => $state.composableBuilder( + column: $state.table.alternatemobilenumber, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get active => $state.composableBuilder( + column: $state.table.active, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get locale => $state.composableBuilder( + column: $state.table.locale, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get type => $state.composableBuilder( + column: $state.table.type, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get accountLocked => $state.composableBuilder( + column: $state.table.accountLocked, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get accountLockedDate => $state.composableBuilder( + column: $state.table.accountLockedDate, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get fatherOrHusbandName => $state.composableBuilder( + column: $state.table.fatherOrHusbandName, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get relationship => $state.composableBuilder( + column: $state.table.relationship, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get signature => $state.composableBuilder( + column: $state.table.signature, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get bloodGroup => $state.composableBuilder( + column: $state.table.bloodGroup, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get photo => $state.composableBuilder( + column: $state.table.photo, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get identificationMark => $state.composableBuilder( + column: $state.table.identificationMark, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get createdBy => $state.composableBuilder( + column: $state.table.createdBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get lastModifiedBy => $state.composableBuilder( + column: $state.table.lastModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get uuid => $state.composableBuilder( + column: $state.table.uuid, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get createdDate => $state.composableBuilder( + column: $state.table.createdDate, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$UserTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $UserTable> { + $$UserTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get userName => $state.composableBuilder( + column: $state.table.userName, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get salutation => $state.composableBuilder( + column: $state.table.salutation, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get name => $state.composableBuilder( + column: $state.table.name, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get gender => $state.composableBuilder( + column: $state.table.gender, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get mobileNumber => $state.composableBuilder( + column: $state.table.mobileNumber, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get emailId => $state.composableBuilder( + column: $state.table.emailId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get altContactNumber => $state.composableBuilder( + column: $state.table.altContactNumber, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get pan => $state.composableBuilder( + column: $state.table.pan, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get aadhaarNumber => $state.composableBuilder( + column: $state.table.aadhaarNumber, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get permanentAddress => $state.composableBuilder( + column: $state.table.permanentAddress, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get permanentCity => $state.composableBuilder( + column: $state.table.permanentCity, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get permanentPinCode => $state.composableBuilder( + column: $state.table.permanentPinCode, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get correspondenceAddress => $state.composableBuilder( + column: $state.table.correspondenceAddress, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get correspondenceCity => $state.composableBuilder( + column: $state.table.correspondenceCity, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get correspondencePinCode => $state.composableBuilder( + column: $state.table.correspondencePinCode, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get alternatemobilenumber => $state.composableBuilder( + column: $state.table.alternatemobilenumber, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get active => $state.composableBuilder( + column: $state.table.active, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get locale => $state.composableBuilder( + column: $state.table.locale, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get type => $state.composableBuilder( + column: $state.table.type, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get accountLocked => $state.composableBuilder( + column: $state.table.accountLocked, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get accountLockedDate => $state.composableBuilder( + column: $state.table.accountLockedDate, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get fatherOrHusbandName => $state.composableBuilder( + column: $state.table.fatherOrHusbandName, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get relationship => $state.composableBuilder( + column: $state.table.relationship, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get signature => $state.composableBuilder( + column: $state.table.signature, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get bloodGroup => $state.composableBuilder( + column: $state.table.bloodGroup, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get photo => $state.composableBuilder( + column: $state.table.photo, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get identificationMark => $state.composableBuilder( + column: $state.table.identificationMark, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get createdBy => $state.composableBuilder( + column: $state.table.createdBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get lastModifiedBy => $state.composableBuilder( + column: $state.table.lastModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get uuid => $state.composableBuilder( + column: $state.table.uuid, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get createdDate => $state.composableBuilder( + column: $state.table.createdDate, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$DownsyncTableInsertCompanionBuilder = DownsyncCompanion Function({ + Value locality, + Value projectId, + Value offset, + Value limit, + Value lastSyncedTime, + Value totalCount, + Value boundaryName, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); +typedef $$DownsyncTableUpdateCompanionBuilder = DownsyncCompanion Function({ + Value locality, + Value projectId, + Value offset, + Value limit, + Value lastSyncedTime, + Value totalCount, + Value boundaryName, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); + +class $$DownsyncTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $DownsyncTable, + DownsyncData, + $$DownsyncTableFilterComposer, + $$DownsyncTableOrderingComposer, + $$DownsyncTableProcessedTableManager, + $$DownsyncTableInsertCompanionBuilder, + $$DownsyncTableUpdateCompanionBuilder> { + $$DownsyncTableTableManager(_$LocalSqlDataStore db, $DownsyncTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$DownsyncTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$DownsyncTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$DownsyncTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value locality = const Value.absent(), + Value projectId = const Value.absent(), + Value offset = const Value.absent(), + Value limit = const Value.absent(), + Value lastSyncedTime = const Value.absent(), + Value totalCount = const Value.absent(), + Value boundaryName = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + DownsyncCompanion( + locality: locality, + projectId: projectId, + offset: offset, + limit: limit, + lastSyncedTime: lastSyncedTime, + totalCount: totalCount, + boundaryName: boundaryName, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value locality = const Value.absent(), + Value projectId = const Value.absent(), + Value offset = const Value.absent(), + Value limit = const Value.absent(), + Value lastSyncedTime = const Value.absent(), + Value totalCount = const Value.absent(), + Value boundaryName = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + DownsyncCompanion.insert( + locality: locality, + projectId: projectId, + offset: offset, + limit: limit, + lastSyncedTime: lastSyncedTime, + totalCount: totalCount, + boundaryName: boundaryName, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$DownsyncTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $DownsyncTable, + DownsyncData, + $$DownsyncTableFilterComposer, + $$DownsyncTableOrderingComposer, + $$DownsyncTableProcessedTableManager, + $$DownsyncTableInsertCompanionBuilder, + $$DownsyncTableUpdateCompanionBuilder> { + $$DownsyncTableProcessedTableManager(super.$state); +} + +class $$DownsyncTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $DownsyncTable> { + $$DownsyncTableFilterComposer(super.$state); + ColumnFilters get locality => $state.composableBuilder( + column: $state.table.locality, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get projectId => $state.composableBuilder( + column: $state.table.projectId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get offset => $state.composableBuilder( + column: $state.table.offset, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get limit => $state.composableBuilder( + column: $state.table.limit, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get lastSyncedTime => $state.composableBuilder( + column: $state.table.lastSyncedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get totalCount => $state.composableBuilder( + column: $state.table.totalCount, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get boundaryName => $state.composableBuilder( + column: $state.table.boundaryName, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$DownsyncTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $DownsyncTable> { + $$DownsyncTableOrderingComposer(super.$state); + ColumnOrderings get locality => $state.composableBuilder( + column: $state.table.locality, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get projectId => $state.composableBuilder( + column: $state.table.projectId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get offset => $state.composableBuilder( + column: $state.table.offset, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get limit => $state.composableBuilder( + column: $state.table.limit, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get lastSyncedTime => $state.composableBuilder( + column: $state.table.lastSyncedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get totalCount => $state.composableBuilder( + column: $state.table.totalCount, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get boundaryName => $state.composableBuilder( + column: $state.table.boundaryName, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$DownsyncCriteriaTableInsertCompanionBuilder + = DownsyncCriteriaCompanion Function({ + Value locality, + Value tenantId, + Value offset, + Value limit, + Value projectId, + Value lastSyncedTime, + Value totalCount, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + required String clientReferenceId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); +typedef $$DownsyncCriteriaTableUpdateCompanionBuilder + = DownsyncCriteriaCompanion Function({ + Value locality, + Value tenantId, + Value offset, + Value limit, + Value projectId, + Value lastSyncedTime, + Value totalCount, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value clientReferenceId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); + +class $$DownsyncCriteriaTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $DownsyncCriteriaTable, + DownsyncCriteriaData, + $$DownsyncCriteriaTableFilterComposer, + $$DownsyncCriteriaTableOrderingComposer, + $$DownsyncCriteriaTableProcessedTableManager, + $$DownsyncCriteriaTableInsertCompanionBuilder, + $$DownsyncCriteriaTableUpdateCompanionBuilder> { + $$DownsyncCriteriaTableTableManager( + _$LocalSqlDataStore db, $DownsyncCriteriaTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$DownsyncCriteriaTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$DownsyncCriteriaTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$DownsyncCriteriaTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value locality = const Value.absent(), + Value tenantId = const Value.absent(), + Value offset = const Value.absent(), + Value limit = const Value.absent(), + Value projectId = const Value.absent(), + Value lastSyncedTime = const Value.absent(), + Value totalCount = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value clientReferenceId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + DownsyncCriteriaCompanion( + locality: locality, + tenantId: tenantId, + offset: offset, + limit: limit, + projectId: projectId, + lastSyncedTime: lastSyncedTime, + totalCount: totalCount, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value locality = const Value.absent(), + Value tenantId = const Value.absent(), + Value offset = const Value.absent(), + Value limit = const Value.absent(), + Value projectId = const Value.absent(), + Value lastSyncedTime = const Value.absent(), + Value totalCount = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + required String clientReferenceId, + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + DownsyncCriteriaCompanion.insert( + locality: locality, + tenantId: tenantId, + offset: offset, + limit: limit, + projectId: projectId, + lastSyncedTime: lastSyncedTime, + totalCount: totalCount, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$DownsyncCriteriaTableProcessedTableManager + extends ProcessedTableManager< + _$LocalSqlDataStore, + $DownsyncCriteriaTable, + DownsyncCriteriaData, + $$DownsyncCriteriaTableFilterComposer, + $$DownsyncCriteriaTableOrderingComposer, + $$DownsyncCriteriaTableProcessedTableManager, + $$DownsyncCriteriaTableInsertCompanionBuilder, + $$DownsyncCriteriaTableUpdateCompanionBuilder> { + $$DownsyncCriteriaTableProcessedTableManager(super.$state); +} + +class $$DownsyncCriteriaTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $DownsyncCriteriaTable> { + $$DownsyncCriteriaTableFilterComposer(super.$state); + ColumnFilters get locality => $state.composableBuilder( + column: $state.table.locality, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get offset => $state.composableBuilder( + column: $state.table.offset, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get limit => $state.composableBuilder( + column: $state.table.limit, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get projectId => $state.composableBuilder( + column: $state.table.projectId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get lastSyncedTime => $state.composableBuilder( + column: $state.table.lastSyncedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get totalCount => $state.composableBuilder( + column: $state.table.totalCount, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$DownsyncCriteriaTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $DownsyncCriteriaTable> { + $$DownsyncCriteriaTableOrderingComposer(super.$state); + ColumnOrderings get locality => $state.composableBuilder( + column: $state.table.locality, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get offset => $state.composableBuilder( + column: $state.table.offset, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get limit => $state.composableBuilder( + column: $state.table.limit, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get projectId => $state.composableBuilder( + column: $state.table.projectId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get lastSyncedTime => $state.composableBuilder( + column: $state.table.lastSyncedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get totalCount => $state.composableBuilder( + column: $state.table.totalCount, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$HFReferralTableInsertCompanionBuilder = HFReferralCompanion Function({ + Value id, + Value tenantId, + Value name, + Value projectId, + Value projectFacilityId, + Value symptomSurveyId, + Value beneficiaryId, + Value referralCode, + Value nationalLevelId, + Value symptom, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + required String clientReferenceId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); +typedef $$HFReferralTableUpdateCompanionBuilder = HFReferralCompanion Function({ + Value id, + Value tenantId, + Value name, + Value projectId, + Value projectFacilityId, + Value symptomSurveyId, + Value beneficiaryId, + Value referralCode, + Value nationalLevelId, + Value symptom, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value clientReferenceId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); + +class $$HFReferralTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $HFReferralTable, + HFReferralData, + $$HFReferralTableFilterComposer, + $$HFReferralTableOrderingComposer, + $$HFReferralTableProcessedTableManager, + $$HFReferralTableInsertCompanionBuilder, + $$HFReferralTableUpdateCompanionBuilder> { + $$HFReferralTableTableManager(_$LocalSqlDataStore db, $HFReferralTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$HFReferralTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$HFReferralTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$HFReferralTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value tenantId = const Value.absent(), + Value name = const Value.absent(), + Value projectId = const Value.absent(), + Value projectFacilityId = const Value.absent(), + Value symptomSurveyId = const Value.absent(), + Value beneficiaryId = const Value.absent(), + Value referralCode = const Value.absent(), + Value nationalLevelId = const Value.absent(), + Value symptom = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value clientReferenceId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + HFReferralCompanion( + id: id, + tenantId: tenantId, + name: name, + projectId: projectId, + projectFacilityId: projectFacilityId, + symptomSurveyId: symptomSurveyId, + beneficiaryId: beneficiaryId, + referralCode: referralCode, + nationalLevelId: nationalLevelId, + symptom: symptom, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value id = const Value.absent(), + Value tenantId = const Value.absent(), + Value name = const Value.absent(), + Value projectId = const Value.absent(), + Value projectFacilityId = const Value.absent(), + Value symptomSurveyId = const Value.absent(), + Value beneficiaryId = const Value.absent(), + Value referralCode = const Value.absent(), + Value nationalLevelId = const Value.absent(), + Value symptom = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + required String clientReferenceId, + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + HFReferralCompanion.insert( + id: id, + tenantId: tenantId, + name: name, + projectId: projectId, + projectFacilityId: projectFacilityId, + symptomSurveyId: symptomSurveyId, + beneficiaryId: beneficiaryId, + referralCode: referralCode, + nationalLevelId: nationalLevelId, + symptom: symptom, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$HFReferralTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $HFReferralTable, + HFReferralData, + $$HFReferralTableFilterComposer, + $$HFReferralTableOrderingComposer, + $$HFReferralTableProcessedTableManager, + $$HFReferralTableInsertCompanionBuilder, + $$HFReferralTableUpdateCompanionBuilder> { + $$HFReferralTableProcessedTableManager(super.$state); +} + +class $$HFReferralTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $HFReferralTable> { + $$HFReferralTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get name => $state.composableBuilder( + column: $state.table.name, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get projectId => $state.composableBuilder( + column: $state.table.projectId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get projectFacilityId => $state.composableBuilder( + column: $state.table.projectFacilityId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get symptomSurveyId => $state.composableBuilder( + column: $state.table.symptomSurveyId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get beneficiaryId => $state.composableBuilder( + column: $state.table.beneficiaryId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get referralCode => $state.composableBuilder( + column: $state.table.referralCode, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nationalLevelId => $state.composableBuilder( + column: $state.table.nationalLevelId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get symptom => $state.composableBuilder( + column: $state.table.symptom, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$HFReferralTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $HFReferralTable> { + $$HFReferralTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get name => $state.composableBuilder( + column: $state.table.name, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get projectId => $state.composableBuilder( + column: $state.table.projectId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get projectFacilityId => $state.composableBuilder( + column: $state.table.projectFacilityId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get symptomSurveyId => $state.composableBuilder( + column: $state.table.symptomSurveyId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get beneficiaryId => $state.composableBuilder( + column: $state.table.beneficiaryId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get referralCode => $state.composableBuilder( + column: $state.table.referralCode, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nationalLevelId => $state.composableBuilder( + column: $state.table.nationalLevelId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get symptom => $state.composableBuilder( + column: $state.table.symptom, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$HouseholdTableInsertCompanionBuilder = HouseholdCompanion Function({ + Value id, + Value memberCount, + Value latitude, + Value longitude, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + required String clientReferenceId, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); +typedef $$HouseholdTableUpdateCompanionBuilder = HouseholdCompanion Function({ + Value id, + Value memberCount, + Value latitude, + Value longitude, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value clientReferenceId, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); + +class $$HouseholdTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $HouseholdTable, + HouseholdData, + $$HouseholdTableFilterComposer, + $$HouseholdTableOrderingComposer, + $$HouseholdTableProcessedTableManager, + $$HouseholdTableInsertCompanionBuilder, + $$HouseholdTableUpdateCompanionBuilder> { + $$HouseholdTableTableManager(_$LocalSqlDataStore db, $HouseholdTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$HouseholdTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$HouseholdTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$HouseholdTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value memberCount = const Value.absent(), + Value latitude = const Value.absent(), + Value longitude = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value clientReferenceId = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + HouseholdCompanion( + id: id, + memberCount: memberCount, + latitude: latitude, + longitude: longitude, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value id = const Value.absent(), + Value memberCount = const Value.absent(), + Value latitude = const Value.absent(), + Value longitude = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + required String clientReferenceId, + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + HouseholdCompanion.insert( + id: id, + memberCount: memberCount, + latitude: latitude, + longitude: longitude, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$HouseholdTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $HouseholdTable, + HouseholdData, + $$HouseholdTableFilterComposer, + $$HouseholdTableOrderingComposer, + $$HouseholdTableProcessedTableManager, + $$HouseholdTableInsertCompanionBuilder, + $$HouseholdTableUpdateCompanionBuilder> { + $$HouseholdTableProcessedTableManager(super.$state); +} + +class $$HouseholdTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $HouseholdTable> { + $$HouseholdTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get memberCount => $state.composableBuilder( + column: $state.table.memberCount, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get latitude => $state.composableBuilder( + column: $state.table.latitude, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get longitude => $state.composableBuilder( + column: $state.table.longitude, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$HouseholdTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $HouseholdTable> { + $$HouseholdTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get memberCount => $state.composableBuilder( + column: $state.table.memberCount, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get latitude => $state.composableBuilder( + column: $state.table.latitude, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get longitude => $state.composableBuilder( + column: $state.table.longitude, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$HouseholdMemberTableInsertCompanionBuilder = HouseholdMemberCompanion + Function({ + Value id, + Value householdId, + Value householdClientReferenceId, + Value individualId, + Value individualClientReferenceId, + required bool isHeadOfHousehold, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + required String clientReferenceId, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); +typedef $$HouseholdMemberTableUpdateCompanionBuilder = HouseholdMemberCompanion + Function({ + Value id, + Value householdId, + Value householdClientReferenceId, + Value individualId, + Value individualClientReferenceId, + Value isHeadOfHousehold, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value clientReferenceId, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); + +class $$HouseholdMemberTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $HouseholdMemberTable, + HouseholdMemberData, + $$HouseholdMemberTableFilterComposer, + $$HouseholdMemberTableOrderingComposer, + $$HouseholdMemberTableProcessedTableManager, + $$HouseholdMemberTableInsertCompanionBuilder, + $$HouseholdMemberTableUpdateCompanionBuilder> { + $$HouseholdMemberTableTableManager( + _$LocalSqlDataStore db, $HouseholdMemberTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$HouseholdMemberTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$HouseholdMemberTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$HouseholdMemberTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value householdId = const Value.absent(), + Value householdClientReferenceId = const Value.absent(), + Value individualId = const Value.absent(), + Value individualClientReferenceId = const Value.absent(), + Value isHeadOfHousehold = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value clientReferenceId = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + HouseholdMemberCompanion( + id: id, + householdId: householdId, + householdClientReferenceId: householdClientReferenceId, + individualId: individualId, + individualClientReferenceId: individualClientReferenceId, + isHeadOfHousehold: isHeadOfHousehold, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value id = const Value.absent(), + Value householdId = const Value.absent(), + Value householdClientReferenceId = const Value.absent(), + Value individualId = const Value.absent(), + Value individualClientReferenceId = const Value.absent(), + required bool isHeadOfHousehold, + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + required String clientReferenceId, + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + HouseholdMemberCompanion.insert( + id: id, + householdId: householdId, + householdClientReferenceId: householdClientReferenceId, + individualId: individualId, + individualClientReferenceId: individualClientReferenceId, + isHeadOfHousehold: isHeadOfHousehold, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$HouseholdMemberTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $HouseholdMemberTable, + HouseholdMemberData, + $$HouseholdMemberTableFilterComposer, + $$HouseholdMemberTableOrderingComposer, + $$HouseholdMemberTableProcessedTableManager, + $$HouseholdMemberTableInsertCompanionBuilder, + $$HouseholdMemberTableUpdateCompanionBuilder> { + $$HouseholdMemberTableProcessedTableManager(super.$state); +} + +class $$HouseholdMemberTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $HouseholdMemberTable> { + $$HouseholdMemberTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get householdId => $state.composableBuilder( + column: $state.table.householdId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get householdClientReferenceId => + $state.composableBuilder( + column: $state.table.householdClientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get individualId => $state.composableBuilder( + column: $state.table.individualId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get individualClientReferenceId => $state + .composableBuilder( + column: $state.table.individualClientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isHeadOfHousehold => $state.composableBuilder( + column: $state.table.isHeadOfHousehold, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$HouseholdMemberTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $HouseholdMemberTable> { + $$HouseholdMemberTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get householdId => $state.composableBuilder( + column: $state.table.householdId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get householdClientReferenceId => + $state.composableBuilder( + column: $state.table.householdClientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get individualId => $state.composableBuilder( + column: $state.table.individualId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get individualClientReferenceId => + $state.composableBuilder( + column: $state.table.individualClientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isHeadOfHousehold => $state.composableBuilder( + column: $state.table.isHeadOfHousehold, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$TaskTableInsertCompanionBuilder = TaskCompanion Function({ + Value id, + Value projectId, + Value projectBeneficiaryId, + Value projectBeneficiaryClientReferenceId, + Value createdBy, + Value status, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + required String clientReferenceId, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value plannedStartDate, + Value plannedEndDate, + Value actualStartDate, + Value actualEndDate, + Value createdDate, + Value additionalFields, + Value rowid, +}); +typedef $$TaskTableUpdateCompanionBuilder = TaskCompanion Function({ + Value id, + Value projectId, + Value projectBeneficiaryId, + Value projectBeneficiaryClientReferenceId, + Value createdBy, + Value status, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value clientReferenceId, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value plannedStartDate, + Value plannedEndDate, + Value actualStartDate, + Value actualEndDate, + Value createdDate, + Value additionalFields, + Value rowid, +}); + +class $$TaskTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $TaskTable, + TaskData, + $$TaskTableFilterComposer, + $$TaskTableOrderingComposer, + $$TaskTableProcessedTableManager, + $$TaskTableInsertCompanionBuilder, + $$TaskTableUpdateCompanionBuilder> { + $$TaskTableTableManager(_$LocalSqlDataStore db, $TaskTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$TaskTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$TaskTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => $$TaskTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value projectId = const Value.absent(), + Value projectBeneficiaryId = const Value.absent(), + Value projectBeneficiaryClientReferenceId = + const Value.absent(), + Value createdBy = const Value.absent(), + Value status = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value clientReferenceId = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value plannedStartDate = const Value.absent(), + Value plannedEndDate = const Value.absent(), + Value actualStartDate = const Value.absent(), + Value actualEndDate = const Value.absent(), + Value createdDate = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + TaskCompanion( + id: id, + projectId: projectId, + projectBeneficiaryId: projectBeneficiaryId, + projectBeneficiaryClientReferenceId: + projectBeneficiaryClientReferenceId, + createdBy: createdBy, + status: status, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + plannedStartDate: plannedStartDate, + plannedEndDate: plannedEndDate, + actualStartDate: actualStartDate, + actualEndDate: actualEndDate, + createdDate: createdDate, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value id = const Value.absent(), + Value projectId = const Value.absent(), + Value projectBeneficiaryId = const Value.absent(), + Value projectBeneficiaryClientReferenceId = + const Value.absent(), + Value createdBy = const Value.absent(), + Value status = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + required String clientReferenceId, + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value plannedStartDate = const Value.absent(), + Value plannedEndDate = const Value.absent(), + Value actualStartDate = const Value.absent(), + Value actualEndDate = const Value.absent(), + Value createdDate = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + TaskCompanion.insert( + id: id, + projectId: projectId, + projectBeneficiaryId: projectBeneficiaryId, + projectBeneficiaryClientReferenceId: + projectBeneficiaryClientReferenceId, + createdBy: createdBy, + status: status, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + plannedStartDate: plannedStartDate, + plannedEndDate: plannedEndDate, + actualStartDate: actualStartDate, + actualEndDate: actualEndDate, + createdDate: createdDate, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$TaskTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $TaskTable, + TaskData, + $$TaskTableFilterComposer, + $$TaskTableOrderingComposer, + $$TaskTableProcessedTableManager, + $$TaskTableInsertCompanionBuilder, + $$TaskTableUpdateCompanionBuilder> { + $$TaskTableProcessedTableManager(super.$state); +} + +class $$TaskTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $TaskTable> { + $$TaskTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get projectId => $state.composableBuilder( + column: $state.table.projectId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get projectBeneficiaryId => $state.composableBuilder( + column: $state.table.projectBeneficiaryId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get projectBeneficiaryClientReferenceId => + $state.composableBuilder( + column: $state.table.projectBeneficiaryClientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get createdBy => $state.composableBuilder( + column: $state.table.createdBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get status => $state.composableBuilder( + column: $state.table.status, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get plannedStartDate => $state.composableBuilder( + column: $state.table.plannedStartDate, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get plannedEndDate => $state.composableBuilder( + column: $state.table.plannedEndDate, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get actualStartDate => $state.composableBuilder( + column: $state.table.actualStartDate, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get actualEndDate => $state.composableBuilder( + column: $state.table.actualEndDate, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get createdDate => $state.composableBuilder( + column: $state.table.createdDate, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$TaskTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $TaskTable> { + $$TaskTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get projectId => $state.composableBuilder( + column: $state.table.projectId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get projectBeneficiaryId => $state.composableBuilder( + column: $state.table.projectBeneficiaryId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get projectBeneficiaryClientReferenceId => + $state.composableBuilder( + column: $state.table.projectBeneficiaryClientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get createdBy => $state.composableBuilder( + column: $state.table.createdBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get status => $state.composableBuilder( + column: $state.table.status, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get plannedStartDate => $state.composableBuilder( + column: $state.table.plannedStartDate, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get plannedEndDate => $state.composableBuilder( + column: $state.table.plannedEndDate, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get actualStartDate => $state.composableBuilder( + column: $state.table.actualStartDate, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get actualEndDate => $state.composableBuilder( + column: $state.table.actualEndDate, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get createdDate => $state.composableBuilder( + column: $state.table.createdDate, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$TaskResourceTableInsertCompanionBuilder = TaskResourceCompanion + Function({ + required String clientReferenceId, + Value taskclientReferenceId, + Value taskId, + Value id, + Value productVariantId, + Value quantity, + Value isDelivered, + Value deliveryComment, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); +typedef $$TaskResourceTableUpdateCompanionBuilder = TaskResourceCompanion + Function({ + Value clientReferenceId, + Value taskclientReferenceId, + Value taskId, + Value id, + Value productVariantId, + Value quantity, + Value isDelivered, + Value deliveryComment, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); + +class $$TaskResourceTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $TaskResourceTable, + TaskResourceData, + $$TaskResourceTableFilterComposer, + $$TaskResourceTableOrderingComposer, + $$TaskResourceTableProcessedTableManager, + $$TaskResourceTableInsertCompanionBuilder, + $$TaskResourceTableUpdateCompanionBuilder> { + $$TaskResourceTableTableManager( + _$LocalSqlDataStore db, $TaskResourceTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$TaskResourceTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$TaskResourceTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$TaskResourceTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value clientReferenceId = const Value.absent(), + Value taskclientReferenceId = const Value.absent(), + Value taskId = const Value.absent(), + Value id = const Value.absent(), + Value productVariantId = const Value.absent(), + Value quantity = const Value.absent(), + Value isDelivered = const Value.absent(), + Value deliveryComment = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + TaskResourceCompanion( + clientReferenceId: clientReferenceId, + taskclientReferenceId: taskclientReferenceId, + taskId: taskId, + id: id, + productVariantId: productVariantId, + quantity: quantity, + isDelivered: isDelivered, + deliveryComment: deliveryComment, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + required String clientReferenceId, + Value taskclientReferenceId = const Value.absent(), + Value taskId = const Value.absent(), + Value id = const Value.absent(), + Value productVariantId = const Value.absent(), + Value quantity = const Value.absent(), + Value isDelivered = const Value.absent(), + Value deliveryComment = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + TaskResourceCompanion.insert( + clientReferenceId: clientReferenceId, + taskclientReferenceId: taskclientReferenceId, + taskId: taskId, + id: id, + productVariantId: productVariantId, + quantity: quantity, + isDelivered: isDelivered, + deliveryComment: deliveryComment, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$TaskResourceTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $TaskResourceTable, + TaskResourceData, + $$TaskResourceTableFilterComposer, + $$TaskResourceTableOrderingComposer, + $$TaskResourceTableProcessedTableManager, + $$TaskResourceTableInsertCompanionBuilder, + $$TaskResourceTableUpdateCompanionBuilder> { + $$TaskResourceTableProcessedTableManager(super.$state); +} + +class $$TaskResourceTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $TaskResourceTable> { + $$TaskResourceTableFilterComposer(super.$state); + ColumnFilters get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get taskclientReferenceId => $state.composableBuilder( + column: $state.table.taskclientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get taskId => $state.composableBuilder( + column: $state.table.taskId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get productVariantId => $state.composableBuilder( + column: $state.table.productVariantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get quantity => $state.composableBuilder( + column: $state.table.quantity, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDelivered => $state.composableBuilder( + column: $state.table.isDelivered, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get deliveryComment => $state.composableBuilder( + column: $state.table.deliveryComment, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$TaskResourceTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $TaskResourceTable> { + $$TaskResourceTableOrderingComposer(super.$state); + ColumnOrderings get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get taskclientReferenceId => $state.composableBuilder( + column: $state.table.taskclientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get taskId => $state.composableBuilder( + column: $state.table.taskId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get productVariantId => $state.composableBuilder( + column: $state.table.productVariantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get quantity => $state.composableBuilder( + column: $state.table.quantity, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDelivered => $state.composableBuilder( + column: $state.table.isDelivered, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get deliveryComment => $state.composableBuilder( + column: $state.table.deliveryComment, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$SideEffectTableInsertCompanionBuilder = SideEffectCompanion Function({ + Value id, + Value projectId, + Value taskClientReferenceId, + Value projectBeneficiaryClientReferenceId, + Value reAttempts, + Value symptoms, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + required String clientReferenceId, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); +typedef $$SideEffectTableUpdateCompanionBuilder = SideEffectCompanion Function({ + Value id, + Value projectId, + Value taskClientReferenceId, + Value projectBeneficiaryClientReferenceId, + Value reAttempts, + Value symptoms, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value clientReferenceId, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); + +class $$SideEffectTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $SideEffectTable, + SideEffectData, + $$SideEffectTableFilterComposer, + $$SideEffectTableOrderingComposer, + $$SideEffectTableProcessedTableManager, + $$SideEffectTableInsertCompanionBuilder, + $$SideEffectTableUpdateCompanionBuilder> { + $$SideEffectTableTableManager(_$LocalSqlDataStore db, $SideEffectTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$SideEffectTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$SideEffectTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$SideEffectTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value projectId = const Value.absent(), + Value taskClientReferenceId = const Value.absent(), + Value projectBeneficiaryClientReferenceId = + const Value.absent(), + Value reAttempts = const Value.absent(), + Value symptoms = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value clientReferenceId = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + SideEffectCompanion( + id: id, + projectId: projectId, + taskClientReferenceId: taskClientReferenceId, + projectBeneficiaryClientReferenceId: + projectBeneficiaryClientReferenceId, + reAttempts: reAttempts, + symptoms: symptoms, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value id = const Value.absent(), + Value projectId = const Value.absent(), + Value taskClientReferenceId = const Value.absent(), + Value projectBeneficiaryClientReferenceId = + const Value.absent(), + Value reAttempts = const Value.absent(), + Value symptoms = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + required String clientReferenceId, + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + SideEffectCompanion.insert( + id: id, + projectId: projectId, + taskClientReferenceId: taskClientReferenceId, + projectBeneficiaryClientReferenceId: + projectBeneficiaryClientReferenceId, + reAttempts: reAttempts, + symptoms: symptoms, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$SideEffectTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $SideEffectTable, + SideEffectData, + $$SideEffectTableFilterComposer, + $$SideEffectTableOrderingComposer, + $$SideEffectTableProcessedTableManager, + $$SideEffectTableInsertCompanionBuilder, + $$SideEffectTableUpdateCompanionBuilder> { + $$SideEffectTableProcessedTableManager(super.$state); +} + +class $$SideEffectTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $SideEffectTable> { + $$SideEffectTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get projectId => $state.composableBuilder( + column: $state.table.projectId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get taskClientReferenceId => $state.composableBuilder( + column: $state.table.taskClientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get projectBeneficiaryClientReferenceId => + $state.composableBuilder( + column: $state.table.projectBeneficiaryClientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get reAttempts => $state.composableBuilder( + column: $state.table.reAttempts, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get symptoms => $state.composableBuilder( + column: $state.table.symptoms, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$SideEffectTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $SideEffectTable> { + $$SideEffectTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get projectId => $state.composableBuilder( + column: $state.table.projectId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get taskClientReferenceId => $state.composableBuilder( + column: $state.table.taskClientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get projectBeneficiaryClientReferenceId => + $state.composableBuilder( + column: $state.table.projectBeneficiaryClientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get reAttempts => $state.composableBuilder( + column: $state.table.reAttempts, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get symptoms => $state.composableBuilder( + column: $state.table.symptoms, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$ReferralTableInsertCompanionBuilder = ReferralCompanion Function({ + Value id, + Value projectId, + Value projectBeneficiaryClientReferenceId, + Value referrerId, + Value recipientType, + Value recipientId, + Value reasons, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + required String clientReferenceId, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); +typedef $$ReferralTableUpdateCompanionBuilder = ReferralCompanion Function({ + Value id, + Value projectId, + Value projectBeneficiaryClientReferenceId, + Value referrerId, + Value recipientType, + Value recipientId, + Value reasons, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value clientReferenceId, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); + +class $$ReferralTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $ReferralTable, + ReferralData, + $$ReferralTableFilterComposer, + $$ReferralTableOrderingComposer, + $$ReferralTableProcessedTableManager, + $$ReferralTableInsertCompanionBuilder, + $$ReferralTableUpdateCompanionBuilder> { + $$ReferralTableTableManager(_$LocalSqlDataStore db, $ReferralTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$ReferralTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$ReferralTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$ReferralTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value projectId = const Value.absent(), + Value projectBeneficiaryClientReferenceId = + const Value.absent(), + Value referrerId = const Value.absent(), + Value recipientType = const Value.absent(), + Value recipientId = const Value.absent(), + Value reasons = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value clientReferenceId = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + ReferralCompanion( + id: id, + projectId: projectId, + projectBeneficiaryClientReferenceId: + projectBeneficiaryClientReferenceId, + referrerId: referrerId, + recipientType: recipientType, + recipientId: recipientId, + reasons: reasons, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value id = const Value.absent(), + Value projectId = const Value.absent(), + Value projectBeneficiaryClientReferenceId = + const Value.absent(), + Value referrerId = const Value.absent(), + Value recipientType = const Value.absent(), + Value recipientId = const Value.absent(), + Value reasons = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + required String clientReferenceId, + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + ReferralCompanion.insert( + id: id, + projectId: projectId, + projectBeneficiaryClientReferenceId: + projectBeneficiaryClientReferenceId, + referrerId: referrerId, + recipientType: recipientType, + recipientId: recipientId, + reasons: reasons, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$ReferralTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $ReferralTable, + ReferralData, + $$ReferralTableFilterComposer, + $$ReferralTableOrderingComposer, + $$ReferralTableProcessedTableManager, + $$ReferralTableInsertCompanionBuilder, + $$ReferralTableUpdateCompanionBuilder> { + $$ReferralTableProcessedTableManager(super.$state); +} + +class $$ReferralTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $ReferralTable> { + $$ReferralTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get projectId => $state.composableBuilder( + column: $state.table.projectId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get projectBeneficiaryClientReferenceId => + $state.composableBuilder( + column: $state.table.projectBeneficiaryClientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get referrerId => $state.composableBuilder( + column: $state.table.referrerId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get recipientType => $state.composableBuilder( + column: $state.table.recipientType, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get recipientId => $state.composableBuilder( + column: $state.table.recipientId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get reasons => $state.composableBuilder( + column: $state.table.reasons, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$ReferralTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $ReferralTable> { + $$ReferralTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get projectId => $state.composableBuilder( + column: $state.table.projectId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get projectBeneficiaryClientReferenceId => + $state.composableBuilder( + column: $state.table.projectBeneficiaryClientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get referrerId => $state.composableBuilder( + column: $state.table.referrerId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get recipientType => $state.composableBuilder( + column: $state.table.recipientType, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get recipientId => $state.composableBuilder( + column: $state.table.recipientId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get reasons => $state.composableBuilder( + column: $state.table.reasons, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$LocalizationTableInsertCompanionBuilder = LocalizationCompanion + Function({ + required String locale, + required String code, + required String message, + required String module, + Value rowid, +}); +typedef $$LocalizationTableUpdateCompanionBuilder = LocalizationCompanion + Function({ + Value locale, + Value code, + Value message, + Value module, + Value rowid, +}); + +class $$LocalizationTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $LocalizationTable, + LocalizationData, + $$LocalizationTableFilterComposer, + $$LocalizationTableOrderingComposer, + $$LocalizationTableProcessedTableManager, + $$LocalizationTableInsertCompanionBuilder, + $$LocalizationTableUpdateCompanionBuilder> { + $$LocalizationTableTableManager( + _$LocalSqlDataStore db, $LocalizationTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$LocalizationTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$LocalizationTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$LocalizationTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value locale = const Value.absent(), + Value code = const Value.absent(), + Value message = const Value.absent(), + Value module = const Value.absent(), + Value rowid = const Value.absent(), + }) => + LocalizationCompanion( + locale: locale, + code: code, + message: message, + module: module, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + required String locale, + required String code, + required String message, + required String module, + Value rowid = const Value.absent(), + }) => + LocalizationCompanion.insert( + locale: locale, + code: code, + message: message, + module: module, + rowid: rowid, + ), + )); +} + +class $$LocalizationTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $LocalizationTable, + LocalizationData, + $$LocalizationTableFilterComposer, + $$LocalizationTableOrderingComposer, + $$LocalizationTableProcessedTableManager, + $$LocalizationTableInsertCompanionBuilder, + $$LocalizationTableUpdateCompanionBuilder> { + $$LocalizationTableProcessedTableManager(super.$state); +} + +class $$LocalizationTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $LocalizationTable> { + $$LocalizationTableFilterComposer(super.$state); + ColumnFilters get locale => $state.composableBuilder( + column: $state.table.locale, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get code => $state.composableBuilder( + column: $state.table.code, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get message => $state.composableBuilder( + column: $state.table.message, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get module => $state.composableBuilder( + column: $state.table.module, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$LocalizationTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $LocalizationTable> { + $$LocalizationTableOrderingComposer(super.$state); + ColumnOrderings get locale => $state.composableBuilder( + column: $state.table.locale, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get code => $state.composableBuilder( + column: $state.table.code, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get message => $state.composableBuilder( + column: $state.table.message, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get module => $state.composableBuilder( + column: $state.table.module, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +class _$LocalSqlDataStoreManager { + final _$LocalSqlDataStore _db; + _$LocalSqlDataStoreManager(this._db); + $$AttendanceRegisterTableTableManager get attendanceRegister => + $$AttendanceRegisterTableTableManager(_db, _db.attendanceRegister); + $$AttendanceTableTableManager get attendance => + $$AttendanceTableTableManager(_db, _db.attendance); + $$AttendeeTableTableManager get attendee => + $$AttendeeTableTableManager(_db, _db.attendee); + $$AddressTableTableManager get address => + $$AddressTableTableManager(_db, _db.address); + $$NameTableTableManager get name => $$NameTableTableManager(_db, _db.name); + $$BoundaryTableTableManager get boundary => + $$BoundaryTableTableManager(_db, _db.boundary); + $$DocumentTableTableManager get document => + $$DocumentTableTableManager(_db, _db.document); + $$FacilityTableTableManager get facility => + $$FacilityTableTableManager(_db, _db.facility); + $$ProductTableTableManager get product => + $$ProductTableTableManager(_db, _db.product); + $$ProductVariantTableTableManager get productVariant => + $$ProductVariantTableTableManager(_db, _db.productVariant); + $$ProjectTableTableManager get project => + $$ProjectTableTableManager(_db, _db.project); + $$ProjectBeneficiaryTableTableManager get projectBeneficiary => + $$ProjectBeneficiaryTableTableManager(_db, _db.projectBeneficiary); + $$ProjectFacilityTableTableManager get projectFacility => + $$ProjectFacilityTableTableManager(_db, _db.projectFacility); + $$ProjectProductVariantTableTableManager get projectProductVariant => + $$ProjectProductVariantTableTableManager(_db, _db.projectProductVariant); + $$ProjectResourceTableTableManager get projectResource => + $$ProjectResourceTableTableManager(_db, _db.projectResource); + $$ProjectStaffTableTableManager get projectStaff => + $$ProjectStaffTableTableManager(_db, _db.projectStaff); + $$ProjectTypeTableTableManager get projectType => + $$ProjectTypeTableTableManager(_db, _db.projectType); + $$IndividualTableTableManager get individual => + $$IndividualTableTableManager(_db, _db.individual); + $$IdentifierTableTableManager get identifier => + $$IdentifierTableTableManager(_db, _db.identifier); + $$StockTableTableManager get stock => + $$StockTableTableManager(_db, _db.stock); + $$StockReconciliationTableTableManager get stockReconciliation => + $$StockReconciliationTableTableManager(_db, _db.stockReconciliation); + $$TargetTableTableManager get target => + $$TargetTableTableManager(_db, _db.target); + $$ServiceTableTableManager get service => + $$ServiceTableTableManager(_db, _db.service); + $$ServiceAttributesTableTableManager get serviceAttributes => + $$ServiceAttributesTableTableManager(_db, _db.serviceAttributes); + $$ServiceDefinitionTableTableManager get serviceDefinition => + $$ServiceDefinitionTableTableManager(_db, _db.serviceDefinition); + $$LocalityTableTableManager get locality => + $$LocalityTableTableManager(_db, _db.locality); + $$StaffTableTableManager get staff => + $$StaffTableTableManager(_db, _db.staff); + $$AttributesTableTableManager get attributes => + $$AttributesTableTableManager(_db, _db.attributes); + $$PgrServiceTableTableManager get pgrService => + $$PgrServiceTableTableManager(_db, _db.pgrService); + $$PgrComplainantTableTableManager get pgrComplainant => + $$PgrComplainantTableTableManager(_db, _db.pgrComplainant); + $$UserTableTableManager get user => $$UserTableTableManager(_db, _db.user); + $$DownsyncTableTableManager get downsync => + $$DownsyncTableTableManager(_db, _db.downsync); + $$DownsyncCriteriaTableTableManager get downsyncCriteria => + $$DownsyncCriteriaTableTableManager(_db, _db.downsyncCriteria); + $$HFReferralTableTableManager get hFReferral => + $$HFReferralTableTableManager(_db, _db.hFReferral); + $$HouseholdTableTableManager get household => + $$HouseholdTableTableManager(_db, _db.household); + $$HouseholdMemberTableTableManager get householdMember => + $$HouseholdMemberTableTableManager(_db, _db.householdMember); + $$TaskTableTableManager get task => $$TaskTableTableManager(_db, _db.task); + $$TaskResourceTableTableManager get taskResource => + $$TaskResourceTableTableManager(_db, _db.taskResource); + $$SideEffectTableTableManager get sideEffect => + $$SideEffectTableTableManager(_db, _db.sideEffect); + $$ReferralTableTableManager get referral => + $$ReferralTableTableManager(_db, _db.referral); + $$LocalizationTableTableManager get localization => + $$LocalizationTableTableManager(_db, _db.localization); +} diff --git a/packages/digit_data_model/lib/data/local_store/sql_store/tables/attributes.dart b/packages/digit_data_model/lib/data/local_store/sql_store/tables/attributes.dart index 82d1ecdb3..18e330a5c 100644 --- a/packages/digit_data_model/lib/data/local_store/sql_store/tables/attributes.dart +++ b/packages/digit_data_model/lib/data/local_store/sql_store/tables/attributes.dart @@ -9,7 +9,7 @@ class Attributes extends Table { TextColumn get tenantId => text().nullable()(); TextColumn get code => text().nullable()(); TextColumn get values => text().nullable()(); - TextColumn get isActive => text().nullable()(); + BoolColumn get isActive => boolean().nullable()(); BoolColumn get required => boolean().nullable()(); TextColumn get regex => text().nullable()(); IntColumn get order => integer().nullable()(); diff --git a/packages/digit_data_model/lib/data/local_store/sql_store/tables/facility.dart b/packages/digit_data_model/lib/data/local_store/sql_store/tables/facility.dart index f01360c6b..855e862d7 100644 --- a/packages/digit_data_model/lib/data/local_store/sql_store/tables/facility.dart +++ b/packages/digit_data_model/lib/data/local_store/sql_store/tables/facility.dart @@ -16,6 +16,7 @@ class Facility extends Table { TextColumn get auditModifiedBy => text().nullable()(); IntColumn get auditModifiedTime => integer().nullable()(); TextColumn get tenantId => text().nullable()(); + TextColumn get name => text().nullable()(); BoolColumn get isDeleted => boolean().nullable().withDefault(const Constant(false))(); IntColumn get rowVersion => integer().nullable()(); diff --git a/packages/digit_data_model/lib/data/local_store/sql_store/tables/package_tables/side_effect.dart b/packages/digit_data_model/lib/data/local_store/sql_store/tables/package_tables/side_effect.dart index bc048e1f5..faafe7a2e 100644 --- a/packages/digit_data_model/lib/data/local_store/sql_store/tables/package_tables/side_effect.dart +++ b/packages/digit_data_model/lib/data/local_store/sql_store/tables/package_tables/side_effect.dart @@ -9,6 +9,7 @@ class SideEffect extends Table { TextColumn get id => text().nullable()(); TextColumn get projectId => text().nullable()(); TextColumn get taskClientReferenceId => text().nullable()(); + TextColumn get projectBeneficiaryClientReferenceId => text().nullable()(); IntColumn get reAttempts => integer().nullable()(); TextColumn get symptoms => text().nullable()(); TextColumn get auditCreatedBy => text().nullable()(); diff --git a/packages/digit_data_model/lib/data/local_store/sql_store/tables/package_tables/stock.dart b/packages/digit_data_model/lib/data/local_store/sql_store/tables/package_tables/stock.dart index f40613c14..9630d57a0 100644 --- a/packages/digit_data_model/lib/data/local_store/sql_store/tables/package_tables/stock.dart +++ b/packages/digit_data_model/lib/data/local_store/sql_store/tables/package_tables/stock.dart @@ -20,6 +20,7 @@ class Stock extends Table { TextColumn get receiverType => text().nullable()(); TextColumn get senderId => text().nullable()(); TextColumn get senderType => text().nullable()(); + IntColumn get dateOfEntry => integer().nullable()(); TextColumn get auditCreatedBy => text().nullable()(); BoolColumn get nonRecoverableError => boolean().nullable().withDefault(const Constant(false))(); diff --git a/packages/digit_data_model/lib/data/local_store/sql_store/tables/pgr_service.dart b/packages/digit_data_model/lib/data/local_store/sql_store/tables/pgr_service.dart index d6934513b..abaa3745c 100644 --- a/packages/digit_data_model/lib/data/local_store/sql_store/tables/pgr_service.dart +++ b/packages/digit_data_model/lib/data/local_store/sql_store/tables/pgr_service.dart @@ -1,6 +1,6 @@ import 'package:drift/drift.dart'; -import '../../../../models/pgr_complaints/pgr_complaints.dart'; +import '/models/entities/pgr_application_status.dart'; class PgrService extends Table { diff --git a/packages/digit_data_model/lib/data/local_store/sql_store/tables/project.dart b/packages/digit_data_model/lib/data/local_store/sql_store/tables/project.dart index 4bdffcf65..0581066f4 100644 --- a/packages/digit_data_model/lib/data/local_store/sql_store/tables/project.dart +++ b/packages/digit_data_model/lib/data/local_store/sql_store/tables/project.dart @@ -3,6 +3,7 @@ import 'package:drift/drift.dart'; class Project extends Table { + TextColumn get projectType => text().nullable()(); TextColumn get id => text()(); TextColumn get projectTypeId => text().nullable()(); TextColumn get projectNumber => text().nullable()(); diff --git a/packages/digit_data_model/lib/data/local_store/sql_store/tables/target.dart b/packages/digit_data_model/lib/data/local_store/sql_store/tables/target.dart index 09140859b..604debbf3 100644 --- a/packages/digit_data_model/lib/data/local_store/sql_store/tables/target.dart +++ b/packages/digit_data_model/lib/data/local_store/sql_store/tables/target.dart @@ -1,6 +1,7 @@ // Generated using mason. Do not modify by hand import 'package:drift/drift.dart'; +import '../../../../models/entities/beneficiary_type.dart'; class Target extends Table { TextColumn get id => text()(); @@ -21,8 +22,7 @@ class Target extends Table { BoolColumn get isDeleted => boolean().nullable().withDefault(const Constant(false))(); IntColumn get rowVersion => integer().nullable()(); - TextColumn get beneficiaryType => text().nullable()(); - + IntColumn get beneficiaryType => intEnum().nullable()(); TextColumn get additionalFields => text().nullable()(); @override diff --git a/packages/digit_data_model/lib/data/oplog/oplog.dart b/packages/digit_data_model/lib/data/oplog/oplog.dart index c22c3ede1..6ea7b7ba9 100644 --- a/packages/digit_data_model/lib/data/oplog/oplog.dart +++ b/packages/digit_data_model/lib/data/oplog/oplog.dart @@ -163,59 +163,6 @@ class ProjectOpLogManager extends OpLogManager { entity.nonRecoverableError; } -class ServiceDefinitionOpLogManager - extends OpLogManager { - ServiceDefinitionOpLogManager(super.isar); - - @override - ServiceDefinitionModel applyServerGeneratedIdToEntity( - ServiceDefinitionModel entity, - String serverGeneratedId, - int rowVersion, - ) => - entity.copyWith(id: serverGeneratedId, rowVersion: rowVersion); - - @override - String getClientReferenceId(ServiceDefinitionModel entity) { - throw UnimplementedError(); - } - - @override - String? getServerGeneratedId(ServiceDefinitionModel entity) => entity.id; - - @override - int? getRowVersion(ServiceDefinitionModel entity) => entity.rowVersion; - - @override - bool? getNonRecoverableError(ServiceDefinitionModel entity) => - entity.nonRecoverableError; -} - -class ServiceOpLogManager extends OpLogManager { - ServiceOpLogManager(super.isar); - - @override - ServiceModel applyServerGeneratedIdToEntity( - ServiceModel entity, - String serverGeneratedId, - int rowVersion, - ) => - entity.copyWith(id: serverGeneratedId, rowVersion: rowVersion); - - @override - String getClientReferenceId(ServiceModel entity) => entity.clientId; - - @override - String? getServerGeneratedId(ServiceModel entity) => entity.id; - - @override - int? getRowVersion(ServiceModel entity) => entity.rowVersion; - - @override - bool? getNonRecoverableError(ServiceModel entity) => - entity.nonRecoverableError; -} - class ProjectResourceOpLogManager extends OpLogManager { ProjectResourceOpLogManager(super.isar); @@ -292,92 +239,3 @@ class BoundaryOpLogManager extends OpLogManager { bool? getNonRecoverableError(BoundaryModel entity) => throw UnimplementedError(); } - -class PgrServiceOpLogManager extends OpLogManager { - PgrServiceOpLogManager(super.isar); - - @override - PgrServiceModel applyServerGeneratedIdToEntity( - PgrServiceModel entity, - String serverGeneratedId, - int rowVersion, - ) => - entity.copyWith( - serviceRequestId: serverGeneratedId, - rowVersion: rowVersion, - ); - - @override - String getClientReferenceId(PgrServiceModel entity) { - return entity.clientReferenceId; - } - - @override - String? getServerGeneratedId(PgrServiceModel entity) { - return entity.serviceRequestId; - } - - @override - int? getRowVersion(PgrServiceModel entity) => entity.rowVersion; - - @override - bool? getNonRecoverableError(PgrServiceModel entity) => - entity.nonRecoverableError; - - @override - Future>> getPendingUpSync( - DataModelType type, { - required String createdBy, - }) async { - final pendingEntries = await isar.opLogs - .filter() - .entityTypeEqualTo(type) - .operationEqualTo(DataOperation.create) - .serverGeneratedIdIsNull() - .syncedUpEqualTo(false) - .syncedDownEqualTo(false) - .createdByEqualTo(createdBy) - .sortByCreatedAt() - .findAll(); - - final entriesList = pendingEntries.map((e) { - return OpLogEntry.fromOpLog(e); - }).toList(); - - return entriesList; - } - - //Note: PendingDownSync is not required for PGR Create Oplogs. This creates Mapper Exception issue for checking pending downsync entries of complaints type - // @override - // Future>> getPendingDownSync( - // DataModelType type, { - // required String createdBy, - // }) async { - // final pendingEntries = await isar.opLogs - // .filter() - // .entityTypeEqualTo(type) - // .serverGeneratedIdIsNotNull() - // .syncedUpEqualTo(true) - // .syncedDownEqualTo(false) - // .createdByEqualTo(createdBy) - // .sortByCreatedAt() - // .findAll(); - // - // final entriesList = pendingEntries - // .map((e) { - // final entity = e.getEntity(); - // if ([ - // PgrServiceApplicationStatus.created, - // PgrServiceApplicationStatus.pendingAssignment, - // ].contains(entity.applicationStatus)) { - // return OpLogEntry.fromOpLog(e); - // } - // - // return null; - // }) - // .whereNotNull() - // .toList(); - // - // return entriesList; - // } -} diff --git a/packages/digit_data_model/lib/data/repositories/local/base/service_attributes_base.dart b/packages/digit_data_model/lib/data/repositories/local/base/service_attributes_base.dart deleted file mode 100644 index 038ba41fd..000000000 --- a/packages/digit_data_model/lib/data/repositories/local/base/service_attributes_base.dart +++ /dev/null @@ -1,12 +0,0 @@ -import 'package:digit_data_model/data_model.dart'; -import 'package:drift/drift.dart'; - -abstract class ServiceAttributesLocalBaseRepository - extends LocalRepository { - const ServiceAttributesLocalBaseRepository(super.sql, super.opLogManager); - - @override - DataModelType get type => DataModelType.serviceAttributes; - - TableInfo get table => sql.serviceAttributes; -} diff --git a/packages/digit_data_model/lib/data/repositories/local/base/service_base.dart b/packages/digit_data_model/lib/data/repositories/local/base/service_base.dart deleted file mode 100644 index 0b0d19dac..000000000 --- a/packages/digit_data_model/lib/data/repositories/local/base/service_base.dart +++ /dev/null @@ -1,12 +0,0 @@ -import 'package:digit_data_model/data_model.dart'; -import 'package:drift/drift.dart'; - -abstract class ServiceLocalBaseRepository - extends LocalRepository { - const ServiceLocalBaseRepository(super.sql, super.opLogManager); - - @override - DataModelType get type => DataModelType.service; - - TableInfo get table => sql.service; -} \ No newline at end of file diff --git a/packages/digit_data_model/lib/data/repositories/local/base/service_definition_base.dart b/packages/digit_data_model/lib/data/repositories/local/base/service_definition_base.dart deleted file mode 100644 index 9a5e0043b..000000000 --- a/packages/digit_data_model/lib/data/repositories/local/base/service_definition_base.dart +++ /dev/null @@ -1,13 +0,0 @@ -import 'package:digit_data_model/data_model.dart'; -import 'package:drift/drift.dart'; - - -abstract class ServiceDefinitionLocalBaseRepository - extends LocalRepository { - const ServiceDefinitionLocalBaseRepository(super.sql, super.opLogManager); - - @override - DataModelType get type => DataModelType.serviceDefinition; - - TableInfo get table => sql.serviceDefinition; -} diff --git a/packages/digit_data_model/lib/data/repositories/local/facility.dart b/packages/digit_data_model/lib/data/repositories/local/facility.dart index faf3a42f3..2da80ea13 100644 --- a/packages/digit_data_model/lib/data/repositories/local/facility.dart +++ b/packages/digit_data_model/lib/data/repositories/local/facility.dart @@ -1,11 +1,8 @@ import 'dart:async'; import 'package:digit_data_model/data_model.dart'; -import 'package:digit_data_model/models/oplog/oplog_entry.dart'; import 'package:drift/drift.dart'; -import '../../../utils/utils.dart'; - class FacilityLocalRepository extends LocalRepository { FacilityLocalRepository(super.sql, super.opLogManager); diff --git a/packages/digit_data_model/lib/data/repositories/oplog/oplog.dart b/packages/digit_data_model/lib/data/repositories/oplog/oplog.dart index 113b194c7..7df9705b5 100644 --- a/packages/digit_data_model/lib/data/repositories/oplog/oplog.dart +++ b/packages/digit_data_model/lib/data/repositories/oplog/oplog.dart @@ -146,7 +146,7 @@ abstract class OpLogManager { }); } catch (e) { if (kDebugMode) { - print('error in isar ${e}'); + print('error in isar $e'); } rethrow; } diff --git a/packages/digit_data_model/lib/data/repositories/remote/attributes.dart b/packages/digit_data_model/lib/data/repositories/remote/attributes.dart index 2f4ceb4b0..7e6179356 100644 --- a/packages/digit_data_model/lib/data/repositories/remote/attributes.dart +++ b/packages/digit_data_model/lib/data/repositories/remote/attributes.dart @@ -1,7 +1,6 @@ // Generated using mason. Do not modify by hand import 'package:digit_data_model/data_model.dart'; -import '../../../models/entities/attributes.dart'; class AttributesRemoteRepository extends RemoteRepository { AttributesRemoteRepository( diff --git a/packages/digit_data_model/lib/data/repositories/remote/facility.dart b/packages/digit_data_model/lib/data/repositories/remote/facility.dart index 3703e1198..1c4635243 100644 --- a/packages/digit_data_model/lib/data/repositories/remote/facility.dart +++ b/packages/digit_data_model/lib/data/repositories/remote/facility.dart @@ -6,8 +6,8 @@ import 'package:dart_mappable/dart_mappable.dart'; import 'package:digit_data_model/data_model.dart'; import 'package:dio/dio.dart'; - -class FacilityRemoteRepository extends RemoteRepository { +class FacilityRemoteRepository + extends RemoteRepository { FacilityRemoteRepository( super.dio, { required super.actionMap, @@ -17,20 +17,25 @@ class FacilityRemoteRepository extends RemoteRepository> search( - FacilitySearchModel query, { - int? offSet, - int? limit, - }) async { + FacilitySearchModel query, { + int? offSet, + int? limit, + }) async { int defaultBatchSize = limit ?? 100; // Default batch size for fetching data int currentOffset = offSet ?? 0; List allResults = []; - bool hasMoreData = true; - List>? lastResponse; - while (hasMoreData) { + //To fetch the totalCount from the first Response + bool flag = true; + + //Total number of records + var totalCount = 0; + + do { Response response; + //Execute the request try { response = await executeFuture( future: () async { @@ -42,17 +47,9 @@ class FacilityRemoteRepository extends RemoteRepository>().toList(); - - if (lastResponse != null && lastResponse.toString() == entityList.toString()) { - // If the last response is equal to the current response, stop fetching more data - break; - } + final entityList = + entityResponse.whereType>().toList(); List currentBatch; try { - currentBatch = entityList.map((e) => MapperContainer.globals.fromMap(e)).toList(); + currentBatch = entityList + .map((e) => MapperContainer.globals.fromMap(e)) + .toList(); } catch (e) { rethrow; } - if (currentBatch.isEmpty) { - hasMoreData = false; // if no more data stop fetching - } else { - allResults.addAll(currentBatch); - currentOffset += defaultBatchSize; - lastResponse = entityList; // Update lastResponse to the current response - } - } + allResults.addAll(currentBatch); + currentOffset += defaultBatchSize; + totalCount -= defaultBatchSize; + + //If remaining record is less than defaultBatchSize, adjust the Batch size + if (totalCount < defaultBatchSize) defaultBatchSize = totalCount; + } while (totalCount > 0); return allResults; } diff --git a/packages/digit_data_model/lib/data/repositories/remote/product.dart b/packages/digit_data_model/lib/data/repositories/remote/product.dart index e36138872..90ad1d2a6 100644 --- a/packages/digit_data_model/lib/data/repositories/remote/product.dart +++ b/packages/digit_data_model/lib/data/repositories/remote/product.dart @@ -2,8 +2,6 @@ import 'package:digit_data_model/data_model.dart'; -import '../../../models/entities/product.dart'; - class ProductRemoteRepository extends RemoteRepository { ProductRemoteRepository( diff --git a/packages/digit_data_model/lib/data/repositories/remote/project_staff.dart b/packages/digit_data_model/lib/data/repositories/remote/project_staff.dart index 671dcba84..4d6a30046 100644 --- a/packages/digit_data_model/lib/data/repositories/remote/project_staff.dart +++ b/packages/digit_data_model/lib/data/repositories/remote/project_staff.dart @@ -2,8 +2,6 @@ import 'package:digit_data_model/data_model.dart'; -import '../../../models/entities/project_staff.dart'; - class ProjectStaffRemoteRepository extends RemoteRepository { ProjectStaffRemoteRepository( diff --git a/packages/digit_data_model/lib/data/repositories/remote/user.dart b/packages/digit_data_model/lib/data/repositories/remote/user.dart index e22f40b43..25b5182af 100644 --- a/packages/digit_data_model/lib/data/repositories/remote/user.dart +++ b/packages/digit_data_model/lib/data/repositories/remote/user.dart @@ -2,8 +2,6 @@ import 'package:digit_data_model/data_model.dart'; -import '../../../models/entities/user.dart'; - class UserRemoteRepository extends RemoteRepository { UserRemoteRepository( diff --git a/packages/digit_data_model/lib/data_model.dart b/packages/digit_data_model/lib/data_model.dart index 364246937..980b4721f 100644 --- a/packages/digit_data_model/lib/data_model.dart +++ b/packages/digit_data_model/lib/data_model.dart @@ -18,8 +18,6 @@ export 'blocs/boundary/boundary.dart'; export 'blocs/facility/facility.dart'; export 'blocs/product_variant/product_variant.dart'; export 'blocs/project_facility/project_facility.dart'; -export 'blocs/service/service.dart'; -export 'blocs/service_definition/service_definition.dart'; export 'blocs/user/user.dart'; export 'data/data_repository.dart'; export 'data/local_store/no_sql/schema/oplog.dart' hide AdditionalId; @@ -35,27 +33,20 @@ export 'data/repositories/local/base/project_facility_base.dart'; export 'data/repositories/local/base/project_product_variant_base.dart'; export 'data/repositories/local/base/project_resource_base.dart'; export 'data/repositories/local/base/project_staff_base.dart'; -export 'data/repositories/local/base/service_attributes_base.dart'; -export 'data/repositories/local/base/service_base.dart'; -export 'data/repositories/local/base/service_definition_base.dart'; export 'data/repositories/local/base/user_base.dart'; export 'data/repositories/local/boundary.dart'; export 'data/repositories/local/facility.dart'; export 'data/repositories/local/individual.dart'; -export 'data/repositories/local/pgr_service.dart'; export 'data/repositories/local/product_variant.dart'; export 'data/repositories/local/project.dart'; export 'data/repositories/local/project_facility.dart'; export 'data/repositories/local/project_resource.dart'; export 'data/repositories/local/project_staff.dart'; -export 'data/repositories/local/service.dart'; -export 'data/repositories/local/service_definition.dart'; export 'data/repositories/oplog/oplog.dart'; export 'data/repositories/remote/attributes.dart'; export 'data/repositories/remote/boundary.dart'; export 'data/repositories/remote/facility.dart'; export 'data/repositories/remote/individual.dart'; -export 'data/repositories/remote/pgr_service.dart'; export 'data/repositories/remote/product.dart'; export 'data/repositories/remote/product_variant.dart'; export 'data/repositories/remote/project.dart'; @@ -63,9 +54,6 @@ export 'data/repositories/remote/project_facility.dart'; export 'data/repositories/remote/project_product_variant.dart'; export 'data/repositories/remote/project_resource.dart'; export 'data/repositories/remote/project_staff.dart'; -export 'data/repositories/remote/service.dart'; -export 'data/repositories/remote/service_attributes.dart'; -export 'data/repositories/remote/service_definition.dart'; export 'data/repositories/remote/user.dart'; export 'models/entities/address.dart'; export 'models/entities/attributes.dart'; @@ -88,16 +76,10 @@ export 'models/entities/project_product_variant.dart'; export 'models/entities/project_resource.dart'; export 'models/entities/project_staff.dart'; export 'models/entities/project_type.dart'; -export 'models/entities/service.dart'; -export 'models/entities/service_attributes.dart'; -export 'models/entities/service_definition.dart'; export 'models/entities/target.dart'; export 'models/entities/user.dart'; export 'models/oplog/oplog_entry.dart' show OpLogEntry; export 'models/oplog/oplog_entry.dart'; -export 'models/pgr_complaints/pgr_address.dart'; -export 'models/pgr_complaints/pgr_complaints.dart'; -export 'models/pgr_complaints/pgr_complaints_response.dart'; export 'models/project_type/project_type_model.dart'; export 'utils/constants.dart' hide EntityPlurals; export 'utils/utils.dart'; diff --git a/packages/digit_data_model/lib/data_model.init.dart b/packages/digit_data_model/lib/data_model.init.dart index 4720ba13f..b1d6fe772 100644 --- a/packages/digit_data_model/lib/data_model.init.dart +++ b/packages/digit_data_model/lib/data_model.init.dart @@ -17,24 +17,19 @@ import 'models/entities/identifier.dart' as p10; import 'models/entities/individual.dart' as p11; import 'models/entities/locality.dart' as p12; import 'models/entities/name.dart' as p13; -import 'models/entities/product.dart' as p14; -import 'models/entities/product_variant.dart' as p15; -import 'models/entities/project.dart' as p16; -import 'models/entities/project_facility.dart' as p17; -import 'models/entities/project_product_variant.dart' as p18; -import 'models/entities/project_resource.dart' as p19; -import 'models/entities/project_staff.dart' as p20; -import 'models/entities/project_type.dart' as p21; -import 'models/entities/service.dart' as p22; -import 'models/entities/service_attributes.dart' as p23; -import 'models/entities/service_definition.dart' as p24; -import 'models/entities/target.dart' as p25; -import 'models/entities/user.dart' as p26; -import 'models/entities/user_action.dart' as p27; -import 'models/oplog/oplog_entry.dart' as p28; -import 'models/pgr_complaints/pgr_address.dart' as p29; -import 'models/pgr_complaints/pgr_complaints.dart' as p30; -import 'models/pgr_complaints/pgr_complaints_response.dart' as p31; +import 'models/entities/pgr_application_status.dart' as p14; +import 'models/entities/product.dart' as p15; +import 'models/entities/product_variant.dart' as p16; +import 'models/entities/project.dart' as p17; +import 'models/entities/project_facility.dart' as p18; +import 'models/entities/project_product_variant.dart' as p19; +import 'models/entities/project_resource.dart' as p20; +import 'models/entities/project_staff.dart' as p21; +import 'models/entities/project_type.dart' as p22; +import 'models/entities/target.dart' as p23; +import 'models/entities/user.dart' as p24; +import 'models/entities/user_action.dart' as p25; +import 'models/oplog/oplog_entry.dart' as p26; void initializeMappers() { p0.EntityModelMapper.ensureInitialized(); @@ -73,70 +68,46 @@ void initializeMappers() { p13.NameSearchModelMapper.ensureInitialized(); p13.NameModelMapper.ensureInitialized(); p13.NameAdditionalFieldsMapper.ensureInitialized(); - p14.ProductSearchModelMapper.ensureInitialized(); - p14.ProductModelMapper.ensureInitialized(); - p14.ProductAdditionalFieldsMapper.ensureInitialized(); - p15.ProductVariantSearchModelMapper.ensureInitialized(); - p15.ProductVariantModelMapper.ensureInitialized(); - p15.ProductVariantAdditionalFieldsMapper.ensureInitialized(); - p16.ProjectSearchModelMapper.ensureInitialized(); - p16.ProjectModelMapper.ensureInitialized(); - p16.ProjectAdditionalFieldsMapper.ensureInitialized(); - p16.ProjectAdditionalDetailsMapper.ensureInitialized(); - p17.ProjectFacilitySearchModelMapper.ensureInitialized(); - p17.ProjectFacilityModelMapper.ensureInitialized(); - p17.ProjectFacilityAdditionalFieldsMapper.ensureInitialized(); - p18.ProjectProductVariantSearchModelMapper.ensureInitialized(); - p18.ProjectProductVariantModelMapper.ensureInitialized(); - p18.ProjectProductVariantAdditionalFieldsMapper.ensureInitialized(); - p19.ProjectResourceSearchModelMapper.ensureInitialized(); - p19.ProjectResourceModelMapper.ensureInitialized(); - p19.ProjectResourceAdditionalFieldsMapper.ensureInitialized(); - p20.ProjectStaffSearchModelMapper.ensureInitialized(); - p20.ProjectStaffModelMapper.ensureInitialized(); - p20.ProjectStaffAdditionalFieldsMapper.ensureInitialized(); - p21.ProjectTypeModelMapper.ensureInitialized(); - p21.ProjectTypeAdditionalFieldsMapper.ensureInitialized(); - p21.ProjectCycleMapper.ensureInitialized(); - p21.ProjectCycleDeliveryMapper.ensureInitialized(); - p21.DeliveryDoseCriteriaMapper.ensureInitialized(); - p21.DeliveryProductVariantMapper.ensureInitialized(); - p22.ServiceSearchModelMapper.ensureInitialized(); - p22.ServiceModelMapper.ensureInitialized(); - p22.ServiceAdditionalFieldsMapper.ensureInitialized(); - p23.ServiceAttributesSearchModelMapper.ensureInitialized(); - p23.ServiceAttributesModelMapper.ensureInitialized(); - p23.ServiceAttributesAdditionalFieldsMapper.ensureInitialized(); - p24.ServiceDefinitionSearchModelMapper.ensureInitialized(); - p24.ServiceDefinitionModelMapper.ensureInitialized(); - p24.ServiceDefinitionAdditionalFieldsMapper.ensureInitialized(); - p25.TargetSearchModelMapper.ensureInitialized(); - p25.TargetModelMapper.ensureInitialized(); - p25.TargetAdditionalFieldsMapper.ensureInitialized(); - p26.UserSearchModelMapper.ensureInitialized(); - p26.UserModelMapper.ensureInitialized(); - p26.UserAdditionalFieldsMapper.ensureInitialized(); - p27.UserActionSearchModelMapper.ensureInitialized(); - p27.UserActionModelMapper.ensureInitialized(); - p27.UserActionAdditionalFieldsMapper.ensureInitialized(); - p28.OpLogEntryMapper.ensureInitialized(); - p28.AdditionalIdMapper.ensureInitialized(); - p28.DataOperationMapper.ensureInitialized(); - p28.ApiOperationMapper.ensureInitialized(); - p29.PgrAddressModelMapper.ensureInitialized(); - p29.GeoLocationMapper.ensureInitialized(); - p30.PgrComplaintModelMapper.ensureInitialized(); - p30.PgrComplainantModelMapper.ensureInitialized(); - p30.PgrRolesModelMapper.ensureInitialized(); - p30.PgrServiceSearchModelMapper.ensureInitialized(); - p30.PgrServiceModelMapper.ensureInitialized(); - p30.PgrWorkflowModelMapper.ensureInitialized(); - p30.PgrFiltersMapper.ensureInitialized(); - p30.PgrSearchKeysMapper.ensureInitialized(); - p30.PgrAdditionalDetailsMapper.ensureInitialized(); - p30.PgrServiceApplicationStatusMapper.ensureInitialized(); - p31.PgrServiceCreateResponseModelMapper.ensureInitialized(); - p31.PgrComplaintResponseModelMapper.ensureInitialized(); - p31.PgrComplainantResponseModelMapper.ensureInitialized(); - p31.PgrServiceResponseModelMapper.ensureInitialized(); + p14.PgrServiceApplicationStatusMapper.ensureInitialized(); + p15.ProductSearchModelMapper.ensureInitialized(); + p15.ProductModelMapper.ensureInitialized(); + p15.ProductAdditionalFieldsMapper.ensureInitialized(); + p16.ProductVariantSearchModelMapper.ensureInitialized(); + p16.ProductVariantModelMapper.ensureInitialized(); + p16.ProductVariantAdditionalFieldsMapper.ensureInitialized(); + p17.ProjectSearchModelMapper.ensureInitialized(); + p17.ProjectModelMapper.ensureInitialized(); + p17.ProjectAdditionalFieldsMapper.ensureInitialized(); + p17.ProjectAdditionalDetailsMapper.ensureInitialized(); + p18.ProjectFacilitySearchModelMapper.ensureInitialized(); + p18.ProjectFacilityModelMapper.ensureInitialized(); + p18.ProjectFacilityAdditionalFieldsMapper.ensureInitialized(); + p19.ProjectProductVariantSearchModelMapper.ensureInitialized(); + p19.ProjectProductVariantModelMapper.ensureInitialized(); + p19.ProjectProductVariantAdditionalFieldsMapper.ensureInitialized(); + p20.ProjectResourceSearchModelMapper.ensureInitialized(); + p20.ProjectResourceModelMapper.ensureInitialized(); + p20.ProjectResourceAdditionalFieldsMapper.ensureInitialized(); + p21.ProjectStaffSearchModelMapper.ensureInitialized(); + p21.ProjectStaffModelMapper.ensureInitialized(); + p21.ProjectStaffAdditionalFieldsMapper.ensureInitialized(); + p22.ProjectTypeModelMapper.ensureInitialized(); + p22.ProjectTypeAdditionalFieldsMapper.ensureInitialized(); + p22.ProjectCycleMapper.ensureInitialized(); + p22.ProjectCycleDeliveryMapper.ensureInitialized(); + p22.DeliveryDoseCriteriaMapper.ensureInitialized(); + p22.DeliveryProductVariantMapper.ensureInitialized(); + p23.TargetSearchModelMapper.ensureInitialized(); + p23.TargetModelMapper.ensureInitialized(); + p23.TargetAdditionalFieldsMapper.ensureInitialized(); + p24.UserSearchModelMapper.ensureInitialized(); + p24.UserModelMapper.ensureInitialized(); + p24.UserAdditionalFieldsMapper.ensureInitialized(); + p25.UserActionSearchModelMapper.ensureInitialized(); + p25.UserActionModelMapper.ensureInitialized(); + p25.UserActionAdditionalFieldsMapper.ensureInitialized(); + p26.OpLogEntryMapper.ensureInitialized(); + p26.AdditionalIdMapper.ensureInitialized(); + p26.DataOperationMapper.ensureInitialized(); + p26.ApiOperationMapper.ensureInitialized(); } diff --git a/packages/digit_data_model/lib/data_model.mapper.dart b/packages/digit_data_model/lib/data_model.mapper.dart index e4376db08..6e29b4079 100644 --- a/packages/digit_data_model/lib/data_model.mapper.dart +++ b/packages/digit_data_model/lib/data_model.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'data_model.dart'; @@ -194,10 +194,8 @@ mixin AdditionalFieldMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - AdditionalFieldMapper.ensureInitialized() - .isValueEqual(this as AdditionalField, other)); + return AdditionalFieldMapper.ensureInitialized() + .equalsValue(this as AdditionalField, other); } @override @@ -317,10 +315,8 @@ mixin AuditDetailsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - AuditDetailsMapper.ensureInitialized() - .isValueEqual(this as AuditDetails, other)); + return AuditDetailsMapper.ensureInitialized() + .equalsValue(this as AuditDetails, other); } @override @@ -458,10 +454,8 @@ mixin ClientAuditDetailsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ClientAuditDetailsMapper.ensureInitialized() - .isValueEqual(this as ClientAuditDetails, other)); + return ClientAuditDetailsMapper.ensureInitialized() + .equalsValue(this as ClientAuditDetails, other); } @override diff --git a/packages/digit_data_model/lib/models/entities/address.dart b/packages/digit_data_model/lib/models/entities/address.dart index 9c88211c2..b704c2204 100644 --- a/packages/digit_data_model/lib/models/entities/address.dart +++ b/packages/digit_data_model/lib/models/entities/address.dart @@ -2,7 +2,6 @@ import 'package:dart_mappable/dart_mappable.dart'; import 'package:drift/drift.dart'; -import '../../data/local_store/sql_store/sql_store.dart'; import '../../data_model.dart'; import 'address_type.dart'; diff --git a/packages/digit_data_model/lib/models/entities/address.mapper.dart b/packages/digit_data_model/lib/models/entities/address.mapper.dart index 89fcaaa67..28507a4cd 100644 --- a/packages/digit_data_model/lib/models/entities/address.mapper.dart +++ b/packages/digit_data_model/lib/models/entities/address.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'address.dart'; @@ -123,10 +123,8 @@ mixin AddressSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - AddressSearchModelMapper.ensureInitialized() - .isValueEqual(this as AddressSearchModel, other)); + return AddressSearchModelMapper.ensureInitialized() + .equalsValue(this as AddressSearchModel, other); } @override @@ -290,10 +288,8 @@ mixin AddressAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - AddressAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as AddressAdditionalFields, other)); + return AddressAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as AddressAdditionalFields, other); } @override @@ -546,10 +542,8 @@ mixin AddressModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - AddressModelMapper.ensureInitialized() - .isValueEqual(this as AddressModel, other)); + return AddressModelMapper.ensureInitialized() + .equalsValue(this as AddressModel, other); } @override diff --git a/packages/digit_data_model/lib/models/entities/address_type.mapper.dart b/packages/digit_data_model/lib/models/entities/address_type.mapper.dart index 38b8d7007..6b1f6bee8 100644 --- a/packages/digit_data_model/lib/models/entities/address_type.mapper.dart +++ b/packages/digit_data_model/lib/models/entities/address_type.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'address_type.dart'; diff --git a/packages/digit_data_model/lib/models/entities/attributes.dart b/packages/digit_data_model/lib/models/entities/attributes.dart index 29f317708..baf346b22 100644 --- a/packages/digit_data_model/lib/models/entities/attributes.dart +++ b/packages/digit_data_model/lib/models/entities/attributes.dart @@ -3,11 +3,8 @@ import 'dart:convert'; import 'package:dart_mappable/dart_mappable.dart'; import 'package:drift/drift.dart'; - import 'package:digit_data_model/data_model.dart'; -import '../../data/local_store/sql_store/sql_store.dart'; - part 'attributes.mapper.dart'; @MappableClass(ignoreNull: true, discriminatorValue: MappableClass.useAsDefault) @@ -18,7 +15,7 @@ class AttributesSearchModel extends EntitySearchModel final String? referenceId; final String? tenantId; final String? code; - final String? isActive; + final bool? isActive; final bool? required; final String? regex; final int? order; @@ -62,7 +59,7 @@ class AttributesModel extends EntityModel with AttributesModelMappable { final String? tenantId; final String? code; final List? values; - final String? isActive; + final bool? isActive; final bool? required; final String? regex; final int? order; diff --git a/packages/digit_data_model/lib/models/entities/attributes.mapper.dart b/packages/digit_data_model/lib/models/entities/attributes.mapper.dart index 2b9f5e138..5a68b648f 100644 --- a/packages/digit_data_model/lib/models/entities/attributes.mapper.dart +++ b/packages/digit_data_model/lib/models/entities/attributes.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'attributes.dart'; @@ -36,8 +36,8 @@ class AttributesSearchModelMapper static String? _$code(AttributesSearchModel v) => v.code; static const Field _f$code = Field('code', _$code, opt: true); - static String? _$isActive(AttributesSearchModel v) => v.isActive; - static const Field _f$isActive = + static bool? _$isActive(AttributesSearchModel v) => v.isActive; + static const Field _f$isActive = Field('isActive', _$isActive, opt: true); static bool? _$required(AttributesSearchModel v) => v.required; static const Field _f$required = @@ -136,10 +136,8 @@ mixin AttributesSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - AttributesSearchModelMapper.ensureInitialized() - .isValueEqual(this as AttributesSearchModel, other)); + return AttributesSearchModelMapper.ensureInitialized() + .equalsValue(this as AttributesSearchModel, other); } @override @@ -167,7 +165,7 @@ abstract class AttributesSearchModelCopyWith< String? referenceId, String? tenantId, String? code, - String? isActive, + bool? isActive, bool? required, String? regex, int? order, @@ -270,8 +268,8 @@ class AttributesModelMapper extends SubClassMapperBase { static List? _$values(AttributesModel v) => v.values; static const Field> _f$values = Field('values', _$values, opt: true); - static String? _$isActive(AttributesModel v) => v.isActive; - static const Field _f$isActive = + static bool? _$isActive(AttributesModel v) => v.isActive; + static const Field _f$isActive = Field('isActive', _$isActive, opt: true); static bool? _$required(AttributesModel v) => v.required; static const Field _f$required = @@ -388,10 +386,8 @@ mixin AttributesModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - AttributesModelMapper.ensureInitialized() - .isValueEqual(this as AttributesModel, other)); + return AttributesModelMapper.ensureInitialized() + .equalsValue(this as AttributesModel, other); } @override @@ -429,7 +425,7 @@ abstract class AttributesModelCopyWith<$R, $In extends AttributesModel, $Out> String? tenantId, String? code, List? values, - String? isActive, + bool? isActive, bool? required, String? regex, int? order, @@ -634,10 +630,8 @@ mixin AttributesAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - AttributesAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as AttributesAdditionalFields, other)); + return AttributesAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as AttributesAdditionalFields, other); } @override diff --git a/packages/digit_data_model/lib/models/entities/beneficiary_type.mapper.dart b/packages/digit_data_model/lib/models/entities/beneficiary_type.mapper.dart index 76e592df1..349f9b2d5 100644 --- a/packages/digit_data_model/lib/models/entities/beneficiary_type.mapper.dart +++ b/packages/digit_data_model/lib/models/entities/beneficiary_type.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'beneficiary_type.dart'; diff --git a/packages/digit_data_model/lib/models/entities/blood_group.mapper.dart b/packages/digit_data_model/lib/models/entities/blood_group.mapper.dart index 733eba168..32f4c16b5 100644 --- a/packages/digit_data_model/lib/models/entities/blood_group.mapper.dart +++ b/packages/digit_data_model/lib/models/entities/blood_group.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'blood_group.dart'; diff --git a/packages/digit_data_model/lib/models/entities/boundary.mapper.dart b/packages/digit_data_model/lib/models/entities/boundary.mapper.dart index 8c97c5c8b..2032b0d27 100644 --- a/packages/digit_data_model/lib/models/entities/boundary.mapper.dart +++ b/packages/digit_data_model/lib/models/entities/boundary.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'boundary.dart'; @@ -127,10 +127,8 @@ mixin BoundarySearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - BoundarySearchModelMapper.ensureInitialized() - .isValueEqual(this as BoundarySearchModel, other)); + return BoundarySearchModelMapper.ensureInitialized() + .equalsValue(this as BoundarySearchModel, other); } @override @@ -361,10 +359,8 @@ mixin BoundaryModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - BoundaryModelMapper.ensureInitialized() - .isValueEqual(this as BoundaryModel, other)); + return BoundaryModelMapper.ensureInitialized() + .equalsValue(this as BoundaryModel, other); } @override diff --git a/packages/digit_data_model/lib/models/entities/document.dart b/packages/digit_data_model/lib/models/entities/document.dart index 81f253c85..ce00e17c0 100644 --- a/packages/digit_data_model/lib/models/entities/document.dart +++ b/packages/digit_data_model/lib/models/entities/document.dart @@ -1,11 +1,8 @@ // Generated using mason. Do not modify by hand import 'package:dart_mappable/dart_mappable.dart'; import 'package:drift/drift.dart'; - import 'package:digit_data_model/data_model.dart'; -import '../../data/local_store/sql_store/sql_store.dart'; - part 'document.mapper.dart'; @MappableClass(ignoreNull: true, discriminatorValue: MappableClass.useAsDefault) diff --git a/packages/digit_data_model/lib/models/entities/document.mapper.dart b/packages/digit_data_model/lib/models/entities/document.mapper.dart index eee399a0a..35b3ded04 100644 --- a/packages/digit_data_model/lib/models/entities/document.mapper.dart +++ b/packages/digit_data_model/lib/models/entities/document.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'document.dart'; @@ -101,10 +101,8 @@ mixin DocumentSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - DocumentSearchModelMapper.ensureInitialized() - .isValueEqual(this as DocumentSearchModel, other)); + return DocumentSearchModelMapper.ensureInitialized() + .equalsValue(this as DocumentSearchModel, other); } @override @@ -306,10 +304,8 @@ mixin DocumentModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - DocumentModelMapper.ensureInitialized() - .isValueEqual(this as DocumentModel, other)); + return DocumentModelMapper.ensureInitialized() + .equalsValue(this as DocumentModel, other); } @override @@ -511,10 +507,8 @@ mixin DocumentAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - DocumentAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as DocumentAdditionalFields, other)); + return DocumentAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as DocumentAdditionalFields, other); } @override diff --git a/packages/digit_data_model/lib/models/entities/facility.dart b/packages/digit_data_model/lib/models/entities/facility.dart index cc2347c48..85c5ef8b8 100644 --- a/packages/digit_data_model/lib/models/entities/facility.dart +++ b/packages/digit_data_model/lib/models/entities/facility.dart @@ -1,22 +1,21 @@ // Generated using mason. Do not modify by hand import 'package:dart_mappable/dart_mappable.dart'; import 'package:drift/drift.dart'; - import 'package:digit_data_model/data_model.dart'; -import '../../data/local_store/sql_store/sql_store.dart'; - part 'facility.mapper.dart'; @MappableClass(ignoreNull: true, discriminatorValue: MappableClass.useAsDefault) -class FacilitySearchModel extends EntitySearchModel with FacilitySearchModelMappable { +class FacilitySearchModel extends EntitySearchModel + with FacilitySearchModelMappable { final List? id; final bool? isPermanent; final String? usage; final int? storageCapacity; final String? tenantId; - + final String? name; FacilitySearchModel({ + this.name, this.id, this.isPermanent, this.usage, @@ -24,22 +23,22 @@ class FacilitySearchModel extends EntitySearchModel with FacilitySearchModelMapp this.tenantId, super.boundaryCode, super.isDeleted, - }): super(); + }) : super(); @MappableConstructor() FacilitySearchModel.ignoreDeleted({ + this.name, this.id, this.isPermanent, this.usage, this.storageCapacity, this.tenantId, super.boundaryCode, - }): super(isDeleted: false); + }) : super(isDeleted: false); } @MappableClass(ignoreNull: true, discriminatorValue: MappableClass.useAsDefault) class FacilityModel extends EntityModel with FacilityModelMappable { - static const schemaName = 'Facility'; final String id; @@ -51,6 +50,7 @@ class FacilityModel extends EntityModel with FacilityModelMappable { final int? rowVersion; final AddressModel? address; final FacilityAdditionalFields? additionalFields; + final String? name; FacilityModel({ this.additionalFields, @@ -62,39 +62,41 @@ class FacilityModel extends EntityModel with FacilityModelMappable { this.tenantId, this.rowVersion, this.address, - super.auditDetails,super.clientAuditDetails, + this.name, + super.auditDetails, + super.clientAuditDetails, super.isDeleted = false, - }): super(); + }) : super(); FacilityCompanion get companion { return FacilityCompanion( - auditCreatedBy: Value(auditDetails?.createdBy), - auditCreatedTime: Value(auditDetails?.createdTime), - auditModifiedBy: Value(auditDetails?.lastModifiedBy), - clientCreatedTime: Value(clientAuditDetails?.createdTime), - clientModifiedTime: Value(clientAuditDetails?.lastModifiedTime), - clientCreatedBy: Value(clientAuditDetails?.createdBy), - clientModifiedBy: Value(clientAuditDetails?.lastModifiedBy), - auditModifiedTime: Value(auditDetails?.lastModifiedTime), - additionalFields: Value(additionalFields?.toJson()), - isDeleted: Value(isDeleted), - id: Value(id), - isPermanent: Value(isPermanent), - usage: Value(usage), - storageCapacity: Value(storageCapacity), - nonRecoverableError: Value(nonRecoverableError), - tenantId: Value(tenantId), - rowVersion: Value(rowVersion), - ); + auditCreatedBy: Value(auditDetails?.createdBy), + auditCreatedTime: Value(auditDetails?.createdTime), + auditModifiedBy: Value(auditDetails?.lastModifiedBy), + clientCreatedTime: Value(clientAuditDetails?.createdTime), + clientModifiedTime: Value(clientAuditDetails?.lastModifiedTime), + clientCreatedBy: Value(clientAuditDetails?.createdBy), + clientModifiedBy: Value(clientAuditDetails?.lastModifiedBy), + auditModifiedTime: Value(auditDetails?.lastModifiedTime), + additionalFields: Value(additionalFields?.toJson()), + isDeleted: Value(isDeleted), + id: Value(id), + isPermanent: Value(isPermanent), + usage: Value(usage), + storageCapacity: Value(storageCapacity), + nonRecoverableError: Value(nonRecoverableError), + tenantId: Value(tenantId), + rowVersion: Value(rowVersion), + name: Value(name)); } } @MappableClass(ignoreNull: true, discriminatorValue: MappableClass.useAsDefault) -class FacilityAdditionalFields extends AdditionalFields with FacilityAdditionalFieldsMappable { +class FacilityAdditionalFields extends AdditionalFields + with FacilityAdditionalFieldsMappable { FacilityAdditionalFields({ super.schema = 'Facility', required super.version, super.fields, }); } - diff --git a/packages/digit_data_model/lib/models/entities/facility.mapper.dart b/packages/digit_data_model/lib/models/entities/facility.mapper.dart index 1ef9e0118..644c635ee 100644 --- a/packages/digit_data_model/lib/models/entities/facility.mapper.dart +++ b/packages/digit_data_model/lib/models/entities/facility.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'facility.dart'; @@ -21,6 +21,9 @@ class FacilitySearchModelMapper @override final String id = 'FacilitySearchModel'; + static String? _$name(FacilitySearchModel v) => v.name; + static const Field _f$name = + Field('name', _$name, opt: true); static List? _$id(FacilitySearchModel v) => v.id; static const Field> _f$id = Field('id', _$id, opt: true); @@ -50,6 +53,7 @@ class FacilitySearchModelMapper @override final MappableFields fields = const { + #name: _f$name, #id: _f$id, #isPermanent: _f$isPermanent, #usage: _f$usage, @@ -72,6 +76,7 @@ class FacilitySearchModelMapper static FacilitySearchModel _instantiate(DecodingData data) { return FacilitySearchModel.ignoreDeleted( + name: data.dec(_f$name), id: data.dec(_f$id), isPermanent: data.dec(_f$isPermanent), usage: data.dec(_f$usage), @@ -115,10 +120,8 @@ mixin FacilitySearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - FacilitySearchModelMapper.ensureInitialized() - .isValueEqual(this as FacilitySearchModel, other)); + return FacilitySearchModelMapper.ensureInitialized() + .equalsValue(this as FacilitySearchModel, other); } @override @@ -140,7 +143,8 @@ abstract class FacilitySearchModelCopyWith<$R, $In extends FacilitySearchModel, ListCopyWith<$R, String, ObjectCopyWith<$R, String, String>>? get id; @override $R call( - {List? id, + {String? name, + List? id, bool? isPermanent, String? usage, int? storageCapacity, @@ -166,13 +170,15 @@ class _FacilitySearchModelCopyWithImpl<$R, $Out> : null; @override $R call( - {Object? id = $none, + {Object? name = $none, + Object? id = $none, Object? isPermanent = $none, Object? usage = $none, Object? storageCapacity = $none, Object? tenantId = $none, Object? boundaryCode = $none}) => $apply(FieldCopyWithData({ + if (name != $none) #name: name, if (id != $none) #id: id, if (isPermanent != $none) #isPermanent: isPermanent, if (usage != $none) #usage: usage, @@ -183,6 +189,7 @@ class _FacilitySearchModelCopyWithImpl<$R, $Out> @override FacilitySearchModel $make(CopyWithData data) => FacilitySearchModel.ignoreDeleted( + name: data.get(#name, or: $value.name), id: data.get(#id, or: $value.id), isPermanent: data.get(#isPermanent, or: $value.isPermanent), usage: data.get(#usage, or: $value.usage), @@ -240,6 +247,9 @@ class FacilityModelMapper extends SubClassMapperBase { static AddressModel? _$address(FacilityModel v) => v.address; static const Field _f$address = Field('address', _$address, opt: true); + static String? _$name(FacilityModel v) => v.name; + static const Field _f$name = + Field('name', _$name, opt: true); static AuditDetails? _$auditDetails(FacilityModel v) => v.auditDetails; static const Field _f$auditDetails = Field('auditDetails', _$auditDetails, opt: true); @@ -262,6 +272,7 @@ class FacilityModelMapper extends SubClassMapperBase { #tenantId: _f$tenantId, #rowVersion: _f$rowVersion, #address: _f$address, + #name: _f$name, #auditDetails: _f$auditDetails, #clientAuditDetails: _f$clientAuditDetails, #isDeleted: _f$isDeleted, @@ -288,6 +299,7 @@ class FacilityModelMapper extends SubClassMapperBase { tenantId: data.dec(_f$tenantId), rowVersion: data.dec(_f$rowVersion), address: data.dec(_f$address), + name: data.dec(_f$name), auditDetails: data.dec(_f$auditDetails), clientAuditDetails: data.dec(_f$clientAuditDetails), isDeleted: data.dec(_f$isDeleted)); @@ -327,10 +339,8 @@ mixin FacilityModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - FacilityModelMapper.ensureInitialized() - .isValueEqual(this as FacilityModel, other)); + return FacilityModelMapper.ensureInitialized() + .equalsValue(this as FacilityModel, other); } @override @@ -367,6 +377,7 @@ abstract class FacilityModelCopyWith<$R, $In extends FacilityModel, $Out> String? tenantId, int? rowVersion, AddressModel? address, + String? name, AuditDetails? auditDetails, ClientAuditDetails? clientAuditDetails, bool? isDeleted}); @@ -407,6 +418,7 @@ class _FacilityModelCopyWithImpl<$R, $Out> Object? tenantId = $none, Object? rowVersion = $none, Object? address = $none, + Object? name = $none, Object? auditDetails = $none, Object? clientAuditDetails = $none, Object? isDeleted = $none}) => @@ -421,6 +433,7 @@ class _FacilityModelCopyWithImpl<$R, $Out> if (tenantId != $none) #tenantId: tenantId, if (rowVersion != $none) #rowVersion: rowVersion, if (address != $none) #address: address, + if (name != $none) #name: name, if (auditDetails != $none) #auditDetails: auditDetails, if (clientAuditDetails != $none) #clientAuditDetails: clientAuditDetails, @@ -439,6 +452,7 @@ class _FacilityModelCopyWithImpl<$R, $Out> tenantId: data.get(#tenantId, or: $value.tenantId), rowVersion: data.get(#rowVersion, or: $value.rowVersion), address: data.get(#address, or: $value.address), + name: data.get(#name, or: $value.name), auditDetails: data.get(#auditDetails, or: $value.auditDetails), clientAuditDetails: data.get(#clientAuditDetails, or: $value.clientAuditDetails), @@ -535,10 +549,8 @@ mixin FacilityAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - FacilityAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as FacilityAdditionalFields, other)); + return FacilityAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as FacilityAdditionalFields, other); } @override diff --git a/packages/digit_data_model/lib/models/entities/gender.mapper.dart b/packages/digit_data_model/lib/models/entities/gender.mapper.dart index 36baec89d..c74bca2e7 100644 --- a/packages/digit_data_model/lib/models/entities/gender.mapper.dart +++ b/packages/digit_data_model/lib/models/entities/gender.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'gender.dart'; diff --git a/packages/digit_data_model/lib/models/entities/identifier.dart b/packages/digit_data_model/lib/models/entities/identifier.dart index a9535705a..7f1bef489 100644 --- a/packages/digit_data_model/lib/models/entities/identifier.dart +++ b/packages/digit_data_model/lib/models/entities/identifier.dart @@ -1,11 +1,8 @@ // Generated using mason. Do not modify by hand import 'package:dart_mappable/dart_mappable.dart'; import 'package:drift/drift.dart'; - import 'package:digit_data_model/data_model.dart'; -import '../../data/local_store/sql_store/sql_store.dart'; - part 'identifier.mapper.dart'; @MappableClass(ignoreNull: true, discriminatorValue: MappableClass.useAsDefault) class IdentifierSearchModel extends EntitySearchModel with IdentifierSearchModelMappable { diff --git a/packages/digit_data_model/lib/models/entities/identifier.mapper.dart b/packages/digit_data_model/lib/models/entities/identifier.mapper.dart index bf319ec4c..558e5b5d7 100644 --- a/packages/digit_data_model/lib/models/entities/identifier.mapper.dart +++ b/packages/digit_data_model/lib/models/entities/identifier.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'identifier.dart'; @@ -117,10 +117,8 @@ mixin IdentifierSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - IdentifierSearchModelMapper.ensureInitialized() - .isValueEqual(this as IdentifierSearchModel, other)); + return IdentifierSearchModelMapper.ensureInitialized() + .equalsValue(this as IdentifierSearchModel, other); } @override @@ -332,10 +330,8 @@ mixin IdentifierModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - IdentifierModelMapper.ensureInitialized() - .isValueEqual(this as IdentifierModel, other)); + return IdentifierModelMapper.ensureInitialized() + .equalsValue(this as IdentifierModel, other); } @override @@ -537,10 +533,8 @@ mixin IdentifierAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - IdentifierAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as IdentifierAdditionalFields, other)); + return IdentifierAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as IdentifierAdditionalFields, other); } @override diff --git a/packages/digit_data_model/lib/models/entities/individual.dart b/packages/digit_data_model/lib/models/entities/individual.dart index 2da1478ed..53178d784 100644 --- a/packages/digit_data_model/lib/models/entities/individual.dart +++ b/packages/digit_data_model/lib/models/entities/individual.dart @@ -1,11 +1,8 @@ // Generated using mason. Do not modify by hand import 'package:dart_mappable/dart_mappable.dart'; import 'package:drift/drift.dart'; - import 'package:digit_data_model/data_model.dart'; -import '../../data/local_store/sql_store/sql_store.dart'; - part 'individual.mapper.dart'; @MappableClass(ignoreNull: true, discriminatorValue: MappableClass.useAsDefault) diff --git a/packages/digit_data_model/lib/models/entities/individual.mapper.dart b/packages/digit_data_model/lib/models/entities/individual.mapper.dart index cc22920b7..35c441d5d 100644 --- a/packages/digit_data_model/lib/models/entities/individual.mapper.dart +++ b/packages/digit_data_model/lib/models/entities/individual.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'individual.dart'; @@ -143,10 +143,8 @@ mixin IndividualSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - IndividualSearchModelMapper.ensureInitialized() - .isValueEqual(this as IndividualSearchModel, other)); + return IndividualSearchModelMapper.ensureInitialized() + .equalsValue(this as IndividualSearchModel, other); } @override @@ -478,10 +476,8 @@ mixin IndividualModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - IndividualModelMapper.ensureInitialized() - .isValueEqual(this as IndividualModel, other)); + return IndividualModelMapper.ensureInitialized() + .equalsValue(this as IndividualModel, other); } @override @@ -759,10 +755,8 @@ mixin IndividualAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - IndividualAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as IndividualAdditionalFields, other)); + return IndividualAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as IndividualAdditionalFields, other); } @override diff --git a/packages/digit_data_model/lib/models/entities/locality.dart b/packages/digit_data_model/lib/models/entities/locality.dart index 5a1ff3997..2751a6425 100644 --- a/packages/digit_data_model/lib/models/entities/locality.dart +++ b/packages/digit_data_model/lib/models/entities/locality.dart @@ -2,7 +2,6 @@ import 'package:dart_mappable/dart_mappable.dart'; import 'package:drift/drift.dart'; -import '../../data/local_store/sql_store/sql_store.dart'; import '../../data_model.dart'; part 'locality.mapper.dart'; diff --git a/packages/digit_data_model/lib/models/entities/locality.mapper.dart b/packages/digit_data_model/lib/models/entities/locality.mapper.dart index 8aa1db256..61bd36ade 100644 --- a/packages/digit_data_model/lib/models/entities/locality.mapper.dart +++ b/packages/digit_data_model/lib/models/entities/locality.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'locality.dart'; @@ -105,10 +105,8 @@ mixin LocalitySearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - LocalitySearchModelMapper.ensureInitialized() - .isValueEqual(this as LocalitySearchModel, other)); + return LocalitySearchModelMapper.ensureInitialized() + .equalsValue(this as LocalitySearchModel, other); } @override @@ -282,10 +280,8 @@ mixin LocalityModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - LocalityModelMapper.ensureInitialized() - .isValueEqual(this as LocalityModel, other)); + return LocalityModelMapper.ensureInitialized() + .equalsValue(this as LocalityModel, other); } @override @@ -474,10 +470,8 @@ mixin LocalityAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - LocalityAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as LocalityAdditionalFields, other)); + return LocalityAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as LocalityAdditionalFields, other); } @override diff --git a/packages/digit_data_model/lib/models/entities/name.dart b/packages/digit_data_model/lib/models/entities/name.dart index 46b582136..36285fb68 100644 --- a/packages/digit_data_model/lib/models/entities/name.dart +++ b/packages/digit_data_model/lib/models/entities/name.dart @@ -1,11 +1,8 @@ // Generated using mason. Do not modify by hand import 'package:dart_mappable/dart_mappable.dart'; import 'package:drift/drift.dart'; - import 'package:digit_data_model/data_model.dart'; -import '../../data/local_store/sql_store/sql_store.dart'; - part 'name.mapper.dart'; @MappableClass(ignoreNull: true, discriminatorValue: MappableClass.useAsDefault) diff --git a/packages/digit_data_model/lib/models/entities/name.mapper.dart b/packages/digit_data_model/lib/models/entities/name.mapper.dart index a93c89a05..4e5f20855 100644 --- a/packages/digit_data_model/lib/models/entities/name.mapper.dart +++ b/packages/digit_data_model/lib/models/entities/name.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'name.dart'; @@ -122,10 +122,8 @@ mixin NameSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - NameSearchModelMapper.ensureInitialized() - .isValueEqual(this as NameSearchModel, other)); + return NameSearchModelMapper.ensureInitialized() + .equalsValue(this as NameSearchModel, other); } @override @@ -332,10 +330,8 @@ mixin NameModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - NameModelMapper.ensureInitialized() - .isValueEqual(this as NameModel, other)); + return NameModelMapper.ensureInitialized() + .equalsValue(this as NameModel, other); } @override @@ -534,10 +530,8 @@ mixin NameAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - NameAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as NameAdditionalFields, other)); + return NameAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as NameAdditionalFields, other); } @override diff --git a/packages/digit_data_model/lib/models/entities/pgr_application_status.dart b/packages/digit_data_model/lib/models/entities/pgr_application_status.dart new file mode 100644 index 000000000..444a4c5a3 --- /dev/null +++ b/packages/digit_data_model/lib/models/entities/pgr_application_status.dart @@ -0,0 +1,17 @@ +import 'package:dart_mappable/dart_mappable.dart'; + +part 'pgr_application_status.mapper.dart'; + +@MappableEnum() +enum PgrServiceApplicationStatus { + @MappableValue('CREATED') + created, + @MappableValue('PENDING_ASSIGNMENT') + pendingAssignment, + @MappableValue('RESOLVED') + resolved, + @MappableValue('REJECTED') + rejected, + @MappableValue('CANCELLED') + cancelled, +} \ No newline at end of file diff --git a/packages/digit_data_model/lib/models/entities/pgr_application_status.mapper.dart b/packages/digit_data_model/lib/models/entities/pgr_application_status.mapper.dart new file mode 100644 index 000000000..b60c63f04 --- /dev/null +++ b/packages/digit_data_model/lib/models/entities/pgr_application_status.mapper.dart @@ -0,0 +1,68 @@ +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member +// ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter + +part of 'pgr_application_status.dart'; + +class PgrServiceApplicationStatusMapper + extends EnumMapper { + PgrServiceApplicationStatusMapper._(); + + static PgrServiceApplicationStatusMapper? _instance; + static PgrServiceApplicationStatusMapper ensureInitialized() { + if (_instance == null) { + MapperContainer.globals + .use(_instance = PgrServiceApplicationStatusMapper._()); + } + return _instance!; + } + + static PgrServiceApplicationStatus fromValue(dynamic value) { + ensureInitialized(); + return MapperContainer.globals.fromValue(value); + } + + @override + PgrServiceApplicationStatus decode(dynamic value) { + switch (value) { + case 'CREATED': + return PgrServiceApplicationStatus.created; + case 'PENDING_ASSIGNMENT': + return PgrServiceApplicationStatus.pendingAssignment; + case 'RESOLVED': + return PgrServiceApplicationStatus.resolved; + case 'REJECTED': + return PgrServiceApplicationStatus.rejected; + case 'CANCELLED': + return PgrServiceApplicationStatus.cancelled; + default: + throw MapperException.unknownEnumValue(value); + } + } + + @override + dynamic encode(PgrServiceApplicationStatus self) { + switch (self) { + case PgrServiceApplicationStatus.created: + return 'CREATED'; + case PgrServiceApplicationStatus.pendingAssignment: + return 'PENDING_ASSIGNMENT'; + case PgrServiceApplicationStatus.resolved: + return 'RESOLVED'; + case PgrServiceApplicationStatus.rejected: + return 'REJECTED'; + case PgrServiceApplicationStatus.cancelled: + return 'CANCELLED'; + } + } +} + +extension PgrServiceApplicationStatusMapperExtension + on PgrServiceApplicationStatus { + dynamic toValue() { + PgrServiceApplicationStatusMapper.ensureInitialized(); + return MapperContainer.globals.toValue(this); + } +} diff --git a/packages/digit_data_model/lib/models/entities/product.mapper.dart b/packages/digit_data_model/lib/models/entities/product.mapper.dart index 42026801f..8e54975cc 100644 --- a/packages/digit_data_model/lib/models/entities/product.mapper.dart +++ b/packages/digit_data_model/lib/models/entities/product.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'product.dart'; @@ -119,10 +119,8 @@ mixin ProductSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProductSearchModelMapper.ensureInitialized() - .isValueEqual(this as ProductSearchModel, other)); + return ProductSearchModelMapper.ensureInitialized() + .equalsValue(this as ProductSearchModel, other); } @override @@ -354,10 +352,8 @@ mixin ProductModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProductModelMapper.ensureInitialized() - .isValueEqual(this as ProductModel, other)); + return ProductModelMapper.ensureInitialized() + .equalsValue(this as ProductModel, other); } @override @@ -559,10 +555,8 @@ mixin ProductAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProductAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as ProductAdditionalFields, other)); + return ProductAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as ProductAdditionalFields, other); } @override diff --git a/packages/digit_data_model/lib/models/entities/product_variant.dart b/packages/digit_data_model/lib/models/entities/product_variant.dart index 914beede2..c66237896 100644 --- a/packages/digit_data_model/lib/models/entities/product_variant.dart +++ b/packages/digit_data_model/lib/models/entities/product_variant.dart @@ -1,11 +1,8 @@ // Generated using mason. Do not modify by hand import 'package:dart_mappable/dart_mappable.dart'; import 'package:drift/drift.dart'; - import 'package:digit_data_model/data_model.dart'; -import '../../data/local_store/sql_store/sql_store.dart'; - part 'product_variant.mapper.dart'; @MappableClass(ignoreNull: true, discriminatorValue: MappableClass.useAsDefault) diff --git a/packages/digit_data_model/lib/models/entities/product_variant.mapper.dart b/packages/digit_data_model/lib/models/entities/product_variant.mapper.dart index 3b637633d..892f9fae1 100644 --- a/packages/digit_data_model/lib/models/entities/product_variant.mapper.dart +++ b/packages/digit_data_model/lib/models/entities/product_variant.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'product_variant.dart'; @@ -119,10 +119,8 @@ mixin ProductVariantSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProductVariantSearchModelMapper.ensureInitialized() - .isValueEqual(this as ProductVariantSearchModel, other)); + return ProductVariantSearchModelMapper.ensureInitialized() + .equalsValue(this as ProductVariantSearchModel, other); } @override @@ -342,10 +340,8 @@ mixin ProductVariantModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProductVariantModelMapper.ensureInitialized() - .isValueEqual(this as ProductVariantModel, other)); + return ProductVariantModelMapper.ensureInitialized() + .equalsValue(this as ProductVariantModel, other); } @override @@ -547,10 +543,8 @@ mixin ProductVariantAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProductVariantAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as ProductVariantAdditionalFields, other)); + return ProductVariantAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as ProductVariantAdditionalFields, other); } @override diff --git a/packages/digit_data_model/lib/models/entities/project.dart b/packages/digit_data_model/lib/models/entities/project.dart index eabf97622..21b630b0b 100644 --- a/packages/digit_data_model/lib/models/entities/project.dart +++ b/packages/digit_data_model/lib/models/entities/project.dart @@ -19,6 +19,7 @@ class ProjectSearchModel extends EntitySearchModel final String? tenantId; final DateTime? startDateTime; final DateTime? endDateTime; + final String? projectType; ProjectSearchModel({ this.id, @@ -29,6 +30,7 @@ class ProjectSearchModel extends EntitySearchModel this.parent, this.department, this.referenceId, + this.projectType, this.tenantId, int? startDate, int? endDate, @@ -53,6 +55,7 @@ class ProjectSearchModel extends EntitySearchModel this.department, this.referenceId, this.tenantId, + this.projectType, int? startDate, int? endDate, super.boundaryCode, @@ -95,6 +98,7 @@ class ProjectModel extends EntityModel with ProjectModelMappable { final ProjectAdditionalFields? additionalFields; @MappableField(key: 'additionalDetails') final ProjectAdditionalDetails? additionalDetails; + final String? projectType; ProjectModel({ this.additionalFields, @@ -114,6 +118,7 @@ class ProjectModel extends EntityModel with ProjectModelMappable { this.rowVersion, this.address, this.targets, + this.projectType, this.documents, this.additionalDetails, int? startDate, @@ -148,6 +153,7 @@ class ProjectModel extends EntityModel with ProjectModelMappable { id: Value(id), projectTypeId: Value(projectTypeId), projectNumber: Value(projectNumber), + projectType: Value(projectType), subProjectTypeId: Value(subProjectTypeId), isTaskEnabled: Value(isTaskEnabled), parent: Value(parent), @@ -179,7 +185,6 @@ class ProjectAdditionalFields extends AdditionalFields class ProjectAdditionalDetails with ProjectAdditionalDetailsMappable { final ProjectTypeModel? projectType; - ProjectAdditionalDetails({ this.projectType, }) : super(); diff --git a/packages/digit_data_model/lib/models/entities/project.mapper.dart b/packages/digit_data_model/lib/models/entities/project.mapper.dart index 3298e7d88..93b01d581 100644 --- a/packages/digit_data_model/lib/models/entities/project.mapper.dart +++ b/packages/digit_data_model/lib/models/entities/project.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'project.dart'; @@ -47,6 +47,9 @@ class ProjectSearchModelMapper extends SubClassMapperBase { static String? _$tenantId(ProjectSearchModel v) => v.tenantId; static const Field _f$tenantId = Field('tenantId', _$tenantId, opt: true); + static String? _$projectType(ProjectSearchModel v) => v.projectType; + static const Field _f$projectType = + Field('projectType', _$projectType, opt: true); static int? _$startDate(ProjectSearchModel v) => v.startDate; static const Field _f$startDate = Field('startDate', _$startDate, opt: true); @@ -81,6 +84,7 @@ class ProjectSearchModelMapper extends SubClassMapperBase { #department: _f$department, #referenceId: _f$referenceId, #tenantId: _f$tenantId, + #projectType: _f$projectType, #startDate: _f$startDate, #endDate: _f$endDate, #boundaryCode: _f$boundaryCode, @@ -111,6 +115,7 @@ class ProjectSearchModelMapper extends SubClassMapperBase { department: data.dec(_f$department), referenceId: data.dec(_f$referenceId), tenantId: data.dec(_f$tenantId), + projectType: data.dec(_f$projectType), startDate: data.dec(_f$startDate), endDate: data.dec(_f$endDate), boundaryCode: data.dec(_f$boundaryCode)); @@ -151,10 +156,8 @@ mixin ProjectSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProjectSearchModelMapper.ensureInitialized() - .isValueEqual(this as ProjectSearchModel, other)); + return ProjectSearchModelMapper.ensureInitialized() + .equalsValue(this as ProjectSearchModel, other); } @override @@ -184,6 +187,7 @@ abstract class ProjectSearchModelCopyWith<$R, $In extends ProjectSearchModel, String? department, String? referenceId, String? tenantId, + String? projectType, int? startDate, int? endDate, String? boundaryCode}); @@ -210,6 +214,7 @@ class _ProjectSearchModelCopyWithImpl<$R, $Out> Object? department = $none, Object? referenceId = $none, Object? tenantId = $none, + Object? projectType = $none, Object? startDate = $none, Object? endDate = $none, Object? boundaryCode = $none}) => @@ -223,6 +228,7 @@ class _ProjectSearchModelCopyWithImpl<$R, $Out> if (department != $none) #department: department, if (referenceId != $none) #referenceId: referenceId, if (tenantId != $none) #tenantId: tenantId, + if (projectType != $none) #projectType: projectType, if (startDate != $none) #startDate: startDate, if (endDate != $none) #endDate: endDate, if (boundaryCode != $none) #boundaryCode: boundaryCode @@ -240,6 +246,7 @@ class _ProjectSearchModelCopyWithImpl<$R, $Out> department: data.get(#department, or: $value.department), referenceId: data.get(#referenceId, or: $value.referenceId), tenantId: data.get(#tenantId, or: $value.tenantId), + projectType: data.get(#projectType, or: $value.projectType), startDate: data.get(#startDate, or: $value.startDate), endDate: data.get(#endDate, or: $value.endDate), boundaryCode: data.get(#boundaryCode, or: $value.boundaryCode)); @@ -316,6 +323,9 @@ class ProjectModelMapper extends SubClassMapperBase { static List? _$targets(ProjectModel v) => v.targets; static const Field> _f$targets = Field('targets', _$targets, opt: true); + static String? _$projectType(ProjectModel v) => v.projectType; + static const Field _f$projectType = + Field('projectType', _$projectType, opt: true); static List? _$documents(ProjectModel v) => v.documents; static const Field> _f$documents = Field('documents', _$documents, opt: true); @@ -366,6 +376,7 @@ class ProjectModelMapper extends SubClassMapperBase { #rowVersion: _f$rowVersion, #address: _f$address, #targets: _f$targets, + #projectType: _f$projectType, #documents: _f$documents, #additionalDetails: _f$additionalDetails, #startDate: _f$startDate, @@ -406,6 +417,7 @@ class ProjectModelMapper extends SubClassMapperBase { rowVersion: data.dec(_f$rowVersion), address: data.dec(_f$address), targets: data.dec(_f$targets), + projectType: data.dec(_f$projectType), documents: data.dec(_f$documents), additionalDetails: data.dec(_f$additionalDetails), startDate: data.dec(_f$startDate), @@ -448,10 +460,8 @@ mixin ProjectModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProjectModelMapper.ensureInitialized() - .isValueEqual(this as ProjectModel, other)); + return ProjectModelMapper.ensureInitialized() + .equalsValue(this as ProjectModel, other); } @override @@ -502,6 +512,7 @@ abstract class ProjectModelCopyWith<$R, $In extends ProjectModel, $Out> int? rowVersion, AddressModel? address, List? targets, + String? projectType, List? documents, ProjectAdditionalDetails? additionalDetails, int? startDate, @@ -573,6 +584,7 @@ class _ProjectModelCopyWithImpl<$R, $Out> Object? rowVersion = $none, Object? address = $none, Object? targets = $none, + Object? projectType = $none, Object? documents = $none, Object? additionalDetails = $none, Object? startDate = $none, @@ -599,6 +611,7 @@ class _ProjectModelCopyWithImpl<$R, $Out> if (rowVersion != $none) #rowVersion: rowVersion, if (address != $none) #address: address, if (targets != $none) #targets: targets, + if (projectType != $none) #projectType: projectType, if (documents != $none) #documents: documents, if (additionalDetails != $none) #additionalDetails: additionalDetails, if (startDate != $none) #startDate: startDate, @@ -631,6 +644,7 @@ class _ProjectModelCopyWithImpl<$R, $Out> rowVersion: data.get(#rowVersion, or: $value.rowVersion), address: data.get(#address, or: $value.address), targets: data.get(#targets, or: $value.targets), + projectType: data.get(#projectType, or: $value.projectType), documents: data.get(#documents, or: $value.documents), additionalDetails: data.get(#additionalDetails, or: $value.additionalDetails), @@ -732,10 +746,8 @@ mixin ProjectAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProjectAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as ProjectAdditionalFields, other)); + return ProjectAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as ProjectAdditionalFields, other); } @override @@ -865,10 +877,8 @@ mixin ProjectAdditionalDetailsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProjectAdditionalDetailsMapper.ensureInitialized() - .isValueEqual(this as ProjectAdditionalDetails, other)); + return ProjectAdditionalDetailsMapper.ensureInitialized() + .equalsValue(this as ProjectAdditionalDetails, other); } @override diff --git a/packages/digit_data_model/lib/models/entities/project_facility.mapper.dart b/packages/digit_data_model/lib/models/entities/project_facility.mapper.dart index 1b891440d..3353c030a 100644 --- a/packages/digit_data_model/lib/models/entities/project_facility.mapper.dart +++ b/packages/digit_data_model/lib/models/entities/project_facility.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'project_facility.dart'; @@ -115,10 +115,8 @@ mixin ProjectFacilitySearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProjectFacilitySearchModelMapper.ensureInitialized() - .isValueEqual(this as ProjectFacilitySearchModel, other)); + return ProjectFacilitySearchModelMapper.ensureInitialized() + .equalsValue(this as ProjectFacilitySearchModel, other); } @override @@ -339,10 +337,8 @@ mixin ProjectFacilityModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProjectFacilityModelMapper.ensureInitialized() - .isValueEqual(this as ProjectFacilityModel, other)); + return ProjectFacilityModelMapper.ensureInitialized() + .equalsValue(this as ProjectFacilityModel, other); } @override @@ -543,10 +539,8 @@ mixin ProjectFacilityAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProjectFacilityAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as ProjectFacilityAdditionalFields, other)); + return ProjectFacilityAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as ProjectFacilityAdditionalFields, other); } @override diff --git a/packages/digit_data_model/lib/models/entities/project_product_variant.dart b/packages/digit_data_model/lib/models/entities/project_product_variant.dart index a1e687a51..0dd6ea6ea 100644 --- a/packages/digit_data_model/lib/models/entities/project_product_variant.dart +++ b/packages/digit_data_model/lib/models/entities/project_product_variant.dart @@ -1,11 +1,8 @@ // Generated using mason. Do not modify by hand import 'package:dart_mappable/dart_mappable.dart'; import 'package:drift/drift.dart'; - import 'package:digit_data_model/data_model.dart'; -import '../../data/local_store/sql_store/sql_store.dart'; - part 'project_product_variant.mapper.dart'; @MappableClass(ignoreNull: true, discriminatorValue: MappableClass.useAsDefault) diff --git a/packages/digit_data_model/lib/models/entities/project_product_variant.mapper.dart b/packages/digit_data_model/lib/models/entities/project_product_variant.mapper.dart index dd63099a7..c19cb4a16 100644 --- a/packages/digit_data_model/lib/models/entities/project_product_variant.mapper.dart +++ b/packages/digit_data_model/lib/models/entities/project_product_variant.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'project_product_variant.dart'; @@ -110,10 +110,8 @@ mixin ProjectProductVariantSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProjectProductVariantSearchModelMapper.ensureInitialized() - .isValueEqual(this as ProjectProductVariantSearchModel, other)); + return ProjectProductVariantSearchModelMapper.ensureInitialized() + .equalsValue(this as ProjectProductVariantSearchModel, other); } @override @@ -310,10 +308,8 @@ mixin ProjectProductVariantModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProjectProductVariantModelMapper.ensureInitialized() - .isValueEqual(this as ProjectProductVariantModel, other)); + return ProjectProductVariantModelMapper.ensureInitialized() + .equalsValue(this as ProjectProductVariantModel, other); } @override @@ -530,11 +526,8 @@ mixin ProjectProductVariantAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProjectProductVariantAdditionalFieldsMapper.ensureInitialized() - .isValueEqual( - this as ProjectProductVariantAdditionalFields, other)); + return ProjectProductVariantAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as ProjectProductVariantAdditionalFields, other); } @override diff --git a/packages/digit_data_model/lib/models/entities/project_resource.mapper.dart b/packages/digit_data_model/lib/models/entities/project_resource.mapper.dart index e0c425dca..a34218678 100644 --- a/packages/digit_data_model/lib/models/entities/project_resource.mapper.dart +++ b/packages/digit_data_model/lib/models/entities/project_resource.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'project_resource.dart'; @@ -109,10 +109,8 @@ mixin ProjectResourceSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProjectResourceSearchModelMapper.ensureInitialized() - .isValueEqual(this as ProjectResourceSearchModel, other)); + return ProjectResourceSearchModelMapper.ensureInitialized() + .equalsValue(this as ProjectResourceSearchModel, other); } @override @@ -322,10 +320,8 @@ mixin ProjectResourceModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProjectResourceModelMapper.ensureInitialized() - .isValueEqual(this as ProjectResourceModel, other)); + return ProjectResourceModelMapper.ensureInitialized() + .equalsValue(this as ProjectResourceModel, other); } @override @@ -532,10 +528,8 @@ mixin ProjectResourceAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProjectResourceAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as ProjectResourceAdditionalFields, other)); + return ProjectResourceAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as ProjectResourceAdditionalFields, other); } @override diff --git a/packages/digit_data_model/lib/models/entities/project_staff.dart b/packages/digit_data_model/lib/models/entities/project_staff.dart index 6172bd4c4..1bb606f3c 100644 --- a/packages/digit_data_model/lib/models/entities/project_staff.dart +++ b/packages/digit_data_model/lib/models/entities/project_staff.dart @@ -1,7 +1,6 @@ // Generated using mason. Do not modify by hand import 'package:dart_mappable/dart_mappable.dart'; import 'package:drift/drift.dart'; - import 'package:digit_data_model/data_model.dart'; part 'project_staff.mapper.dart'; diff --git a/packages/digit_data_model/lib/models/entities/project_staff.mapper.dart b/packages/digit_data_model/lib/models/entities/project_staff.mapper.dart index b53029adf..892f4c054 100644 --- a/packages/digit_data_model/lib/models/entities/project_staff.mapper.dart +++ b/packages/digit_data_model/lib/models/entities/project_staff.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'project_staff.dart'; @@ -136,10 +136,8 @@ mixin ProjectStaffSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProjectStaffSearchModelMapper.ensureInitialized() - .isValueEqual(this as ProjectStaffSearchModel, other)); + return ProjectStaffSearchModelMapper.ensureInitialized() + .equalsValue(this as ProjectStaffSearchModel, other); } @override @@ -391,10 +389,8 @@ mixin ProjectStaffModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProjectStaffModelMapper.ensureInitialized() - .isValueEqual(this as ProjectStaffModel, other)); + return ProjectStaffModelMapper.ensureInitialized() + .equalsValue(this as ProjectStaffModel, other); } @override @@ -608,10 +604,8 @@ mixin ProjectStaffAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProjectStaffAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as ProjectStaffAdditionalFields, other)); + return ProjectStaffAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as ProjectStaffAdditionalFields, other); } @override diff --git a/packages/digit_data_model/lib/models/entities/project_type.mapper.dart b/packages/digit_data_model/lib/models/entities/project_type.mapper.dart index d011cde6a..9e497f98a 100644 --- a/packages/digit_data_model/lib/models/entities/project_type.mapper.dart +++ b/packages/digit_data_model/lib/models/entities/project_type.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'project_type.dart'; @@ -172,10 +172,8 @@ mixin ProjectTypeModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProjectTypeModelMapper.ensureInitialized() - .isValueEqual(this as ProjectTypeModel, other)); + return ProjectTypeModelMapper.ensureInitialized() + .equalsValue(this as ProjectTypeModel, other); } @override @@ -451,10 +449,8 @@ mixin ProjectTypeAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProjectTypeAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as ProjectTypeAdditionalFields, other)); + return ProjectTypeAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as ProjectTypeAdditionalFields, other); } @override @@ -607,10 +603,8 @@ mixin ProjectCycleMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProjectCycleMapper.ensureInitialized() - .isValueEqual(this as ProjectCycle, other)); + return ProjectCycleMapper.ensureInitialized() + .equalsValue(this as ProjectCycle, other); } @override @@ -777,10 +771,8 @@ mixin ProjectCycleDeliveryMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProjectCycleDeliveryMapper.ensureInitialized() - .isValueEqual(this as ProjectCycleDelivery, other)); + return ProjectCycleDeliveryMapper.ensureInitialized() + .equalsValue(this as ProjectCycleDelivery, other); } @override @@ -947,10 +939,8 @@ mixin DeliveryDoseCriteriaMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - DeliveryDoseCriteriaMapper.ensureInitialized() - .isValueEqual(this as DeliveryDoseCriteria, other)); + return DeliveryDoseCriteriaMapper.ensureInitialized() + .equalsValue(this as DeliveryDoseCriteria, other); } @override @@ -1100,10 +1090,8 @@ mixin DeliveryProductVariantMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - DeliveryProductVariantMapper.ensureInitialized() - .isValueEqual(this as DeliveryProductVariant, other)); + return DeliveryProductVariantMapper.ensureInitialized() + .equalsValue(this as DeliveryProductVariant, other); } @override diff --git a/packages/digit_data_model/lib/models/entities/target.dart b/packages/digit_data_model/lib/models/entities/target.dart index d96f3c08c..461309bb1 100644 --- a/packages/digit_data_model/lib/models/entities/target.dart +++ b/packages/digit_data_model/lib/models/entities/target.dart @@ -34,7 +34,7 @@ class TargetModel extends EntityModel with TargetModelMappable { final bool? nonRecoverableError; final String? tenantId; final int? rowVersion; - final String? beneficiaryType; + final BeneficiaryType? beneficiaryType; final TargetAdditionalFields? additionalFields; TargetModel({ diff --git a/packages/digit_data_model/lib/models/entities/target.mapper.dart b/packages/digit_data_model/lib/models/entities/target.mapper.dart index 7cb86ee06..968b78a98 100644 --- a/packages/digit_data_model/lib/models/entities/target.mapper.dart +++ b/packages/digit_data_model/lib/models/entities/target.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'target.dart'; @@ -93,10 +93,8 @@ mixin TargetSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - TargetSearchModelMapper.ensureInitialized() - .isValueEqual(this as TargetSearchModel, other)); + return TargetSearchModelMapper.ensureInitialized() + .equalsValue(this as TargetSearchModel, other); } @override @@ -185,8 +183,8 @@ class TargetModelMapper extends SubClassMapperBase { static int? _$rowVersion(TargetModel v) => v.rowVersion; static const Field _f$rowVersion = Field('rowVersion', _$rowVersion, opt: true); - static String? _$beneficiaryType(TargetModel v) => v.beneficiaryType; - static const Field _f$beneficiaryType = + static BeneficiaryType? _$beneficiaryType(TargetModel v) => v.beneficiaryType; + static const Field _f$beneficiaryType = Field('beneficiaryType', _$beneficiaryType, opt: true); static AuditDetails? _$auditDetails(TargetModel v) => v.auditDetails; static const Field _f$auditDetails = @@ -274,10 +272,8 @@ mixin TargetModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - TargetModelMapper.ensureInitialized() - .isValueEqual(this as TargetModel, other)); + return TargetModelMapper.ensureInitialized() + .equalsValue(this as TargetModel, other); } @override @@ -311,7 +307,7 @@ abstract class TargetModelCopyWith<$R, $In extends TargetModel, $Out> bool? nonRecoverableError, String? tenantId, int? rowVersion, - String? beneficiaryType, + BeneficiaryType? beneficiaryType, AuditDetails? auditDetails, ClientAuditDetails? clientAuditDetails, bool? isDeleted}); @@ -477,10 +473,8 @@ mixin TargetAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - TargetAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as TargetAdditionalFields, other)); + return TargetAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as TargetAdditionalFields, other); } @override diff --git a/packages/digit_data_model/lib/models/entities/user.mapper.dart b/packages/digit_data_model/lib/models/entities/user.mapper.dart index 3f2bb616a..f492b70df 100644 --- a/packages/digit_data_model/lib/models/entities/user.mapper.dart +++ b/packages/digit_data_model/lib/models/entities/user.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'user.dart'; @@ -102,10 +102,8 @@ mixin UserSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - UserSearchModelMapper.ensureInitialized() - .isValueEqual(this as UserSearchModel, other)); + return UserSearchModelMapper.ensureInitialized() + .equalsValue(this as UserSearchModel, other); } @override @@ -435,10 +433,8 @@ mixin UserModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - UserModelMapper.ensureInitialized() - .isValueEqual(this as UserModel, other)); + return UserModelMapper.ensureInitialized() + .equalsValue(this as UserModel, other); } @override @@ -759,10 +755,8 @@ mixin UserAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - UserAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as UserAdditionalFields, other)); + return UserAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as UserAdditionalFields, other); } @override diff --git a/packages/digit_data_model/lib/models/entities/user_action.mapper.dart b/packages/digit_data_model/lib/models/entities/user_action.mapper.dart index 172de3356..8d078e2d5 100644 --- a/packages/digit_data_model/lib/models/entities/user_action.mapper.dart +++ b/packages/digit_data_model/lib/models/entities/user_action.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'user_action.dart'; @@ -111,10 +111,8 @@ mixin UserActionSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - UserActionSearchModelMapper.ensureInitialized() - .isValueEqual(this as UserActionSearchModel, other)); + return UserActionSearchModelMapper.ensureInitialized() + .equalsValue(this as UserActionSearchModel, other); } @override @@ -336,10 +334,8 @@ mixin UserActionModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - UserActionModelMapper.ensureInitialized() - .isValueEqual(this as UserActionModel, other)); + return UserActionModelMapper.ensureInitialized() + .equalsValue(this as UserActionModel, other); } @override @@ -562,10 +558,8 @@ mixin UserActionAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - UserActionAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as UserActionAdditionalFields, other)); + return UserActionAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as UserActionAdditionalFields, other); } @override diff --git a/packages/digit_data_model/lib/models/oplog/oplog_entry.mapper.dart b/packages/digit_data_model/lib/models/oplog/oplog_entry.mapper.dart index 3fcb7836d..79d1bb093 100644 --- a/packages/digit_data_model/lib/models/oplog/oplog_entry.mapper.dart +++ b/packages/digit_data_model/lib/models/oplog/oplog_entry.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'oplog_entry.dart'; @@ -276,10 +276,8 @@ mixin OpLogEntryMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - OpLogEntryMapper.ensureInitialized() - .isValueEqual(this as OpLogEntry, other)); + return OpLogEntryMapper.ensureInitialized() + .equalsValue(this as OpLogEntry, other); } @override @@ -465,10 +463,8 @@ mixin AdditionalIdMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - AdditionalIdMapper.ensureInitialized() - .isValueEqual(this as AdditionalId, other)); + return AdditionalIdMapper.ensureInitialized() + .equalsValue(this as AdditionalId, other); } @override diff --git a/packages/digit_data_model/lib/utils/typedefs.dart b/packages/digit_data_model/lib/utils/typedefs.dart index 995fdfff0..d6d547030 100644 --- a/packages/digit_data_model/lib/utils/typedefs.dart +++ b/packages/digit_data_model/lib/utils/typedefs.dart @@ -6,8 +6,6 @@ import '../models/entities/individual.dart'; import '../models/entities/product_variant.dart'; import '../models/entities/project_facility.dart'; import '../models/entities/project_resource.dart'; -import '../models/entities/service.dart'; -import '../models/entities/service_definition.dart'; /// `FacilityDataRepository` is a type alias for a `DataRepository` that works with `FacilityModel` and `FacilitySearchModel`. typedef FacilityDataRepository @@ -33,7 +31,3 @@ typedef ProductVariantDataRepository typedef BoundaryDataRepository = DataRepository; -typedef ServiceDataRepository - = DataRepository; -typedef ServiceDefinitionDataRepository - = DataRepository; diff --git a/packages/digit_data_model/pubspec.lock b/packages/digit_data_model/pubspec.lock index a51054106..52da34c0e 100644 --- a/packages/digit_data_model/pubspec.lock +++ b/packages/digit_data_model/pubspec.lock @@ -109,10 +109,10 @@ packages: dependency: "direct dev" description: name: build_runner - sha256: "3ac61a79bfb6f6cc11f693591063a7f19a7af628dc52f141743edac5c16e8c22" + sha256: "644dc98a0f179b872f612d3eb627924b578897c629788e858157fa5e704ca0c7" url: "https://pub.dev" source: hosted - version: "2.4.9" + version: "2.4.11" build_runner_core: dependency: transitive description: @@ -217,30 +217,6 @@ packages: url: "https://pub.dev" source: hosted version: "3.0.3" - csslib: - dependency: transitive - description: - name: csslib - sha256: "706b5707578e0c1b4b7550f64078f0a0f19dec3f50a178ffae7006b0a9ca58fb" - url: "https://pub.dev" - source: hosted - version: "1.0.0" - dart_code_metrics: - dependency: "direct dev" - description: - name: dart_code_metrics - sha256: "3dede3f7abc077a4181ec7445448a289a9ce08e2981e6a4d49a3fb5099d47e1f" - url: "https://pub.dev" - source: hosted - version: "5.7.6" - dart_code_metrics_presets: - dependency: transitive - description: - name: dart_code_metrics_presets - sha256: b71eadf02a3787ebd5c887623f83f6fdc204d45c75a081bd636c4104b3fd8b73 - url: "https://pub.dev" - source: hosted - version: "1.8.0" dart_mappable: dependency: "direct main" description: @@ -253,11 +229,11 @@ packages: dependency: "direct dev" description: path: "packages/dart_mappable_builder" - ref: master - resolved-ref: e3d8ac43f70568b4a17c200cae5cde285050ef23 + ref: "1.6-final-dev" + resolved-ref: "1e7467577a9701d396f7e23afbf00065e54c5469" url: "https://github.com/egovernments/health-campaign-field-worker-app/" source: git - version: "4.2.0" + version: "4.2.3" dart_style: dependency: transitive description: @@ -274,14 +250,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.0" - db_viewer: - dependency: transitive - description: - name: db_viewer - sha256: "5f7e3cfcde9663321797d8f6f0c876f7c13f0825a2e77ec1ef065656797144d9" - url: "https://pub.dev" - source: hosted - version: "1.1.0" diff_match_patch: dependency: transitive description: @@ -302,26 +270,18 @@ packages: dependency: "direct main" description: name: drift - sha256: b50a8342c6ddf05be53bda1d246404cbad101b64dc73e8d6d1ac1090d119b4e2 + sha256: "6acedc562ffeed308049f78fb1906abad3d65714580b6745441ee6d50ec564cd" url: "https://pub.dev" source: hosted - version: "2.15.0" - drift_db_viewer: - dependency: "direct main" - description: - name: drift_db_viewer - sha256: "5ea77858c52b55460a1e8f34ab5f88324621d486717d876fd745765fbc227f3f" - url: "https://pub.dev" - source: hosted - version: "2.1.0" + version: "2.18.0" drift_dev: dependency: "direct dev" description: name: drift_dev - sha256: c037d9431b6f8dc633652b1469e5f53aaec6e4eb405ed29dd232fa888ef10d88 + sha256: d9b020736ea85fff1568699ce18b89fabb3f0f042e8a7a05e84a3ec20d39acde url: "https://pub.dev" source: hosted - version: "2.15.0" + version: "2.18.0" fake_async: dependency: transitive description: @@ -371,10 +331,10 @@ packages: dependency: "direct dev" description: name: flutter_lints - sha256: "9e8c3858111da373efc5aa341de011d9bd23e2c5c5e0c62bccf32438e192d7b1" + sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c" url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "4.0.0" flutter_test: dependency: "direct dev" description: flutter @@ -420,22 +380,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.3.1" - html: - dependency: transitive - description: - name: html - sha256: "3a7812d5bcd2894edf53dfaf8cd640876cf6cef50a8f238745c8b8120ea74d3a" - url: "https://pub.dev" - source: hosted - version: "0.15.4" - http: - dependency: transitive - description: - name: http - sha256: "5895291c13fa8a3bd82e76d5627f69e0d85ca6a30dcac95c4ea19a5d555879c2" - url: "https://pub.dev" - source: hosted - version: "0.13.6" http_multi_server: dependency: transitive description: @@ -508,14 +452,38 @@ packages: url: "https://pub.dev" source: hosted version: "6.8.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + url: "https://pub.dev" + source: hosted + version: "10.0.4" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + url: "https://pub.dev" + source: hosted + version: "3.0.3" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" lints: dependency: transitive description: name: lints - sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290 + sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235" url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "4.0.0" logging: dependency: transitive description: @@ -528,26 +496,26 @@ packages: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.12.0" mime: dependency: transitive description: @@ -592,10 +560,10 @@ packages: dependency: "direct main" description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.9.0" path_provider: dependency: "direct main" description: @@ -644,14 +612,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.2.1" - petitparser: - dependency: transitive - description: - name: petitparser - sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27 - url: "https://pub.dev" - source: hosted - version: "6.0.2" platform: dependency: transitive description: @@ -676,14 +636,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.5.1" - process: - dependency: transitive - description: - name: process - sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09" - url: "https://pub.dev" - source: hosted - version: "4.2.4" provider: dependency: transitive description: @@ -700,14 +652,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" - pub_updater: - dependency: transitive - description: - name: pub_updater - sha256: "05ae70703e06f7fdeb05f7f02dd680b8aad810e87c756a618f33e1794635115c" - url: "https://pub.dev" - source: hosted - version: "0.3.0" pubspec_parse: dependency: transitive description: @@ -801,6 +745,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.10.0" + sprintf: + dependency: transitive + description: + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" + url: "https://pub.dev" + source: hosted + version: "7.0.0" sqlite3: dependency: transitive description: @@ -813,18 +765,18 @@ packages: dependency: "direct main" description: name: sqlite3_flutter_libs - sha256: fb2a106a2ea6042fe57de2c47074cc31539a941819c91e105b864744605da3f5 + sha256: "636b0fe8a2de894e5455572f6cbbc458f4ffecfe9f860b79439e27041ea4f0b9" url: "https://pub.dev" source: hosted - version: "0.5.21" + version: "0.5.27" sqlparser: dependency: transitive description: name: sqlparser - sha256: "7b20045d1ccfb7bc1df7e8f9fee5ae58673fce6ff62cefbb0e0fd7214e90e5a0" + sha256: ade9a67fd70d0369329ed3373208de7ebd8662470e8c396fc8d0d60f9acdfc9f url: "https://pub.dev" source: hosted - version: "0.34.1" + version: "0.36.0" stack_trace: dependency: transitive description: @@ -869,26 +821,26 @@ packages: dependency: transitive description: name: test - sha256: a1f7595805820fcc05e5c52e3a231aedd0b72972cb333e8c738a8b1239448b6f + sha256: "7ee446762c2c50b3bd4ea96fe13ffac69919352bd3b4b17bac3f3465edc58073" url: "https://pub.dev" source: hosted - version: "1.24.9" + version: "1.25.2" test_api: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.0" test_core: dependency: transitive description: name: test_core - sha256: a757b14fc47507060a162cc2530d9a4a2f92f5100a952c7443b5cad5ef5b106a + sha256: "2bc4b4ecddd75309300d8096f781c0e3280ca1ef85beda558d33fcbedc2eead4" url: "https://pub.dev" source: hosted - version: "0.5.9" + version: "0.6.0" time: dependency: transitive description: @@ -925,10 +877,10 @@ packages: dependency: "direct main" description: name: uuid - sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" + sha256: a5be9ef6618a7ac1e964353ef476418026db906c4facdedaa299b7a2e71690ff url: "https://pub.dev" source: hosted - version: "3.0.7" + version: "4.5.1" vector_math: dependency: transitive description: @@ -941,10 +893,10 @@ packages: dependency: transitive description: name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" url: "https://pub.dev" source: hosted - version: "13.0.0" + version: "14.2.1" watcher: dependency: transitive description: @@ -957,10 +909,10 @@ packages: dependency: transitive description: name: web - sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "0.5.1" web_socket_channel: dependency: transitive description: @@ -993,14 +945,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.4" - xml: - dependency: transitive - description: - name: xml - sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226 - url: "https://pub.dev" - source: hosted - version: "6.5.0" xxh3: dependency: transitive description: @@ -1018,5 +962,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.2.0 <4.0.0" - flutter: ">=3.16.0" + dart: ">=3.4.0 <4.0.0" + flutter: ">=3.18.0-18.0.pre.54" diff --git a/packages/digit_data_model/pubspec.yaml b/packages/digit_data_model/pubspec.yaml index 578521884..5298d5f6a 100644 --- a/packages/digit_data_model/pubspec.yaml +++ b/packages/digit_data_model/pubspec.yaml @@ -1,6 +1,6 @@ name: digit_data_model description: The digit_data_model package is a data modeling library. It defines various classes, enums, and functions. -version: 1.0.4+1 +version: 1.0.5+1 homepage: https://github.com/egovernments/health-campaign-field-worker-app/tree/master/packages/digit_data_model repository: https://github.com/egovernments/health-campaign-field-worker-app @@ -11,36 +11,34 @@ environment: dependencies: flutter: sdk: flutter - flutter_bloc: ^8.1.1 - freezed_annotation: ^2.1.0 + flutter_bloc: ^8.1.5 + freezed_annotation: ^2.4.1 dart_mappable: ^4.2.0 - drift: ^2.0.0 - sqlite3_flutter_libs: ^0.5.10 - path_provider: ^2.0.11 - path: ^1.8.2 - drift_db_viewer: ^2.0.0 - uuid: ^3.0.6 + drift: ^2.18.0 + sqlite3_flutter_libs: ^0.5.23 + path_provider: ^2.1.3 + path: ^1.9.0 + uuid: ^4.4.0 recase: ^4.1.0 - isar: ^3.0.5 - isar_flutter_libs: ^3.0.5 - dio: ^5.1.2 - mocktail: ^1.0.2 - collection: ^1.16.0 + isar: ^3.1.0+1 + isar_flutter_libs: ^3.1.0+1 + dio: ^5.4.3+1 + mocktail: ^1.0.3 + collection: ^1.18.0 dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^3.0.1 - dart_code_metrics: ^5.7.6 + flutter_lints: ^4.0.0 freezed: ^2.1.0+1 - build_runner: ^2.4.9 + build_runner: ^2.4.11 json_serializable: ^6.4.0 - drift_dev: ^2.14.1 + drift_dev: ^2.18.0 bloc_test: ^9.1.0 dart_mappable_builder: git: url: https://github.com/egovernments/health-campaign-field-worker-app/ - ref: master + ref: 1.6-final-dev path: ./packages/dart_mappable_builder isar_generator: ^3.0.5 @@ -50,33 +48,33 @@ dev_dependencies: # The following section is specific to Flutter packages. flutter: - # To add assets to your package, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg - # - # For details regarding assets in packages, see - # https://flutter.dev/assets-and-images/#from-packages - # - # An image asset can refer to one or more resolution-specific "variants", see - # https://flutter.dev/assets-and-images/#resolution-aware +# To add assets to your package, add an assets section, like this: +# assets: +# - images/a_dot_burr.jpeg +# - images/a_dot_ham.jpeg +# +# For details regarding assets in packages, see +# https://flutter.dev/assets-and-images/#from-packages +# +# An image asset can refer to one or more resolution-specific "variants", see +# https://flutter.dev/assets-and-images/#resolution-aware - # To add custom fonts to your package, add a fonts section here, - # in this "flutter" section. Each entry in this list should have a - # "family" key with the font family name, and a "fonts" key with a - # list giving the asset and other descriptors for the font. For - # example: - # fonts: - # - family: Schyler - # fonts: - # - asset: fonts/Schyler-Regular.ttf - # - asset: fonts/Schyler-Italic.ttf - # style: italic - # - family: Trajan Pro - # fonts: - # - asset: fonts/TrajanPro.ttf - # - asset: fonts/TrajanPro_Bold.ttf - # weight: 700 - # - # For details regarding fonts in packages, see - # https://flutter.dev/custom-fonts/#from-packages +# To add custom fonts to your package, add a fonts section here, +# in this "flutter" section. Each entry in this list should have a +# "family" key with the font family name, and a "fonts" key with a +# list giving the asset and other descriptors for the font. For +# example: +# fonts: +# - family: Schyler +# fonts: +# - asset: fonts/Schyler-Regular.ttf +# - asset: fonts/Schyler-Italic.ttf +# style: italic +# - family: Trajan Pro +# fonts: +# - asset: fonts/TrajanPro.ttf +# - asset: fonts/TrajanPro_Bold.ttf +# weight: 700 +# +# For details regarding fonts in packages, see +# https://flutter.dev/custom-fonts/#from-packages diff --git a/packages/digit_dss/.gitignore b/packages/digit_dss/.gitignore index ac5aa9893..a68ac422a 100644 --- a/packages/digit_dss/.gitignore +++ b/packages/digit_dss/.gitignore @@ -23,7 +23,6 @@ migrate_working_dir/ # Flutter/Dart/Pub related # Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. -/pubspec.lock **/doc/api/ .dart_tool/ build/ diff --git a/packages/digit_dss/CHANGELOG.md b/packages/digit_dss/CHANGELOG.md index 968f59396..dbf14003e 100644 --- a/packages/digit_dss/CHANGELOG.md +++ b/packages/digit_dss/CHANGELOG.md @@ -1,21 +1,39 @@ +## 1.0.3 + +* Updated to latest package versions +* Updated flutter version to 3.22 +* Migrated to digit_ui_components + +## 1.0.2 + +* Bug fixes + * Added last sync time +* Added amount enum + ## 1.0.1 + * Bug fixes * Added enums for dss charts * Fixed chart delete issue * Updated digit_scanner package, digit_components, digit_data_model, attendance_management ## 1.0.0 + * Initial DSS Dashboard Release supporting metric and table charts ## 0.0.1-dev.4 -* Added error toast for network failure + +* Added error toast for network failure * No result card added if no charts available ## 0.0.1-dev.3 + * Fixed user uuid search for dss charts ## 0.0.1-dev.2 + * Added userIds and project Id filters for all dss charts ## 0.0.1-dev.1 + * Initial DSS Dashboard Release diff --git a/packages/digit_dss/lib/blocs/dashboard.dart b/packages/digit_dss/lib/blocs/dashboard.dart index b41be19c3..f1da76177 100644 --- a/packages/digit_dss/lib/blocs/dashboard.dart +++ b/packages/digit_dss/lib/blocs/dashboard.dart @@ -3,12 +3,12 @@ import 'dart:async'; // Import the dart:async library for asynchronous operation import 'package:attendance_management/attendance_management.dart'; import 'package:attendance_management/utils/typedefs.dart'; import 'package:collection/collection.dart'; // Import the collection package for collection utilities -import 'package:digit_components/models/digit_table_model.dart'; // Import the digit_table_model.dart file from the digit_components package -import 'package:digit_components/theme/colors.dart'; // Import the colors.dart file from the digit_components package -import 'package:digit_components/theme/digit_theme.dart'; // Import the digit_theme.dart file from the digit_components package -import 'package:digit_components/utils/date_utils.dart'; import 'package:digit_data_model/data_model.dart'; import 'package:digit_dss/digit_dss.dart'; // Import the digit_dss.dart file from the digit_dss package +import 'package:digit_ui_components/theme/colors.dart'; +import 'package:digit_ui_components/theme/digit_theme.dart'; +import 'package:digit_ui_components/utils/date_utils.dart'; +import 'package:digit_ui_components/widgets/atoms/table_cell.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; // Import the flutter_bloc package for state management import 'package:freezed_annotation/freezed_annotation.dart'; // Import the freezed_annotation package for code generation @@ -80,11 +80,11 @@ class DashboardBloc extends Bloc { ), ); List attendeesIndividualIds = []; - registers.forEach((r) { + for (var r in registers) { r.attendees?.where((a) => a.individualId != null).forEach((att) { attendeesIndividualIds.add(att.individualId.toString()); }); - }); + } final individuals = await individualDataRepository.search(IndividualSearchModel( id: attendeesIndividualIds, @@ -177,7 +177,7 @@ class DashboardBloc extends Bloc { for (DashboardResponse chart in tableCharts) { if ((chart.data ?? []).isNotEmpty) { // Create table headers - final List tableHeaderList = chart.data?.first.plots + final List tableHeaderList = chart.data?.first.plots ?.where((p) => p.name != DSSEnums.serialNumber.toValue() && p.name != DSSEnums.startDate.toValue() && @@ -185,10 +185,7 @@ class DashboardBloc extends Bloc { p.name != null) .map((e) { final headerData = transformToLocaleCode(e.name ?? ''); - return TableHeader( - headerData ?? '', - cellKey: e.name, - ); + return DigitTableColumn(header: headerData, cellValue: e.name!); }).toList() ?? []; @@ -200,7 +197,7 @@ class DashboardBloc extends Bloc { p.name != DSSEnums.startDate.toValue() && p.name != DSSEnums.endDate.toValue()) .mapIndexed( - (i, plot) => TableData( + (i, plot) => DigitTableData( plot.symbol == DSSEnums.number.toValue() || plot.symbol == DSSEnums.percentage.toValue() || plot.symbol == DSSEnums.amount.toValue() @@ -220,17 +217,17 @@ class DashboardBloc extends Bloc { : double.parse(plot.value.toString()) .toStringAsFixed(2) : plot.label.toString(), - cellKey: plot.name, + cellKey: plot.name!, style: DigitTheme.instance.mobileTheme.textTheme.bodyMedium ?.apply( color: i == 0 - ? const DigitColors().burningOrange - : const DigitColors().woodsmokeBlack, + ? const DigitColors().light.primary1 + : const DigitColors().light.textPrimary, ), ), ) .toList(); - return TableDataRow(rowTableData ?? []); + return DigitTableRow(tableRow: rowTableData!); }).toList(); tableWrapperList.add(TableWrapper( headerList: tableHeaderList, @@ -300,8 +297,8 @@ class MetricWrapper { // Class for wrapping table data class TableWrapper { - final List headerList; // List of table headers - final List tableData; // List of table data rows + final List headerList; // List of table headers + final List tableData; // List of table data rows TableWrapper({ required this.headerList, diff --git a/packages/digit_dss/lib/data/remote/dashboard.dart b/packages/digit_dss/lib/data/remote/dashboard.dart index 8f6a2a321..3108d5c2b 100644 --- a/packages/digit_dss/lib/data/remote/dashboard.dart +++ b/packages/digit_dss/lib/data/remote/dashboard.dart @@ -1,8 +1,8 @@ import 'dart:async'; // Import the dart:async library for asynchronous operations import 'dart:convert'; // Import the dart:convert library for JSON encoding and decoding -import 'package:digit_components/utils/app_logger.dart'; // Import the app_logger.dart file from the digit_components package import 'package:digit_dss/data/local_store/no_sql/schema/dashboard_response.dart'; // Import the dashboard_response.dart file from the digit_dss package +import 'package:digit_ui_components/utils/app_logger.dart'; import 'package:dio/dio.dart'; // Import the dio package for HTTP client functionality import 'package:flutter/material.dart'; import 'package:isar/isar.dart'; // Import the isar package for database management diff --git a/packages/digit_dss/lib/models/entities/chart_data.dart b/packages/digit_dss/lib/models/entities/chart_data.dart index 5e66310db..184c533f6 100644 --- a/packages/digit_dss/lib/models/entities/chart_data.dart +++ b/packages/digit_dss/lib/models/entities/chart_data.dart @@ -1,6 +1,5 @@ // Generated using mason. Do not modify by hand import 'package:dart_mappable/dart_mappable.dart'; -import 'package:digit_data_model/data_model.dart'; import 'package:digit_dss/models/entities/insight.dart'; import 'package:digit_dss/models/entities/plots.dart'; diff --git a/packages/digit_dss/lib/models/entities/chart_data.mapper.dart b/packages/digit_dss/lib/models/entities/chart_data.mapper.dart index 9a69bda16..afb59e1f5 100644 --- a/packages/digit_dss/lib/models/entities/chart_data.mapper.dart +++ b/packages/digit_dss/lib/models/entities/chart_data.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'chart_data.dart'; @@ -110,10 +110,8 @@ mixin DashboardChartDataModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - DashboardChartDataModelMapper.ensureInitialized() - .isValueEqual(this as DashboardChartDataModel, other)); + return DashboardChartDataModelMapper.ensureInitialized() + .equalsValue(this as DashboardChartDataModel, other); } @override diff --git a/packages/digit_dss/lib/models/entities/dashboard_request.mapper.dart b/packages/digit_dss/lib/models/entities/dashboard_request.mapper.dart index 078f5d311..6f79c3cd9 100644 --- a/packages/digit_dss/lib/models/entities/dashboard_request.mapper.dart +++ b/packages/digit_dss/lib/models/entities/dashboard_request.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'dashboard_request.dart'; @@ -80,10 +80,8 @@ mixin DashboardRequestModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - DashboardRequestModelMapper.ensureInitialized() - .isValueEqual(this as DashboardRequestModel, other)); + return DashboardRequestModelMapper.ensureInitialized() + .equalsValue(this as DashboardRequestModel, other); } @override @@ -242,10 +240,8 @@ mixin AggregationRequestDtoMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - AggregationRequestDtoMapper.ensureInitialized() - .isValueEqual(this as AggregationRequestDto, other)); + return AggregationRequestDtoMapper.ensureInitialized() + .equalsValue(this as AggregationRequestDto, other); } @override @@ -410,10 +406,8 @@ mixin RequestDateMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - RequestDateMapper.ensureInitialized() - .isValueEqual(this as RequestDate, other)); + return RequestDateMapper.ensureInitialized() + .equalsValue(this as RequestDate, other); } @override @@ -529,10 +523,8 @@ mixin DSSHeadersMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - DSSHeadersMapper.ensureInitialized() - .isValueEqual(this as DSSHeaders, other)); + return DSSHeadersMapper.ensureInitialized() + .equalsValue(this as DSSHeaders, other); } @override diff --git a/packages/digit_dss/lib/models/entities/dashboard_response_model.mapper.dart b/packages/digit_dss/lib/models/entities/dashboard_response_model.mapper.dart index 3d5f63a52..c116e0b23 100644 --- a/packages/digit_dss/lib/models/entities/dashboard_response_model.mapper.dart +++ b/packages/digit_dss/lib/models/entities/dashboard_response_model.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'dashboard_response_model.dart'; @@ -92,10 +92,8 @@ mixin DashboardResponseSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - DashboardResponseSearchModelMapper.ensureInitialized() - .isValueEqual(this as DashboardResponseSearchModel, other)); + return DashboardResponseSearchModelMapper.ensureInitialized() + .equalsValue(this as DashboardResponseSearchModel, other); } @override @@ -268,10 +266,8 @@ mixin DashboardResponseModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - DashboardResponseModelMapper.ensureInitialized() - .isValueEqual(this as DashboardResponseModel, other)); + return DashboardResponseModelMapper.ensureInitialized() + .equalsValue(this as DashboardResponseModel, other); } @override diff --git a/packages/digit_dss/lib/models/entities/dss_enums.mapper.dart b/packages/digit_dss/lib/models/entities/dss_enums.mapper.dart index ce46f6324..94fcf02e9 100644 --- a/packages/digit_dss/lib/models/entities/dss_enums.mapper.dart +++ b/packages/digit_dss/lib/models/entities/dss_enums.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'dss_enums.dart'; diff --git a/packages/digit_dss/lib/models/entities/insight.dart b/packages/digit_dss/lib/models/entities/insight.dart index 763711b0d..d87dd17f1 100644 --- a/packages/digit_dss/lib/models/entities/insight.dart +++ b/packages/digit_dss/lib/models/entities/insight.dart @@ -1,6 +1,5 @@ // Generated using mason. Do not modify by hand import 'package:dart_mappable/dart_mappable.dart'; -import 'package:digit_data_model/data_model.dart'; part 'insight.mapper.dart'; diff --git a/packages/digit_dss/lib/models/entities/insight.mapper.dart b/packages/digit_dss/lib/models/entities/insight.mapper.dart index a260a0986..83442b816 100644 --- a/packages/digit_dss/lib/models/entities/insight.mapper.dart +++ b/packages/digit_dss/lib/models/entities/insight.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'insight.dart'; @@ -99,10 +99,8 @@ mixin InsightModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - InsightModelMapper.ensureInitialized() - .isValueEqual(this as InsightModel, other)); + return InsightModelMapper.ensureInitialized() + .equalsValue(this as InsightModel, other); } @override diff --git a/packages/digit_dss/lib/models/entities/plots.dart b/packages/digit_dss/lib/models/entities/plots.dart index 526377ef1..3b2fd7248 100644 --- a/packages/digit_dss/lib/models/entities/plots.dart +++ b/packages/digit_dss/lib/models/entities/plots.dart @@ -1,6 +1,5 @@ // Generated using mason. Do not modify by hand import 'package:dart_mappable/dart_mappable.dart'; -import 'package:digit_data_model/data_model.dart'; part 'plots.mapper.dart'; diff --git a/packages/digit_dss/lib/models/entities/plots.mapper.dart b/packages/digit_dss/lib/models/entities/plots.mapper.dart index 7369df595..133345c7c 100644 --- a/packages/digit_dss/lib/models/entities/plots.mapper.dart +++ b/packages/digit_dss/lib/models/entities/plots.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'plots.dart'; @@ -107,10 +107,8 @@ mixin DashboardPlotModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - DashboardPlotModelMapper.ensureInitialized() - .isValueEqual(this as DashboardPlotModel, other)); + return DashboardPlotModelMapper.ensureInitialized() + .equalsValue(this as DashboardPlotModel, other); } @override diff --git a/packages/digit_dss/lib/pages/dashboard/dashboard.dart b/packages/digit_dss/lib/pages/dashboard/dashboard.dart index f81d390c2..f838572b1 100644 --- a/packages/digit_dss/lib/pages/dashboard/dashboard.dart +++ b/packages/digit_dss/lib/pages/dashboard/dashboard.dart @@ -1,9 +1,14 @@ import 'package:auto_route/auto_route.dart'; -import 'package:digit_components/digit_components.dart'; -import 'package:digit_components/models/digit_table_model.dart'; -import 'package:digit_components/widgets/atoms/digit_toaster.dart'; import 'package:digit_dss/blocs/dashboard.dart'; import 'package:digit_dss/widgets/back_navigation_help_header.dart'; +import 'package:digit_ui_components/enum/app_enums.dart'; +import 'package:digit_ui_components/theme/spacers.dart'; +import 'package:digit_ui_components/widgets/atoms/digit_info_card.dart'; +import 'package:digit_ui_components/widgets/atoms/digit_loader.dart'; +import 'package:digit_ui_components/widgets/atoms/digit_toast.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_table.dart'; +import 'package:digit_ui_components/widgets/powered_by_digit.dart'; +import 'package:digit_ui_components/widgets/scrollable_content.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; @@ -50,7 +55,7 @@ class UserDashboardPageState extends LocalizedState { setState(() { isLoading = true; }); - Loaders.showLoadingDialog(context); + DigitLoaders.overlayLoader(context: context); } }, fetched: ( @@ -61,12 +66,12 @@ class UserDashboardPageState extends LocalizedState { ) { Navigator.of(context, rootNavigator: true).pop(); if (isNetworkError == true) { - DigitToast.show(context, - options: DigitToastOptions( + Toast.showToast( + context, + message: localizations.translate(i18.dashboard.someErrorOccured), - true, - DigitTheme.instance.mobileTheme, - )); + type: ToastType.error, + ); } setState(() { @@ -78,11 +83,11 @@ class UserDashboardPageState extends LocalizedState { setState(() { isLoading = false; }); - DigitToast.show(context, - options: DigitToastOptions( - localizations.translate(i18.dashboard.someErrorOccured), - true, - DigitTheme.instance.mobileTheme)); + Toast.showToast( + context, + message: localizations.translate(i18.dashboard.someErrorOccured), + type: ToastType.error, + ); }); }, builder: (context, dashboardState) { return RefreshIndicator( @@ -92,21 +97,7 @@ class UserDashboardPageState extends LocalizedState { fetched: (metricData, tableData, selectedDate, isNetworkError) async { bool isConnected = await getIsConnected(); - if (isConnected) { - context.read().add(DashboardRefreshEvent( - projectId: DashboardSingleton().projectId, - syncFromServer: true, - selectedDate: selectedDate ?? DateTime.now(), - )); - } else { - DigitToast.show(context, - options: DigitToastOptions( - localizations - .translate(i18.dashboard.networkFailureError), - true, - DigitTheme.instance.mobileTheme, - )); - } + fetchData(isConnected, selectedDate); }); return Future.delayed(const Duration(seconds: 1)); @@ -141,35 +132,29 @@ class UserDashboardPageState extends LocalizedState { ), ...(tableData ?? []) .map((table) => Padding( - padding: const EdgeInsets.all(kPadding), + padding: const EdgeInsets.all(spacer1), child: DigitTable( - headerList: table.headerList.map((header) { - return TableHeader( - localizations.translate(header.label), - cellKey: header.cellKey, - ); - }).toList(), - tableData: table.tableData, - height: ((table.tableData.length) + 1) * 65, - columnWidth: - MediaQuery.of(context).size.width / 2, - columnRowFixedHeight: 65, - scrollPhysics: (table.tableData.length ?? - 0) > - 5 + scrollPhysics: (table.tableData.length) > 5 ? const ClampingScrollPhysics() : const NeverScrollableScrollPhysics(), + rows: table.tableData, + columns: table.headerList, + tableHeight: + MediaQuery.of(context).size.height * .3, + showSelectedState: false, + showPagination: false, ), )) .toList(), if ((tableData ?? []).isNotEmpty) Align( alignment: Alignment.center, - child: DigitInfoCard( + child: InfoCard( title: localizations .translate(i18.dashboard.noteHeader), description: localizations .translate(i18.dashboard.noteDescription), + type: InfoType.info, ), ) ], @@ -181,4 +166,20 @@ class UserDashboardPageState extends LocalizedState { ); }); } + + void fetchData(bool isConnected, DateTime? selectedDate) { + if (isConnected) { + context.read().add(DashboardRefreshEvent( + projectId: DashboardSingleton().projectId, + syncFromServer: true, + selectedDate: selectedDate ?? DateTime.now(), + )); + } else { + Toast.showToast( + context, + message: localizations.translate(i18.dashboard.networkFailureError), + type: ToastType.error, + ); + } + } } diff --git a/packages/digit_dss/lib/router/dashboard_router.dart b/packages/digit_dss/lib/router/dashboard_router.dart index f20ca702e..e9db233f5 100644 --- a/packages/digit_dss/lib/router/dashboard_router.dart +++ b/packages/digit_dss/lib/router/dashboard_router.dart @@ -4,10 +4,8 @@ import 'dashboard_router.gm.dart'; @AutoRouterConfig.module() class DashboardRoute extends $DashboardRoute { - @override RouteType get defaultRouteType => const RouteType.material(); - @override List routes = [ AutoRoute( page: UserDashboardRoute.page, diff --git a/packages/digit_dss/lib/utils/utils.dart b/packages/digit_dss/lib/utils/utils.dart index 08334cf1d..00c407f6d 100644 --- a/packages/digit_dss/lib/utils/utils.dart +++ b/packages/digit_dss/lib/utils/utils.dart @@ -1,11 +1,12 @@ import 'dart:io'; -import 'package:digit_components/digit_components.dart'; import 'package:digit_data_model/data_model.dart'; import 'package:digit_dss/blocs/app_localization.dart'; import 'package:digit_dss/data/local_store/no_sql/schema/dashboard_config_schema.dart'; import 'package:digit_dss/data/remote/dashboard.dart'; import 'package:digit_dss/models/entities/dashboard_request.dart'; +import 'package:digit_ui_components/theme/digit_theme.dart'; +import 'package:digit_ui_components/theme/spacers.dart'; import 'package:flutter/material.dart'; import 'package:isar/isar.dart'; @@ -43,7 +44,7 @@ Widget buildMetric( width: MediaQuery.of(context).size.width / 3.6, child: Divider( indent: 0, - height: kPadding, + height: spacer1, endIndent: 0, thickness: 2, color: DigitTheme.instance.mobileTheme.colorScheme.outline, diff --git a/packages/digit_dss/lib/widgets/back_navigation_help_header.dart b/packages/digit_dss/lib/widgets/back_navigation_help_header.dart index c374ca8bb..124e10f5c 100644 --- a/packages/digit_dss/lib/widgets/back_navigation_help_header.dart +++ b/packages/digit_dss/lib/widgets/back_navigation_help_header.dart @@ -1,6 +1,6 @@ import 'package:auto_route/auto_route.dart'; -import 'package:digit_components/digit_components.dart'; import 'package:digit_dss/blocs/app_localization.dart'; +import 'package:digit_ui_components/theme/spacers.dart'; import 'package:flutter/material.dart'; import '../../utils/i18_key_constants.dart' as i18; @@ -26,7 +26,7 @@ class BackNavigationHelpHeaderWidget extends StatelessWidget { final theme = Theme.of(context); return Padding( - padding: const EdgeInsets.all(kPadding / 2), + padding: const EdgeInsets.all(spacer1 / 2), child: Row( children: [ Expanded( @@ -36,7 +36,7 @@ class BackNavigationHelpHeaderWidget extends StatelessWidget { Flexible( child: TextButton.icon( style: TextButton.styleFrom( - foregroundColor: theme.colorScheme.onBackground, + foregroundColor: theme.colorScheme.primary, padding: EdgeInsets.zero, ), onPressed: () { @@ -55,7 +55,7 @@ class BackNavigationHelpHeaderWidget extends StatelessWidget { ], ), ), - SizedBox(width: showHelp ? kPadding * 2 : 0), + SizedBox(width: showHelp ? spacer2 : 0), if (showHelp) TextButton( style: TextButton.styleFrom(padding: EdgeInsets.zero), diff --git a/packages/digit_dss/lib/widgets/dashboard/dashboard_metric_card.dart b/packages/digit_dss/lib/widgets/dashboard/dashboard_metric_card.dart index ab9ae35be..9575ea32d 100644 --- a/packages/digit_dss/lib/widgets/dashboard/dashboard_metric_card.dart +++ b/packages/digit_dss/lib/widgets/dashboard/dashboard_metric_card.dart @@ -1,8 +1,8 @@ import 'package:collection/collection.dart'; -import 'package:digit_components/digit_components.dart'; -import 'package:digit_components/utils/date_utils.dart'; -import 'package:digit_components/widgets/atoms/digit_toaster.dart'; import 'package:digit_dss/widgets/localized.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/utils/date_utils.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; @@ -34,158 +34,154 @@ class _DashboardMetricCardState extends LocalizedState { return BlocBuilder( builder: (context, dashboardState) { - return DigitCard( - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Padding( - padding: const EdgeInsets.symmetric( - horizontal: kPadding * 2, - vertical: kPadding * 2, - ), - child: Text( - localizations.translate( - i18.dashboard.dashboardLabel, - ), - style: theme.textTheme.displayMedium, + return DigitCard(children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Padding( + padding: const EdgeInsets.symmetric( + horizontal: spacer2, + vertical: spacer2, + ), + child: Text( + localizations.translate( + i18.dashboard.dashboardLabel, ), + style: theme.textTheme.displayMedium, ), - Expanded( - child: InkWell( - onTap: () async { - bool isConnected = await getIsConnected(); - if (isConnected) { - DateTime? pickedDate = await showDatePicker( - context: context, - initialDate: DateTime.now(), - firstDate: DateTime(1900), - lastDate: DateTime.now(), - ); - - if (pickedDate != null && pickedDate != DateTime.now()) { - final dashboardBloc = context.read(); - dashboardBloc.add(DashboardRefreshEvent( - selectedDate: pickedDate.toLocal(), - projectId: DashboardSingleton().projectId, - syncFromServer: true, - )); - } - } else { - DigitToast.show(context, - options: DigitToastOptions( - localizations - .translate(i18.dashboard.networkFailureError), - true, - DigitTheme.instance.mobileTheme)); - } - }, - child: Container( - alignment: Alignment.centerRight, - padding: const EdgeInsets.only(bottom: 12), - child: Wrap( - crossAxisAlignment: WrapCrossAlignment.center, - children: [ - Text( - dashboardState.maybeWhen( - orElse: () => '', - fetched: (metricData, tableData, selectedDate, - isNetworkError) => - '${DigitDateUtils.getMonth(selectedDate?.toLocal() ?? DateTime.now())} - ${(selectedDate?.toLocal() ?? DateTime.now()).day}, ${(selectedDate?.toLocal() ?? DateTime.now()).year}'), - style: theme.textTheme.bodyMedium - ?.apply(color: theme.colorScheme.secondary), + ), + Expanded( + child: InkWell( + onTap: () async { + bool isConnected = await getIsConnected(); + fetchChartData(isConnected); + }, + child: Container( + alignment: Alignment.centerRight, + padding: const EdgeInsets.only(bottom: 12), + child: Wrap( + crossAxisAlignment: WrapCrossAlignment.center, + children: [ + Text( + dashboardState.maybeWhen( + orElse: () => '', + fetched: (metricData, tableData, selectedDate, + isNetworkError) => + '${DigitDateUtils.getMonth(selectedDate?.toLocal() ?? DateTime.now())} - ${(selectedDate?.toLocal() ?? DateTime.now()).day}, ${(selectedDate?.toLocal() ?? DateTime.now()).year}'), + style: theme.textTheme.bodyMedium + ?.apply(color: theme.colorScheme.secondary), + ), + const Padding( + padding: EdgeInsets.only(right: 3.0), + child: Visibility( + child: Icon(Icons.arrow_drop_down), ), - const Padding( - padding: EdgeInsets.only(right: 3.0), - child: Visibility( - child: Icon(Icons.arrow_drop_down), - ), - ) - ]), - ), + ) + ]), ), - ) - ], - ), - Padding( - padding: const EdgeInsets.only(top: kPadding, bottom: kPadding), - child: Wrap( - spacing: 2.0, // Space between items - runSpacing: 2.0, // Space between lines - alignment: WrapAlignment.start, - children: [ - ...dashboardState.maybeWhen( - orElse: () => [], - fetched: - (metricData, tableData, selectedDate, isNetworkError) { - return metricData != null - ? metricData.entries - .where((m) => m.value.isHorizontal == true) - .mapIndexed(( - i, - entry, - ) { - return SizedBox( - height: MediaQuery.of(context).size.width / 3.8, - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - mainAxisSize: MainAxisSize.min, - children: [ - buildMetric( - context, - entry.key, - entry.value.value, - i, - localizations, - ), - if (entry.key != - metricData.entries.last.key) - VerticalDivider( - width: kPadding, - color: DigitTheme.instance.mobileTheme - .colorScheme.outline, - thickness: 2, - ), - ], - ), - ); - }).toList() - : []; - }), - ...dashboardState.maybeWhen( - orElse: () => [], - fetched: - (metricData, tableData, selectedDate, isNetworkError) { - return metricData != null - ? metricData.entries - .where((m) => m.value.isHorizontal == false) - .mapIndexed(( - i, - entry, - ) { - return Align( - alignment: Alignment.centerLeft, - child: Padding( - padding: const EdgeInsets.symmetric( - vertical: kPadding), - child: Text( - '${entry.value.value} ${localizations.translate(entry.value.header)}', - textAlign: TextAlign.start, - style: DigitTheme.instance.mobileTheme - .textTheme.bodyMedium, + ), + ) + ], + ), + Padding( + padding: const EdgeInsets.only(top: spacer1, bottom: spacer1), + child: Wrap( + spacing: 2.0, // Space between items + runSpacing: 2.0, // Space between lines + alignment: WrapAlignment.start, + children: [ + ...dashboardState.maybeWhen( + orElse: () => [], + fetched: + (metricData, tableData, selectedDate, isNetworkError) { + return metricData != null + ? metricData.entries + .where((m) => m.value.isHorizontal == true) + .mapIndexed(( + i, + entry, + ) { + return SizedBox( + height: MediaQuery.of(context).size.width / 3.8, + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + mainAxisSize: MainAxisSize.min, + children: [ + buildMetric( + context, + entry.key, + entry.value.value, + i, + localizations, ), + if (entry.key != metricData.entries.last.key) + VerticalDivider( + width: spacer1, + color: DigitTheme.instance.mobileTheme + .colorScheme.outline, + thickness: 2, + ), + ], + ), + ); + }).toList() + : []; + }), + ...dashboardState.maybeWhen( + orElse: () => [], + fetched: + (metricData, tableData, selectedDate, isNetworkError) { + return metricData != null + ? metricData.entries + .where((m) => m.value.isHorizontal == false) + .mapIndexed(( + i, + entry, + ) { + return Align( + alignment: Alignment.centerLeft, + child: Padding( + padding: const EdgeInsets.symmetric( + vertical: spacer1), + child: Text( + '${entry.value.value} ${localizations.translate(entry.value.header)}', + textAlign: TextAlign.start, + style: DigitTheme.instance.mobileTheme + .textTheme.bodyMedium, ), - ); - }).toList() - : []; - }), - ], - ), + ), + ); + }).toList() + : []; + }), + ], ), - ], - )); + ), + ]); }); } + + void fetchChartData(bool isConnected) async { + if (isConnected) { + DateTime? pickedDate = await showDatePicker( + context: context, + initialDate: DateTime.now(), + firstDate: DateTime(1900), + lastDate: DateTime.now(), + ); + + if (pickedDate != null && pickedDate != DateTime.now() && mounted) { + final dashboardBloc = context.read(); + dashboardBloc.add(DashboardRefreshEvent( + selectedDate: pickedDate.toLocal(), + projectId: DashboardSingleton().projectId, + syncFromServer: true, + )); + } + } else { + Toast.showToast(context, + message: localizations.translate(i18.dashboard.networkFailureError), + type: ToastType.error); + } + } } diff --git a/packages/digit_dss/lib/widgets/no_result_card.dart b/packages/digit_dss/lib/widgets/no_result_card.dart index f63d1eb56..7c31a4071 100644 --- a/packages/digit_dss/lib/widgets/no_result_card.dart +++ b/packages/digit_dss/lib/widgets/no_result_card.dart @@ -1,5 +1,5 @@ import 'package:attendance_management/utils/constants.dart'; -import 'package:digit_components/digit_components.dart'; +import 'package:digit_ui_components/theme/spacers.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; @@ -20,7 +20,7 @@ class NoResultCard extends StatelessWidget { return Align( alignment: align, child: Padding( - padding: const EdgeInsets.all(kPadding), + padding: const EdgeInsets.all(spacer1), child: Column( children: [ SvgPicture.asset(noResultSvg), diff --git a/packages/digit_dss/pubspec.lock b/packages/digit_dss/pubspec.lock new file mode 100644 index 000000000..70d370a71 --- /dev/null +++ b/packages/digit_dss/pubspec.lock @@ -0,0 +1,1627 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + sha256: ae92f5d747aee634b87f89d9946000c2de774be1d6ac3e58268224348cd0101a + url: "https://pub.dev" + source: hosted + version: "61.0.0" + _flutterfire_internals: + dependency: transitive + description: + name: _flutterfire_internals + sha256: "37a42d06068e2fe3deddb2da079a8c4d105f241225ba27b7122b37e9865fd8f7" + url: "https://pub.dev" + source: hosted + version: "1.3.35" + analyzer: + dependency: transitive + description: + name: analyzer + sha256: ea3d8652bda62982addfd92fdc2d0214e5f82e43325104990d4f4c4a2a313562 + url: "https://pub.dev" + source: hosted + version: "5.13.0" + analyzer_plugin: + dependency: transitive + description: + name: analyzer_plugin + sha256: c1d5f167683de03d5ab6c3b53fc9aeefc5d59476e7810ba7bbddff50c6f4392d + url: "https://pub.dev" + source: hosted + version: "0.11.2" + ansicolor: + dependency: transitive + description: + name: ansicolor + sha256: "50e982d500bc863e1d703448afdbf9e5a72eb48840a4f766fa361ffd6877055f" + url: "https://pub.dev" + source: hosted + version: "2.0.3" + archive: + dependency: transitive + description: + name: archive + sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d + url: "https://pub.dev" + source: hosted + version: "3.6.1" + args: + dependency: transitive + description: + name: args + sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" + url: "https://pub.dev" + source: hosted + version: "2.5.0" + async: + dependency: "direct main" + description: + name: async + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" + source: hosted + version: "2.11.0" + attendance_management: + dependency: "direct main" + description: + path: "../attendance_management" + relative: true + source: path + version: "1.0.3" + auto_route: + dependency: "direct main" + description: + name: auto_route + sha256: a9001a90539ca3effc168f7e1029a5885c7326b9032c09ac895e303c1d137704 + url: "https://pub.dev" + source: hosted + version: "8.3.0" + auto_route_generator: + dependency: "direct dev" + description: + name: auto_route_generator + sha256: ba28133d3a3bf0a66772bcc98dade5843753cd9f1a8fb4802b842895515b67d3 + url: "https://pub.dev" + source: hosted + version: "8.0.0" + bloc: + dependency: transitive + description: + name: bloc + sha256: "106842ad6569f0b60297619e9e0b1885c2fb9bf84812935490e6c5275777804e" + url: "https://pub.dev" + source: hosted + version: "8.1.4" + bloc_test: + dependency: "direct dev" + description: + name: bloc_test + sha256: "165a6ec950d9252ebe36dc5335f2e6eb13055f33d56db0eeb7642768849b43d2" + url: "https://pub.dev" + source: hosted + version: "9.1.7" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + build: + dependency: transitive + description: + name: build + sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" + url: "https://pub.dev" + source: hosted + version: "2.4.1" + build_config: + dependency: transitive + description: + name: build_config + sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1 + url: "https://pub.dev" + source: hosted + version: "1.1.1" + build_daemon: + dependency: transitive + description: + name: build_daemon + sha256: "0343061a33da9c5810b2d6cee51945127d8f4c060b7fbdd9d54917f0a3feaaa1" + url: "https://pub.dev" + source: hosted + version: "4.0.1" + build_resolvers: + dependency: transitive + description: + name: build_resolvers + sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a" + url: "https://pub.dev" + source: hosted + version: "2.4.2" + build_runner: + dependency: "direct dev" + description: + name: build_runner + sha256: "644dc98a0f179b872f612d3eb627924b578897c629788e858157fa5e704ca0c7" + url: "https://pub.dev" + source: hosted + version: "2.4.11" + build_runner_core: + dependency: transitive + description: + name: build_runner_core + sha256: "4ae8ffe5ac758da294ecf1802f2aff01558d8b1b00616aa7538ea9a8a5d50799" + url: "https://pub.dev" + source: hosted + version: "7.3.0" + built_collection: + dependency: transitive + description: + name: built_collection + sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" + url: "https://pub.dev" + source: hosted + version: "5.1.1" + built_value: + dependency: transitive + description: + name: built_value + sha256: c7913a9737ee4007efedaffc968c049fd0f3d0e49109e778edc10de9426005cb + url: "https://pub.dev" + source: hosted + version: "8.9.2" + camera: + dependency: transitive + description: + name: camera + sha256: "26ff41045772153f222ffffecba711a206f670f5834d40ebf5eed3811692f167" + url: "https://pub.dev" + source: hosted + version: "0.11.0+2" + camera_android_camerax: + dependency: transitive + description: + name: camera_android_camerax + sha256: "011be2ab0e5b3e3aa8094413fa890f8c5c5afd7cfdaef353a992047d4dab5780" + url: "https://pub.dev" + source: hosted + version: "0.6.8+2" + camera_avfoundation: + dependency: transitive + description: + name: camera_avfoundation + sha256: "2e4c568f70e406ccb87376bc06b53d2f5bebaab71e2fbcc1a950e31449381bcf" + url: "https://pub.dev" + source: hosted + version: "0.9.17+5" + camera_platform_interface: + dependency: transitive + description: + name: camera_platform_interface + sha256: b3ede1f171532e0d83111fe0980b46d17f1aa9788a07a2fbed07366bbdbb9061 + url: "https://pub.dev" + source: hosted + version: "2.8.0" + camera_web: + dependency: transitive + description: + name: camera_web + sha256: "595f28c89d1fb62d77c73c633193755b781c6d2e0ebcd8dc25b763b514e6ba8f" + url: "https://pub.dev" + source: hosted + version: "0.3.5" + characters: + dependency: transitive + description: + name: characters + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" + source: hosted + version: "1.3.0" + charcode: + dependency: transitive + description: + name: charcode + sha256: fb98c0f6d12c920a02ee2d998da788bca066ca5f148492b7085ee23372b12306 + url: "https://pub.dev" + source: hosted + version: "1.3.1" + checked_yaml: + dependency: transitive + description: + name: checked_yaml + sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff + url: "https://pub.dev" + source: hosted + version: "2.0.3" + cli_util: + dependency: transitive + description: + name: cli_util + sha256: c05b7406fdabc7a49a3929d4af76bcaccbbffcbcdcf185b082e1ae07da323d19 + url: "https://pub.dev" + source: hosted + version: "0.4.1" + clock: + dependency: transitive + description: + name: clock + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" + source: hosted + version: "1.1.1" + code_builder: + dependency: transitive + description: + name: code_builder + sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37 + url: "https://pub.dev" + source: hosted + version: "4.10.0" + collection: + dependency: "direct main" + description: + name: collection + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + url: "https://pub.dev" + source: hosted + version: "1.18.0" + convert: + dependency: transitive + description: + name: convert + sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + url: "https://pub.dev" + source: hosted + version: "3.1.1" + coverage: + dependency: transitive + description: + name: coverage + sha256: "3945034e86ea203af7a056d98e98e42a5518fff200d6e8e6647e1886b07e936e" + url: "https://pub.dev" + source: hosted + version: "1.8.0" + cross_file: + dependency: transitive + description: + name: cross_file + sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670" + url: "https://pub.dev" + source: hosted + version: "0.3.4+2" + crypto: + dependency: transitive + description: + name: crypto + sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + url: "https://pub.dev" + source: hosted + version: "3.0.3" + csslib: + dependency: transitive + description: + name: csslib + sha256: "09bad715f418841f976c77db72d5398dc1253c21fb9c0c7f0b0b985860b2d58e" + url: "https://pub.dev" + source: hosted + version: "1.0.2" + dart_mappable: + dependency: "direct main" + description: + name: dart_mappable + sha256: "47269caf2060533c29b823ff7fa9706502355ffcb61e7f2a374e3a0fb2f2c3f0" + url: "https://pub.dev" + source: hosted + version: "4.2.2" + dart_mappable_builder: + dependency: "direct dev" + description: + path: "../dart_mappable_builder" + relative: true + source: path + version: "4.2.3" + dart_style: + dependency: transitive + description: + name: dart_style + sha256: "1efa911ca7086affd35f463ca2fc1799584fb6aa89883cf0af8e3664d6a02d55" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + dartx: + dependency: transitive + description: + name: dartx + sha256: "8b25435617027257d43e6508b5fe061012880ddfdaa75a71d607c3de2a13d244" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + db_viewer: + dependency: transitive + description: + name: db_viewer + sha256: "5f7e3cfcde9663321797d8f6f0c876f7c13f0825a2e77ec1ef065656797144d9" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + diff_match_patch: + dependency: transitive + description: + name: diff_match_patch + sha256: "2efc9e6e8f449d0abe15be240e2c2a3bcd977c8d126cfd70598aee60af35c0a4" + url: "https://pub.dev" + source: hosted + version: "0.4.1" + digit_data_model: + dependency: "direct main" + description: + path: "../digit_data_model" + relative: true + source: path + version: "1.0.5" + digit_firebase_services: + dependency: "direct overridden" + description: + path: "../digit_firebase_services" + relative: true + source: path + version: "0.0.1" + digit_ui_components: + dependency: "direct main" + description: + name: digit_ui_components + sha256: "57c4da5237be6025783e7357a02b6b492f02e38f711d674bf46f5f8c8a93ad76" + url: "https://pub.dev" + source: hosted + version: "0.0.2-dev.4" + dio: + dependency: "direct main" + description: + name: dio + sha256: "5598aa796bbf4699afd5c67c0f5f6e2ed542afc956884b9cd58c306966efc260" + url: "https://pub.dev" + source: hosted + version: "5.7.0" + dio_web_adapter: + dependency: transitive + description: + name: dio_web_adapter + sha256: "36c5b2d79eb17cdae41e974b7a8284fec631651d2a6f39a8a2ff22327e90aeac" + url: "https://pub.dev" + source: hosted + version: "1.0.1" + dotted_border: + dependency: transitive + description: + name: dotted_border + sha256: "108837e11848ca776c53b30bc870086f84b62ed6e01c503ed976e8f8c7df9c04" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + drift: + dependency: transitive + description: + name: drift + sha256: "6acedc562ffeed308049f78fb1906abad3d65714580b6745441ee6d50ec564cd" + url: "https://pub.dev" + source: hosted + version: "2.18.0" + drift_db_viewer: + dependency: transitive + description: + name: drift_db_viewer + sha256: "5ea77858c52b55460a1e8f34ab5f88324621d486717d876fd745765fbc227f3f" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + drift_dev: + dependency: "direct dev" + description: + name: drift_dev + sha256: d9b020736ea85fff1568699ce18b89fabb3f0f042e8a7a05e84a3ec20d39acde + url: "https://pub.dev" + source: hosted + version: "2.18.0" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" + source: hosted + version: "1.3.1" + ffi: + dependency: transitive + description: + name: ffi + sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + file: + dependency: transitive + description: + name: file + sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" + url: "https://pub.dev" + source: hosted + version: "6.1.4" + file_picker: + dependency: transitive + description: + name: file_picker + sha256: "2ca051989f69d1b2ca012b2cf3ccf78c70d40144f0861ff2c063493f7c8c3d45" + url: "https://pub.dev" + source: hosted + version: "8.0.5" + file_selector_linux: + dependency: transitive + description: + name: file_selector_linux + sha256: "54cbbd957e1156d29548c7d9b9ec0c0ebb6de0a90452198683a7d23aed617a33" + url: "https://pub.dev" + source: hosted + version: "0.9.3+2" + file_selector_macos: + dependency: transitive + description: + name: file_selector_macos + sha256: "271ab9986df0c135d45c3cdb6bd0faa5db6f4976d3e4b437cf7d0f258d941bfc" + url: "https://pub.dev" + source: hosted + version: "0.9.4+2" + file_selector_platform_interface: + dependency: transitive + description: + name: file_selector_platform_interface + sha256: a3994c26f10378a039faa11de174d7b78eb8f79e4dd0af2a451410c1a5c3f66b + url: "https://pub.dev" + source: hosted + version: "2.6.2" + file_selector_windows: + dependency: transitive + description: + name: file_selector_windows + sha256: "8f5d2f6590d51ecd9179ba39c64f722edc15226cc93dcc8698466ad36a4a85a4" + url: "https://pub.dev" + source: hosted + version: "0.9.3+3" + firebase_core: + dependency: transitive + description: + name: firebase_core + sha256: "26de145bb9688a90962faec6f838247377b0b0d32cc0abecd9a4e43525fc856c" + url: "https://pub.dev" + source: hosted + version: "2.32.0" + firebase_core_platform_interface: + dependency: transitive + description: + name: firebase_core_platform_interface + sha256: b94b217e3ad745e784960603d33d99471621ecca151c99c670869b76e50ad2a6 + url: "https://pub.dev" + source: hosted + version: "5.3.1" + firebase_core_web: + dependency: transitive + description: + name: firebase_core_web + sha256: "362e52457ed2b7b180964769c1e04d1e0ea0259fdf7025fdfedd019d4ae2bd88" + url: "https://pub.dev" + source: hosted + version: "2.17.5" + firebase_crashlytics: + dependency: transitive + description: + name: firebase_crashlytics + sha256: "9897c01efaa950d2f6da8317d12452749a74dc45f33b46390a14cfe28067f271" + url: "https://pub.dev" + source: hosted + version: "3.5.7" + firebase_crashlytics_platform_interface: + dependency: transitive + description: + name: firebase_crashlytics_platform_interface + sha256: "16a71e08fbf6e00382816e1b13397898c29a54fa0ad969c2c2a3b82a704877f0" + url: "https://pub.dev" + source: hosted + version: "3.6.35" + fixnum: + dependency: transitive + description: + name: fixnum + sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_bloc: + dependency: "direct main" + description: + name: flutter_bloc + sha256: b594505eac31a0518bdcb4b5b79573b8d9117b193cc80cc12e17d639b10aa27a + url: "https://pub.dev" + source: hosted + version: "8.1.6" + flutter_dropzone: + dependency: transitive + description: + name: flutter_dropzone + sha256: b399c60411f9bf9c4c2f97933c6a3a185859e75aade8897831e76cee4346c8e1 + url: "https://pub.dev" + source: hosted + version: "3.0.7" + flutter_dropzone_platform_interface: + dependency: transitive + description: + name: flutter_dropzone_platform_interface + sha256: "96d2c51c86063ba150551c3b40fd26c5a18785bee071c0c751502d28a545df3b" + url: "https://pub.dev" + source: hosted + version: "2.2.0" + flutter_dropzone_web: + dependency: transitive + description: + name: flutter_dropzone_web + sha256: c5a0fdb63b7216352a01761ec1b6eba1982e49541e60675735e2d3d95e207b19 + url: "https://pub.dev" + source: hosted + version: "3.0.13" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04 + url: "https://pub.dev" + source: hosted + version: "2.0.3" + flutter_localizations: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + flutter_plugin_android_lifecycle: + dependency: transitive + description: + name: flutter_plugin_android_lifecycle + sha256: "9ee02950848f61c4129af3d6ec84a1cfc0e47931abc746b03e7a3bc3e8ff6eda" + url: "https://pub.dev" + source: hosted + version: "2.0.22" + flutter_spinkit: + dependency: transitive + description: + name: flutter_spinkit + sha256: d2696eed13732831414595b98863260e33e8882fc069ee80ec35d4ac9ddb0472 + url: "https://pub.dev" + source: hosted + version: "5.2.1" + flutter_styled_toast: + dependency: transitive + description: + name: flutter_styled_toast + sha256: e667f13a665820eb0fa8506547e47eacbcddf1948d6d3036cfd3b089bd4b0516 + url: "https://pub.dev" + source: hosted + version: "2.2.1" + flutter_svg: + dependency: "direct main" + description: + name: flutter_svg + sha256: "54900a1a1243f3c4a5506d853a2b5c2dbc38d5f27e52a52618a8054401431123" + url: "https://pub.dev" + source: hosted + version: "2.0.16" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + fluttertoast: + dependency: transitive + description: + name: fluttertoast + sha256: "81b68579e23fcbcada2db3d50302813d2371664afe6165bc78148050ab94bf66" + url: "https://pub.dev" + source: hosted + version: "8.2.5" + freezed: + dependency: "direct dev" + description: + name: freezed + sha256: a434911f643466d78462625df76fd9eb13e57348ff43fe1f77bbe909522c67a1 + url: "https://pub.dev" + source: hosted + version: "2.5.2" + freezed_annotation: + dependency: "direct main" + description: + name: freezed_annotation + sha256: c2e2d632dd9b8a2b7751117abcfc2b4888ecfe181bd9fca7170d9ef02e595fe2 + url: "https://pub.dev" + source: hosted + version: "2.4.4" + frontend_server_client: + dependency: transitive + description: + name: frontend_server_client + sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" + url: "https://pub.dev" + source: hosted + version: "3.2.0" + geolocator: + dependency: transitive + description: + name: geolocator + sha256: f4efb8d3c4cdcad2e226af9661eb1a0dd38c71a9494b22526f9da80ab79520e5 + url: "https://pub.dev" + source: hosted + version: "10.1.1" + geolocator_android: + dependency: transitive + description: + name: geolocator_android + sha256: "7aefc530db47d90d0580b552df3242440a10fe60814496a979aa67aa98b1fd47" + url: "https://pub.dev" + source: hosted + version: "4.6.1" + geolocator_apple: + dependency: transitive + description: + name: geolocator_apple + sha256: "6154ea2682563f69fc0125762ed7e91e7ed85d0b9776595653be33918e064807" + url: "https://pub.dev" + source: hosted + version: "2.3.8+1" + geolocator_platform_interface: + dependency: transitive + description: + name: geolocator_platform_interface + sha256: "386ce3d9cce47838355000070b1d0b13efb5bc430f8ecda7e9238c8409ace012" + url: "https://pub.dev" + source: hosted + version: "4.2.4" + geolocator_web: + dependency: transitive + description: + name: geolocator_web + sha256: "102e7da05b48ca6bf0a5bda0010f886b171d1a08059f01bfe02addd0175ebece" + url: "https://pub.dev" + source: hosted + version: "2.2.1" + geolocator_windows: + dependency: transitive + description: + name: geolocator_windows + sha256: "53da08937d07c24b0d9952eb57a3b474e29aae2abf9dd717f7e1230995f13f0e" + url: "https://pub.dev" + source: hosted + version: "0.2.3" + glob: + dependency: transitive + description: + name: glob + sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + google_fonts: + dependency: transitive + description: + name: google_fonts + sha256: b1ac0fe2832c9cc95e5e88b57d627c5e68c223b9657f4b96e1487aa9098c7b82 + url: "https://pub.dev" + source: hosted + version: "6.2.1" + graphs: + dependency: transitive + description: + name: graphs + sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19 + url: "https://pub.dev" + source: hosted + version: "2.3.1" + horizontal_data_table: + dependency: transitive + description: + name: horizontal_data_table + sha256: c8ab5256bbced698a729f3e0ff2cb0e8e97416cdbb082860370eaf883badf722 + url: "https://pub.dev" + source: hosted + version: "4.3.1" + html: + dependency: transitive + description: + name: html + sha256: "1fc58edeaec4307368c60d59b7e15b9d658b57d7f3125098b6294153c75337ec" + url: "https://pub.dev" + source: hosted + version: "0.15.5" + http: + dependency: transitive + description: + name: http + sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 + url: "https://pub.dev" + source: hosted + version: "1.2.2" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" + url: "https://pub.dev" + source: hosted + version: "3.2.1" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" + source: hosted + version: "4.0.2" + image_picker: + dependency: transitive + description: + name: image_picker + sha256: "021834d9c0c3de46bf0fe40341fa07168407f694d9b2bb18d532dc1261867f7a" + url: "https://pub.dev" + source: hosted + version: "1.1.2" + image_picker_android: + dependency: transitive + description: + name: image_picker_android + sha256: "8c5abf0dcc24fe6e8e0b4a5c0b51a5cf30cefdf6407a3213dae61edc75a70f56" + url: "https://pub.dev" + source: hosted + version: "0.8.12+12" + image_picker_for_web: + dependency: transitive + description: + name: image_picker_for_web + sha256: "717eb042ab08c40767684327be06a5d8dbb341fe791d514e4b92c7bbe1b7bb83" + url: "https://pub.dev" + source: hosted + version: "3.0.6" + image_picker_ios: + dependency: transitive + description: + name: image_picker_ios + sha256: "4f0568120c6fcc0aaa04511cb9f9f4d29fc3d0139884b1d06be88dcec7641d6b" + url: "https://pub.dev" + source: hosted + version: "0.8.12+1" + image_picker_linux: + dependency: transitive + description: + name: image_picker_linux + sha256: "4ed1d9bb36f7cd60aa6e6cd479779cc56a4cb4e4de8f49d487b1aaad831300fa" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + image_picker_macos: + dependency: transitive + description: + name: image_picker_macos + sha256: "3f5ad1e8112a9a6111c46d0b57a7be2286a9a07fc6e1976fdf5be2bd31d4ff62" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + image_picker_platform_interface: + dependency: transitive + description: + name: image_picker_platform_interface + sha256: "9ec26d410ff46f483c5519c29c02ef0e02e13a543f882b152d4bfd2f06802f80" + url: "https://pub.dev" + source: hosted + version: "2.10.0" + image_picker_windows: + dependency: transitive + description: + name: image_picker_windows + sha256: "6ad07afc4eb1bc25f3a01084d28520496c4a3bb0cb13685435838167c9dcedeb" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + intl: + dependency: "direct main" + description: + name: intl + sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf + url: "https://pub.dev" + source: hosted + version: "0.19.0" + io: + dependency: transitive + description: + name: io + sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" + url: "https://pub.dev" + source: hosted + version: "1.0.4" + isar: + dependency: "direct main" + description: + name: isar + sha256: "99165dadb2cf2329d3140198363a7e7bff9bbd441871898a87e26914d25cf1ea" + url: "https://pub.dev" + source: hosted + version: "3.1.0+1" + isar_flutter_libs: + dependency: "direct main" + description: + name: isar_flutter_libs + sha256: bc6768cc4b9c61aabff77152e7f33b4b17d2fc93134f7af1c3dd51500fe8d5e8 + url: "https://pub.dev" + source: hosted + version: "3.1.0+1" + isar_generator: + dependency: "direct dev" + description: + name: isar_generator + sha256: "76c121e1295a30423604f2f819bc255bc79f852f3bc8743a24017df6068ad133" + url: "https://pub.dev" + source: hosted + version: "3.1.0+1" + js: + dependency: transitive + description: + name: js + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 + url: "https://pub.dev" + source: hosted + version: "0.6.7" + json_annotation: + dependency: transitive + description: + name: json_annotation + sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" + url: "https://pub.dev" + source: hosted + version: "4.9.0" + json_serializable: + dependency: "direct dev" + description: + name: json_serializable + sha256: ea1432d167339ea9b5bb153f0571d0039607a873d6e04e0117af043f14a1fd4b + url: "https://pub.dev" + source: hosted + version: "6.8.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + url: "https://pub.dev" + source: hosted + version: "10.0.4" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + url: "https://pub.dev" + source: hosted + version: "3.0.3" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" + lints: + dependency: transitive + description: + name: lints + sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + location: + dependency: transitive + description: + name: location + sha256: "37ffdadcd4b1498b769824f45ebb4de8ed46663a4a67ac27b33a590ee486579f" + url: "https://pub.dev" + source: hosted + version: "6.0.2" + location_platform_interface: + dependency: transitive + description: + name: location_platform_interface + sha256: "2ecde6bb0f88032b0bbbde37e18975b4468711dd92619c2235cc0c0ee93b4b8e" + url: "https://pub.dev" + source: hosted + version: "4.0.0" + location_web: + dependency: transitive + description: + name: location_web + sha256: "49dda13d415c4603c5775a33fb22f575e0aa3f0ec2916644ddcd722db31ee884" + url: "https://pub.dev" + source: hosted + version: "5.0.2" + logging: + dependency: transitive + description: + name: logging + sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + lottie: + dependency: transitive + description: + name: lottie + sha256: "7afc60865a2429d994144f7d66ced2ae4305fe35d82890b8766e3359872d872c" + url: "https://pub.dev" + source: hosted + version: "3.1.3" + matcher: + dependency: transitive + description: + name: matcher + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + url: "https://pub.dev" + source: hosted + version: "0.12.16+1" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + url: "https://pub.dev" + source: hosted + version: "0.8.0" + meta: + dependency: transitive + description: + name: meta + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" + url: "https://pub.dev" + source: hosted + version: "1.12.0" + mime: + dependency: transitive + description: + name: mime + sha256: "801fd0b26f14a4a58ccb09d5892c3fbdeff209594300a542492cf13fba9d247a" + url: "https://pub.dev" + source: hosted + version: "1.0.6" + mocktail: + dependency: "direct dev" + description: + name: mocktail + sha256: "890df3f9688106f25755f26b1c60589a92b3ab91a22b8b224947ad041bf172d8" + url: "https://pub.dev" + source: hosted + version: "1.0.4" + nested: + dependency: transitive + description: + name: nested + sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20" + url: "https://pub.dev" + source: hosted + version: "1.0.0" + node_preamble: + dependency: transitive + description: + name: node_preamble + sha256: "6e7eac89047ab8a8d26cf16127b5ed26de65209847630400f9aefd7cd5c730db" + url: "https://pub.dev" + source: hosted + version: "2.0.2" + overlay_builder: + dependency: transitive + description: + name: overlay_builder + sha256: "58b97bc5f67a2e2bb7006dd88e697ac757dfffc9dbd1e7dfc1917fb510a4b5c8" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + package_config: + dependency: transitive + description: + name: package_config + sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + package_info_plus: + dependency: "direct main" + description: + name: package_info_plus + sha256: a75164ade98cb7d24cfd0a13c6408927c6b217fa60dee5a7ff5c116a58f28918 + url: "https://pub.dev" + source: hosted + version: "8.0.2" + package_info_plus_platform_interface: + dependency: transitive + description: + name: package_info_plus_platform_interface + sha256: ac1f4a4847f1ade8e6a87d1f39f5d7c67490738642e2542f559ec38c37489a66 + url: "https://pub.dev" + source: hosted + version: "3.0.1" + path: + dependency: transitive + description: + name: path + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + url: "https://pub.dev" + source: hosted + version: "1.9.0" + path_drawing: + dependency: transitive + description: + name: path_drawing + sha256: bbb1934c0cbb03091af082a6389ca2080345291ef07a5fa6d6e078ba8682f977 + url: "https://pub.dev" + source: hosted + version: "1.0.1" + path_parsing: + dependency: transitive + description: + name: path_parsing + sha256: e3e67b1629e6f7e8100b367d3db6ba6af4b1f0bb80f64db18ef1fbabd2fa9ccf + url: "https://pub.dev" + source: hosted + version: "1.0.1" + path_provider: + dependency: transitive + description: + name: path_provider + sha256: fec0d61223fba3154d87759e3cc27fe2c8dc498f6386c6d6fc80d1afdd1bf378 + url: "https://pub.dev" + source: hosted + version: "2.1.4" + path_provider_android: + dependency: transitive + description: + name: path_provider_android + sha256: a248d8146ee5983446bf03ed5ea8f6533129a12b11f12057ad1b4a67a2b3b41d + url: "https://pub.dev" + source: hosted + version: "2.2.4" + path_provider_foundation: + dependency: transitive + description: + name: path_provider_foundation + sha256: "5a7999be66e000916500be4f15a3633ebceb8302719b47b9cc49ce924125350f" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + path_provider_linux: + dependency: transitive + description: + name: path_provider_linux + sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 + url: "https://pub.dev" + source: hosted + version: "2.2.1" + path_provider_platform_interface: + dependency: transitive + description: + name: path_provider_platform_interface + sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + path_provider_windows: + dependency: transitive + description: + name: path_provider_windows + sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 + url: "https://pub.dev" + source: hosted + version: "2.3.0" + petitparser: + dependency: transitive + description: + name: petitparser + sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27 + url: "https://pub.dev" + source: hosted + version: "6.0.2" + platform: + dependency: transitive + description: + name: platform + sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" + url: "https://pub.dev" + source: hosted + version: "3.1.5" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" + url: "https://pub.dev" + source: hosted + version: "2.1.8" + pool: + dependency: transitive + description: + name: pool + sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" + url: "https://pub.dev" + source: hosted + version: "1.5.1" + provider: + dependency: transitive + description: + name: provider + sha256: c8a055ee5ce3fd98d6fc872478b03823ffdb448699c6ebdbbc71d59b596fd48c + url: "https://pub.dev" + source: hosted + version: "6.1.2" + pub_semver: + dependency: transitive + description: + name: pub_semver + sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + pubspec_parse: + dependency: transitive + description: + name: pubspec_parse + sha256: c799b721d79eb6ee6fa56f00c04b472dcd44a30d258fac2174a6ec57302678f8 + url: "https://pub.dev" + source: hosted + version: "1.3.0" + reactive_forms: + dependency: "direct main" + description: + name: reactive_forms + sha256: "9b1fb18e0aae9c50cfa0aaabaaa38bc4d78eefc9b7b95fa9c947b051f6524b8e" + url: "https://pub.dev" + source: hosted + version: "17.0.1" + recase: + dependency: transitive + description: + name: recase + sha256: e4eb4ec2dcdee52dcf99cb4ceabaffc631d7424ee55e56f280bc039737f89213 + url: "https://pub.dev" + source: hosted + version: "4.1.0" + shelf: + dependency: transitive + description: + name: shelf + sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 + url: "https://pub.dev" + source: hosted + version: "1.4.1" + shelf_packages_handler: + dependency: transitive + description: + name: shelf_packages_handler + sha256: "89f967eca29607c933ba9571d838be31d67f53f6e4ee15147d5dc2934fee1b1e" + url: "https://pub.dev" + source: hosted + version: "3.0.2" + shelf_static: + dependency: transitive + description: + name: shelf_static + sha256: a41d3f53c4adf0f57480578c1d61d90342cd617de7fc8077b1304643c2d85c1e + url: "https://pub.dev" + source: hosted + version: "1.1.2" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" + url: "https://pub.dev" + source: hosted + version: "1.0.4" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.99" + source_gen: + dependency: transitive + description: + name: source_gen + sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832" + url: "https://pub.dev" + source: hosted + version: "1.5.0" + source_helper: + dependency: transitive + description: + name: source_helper + sha256: "6adebc0006c37dd63fe05bca0a929b99f06402fc95aa35bf36d67f5c06de01fd" + url: "https://pub.dev" + source: hosted + version: "1.3.4" + source_map_stack_trace: + dependency: transitive + description: + name: source_map_stack_trace + sha256: "84cf769ad83aa6bb61e0aa5a18e53aea683395f196a6f39c4c881fb90ed4f7ae" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + source_maps: + dependency: transitive + description: + name: source_maps + sha256: "708b3f6b97248e5781f493b765c3337db11c5d2c81c3094f10904bfa8004c703" + url: "https://pub.dev" + source: hosted + version: "0.10.12" + source_span: + dependency: transitive + description: + name: source_span + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" + source: hosted + version: "1.10.0" + sprintf: + dependency: transitive + description: + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" + url: "https://pub.dev" + source: hosted + version: "7.0.0" + sqlite3: + dependency: transitive + description: + name: sqlite3 + sha256: "072128763f1547e3e9b4735ce846bfd226d68019ccda54db4cd427b12dfdedc9" + url: "https://pub.dev" + source: hosted + version: "2.4.0" + sqlite3_flutter_libs: + dependency: transitive + description: + name: sqlite3_flutter_libs + sha256: "62bbb4073edbcdf53f40c80775f33eea01d301b7b81417e5b3fb7395416258c1" + url: "https://pub.dev" + source: hosted + version: "0.5.24" + sqlparser: + dependency: transitive + description: + name: sqlparser + sha256: ade9a67fd70d0369329ed3373208de7ebd8662470e8c396fc8d0d60f9acdfc9f + url: "https://pub.dev" + source: hosted + version: "0.36.0" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + url: "https://pub.dev" + source: hosted + version: "1.11.1" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + url: "https://pub.dev" + source: hosted + version: "2.1.2" + stream_transform: + dependency: transitive + description: + name: stream_transform + sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" + source: hosted + version: "1.2.1" + test: + dependency: transitive + description: + name: test + sha256: "7ee446762c2c50b3bd4ea96fe13ffac69919352bd3b4b17bac3f3465edc58073" + url: "https://pub.dev" + source: hosted + version: "1.25.2" + test_api: + dependency: transitive + description: + name: test_api + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" + url: "https://pub.dev" + source: hosted + version: "0.7.0" + test_core: + dependency: transitive + description: + name: test_core + sha256: "2bc4b4ecddd75309300d8096f781c0e3280ca1ef85beda558d33fcbedc2eead4" + url: "https://pub.dev" + source: hosted + version: "0.6.0" + time: + dependency: transitive + description: + name: time + sha256: ad8e018a6c9db36cb917a031853a1aae49467a93e0d464683e029537d848c221 + url: "https://pub.dev" + source: hosted + version: "2.1.4" + timing: + dependency: transitive + description: + name: timing + sha256: "70a3b636575d4163c477e6de42f247a23b315ae20e86442bebe32d3cabf61c32" + url: "https://pub.dev" + source: hosted + version: "1.0.1" + type_plus: + dependency: transitive + description: + name: type_plus + sha256: d5d1019471f0d38b91603adb9b5fd4ce7ab903c879d2fbf1a3f80a630a03fcc9 + url: "https://pub.dev" + source: hosted + version: "2.1.1" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + url: "https://pub.dev" + source: hosted + version: "1.3.2" + universal_html: + dependency: transitive + description: + name: universal_html + sha256: "56536254004e24d9d8cfdb7dbbf09b74cf8df96729f38a2f5c238163e3d58971" + url: "https://pub.dev" + source: hosted + version: "2.2.4" + universal_io: + dependency: transitive + description: + name: universal_io + sha256: "1722b2dcc462b4b2f3ee7d188dad008b6eb4c40bbd03a3de451d82c78bba9aad" + url: "https://pub.dev" + source: hosted + version: "2.2.2" + url_launcher: + dependency: transitive + description: + name: url_launcher + sha256: "9d06212b1362abc2f0f0d78e6f09f726608c74e3b9462e8368bb03314aa8d603" + url: "https://pub.dev" + source: hosted + version: "6.3.1" + url_launcher_android: + dependency: transitive + description: + name: url_launcher_android + sha256: f0c73347dfcfa5b3db8bc06e1502668265d39c08f310c29bff4e28eea9699f79 + url: "https://pub.dev" + source: hosted + version: "6.3.9" + url_launcher_ios: + dependency: transitive + description: + name: url_launcher_ios + sha256: "16a513b6c12bb419304e72ea0ae2ab4fed569920d1c7cb850263fe3acc824626" + url: "https://pub.dev" + source: hosted + version: "6.3.2" + url_launcher_linux: + dependency: transitive + description: + name: url_launcher_linux + sha256: "4e9ba368772369e3e08f231d2301b4ef72b9ff87c31192ef471b380ef29a4935" + url: "https://pub.dev" + source: hosted + version: "3.2.1" + url_launcher_macos: + dependency: transitive + description: + name: url_launcher_macos + sha256: "17ba2000b847f334f16626a574c702b196723af2a289e7a93ffcb79acff855c2" + url: "https://pub.dev" + source: hosted + version: "3.2.2" + url_launcher_platform_interface: + dependency: transitive + description: + name: url_launcher_platform_interface + sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + url_launcher_web: + dependency: transitive + description: + name: url_launcher_web + sha256: "772638d3b34c779ede05ba3d38af34657a05ac55b06279ea6edd409e323dca8e" + url: "https://pub.dev" + source: hosted + version: "2.3.3" + url_launcher_windows: + dependency: transitive + description: + name: url_launcher_windows + sha256: "44cf3aabcedde30f2dba119a9dea3b0f2672fbe6fa96e85536251d678216b3c4" + url: "https://pub.dev" + source: hosted + version: "3.1.3" + uuid: + dependency: transitive + description: + name: uuid + sha256: a5be9ef6618a7ac1e964353ef476418026db906c4facdedaa299b7a2e71690ff + url: "https://pub.dev" + source: hosted + version: "4.5.1" + vector_graphics: + dependency: transitive + description: + name: vector_graphics + sha256: "27d5fefe86fb9aace4a9f8375b56b3c292b64d8c04510df230f849850d912cb7" + url: "https://pub.dev" + source: hosted + version: "1.1.15" + vector_graphics_codec: + dependency: transitive + description: + name: vector_graphics_codec + sha256: "2430b973a4ca3c4dbc9999b62b8c719a160100dcbae5c819bae0cacce32c9cdb" + url: "https://pub.dev" + source: hosted + version: "1.1.12" + vector_graphics_compiler: + dependency: transitive + description: + name: vector_graphics_compiler + sha256: "1b4b9e706a10294258727674a340ae0d6e64a7231980f9f9a3d12e4b42407aad" + url: "https://pub.dev" + source: hosted + version: "1.1.16" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + visibility_detector: + dependency: transitive + description: + name: visibility_detector + sha256: dd5cc11e13494f432d15939c3aa8ae76844c42b723398643ce9addb88a5ed420 + url: "https://pub.dev" + source: hosted + version: "0.4.0+2" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" + url: "https://pub.dev" + source: hosted + version: "14.2.1" + watcher: + dependency: transitive + description: + name: watcher + sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + web: + dependency: transitive + description: + name: web + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" + url: "https://pub.dev" + source: hosted + version: "0.5.1" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b + url: "https://pub.dev" + source: hosted + version: "2.4.0" + webkit_inspection_protocol: + dependency: transitive + description: + name: webkit_inspection_protocol + sha256: "87d3f2333bb240704cd3f1c6b5b7acd8a10e7f0bc28c28dcf14e782014f4a572" + url: "https://pub.dev" + source: hosted + version: "1.2.1" + win32: + dependency: transitive + description: + name: win32 + sha256: "464f5674532865248444b4c3daca12bd9bf2d7c47f759ce2617986e7229494a8" + url: "https://pub.dev" + source: hosted + version: "5.2.0" + xdg_directories: + dependency: transitive + description: + name: xdg_directories + sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d + url: "https://pub.dev" + source: hosted + version: "1.0.4" + xml: + dependency: transitive + description: + name: xml + sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226 + url: "https://pub.dev" + source: hosted + version: "6.5.0" + xxh3: + dependency: transitive + description: + name: xxh3 + sha256: a92b30944a9aeb4e3d4f3c3d4ddb3c7816ca73475cd603682c4f8149690f56d7 + url: "https://pub.dev" + source: hosted + version: "1.0.1" + yaml: + dependency: transitive + description: + name: yaml + sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" + url: "https://pub.dev" + source: hosted + version: "3.1.2" +sdks: + dart: ">=3.4.0 <4.0.0" + flutter: ">=3.22.0" diff --git a/packages/digit_dss/pubspec.yaml b/packages/digit_dss/pubspec.yaml index a5496ae33..8b0865af8 100644 --- a/packages/digit_dss/pubspec.yaml +++ b/packages/digit_dss/pubspec.yaml @@ -1,51 +1,50 @@ name: digit_dss description: "DSS Dashboard for campaign management" -version: 1.0.1 +version: 1.0.3 homepage: https://github.com/egovernments/health-campaign-field-worker-app/tree/develop/packages/digit_dss repository: https://github.com/egovernments/health-campaign-field-worker-app environment: - sdk: '>=3.2.3 <4.0.0' + sdk: '>=3.2.0 <4.0.0' flutter: ">=1.17.0" dependencies: flutter: sdk: flutter - digit_components: ^1.0.1+1 - flutter_bloc: ^8.1.1 - reactive_forms: ^14.1.0 - intl: ^0.18.0 - freezed_annotation: ^2.1.0 + digit_ui_components: ^0.0.2-dev.4 + flutter_bloc: ^8.1.5 + reactive_forms: ^17.0.0 + intl: ^0.19.0 + freezed_annotation: ^2.4.1 flutter_svg: ^2.0.8 dart_mappable: ^4.2.0 - auto_route: ^7.8.4 - digit_data_model: ^1.0.3+1 - package_info_plus: ^5.0.1 - collection: ^1.16.0 + auto_route: ^8.1.3 + digit_data_model: ^1.0.5 + package_info_plus: ^8.0.0 + collection: ^1.18.0 async: ^2.11.0 - dio: ^5.4.2+1 - isar: ^3.0.5 - isar_flutter_libs: ^3.0.5 - attendance_management: ^1.0.2+1 + dio: ^5.4.3+1 + isar: ^3.1.0+1 + isar_flutter_libs: ^3.1.0+1 + attendance_management: ^1.0.3 dev_dependencies: flutter_test: sdk: flutter flutter_lints: ^2.0.0 - dart_code_metrics: ^5.7.6 freezed: ^2.1.0+1 json_serializable: ^6.4.0 drift_dev: ^2.14.1 - build_runner: ^2.4.7 + build_runner: ^2.4.11 bloc_test: ^9.1.0 mocktail: ^1.0.2 dart_mappable_builder: git: url: https://github.com/egovernments/health-campaign-field-worker-app/ - ref: master + ref: 1.6-final-dev path: ./packages/dart_mappable_builder - auto_route_generator: ^7.3.2 - isar_generator: ^3.0.5 + auto_route_generator: ^8.0.0 + isar_generator: ^3.1.0+1 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec diff --git a/packages/digit_firebase_services/.gitignore b/packages/digit_firebase_services/.gitignore index 96486fd93..11bcaf4ae 100644 --- a/packages/digit_firebase_services/.gitignore +++ b/packages/digit_firebase_services/.gitignore @@ -23,7 +23,6 @@ migrate_working_dir/ # Flutter/Dart/Pub related # Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. -/pubspec.lock **/doc/api/ .dart_tool/ .packages diff --git a/packages/digit_firebase_services/CHANGELOG.md b/packages/digit_firebase_services/CHANGELOG.md index 41cc7d819..6ddd540ae 100644 --- a/packages/digit_firebase_services/CHANGELOG.md +++ b/packages/digit_firebase_services/CHANGELOG.md @@ -1,3 +1,2 @@ ## 0.0.1 - -* TODO: Describe initial release. +* Digit Firebase Services Initial Release diff --git a/packages/digit_firebase_services/README.md b/packages/digit_firebase_services/README.md index 02fe8ecab..167e6a522 100644 --- a/packages/digit_firebase_services/README.md +++ b/packages/digit_firebase_services/README.md @@ -1,39 +1,28 @@ - - -TODO: Put a short description of the package here that helps potential users -know whether this package might be useful for them. +# digit_firebase_services +digit_firebase_services is a Flutter package that simplifies the integration of Firebase services into your app. It bundles together commonly used Firebase services like firebase_core and firebase_crashlytics and allows you to enable or disable them with a simple flag. This package is designed to be flexible and configurable, making it easy to manage Firebase services in a unified way. ## Features -TODO: List what your package can do. Maybe include images, gifs, or videos. +- Unified integration of Firebase Core and Firebase Crashlytics. +- Simple API to set up Firebase services. ## Getting started -TODO: List prerequisites and provide or point to information on how to -start using the package. - -## Usage - -TODO: Include short and useful examples for package users. Add longer examples -to `/example` folder. - ```dart -const like = 'sample'; +dependencies: + digit_firebase_services: latest_version ``` -## Additional information +## Usage -TODO: Tell users more about the package: where to find more information, how to -contribute to the package, how to file issues, what response they can expect -from the package authors, and more. +```dart +import 'package:digit_firebase_services/digit_firebase_services.dart' + as firebase_services; + +firebase_services.initialize( +options: DefaultFirebaseOptions.currentPlatform, +onErrorMessage: (value) { +AppLogger.instance.error(title: 'CRASHLYTICS', message: value); +}, +); +``` \ No newline at end of file diff --git a/packages/digit_firebase_services/pubspec.lock b/packages/digit_firebase_services/pubspec.lock index 20c7bd06b..7b890a488 100644 --- a/packages/digit_firebase_services/pubspec.lock +++ b/packages/digit_firebase_services/pubspec.lock @@ -128,6 +128,30 @@ packages: url: "https://pub.dev" source: hosted version: "0.6.7" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + url: "https://pub.dev" + source: hosted + version: "10.0.4" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + url: "https://pub.dev" + source: hosted + version: "3.0.3" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" lints: dependency: transitive description: @@ -140,34 +164,34 @@ packages: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.12.0" path: dependency: transitive description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.9.0" plugin_platform_interface: dependency: transitive description: @@ -225,10 +249,10 @@ packages: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.0" vector_math: dependency: transitive description: @@ -237,6 +261,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" + url: "https://pub.dev" + source: hosted + version: "14.2.1" web: dependency: transitive description: @@ -246,5 +278,5 @@ packages: source: hosted version: "0.3.0" sdks: - dart: ">=3.2.0 <4.0.0" - flutter: ">=3.3.0" + dart: ">=3.3.0 <4.0.0" + flutter: ">=3.18.0-18.0.pre.54" diff --git a/packages/digit_firebase_services/pubspec.yaml b/packages/digit_firebase_services/pubspec.yaml index 0917a7bc0..76d155c17 100644 --- a/packages/digit_firebase_services/pubspec.yaml +++ b/packages/digit_firebase_services/pubspec.yaml @@ -1,7 +1,8 @@ name: digit_firebase_services -description: A new Flutter package project. +description: digit_firebase_services is a Flutter package that simplifies the integration of Firebase services into your app. It bundles together commonly used Firebase services like firebase_core and firebase_crashlytics and allows you to enable or disable them with a simple flag. This package is designed to be flexible and configurable, making it easy to manage Firebase services in a unified way. version: 0.0.1 -homepage: +homepage: https://github.com/egovernments/health-campaign-field-worker-app/tree/master/packages/digit_firebase_services +repository: https://github.com/egovernments/health-campaign-field-worker-app environment: sdk: '>=3.0.0 <4.0.0' diff --git a/packages/digit_location_tracker/.gitignore b/packages/digit_location_tracker/.gitignore index ac5aa9893..a68ac422a 100644 --- a/packages/digit_location_tracker/.gitignore +++ b/packages/digit_location_tracker/.gitignore @@ -23,7 +23,6 @@ migrate_working_dir/ # Flutter/Dart/Pub related # Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. -/pubspec.lock **/doc/api/ .dart_tool/ build/ diff --git a/packages/digit_location_tracker/CHANGELOG.md b/packages/digit_location_tracker/CHANGELOG.md index e0452a61f..8bf1ddd8f 100644 --- a/packages/digit_location_tracker/CHANGELOG.md +++ b/packages/digit_location_tracker/CHANGELOG.md @@ -1,3 +1,13 @@ +## 1.0.0 + +* Updated to latest package versions +* Updated flutter version to 3.22 + +## 0.0.1-dev.2 + +* Modified Regex for handling negative latitude, longitude and added new accuracy field +* Added new accuracy field to fetch precise location + ## 0.0.1-dev.1 * Init release of digit_location_tracker diff --git a/packages/digit_location_tracker/README.md b/packages/digit_location_tracker/README.md index be133cdd4..0b6fb25b3 100644 --- a/packages/digit_location_tracker/README.md +++ b/packages/digit_location_tracker/README.md @@ -34,6 +34,8 @@ triggerLocationTracker( now.add(const Duration(hours: 8)).millisecondsSinceEpoch, ); -## Additional information +## Additional Required information -Create location service file in your android folder and replace main activity similar to this https://github.com/egovernments/health-campaign-field-worker-app/blob/location_tracker/apps/health_campaign_field_worker_app/android/app/src/main/kotlin/com/digit/hcm/MainActivity.kt and https://github.com/egovernments/health-campaign-field-worker-app/blob/location_tracker/apps/health_campaign_field_worker_app/android/app/src/main/kotlin/com/digit/hcm/location_service.kt +Create location service file in your android folder and replace main activity similar to this +1. https://github.com/egovernments/health-campaign-field-worker-app/blob/location_tracker/apps/health_campaign_field_worker_app/android/app/src/main/kotlin/com/digit/hcm/MainActivity.kt +2. https://github.com/egovernments/health-campaign-field-worker-app/blob/location_tracker/apps/health_campaign_field_worker_app/android/app/src/main/kotlin/com/digit/hcm/location_service.kt diff --git a/packages/digit_location_tracker/lib/utils/utils.dart b/packages/digit_location_tracker/lib/utils/utils.dart index 8fc217297..dcc22740e 100644 --- a/packages/digit_location_tracker/lib/utils/utils.dart +++ b/packages/digit_location_tracker/lib/utils/utils.dart @@ -30,19 +30,20 @@ Future> parseLocationData(List logs) async { for (var log in logs) { final pattern = RegExp( - r'Latitude:\s*(\d+\.\d+),\s*Longitude:\s*(\d+\.\d+),\s*isSync:\s*(\w+),\s*timestamp:\s*(\d+)'); + r'Latitude:\s*(-?\d+\.\d+),\s*Longitude:\s*(-?\d+\.\d+),\s*Accuracy:\s*(\d+\.\d+),\s*isSync:\s*(\w+),\s*timestamp:\s*(\d+)'); final match = pattern.firstMatch(log); if (match != null) { final latitude = double.parse(match.group(1)!); final longitude = double.parse(match.group(2)!); - final isSync = match.group(3)!.toLowerCase() == 'true'; - final timestamp = int.parse(match.group(4)!); + final accuracy = double.parse(match.group(3)!); + final isSync = match.group(4)!.toLowerCase() == 'true'; + final timestamp = int.parse(match.group(5)!); locationDataList.add(UserActionModel( latitude: latitude, longitude: longitude, - locationAccuracy: 1.3, + locationAccuracy: accuracy, tenantId: LocationTrackerSingleton().tenantId, clientReferenceId: IdGen.instance.identifier, isSync: isSync, diff --git a/packages/digit_location_tracker/pubspec.lock b/packages/digit_location_tracker/pubspec.lock new file mode 100644 index 000000000..d425cd382 --- /dev/null +++ b/packages/digit_location_tracker/pubspec.lock @@ -0,0 +1,783 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + sha256: "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7" + url: "https://pub.dev" + source: hosted + version: "67.0.0" + _flutterfire_internals: + dependency: transitive + description: + name: _flutterfire_internals + sha256: "37a42d06068e2fe3deddb2da079a8c4d105f241225ba27b7122b37e9865fd8f7" + url: "https://pub.dev" + source: hosted + version: "1.3.35" + analyzer: + dependency: transitive + description: + name: analyzer + sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d" + url: "https://pub.dev" + source: hosted + version: "6.4.1" + ansicolor: + dependency: transitive + description: + name: ansicolor + sha256: "50e982d500bc863e1d703448afdbf9e5a72eb48840a4f766fa361ffd6877055f" + url: "https://pub.dev" + source: hosted + version: "2.0.3" + args: + dependency: transitive + description: + name: args + sha256: bf9f5caeea8d8fe6721a9c358dd8a5c1947b27f1cfaa18b39c301273594919e6 + url: "https://pub.dev" + source: hosted + version: "2.6.0" + async: + dependency: transitive + description: + name: async + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" + source: hosted + version: "2.11.0" + bloc: + dependency: transitive + description: + name: bloc + sha256: "106842ad6569f0b60297619e9e0b1885c2fb9bf84812935490e6c5275777804e" + url: "https://pub.dev" + source: hosted + version: "8.1.4" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + build: + dependency: transitive + description: + name: build + sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" + url: "https://pub.dev" + source: hosted + version: "2.4.1" + characters: + dependency: transitive + description: + name: characters + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" + source: hosted + version: "1.3.0" + clock: + dependency: transitive + description: + name: clock + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" + source: hosted + version: "1.1.1" + collection: + dependency: transitive + description: + name: collection + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + url: "https://pub.dev" + source: hosted + version: "1.18.0" + convert: + dependency: transitive + description: + name: convert + sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + url: "https://pub.dev" + source: hosted + version: "3.1.1" + crypto: + dependency: transitive + description: + name: crypto + sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + url: "https://pub.dev" + source: hosted + version: "3.0.3" + dart_mappable: + dependency: transitive + description: + name: dart_mappable + sha256: f69a961ae8589724ebb542e588f228ae844c5f78028899cbe2cc718977c1b382 + url: "https://pub.dev" + source: hosted + version: "4.3.0" + dart_mappable_builder: + dependency: "direct overridden" + description: + path: "../dart_mappable_builder" + relative: true + source: path + version: "4.2.3" + dart_style: + dependency: transitive + description: + name: dart_style + sha256: "99e066ce75c89d6b29903d788a7bb9369cf754f7b24bf70bf4b6d6d6b26853b9" + url: "https://pub.dev" + source: hosted + version: "2.3.6" + digit_data_model: + dependency: "direct main" + description: + path: "../digit_data_model" + relative: true + source: path + version: "1.0.5" + digit_firebase_services: + dependency: "direct overridden" + description: + path: "../digit_firebase_services" + relative: true + source: path + version: "0.0.1" + dio: + dependency: transitive + description: + name: dio + sha256: "5598aa796bbf4699afd5c67c0f5f6e2ed542afc956884b9cd58c306966efc260" + url: "https://pub.dev" + source: hosted + version: "5.7.0" + dio_web_adapter: + dependency: transitive + description: + name: dio_web_adapter + sha256: "36c5b2d79eb17cdae41e974b7a8284fec631651d2a6f39a8a2ff22327e90aeac" + url: "https://pub.dev" + source: hosted + version: "1.0.1" + drift: + dependency: transitive + description: + name: drift + sha256: "4e0ffee40d23f0b809e6cff1ad202886f51d629649073ed42d9cd1d194ea943e" + url: "https://pub.dev" + source: hosted + version: "2.19.1+1" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" + source: hosted + version: "1.3.1" + ffi: + dependency: transitive + description: + name: ffi + sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + file: + dependency: transitive + description: + name: file + sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 + url: "https://pub.dev" + source: hosted + version: "7.0.1" + firebase_core: + dependency: transitive + description: + name: firebase_core + sha256: "26de145bb9688a90962faec6f838247377b0b0d32cc0abecd9a4e43525fc856c" + url: "https://pub.dev" + source: hosted + version: "2.32.0" + firebase_core_platform_interface: + dependency: transitive + description: + name: firebase_core_platform_interface + sha256: b94b217e3ad745e784960603d33d99471621ecca151c99c670869b76e50ad2a6 + url: "https://pub.dev" + source: hosted + version: "5.3.1" + firebase_core_web: + dependency: transitive + description: + name: firebase_core_web + sha256: "362e52457ed2b7b180964769c1e04d1e0ea0259fdf7025fdfedd019d4ae2bd88" + url: "https://pub.dev" + source: hosted + version: "2.17.5" + firebase_crashlytics: + dependency: transitive + description: + name: firebase_crashlytics + sha256: "9897c01efaa950d2f6da8317d12452749a74dc45f33b46390a14cfe28067f271" + url: "https://pub.dev" + source: hosted + version: "3.5.7" + firebase_crashlytics_platform_interface: + dependency: transitive + description: + name: firebase_crashlytics_platform_interface + sha256: "16a71e08fbf6e00382816e1b13397898c29a54fa0ad969c2c2a3b82a704877f0" + url: "https://pub.dev" + source: hosted + version: "3.6.35" + fixnum: + dependency: transitive + description: + name: fixnum + sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be + url: "https://pub.dev" + source: hosted + version: "1.1.1" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_background_service: + dependency: "direct main" + description: + name: flutter_background_service + sha256: d32f078ec57647c9cfd6e1a8da9297f7d8f021d4dcc204a35aaad2cdbfe255f0 + url: "https://pub.dev" + source: hosted + version: "5.0.10" + flutter_background_service_android: + dependency: transitive + description: + name: flutter_background_service_android + sha256: "39da42dddf877beeef82bc2583130d8bedb4d0765e99ca9e7b4a32e8c6abd239" + url: "https://pub.dev" + source: hosted + version: "6.2.7" + flutter_background_service_ios: + dependency: transitive + description: + name: flutter_background_service_ios + sha256: "6037ffd45c4d019dab0975c7feb1d31012dd697e25edc05505a4a9b0c7dc9fba" + url: "https://pub.dev" + source: hosted + version: "5.0.3" + flutter_background_service_platform_interface: + dependency: transitive + description: + name: flutter_background_service_platform_interface + sha256: ca74aa95789a8304f4d3f57f07ba404faa86bed6e415f83e8edea6ad8b904a41 + url: "https://pub.dev" + source: hosted + version: "5.1.2" + flutter_bloc: + dependency: "direct main" + description: + name: flutter_bloc + sha256: b594505eac31a0518bdcb4b5b79573b8d9117b193cc80cc12e17d639b10aa27a + url: "https://pub.dev" + source: hosted + version: "8.1.6" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04 + url: "https://pub.dev" + source: hosted + version: "2.0.3" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + freezed_annotation: + dependency: "direct main" + description: + name: freezed_annotation + sha256: c2e2d632dd9b8a2b7751117abcfc2b4888ecfe181bd9fca7170d9ef02e595fe2 + url: "https://pub.dev" + source: hosted + version: "2.4.4" + glob: + dependency: transitive + description: + name: glob + sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" + source: hosted + version: "4.0.2" + isar: + dependency: "direct main" + description: + name: isar + sha256: "99165dadb2cf2329d3140198363a7e7bff9bbd441871898a87e26914d25cf1ea" + url: "https://pub.dev" + source: hosted + version: "3.1.0+1" + isar_flutter_libs: + dependency: transitive + description: + name: isar_flutter_libs + sha256: bc6768cc4b9c61aabff77152e7f33b4b17d2fc93134f7af1c3dd51500fe8d5e8 + url: "https://pub.dev" + source: hosted + version: "3.1.0+1" + js: + dependency: transitive + description: + name: js + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 + url: "https://pub.dev" + source: hosted + version: "0.6.7" + 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: + name: leak_tracker + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + url: "https://pub.dev" + source: hosted + version: "10.0.4" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + url: "https://pub.dev" + source: hosted + version: "3.0.3" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" + lints: + dependency: transitive + description: + name: lints + sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + location: + dependency: "direct main" + description: + name: location + sha256: "37ffdadcd4b1498b769824f45ebb4de8ed46663a4a67ac27b33a590ee486579f" + url: "https://pub.dev" + source: hosted + version: "6.0.2" + location_platform_interface: + dependency: "direct main" + description: + name: location_platform_interface + sha256: "2ecde6bb0f88032b0bbbde37e18975b4468711dd92619c2235cc0c0ee93b4b8e" + url: "https://pub.dev" + source: hosted + version: "4.0.0" + location_web: + dependency: transitive + description: + name: location_web + sha256: "49dda13d415c4603c5775a33fb22f575e0aa3f0ec2916644ddcd722db31ee884" + url: "https://pub.dev" + source: hosted + version: "5.0.2" + logging: + dependency: transitive + description: + name: logging + sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61 + url: "https://pub.dev" + source: hosted + version: "1.3.0" + matcher: + dependency: transitive + description: + name: matcher + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + url: "https://pub.dev" + source: hosted + version: "0.12.16+1" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + url: "https://pub.dev" + source: hosted + version: "0.8.0" + meta: + dependency: transitive + description: + name: meta + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" + url: "https://pub.dev" + source: hosted + version: "1.12.0" + mocktail: + dependency: transitive + description: + name: mocktail + sha256: "890df3f9688106f25755f26b1c60589a92b3ab91a22b8b224947ad041bf172d8" + url: "https://pub.dev" + source: hosted + version: "1.0.4" + nested: + dependency: transitive + description: + name: nested + sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20" + url: "https://pub.dev" + source: hosted + version: "1.0.0" + package_config: + dependency: transitive + description: + name: package_config + sha256: "92d4488434b520a62570293fbd33bb556c7d49230791c1b4bbd973baf6d2dc67" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + path: + dependency: transitive + description: + name: path + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + url: "https://pub.dev" + source: hosted + version: "1.9.0" + path_provider: + dependency: "direct main" + description: + name: path_provider + sha256: fec0d61223fba3154d87759e3cc27fe2c8dc498f6386c6d6fc80d1afdd1bf378 + url: "https://pub.dev" + source: hosted + version: "2.1.4" + path_provider_android: + dependency: transitive + description: + name: path_provider_android + sha256: a248d8146ee5983446bf03ed5ea8f6533129a12b11f12057ad1b4a67a2b3b41d + url: "https://pub.dev" + source: hosted + version: "2.2.4" + path_provider_foundation: + dependency: transitive + description: + name: path_provider_foundation + sha256: "5a7999be66e000916500be4f15a3633ebceb8302719b47b9cc49ce924125350f" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + path_provider_linux: + dependency: transitive + description: + name: path_provider_linux + sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 + url: "https://pub.dev" + source: hosted + version: "2.2.1" + path_provider_platform_interface: + dependency: transitive + description: + name: path_provider_platform_interface + sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + path_provider_windows: + dependency: transitive + description: + name: path_provider_windows + sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 + url: "https://pub.dev" + source: hosted + version: "2.3.0" + permission_handler: + dependency: "direct main" + description: + name: permission_handler + sha256: "18bf33f7fefbd812f37e72091a15575e72d5318854877e0e4035a24ac1113ecb" + url: "https://pub.dev" + source: hosted + version: "11.3.1" + permission_handler_android: + dependency: transitive + description: + name: permission_handler_android + sha256: "71bbecfee799e65aff7c744761a57e817e73b738fedf62ab7afd5593da21f9f1" + url: "https://pub.dev" + source: hosted + version: "12.0.13" + permission_handler_apple: + dependency: transitive + description: + name: permission_handler_apple + sha256: e6f6d73b12438ef13e648c4ae56bd106ec60d17e90a59c4545db6781229082a0 + url: "https://pub.dev" + source: hosted + version: "9.4.5" + permission_handler_html: + dependency: transitive + description: + name: permission_handler_html + sha256: "54bf176b90f6eddd4ece307e2c06cf977fb3973719c35a93b85cc7093eb6070d" + url: "https://pub.dev" + source: hosted + version: "0.1.1" + permission_handler_platform_interface: + dependency: transitive + description: + name: permission_handler_platform_interface + sha256: e9c8eadee926c4532d0305dff94b85bf961f16759c3af791486613152af4b4f9 + url: "https://pub.dev" + source: hosted + version: "4.2.3" + permission_handler_windows: + dependency: transitive + description: + name: permission_handler_windows + sha256: "1a790728016f79a41216d88672dbc5df30e686e811ad4e698bfc51f76ad91f1e" + url: "https://pub.dev" + source: hosted + version: "0.2.1" + platform: + dependency: transitive + description: + name: platform + sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984" + url: "https://pub.dev" + source: hosted + version: "3.1.6" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" + url: "https://pub.dev" + source: hosted + version: "2.1.8" + provider: + dependency: transitive + description: + name: provider + sha256: c8a055ee5ce3fd98d6fc872478b03823ffdb448699c6ebdbbc71d59b596fd48c + url: "https://pub.dev" + source: hosted + version: "6.1.2" + pub_semver: + dependency: transitive + description: + name: pub_semver + sha256: "7b3cfbf654f3edd0c6298ecd5be782ce997ddf0e00531b9464b55245185bbbbd" + url: "https://pub.dev" + source: hosted + version: "2.1.5" + recase: + dependency: transitive + description: + name: recase + sha256: e4eb4ec2dcdee52dcf99cb4ceabaffc631d7424ee55e56f280bc039737f89213 + url: "https://pub.dev" + source: hosted + version: "4.1.0" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.99" + source_gen: + dependency: transitive + description: + name: source_gen + sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832" + url: "https://pub.dev" + source: hosted + version: "1.5.0" + source_span: + dependency: transitive + description: + name: source_span + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" + source: hosted + version: "1.10.0" + sprintf: + dependency: transitive + description: + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" + url: "https://pub.dev" + source: hosted + version: "7.0.0" + sqlite3: + dependency: transitive + description: + name: sqlite3 + sha256: fde692580bee3379374af1f624eb3e113ab2865ecb161dbe2d8ac2de9735dbdb + url: "https://pub.dev" + source: hosted + version: "2.4.5" + sqlite3_flutter_libs: + dependency: transitive + description: + name: sqlite3_flutter_libs + sha256: "7ae52b23366e5295005022e62fa093f64bfe190810223ea0ebf733a4cd140bce" + url: "https://pub.dev" + source: hosted + version: "0.5.26" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + url: "https://pub.dev" + source: hosted + version: "1.11.1" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + url: "https://pub.dev" + source: hosted + version: "2.1.2" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" + source: hosted + version: "1.2.1" + test_api: + dependency: transitive + description: + name: test_api + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" + url: "https://pub.dev" + source: hosted + version: "0.7.0" + type_plus: + dependency: transitive + description: + name: type_plus + sha256: d5d1019471f0d38b91603adb9b5fd4ce7ab903c879d2fbf1a3f80a630a03fcc9 + url: "https://pub.dev" + source: hosted + version: "2.1.1" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + url: "https://pub.dev" + source: hosted + version: "1.3.2" + uuid: + dependency: transitive + description: + name: uuid + sha256: a5be9ef6618a7ac1e964353ef476418026db906c4facdedaa299b7a2e71690ff + url: "https://pub.dev" + source: hosted + version: "4.5.1" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" + url: "https://pub.dev" + source: hosted + version: "14.2.1" + watcher: + dependency: transitive + description: + name: watcher + sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + web: + dependency: transitive + description: + name: web + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" + url: "https://pub.dev" + source: hosted + version: "0.5.1" + xdg_directories: + dependency: transitive + description: + name: xdg_directories + sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d + url: "https://pub.dev" + source: hosted + version: "1.0.4" + yaml: + dependency: transitive + description: + name: yaml + sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" + url: "https://pub.dev" + source: hosted + version: "3.1.2" +sdks: + dart: ">=3.4.0 <4.0.0" + flutter: ">=3.22.0" diff --git a/packages/digit_location_tracker/pubspec.yaml b/packages/digit_location_tracker/pubspec.yaml index 8b8c120c7..d60b93dfe 100644 --- a/packages/digit_location_tracker/pubspec.yaml +++ b/packages/digit_location_tracker/pubspec.yaml @@ -1,11 +1,11 @@ name: digit_location_tracker description: "A comprehensive package to enable location_tracking in the application" -version: 0.0.1-dev.1 +version: 1.0.0 homepage: https://github.com/egovernments/health-campaign-field-worker-app/tree/master/packages/digit_location_tracker repository: https://github.com/egovernments/health-campaign-field-worker-app environment: - sdk: '>=3.2.3 <4.0.0' + sdk: '>=3.2.0 <4.0.0' flutter: ">=1.17.0" dependencies: @@ -13,30 +13,30 @@ dependencies: sdk: flutter flutter_background_service: ^5.0.10 flutter_bloc: ^8.1.1 - freezed_annotation: ^2.2.0 - location: ^5.0.0 - location_platform_interface: ^3.0.0 + freezed_annotation: ^2.2.0 + location: ^6.0.2 + location_platform_interface: ^4.0.0 permission_handler: ^11.3.1 path_provider: ^2.0.11 isar: ^3.0.5 - digit_data_model: ^1.0.4 + digit_data_model: ^1.0.5 dev_dependencies: flutter_test: sdk: flutter flutter_lints: ^2.0.0 - -# For information on the generic Dart part of this file, see the -# following page: https://dart.dev/tools/pub/pubspec - -# The following section is specific to Flutter packages. -#flutter: - -# plugin: -# platforms: -# android: -# package: com.digit.location_tracker -# pluginClass: LocationTrackerPlugin + + # For information on the generic Dart part of this file, see the + # following page: https://dart.dev/tools/pub/pubspec + + # The following section is specific to Flutter packages. + #flutter: + + # plugin: + # platforms: + # android: + # package: com.digit.location_tracker + # pluginClass: LocationTrackerPlugin # To add assets to your package, add an assets section, like this: # assets: diff --git a/packages/digit_scanner/CHANGELOG.md b/packages/digit_scanner/CHANGELOG.md index be2b5caae..b627973c4 100644 --- a/packages/digit_scanner/CHANGELOG.md +++ b/packages/digit_scanner/CHANGELOG.md @@ -1,10 +1,19 @@ +## 1.0.4 + +* Updated to latest package versions +* Updated flutter version to 3.22 +* Migrated to digit_ui_components + ## 1.0.3+1 + * Updated Digit_Components ## 1.0.3 + * Manual code entry fixes with stable version ## 1.0.3-dev.1 + * Fix for manual entry result not reflecting ## 1.0.2 diff --git a/packages/digit_scanner/example/lib/main.dart b/packages/digit_scanner/example/lib/main.dart index 7fba5e7f3..c9d0c59ab 100644 --- a/packages/digit_scanner/example/lib/main.dart +++ b/packages/digit_scanner/example/lib/main.dart @@ -58,7 +58,6 @@ class MyHomePage extends StatefulWidget { } class _MyHomePageState extends State { - int _counter = 0; DigitScannerBloc scannerBloc = DigitScannerBloc(const DigitScannerState()); diff --git a/packages/digit_scanner/example/pubspec.lock b/packages/digit_scanner/example/pubspec.lock index 600e45214..68f0a788d 100644 --- a/packages/digit_scanner/example/pubspec.lock +++ b/packages/digit_scanner/example/pubspec.lock @@ -5,26 +5,26 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: eb376e9acf6938204f90eb3b1f00b578640d3188b4c8a8ec054f9f479af8d051 + sha256: "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7" url: "https://pub.dev" source: hosted - version: "64.0.0" + version: "67.0.0" analyzer: dependency: transitive description: name: analyzer - sha256: "69f54f967773f6c26c7dcb13e93d7ccee8b17a641689da39e878d5cf13b06893" + sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d" url: "https://pub.dev" source: hosted - version: "6.2.0" + version: "6.4.1" archive: dependency: transitive description: name: archive - sha256: "6bd38d335f0954f5fad9c79e614604fbf03a0e5b975923dd001b6ea965ef5b4b" + sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d url: "https://pub.dev" source: hosted - version: "3.6.0" + version: "3.6.1" args: dependency: transitive description: @@ -101,10 +101,10 @@ packages: dependency: transitive description: name: auto_route - sha256: eb33554581a0a4aa7e6da0f13a44291a55bf71359012f1d9feb41634ff908ff8 + sha256: "8de4a280ce7861ef24a6baa14c2b02b77a8c31b4a4c4f12d7b608678cc657c7f" url: "https://pub.dev" source: hosted - version: "7.9.2" + version: "8.1.4" bloc: dependency: transitive description: @@ -141,10 +141,10 @@ packages: dependency: transitive description: name: build_daemon - sha256: "0343061a33da9c5810b2d6cee51945127d8f4c060b7fbdd9d54917f0a3feaaa1" + sha256: "79b2aef6ac2ed00046867ed354c88778c9c0f029df8a20fe10b5436826721ef9" url: "https://pub.dev" source: hosted - version: "4.0.1" + version: "4.0.2" build_resolvers: dependency: transitive description: @@ -157,18 +157,18 @@ packages: dependency: transitive description: name: build_runner - sha256: "3ac61a79bfb6f6cc11f693591063a7f19a7af628dc52f141743edac5c16e8c22" + sha256: "644dc98a0f179b872f612d3eb627924b578897c629788e858157fa5e704ca0c7" url: "https://pub.dev" source: hosted - version: "2.4.9" + version: "2.4.11" build_runner_core: dependency: transitive description: name: build_runner_core - sha256: "4ae8ffe5ac758da294ecf1802f2aff01558d8b1b00616aa7538ea9a8a5d50799" + sha256: e3c79f69a64bdfcd8a776a3c28db4eb6e3fb5356d013ae5eb2e52007706d5dbe url: "https://pub.dev" source: hosted - version: "7.3.0" + version: "7.3.1" built_collection: dependency: transitive description: @@ -189,42 +189,42 @@ packages: dependency: transitive description: name: camera - sha256: "9499cbc2e51d8eb0beadc158b288380037618ce4e30c9acbc4fae1ac3ecb5797" + sha256: "26ff41045772153f222ffffecba711a206f670f5834d40ebf5eed3811692f167" url: "https://pub.dev" source: hosted - version: "0.10.5+9" - camera_android: + version: "0.11.0+2" + camera_android_camerax: dependency: transitive description: - name: camera_android - sha256: b350ac087f111467e705b2b76cc1322f7f5bdc122aa83b4b243b0872f390d229 + name: camera_android_camerax + sha256: "011be2ab0e5b3e3aa8094413fa890f8c5c5afd7cfdaef353a992047d4dab5780" url: "https://pub.dev" source: hosted - version: "0.10.9+2" + version: "0.6.8+2" camera_avfoundation: dependency: transitive description: name: camera_avfoundation - sha256: "608b56b0880722f703871329c4d7d4c2f379c8e2936940851df7fc041abc6f51" + sha256: "7c28969a975a7eb2349bc2cb2dfe3ad218a33dba9968ecfb181ce08c87486655" url: "https://pub.dev" source: hosted - version: "0.9.13+10" + version: "0.9.17+3" camera_platform_interface: dependency: transitive description: name: camera_platform_interface - sha256: a250314a48ea337b35909a4c9d5416a208d736dcb01d0b02c6af122be66660b0 + sha256: b3ede1f171532e0d83111fe0980b46d17f1aa9788a07a2fbed07366bbdbb9061 url: "https://pub.dev" source: hosted - version: "2.7.4" + version: "2.8.0" camera_web: dependency: transitive description: name: camera_web - sha256: "9e9aba2fbab77ce2472924196ff8ac4dd8f9126c4f9a3096171cd1d870d6b26c" + sha256: b9235ec0a2ce949daec546f1f3d86f05c3921ed31c7d9ab6b7c03214d152fc2d url: "https://pub.dev" source: hosted - version: "0.3.3" + version: "0.3.4" characters: dependency: transitive description: @@ -233,6 +233,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.0" + charcode: + dependency: transitive + description: + name: charcode + sha256: fb0f1107cac15a5ea6ef0a6ef71a807b9e4267c713bb93e00e92d737cc8dbd8a + url: "https://pub.dev" + source: hosted + version: "1.4.0" checked_yaml: dependency: transitive description: @@ -277,18 +285,26 @@ packages: dependency: transitive description: name: cross_file - sha256: fedaadfa3a6996f75211d835aaeb8fede285dae94262485698afd832371b9a5e + sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670" url: "https://pub.dev" source: hosted - version: "0.3.3+8" + version: "0.3.4+2" crypto: dependency: transitive description: name: crypto - sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + sha256: ec30d999af904f33454ba22ed9a86162b35e52b44ac4807d1d93c288041d7d27 url: "https://pub.dev" source: hosted - version: "3.0.3" + version: "3.0.5" + csslib: + dependency: transitive + description: + name: csslib + sha256: "09bad715f418841f976c77db72d5398dc1253c21fb9c0c7f0b0b985860b2d58e" + url: "https://pub.dev" + source: hosted + version: "1.0.2" cupertino_icons: dependency: "direct main" description: @@ -305,29 +321,29 @@ packages: url: "https://pub.dev" source: hosted version: "2.3.6" - digit_components: - dependency: transitive - description: - name: digit_components - sha256: "9cca4d9a546037080afe02b6ade82fdf01574e11f5656ad12120fd6966578616" - url: "https://pub.dev" - source: hosted - version: "1.0.1+1" digit_scanner: dependency: "direct main" description: path: ".." relative: true source: path - version: "1.0.3+1" - easy_stepper: + version: "1.0.4" + digit_ui_components: + dependency: "direct main" + description: + name: digit_ui_components + sha256: "57c4da5237be6025783e7357a02b6b492f02e38f711d674bf46f5f8c8a93ad76" + url: "https://pub.dev" + source: hosted + version: "0.0.2-dev.4" + dotted_border: dependency: transitive description: - name: easy_stepper - sha256: "77f3ab4ee3c867b5a2236bf712abb08fed2b1c533cf24cf3fcd46c2821072ffd" + name: dotted_border + sha256: "108837e11848ca776c53b30bc870086f84b62ed6e01c503ed976e8f8c7df9c04" url: "https://pub.dev" source: hosted - version: "0.5.2+1" + version: "2.1.0" fake_async: dependency: transitive description: @@ -340,10 +356,10 @@ packages: dependency: transitive description: name: ffi - sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" + sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.3" file: dependency: transitive description: @@ -352,99 +368,112 @@ packages: url: "https://pub.dev" source: hosted version: "7.0.0" - fixnum: + file_picker: dependency: transitive description: - name: fixnum - sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + name: file_picker + sha256: "16dc141db5a2ccc6520ebb6a2eb5945b1b09e95085c021d9f914f8ded7f1465c" url: "https://pub.dev" source: hosted - version: "1.1.0" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_bloc: - dependency: "direct main" + version: "8.1.4" + file_selector_linux: + dependency: transitive description: - name: flutter_bloc - sha256: f0ecf6e6eb955193ca60af2d5ca39565a86b8a142452c5b24d96fb477428f4d2 + name: file_selector_linux + sha256: "54cbbd957e1156d29548c7d9b9ec0c0ebb6de0a90452198683a7d23aed617a33" url: "https://pub.dev" source: hosted - version: "8.1.5" - flutter_focus_watcher: + version: "0.9.3+2" + file_selector_macos: dependency: transitive description: - name: flutter_focus_watcher - sha256: a72ee539ae0237961308a25839887ca93a0b1cb6f87b0d492b139c8fccff8e79 + name: file_selector_macos + sha256: "271ab9986df0c135d45c3cdb6bd0faa5db6f4976d3e4b437cf7d0f258d941bfc" url: "https://pub.dev" source: hosted - version: "2.0.0" - flutter_keyboard_visibility: + version: "0.9.4+2" + file_selector_platform_interface: dependency: transitive description: - name: flutter_keyboard_visibility - sha256: "4983655c26ab5b959252ee204c2fffa4afeb4413cd030455194ec0caa3b8e7cb" + name: file_selector_platform_interface + sha256: a3994c26f10378a039faa11de174d7b78eb8f79e4dd0af2a451410c1a5c3f66b url: "https://pub.dev" source: hosted - version: "5.4.1" - flutter_keyboard_visibility_linux: + version: "2.6.2" + file_selector_windows: dependency: transitive description: - name: flutter_keyboard_visibility_linux - sha256: "6fba7cd9bb033b6ddd8c2beb4c99ad02d728f1e6e6d9b9446667398b2ac39f08" + name: file_selector_windows + sha256: "8f5d2f6590d51ecd9179ba39c64f722edc15226cc93dcc8698466ad36a4a85a4" url: "https://pub.dev" source: hosted - version: "1.0.0" - flutter_keyboard_visibility_macos: + version: "0.9.3+3" + fixnum: dependency: transitive description: - name: flutter_keyboard_visibility_macos - sha256: c5c49b16fff453dfdafdc16f26bdd8fb8d55812a1d50b0ce25fc8d9f2e53d086 + name: fixnum + sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" url: "https://pub.dev" source: hosted - version: "1.0.0" - flutter_keyboard_visibility_platform_interface: + version: "1.1.0" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_bloc: + dependency: "direct main" + description: + name: flutter_bloc + sha256: b594505eac31a0518bdcb4b5b79573b8d9117b193cc80cc12e17d639b10aa27a + url: "https://pub.dev" + source: hosted + version: "8.1.6" + flutter_dropzone: dependency: transitive description: - name: flutter_keyboard_visibility_platform_interface - sha256: e43a89845873f7be10cb3884345ceb9aebf00a659f479d1c8f4293fcb37022a4 + name: flutter_dropzone + sha256: b399c60411f9bf9c4c2f97933c6a3a185859e75aade8897831e76cee4346c8e1 url: "https://pub.dev" source: hosted - version: "2.0.0" - flutter_keyboard_visibility_web: + version: "3.0.7" + flutter_dropzone_platform_interface: dependency: transitive description: - name: flutter_keyboard_visibility_web - sha256: d3771a2e752880c79203f8d80658401d0c998e4183edca05a149f5098ce6e3d1 + name: flutter_dropzone_platform_interface + sha256: "96d2c51c86063ba150551c3b40fd26c5a18785bee071c0c751502d28a545df3b" url: "https://pub.dev" source: hosted - version: "2.0.0" - flutter_keyboard_visibility_windows: + version: "2.2.0" + flutter_dropzone_web: dependency: transitive description: - name: flutter_keyboard_visibility_windows - sha256: fc4b0f0b6be9b93ae527f3d527fb56ee2d918cd88bbca438c478af7bcfd0ef73 + name: flutter_dropzone_web + sha256: c5a0fdb63b7216352a01761ec1b6eba1982e49541e60675735e2d3d95e207b19 url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "3.0.13" flutter_lints: dependency: "direct dev" description: name: flutter_lints - sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04 + sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c" url: "https://pub.dev" source: hosted - version: "2.0.3" + version: "4.0.0" + flutter_localizations: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" flutter_plugin_android_lifecycle: dependency: transitive description: name: flutter_plugin_android_lifecycle - sha256: "8cf40eebf5dec866a6d1956ad7b4f7016e6c0cc69847ab946833b7d43743809f" + sha256: "9ee02950848f61c4129af3d6ec84a1cfc0e47931abc746b03e7a3bc3e8ff6eda" url: "https://pub.dev" source: hosted - version: "2.0.19" + version: "2.0.22" flutter_spinkit: dependency: transitive description: @@ -453,6 +482,14 @@ packages: url: "https://pub.dev" source: hosted version: "5.2.1" + flutter_styled_toast: + dependency: transitive + description: + name: flutter_styled_toast + sha256: e667f13a665820eb0fa8506547e47eacbcddf1948d6d3036cfd3b089bd4b0516 + url: "https://pub.dev" + source: hosted + version: "2.2.1" flutter_svg: dependency: transitive description: @@ -466,14 +503,6 @@ packages: description: flutter source: sdk version: "0.0.0" - flutter_typeahead: - dependency: transitive - description: - name: flutter_typeahead - sha256: b9942bd5b7611a6ec3f0730c477146cffa4cd4b051077983ba67ddfc9e7ee818 - url: "https://pub.dev" - source: hosted - version: "4.8.0" flutter_web_plugins: dependency: transitive description: flutter @@ -483,18 +512,18 @@ packages: dependency: transitive description: name: fluttertoast - sha256: "81b68579e23fcbcada2db3d50302813d2371664afe6165bc78148050ab94bf66" + sha256: "95f349437aeebe524ef7d6c9bde3e6b4772717cf46a0eb6a3ceaddc740b297cc" url: "https://pub.dev" source: hosted - version: "8.2.5" + version: "8.2.8" freezed_annotation: dependency: transitive description: name: freezed_annotation - sha256: c3fd9336eb55a38cc1bbd79ab17573113a8deccd0ecbbf926cca3c62803b5c2d + sha256: c2e2d632dd9b8a2b7751117abcfc2b4888ecfe181bd9fca7170d9ef02e595fe2 url: "https://pub.dev" source: hosted - version: "2.4.1" + version: "2.4.4" frontend_server_client: dependency: transitive description: @@ -503,6 +532,54 @@ packages: url: "https://pub.dev" source: hosted version: "4.0.0" + geolocator: + dependency: transitive + description: + name: geolocator + sha256: f4efb8d3c4cdcad2e226af9661eb1a0dd38c71a9494b22526f9da80ab79520e5 + url: "https://pub.dev" + source: hosted + version: "10.1.1" + geolocator_android: + dependency: transitive + description: + name: geolocator_android + sha256: "7aefc530db47d90d0580b552df3242440a10fe60814496a979aa67aa98b1fd47" + url: "https://pub.dev" + source: hosted + version: "4.6.1" + geolocator_apple: + dependency: transitive + description: + name: geolocator_apple + sha256: "6154ea2682563f69fc0125762ed7e91e7ed85d0b9776595653be33918e064807" + url: "https://pub.dev" + source: hosted + version: "2.3.8+1" + geolocator_platform_interface: + dependency: transitive + description: + name: geolocator_platform_interface + sha256: "386ce3d9cce47838355000070b1d0b13efb5bc430f8ecda7e9238c8409ace012" + url: "https://pub.dev" + source: hosted + version: "4.2.4" + geolocator_web: + dependency: transitive + description: + name: geolocator_web + sha256: "102e7da05b48ca6bf0a5bda0010f886b171d1a08059f01bfe02addd0175ebece" + url: "https://pub.dev" + source: hosted + version: "2.2.1" + geolocator_windows: + dependency: transitive + description: + name: geolocator_windows + sha256: "53da08937d07c24b0d9952eb57a3b474e29aae2abf9dd717f7e1230995f13f0e" + url: "https://pub.dev" + source: hosted + version: "0.2.3" glob: dependency: transitive description: @@ -515,42 +592,42 @@ packages: dependency: transitive description: name: google_fonts - sha256: "2776c66b3e97c6cdd58d1bd3281548b074b64f1fd5c8f82391f7456e38849567" + sha256: b1ac0fe2832c9cc95e5e88b57d627c5e68c223b9657f4b96e1487aa9098c7b82 url: "https://pub.dev" source: hosted - version: "4.0.5" + version: "6.2.1" google_mlkit_barcode_scanning: dependency: transitive description: name: google_mlkit_barcode_scanning - sha256: "965183a8cd5cef8477ceea5dbdf29c34a739cf0cfbf1bdad54cd3f9f1807afe5" + sha256: f1a2a39cf1730b9a5e2784a07efa1ca5bfdfdde6aa00b193b3f8cd1953c638ec url: "https://pub.dev" source: hosted - version: "0.10.0" + version: "0.12.0" google_mlkit_commons: dependency: transitive description: name: google_mlkit_commons - sha256: "046586b381cdd139f7f6a05ad6998f7e339d061bd70158249907358394b5f496" + sha256: "27d626c66a181351a953eba5b6ff1ff123aadb891b4dab085b292118f039d6ac" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.1" graphs: dependency: transitive description: name: graphs - sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19 + sha256: "741bbf84165310a68ff28fe9e727332eef1407342fca52759cb21ad8177bb8d0" url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.3.2" gs1_barcode_parser: dependency: transitive description: name: gs1_barcode_parser - sha256: "9aaff47bdab7177deaf9248cc861ef41cf611d3f828498cb40b64bedcbf53391" + sha256: ff171bc40038de3f7178fbc32eaf9eebc3d35a3c4c00bb0281fe4a976d853a42 url: "https://pub.dev" source: hosted - version: "1.0.5" + version: "1.1.0" horizontal_data_table: dependency: transitive description: @@ -559,14 +636,22 @@ packages: url: "https://pub.dev" source: hosted version: "4.3.1" + html: + dependency: transitive + description: + name: html + sha256: "1fc58edeaec4307368c60d59b7e15b9d658b57d7f3125098b6294153c75337ec" + url: "https://pub.dev" + source: hosted + version: "0.15.5" http: dependency: transitive description: name: http - sha256: a2bbf9d017fcced29139daa8ed2bba4ece450ab222871df93ca9eec6f80c34ba + sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.2" http_multi_server: dependency: transitive description: @@ -583,14 +668,78 @@ packages: url: "https://pub.dev" source: hosted version: "4.0.2" + image_picker: + dependency: transitive + description: + name: image_picker + sha256: "021834d9c0c3de46bf0fe40341fa07168407f694d9b2bb18d532dc1261867f7a" + url: "https://pub.dev" + source: hosted + version: "1.1.2" + image_picker_android: + dependency: transitive + description: + name: image_picker_android + sha256: "8c5abf0dcc24fe6e8e0b4a5c0b51a5cf30cefdf6407a3213dae61edc75a70f56" + url: "https://pub.dev" + source: hosted + version: "0.8.12+12" + image_picker_for_web: + dependency: transitive + description: + name: image_picker_for_web + sha256: "717eb042ab08c40767684327be06a5d8dbb341fe791d514e4b92c7bbe1b7bb83" + url: "https://pub.dev" + source: hosted + version: "3.0.6" + image_picker_ios: + dependency: transitive + description: + name: image_picker_ios + sha256: "4f0568120c6fcc0aaa04511cb9f9f4d29fc3d0139884b1d06be88dcec7641d6b" + url: "https://pub.dev" + source: hosted + version: "0.8.12+1" + image_picker_linux: + dependency: transitive + description: + name: image_picker_linux + sha256: "4ed1d9bb36f7cd60aa6e6cd479779cc56a4cb4e4de8f49d487b1aaad831300fa" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + image_picker_macos: + dependency: transitive + description: + name: image_picker_macos + sha256: "3f5ad1e8112a9a6111c46d0b57a7be2286a9a07fc6e1976fdf5be2bd31d4ff62" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + image_picker_platform_interface: + dependency: transitive + description: + name: image_picker_platform_interface + sha256: "9ec26d410ff46f483c5519c29c02ef0e02e13a543f882b152d4bfd2f06802f80" + url: "https://pub.dev" + source: hosted + version: "2.10.0" + image_picker_windows: + dependency: transitive + description: + name: image_picker_windows + sha256: "6ad07afc4eb1bc25f3a01084d28520496c4a3bb0cb13685435838167c9dcedeb" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" intl: dependency: transitive description: name: intl - sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" + sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf url: "https://pub.dev" source: hosted - version: "0.18.1" + version: "0.19.0" io: dependency: transitive description: @@ -615,38 +764,62 @@ packages: url: "https://pub.dev" source: hosted version: "4.9.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + url: "https://pub.dev" + source: hosted + version: "10.0.4" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + url: "https://pub.dev" + source: hosted + version: "3.0.3" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" lints: dependency: transitive description: name: lints - sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452" + sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235" url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "4.0.0" location: dependency: transitive description: name: location - sha256: "06be54f682c9073cbfec3899eb9bc8ed90faa0e17735c9d9fa7fe426f5be1dd1" + sha256: "37ffdadcd4b1498b769824f45ebb4de8ed46663a4a67ac27b33a590ee486579f" url: "https://pub.dev" source: hosted - version: "5.0.3" + version: "6.0.2" location_platform_interface: dependency: transitive description: name: location_platform_interface - sha256: "8aa1d34eeecc979d7c9fe372931d84f6d2ebbd52226a54fe1620de6fdc0753b1" + sha256: "2ecde6bb0f88032b0bbbde37e18975b4468711dd92619c2235cc0c0ee93b4b8e" url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "4.0.0" location_web: dependency: transitive description: name: location_web - sha256: ec484c66e8a4ff1ee5d044c203f4b6b71e3a0556a97b739a5bc9616de672412b + sha256: "15ad7b4c8a9f55abee513373755e093a40c04d7e24fc1b4f89676fe99523d034" url: "https://pub.dev" source: hosted - version: "4.2.0" + version: "5.0.1" logging: dependency: transitive description: @@ -659,42 +832,42 @@ packages: dependency: transitive description: name: lottie - sha256: a93542cc2d60a7057255405f62252533f8e8956e7e06754955669fd32fb4b216 + sha256: "7afc60865a2429d994144f7d66ced2ae4305fe35d82890b8766e3359872d872c" url: "https://pub.dev" source: hosted - version: "2.7.0" + version: "3.1.3" matcher: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.12.0" mime: dependency: transitive description: name: mime - sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2" + sha256: "801fd0b26f14a4a58ccb09d5892c3fbdeff209594300a542492cf13fba9d247a" url: "https://pub.dev" source: hosted - version: "1.0.5" + version: "1.0.6" nested: dependency: transitive description: @@ -719,30 +892,22 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.0" - package_info_plus: - dependency: transitive - description: - name: package_info_plus - sha256: "88bc797f44a94814f2213db1c9bd5badebafdfb8290ca9f78d4b9ee2a3db4d79" - url: "https://pub.dev" - source: hosted - version: "5.0.1" - package_info_plus_platform_interface: + path: dependency: transitive description: - name: package_info_plus_platform_interface - sha256: "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6" + name: path + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "2.0.1" - path: + version: "1.9.0" + path_drawing: dependency: transitive description: - name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + name: path_drawing + sha256: bbb1934c0cbb03091af082a6389ca2080345291ef07a5fa6d6e078ba8682f977 url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.0.1" path_parsing: dependency: transitive description: @@ -755,26 +920,26 @@ packages: dependency: transitive description: name: path_provider - sha256: c9e7d3a4cd1410877472158bee69963a4579f78b68c65a2b7d40d1a7a88bb161 + sha256: fec0d61223fba3154d87759e3cc27fe2c8dc498f6386c6d6fc80d1afdd1bf378 url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.1.4" path_provider_android: dependency: transitive description: name: path_provider_android - sha256: a248d8146ee5983446bf03ed5ea8f6533129a12b11f12057ad1b4a67a2b3b41d + sha256: "6f01f8e37ec30b07bc424b4deabac37cacb1bc7e2e515ad74486039918a37eb7" url: "https://pub.dev" source: hosted - version: "2.2.4" + version: "2.2.10" path_provider_foundation: dependency: transitive description: name: path_provider_foundation - sha256: "5a7999be66e000916500be4f15a3633ebceb8302719b47b9cc49ce924125350f" + sha256: f234384a3fdd67f989b4d54a5d73ca2a6c422fa55ae694381ae0f4375cd1ea16 url: "https://pub.dev" source: hosted - version: "2.3.2" + version: "2.4.0" path_provider_linux: dependency: transitive description: @@ -795,10 +960,10 @@ packages: dependency: transitive description: name: path_provider_windows - sha256: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170" + sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 url: "https://pub.dev" source: hosted - version: "2.2.1" + version: "2.3.0" petitparser: dependency: transitive description: @@ -811,10 +976,10 @@ packages: dependency: transitive description: name: platform - sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec" + sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" url: "https://pub.dev" source: hosted - version: "3.1.4" + version: "3.1.5" plugin_platform_interface: dependency: transitive description: @@ -823,14 +988,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.8" - pointer_interceptor: - dependency: transitive - description: - name: pointer_interceptor - sha256: adf7a637f97c077041d36801b43be08559fd4322d2127b3f20bb7be1b9eebc22 - url: "https://pub.dev" - source: hosted - version: "0.9.3+7" pool: dependency: transitive description: @@ -859,34 +1016,18 @@ packages: dependency: transitive description: name: pubspec_parse - sha256: c63b2876e58e194e4b0828fcb080ad0e06d051cb607a6be51a9e084f47cb9367 + sha256: c799b721d79eb6ee6fa56f00c04b472dcd44a30d258fac2174a6ec57302678f8 url: "https://pub.dev" source: hosted - version: "1.2.3" - reactive_flutter_typeahead: - dependency: transitive - description: - name: reactive_flutter_typeahead - sha256: ef91627df8cef70e603e8a6458749d8a99a385b78854332602fd08ad905cdab8 - url: "https://pub.dev" - source: hosted - version: "0.8.1" + version: "1.3.0" reactive_forms: dependency: transitive description: name: reactive_forms - sha256: "5aa9c48a0626c20d00a005e597cb10efbdebbfeecb9c4227b03a5945fbb91ec4" + sha256: "9b1fb18e0aae9c50cfa0aaabaaa38bc4d78eefc9b7b95fa9c947b051f6524b8e" url: "https://pub.dev" source: hosted - version: "14.3.0" - remove_emoji_input_formatter: - dependency: transitive - description: - name: remove_emoji_input_formatter - sha256: "82d195984f890de7a8fea936c698848e78c1a67ccefe18db3baf9f7a3bc0177f" - url: "https://pub.dev" - source: hosted - version: "0.0.1+1" + version: "17.0.1" shelf: dependency: transitive description: @@ -899,10 +1040,10 @@ packages: dependency: transitive description: name: shelf_web_socket - sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" + sha256: "073c147238594ecd0d193f3456a5fe91c4b0abbcc68bf5cd95b36c4e194ac611" url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "2.0.0" sky_engine: dependency: transitive description: flutter @@ -976,10 +1117,10 @@ packages: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.0" timing: dependency: transitive description: @@ -996,14 +1137,94 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.2" + universal_html: + dependency: transitive + description: + name: universal_html + sha256: "56536254004e24d9d8cfdb7dbbf09b74cf8df96729f38a2f5c238163e3d58971" + url: "https://pub.dev" + source: hosted + version: "2.2.4" + universal_io: + dependency: transitive + description: + name: universal_io + sha256: "1722b2dcc462b4b2f3ee7d188dad008b6eb4c40bbd03a3de451d82c78bba9aad" + url: "https://pub.dev" + source: hosted + version: "2.2.2" + url_launcher: + dependency: transitive + description: + name: url_launcher + sha256: "9d06212b1362abc2f0f0d78e6f09f726608c74e3b9462e8368bb03314aa8d603" + url: "https://pub.dev" + source: hosted + version: "6.3.1" + url_launcher_android: + dependency: transitive + description: + name: url_launcher_android + sha256: f0c73347dfcfa5b3db8bc06e1502668265d39c08f310c29bff4e28eea9699f79 + url: "https://pub.dev" + source: hosted + version: "6.3.9" + url_launcher_ios: + dependency: transitive + description: + name: url_launcher_ios + sha256: "16a513b6c12bb419304e72ea0ae2ab4fed569920d1c7cb850263fe3acc824626" + url: "https://pub.dev" + source: hosted + version: "6.3.2" + url_launcher_linux: + dependency: transitive + description: + name: url_launcher_linux + sha256: "4e9ba368772369e3e08f231d2301b4ef72b9ff87c31192ef471b380ef29a4935" + url: "https://pub.dev" + source: hosted + version: "3.2.1" + url_launcher_macos: + dependency: transitive + description: + name: url_launcher_macos + sha256: "17ba2000b847f334f16626a574c702b196723af2a289e7a93ffcb79acff855c2" + url: "https://pub.dev" + source: hosted + version: "3.2.2" + url_launcher_platform_interface: + dependency: transitive + description: + name: url_launcher_platform_interface + sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + url_launcher_web: + dependency: transitive + description: + name: url_launcher_web + sha256: "772638d3b34c779ede05ba3d38af34657a05ac55b06279ea6edd409e323dca8e" + url: "https://pub.dev" + source: hosted + version: "2.3.3" + url_launcher_windows: + dependency: transitive + description: + name: url_launcher_windows + sha256: "44cf3aabcedde30f2dba119a9dea3b0f2672fbe6fa96e85536251d678216b3c4" + url: "https://pub.dev" + source: hosted + version: "3.1.3" uuid: dependency: transitive description: name: uuid - sha256: "814e9e88f21a176ae1359149021870e87f7cddaf633ab678a5d2b0bff7fd1ba8" + sha256: f33d6bb662f0e4f79dcd7ada2e6170f3b3a2530c28fc41f49a411ddedd576a77 url: "https://pub.dev" source: hosted - version: "4.4.0" + version: "4.5.0" vector_graphics: dependency: transitive description: @@ -1036,6 +1257,22 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" + visibility_detector: + dependency: transitive + description: + name: visibility_detector + sha256: dd5cc11e13494f432d15939c3aa8ae76844c42b723398643ce9addb88a5ed420 + url: "https://pub.dev" + source: hosted + version: "0.4.0+2" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" + url: "https://pub.dev" + source: hosted + version: "14.2.1" watcher: dependency: transitive description: @@ -1048,26 +1285,34 @@ packages: dependency: transitive description: name: web - sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 + sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "1.1.0" + web_socket: + dependency: transitive + description: + name: web_socket + sha256: "3c12d96c0c9a4eec095246debcea7b86c0324f22df69893d538fcc6f1b8cce83" + url: "https://pub.dev" + source: hosted + version: "0.1.6" web_socket_channel: dependency: transitive description: name: web_socket_channel - sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b + sha256: "9f187088ed104edd8662ca07af4b124465893caf063ba29758f97af57e61da8f" url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "3.0.1" win32: dependency: transitive description: name: win32 - sha256: "464f5674532865248444b4c3daca12bd9bf2d7c47f759ce2617986e7229494a8" + sha256: "68d1e89a91ed61ad9c370f9f8b6effed9ae5e0ede22a270bdfa6daf79fc2290a" url: "https://pub.dev" source: hosted - version: "5.2.0" + version: "5.5.4" xdg_directories: dependency: transitive description: @@ -1093,5 +1338,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.2.3 <3.9.0" - flutter: ">=3.16.0" + dart: ">=3.4.0 <3.9.0" + flutter: ">=3.22.0" diff --git a/packages/digit_scanner/example/pubspec.yaml b/packages/digit_scanner/example/pubspec.yaml index 4cecc309b..da03c7944 100644 --- a/packages/digit_scanner/example/pubspec.yaml +++ b/packages/digit_scanner/example/pubspec.yaml @@ -19,7 +19,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: - sdk: '>=3.2.3 <4.0.0' + sdk: '>=3.2.0 <4.0.0' # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions @@ -37,7 +37,8 @@ dependencies: cupertino_icons: ^1.0.2 flutter_bloc: ^8.1.1 digit_scanner: - path: ../ + path: ../../digit_scanner + digit_ui_components: ^0.0.2-dev.4 dev_dependencies: flutter_test: @@ -48,7 +49,7 @@ dev_dependencies: # activated in the `analysis_options.yaml` file located at the root of your # package. See that file for information about deactivating specific lint # rules and activating additional ones. - flutter_lints: ^2.0.0 + flutter_lints: ^4.0.0 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec diff --git a/packages/digit_scanner/lib/pages/qr_scanner.dart b/packages/digit_scanner/lib/pages/qr_scanner.dart index c4e4b037e..a248139df 100644 --- a/packages/digit_scanner/lib/pages/qr_scanner.dart +++ b/packages/digit_scanner/lib/pages/qr_scanner.dart @@ -3,10 +3,12 @@ import 'dart:io'; import 'package:audioplayers/audioplayers.dart'; import 'package:auto_route/auto_route.dart'; import 'package:camera/camera.dart'; -import 'package:digit_components/digit_components.dart'; -import 'package:digit_components/widgets/atoms/digit_toaster.dart'; import 'package:digit_scanner/utils/scanner_utils.dart'; import 'package:digit_scanner/widgets/localized.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/atoms/input_wrapper.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:google_mlkit_barcode_scanning/google_mlkit_barcode_scanning.dart'; @@ -96,8 +98,8 @@ class _DigitScannerPageState extends LocalizedState { ), ), Positioned( - top: kPadding * 1.5, - left: kPadding, + top: spacer1 * 1.5, + left: spacer1, child: SizedBox( child: InkWell( onTap: () async { @@ -165,7 +167,7 @@ class _DigitScannerPageState extends LocalizedState { mainAxisAlignment: MainAxisAlignment.center, children: [ Padding( - padding: const EdgeInsets.only(top: kPadding), + padding: const EdgeInsets.only(top: spacer1), child: Text( localizations.translate( i18.scanner.manualScan, @@ -190,7 +192,7 @@ class _DigitScannerPageState extends LocalizedState { }, child: Padding( padding: - const EdgeInsets.only(top: kPadding), + const EdgeInsets.only(top: spacer1), child: Text( localizations.translate( i18.scanner.enterManualCode, @@ -212,37 +214,43 @@ class _DigitScannerPageState extends LocalizedState { bottom: 0, width: MediaQuery.of(context).size.width, child: DigitCard( - margin: const EdgeInsets.only(top: kPadding), + margin: const EdgeInsets.only(top: spacer1), padding: const EdgeInsets.fromLTRB( - kPadding, 0, kPadding, 0), - child: DigitElevatedButton( - child: Text(localizations - .translate(i18.common.coreCommonSubmit)), - onPressed: () async { - if (widget.isGS1code && - result.length < widget.quantity) { - DigitScannerUtils().buildDialog( - context, - localizations, - widget.quantity, - ); - } else { - final bloc = context.read(); - bloc.add(DigitScannerEvent.handleScanner( - barCode: state.barCodes, - qrCode: state.qrCodes, - )); - Navigator.of( - context, - ).pop(); - } - }, - ), + spacer3, spacer1, spacer3, spacer1), + children: [ + DigitButton( + label: localizations + .translate(i18.common.coreCommonSubmit), + size: DigitButtonSize.large, + mainAxisSize: MainAxisSize.max, + type: DigitButtonType.primary, + onPressed: () async { + if (widget.isGS1code && + result.length < widget.quantity) { + DigitScannerUtils().buildDialog( + context, + localizations, + widget.quantity, + ); + } else { + final bloc = + context.read(); + bloc.add(DigitScannerEvent.handleScanner( + barCode: state.barCodes, + qrCode: state.qrCodes, + )); + Navigator.of( + context, + ).pop(); + } + }, + ), + ], ), ), Positioned( - bottom: (kPadding * 7.5), + bottom: (spacer1 * 10), height: widget.isGS1code ? state.barCodes.length < 3 ? (state.barCodes.length * 60) + 80 @@ -257,8 +265,8 @@ class _DigitScannerPageState extends LocalizedState { decoration: BoxDecoration( color: theme.colorScheme.onError, borderRadius: const BorderRadius.only( - topLeft: Radius.circular(kPadding + 4), - topRight: Radius.circular(kPadding + 4), + topLeft: Radius.circular(spacer1 + 4), + topRight: Radius.circular(spacer1 + 4), ), ), child: Column( @@ -269,14 +277,14 @@ class _DigitScannerPageState extends LocalizedState { decoration: BoxDecoration( color: theme.colorScheme.onError, borderRadius: const BorderRadius.only( - topLeft: Radius.circular(kPadding * 2), - topRight: Radius.circular(kPadding * 2), + topLeft: Radius.circular(spacer2), + topRight: Radius.circular(spacer2), ), ), padding: const EdgeInsets.only( - bottom: kPadding * 2, - top: kPadding * 2, - left: kPadding * 3, + bottom: spacer2, + top: spacer2, + left: spacer3, ), width: MediaQuery.of(context).size.width, child: widget.isGS1code @@ -300,13 +308,13 @@ class _DigitScannerPageState extends LocalizedState { shape: const Border(), title: Container( margin: const EdgeInsets.only( - left: kPadding, - right: kPadding, + left: spacer1, + right: spacer1, ), - height: kPadding * 6, + height: spacer9, decoration: BoxDecoration( - color: DigitTheme.instance - .colorScheme.background, + color: DigitTheme + .instance.colorScheme.surface, border: Border.all( color: DigitTheme .instance.colorScheme.outline, @@ -318,7 +326,7 @@ class _DigitScannerPageState extends LocalizedState { ), ), padding: - const EdgeInsets.all(kPadding), + const EdgeInsets.all(spacer2), child: Row( crossAxisAlignment: CrossAxisAlignment.end, @@ -345,6 +353,9 @@ class _DigitScannerPageState extends LocalizedState { ), ), IconButton( + padding: const EdgeInsets.only( + bottom: spacer2, + ), icon: Icon( Icons.delete, color: @@ -407,22 +418,30 @@ class _DigitScannerPageState extends LocalizedState { return ReactiveFormBuilder( form: () => buildForm(), builder: (context, form, child) { - return DigitCard( - child: ScrollableContent( - backgroundColor: theme.colorScheme.onError, - header: GestureDetector( - onTap: () { - setState(() { - manualCode = false; - initializeCameras(); - }); - }, - child: const Align( - alignment: Alignment.topRight, - child: Icon(Icons.close), + return ScrollableContent( + backgroundColor: theme.colorScheme.onError, + header: GestureDetector( + onTap: () { + setState(() { + manualCode = false; + initializeCameras(); + }); + }, + child: Align( + alignment: Alignment.topRight, + child: Icon( + Icons.close, + color: Theme.of(context) + .colorTheme + .text + .primary, ), ), - footer: DigitElevatedButton( + ), + footer: Padding( + padding: const EdgeInsets.all(spacer4), + child: DigitButton( + mainAxisSize: MainAxisSize.max, onPressed: () async { if (form .control(_manualCodeFormKey) @@ -434,13 +453,12 @@ class _DigitScannerPageState extends LocalizedState { .toString() .trim() .isEmpty) { - DigitToast.show(context, - options: DigitToastOptions( - localizations.translate( - i18.scanner.enterManualCode), - true, - theme, - )); + Toast.showToast( + context, + type: ToastType.error, + message: localizations.translate( + i18.scanner.enterManualCode), + ); } else { final bloc = context.read(); @@ -468,11 +486,15 @@ class _DigitScannerPageState extends LocalizedState { }); } }, - child: Text(localizations.translate( + type: DigitButtonType.primary, + size: DigitButtonSize.large, + label: localizations.translate( i18.common.coreCommonSubmit, - )), + ), ), - children: [ + ), + children: [ + DigitCard(children: [ Align( alignment: Alignment.topLeft, child: Text( @@ -483,16 +505,25 @@ class _DigitScannerPageState extends LocalizedState { ), ), const SizedBox( - height: kPadding * 2, + height: spacer2, ), - DigitTextFormField( + ReactiveWrapperField( formControlName: _manualCodeFormKey, - label: localizations.translate( - i18.scanner.resourceCode, - ), + builder: (field) { + return InputField( + label: localizations.translate( + i18.scanner.resourceCode, + ), + type: InputType.text, + onChange: (value) { + form + .control(_manualCodeFormKey) + .value = value; + }); + }, ), - ], - ), + ]) + ], ); }); }) diff --git a/packages/digit_scanner/lib/router/digit_scanner_router.dart b/packages/digit_scanner/lib/router/digit_scanner_router.dart index e6fbc4f00..fe16085e0 100644 --- a/packages/digit_scanner/lib/router/digit_scanner_router.dart +++ b/packages/digit_scanner/lib/router/digit_scanner_router.dart @@ -4,10 +4,8 @@ import 'digit_scanner_router.gm.dart'; @AutoRouterConfig.module() class DigitScannerPackageRoute extends $DigitScannerPackageRoute { - @override RouteType get defaultRouteType => const RouteType.material(); - @override List routes = [ AutoRoute( page: DigitScannerRoute.page, diff --git a/packages/digit_scanner/lib/utils/scanner_utils.dart b/packages/digit_scanner/lib/utils/scanner_utils.dart index e78bc7f52..a9cd4748f 100644 --- a/packages/digit_scanner/lib/utils/scanner_utils.dart +++ b/packages/digit_scanner/lib/utils/scanner_utils.dart @@ -1,9 +1,10 @@ import 'package:audioplayers/audioplayers.dart'; import 'package:camera/camera.dart'; -import 'package:digit_components/digit_components.dart'; -import 'package:digit_components/widgets/atoms/digit_toaster.dart'; import 'package:digit_scanner/blocs/app_localization.dart'; import 'package:digit_scanner/utils/extensions/extensions.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/widgets/atoms/pop_up_card.dart'; +import 'package:digit_ui_components/widgets/molecules/show_pop_up.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:google_mlkit_barcode_scanning/google_mlkit_barcode_scanning.dart'; @@ -25,39 +26,49 @@ class DigitScannerUtils { i18.scanner.scannerDialogContent, ) .replaceAll('{quantity}', quantity.toString()); - await DigitDialog.show( - context, - options: DigitDialogOptions( - titleText: localizations.translate( + await showCustomPopup( + context: context, + builder: (popupContext) => Popup( + title: localizations.translate( i18.scanner.scannerDialogTitle, ), - contentText: contentLocalization, - primaryAction: DigitDialogActions( - label: localizations.translate( - i18.scanner.scannerDialogPrimaryAction, + onOutsideTap: () { + Navigator.of(popupContext).pop(); + }, + description:contentLocalization, + type: PopUpType.simple, + actions: [ + DigitButton( + label: localizations.translate( + i18.scanner.scannerDialogPrimaryAction, + ), + onPressed: () { + Navigator.of( + popupContext, + rootNavigator: true, + ).pop(false); + }, + type: DigitButtonType.primary, + size: DigitButtonSize.large, ), - action: (ctx) { - Navigator.of( - context, - rootNavigator: true, - ).pop(false); - }, - ), - secondaryAction: DigitDialogActions( - label: localizations.translate( - i18.scanner.scannerDialogSecondaryAction, + DigitButton( + label: localizations.translate( + i18.scanner.scannerDialogSecondaryAction, + ), + onPressed: () { + Navigator.of( + context, + rootNavigator: true, + ).pop(true); + + Navigator.of( + context, + ).pop(); + }, + type: DigitButtonType.secondary, + size: DigitButtonSize.large, ), - action: (ctx) { - Navigator.of( - context, - rootNavigator: true, - ).pop(true); - - Navigator.of( - context, - ).pop(); - }, - ), + ], ), ); } @@ -96,7 +107,14 @@ class DigitScannerUtils { setText(''); // Process the image to detect barcodes - final barcodes = await barcodeScanner.processImage(inputImage); + final List barcodes; + + try { + barcodes = await barcodeScanner.processImage(inputImage); + } catch (e) { + debugPrint('Error processing image: $e'); + return; + } // Check if the input image has valid metadata for size and rotation if (inputImage.metadata?.size != null && @@ -189,13 +207,10 @@ class DigitScannerUtils { // Check if the player has completed playing or if the result list is empty if (player.state == PlayerState.completed || result.isEmpty) { // Display a toast message with the provided error message - DigitToast.show( + Toast.showToast( context, - options: DigitToastOptions( - localizations.translate(message), // Translate the message - true, // Show as an error - DigitTheme.instance.mobileTheme, // Use the current theme - ), + type: ToastType.error, + message: localizations.translate(message), ); } diff --git a/packages/digit_scanner/lib/widgets/vision_detector_views/camera_view.dart b/packages/digit_scanner/lib/widgets/vision_detector_views/camera_view.dart index 669930959..a2d06f18f 100644 --- a/packages/digit_scanner/lib/widgets/vision_detector_views/camera_view.dart +++ b/packages/digit_scanner/lib/widgets/vision_detector_views/camera_view.dart @@ -1,17 +1,19 @@ import 'dart:io'; import 'package:camera/camera.dart'; -import 'package:digit_components/digit_components.dart'; import 'package:digit_scanner/blocs/app_localization.dart'; import 'package:digit_scanner/utils/i18_key_constants.dart' as i18; import 'package:digit_scanner/widgets/localized.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:google_mlkit_commons/google_mlkit_commons.dart'; class CameraView extends LocalizedStatefulWidget { const CameraView({ - Key? key, + super.key, required this.customPaint, required this.onImage, this.onCameraFeedReady, @@ -20,7 +22,7 @@ class CameraView extends LocalizedStatefulWidget { this.initialCameraLensDirection = CameraLensDirection.back, required this.cameraController, required this.cameras, - }) : super(key: key); + }); final CustomPaint? customPaint; final Function(InputImage inputImage) onImage; @@ -44,7 +46,6 @@ class _CameraViewState extends State { double _maxAvailableZoom = 1.0; double _minAvailableExposureOffset = 0.0; double _maxAvailableExposureOffset = 0.0; - double _currentExposureOffset = 0.0; bool _changingCameraLens = false; @override @@ -75,13 +76,14 @@ class _CameraViewState extends State { } Widget _liveFeedBody(BuildContext context) { + final theme = Theme.of(context); final localizations = ScannerLocalization.of(context); if (_cameras.isEmpty) return Container(); if (_controller == null) return Container(); if (_controller?.value.isInitialized == false) return Container(); return Container( - color: DigitTheme.instance.colorScheme.onSurface, + color: theme.colorTheme.generic.background, child: Stack( fit: StackFit.expand, children: [ @@ -116,10 +118,11 @@ class _CameraViewState extends State { child: FloatingActionButton( heroTag: Object(), onPressed: () => Navigator.of(context).pop(), - backgroundColor: DigitTheme.instance.colorScheme.onSurface, - child: const Icon( + backgroundColor: Theme.of(context).colorTheme.generic.background, + child: Icon( Icons.arrow_back_ios_outlined, size: 20, + color: Theme.of(context).colorTheme.text.primary, ), ), ), @@ -181,7 +184,7 @@ class _CameraViewState extends State { min: _minAvailableZoom, max: _maxAvailableZoom, activeColor: DigitTheme.instance.colorScheme.onPrimary, - inactiveColor: const DigitColors().seaShellGray, + inactiveColor: const DigitColors().light.genericBackground, onChanged: (value) async { setState(() { _currentZoomLevel = value; @@ -201,7 +204,7 @@ class _CameraViewState extends State { child: Center( child: Text( '${_currentZoomLevel.toStringAsFixed(1)}x', - style: TextStyle(color: const DigitColors().white), + style: TextStyle(color: const DigitColors().light.paperPrimary), ), ), ), @@ -227,7 +230,7 @@ class _CameraViewState extends State { padding: const EdgeInsets.all(3.0), decoration: BoxDecoration( border: Border.all( - width: kPadding / 2, + width: spacer1, color: DigitTheme.instance.colorScheme.error, ), ), @@ -253,12 +256,17 @@ class _CameraViewState extends State { _controller?.getMaxZoomLevel().then((value) { _maxAvailableZoom = value; }); - _currentExposureOffset = 0.0; _controller?.getMinExposureOffset().then((value) { _minAvailableExposureOffset = value; + if (kDebugMode) { + print('minAvailableExposureOffset: $_minAvailableExposureOffset'); + } }); _controller?.getMaxExposureOffset().then((value) { _maxAvailableExposureOffset = value; + if (kDebugMode) { + print('maxAvailableExposureOffset: $_maxAvailableExposureOffset'); + } }); _controller?.startImageStream(_processCameraImage).then((value) { if (widget.onCameraFeedReady != null) { @@ -339,16 +347,28 @@ class _CameraViewState extends State { // * nv21 for Android // * bgra8888 for iOS if (format == null || - (Platform.isAndroid && format != InputImageFormat.nv21) || - (Platform.isIOS && format != InputImageFormat.bgra8888)) return null; + (Platform.isAndroid && + !(format == InputImageFormat.nv21 || + format == InputImageFormat.yv12 || + format == InputImageFormat.yuv_420_888)) || + (Platform.isIOS && + !(format == InputImageFormat.bgra8888 || + format == InputImageFormat.yuv420))) { + return null; + } // since format is constraint to nv21 or bgra8888, both only have one plane - if (image.planes.length != 1) return null; + if (image.planes.isEmpty) return null; final plane = image.planes.first; + final WriteBuffer allBytes = WriteBuffer(); + for (Plane plane in image.planes) { + allBytes.putUint8List(plane.bytes); + } + final bytes = allBytes.done().buffer.asUint8List(); // compose InputImage using bytes return InputImage.fromBytes( - bytes: plane.bytes, + bytes: bytes, metadata: InputImageMetadata( size: Size(image.width.toDouble(), image.height.toDouble()), rotation: rotation, // used only in Android diff --git a/packages/digit_scanner/lib/widgets/vision_detector_views/detector_view.dart b/packages/digit_scanner/lib/widgets/vision_detector_views/detector_view.dart index bb2ba9b14..6eb654aa2 100644 --- a/packages/digit_scanner/lib/widgets/vision_detector_views/detector_view.dart +++ b/packages/digit_scanner/lib/widgets/vision_detector_views/detector_view.dart @@ -9,7 +9,7 @@ enum DetectorViewMode { liveFeed, gallery } class DetectorView extends StatefulWidget { const DetectorView({ - Key? key, + super.key, required this.title, required this.onImage, this.customPaint, @@ -21,7 +21,7 @@ class DetectorView extends StatefulWidget { this.onCameraLensDirectionChanged, required this.cameraController, required this.cameras, - }) : super(key: key); + }); final String title; final CustomPaint? customPaint; diff --git a/packages/digit_scanner/pubspec.lock b/packages/digit_scanner/pubspec.lock index db34b99ff..340757dba 100644 --- a/packages/digit_scanner/pubspec.lock +++ b/packages/digit_scanner/pubspec.lock @@ -5,26 +5,26 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: eb376e9acf6938204f90eb3b1f00b578640d3188b4c8a8ec054f9f479af8d051 + sha256: "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7" url: "https://pub.dev" source: hosted - version: "64.0.0" + version: "67.0.0" analyzer: dependency: transitive description: name: analyzer - sha256: "69f54f967773f6c26c7dcb13e93d7ccee8b17a641689da39e878d5cf13b06893" + sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d" url: "https://pub.dev" source: hosted - version: "6.2.0" + version: "6.4.1" archive: dependency: transitive description: name: archive - sha256: "6bd38d335f0954f5fad9c79e614604fbf03a0e5b975923dd001b6ea965ef5b4b" + sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d url: "https://pub.dev" source: hosted - version: "3.6.0" + version: "3.6.1" args: dependency: transitive description: @@ -101,18 +101,18 @@ packages: dependency: "direct main" description: name: auto_route - sha256: eb33554581a0a4aa7e6da0f13a44291a55bf71359012f1d9feb41634ff908ff8 + sha256: "8de4a280ce7861ef24a6baa14c2b02b77a8c31b4a4c4f12d7b608678cc657c7f" url: "https://pub.dev" source: hosted - version: "7.9.2" + version: "8.1.4" auto_route_generator: dependency: "direct dev" description: name: auto_route_generator - sha256: "11067a3bcd643812518fe26c0c9ec073990286cabfd9d74b6da9ef9b913c4d22" + sha256: ba28133d3a3bf0a66772bcc98dade5843753cd9f1a8fb4802b842895515b67d3 url: "https://pub.dev" source: hosted - version: "7.3.2" + version: "8.0.0" bloc: dependency: transitive description: @@ -157,10 +157,10 @@ packages: dependency: transitive description: name: build_daemon - sha256: "0343061a33da9c5810b2d6cee51945127d8f4c060b7fbdd9d54917f0a3feaaa1" + sha256: "79b2aef6ac2ed00046867ed354c88778c9c0f029df8a20fe10b5436826721ef9" url: "https://pub.dev" source: hosted - version: "4.0.1" + version: "4.0.2" build_resolvers: dependency: transitive description: @@ -173,18 +173,18 @@ packages: dependency: "direct dev" description: name: build_runner - sha256: "3ac61a79bfb6f6cc11f693591063a7f19a7af628dc52f141743edac5c16e8c22" + sha256: "644dc98a0f179b872f612d3eb627924b578897c629788e858157fa5e704ca0c7" url: "https://pub.dev" source: hosted - version: "2.4.9" + version: "2.4.11" build_runner_core: dependency: transitive description: name: build_runner_core - sha256: "4ae8ffe5ac758da294ecf1802f2aff01558d8b1b00616aa7538ea9a8a5d50799" + sha256: e3c79f69a64bdfcd8a776a3c28db4eb6e3fb5356d013ae5eb2e52007706d5dbe url: "https://pub.dev" source: hosted - version: "7.3.0" + version: "7.3.1" built_collection: dependency: transitive description: @@ -205,42 +205,42 @@ packages: dependency: "direct main" description: name: camera - sha256: "9499cbc2e51d8eb0beadc158b288380037618ce4e30c9acbc4fae1ac3ecb5797" + sha256: "26ff41045772153f222ffffecba711a206f670f5834d40ebf5eed3811692f167" url: "https://pub.dev" source: hosted - version: "0.10.5+9" - camera_android: + version: "0.11.0+2" + camera_android_camerax: dependency: transitive description: - name: camera_android - sha256: b350ac087f111467e705b2b76cc1322f7f5bdc122aa83b4b243b0872f390d229 + name: camera_android_camerax + sha256: "011be2ab0e5b3e3aa8094413fa890f8c5c5afd7cfdaef353a992047d4dab5780" url: "https://pub.dev" source: hosted - version: "0.10.9+2" + version: "0.6.8+2" camera_avfoundation: dependency: transitive description: name: camera_avfoundation - sha256: "608b56b0880722f703871329c4d7d4c2f379c8e2936940851df7fc041abc6f51" + sha256: "7c28969a975a7eb2349bc2cb2dfe3ad218a33dba9968ecfb181ce08c87486655" url: "https://pub.dev" source: hosted - version: "0.9.13+10" + version: "0.9.17+3" camera_platform_interface: dependency: transitive description: name: camera_platform_interface - sha256: a250314a48ea337b35909a4c9d5416a208d736dcb01d0b02c6af122be66660b0 + sha256: b3ede1f171532e0d83111fe0980b46d17f1aa9788a07a2fbed07366bbdbb9061 url: "https://pub.dev" source: hosted - version: "2.7.4" + version: "2.8.0" camera_web: dependency: transitive description: name: camera_web - sha256: "9e9aba2fbab77ce2472924196ff8ac4dd8f9126c4f9a3096171cd1d870d6b26c" + sha256: b9235ec0a2ce949daec546f1f3d86f05c3921ed31c7d9ab6b7c03214d152fc2d url: "https://pub.dev" source: hosted - version: "0.3.3" + version: "0.3.4" characters: dependency: transitive description: @@ -249,6 +249,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.0" + charcode: + dependency: transitive + description: + name: charcode + sha256: fb0f1107cac15a5ea6ef0a6ef71a807b9e4267c713bb93e00e92d737cc8dbd8a + url: "https://pub.dev" + source: hosted + version: "1.4.0" checked_yaml: dependency: transitive description: @@ -293,26 +301,34 @@ packages: dependency: transitive description: name: coverage - sha256: "3945034e86ea203af7a056d98e98e42a5518fff200d6e8e6647e1886b07e936e" + sha256: c1fb2dce3c0085f39dc72668e85f8e0210ec7de05345821ff58530567df345a5 url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.9.2" cross_file: dependency: transitive description: name: cross_file - sha256: fedaadfa3a6996f75211d835aaeb8fede285dae94262485698afd832371b9a5e + sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670" url: "https://pub.dev" source: hosted - version: "0.3.3+8" + version: "0.3.4+2" crypto: dependency: transitive description: name: crypto - sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + sha256: ec30d999af904f33454ba22ed9a86162b35e52b44ac4807d1d93c288041d7d27 url: "https://pub.dev" source: hosted - version: "3.0.3" + version: "3.0.5" + csslib: + dependency: transitive + description: + name: csslib + sha256: "09bad715f418841f976c77db72d5398dc1253c21fb9c0c7f0b0b985860b2d58e" + url: "https://pub.dev" + source: hosted + version: "1.0.2" cupertino_icons: dependency: "direct main" description: @@ -337,22 +353,22 @@ packages: url: "https://pub.dev" source: hosted version: "0.4.1" - digit_components: + digit_ui_components: dependency: "direct main" description: - name: digit_components - sha256: "07b585e5d8010639366da72a4a8b215ce9b8790c75b2162b66af3cea57ca35d9" + name: digit_ui_components + sha256: "57c4da5237be6025783e7357a02b6b492f02e38f711d674bf46f5f8c8a93ad76" url: "https://pub.dev" source: hosted - version: "1.0.2+1" - easy_stepper: + version: "0.0.2-dev.4" + dotted_border: dependency: transitive description: - name: easy_stepper - sha256: "77f3ab4ee3c867b5a2236bf712abb08fed2b1c533cf24cf3fcd46c2821072ffd" + name: dotted_border + sha256: "108837e11848ca776c53b30bc870086f84b62ed6e01c503ed976e8f8c7df9c04" url: "https://pub.dev" source: hosted - version: "0.5.2+1" + version: "2.1.0" fake_async: dependency: transitive description: @@ -365,10 +381,10 @@ packages: dependency: transitive description: name: ffi - sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" + sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.3" file: dependency: transitive description: @@ -377,99 +393,112 @@ packages: url: "https://pub.dev" source: hosted version: "7.0.0" - fixnum: + file_picker: dependency: transitive description: - name: fixnum - sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + name: file_picker + sha256: "16dc141db5a2ccc6520ebb6a2eb5945b1b09e95085c021d9f914f8ded7f1465c" url: "https://pub.dev" source: hosted - version: "1.1.0" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_bloc: - dependency: "direct main" + version: "8.1.4" + file_selector_linux: + dependency: transitive description: - name: flutter_bloc - sha256: f0ecf6e6eb955193ca60af2d5ca39565a86b8a142452c5b24d96fb477428f4d2 + name: file_selector_linux + sha256: "54cbbd957e1156d29548c7d9b9ec0c0ebb6de0a90452198683a7d23aed617a33" url: "https://pub.dev" source: hosted - version: "8.1.5" - flutter_focus_watcher: + version: "0.9.3+2" + file_selector_macos: dependency: transitive description: - name: flutter_focus_watcher - sha256: a72ee539ae0237961308a25839887ca93a0b1cb6f87b0d492b139c8fccff8e79 + name: file_selector_macos + sha256: "271ab9986df0c135d45c3cdb6bd0faa5db6f4976d3e4b437cf7d0f258d941bfc" url: "https://pub.dev" source: hosted - version: "2.0.0" - flutter_keyboard_visibility: + version: "0.9.4+2" + file_selector_platform_interface: dependency: transitive description: - name: flutter_keyboard_visibility - sha256: "4983655c26ab5b959252ee204c2fffa4afeb4413cd030455194ec0caa3b8e7cb" + name: file_selector_platform_interface + sha256: a3994c26f10378a039faa11de174d7b78eb8f79e4dd0af2a451410c1a5c3f66b url: "https://pub.dev" source: hosted - version: "5.4.1" - flutter_keyboard_visibility_linux: + version: "2.6.2" + file_selector_windows: dependency: transitive description: - name: flutter_keyboard_visibility_linux - sha256: "6fba7cd9bb033b6ddd8c2beb4c99ad02d728f1e6e6d9b9446667398b2ac39f08" + name: file_selector_windows + sha256: "8f5d2f6590d51ecd9179ba39c64f722edc15226cc93dcc8698466ad36a4a85a4" url: "https://pub.dev" source: hosted - version: "1.0.0" - flutter_keyboard_visibility_macos: + version: "0.9.3+3" + fixnum: dependency: transitive description: - name: flutter_keyboard_visibility_macos - sha256: c5c49b16fff453dfdafdc16f26bdd8fb8d55812a1d50b0ce25fc8d9f2e53d086 + name: fixnum + sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" url: "https://pub.dev" source: hosted - version: "1.0.0" - flutter_keyboard_visibility_platform_interface: + version: "1.1.0" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_bloc: + dependency: "direct main" + description: + name: flutter_bloc + sha256: b594505eac31a0518bdcb4b5b79573b8d9117b193cc80cc12e17d639b10aa27a + url: "https://pub.dev" + source: hosted + version: "8.1.6" + flutter_dropzone: dependency: transitive description: - name: flutter_keyboard_visibility_platform_interface - sha256: e43a89845873f7be10cb3884345ceb9aebf00a659f479d1c8f4293fcb37022a4 + name: flutter_dropzone + sha256: b399c60411f9bf9c4c2f97933c6a3a185859e75aade8897831e76cee4346c8e1 url: "https://pub.dev" source: hosted - version: "2.0.0" - flutter_keyboard_visibility_web: + version: "3.0.7" + flutter_dropzone_platform_interface: dependency: transitive description: - name: flutter_keyboard_visibility_web - sha256: d3771a2e752880c79203f8d80658401d0c998e4183edca05a149f5098ce6e3d1 + name: flutter_dropzone_platform_interface + sha256: "96d2c51c86063ba150551c3b40fd26c5a18785bee071c0c751502d28a545df3b" url: "https://pub.dev" source: hosted - version: "2.0.0" - flutter_keyboard_visibility_windows: + version: "2.2.0" + flutter_dropzone_web: dependency: transitive description: - name: flutter_keyboard_visibility_windows - sha256: fc4b0f0b6be9b93ae527f3d527fb56ee2d918cd88bbca438c478af7bcfd0ef73 + name: flutter_dropzone_web + sha256: c5a0fdb63b7216352a01761ec1b6eba1982e49541e60675735e2d3d95e207b19 url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "3.0.13" flutter_lints: dependency: "direct dev" description: name: flutter_lints - sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04 + sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c" url: "https://pub.dev" source: hosted - version: "2.0.3" + version: "4.0.0" + flutter_localizations: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" flutter_plugin_android_lifecycle: dependency: transitive description: name: flutter_plugin_android_lifecycle - sha256: "8cf40eebf5dec866a6d1956ad7b4f7016e6c0cc69847ab946833b7d43743809f" + sha256: "9ee02950848f61c4129af3d6ec84a1cfc0e47931abc746b03e7a3bc3e8ff6eda" url: "https://pub.dev" source: hosted - version: "2.0.19" + version: "2.0.22" flutter_spinkit: dependency: transitive description: @@ -478,6 +507,14 @@ packages: url: "https://pub.dev" source: hosted version: "5.2.1" + flutter_styled_toast: + dependency: transitive + description: + name: flutter_styled_toast + sha256: e667f13a665820eb0fa8506547e47eacbcddf1948d6d3036cfd3b089bd4b0516 + url: "https://pub.dev" + source: hosted + version: "2.2.1" flutter_svg: dependency: "direct main" description: @@ -491,14 +528,6 @@ packages: description: flutter source: sdk version: "0.0.0" - flutter_typeahead: - dependency: transitive - description: - name: flutter_typeahead - sha256: b9942bd5b7611a6ec3f0730c477146cffa4cd4b051077983ba67ddfc9e7ee818 - url: "https://pub.dev" - source: hosted - version: "4.8.0" flutter_web_plugins: dependency: transitive description: flutter @@ -508,10 +537,10 @@ packages: dependency: transitive description: name: fluttertoast - sha256: "81b68579e23fcbcada2db3d50302813d2371664afe6165bc78148050ab94bf66" + sha256: "95f349437aeebe524ef7d6c9bde3e6b4772717cf46a0eb6a3ceaddc740b297cc" url: "https://pub.dev" source: hosted - version: "8.2.5" + version: "8.2.8" freezed: dependency: "direct dev" description: @@ -524,18 +553,66 @@ packages: dependency: "direct main" description: name: freezed_annotation - sha256: c3fd9336eb55a38cc1bbd79ab17573113a8deccd0ecbbf926cca3c62803b5c2d + sha256: c2e2d632dd9b8a2b7751117abcfc2b4888ecfe181bd9fca7170d9ef02e595fe2 url: "https://pub.dev" source: hosted - version: "2.4.1" + version: "2.4.4" frontend_server_client: dependency: transitive description: name: frontend_server_client - sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" + sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 + url: "https://pub.dev" + source: hosted + version: "4.0.0" + geolocator: + dependency: transitive + description: + name: geolocator + sha256: f4efb8d3c4cdcad2e226af9661eb1a0dd38c71a9494b22526f9da80ab79520e5 + url: "https://pub.dev" + source: hosted + version: "10.1.1" + geolocator_android: + dependency: transitive + description: + name: geolocator_android + sha256: "7aefc530db47d90d0580b552df3242440a10fe60814496a979aa67aa98b1fd47" + url: "https://pub.dev" + source: hosted + version: "4.6.1" + geolocator_apple: + dependency: transitive + description: + name: geolocator_apple + sha256: "6154ea2682563f69fc0125762ed7e91e7ed85d0b9776595653be33918e064807" + url: "https://pub.dev" + source: hosted + version: "2.3.8+1" + geolocator_platform_interface: + dependency: transitive + description: + name: geolocator_platform_interface + sha256: "386ce3d9cce47838355000070b1d0b13efb5bc430f8ecda7e9238c8409ace012" + url: "https://pub.dev" + source: hosted + version: "4.2.4" + geolocator_web: + dependency: transitive + description: + name: geolocator_web + sha256: "102e7da05b48ca6bf0a5bda0010f886b171d1a08059f01bfe02addd0175ebece" + url: "https://pub.dev" + source: hosted + version: "2.2.1" + geolocator_windows: + dependency: transitive + description: + name: geolocator_windows + sha256: "53da08937d07c24b0d9952eb57a3b474e29aae2abf9dd717f7e1230995f13f0e" url: "https://pub.dev" source: hosted - version: "3.2.0" + version: "0.2.3" glob: dependency: transitive description: @@ -548,42 +625,42 @@ packages: dependency: transitive description: name: google_fonts - sha256: "2776c66b3e97c6cdd58d1bd3281548b074b64f1fd5c8f82391f7456e38849567" + sha256: b1ac0fe2832c9cc95e5e88b57d627c5e68c223b9657f4b96e1487aa9098c7b82 url: "https://pub.dev" source: hosted - version: "4.0.5" + version: "6.2.1" google_mlkit_barcode_scanning: dependency: "direct main" description: name: google_mlkit_barcode_scanning - sha256: "965183a8cd5cef8477ceea5dbdf29c34a739cf0cfbf1bdad54cd3f9f1807afe5" + sha256: f1a2a39cf1730b9a5e2784a07efa1ca5bfdfdde6aa00b193b3f8cd1953c638ec url: "https://pub.dev" source: hosted - version: "0.10.0" + version: "0.12.0" google_mlkit_commons: dependency: "direct main" description: name: google_mlkit_commons - sha256: "046586b381cdd139f7f6a05ad6998f7e339d061bd70158249907358394b5f496" + sha256: "27d626c66a181351a953eba5b6ff1ff123aadb891b4dab085b292118f039d6ac" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.1" graphs: dependency: transitive description: name: graphs - sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19 + sha256: "741bbf84165310a68ff28fe9e727332eef1407342fca52759cb21ad8177bb8d0" url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.3.2" gs1_barcode_parser: dependency: "direct main" description: name: gs1_barcode_parser - sha256: "9aaff47bdab7177deaf9248cc861ef41cf611d3f828498cb40b64bedcbf53391" + sha256: ff171bc40038de3f7178fbc32eaf9eebc3d35a3c4c00bb0281fe4a976d853a42 url: "https://pub.dev" source: hosted - version: "1.0.5" + version: "1.1.0" horizontal_data_table: dependency: transitive description: @@ -592,14 +669,22 @@ packages: url: "https://pub.dev" source: hosted version: "4.3.1" + html: + dependency: transitive + description: + name: html + sha256: "1fc58edeaec4307368c60d59b7e15b9d658b57d7f3125098b6294153c75337ec" + url: "https://pub.dev" + source: hosted + version: "0.15.5" http: dependency: transitive description: name: http - sha256: a2bbf9d017fcced29139daa8ed2bba4ece450ab222871df93ca9eec6f80c34ba + sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.2" http_multi_server: dependency: transitive description: @@ -616,14 +701,78 @@ packages: url: "https://pub.dev" source: hosted version: "4.0.2" + image_picker: + dependency: transitive + description: + name: image_picker + sha256: "021834d9c0c3de46bf0fe40341fa07168407f694d9b2bb18d532dc1261867f7a" + url: "https://pub.dev" + source: hosted + version: "1.1.2" + image_picker_android: + dependency: transitive + description: + name: image_picker_android + sha256: "8c5abf0dcc24fe6e8e0b4a5c0b51a5cf30cefdf6407a3213dae61edc75a70f56" + url: "https://pub.dev" + source: hosted + version: "0.8.12+12" + image_picker_for_web: + dependency: transitive + description: + name: image_picker_for_web + sha256: "717eb042ab08c40767684327be06a5d8dbb341fe791d514e4b92c7bbe1b7bb83" + url: "https://pub.dev" + source: hosted + version: "3.0.6" + image_picker_ios: + dependency: transitive + description: + name: image_picker_ios + sha256: "4f0568120c6fcc0aaa04511cb9f9f4d29fc3d0139884b1d06be88dcec7641d6b" + url: "https://pub.dev" + source: hosted + version: "0.8.12+1" + image_picker_linux: + dependency: transitive + description: + name: image_picker_linux + sha256: "4ed1d9bb36f7cd60aa6e6cd479779cc56a4cb4e4de8f49d487b1aaad831300fa" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + image_picker_macos: + dependency: transitive + description: + name: image_picker_macos + sha256: "3f5ad1e8112a9a6111c46d0b57a7be2286a9a07fc6e1976fdf5be2bd31d4ff62" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + image_picker_platform_interface: + dependency: transitive + description: + name: image_picker_platform_interface + sha256: "9ec26d410ff46f483c5519c29c02ef0e02e13a543f882b152d4bfd2f06802f80" + url: "https://pub.dev" + source: hosted + version: "2.10.0" + image_picker_windows: + dependency: transitive + description: + name: image_picker_windows + sha256: "6ad07afc4eb1bc25f3a01084d28520496c4a3bb0cb13685435838167c9dcedeb" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" intl: dependency: transitive description: name: intl - sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" + sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf url: "https://pub.dev" source: hosted - version: "0.18.1" + version: "0.19.0" io: dependency: transitive description: @@ -656,38 +805,62 @@ packages: url: "https://pub.dev" source: hosted version: "6.8.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + url: "https://pub.dev" + source: hosted + version: "10.0.4" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + url: "https://pub.dev" + source: hosted + version: "3.0.3" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" lints: dependency: transitive description: name: lints - sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452" + sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235" url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "4.0.0" location: dependency: transitive description: name: location - sha256: "06be54f682c9073cbfec3899eb9bc8ed90faa0e17735c9d9fa7fe426f5be1dd1" + sha256: "37ffdadcd4b1498b769824f45ebb4de8ed46663a4a67ac27b33a590ee486579f" url: "https://pub.dev" source: hosted - version: "5.0.3" + version: "6.0.2" location_platform_interface: dependency: transitive description: name: location_platform_interface - sha256: "8aa1d34eeecc979d7c9fe372931d84f6d2ebbd52226a54fe1620de6fdc0753b1" + sha256: "2ecde6bb0f88032b0bbbde37e18975b4468711dd92619c2235cc0c0ee93b4b8e" url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "4.0.0" location_web: dependency: transitive description: name: location_web - sha256: ec484c66e8a4ff1ee5d044c203f4b6b71e3a0556a97b739a5bc9616de672412b + sha256: "15ad7b4c8a9f55abee513373755e093a40c04d7e24fc1b4f89676fe99523d034" url: "https://pub.dev" source: hosted - version: "4.2.0" + version: "5.0.1" logging: dependency: transitive description: @@ -700,42 +873,42 @@ packages: dependency: transitive description: name: lottie - sha256: a93542cc2d60a7057255405f62252533f8e8956e7e06754955669fd32fb4b216 + sha256: "7afc60865a2429d994144f7d66ced2ae4305fe35d82890b8766e3359872d872c" url: "https://pub.dev" source: hosted - version: "2.7.0" + version: "3.1.3" matcher: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.12.0" mime: dependency: transitive description: name: mime - sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2" + sha256: "801fd0b26f14a4a58ccb09d5892c3fbdeff209594300a542492cf13fba9d247a" url: "https://pub.dev" source: hosted - version: "1.0.5" + version: "1.0.6" mocktail: dependency: "direct dev" description: @@ -776,30 +949,22 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.0" - package_info_plus: - dependency: transitive + path: + dependency: "direct main" description: - name: package_info_plus - sha256: "88bc797f44a94814f2213db1c9bd5badebafdfb8290ca9f78d4b9ee2a3db4d79" + name: path + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "5.0.1" - package_info_plus_platform_interface: + version: "1.9.0" + path_drawing: dependency: transitive description: - name: package_info_plus_platform_interface - sha256: "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6" + name: path_drawing + sha256: bbb1934c0cbb03091af082a6389ca2080345291ef07a5fa6d6e078ba8682f977 url: "https://pub.dev" source: hosted - version: "2.0.1" - path: - dependency: "direct main" - description: - name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" - url: "https://pub.dev" - source: hosted - version: "1.8.3" + version: "1.0.1" path_parsing: dependency: transitive description: @@ -812,26 +977,26 @@ packages: dependency: "direct main" description: name: path_provider - sha256: c9e7d3a4cd1410877472158bee69963a4579f78b68c65a2b7d40d1a7a88bb161 + sha256: fec0d61223fba3154d87759e3cc27fe2c8dc498f6386c6d6fc80d1afdd1bf378 url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.1.4" path_provider_android: dependency: transitive description: name: path_provider_android - sha256: a248d8146ee5983446bf03ed5ea8f6533129a12b11f12057ad1b4a67a2b3b41d + sha256: "6f01f8e37ec30b07bc424b4deabac37cacb1bc7e2e515ad74486039918a37eb7" url: "https://pub.dev" source: hosted - version: "2.2.4" + version: "2.2.10" path_provider_foundation: dependency: transitive description: name: path_provider_foundation - sha256: "5a7999be66e000916500be4f15a3633ebceb8302719b47b9cc49ce924125350f" + sha256: f234384a3fdd67f989b4d54a5d73ca2a6c422fa55ae694381ae0f4375cd1ea16 url: "https://pub.dev" source: hosted - version: "2.3.2" + version: "2.4.0" path_provider_linux: dependency: transitive description: @@ -852,10 +1017,10 @@ packages: dependency: transitive description: name: path_provider_windows - sha256: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170" + sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 url: "https://pub.dev" source: hosted - version: "2.2.1" + version: "2.3.0" petitparser: dependency: transitive description: @@ -868,10 +1033,10 @@ packages: dependency: transitive description: name: platform - sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec" + sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" url: "https://pub.dev" source: hosted - version: "3.1.4" + version: "3.1.5" plugin_platform_interface: dependency: transitive description: @@ -880,14 +1045,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.8" - pointer_interceptor: - dependency: transitive - description: - name: pointer_interceptor - sha256: adf7a637f97c077041d36801b43be08559fd4322d2127b3f20bb7be1b9eebc22 - url: "https://pub.dev" - source: hosted - version: "0.9.3+7" pool: dependency: transitive description: @@ -916,34 +1073,18 @@ packages: dependency: transitive description: name: pubspec_parse - sha256: c63b2876e58e194e4b0828fcb080ad0e06d051cb607a6be51a9e084f47cb9367 + sha256: c799b721d79eb6ee6fa56f00c04b472dcd44a30d258fac2174a6ec57302678f8 url: "https://pub.dev" source: hosted - version: "1.2.3" - reactive_flutter_typeahead: - dependency: transitive - description: - name: reactive_flutter_typeahead - sha256: ef91627df8cef70e603e8a6458749d8a99a385b78854332602fd08ad905cdab8 - url: "https://pub.dev" - source: hosted - version: "0.8.1" + version: "1.3.0" reactive_forms: dependency: "direct main" description: name: reactive_forms - sha256: "5aa9c48a0626c20d00a005e597cb10efbdebbfeecb9c4227b03a5945fbb91ec4" - url: "https://pub.dev" - source: hosted - version: "14.3.0" - remove_emoji_input_formatter: - dependency: transitive - description: - name: remove_emoji_input_formatter - sha256: "82d195984f890de7a8fea936c698848e78c1a67ccefe18db3baf9f7a3bc0177f" + sha256: "9b1fb18e0aae9c50cfa0aaabaaa38bc4d78eefc9b7b95fa9c947b051f6524b8e" url: "https://pub.dev" source: hosted - version: "0.0.1+1" + version: "17.0.1" shelf: dependency: transitive description: @@ -1001,10 +1142,10 @@ packages: dependency: transitive description: name: source_map_stack_trace - sha256: "84cf769ad83aa6bb61e0aa5a18e53aea683395f196a6f39c4c881fb90ed4f7ae" + sha256: c0713a43e323c3302c2abe2a1cc89aa057a387101ebd280371d6a6c9fa68516b url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" source_maps: dependency: transitive description: @@ -1021,6 +1162,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.10.0" + sprintf: + dependency: transitive + description: + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" + url: "https://pub.dev" + source: hosted + version: "7.0.0" stack_trace: dependency: transitive description: @@ -1073,26 +1222,26 @@ packages: dependency: transitive description: name: test - sha256: a1f7595805820fcc05e5c52e3a231aedd0b72972cb333e8c738a8b1239448b6f + sha256: "7ee446762c2c50b3bd4ea96fe13ffac69919352bd3b4b17bac3f3465edc58073" url: "https://pub.dev" source: hosted - version: "1.24.9" + version: "1.25.2" test_api: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.0" test_core: dependency: transitive description: name: test_core - sha256: a757b14fc47507060a162cc2530d9a4a2f92f5100a952c7443b5cad5ef5b106a + sha256: "2bc4b4ecddd75309300d8096f781c0e3280ca1ef85beda558d33fcbedc2eead4" url: "https://pub.dev" source: hosted - version: "0.5.9" + version: "0.6.0" timing: dependency: transitive description: @@ -1109,14 +1258,94 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.2" + universal_html: + dependency: transitive + description: + name: universal_html + sha256: "56536254004e24d9d8cfdb7dbbf09b74cf8df96729f38a2f5c238163e3d58971" + url: "https://pub.dev" + source: hosted + version: "2.2.4" + universal_io: + dependency: transitive + description: + name: universal_io + sha256: "1722b2dcc462b4b2f3ee7d188dad008b6eb4c40bbd03a3de451d82c78bba9aad" + url: "https://pub.dev" + source: hosted + version: "2.2.2" + url_launcher: + dependency: transitive + description: + name: url_launcher + sha256: "9d06212b1362abc2f0f0d78e6f09f726608c74e3b9462e8368bb03314aa8d603" + url: "https://pub.dev" + source: hosted + version: "6.3.1" + url_launcher_android: + dependency: transitive + description: + name: url_launcher_android + sha256: f0c73347dfcfa5b3db8bc06e1502668265d39c08f310c29bff4e28eea9699f79 + url: "https://pub.dev" + source: hosted + version: "6.3.9" + url_launcher_ios: + dependency: transitive + description: + name: url_launcher_ios + sha256: "16a513b6c12bb419304e72ea0ae2ab4fed569920d1c7cb850263fe3acc824626" + url: "https://pub.dev" + source: hosted + version: "6.3.2" + url_launcher_linux: + dependency: transitive + description: + name: url_launcher_linux + sha256: "4e9ba368772369e3e08f231d2301b4ef72b9ff87c31192ef471b380ef29a4935" + url: "https://pub.dev" + source: hosted + version: "3.2.1" + url_launcher_macos: + dependency: transitive + description: + name: url_launcher_macos + sha256: "17ba2000b847f334f16626a574c702b196723af2a289e7a93ffcb79acff855c2" + url: "https://pub.dev" + source: hosted + version: "3.2.2" + url_launcher_platform_interface: + dependency: transitive + description: + name: url_launcher_platform_interface + sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + url_launcher_web: + dependency: transitive + description: + name: url_launcher_web + sha256: "772638d3b34c779ede05ba3d38af34657a05ac55b06279ea6edd409e323dca8e" + url: "https://pub.dev" + source: hosted + version: "2.3.3" + url_launcher_windows: + dependency: transitive + description: + name: url_launcher_windows + sha256: "44cf3aabcedde30f2dba119a9dea3b0f2672fbe6fa96e85536251d678216b3c4" + url: "https://pub.dev" + source: hosted + version: "3.1.3" uuid: dependency: transitive description: name: uuid - sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" + sha256: f33d6bb662f0e4f79dcd7ada2e6170f3b3a2530c28fc41f49a411ddedd576a77 url: "https://pub.dev" source: hosted - version: "3.0.7" + version: "4.5.0" vector_graphics: dependency: transitive description: @@ -1149,14 +1378,22 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" + visibility_detector: + dependency: transitive + description: + name: visibility_detector + sha256: dd5cc11e13494f432d15939c3aa8ae76844c42b723398643ce9addb88a5ed420 + url: "https://pub.dev" + source: hosted + version: "0.4.0+2" vm_service: dependency: transitive description: name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" url: "https://pub.dev" source: hosted - version: "13.0.0" + version: "14.2.1" watcher: dependency: transitive description: @@ -1169,10 +1406,10 @@ packages: dependency: transitive description: name: web - sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 + sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "1.1.0" web_socket_channel: dependency: transitive description: @@ -1193,10 +1430,10 @@ packages: dependency: transitive description: name: win32 - sha256: "464f5674532865248444b4c3daca12bd9bf2d7c47f759ce2617986e7229494a8" + sha256: "68d1e89a91ed61ad9c370f9f8b6effed9ae5e0ede22a270bdfa6daf79fc2290a" url: "https://pub.dev" source: hosted - version: "5.2.0" + version: "5.5.4" xdg_directories: dependency: transitive description: @@ -1222,5 +1459,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.2.0 <3.9.0" - flutter: ">=3.16.0" + dart: ">=3.4.0 <3.9.0" + flutter: ">=3.22.0" diff --git a/packages/digit_scanner/pubspec.yaml b/packages/digit_scanner/pubspec.yaml index 0e08b4c1b..ce9e6f89f 100644 --- a/packages/digit_scanner/pubspec.yaml +++ b/packages/digit_scanner/pubspec.yaml @@ -17,7 +17,7 @@ repository: https://github.com/egovernments/health-campaign-field-worker-app # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 1.0.3+1 +version: 1.0.4 environment: sdk: '>=2.19.4 <3.9.0' @@ -35,31 +35,31 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.2 - google_mlkit_barcode_scanning: ^0.10.0 - camera: ^0.10.5+7 + google_mlkit_barcode_scanning: ^0.12.0 + camera: ^0.11.0+1 + digit_ui_components: ^0.0.2-dev.4 + reactive_forms: ^17.0.0 gs1_barcode_parser: ^1.0.5 - digit_components: ^1.0.1+1 flutter_bloc: ^8.1.1 freezed_annotation: ^2.1.0 overlay_builder: ^1.1.0 flutter_svg: ^2.0.8 - audioplayers: ^5.2.0 - auto_route: ^7.8.4 - path_provider: ^2.0.11 - path: ^1.8.2 - google_mlkit_commons: ^0.6.0 - reactive_forms: ^14.1.0 + audioplayers: ^5.2.1 + auto_route: ^8.1.3 + path_provider: ^2.1.3 + path: ^1.9.0 + google_mlkit_commons: ^0.7.1 dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^2.0.0 + flutter_lints: ^4.0.0 json_serializable: ^6.4.0 freezed: ^2.2.0 bloc_test: ^9.1.0 - mocktail: ^1.0.2 - build_runner: ^2.4.7 - auto_route_generator: ^7.3.2 + mocktail: ^1.0.3 + build_runner: ^2.4.11 + auto_route_generator: ^8.0.0 # The "flutter_lints" package below contains a set of recommended lints to # encourage good coding practices. The lint set provided by the package is diff --git a/packages/digit_showcase/.gitignore b/packages/digit_showcase/.gitignore index 96486fd93..11bcaf4ae 100644 --- a/packages/digit_showcase/.gitignore +++ b/packages/digit_showcase/.gitignore @@ -23,7 +23,6 @@ migrate_working_dir/ # Flutter/Dart/Pub related # Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. -/pubspec.lock **/doc/api/ .dart_tool/ .packages diff --git a/packages/digit_showcase/CHANGELOG.md b/packages/digit_showcase/CHANGELOG.md index 69ebf0931..027cc5f03 100644 --- a/packages/digit_showcase/CHANGELOG.md +++ b/packages/digit_showcase/CHANGELOG.md @@ -1,7 +1,12 @@ -## 0.0.0-dev.1 +## 1.0.1 -* Digit Showcase initial release. +* Updated to latest package versions +* Updated flutter version to 3.22.1 ## 1.0.0 -* Stable release \ No newline at end of file +* Stable release + +## 0.0.0-dev.1 + +* Digit Showcase initial release. diff --git a/packages/digit_showcase/lib/tooltip_widget.dart b/packages/digit_showcase/lib/tooltip_widget.dart index 5d260e060..3c10f2167 100644 --- a/packages/digit_showcase/lib/tooltip_widget.dart +++ b/packages/digit_showcase/lib/tooltip_widget.dart @@ -452,7 +452,7 @@ class _ToolTipWidgetState extends State TextButton( style: TextButton.styleFrom( foregroundColor: - theme.colorScheme.onBackground, + theme.colorScheme.surface, tapTargetSize: MaterialTapTargetSize.shrinkWrap, ), @@ -535,7 +535,7 @@ class _ToolTipWidgetState extends State final textPainter = TextPainter( text: TextSpan(text: text, style: style), maxLines: 1, - textScaleFactor: MediaQuery.of(context).textScaleFactor, + textScaler: MediaQuery.of(context).textScaler, textDirection: TextDirection.ltr, )..layout(); return textPainter.size; diff --git a/packages/digit_showcase/pubspec.lock b/packages/digit_showcase/pubspec.lock new file mode 100644 index 000000000..6f0b0670d --- /dev/null +++ b/packages/digit_showcase/pubspec.lock @@ -0,0 +1,205 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + async: + dependency: transitive + description: + name: async + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" + source: hosted + version: "2.11.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + characters: + dependency: transitive + description: + name: characters + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" + source: hosted + version: "1.3.0" + clock: + dependency: transitive + description: + name: clock + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" + source: hosted + version: "1.1.1" + collection: + dependency: transitive + description: + name: collection + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + url: "https://pub.dev" + source: hosted + version: "1.18.0" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" + source: hosted + version: "1.3.1" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c" + url: "https://pub.dev" + source: hosted + version: "4.0.0" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + url: "https://pub.dev" + source: hosted + version: "10.0.4" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + url: "https://pub.dev" + source: hosted + version: "3.0.3" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" + lints: + dependency: transitive + description: + name: lints + sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235" + url: "https://pub.dev" + source: hosted + version: "4.0.0" + matcher: + dependency: transitive + description: + name: matcher + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + url: "https://pub.dev" + source: hosted + version: "0.12.16+1" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + url: "https://pub.dev" + source: hosted + version: "0.8.0" + meta: + dependency: transitive + description: + name: meta + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" + url: "https://pub.dev" + source: hosted + version: "1.12.0" + path: + dependency: transitive + description: + name: path + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + url: "https://pub.dev" + source: hosted + version: "1.9.0" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.99" + source_span: + dependency: transitive + description: + name: source_span + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" + source: hosted + version: "1.10.0" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + url: "https://pub.dev" + source: hosted + version: "1.11.1" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + url: "https://pub.dev" + source: hosted + version: "2.1.2" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" + source: hosted + version: "1.2.1" + test_api: + dependency: transitive + description: + name: test_api + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" + url: "https://pub.dev" + source: hosted + version: "0.7.0" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" + url: "https://pub.dev" + source: hosted + version: "14.2.1" +sdks: + dart: ">=3.3.0 <4.0.0" + flutter: ">=3.18.0-18.0.pre.54" diff --git a/packages/digit_showcase/pubspec.yaml b/packages/digit_showcase/pubspec.yaml index c44965e5b..97f0b148e 100644 --- a/packages/digit_showcase/pubspec.yaml +++ b/packages/digit_showcase/pubspec.yaml @@ -1,6 +1,6 @@ name: digit_showcase description: Customized showcase view -version: 1.0.0 +version: 1.0.1 homepage: "https://github.com/egovernments/health-campaign-field-worker-app/tree/develop/packages/digit_showcase" environment: @@ -14,7 +14,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^2.0.0 + flutter_lints: ^4.0.0 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec diff --git a/packages/forms_engine/lib/widgets/integer_builder.dart b/packages/forms_engine/lib/widgets/integer_builder.dart index 77a7c8b56..1d9c13a46 100644 --- a/packages/forms_engine/lib/widgets/integer_builder.dart +++ b/packages/forms_engine/lib/widgets/integer_builder.dart @@ -73,7 +73,7 @@ class JsonSchemaIntegerBuilder extends JsonSchemaBuilder { aspectRatio: 1, child: Material( shape: border, - color: Theme.of(context).colorScheme.background, + color: Theme.of(context).colorScheme.surface, child: InkWell(onTap: onPressed, child: Icon(icon)), ), ); diff --git a/packages/forms_engine/pubspec.lock b/packages/forms_engine/pubspec.lock index 1fbd7a910..b3553cb93 100644 --- a/packages/forms_engine/pubspec.lock +++ b/packages/forms_engine/pubspec.lock @@ -109,10 +109,10 @@ packages: dependency: "direct dev" description: name: build_runner - sha256: "67d591d602906ef9201caf93452495ad1812bea2074f04e25dbd7c133785821b" + sha256: "644dc98a0f179b872f612d3eb627924b578897c629788e858157fa5e704ca0c7" url: "https://pub.dev" source: hosted - version: "2.4.7" + version: "2.4.11" build_runner_core: dependency: transitive description: @@ -228,19 +228,18 @@ packages: digit_components: dependency: "direct main" description: - name: digit_components - sha256: "8e5d120f2c16c0d8ffaf4d0de1218da5e492061d6bb9245214589fb1ea5ec09e" - url: "https://pub.dev" - source: hosted - version: "0.0.3+16" + path: "../digit_components" + relative: true + source: path + version: "1.0.2+1" easy_stepper: dependency: transitive description: name: easy_stepper - sha256: "77f3ab4ee3c867b5a2236bf712abb08fed2b1c533cf24cf3fcd46c2821072ffd" + sha256: "63f66314a509ec690c8152a41288961fd96ba9e92ef184299f068a5e78bd16ad" url: "https://pub.dev" source: hosted - version: "0.5.2+1" + version: "0.8.5+1" fake_async: dependency: transitive description: @@ -282,10 +281,10 @@ packages: dependency: "direct main" description: name: flutter_bloc - sha256: e74efb89ee6945bcbce74a5b3a5a3376b088e5f21f55c263fc38cbdc6237faae + sha256: b594505eac31a0518bdcb4b5b79573b8d9117b193cc80cc12e17d639b10aa27a url: "https://pub.dev" source: hosted - version: "8.1.3" + version: "8.1.6" flutter_focus_watcher: dependency: transitive description: @@ -350,6 +349,11 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.3" + flutter_localizations: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" flutter_spinkit: dependency: transitive description: @@ -380,10 +384,10 @@ packages: dependency: transitive description: name: fluttertoast - sha256: dfdde255317af381bfc1c486ed968d5a43a2ded9c931e87cbecd88767d6a71c1 + sha256: "95f349437aeebe524ef7d6c9bde3e6b4772717cf46a0eb6a3ceaddc740b297cc" url: "https://pub.dev" source: hosted - version: "8.2.4" + version: "8.2.8" freezed: dependency: "direct dev" description: @@ -420,10 +424,10 @@ packages: dependency: transitive description: name: google_fonts - sha256: "2776c66b3e97c6cdd58d1bd3281548b074b64f1fd5c8f82391f7456e38849567" + sha256: b1ac0fe2832c9cc95e5e88b57d627c5e68c223b9657f4b96e1487aa9098c7b82 url: "https://pub.dev" source: hosted - version: "4.0.5" + version: "6.2.1" graphs: dependency: transitive description: @@ -444,10 +448,10 @@ packages: dependency: transitive description: name: http - sha256: a2bbf9d017fcced29139daa8ed2bba4ece450ab222871df93ca9eec6f80c34ba + sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.2" http_multi_server: dependency: transitive description: @@ -468,10 +472,10 @@ packages: dependency: "direct main" description: name: intl - sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" + sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf url: "https://pub.dev" source: hosted - version: "0.18.1" + version: "0.19.0" io: dependency: transitive description: @@ -504,6 +508,30 @@ packages: url: "https://pub.dev" source: hosted version: "6.7.1" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + url: "https://pub.dev" + source: hosted + version: "10.0.4" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + url: "https://pub.dev" + source: hosted + version: "3.0.3" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" lints: dependency: transitive description: @@ -516,26 +544,26 @@ packages: dependency: transitive description: name: location - sha256: "06be54f682c9073cbfec3899eb9bc8ed90faa0e17735c9d9fa7fe426f5be1dd1" + sha256: "37ffdadcd4b1498b769824f45ebb4de8ed46663a4a67ac27b33a590ee486579f" url: "https://pub.dev" source: hosted - version: "5.0.3" + version: "6.0.2" location_platform_interface: dependency: transitive description: name: location_platform_interface - sha256: "8aa1d34eeecc979d7c9fe372931d84f6d2ebbd52226a54fe1620de6fdc0753b1" + sha256: "2ecde6bb0f88032b0bbbde37e18975b4468711dd92619c2235cc0c0ee93b4b8e" url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "4.0.0" location_web: dependency: transitive description: name: location_web - sha256: ec484c66e8a4ff1ee5d044c203f4b6b71e3a0556a97b739a5bc9616de672412b + sha256: "15ad7b4c8a9f55abee513373755e093a40c04d7e24fc1b4f89676fe99523d034" url: "https://pub.dev" source: hosted - version: "4.2.0" + version: "5.0.1" logging: dependency: transitive description: @@ -548,34 +576,34 @@ packages: dependency: transitive description: name: lottie - sha256: a93542cc2d60a7057255405f62252533f8e8956e7e06754955669fd32fb4b216 + sha256: "6a24ade5d3d918c306bb1c21a6b9a04aab0489d51a2582522eea820b4093b62b" url: "https://pub.dev" source: hosted - version: "2.7.0" + version: "3.1.2" matcher: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.12.0" mime: dependency: transitive description: @@ -588,10 +616,10 @@ packages: dependency: transitive description: name: mocktail - sha256: f603ebd85a576e5914870b02e5839fc5d0243b867bf710651cf239a28ebb365e + sha256: "890df3f9688106f25755f26b1c60589a92b3ab91a22b8b224947ad041bf172d8" url: "https://pub.dev" source: hosted - version: "1.0.2" + version: "1.0.4" nested: dependency: transitive description: @@ -628,34 +656,34 @@ packages: dependency: transitive description: name: package_info_plus - sha256: "88bc797f44a94814f2213db1c9bd5badebafdfb8290ca9f78d4b9ee2a3db4d79" + sha256: a75164ade98cb7d24cfd0a13c6408927c6b217fa60dee5a7ff5c116a58f28918 url: "https://pub.dev" source: hosted - version: "5.0.1" + version: "8.0.2" package_info_plus_platform_interface: dependency: transitive description: name: package_info_plus_platform_interface - sha256: "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6" + sha256: ac1f4a4847f1ade8e6a87d1f39f5d7c67490738642e2542f559ec38c37489a66 url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.1" path: dependency: transitive description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.9.0" path_provider: dependency: transitive description: name: path_provider - sha256: b27217933eeeba8ff24845c34003b003b2b22151de3c908d0e679e8fe1aa078b + sha256: fec0d61223fba3154d87759e3cc27fe2c8dc498f6386c6d6fc80d1afdd1bf378 url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.4" path_provider_android: dependency: transitive description: @@ -708,10 +736,10 @@ packages: dependency: transitive description: name: plugin_platform_interface - sha256: f4f88d4a900933e7267e2b353594774fc0d07fb072b47eedcd5b54e1ea3269f8 + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" url: "https://pub.dev" source: hosted - version: "2.1.7" + version: "2.1.8" pointer_interceptor: dependency: transitive description: @@ -764,18 +792,18 @@ packages: dependency: transitive description: name: reactive_flutter_typeahead - sha256: ef91627df8cef70e603e8a6458749d8a99a385b78854332602fd08ad905cdab8 + sha256: a5dbca4b537bd9dde245d4228e1a6ce937c05cd77c57ed45b9c05135540d5f1a url: "https://pub.dev" source: hosted - version: "0.8.1" + version: "2.1.1" reactive_forms: dependency: "direct main" description: name: reactive_forms - sha256: "5aa9c48a0626c20d00a005e597cb10efbdebbfeecb9c4227b03a5945fbb91ec4" + sha256: "9b1fb18e0aae9c50cfa0aaabaaa38bc4d78eefc9b7b95fa9c947b051f6524b8e" url: "https://pub.dev" source: hosted - version: "14.3.0" + version: "17.0.1" remove_emoji_input_formatter: dependency: transitive description: @@ -905,26 +933,26 @@ packages: dependency: transitive description: name: test - sha256: a1f7595805820fcc05e5c52e3a231aedd0b72972cb333e8c738a8b1239448b6f + sha256: "7ee446762c2c50b3bd4ea96fe13ffac69919352bd3b4b17bac3f3465edc58073" url: "https://pub.dev" source: hosted - version: "1.24.9" + version: "1.25.2" test_api: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.0" test_core: dependency: transitive description: name: test_core - sha256: a757b14fc47507060a162cc2530d9a4a2f92f5100a952c7443b5cad5ef5b106a + sha256: "2bc4b4ecddd75309300d8096f781c0e3280ca1ef85beda558d33fcbedc2eead4" url: "https://pub.dev" source: hosted - version: "0.5.9" + version: "0.6.0" timing: dependency: transitive description: @@ -953,10 +981,10 @@ packages: dependency: transitive description: name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" url: "https://pub.dev" source: hosted - version: "13.0.0" + version: "14.2.1" watcher: dependency: transitive description: @@ -969,10 +997,10 @@ packages: dependency: transitive description: name: web - sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 + sha256: d43c1d6b787bf0afad444700ae7f4db8827f701bc61c255ac8d328c6f4d52062 url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "1.0.0" web_socket_channel: dependency: transitive description: @@ -1014,5 +1042,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.2.0 <3.9.0" - flutter: ">=3.16.0" + dart: ">=3.4.0 <4.0.0" + flutter: ">=3.19.2" diff --git a/packages/forms_engine/pubspec.yaml b/packages/forms_engine/pubspec.yaml index b1bc6a5d7..21b136a7e 100644 --- a/packages/forms_engine/pubspec.yaml +++ b/packages/forms_engine/pubspec.yaml @@ -13,10 +13,10 @@ dependencies: flutter: sdk: flutter freezed_annotation: ^2.1.0 - intl: ^0.18.0 + intl: ^0.19.0 json_annotation: ^4.7.0 - reactive_forms: ^14.1.0 - digit_components: ^0.0.1 + reactive_forms: ^17.0.0 + digit_components: ^1.0.1+1 flutter_bloc: ^8.1.1 dev_dependencies: diff --git a/packages/inventory_management/CHANGELOG.md b/packages/inventory_management/CHANGELOG.md index e097bdc3b..b0623ce75 100644 --- a/packages/inventory_management/CHANGELOG.md +++ b/packages/inventory_management/CHANGELOG.md @@ -1,3 +1,9 @@ +## 1.0.4 + +* Upgrade to Flutter 3.22 +* Updated digit_data_model, digit_scanner to latest version +* Migrated to digit_ui_components + ## 1.0.3+5 * Added audit and client audit details in stock reconciliation diff --git a/packages/inventory_management/lib/data/repositories/remote/stock.dart b/packages/inventory_management/lib/data/repositories/remote/stock.dart index e592cf4f1..c1589f904 100644 --- a/packages/inventory_management/lib/data/repositories/remote/stock.dart +++ b/packages/inventory_management/lib/data/repositories/remote/stock.dart @@ -1,15 +1,126 @@ // Generated using mason. Do not modify by hand +import 'dart:async'; + +import 'package:dart_mappable/dart_mappable.dart'; import 'package:digit_data_model/data_model.dart'; -import 'package:inventory_management/models/entities/stock.dart'; +import 'package:dio/dio.dart'; + +import '../../../models/entities/stock.dart'; -class StockRemoteRepository extends RemoteRepository { +class StockRemoteRepository + extends RemoteRepository { StockRemoteRepository( - super.dio, { - required super.actionMap, - super.entityName = 'Stock', - }); + super.dio, { + required super.actionMap, + super.entityName = 'Stock', + }); @override DataModelType get type => DataModelType.stock; -} \ No newline at end of file + + @override + FutureOr> search( + StockSearchModel query, { + int? offSet, + int? limit, + }) async { + int defaultBatchSize = limit ?? 100; // Default batch size for fetching data + int currentOffset = offSet ?? 0; + + List allResults = []; + + //To fetch the totalCount from the first Response + bool flag = true; + + //Total count of stock + var totalCount = 0; + + do { + Response response; + + //Execute the request + try { + response = await executeFuture( + future: () async { + return await dio.post( + searchPath, + queryParameters: { + 'offset': currentOffset, + 'limit': defaultBatchSize, + 'tenantId': DigitDataModelSingleton().tenantId, + if (query.isDeleted ?? false) 'includeDeleted': query.isDeleted, + }, + data: { + isPlural ? entityNamePlural : entityName: + isPlural ? [query.toMap()] : query.toMap(), + }, + ); + }, + ); + } catch (error) { + break; // Break out of the loop if an error occurs + } + + final responseMap = response.data; + + if (responseMap is! Map) { + throw InvalidApiResponseException( + data: query.toMap(), + path: searchPath, + response: responseMap, + ); + } + + String key = (isSearchResponsePlural) ? entityNamePlural : entityName; + + //Check whether the response contains valid key and totalCount + if (!responseMap.containsKey(key) || + (flag && !responseMap.containsKey('TotalCount'))) { + throw InvalidApiResponseException( + data: query.toMap(), + path: searchPath, + response: responseMap, + ); + } + + //Fetch the totalCount of records only from the first response + if (flag && responseMap.containsKey('TotalCount')) { + totalCount = responseMap['TotalCount']; + flag = false; + } + + final entityResponse = await responseMap[key]; + + if (entityResponse is! List) { + throw InvalidApiResponseException( + data: query.toMap(), + path: searchPath, + response: responseMap, + ); + } + + final entityList = + entityResponse.whereType>().toList(); + + List currentBatch; + + try { + currentBatch = entityList + .map((e) => MapperContainer.globals.fromMap(e)) + .toList(); + } catch (e) { + rethrow; + } + + allResults.addAll(currentBatch); + currentOffset += defaultBatchSize; + totalCount -= defaultBatchSize; + + //If remaining record is less than defaultBatchSize, adjust the Batch size + if (totalCount < defaultBatchSize) defaultBatchSize = totalCount; + } while (totalCount > 0); + + return allResults; + } +} diff --git a/packages/inventory_management/lib/models/entities/inventory_enums.dart b/packages/inventory_management/lib/models/entities/inventory_enums.dart index 088580334..71f754c35 100644 --- a/packages/inventory_management/lib/models/entities/inventory_enums.dart +++ b/packages/inventory_management/lib/models/entities/inventory_enums.dart @@ -6,9 +6,9 @@ part 'inventory_enums.mapper.dart'; @MappableEnum(caseStyle: CaseStyle.upperCase) enum InventoryManagementEnums { @MappableValue("waybill_quantity") - waybill_quantity, + wayBillQuantity, @MappableValue("vehicle_number") - vehicle_number, + vehicleNumber, @MappableValue("comments") comments, @MappableValue("deliveryTeam") diff --git a/packages/inventory_management/lib/models/entities/inventory_enums.mapper.dart b/packages/inventory_management/lib/models/entities/inventory_enums.mapper.dart index 30e88ba7d..233bdfeac 100644 --- a/packages/inventory_management/lib/models/entities/inventory_enums.mapper.dart +++ b/packages/inventory_management/lib/models/entities/inventory_enums.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'inventory_enums.dart'; @@ -28,9 +28,9 @@ class InventoryManagementEnumsMapper InventoryManagementEnums decode(dynamic value) { switch (value) { case "waybill_quantity": - return InventoryManagementEnums.waybill_quantity; + return InventoryManagementEnums.wayBillQuantity; case "vehicle_number": - return InventoryManagementEnums.vehicle_number; + return InventoryManagementEnums.vehicleNumber; case "comments": return InventoryManagementEnums.comments; case "deliveryTeam": @@ -51,9 +51,9 @@ class InventoryManagementEnumsMapper @override dynamic encode(InventoryManagementEnums self) { switch (self) { - case InventoryManagementEnums.waybill_quantity: + case InventoryManagementEnums.wayBillQuantity: return "waybill_quantity"; - case InventoryManagementEnums.vehicle_number: + case InventoryManagementEnums.vehicleNumber: return "vehicle_number"; case InventoryManagementEnums.comments: return "comments"; diff --git a/packages/inventory_management/lib/models/entities/stock.dart b/packages/inventory_management/lib/models/entities/stock.dart index 66f9882b2..79e8f797c 100644 --- a/packages/inventory_management/lib/models/entities/stock.dart +++ b/packages/inventory_management/lib/models/entities/stock.dart @@ -22,6 +22,7 @@ class StockSearchModel extends EntitySearchModel with StockSearchModelMappable { final List? clientReferenceId; final List? transactionType; final List? transactionReason; + final DateTime? dateOfEntryTime; StockSearchModel({ this.id, @@ -39,9 +40,13 @@ class StockSearchModel extends EntitySearchModel with StockSearchModelMappable { this.clientReferenceId, this.transactionType, this.transactionReason, + int? dateOfEntry, super.boundaryCode, super.isDeleted, - }) : super(); + }) : dateOfEntryTime = dateOfEntry == null + ? null + : DateTime.fromMillisecondsSinceEpoch(dateOfEntry), + super(); @MappableConstructor() StockSearchModel.ignoreDeleted({ @@ -60,8 +65,14 @@ class StockSearchModel extends EntitySearchModel with StockSearchModelMappable { this.clientReferenceId, this.transactionType, this.transactionReason, + int? dateOfEntry, super.boundaryCode, - }) : super(isDeleted: false); + }) : dateOfEntryTime = dateOfEntry == null + ? null + : DateTime.fromMillisecondsSinceEpoch(dateOfEntry), + super(isDeleted: false); + + int? get dateOfEntry => dateOfEntryTime?.millisecondsSinceEpoch; } @MappableClass(ignoreNull: true, discriminatorValue: MappableClass.useAsDefault) @@ -88,8 +99,10 @@ class StockModel extends EntityModel with StockModelMappable { final String? transactionType; final String? transactionReason; final StockAdditionalFields? additionalFields; + final DateTime? dateOfEntryTime; StockModel({ + int? dateOfEntry, this.additionalFields, this.id, this.tenantId, @@ -113,7 +126,12 @@ class StockModel extends EntityModel with StockModelMappable { super.auditDetails, super.clientAuditDetails, super.isDeleted = false, - }) : super(); + }) : dateOfEntryTime = dateOfEntry == null + ? null + : DateTime.fromMillisecondsSinceEpoch(dateOfEntry), + super(); + + int? get dateOfEntry => dateOfEntryTime?.millisecondsSinceEpoch; StockCompanion get companion { return StockCompanion( @@ -146,6 +164,7 @@ class StockModel extends EntityModel with StockModelMappable { rowVersion: Value(rowVersion), transactionType: Value(transactionType), transactionReason: Value(transactionReason), + dateOfEntry: Value(dateOfEntry), ); } } diff --git a/packages/inventory_management/lib/models/entities/stock.mapper.dart b/packages/inventory_management/lib/models/entities/stock.mapper.dart index 8c4738857..42a21a2cc 100644 --- a/packages/inventory_management/lib/models/entities/stock.mapper.dart +++ b/packages/inventory_management/lib/models/entities/stock.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'stock.dart'; @@ -70,6 +70,9 @@ class StockSearchModelMapper extends SubClassMapperBase { v.transactionReason; static const Field> _f$transactionReason = Field('transactionReason', _$transactionReason, opt: true); + static int? _$dateOfEntry(StockSearchModel v) => v.dateOfEntry; + static const Field _f$dateOfEntry = + Field('dateOfEntry', _$dateOfEntry, opt: true); static String? _$boundaryCode(StockSearchModel v) => v.boundaryCode; static const Field _f$boundaryCode = Field('boundaryCode', _$boundaryCode, opt: true); @@ -80,6 +83,9 @@ class StockSearchModelMapper extends SubClassMapperBase { v.additionalFields; static const Field _f$additionalFields = Field('additionalFields', _$additionalFields, mode: FieldMode.member); + static DateTime? _$dateOfEntryTime(StockSearchModel v) => v.dateOfEntryTime; + static const Field _f$dateOfEntryTime = + Field('dateOfEntryTime', _$dateOfEntryTime, mode: FieldMode.member); @override final MappableFields fields = const { @@ -98,9 +104,11 @@ class StockSearchModelMapper extends SubClassMapperBase { #clientReferenceId: _f$clientReferenceId, #transactionType: _f$transactionType, #transactionReason: _f$transactionReason, + #dateOfEntry: _f$dateOfEntry, #boundaryCode: _f$boundaryCode, #auditDetails: _f$auditDetails, #additionalFields: _f$additionalFields, + #dateOfEntryTime: _f$dateOfEntryTime, }; @override final bool ignoreNull = true; @@ -130,6 +138,7 @@ class StockSearchModelMapper extends SubClassMapperBase { clientReferenceId: data.dec(_f$clientReferenceId), transactionType: data.dec(_f$transactionType), transactionReason: data.dec(_f$transactionReason), + dateOfEntry: data.dec(_f$dateOfEntry), boundaryCode: data.dec(_f$boundaryCode)); } @@ -167,10 +176,8 @@ mixin StockSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - StockSearchModelMapper.ensureInitialized() - .isValueEqual(this as StockSearchModel, other)); + return StockSearchModelMapper.ensureInitialized() + .equalsValue(this as StockSearchModel, other); } @override @@ -212,6 +219,7 @@ abstract class StockSearchModelCopyWith<$R, $In extends StockSearchModel, $Out> List? clientReferenceId, List? transactionType, List? transactionReason, + int? dateOfEntry, String? boundaryCode}); StockSearchModelCopyWith<$R2, $In, $Out2> $chain<$R2, $Out2>( Then<$Out2, $R2> t); @@ -266,6 +274,7 @@ class _StockSearchModelCopyWithImpl<$R, $Out> Object? clientReferenceId = $none, Object? transactionType = $none, Object? transactionReason = $none, + Object? dateOfEntry = $none, Object? boundaryCode = $none}) => $apply(FieldCopyWithData({ if (id != $none) #id: id, @@ -285,6 +294,7 @@ class _StockSearchModelCopyWithImpl<$R, $Out> if (clientReferenceId != $none) #clientReferenceId: clientReferenceId, if (transactionType != $none) #transactionType: transactionType, if (transactionReason != $none) #transactionReason: transactionReason, + if (dateOfEntry != $none) #dateOfEntry: dateOfEntry, if (boundaryCode != $none) #boundaryCode: boundaryCode })); @override @@ -309,6 +319,7 @@ class _StockSearchModelCopyWithImpl<$R, $Out> transactionType: data.get(#transactionType, or: $value.transactionType), transactionReason: data.get(#transactionReason, or: $value.transactionReason), + dateOfEntry: data.get(#dateOfEntry, or: $value.dateOfEntry), boundaryCode: data.get(#boundaryCode, or: $value.boundaryCode)); @override @@ -331,6 +342,9 @@ class StockModelMapper extends SubClassMapperBase { @override final String id = 'StockModel'; + static int? _$dateOfEntry(StockModel v) => v.dateOfEntry; + static const Field _f$dateOfEntry = + Field('dateOfEntry', _$dateOfEntry, opt: true); static StockAdditionalFields? _$additionalFields(StockModel v) => v.additionalFields; static const Field _f$additionalFields = @@ -402,9 +416,13 @@ class StockModelMapper extends SubClassMapperBase { static bool? _$isDeleted(StockModel v) => v.isDeleted; static const Field _f$isDeleted = Field('isDeleted', _$isDeleted, opt: true, def: false); + static DateTime? _$dateOfEntryTime(StockModel v) => v.dateOfEntryTime; + static const Field _f$dateOfEntryTime = + Field('dateOfEntryTime', _$dateOfEntryTime, mode: FieldMode.member); @override final MappableFields fields = const { + #dateOfEntry: _f$dateOfEntry, #additionalFields: _f$additionalFields, #id: _f$id, #tenantId: _f$tenantId, @@ -428,6 +446,7 @@ class StockModelMapper extends SubClassMapperBase { #auditDetails: _f$auditDetails, #clientAuditDetails: _f$clientAuditDetails, #isDeleted: _f$isDeleted, + #dateOfEntryTime: _f$dateOfEntryTime, }; @override final bool ignoreNull = true; @@ -442,6 +461,7 @@ class StockModelMapper extends SubClassMapperBase { static StockModel _instantiate(DecodingData data) { return StockModel( + dateOfEntry: data.dec(_f$dateOfEntry), additionalFields: data.dec(_f$additionalFields), id: data.dec(_f$id), tenantId: data.dec(_f$tenantId), @@ -500,10 +520,8 @@ mixin StockModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - StockModelMapper.ensureInitialized() - .isValueEqual(this as StockModel, other)); + return StockModelMapper.ensureInitialized() + .equalsValue(this as StockModel, other); } @override @@ -529,7 +547,8 @@ abstract class StockModelCopyWith<$R, $In extends StockModel, $Out> get clientAuditDetails; @override $R call( - {StockAdditionalFields? additionalFields, + {int? dateOfEntry, + StockAdditionalFields? additionalFields, String? id, String? tenantId, String? facilityId, @@ -577,7 +596,8 @@ class _StockModelCopyWithImpl<$R, $Out> .$chain((v) => call(clientAuditDetails: v)); @override $R call( - {Object? additionalFields = $none, + {Object? dateOfEntry = $none, + Object? additionalFields = $none, Object? id = $none, Object? tenantId = $none, Object? facilityId = $none, @@ -601,6 +621,7 @@ class _StockModelCopyWithImpl<$R, $Out> Object? clientAuditDetails = $none, Object? isDeleted = $none}) => $apply(FieldCopyWithData({ + if (dateOfEntry != $none) #dateOfEntry: dateOfEntry, if (additionalFields != $none) #additionalFields: additionalFields, if (id != $none) #id: id, if (tenantId != $none) #tenantId: tenantId, @@ -631,6 +652,7 @@ class _StockModelCopyWithImpl<$R, $Out> })); @override StockModel $make(CopyWithData data) => StockModel( + dateOfEntry: data.get(#dateOfEntry, or: $value.dateOfEntry), additionalFields: data.get(#additionalFields, or: $value.additionalFields), id: data.get(#id, or: $value.id), @@ -753,10 +775,8 @@ mixin StockAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - StockAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as StockAdditionalFields, other)); + return StockAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as StockAdditionalFields, other); } @override diff --git a/packages/inventory_management/lib/models/entities/stock_reconciliation.mapper.dart b/packages/inventory_management/lib/models/entities/stock_reconciliation.mapper.dart index a4b0c3724..9f0670c03 100644 --- a/packages/inventory_management/lib/models/entities/stock_reconciliation.mapper.dart +++ b/packages/inventory_management/lib/models/entities/stock_reconciliation.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'stock_reconciliation.dart'; @@ -141,10 +141,8 @@ mixin StockReconciliationSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - StockReconciliationSearchModelMapper.ensureInitialized() - .isValueEqual(this as StockReconciliationSearchModel, other)); + return StockReconciliationSearchModelMapper.ensureInitialized() + .equalsValue(this as StockReconciliationSearchModel, other); } @override @@ -417,10 +415,8 @@ mixin StockReconciliationModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - StockReconciliationModelMapper.ensureInitialized() - .isValueEqual(this as StockReconciliationModel, other)); + return StockReconciliationModelMapper.ensureInitialized() + .equalsValue(this as StockReconciliationModel, other); } @override @@ -664,11 +660,8 @@ mixin StockReconciliationAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - StockReconciliationAdditionalFieldsMapper.ensureInitialized() - .isValueEqual( - this as StockReconciliationAdditionalFields, other)); + return StockReconciliationAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as StockReconciliationAdditionalFields, other); } @override diff --git a/packages/inventory_management/lib/models/entities/transaction_reason.mapper.dart b/packages/inventory_management/lib/models/entities/transaction_reason.mapper.dart index 24c1feb4f..71851923b 100644 --- a/packages/inventory_management/lib/models/entities/transaction_reason.mapper.dart +++ b/packages/inventory_management/lib/models/entities/transaction_reason.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'transaction_reason.dart'; diff --git a/packages/inventory_management/lib/models/entities/transaction_type.mapper.dart b/packages/inventory_management/lib/models/entities/transaction_type.mapper.dart index 2582c989a..e6c25cc67 100644 --- a/packages/inventory_management/lib/models/entities/transaction_type.mapper.dart +++ b/packages/inventory_management/lib/models/entities/transaction_type.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'transaction_type.dart'; diff --git a/packages/inventory_management/lib/pages/acknowledgement.dart b/packages/inventory_management/lib/pages/acknowledgement.dart index 2b48899f4..20fc3b2dc 100644 --- a/packages/inventory_management/lib/pages/acknowledgement.dart +++ b/packages/inventory_management/lib/pages/acknowledgement.dart @@ -1,16 +1,20 @@ import 'package:auto_route/auto_route.dart'; -import 'package:digit_components/digit_components.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; +import 'package:digit_ui_components/widgets/molecules/panel_cards.dart'; import 'package:flutter/material.dart'; + import '../utils/i18_key_constants.dart' as i18; import '../widgets/localized.dart'; @RoutePage() class InventoryAcknowledgementPage extends LocalizedStatefulWidget { - bool isDataRecordSuccess; - String? label; - String? description; - Map? descriptionTableData; - InventoryAcknowledgementPage({ + final bool isDataRecordSuccess; + final String? label; + final String? description; + final Map? descriptionTableData; + + const InventoryAcknowledgementPage({ super.key, super.appLocalizations, this.isDataRecordSuccess = false, @@ -31,26 +35,39 @@ class AcknowledgementPageState final theme = Theme.of(context); return Scaffold( - body: DigitAcknowledgement.success( - description: widget.description ?? + body: PanelCard( + title: widget.label ?? localizations.translate( - i18.acknowledgementSuccess.acknowledgementDescriptionText, + i18.acknowledgementSuccess.acknowledgementLabelText, ), - descriptionWidget: widget.isDataRecordSuccess - ? DigitTableCard( - element: widget.descriptionTableData ?? {}, - ) - : null, - label: widget.label ?? + type: PanelType.success, + description: widget.description ?? localizations.translate( - i18.acknowledgementSuccess.acknowledgementLabelText, + i18.acknowledgementSuccess.acknowledgementDescriptionText, ), - action: () { - context.router.maybePop(); - }, - enableBackToSearch: widget.isDataRecordSuccess ? false : true, - actionLabel: - localizations.translate(i18.acknowledgementSuccess.actionLabelText), + + /// TODO: need to update this as listview card + // additionWidgets: widget.isDataRecordSuccess + // ? DigitTableCard( + // element: widget.descriptionTableData ?? {}, + // ) + // : null, + actions: [ + DigitButton( + label: localizations + .translate(i18.acknowledgementSuccess.actionLabelText), + onPressed: () { + context.router.maybePop(); + }, + type: DigitButtonType.primary, + size: DigitButtonSize.large), + ], + // action: () { + // context.router.maybePop(); + // }, + // enableBackToSearch: widget.isDataRecordSuccess ? false : true, + // actionLabel: + // localizations.translate(i18.acknowledgementSuccess.actionLabelText), ), bottomNavigationBar: Offstage( offstage: !widget.isDataRecordSuccess, @@ -58,43 +75,30 @@ class AcknowledgementPageState child: SizedBox( height: 150, child: DigitCard( - margin: const EdgeInsets.fromLTRB(0, kPadding, 0, 0), - padding: const EdgeInsets.fromLTRB(kPadding, 0, kPadding, 0), - child: Column( - children: [ - DigitElevatedButton( - child: Text(localizations - .translate(i18.acknowledgementSuccess.goToHome)), - onPressed: () { - context.router.popUntilRoot(); - }, - ), - const SizedBox( - height: 12, - ), - DigitOutLineButton( - onPressed: () { - context.router.popUntilRoot(); - }, - label: localizations - .translate(i18.acknowledgementSuccess.downloadmoredata), - buttonStyle: OutlinedButton.styleFrom( - backgroundColor: Colors.white, - shape: const RoundedRectangleBorder( - borderRadius: BorderRadius.zero, - ), - side: BorderSide( - width: 1.0, - color: theme.colorScheme.secondary, - ), - minimumSize: Size( - MediaQuery.of(context).size.width, - 50, - ), - ), - ), - ], - ), + margin: const EdgeInsets.fromLTRB(0, spacer2, 0, 0), + children: [ + DigitButton( + size: DigitButtonSize.large, + type: DigitButtonType.secondary, + label: localizations + .translate(i18.acknowledgementSuccess.goToHome), + onPressed: () { + context.router.popUntilRoot(); + }, + ), + const SizedBox( + height: 12, + ), + DigitButton( + size: DigitButtonSize.large, + type: DigitButtonType.primary, + onPressed: () { + context.router.popUntilRoot(); + }, + label: localizations + .translate(i18.acknowledgementSuccess.downloadmoredata), + ), + ], ), ), ), diff --git a/packages/inventory_management/lib/pages/facility_selection.dart b/packages/inventory_management/lib/pages/facility_selection.dart index 08b6d667f..ae7acdeb7 100644 --- a/packages/inventory_management/lib/pages/facility_selection.dart +++ b/packages/inventory_management/lib/pages/facility_selection.dart @@ -1,7 +1,9 @@ import 'package:auto_route/auto_route.dart'; import 'package:collection/collection.dart'; -import 'package:digit_components/digit_components.dart'; import 'package:digit_data_model/data_model.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/scrollable_content.dart'; import 'package:flutter/material.dart'; import 'package:inventory_management/utils/constants.dart'; import 'package:inventory_management/widgets/localized.dart'; @@ -37,6 +39,7 @@ class InventoryFacilitySelectionPageState color: theme.colorScheme.outline, width: 1.0, ); + final textTheme = theme.digitTextTheme(context); return SafeArea( child: ReactiveFormBuilder( @@ -67,29 +70,31 @@ class InventoryFacilitySelectionPageState color: Colors.white, child: Padding( padding: const EdgeInsets.symmetric( - horizontal: kPadding * 2), + horizontal: spacer4), child: Column( children: [ Padding( - padding: const EdgeInsets.all(kPadding), + padding: const EdgeInsets.all(spacer2), child: Align( alignment: Alignment.topLeft, child: Text( localizations.translate( i18.common.facilitySearchHeaderLabel, ), - style: theme.textTheme.displayMedium, + style: textTheme.headingXl, textAlign: TextAlign.left, ), ), ), - const DigitTextFormField( - suffix: Padding( - padding: EdgeInsets.all(kPadding), - child: Icon(Icons.search), - ), - label: '', - formControlName: _facilityName, + ReactiveWrapperField( + formControlName: _facilityName, + builder: (field) { + return DigitSearchFormInput( + onChange: (value){ + field.control.value = value; + }, + ); + } ), ], ), @@ -104,13 +109,12 @@ class InventoryFacilitySelectionPageState return Container( color: Colors.white, padding: const EdgeInsets.symmetric( - horizontal: kPadding), + horizontal: spacer2), child: Container( margin: const EdgeInsets.symmetric( - horizontal: kPadding), + horizontal: spacer2), decoration: BoxDecoration( - color: - DigitTheme.instance.colors.alabasterWhite, + color:Theme.of(context).colorTheme.paper.secondary, border: Border( top: index == 0 ? borderSide : BorderSide.none, @@ -126,10 +130,9 @@ class InventoryFacilitySelectionPageState Navigator.of(context).pop(facility); }, child: Container( - margin: const EdgeInsets.all(kPadding), + margin: const EdgeInsets.all(spacer2), decoration: BoxDecoration( - color: DigitTheme - .instance.colors.alabasterWhite, + color: Theme.of(context).colorTheme.paper.secondary, border: Border( bottom: BorderSide( color: theme.colorScheme.outline, @@ -138,7 +141,7 @@ class InventoryFacilitySelectionPageState ), ), child: Padding( - padding: const EdgeInsets.all(kPadding * 2), + padding: const EdgeInsets.all(spacer4), child: Text( localizations.translate( '$facilityPrefix${facility.id}'), diff --git a/packages/inventory_management/lib/pages/manage_stocks.dart b/packages/inventory_management/lib/pages/manage_stocks.dart index 8730c8634..dd9c583d3 100644 --- a/packages/inventory_management/lib/pages/manage_stocks.dart +++ b/packages/inventory_management/lib/pages/manage_stocks.dart @@ -1,5 +1,8 @@ import 'package:auto_route/auto_route.dart'; -import 'package:digit_components/digit_components.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/atoms/menu_card.dart'; +import 'package:digit_ui_components/widgets/scrollable_content.dart'; import 'package:flutter/material.dart'; import 'package:inventory_management/router/inventory_router.gm.dart'; @@ -28,6 +31,7 @@ class ManageStocksPageState extends LocalizedState { @override Widget build(BuildContext context) { final theme = Theme.of(context); + final textTheme = theme.digitTextTheme(context); return Scaffold( body: ScrollableContent( @@ -38,86 +42,99 @@ class ManageStocksPageState extends LocalizedState { mainAxisSize: MainAxisSize.min, children: [ Padding( - padding: const EdgeInsets.fromLTRB( - kPadding * 2, kPadding, kPadding * 2, kPadding), + padding: const EdgeInsets.only(left: spacer2, right: spacer2, bottom: spacer4), child: Align( alignment: Alignment.topLeft, child: Text( localizations.translate(i18.manageStock.label), - style: theme.textTheme.displayMedium, + style: textTheme.headingXl, textAlign: TextAlign.center, ), ), ), Column(children: [ - DigitListView( - title: localizations - .translate(i18.manageStock.recordStockReceiptLabel), - description: localizations - .translate(i18.manageStock.recordStockReceiptDescription), - prefixIcon: Icons.file_download_outlined, - sufixIcon: Icons.arrow_circle_right, - onPressed: () { - context.router.push( - RecordStockWrapperRoute( - type: StockRecordEntryType.receipt, + Padding( + padding: const EdgeInsets.only(left: spacer2, right: spacer2), + child: MenuCard( + heading: localizations + .translate(i18.manageStock.recordStockReceiptLabel), + description: localizations + .translate(i18.manageStock.recordStockReceiptDescription), + icon: Icons.file_download_outlined, + onTap: () { + context.router.push( + RecordStockWrapperRoute( + type: StockRecordEntryType.receipt, + ), + ); + }, + ), + ), + const SizedBox(height: spacer4,), + Padding( + padding: const EdgeInsets.only(left: spacer2, right: spacer2), + child: MenuCard( + heading: localizations + .translate(i18.manageStock.recordStockIssuedLabel), + description: localizations.translate( + i18.manageStock.recordStockIssuedDescription), + icon: Icons.file_upload_outlined, + onTap: () => context.router.push( + RecordStockWrapperRoute( + type: StockRecordEntryType.dispatch, + ), + )), + ), + const SizedBox(height: spacer4,), + Padding( + padding: const EdgeInsets.only(left: spacer2, right: spacer2), + child: MenuCard( + heading: localizations + .translate(i18.manageStock.recordStockReturnedLabel), + description: localizations.translate( + i18.manageStock.recordStockReturnedDescription, + ), + icon: Icons.settings_backup_restore, + onTap: () => context.router.push( + RecordStockWrapperRoute( + type: StockRecordEntryType.returned, + ), + )), + ), + const SizedBox(height: spacer4,), + Padding( + padding: const EdgeInsets.only(left: spacer2, right: spacer2), + child: MenuCard( + heading: localizations + .translate(i18.manageStock.recordStockDamagedLabel), + description: localizations.translate( + i18.manageStock.recordStockDamagedDescription, + ), + icon: Icons.store, + onTap: () => context.router.push( + RecordStockWrapperRoute( + type: StockRecordEntryType.damaged, + ), + )), + ), + const SizedBox(height: spacer4,), + Padding( + padding: const EdgeInsets.only(left: spacer2, right: spacer2), + child: MenuCard( + heading: localizations + .translate(i18.manageStock.recordStockLossLabel), + description: localizations.translate( + i18.manageStock.recordStockDamagedDescription, ), - ); - }, + icon: Icons.store, + onTap: () => context.router.push( + RecordStockWrapperRoute( + type: StockRecordEntryType.loss, + ), + )), ), - DigitListView( - title: localizations - .translate(i18.manageStock.recordStockIssuedLabel), - description: localizations.translate( - i18.manageStock.recordStockIssuedDescription), - prefixIcon: Icons.file_upload_outlined, - sufixIcon: Icons.arrow_circle_right, - onPressed: () => context.router.push( - RecordStockWrapperRoute( - type: StockRecordEntryType.dispatch, - ), - )), - DigitListView( - title: localizations - .translate(i18.manageStock.recordStockReturnedLabel), - description: localizations.translate( - i18.manageStock.recordStockReturnedDescription, - ), - prefixIcon: Icons.settings_backup_restore, - sufixIcon: Icons.arrow_circle_right, - onPressed: () => context.router.push( - RecordStockWrapperRoute( - type: StockRecordEntryType.returned, - ), - )), - DigitListView( - title: localizations - .translate(i18.manageStock.recordStockDamagedLabel), - description: localizations.translate( - i18.manageStock.recordStockDamagedDescription, - ), - prefixIcon: Icons.store, - sufixIcon: Icons.arrow_circle_right, - onPressed: () => context.router.push( - RecordStockWrapperRoute( - type: StockRecordEntryType.damaged, - ), - )), - DigitListView( - title: localizations - .translate(i18.manageStock.recordStockLossLabel), - description: localizations.translate( - i18.manageStock.recordStockDamagedDescription, - ), - prefixIcon: Icons.store, - sufixIcon: Icons.arrow_circle_right, - onPressed: () => context.router.push( - RecordStockWrapperRoute( - type: StockRecordEntryType.loss, - ), - )), ]), - const SizedBox(height: 16), + const SizedBox(height: spacer4), ], ), ], diff --git a/packages/inventory_management/lib/pages/record_stock/record_stock_wrapper.dart b/packages/inventory_management/lib/pages/record_stock/record_stock_wrapper.dart index b066065f4..3b82830a9 100644 --- a/packages/inventory_management/lib/pages/record_stock/record_stock_wrapper.dart +++ b/packages/inventory_management/lib/pages/record_stock/record_stock_wrapper.dart @@ -1,11 +1,14 @@ // Importing necessary packages and modules import 'package:auto_route/auto_route.dart'; +import 'package:digit_ui_components/services/location_bloc.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:inventory_management/inventory_management.dart'; import 'package:inventory_management/utils/extensions/extensions.dart'; import 'package:inventory_management/widgets/component_wrapper/facility_bloc_wrapper.dart'; import 'package:inventory_management/widgets/component_wrapper/product_variant_bloc_wrapper.dart'; +import 'package:location/location.dart'; + import '../../blocs/record_stock.dart'; // This class is a wrapper for the RecordStock page. @@ -39,15 +42,24 @@ class RecordStockWrapperPage extends StatelessWidget projectId: InventorySingleton().projectId, child: ProductVariantBlocWrapper( projectId: InventorySingleton().projectId, - child: BlocProvider( - create: (_) => RecordStockBloc( - stockRepository: - context.repository(context), - RecordStockCreateState( - entryType: type, - projectId: InventorySingleton().projectId, + child: MultiBlocProvider( + providers: [ + BlocProvider( + create: (context) { + return RecordStockBloc( + stockRepository: context + .repository(context), + RecordStockCreateState( + entryType: type, + projectId: InventorySingleton().projectId, + ), + ); + }, + ), + BlocProvider( + create: (_) => LocationBloc(location: Location()), ), - ), + ], child: this, ), ), diff --git a/packages/inventory_management/lib/pages/record_stock/stock_details.dart b/packages/inventory_management/lib/pages/record_stock/stock_details.dart index be040e8e4..c6117b1fc 100644 --- a/packages/inventory_management/lib/pages/record_stock/stock_details.dart +++ b/packages/inventory_management/lib/pages/record_stock/stock_details.dart @@ -1,10 +1,15 @@ import 'package:auto_route/auto_route.dart'; -import 'package:digit_components/digit_components.dart'; -import 'package:digit_components/widgets/atoms/digit_toaster.dart'; -import 'package:digit_components/widgets/digit_sync_dialog.dart'; import 'package:digit_data_model/data_model.dart'; import 'package:digit_scanner/blocs/scanner.dart'; import 'package:digit_scanner/pages/qr_scanner.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/services/location_bloc.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/utils/component_utils.dart'; +import 'package:digit_ui_components/widgets/atoms/input_wrapper.dart'; +import 'package:digit_ui_components/widgets/atoms/pop_up_card.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; +import 'package:digit_ui_components/widgets/molecules/show_pop_up.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:gs1_barcode_parser/gs1_barcode_parser.dart'; @@ -46,6 +51,7 @@ class StockDetailsPageState extends LocalizedState { List transportTypes = []; List scannedResources = []; + TextEditingController controller1 = TextEditingController(); FormGroup _form(StockRecordEntryType stockType) { return fb.group({ @@ -54,7 +60,7 @@ class StockDetailsPageState extends LocalizedState { validators: [Validators.required], ), _transactionQuantityKey: FormControl(validators: [ - Validators.number, + Validators.number(), Validators.required, Validators.min(0), Validators.max(10000), @@ -84,9 +90,9 @@ class StockDetailsPageState extends LocalizedState { @override Widget build(BuildContext context) { final theme = Theme.of(context); + final textTheme = theme.digitTextTheme(context); bool isWareHouseMgr = InventorySingleton().isWareHouseMgr; - final parser = GS1BarcodeParser.defaultParser(); return PopScope( onPopInvoked: (didPop) { @@ -120,7 +126,6 @@ class StockDetailsPageState extends LocalizedState { const module = i18.stockDetails; String pageTitle; - String transactionPartyLabel; String quantityCountLabel; String? transactionReasonLabel; String? transactionReason; @@ -131,23 +136,18 @@ class StockDetailsPageState extends LocalizedState { switch (entryType) { case StockRecordEntryType.receipt: pageTitle = module.receivedPageTitle; - transactionPartyLabel = - module.selectTransactingPartyReceived; quantityCountLabel = module.quantityReceivedLabel; transactionType = TransactionType.received.toValue(); break; case StockRecordEntryType.dispatch: pageTitle = module.issuedPageTitle; - transactionPartyLabel = module.selectTransactingPartyIssued; quantityCountLabel = module.quantitySentLabel; transactionType = TransactionType.dispatched.toValue(); break; case StockRecordEntryType.returned: pageTitle = module.returnedPageTitle; - transactionPartyLabel = - module.selectTransactingPartyReturned; quantityCountLabel = module.quantityReturnedLabel; transactionType = TransactionType.received.toValue(); break; @@ -164,8 +164,6 @@ class StockDetailsPageState extends LocalizedState { break; case StockRecordEntryType.damaged: pageTitle = module.damagedPageTitle; - transactionPartyLabel = - module.selectTransactingPartyReceivedFromDamaged; quantityCountLabel = module.quantityDamagedLabel; transactionReasonLabel = module.transactionReasonDamaged; transactionType = TransactionType.dispatched.toValue(); @@ -208,607 +206,684 @@ class StockDetailsPageState extends LocalizedState { }, ), ]), - enableFixedButton: true, + enableFixedDigitButton: true, footer: DigitCard( - margin: const EdgeInsets.fromLTRB(0, kPadding, 0, 0), - padding: const EdgeInsets.fromLTRB( - kPadding, - 0, - kPadding, - 0, - ), - child: ReactiveFormConsumer( - builder: (context, form, child) { - if (form - .control(_deliveryTeamKey) - .value - .toString() - .isEmpty || - form.control(_deliveryTeamKey).value == null || - scannerState.qrCodes.isNotEmpty) { - form.control(_deliveryTeamKey).value = - scannerState.qrCodes.isNotEmpty - ? scannerState.qrCodes.last - : ''; - } - return DigitElevatedButton( - onPressed: !form.valid - ? null - : () async { - form.markAllAsTouched(); - if (!form.valid) { - return; - } - final primaryId = - BlocProvider.of( - context, - ).state.primaryId; - final secondaryParty = - selectedFacilityId != null - ? FacilityModel( - id: selectedFacilityId - .toString(), - ) - : null; - final deliveryTeamName = form - .control(_deliveryTeamKey) - .value as String?; - - if (deliveryTeamSelected && - (form - .control( - _deliveryTeamKey, - ) - .value == - null || - form - .control(_deliveryTeamKey) - .value - .toString() - .trim() - .isEmpty)) { - DigitToast.show( + margin: const EdgeInsets.fromLTRB(0, spacer2, 0, 0), + children: [ + ReactiveFormConsumer( + builder: (context, form, child) { + if (form + .control(_deliveryTeamKey) + .value + .toString() + .isEmpty || + form.control(_deliveryTeamKey).value == + null || + scannerState.qrCodes.isNotEmpty) { + form.control(_deliveryTeamKey).value = + scannerState.qrCodes.isNotEmpty + ? scannerState.qrCodes.last + : ''; + } + return DigitButton( + type: DigitButtonType.primary, + size: DigitButtonSize.large, + mainAxisSize: MainAxisSize.max, + onPressed: !form.valid + ? () {} + : () async { + form.markAllAsTouched(); + if (!form.valid) { + return; + } + final primaryId = + BlocProvider.of( context, - options: DigitToastOptions( - localizations.translate( + ).state.primaryId; + final secondaryParty = + selectedFacilityId != null + ? FacilityModel( + id: selectedFacilityId + .toString(), + ) + : null; + final deliveryTeamName = form + .control(_deliveryTeamKey) + .value as String?; + + if (deliveryTeamSelected && + (form + .control( + _deliveryTeamKey, + ) + .value == + null || + form + .control(_deliveryTeamKey) + .value + .toString() + .trim() + .isEmpty)) { + Toast.showToast( + context, + type: ToastType.error, + message: localizations.translate( i18.stockDetails.teamCodeRequired, ), - true, - theme, - ), - ); - } else if ((primaryId == - secondaryParty?.id) || - (primaryId == deliveryTeamName)) { - DigitToast.show( - context, - options: DigitToastOptions( - localizations.translate( + ); + } else if ((primaryId == + secondaryParty?.id) || + (primaryId == deliveryTeamName)) { + Toast.showToast( + context, + type: ToastType.error, + message: localizations.translate( i18.stockDetails .senderReceiverValidation, ), - true, - theme, - ), - ); - } else { - FocusManager.instance.primaryFocus - ?.unfocus(); - context - .read() - .add(const LoadLocationEvent()); - DigitComponentsUtils() - .showLocationCapturingDialog( - context, - localizations.translate(i18 - .common.locationCapturing), - DigitSyncDialogType.inProgress); - Future.delayed( - const Duration(seconds: 2), - () async { - DigitComponentsUtils() - .hideDialog(context); - final bloc = - context.read(); + ); + } else { + FocusManager.instance.primaryFocus + ?.unfocus(); + context + .read() + .add(const LoadLocationEvent()); + DigitComponentsUtils.showDialog( + context, + localizations.translate( + i18.common.locationCapturing), + DialogType.inProgress); + Future.delayed( + const Duration(seconds: 2), + () async { + DigitComponentsUtils.hideDialog( + context); + final bloc = + context.read(); - final productVariant = form - .control(_productVariantKey) - .value as ProductVariantModel; + final productVariant = form + .control(_productVariantKey) + .value as ProductVariantModel; - switch (entryType) { - case StockRecordEntryType.receipt: - transactionReason = - TransactionReason.received - .toValue(); - break; - case StockRecordEntryType.dispatch: - transactionReason = null; - break; - case StockRecordEntryType.returned: - transactionReason = - TransactionReason.returned - .toValue(); - break; - default: - transactionReason = form - .control( - _transactionReasonKey, - ) - .value as String?; - break; - } + switch (entryType) { + case StockRecordEntryType.receipt: + transactionReason = + TransactionReason.received + .toValue(); + break; + case StockRecordEntryType + .dispatch: + transactionReason = null; + break; + case StockRecordEntryType + .returned: + transactionReason = + TransactionReason.returned + .toValue(); + break; + default: + transactionReason = form + .control( + _transactionReasonKey, + ) + .value as String?; + break; + } - final quantity = form - .control(_transactionQuantityKey) - .value; + final quantity = form + .control( + _transactionQuantityKey) + .value; - final waybillNumber = form - .control(_waybillNumberKey) - .value as String?; + final waybillNumber = form + .control(_waybillNumberKey) + .value as String?; - final waybillQuantity = form - .control(_waybillQuantityKey) - .value as String?; + final waybillQuantity = form + .control(_waybillQuantityKey) + .value as String?; - final vehicleNumber = form - .control(_vehicleNumberKey) - .value as String?; + final vehicleNumber = form + .control(_vehicleNumberKey) + .value as String?; - final lat = locationState.latitude; - final lng = locationState.longitude; + final lat = locationState.latitude; + final lng = locationState.longitude; - final hasLocationData = - lat != null && lng != null; + final hasLocationData = + lat != null && lng != null; - final comments = form - .control(_commentsKey) - .value as String?; + final comments = form + .control(_commentsKey) + .value as String?; - final deliveryTeamName = form - .control(_deliveryTeamKey) - .value as String?; + final deliveryTeamName = form + .control(_deliveryTeamKey) + .value as String?; - String? senderId; - String? senderType; - String? receiverId; - String? receiverType; + String? senderId; + String? senderType; + String? receiverId; + String? receiverType; - final primaryType = - BlocProvider.of( - context, - ).state.primaryType; + final primaryType = BlocProvider.of< + RecordStockBloc>( + context, + ).state.primaryType; - final primaryId = - BlocProvider.of( - context, - ).state.primaryId; + final primaryId = BlocProvider.of< + RecordStockBloc>( + context, + ).state.primaryId; - switch (entryType) { - case StockRecordEntryType.receipt: - case StockRecordEntryType.loss: - case StockRecordEntryType.damaged: - case StockRecordEntryType.returned: - if (deliveryTeamSelected) { - senderId = deliveryTeamName; - senderType = "STAFF"; - } else { - senderId = secondaryParty?.id; - senderType = "WAREHOUSE"; - } - receiverId = primaryId; - receiverType = primaryType; + switch (entryType) { + case StockRecordEntryType.receipt: + case StockRecordEntryType.loss: + case StockRecordEntryType.damaged: + case StockRecordEntryType + .returned: + if (deliveryTeamSelected) { + senderId = deliveryTeamName; + senderType = "STAFF"; + } else { + senderId = secondaryParty?.id; + senderType = "WAREHOUSE"; + } + receiverId = primaryId; + receiverType = primaryType; - break; - case StockRecordEntryType.dispatch: - if (deliveryTeamSelected) { - receiverId = deliveryTeamName; - receiverType = "STAFF"; - } else { - receiverId = secondaryParty?.id; - receiverType = "WAREHOUSE"; - } - senderId = primaryId; - senderType = primaryType; - break; - } + break; + case StockRecordEntryType + .dispatch: + if (deliveryTeamSelected) { + receiverId = deliveryTeamName; + receiverType = "STAFF"; + } else { + receiverId = + secondaryParty?.id; + receiverType = "WAREHOUSE"; + } + senderId = primaryId; + senderType = primaryType; + break; + } - final stockModel = StockModel( - clientReferenceId: - IdGen.i.identifier, - productVariantId: productVariant.id, - transactionReason: - transactionReason, - transactionType: transactionType, - referenceId: stockState.projectId, - referenceIdType: 'PROJECT', - quantity: quantity.toString(), - wayBillNumber: waybillNumber, - receiverId: receiverId, - receiverType: receiverType, - senderId: senderId, - senderType: senderType, - auditDetails: AuditDetails( - createdBy: InventorySingleton() - .loggedInUserUuid, - createdTime: context - .millisecondsSinceEpoch(), - ), - clientAuditDetails: - ClientAuditDetails( - createdBy: InventorySingleton() - .loggedInUserUuid, - createdTime: context - .millisecondsSinceEpoch(), - lastModifiedBy: - InventorySingleton() - .loggedInUserUuid, - lastModifiedTime: context - .millisecondsSinceEpoch(), - ), - additionalFields: [ - waybillQuantity, - vehicleNumber, - comments, - ].any((element) => - element != null) || - hasLocationData - ? StockAdditionalFields( - version: 1, - fields: [ - AdditionalField( - InventoryManagementEnums - .name - .toValue(), - InventorySingleton() - .loggedInUser - ?.name, - ), - if (waybillQuantity != - null && - waybillQuantity - .trim() - .isNotEmpty) - AdditionalField( - 'waybill_quantity', - waybillQuantity, - ), - if (vehicleNumber != - null && - vehicleNumber - .trim() - .isNotEmpty) - AdditionalField( - 'vehicle_number', - vehicleNumber, - ), - if (comments != null && - comments - .trim() - .isNotEmpty) - AdditionalField( - 'comments', - comments, - ), - if (deliveryTeamName != - null && - deliveryTeamName - .trim() - .isNotEmpty) - AdditionalField( - 'deliveryTeam', - deliveryTeamName, - ), - if (hasLocationData) ...[ - AdditionalField( - 'lat', - lat, - ), + final stockModel = StockModel( + clientReferenceId: + IdGen.i.identifier, + productVariantId: + productVariant.id, + transactionReason: + transactionReason, + transactionType: transactionType, + referenceId: stockState.projectId, + referenceIdType: 'PROJECT', + quantity: quantity.toString(), + wayBillNumber: waybillNumber, + receiverId: receiverId, + receiverType: receiverType, + senderId: senderId, + senderType: senderType, + auditDetails: AuditDetails( + createdBy: InventorySingleton() + .loggedInUserUuid, + createdTime: context + .millisecondsSinceEpoch(), + ), + clientAuditDetails: + ClientAuditDetails( + createdBy: InventorySingleton() + .loggedInUserUuid, + createdTime: context + .millisecondsSinceEpoch(), + lastModifiedBy: + InventorySingleton() + .loggedInUserUuid, + lastModifiedTime: context + .millisecondsSinceEpoch(), + ), + additionalFields: [ + waybillQuantity, + vehicleNumber, + comments, + ].any((element) => + element != null) || + hasLocationData + ? StockAdditionalFields( + version: 1, + fields: [ AdditionalField( - 'lng', - lng, + InventoryManagementEnums + .name + .toValue(), + InventorySingleton() + .loggedInUser + ?.name, ), + if (waybillQuantity != + null && + waybillQuantity + .trim() + .isNotEmpty) + AdditionalField( + 'waybill_quantity', + waybillQuantity, + ), + if (vehicleNumber != + null && + vehicleNumber + .trim() + .isNotEmpty) + AdditionalField( + 'vehicle_number', + vehicleNumber, + ), + if (comments != null && + comments + .trim() + .isNotEmpty) + AdditionalField( + 'comments', + comments, + ), + if (deliveryTeamName != + null && + deliveryTeamName + .trim() + .isNotEmpty) + AdditionalField( + 'deliveryTeam', + deliveryTeamName, + ), + if (hasLocationData) ...[ + AdditionalField( + 'lat', + lat, + ), + AdditionalField( + 'lng', + lng, + ), + ], + if (scannerState + .barCodes + .isNotEmpty) + addBarCodesToFields( + scannerState + .barCodes), ], - if (scannerState - .barCodes.isNotEmpty) - addBarCodesToFields( - scannerState - .barCodes), - ], - ) - : null, - ); - - bloc.add( - RecordStockSaveStockDetailsEvent( - stockModel: stockModel, - ), - ); + ) + : null, + ); - final submit = - await DigitDialog.show( - context, - options: DigitDialogOptions( - key: const Key('submitDialog'), - titleText: - localizations.translate( - i18.stockDetails.dialogTitle, - ), - contentText: - localizations.translate( - i18.stockDetails.dialogContent, + bloc.add( + RecordStockSaveStockDetailsEvent( + stockModel: stockModel, ), - primaryAction: DigitDialogActions( - label: localizations.translate( - i18.common.coreCommonSubmit, + ); + + final submit = + await showCustomPopup( + context: context, + builder: (popupContext) => Popup( + title: localizations.translate( + i18.stockDetails.dialogTitle, ), - action: (context) { - Navigator.of( - context, - rootNavigator: true, - ).pop(true); + onOutsideTap: () { + Navigator.of(popupContext) + .pop(false); }, - ), - secondaryAction: - DigitDialogActions( - label: localizations.translate( - i18.common.coreCommonCancel, + description: + localizations.translate( + i18.stockDetails + .dialogContent, ), - action: (context) => - Navigator.of( - context, - rootNavigator: true, - ).pop(false), + type: PopUpType.simple, + actions: [ + DigitButton( + label: + localizations.translate( + i18.common + .coreCommonSubmit, + ), + onPressed: () { + Navigator.of( + popupContext, + rootNavigator: true, + ).pop(true); + }, + type: + DigitButtonType.primary, + size: DigitButtonSize.large, + ), + DigitButton( + label: + localizations.translate( + i18.common + .coreCommonCancel, + ), + onPressed: () { + Navigator.of( + popupContext, + rootNavigator: true, + ).pop(false); + }, + type: DigitButtonType + .secondary, + size: DigitButtonSize.large, + ), + ], ), - ), - ); + ) as bool; - if (submit ?? false) { - bloc.add( - const RecordStockCreateStockEntryEvent(), - ); - } - }); - } - }, - child: Center( - child: Text( - localizations - .translate(i18.common.coreCommonSubmit), - ), - ), - ); - }), + if (submit ?? false) { + bloc.add( + const RecordStockCreateStockEntryEvent(), + ); + } + }); + } + }, + isDisabled: !form.valid, + label: localizations + .translate(i18.common.coreCommonSubmit), + ); + }) + ], ), children: [ DigitCard( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - Text( - localizations.translate(pageTitle), - style: theme.textTheme.displayMedium, - ), - BlocBuilder( - builder: (context, state) { - return state.maybeWhen( - orElse: () => const Offstage(), - loading: () => const Center( - child: CircularProgressIndicator(), + children: [ + Text( + localizations.translate(pageTitle), + style: textTheme.headingXl, + ), + BlocBuilder( + builder: (context, state) { + return state.maybeWhen( + orElse: () => const Offstage(), + loading: () => const Center( + child: CircularProgressIndicator(), + ), + empty: () => Center( + child: Text(localizations.translate( + i18.stockDetails.noProductsFound, + )), + ), + fetched: (productVariants) { + return ReactiveWrapperField( + formControlName: _productVariantKey, + validationMessages: { + 'required': (object) => + '${module.selectProductLabel}_IS_REQUIRED', + }, + showErrors: (control) => + control.invalid && control.touched, + builder: (field) { + return LabeledField( + label: localizations.translate( + module.selectProductLabel, + ), + isRequired: true, + child: DigitDropdown( + errorMessage: field.errorText, + emptyItemText: + localizations.translate( + i18.common.noMatchFound, + ), + items: productVariants + .map((variant) { + return DropdownItem( + name: localizations.translate( + variant.sku ?? variant.id, + ), + code: variant.id, + ); + }).toList(), + onSelect: (value) { + /// Find the selected product variant model by matching the id + final selectedVariant = + productVariants.firstWhere( + (variant) => + variant.id == value.code, + ); + + /// Update the form control with the selected product variant model + field.control.value = + selectedVariant; + }, + ), + ); + }, + ); + }, + ); + }, + ), + if ([ + StockRecordEntryType.loss, + StockRecordEntryType.damaged, + ].contains(entryType)) + ReactiveWrapperField( + formControlName: _transactionReasonKey, + builder: (field) { + return LabeledField( + label: localizations.translate( + transactionReasonLabel ?? 'Reason', ), - empty: () => Center( - child: Text(localizations.translate( - i18.stockDetails.noProductsFound, - )), + isRequired: true, + child: DigitDropdown( + emptyItemText: localizations.translate( + i18.common.noMatchFound, + ), + items: reasons!.map((reason) { + return DropdownItem( + name: + localizations.translate(reason), + code: reason.toString(), + ); + }).toList(), + onSelect: (value) { + final selectedReason = + reasons?.firstWhere( + (reason) => + reason.toString() == value.code, + ); + field.control.value = selectedReason; + }, ), - fetched: (productVariants) { - return DigitReactiveDropdown< - ProductVariantModel>( - key: const Key(_productVariantKey), - formControlName: _productVariantKey, - label: localizations.translate( - module.selectProductLabel, - ), - isRequired: true, - valueMapper: (value) { - return localizations.translate( - value.sku ?? value.id, - ); - }, - menuItems: productVariants, - validationMessages: { - 'required': (object) => - '${module.selectProductLabel}_IS_REQUIRED', - }, - ); - }, ); }, ), - if ([ - StockRecordEntryType.loss, - StockRecordEntryType.damaged, - ].contains(entryType)) - DigitReactiveDropdown( - key: const Key(_transactionReasonKey), - label: localizations.translate( - transactionReasonLabel ?? 'Reason', - ), - menuItems: reasons ?? [], - formControlName: _transactionReasonKey, - valueMapper: (value) => - localizations.translate(value), - isRequired: true, - ), - BlocBuilder( - builder: (context, state) { - return state.maybeWhen( - orElse: () => const Offstage(), - loading: () => const Center( - child: - CircularProgressIndicator(), + BlocBuilder( + builder: (context, state) { + return state.maybeWhen( + orElse: () => const Offstage(), + loading: () => const Center( + child: CircularProgressIndicator(), + ), + fetched: (facilities, allFacilities) { + return Column( + children: [ + const SizedBox( + height: spacer4, ), - fetched: (facilities, allFacilities) { - return InkWell( - onTap: () async { - clearQRCodes(); - form - .control(_deliveryTeamKey) - .value = ''; + InkWell( + onTap: () async { + clearQRCodes(); + form + .control(_deliveryTeamKey) + .value = ''; - final facility = - await context.router.push( - InventoryFacilitySelectionRoute( - facilities: - allFacilities)) - as FacilityModel?; + final facility = + await context.router.push( + InventoryFacilitySelectionRoute( + facilities: + facilities)) + as FacilityModel?; - if (facility == null) return; - form - .control(_secondaryPartyKey) - .value = - localizations.translate( - 'FAC_${facility.id}', - ); - - setState(() { - selectedFacilityId = - facility.id; - }); - if (facility.id == - 'Delivery Team') { + if (facility == null) return; + form + .control(_secondaryPartyKey) + .value = + localizations.translate( + 'FAC_${facility.id}', + ); + controller1.text = + localizations.translate( + 'FAC_${facility.id}'); setState(() { - deliveryTeamSelected = true; + selectedFacilityId = + facility.id; }); - } else { - setState(() { - deliveryTeamSelected = false; - }); - } - }, - child: IgnorePointer( - child: DigitTextFormField( - key: const Key( - _secondaryPartyKey), - hideKeyboard: true, - label: localizations.translate( - '${pageTitle}_${i18.stockReconciliationDetails.stockLabel}', - ), - isRequired: true, - validationMessages: { - 'required': (object) => - localizations.translate( - '${i18.individualDetails.nameLabelText}_IS_REQUIRED', - ), - }, - suffix: const Padding( - padding: EdgeInsets.all(8.0), - child: Icon(Icons.search), - ), - formControlName: - _secondaryPartyKey, - onTap: () async { - clearQRCodes(); - form - .control(_deliveryTeamKey) - .value = ''; - - final facility = - await context.router.push( - InventoryFacilitySelectionRoute( - facilities: allFacilities, - ), - ) as FacilityModel?; - - if (facility == null) return; - form - .control( - _secondaryPartyKey) - .value = - localizations.translate( - 'FAC_${facility.id}', - ); - + if (facility.id == + 'Delivery Team') { setState(() { - selectedFacilityId = - facility.id; + deliveryTeamSelected = true; }); - if (facility.id == - 'Delivery Team') { - setState(() { - deliveryTeamSelected = - true; - }); - } else { - setState(() { - deliveryTeamSelected = - false; - }); - } - }, - ), - ), - ); - }); - }, - ), - Visibility( - visible: deliveryTeamSelected, - child: DigitTextFormField( - label: localizations.translate( - i18.stockReconciliationDetails - .teamCodeLabel, - ), - onChanged: (val) { - String? value = val.value as String?; - if (value != null && - value.trim().isNotEmpty) { - context.read().add( - DigitScannerEvent.handleScanner( - barCode: [], - qrCode: [value], - manualCode: value, + } else { + setState(() { + deliveryTeamSelected = + false; + }); + } + }, + child: IgnorePointer( + child: ReactiveWrapperField( + formControlName: + _secondaryPartyKey, + validationMessages: { + 'required': (object) => + localizations + .translate( + '${i18.individualDetails.nameLabelText}_IS_REQUIRED', + ), + }, + showErrors: (control) => + control.invalid && + control.touched, + builder: (field) { + return InputField( + type: InputType.search, + isRequired: true, + label: localizations + .translate( + '${pageTitle}_${i18.stockReconciliationDetails.stockLabel}', + ), + onChange: (value) { + field.control + .markAsTouched(); + }, + controller: controller1, + errorMessage: + field.errorText, + ); + }), ), - ); - } else { - clearQRCodes(); - } - }, - suffix: IconButton( - onPressed: () { - //[TODO: Add route to auto_route] - Navigator.of(context).push( - MaterialPageRoute( - builder: (context) => - const DigitScannerPage( - quantity: 5, - isGS1code: false, - singleValue: false, ), - settings: const RouteSettings( - name: '/qr-scanner'), - ), + ], ); - }, - icon: Icon( - Icons.qr_code_2, - color: theme.colorScheme.secondary, - ), - ), - isRequired: deliveryTeamSelected, - maxLines: 3, + }); + }, + ), + // TODO: as this case i need to set when occurring + Visibility( + visible: deliveryTeamSelected, + child: ReactiveWrapperField( formControlName: _deliveryTeamKey, - ), - ), - DigitTextFormField( - key: const Key(_transactionQuantityKey), + builder: (field) { + return InputField( + type: InputType.text, + label: localizations.translate( + i18.stockReconciliationDetails + .teamCodeLabel, + ), + isRequired: deliveryTeamSelected, + suffixIcon: Icons.qr_code_2, + onSuffixTap: (value) { + //[TODO: Add route to auto_route] + Navigator.of(context).push( + MaterialPageRoute( + builder: (context) => + const DigitScannerPage( + quantity: 5, + isGS1code: false, + singleValue: false, + ), + settings: const RouteSettings( + name: '/qr-scanner'), + ), + ); + }, + onChange: (val) { + String? value = val; + if (value != null && + value.trim().isNotEmpty) { + context + .read() + .add( + DigitScannerEvent + .handleScanner( + barCode: [], + qrCode: [value], + manualCode: value, + ), + ); + } else { + clearQRCodes(); + } + }, + ); + }), + // DigitTextFormField( + // label: localizations.translate( + // i18.stockReconciliationDetails + // .teamCodeLabel, + // ), + // onChanged: (val) { + // String? value = val.value as String?; + // if (value != null && + // value.trim().isNotEmpty) { + // context.read().add( + // DigitScannerEvent.handleScanner( + // barCode: [], + // qrCode: [value], + // manualCode: value, + // ), + // ); + // } else { + // clearQRCodes(); + // } + // }, + // suffix: IconButton( + // onPressed: () { + // //[TODO: Add route to auto_route] + // Navigator.of(context).push( + // MaterialPageRoute( + // builder: (context) => + // const DigitScannerPage( + // quantity: 5, + // isGS1code: false, + // singleValue: false, + // ), + // settings: const RouteSettings( + // name: '/qr-scanner'), + // ), + // ); + // }, + // icon: Icon( + // Icons.qr_code_2, + // color: theme.colorScheme.secondary, + // ), + // ), + // isRequired: deliveryTeamSelected, + // maxLines: 3, + // formControlName: _deliveryTeamKey, + // ), + ), + ReactiveWrapperField( formControlName: _transactionQuantityKey, - keyboardType: - const TextInputType.numberWithOptions( - decimal: true, - ), - isRequired: true, validationMessages: { "number": (object) => localizations.translate( @@ -821,182 +896,208 @@ class StockDetailsPageState extends LocalizedState { '${quantityCountLabel}_MIN_ERROR', ), }, - onChanged: (val) { - if (val.value != null) { - if (val.value > 10000000000) { - form - .control(_transactionQuantityKey) - .value = 10000; - } - } - }, - label: localizations.translate( - quantityCountLabel, - ), - ), - if (isWareHouseMgr) - DigitTextFormField( - key: const Key(_waybillNumberKey), + showErrors: (control) => + control.invalid && control.touched, + builder: (field) { + return LabeledField( label: localizations.translate( - i18.stockDetails.waybillNumberLabel, - ), - formControlName: _waybillNumberKey, - keyboardType: - const TextInputType.numberWithOptions( - decimal: true, + quantityCountLabel, ), - validationMessages: { - 'maxLength': (object) => localizations - .translate( - i18.common.maxCharsRequired) - .replaceAll('{}', '200'), - 'minLength': (object) => localizations - .translate( - i18.common.min2CharsRequired) - .replaceAll('{}', ''), - }), - if (isWareHouseMgr) - DigitTextFormField( - label: localizations.translate( - i18.stockDetails - .quantityOfProductIndicatedOnWaybillLabel, + isRequired: true, + child: BaseDigitFormInput( + errorMessage: field.errorText, + keyboardType: const TextInputType + .numberWithOptions( + decimal: true, + ), + onChange: (val) { + field.control.markAsTouched(); + if (int.parse(val) > 10000000000) { + field.control.value = 10000; + } else { + if (val != '') { + field.control.value = + int.parse(val); + } else { + field.control.value = null; + } + } + }, ), - formControlName: _waybillQuantityKey, - onChanged: (val) { - if (val.toString().isEmpty || - val.value == null) { - form - .control(_waybillQuantityKey) - .value = '0'; - } - }), - if (isWareHouseMgr) - transportTypes.isNotEmpty - ? DigitReactiveDropdown( - key: const Key(_typeOfTransportKey), - isRequired: false, - label: localizations.translate( - i18.stockDetails.transportTypeLabel, - ), - valueMapper: (e) => e, - onChanged: (value) { - setState(() { - form.control( - _typeOfTransportKey, - ); - }); - }, - initialValue: - transportTypes.firstOrNull?.name, - menuItems: transportTypes.map( - (e) { - return localizations - .translate(e.name); - }, - ).toList(), - formControlName: _typeOfTransportKey, - ) - : const Offstage(), - if (isWareHouseMgr) - DigitTextFormField( - label: localizations.translate( - i18.stockDetails.vehicleNumberLabel, - ), - formControlName: _vehicleNumberKey, - ), - DigitTextFormField( - label: localizations.translate( - i18.stockDetails.commentsLabel, - ), - minLines: 2, - maxLines: 3, - formControlName: _commentsKey, - ), - scannerState.barCodes.isEmpty - ? DigitOutlineIconButton( - buttonStyle: OutlinedButton.styleFrom( - shape: const RoundedRectangleBorder( - borderRadius: BorderRadius.zero, - ), + ); + }), + if (isWareHouseMgr) + ReactiveWrapperField( + formControlName: _waybillNumberKey, + builder: (field) { + return InputField( + type: InputType.text, + label: localizations.translate( + i18.stockDetails.waybillNumberLabel, ), - onPressed: () { - //[TODO: Add route to auto_route] - Navigator.of(context).push( - MaterialPageRoute( - builder: (context) => - const DigitScannerPage( - quantity: 5, - isGS1code: true, - singleValue: false, + onChange: (val) { + field.control.value = val; + }, + ); + }), + if (isWareHouseMgr) + ReactiveWrapperField( + formControlName: _waybillQuantityKey, + builder: (field) { + return InputField( + type: InputType.text, + label: localizations.translate( + i18.stockDetails + .quantityOfProductIndicatedOnWaybillLabel, + ), + onChange: (val) { + if (val == '') { + field.control.value = '0'; + } else { + field.control.value = val; + } + }, + ); + }), + if (isWareHouseMgr) + transportTypes.isNotEmpty + ? ReactiveWrapperField( + formControlName: _typeOfTransportKey, + builder: (field) { + return LabeledField( + label: localizations.translate( + i18.stockDetails + .transportTypeLabel, + ), + child: DigitDropdown( + emptyItemText: + localizations.translate( + i18.common.noMatchFound, ), - settings: const RouteSettings( - name: '/qr-scanner'), + items: transportTypes.map((type) { + return DropdownItem( + name: localizations + .translate(type.name), + code: type.code, + ); + }).toList(), + onSelect: (value) { + field.control.value = + value.name; + }, ), ); }, - icon: Icons.qr_code, + ) + : const Offstage(), + if (isWareHouseMgr) + ReactiveWrapperField( + formControlName: _vehicleNumberKey, + builder: (field) { + return InputField( + type: InputType.text, label: localizations.translate( - i18.common.scanBales, + i18.stockDetails.vehicleNumberLabel, ), - ) - : Column(children: [ - Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Align( - alignment: Alignment.centerLeft, - child: Text( - localizations.translate(i18 - .stockDetails - .scannedResources), - style: DigitTheme - .instance - .mobileTheme - .textTheme - .labelSmall, - ), + onChange: (val) { + field.control.value = val; + }, + ); + }), + ReactiveWrapperField( + formControlName: _commentsKey, + builder: (field) { + return InputField( + type: InputType.textArea, + label: localizations.translate( + i18.stockDetails.commentsLabel, + ), + onChange: (val) { + field.control.value = val; + }, + ); + }), + scannerState.barCodes.isEmpty + ? DigitButton( + mainAxisSize: MainAxisSize.max, + size: DigitButtonSize.large, + type: DigitButtonType.secondary, + onPressed: () { + //[TODO: Add route to auto_route] + Navigator.of(context).push( + MaterialPageRoute( + builder: (context) => + const DigitScannerPage( + quantity: 5, + isGS1code: true, + singleValue: false, ), - Padding( - padding: const EdgeInsets.only( - bottom: kPadding * 2, - ), - child: IconButton( - alignment: - Alignment.centerRight, - color: - theme.colorScheme.secondary, - icon: const Icon(Icons.edit), - onPressed: () { - //[TODO: Add route to auto_route] - Navigator.of(context).push( - MaterialPageRoute( - builder: (context) => - const DigitScannerPage( - quantity: 5, - isGS1code: true, - singleValue: false, - ), - settings: - const RouteSettings( - name: - '/qr-scanner'), + settings: const RouteSettings( + name: '/qr-scanner'), + ), + ); + }, + prefixIcon: Icons.qr_code, + label: localizations.translate( + i18.common.scanBales, + ), + ) + : Column(children: [ + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Align( + alignment: Alignment.centerLeft, + child: Text( + localizations.translate(i18 + .stockDetails + .scannedResources), + style: DigitTheme + .instance + .mobileTheme + .textTheme + .labelSmall, + ), + ), + Padding( + padding: const EdgeInsets.only( + bottom: spacer4, + ), + child: IconButton( + alignment: Alignment.centerRight, + color: theme + .colorTheme.primary.primary1, + icon: const Icon(Icons.edit), + onPressed: () { + //[TODO: Add route to auto_route] + Navigator.of(context).push( + MaterialPageRoute( + builder: (context) => + const DigitScannerPage( + quantity: 5, + isGS1code: true, + singleValue: false, ), - ); - }, - ), + settings: + const RouteSettings( + name: + '/qr-scanner'), + ), + ); + }, ), - ], - ), - ...scannedResources.map((e) => Align( - alignment: Alignment.centerLeft, - child: Text(e - .elements.values.first.data - .toString()), - )) - ]) - ], - ), + ), + ], + ), + ...scannedResources.map((e) => Align( + alignment: Alignment.centerLeft, + child: Text(e + .elements.values.first.data + .toString()), + )) + ]) + ], ), ], ); diff --git a/packages/inventory_management/lib/pages/record_stock/warehouse_details.dart b/packages/inventory_management/lib/pages/record_stock/warehouse_details.dart index de24d5850..023454d86 100644 --- a/packages/inventory_management/lib/pages/record_stock/warehouse_details.dart +++ b/packages/inventory_management/lib/pages/record_stock/warehouse_details.dart @@ -1,11 +1,15 @@ import 'package:auto_route/auto_route.dart'; -import 'package:digit_components/digit_components.dart'; -import 'package:digit_components/widgets/atoms/digit_toaster.dart'; import 'package:digit_data_model/data_model.dart'; import 'package:digit_scanner/blocs/scanner.dart'; import 'package:digit_scanner/pages/qr_scanner.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/atoms/input_wrapper.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; +import 'package:digit_ui_components/widgets/scrollable_content.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:intl/intl.dart'; import 'package:inventory_management/router/inventory_router.gm.dart'; import 'package:reactive_forms/reactive_forms.dart'; @@ -35,6 +39,7 @@ class WarehouseDetailsPageState extends LocalizedState { static const _teamCodeKey = 'teamCode'; bool deliveryTeamSelected = false; String? selectedFacilityId; + TextEditingController controller1 = TextEditingController(); @override void initState() { @@ -65,6 +70,7 @@ class WarehouseDetailsPageState extends LocalizedState { Widget build(BuildContext context) { final theme = Theme.of(context); final recordStockBloc = BlocProvider.of(context); + final textTheme = theme.digitTextTheme(context); return InventorySingleton().projectId.isEmpty ? Center( @@ -123,131 +129,118 @@ class WarehouseDetailsPageState extends LocalizedState { footer: SizedBox( child: DigitCard( margin: const EdgeInsets.fromLTRB( - 0, kPadding, 0, 0), - padding: const EdgeInsets.fromLTRB( - kPadding, - 0, - kPadding, - 0, - ), - child: ReactiveFormConsumer( - builder: (context, form, child) { - return DigitElevatedButton( - onPressed: !form.valid - ? null - : () { - form.markAllAsTouched(); - if (!form.valid) { - return; - } - final dateOfRecord = form - .control(_dateOfEntryKey) - .value as DateTime; + 0, spacer2, 0, 0), + children:[ + ReactiveFormConsumer( + builder: (context, form, child) { + return DigitButton( + type: DigitButtonType.primary, + mainAxisSize: MainAxisSize.max, + size: DigitButtonSize.large, + isDisabled: !form.valid, + label: localizations.translate( + i18.householdDetails.actionLabel, + ), + onPressed: !form.valid + ? (){} + : () { + form.markAllAsTouched(); + if (!form.valid) { + return; + } + final dateOfRecord = form + .control(_dateOfEntryKey) + .value as DateTime; - final teamCode = form - .control(_teamCodeKey) - .value as String?; + final teamCode = form + .control(_teamCodeKey) + .value as String?; - final facility = - deliveryTeamSelected - ? FacilityModel( - id: teamCode ?? - 'Delivery Team', - ) - : selectedFacilityId != - null - ? FacilityModel( - id: selectedFacilityId - .toString(), - ) - : null; + final facility = + deliveryTeamSelected + ? FacilityModel( + id: teamCode ?? + 'Delivery Team', + ) + : selectedFacilityId != + null + ? FacilityModel( + id: selectedFacilityId + .toString(), + ) + : null; - context - .read() - .add( - const DigitScannerEvent - .handleScanner( - qrCode: [], - barCode: []), - ); - if (facility == null) { - DigitToast.show( - context, - options: DigitToastOptions( - localizations.translate( - i18.stockDetails - .facilityRequired, - ), - true, - theme, - ), - ); - } else if (deliveryTeamSelected && - (teamCode == null || - teamCode - .trim() - .isEmpty)) { - DigitToast.show( - context, - options: DigitToastOptions( - localizations.translate( - i18.stockDetails - .teamCodeRequired, - ), - true, - theme, - ), - ); - } else { - recordStockBloc.add( - RecordStockSaveTransactionDetailsEvent( - dateOfRecord: dateOfRecord, - facilityModel: InventorySingleton() - .isDistributor! && - !InventorySingleton() - .isWareHouseMgr! - ? FacilityModel( - id: teamCode - .toString(), - ) - : facility, - primaryId: facility.id == - "Delivery Team" - ? teamCode ?? '' - : facility.id, - primaryType: (InventorySingleton() - .isDistributor! && - !InventorySingleton() - .isWareHouseMgr! && - deliveryTeamSelected) || - deliveryTeamSelected - ? "STAFF" - : "WAREHOUSE", - ), - ); - context.router.push( - StockDetailsRoute(), - ); - } - }, - child: child!, - ); - }, - child: Center( - child: Text( - localizations.translate( - i18.householdDetails.actionLabel, - ), - ), + context + .read() + .add( + const DigitScannerEvent + .handleScanner( + qrCode: [], + barCode: []), + ); + if (facility == null) { + Toast.showToast( + type: ToastType.error, + context, + message: localizations.translate( + i18.stockDetails + .facilityRequired, + ), + ); + } else if (deliveryTeamSelected && + (teamCode == null || + teamCode + .trim() + .isEmpty)) { + Toast.showToast( + context, + type: ToastType.error, + message:localizations.translate( + i18.stockDetails + .teamCodeRequired, + ), + ); + } else { + recordStockBloc.add( + RecordStockSaveTransactionDetailsEvent( + dateOfRecord: dateOfRecord, + facilityModel: InventorySingleton() + .isDistributor! && + !InventorySingleton() + .isWareHouseMgr! + ? FacilityModel( + id: teamCode + .toString(), + ) + : facility, + primaryId: facility.id == + "Delivery Team" + ? teamCode ?? '' + : facility.id, + primaryType: (InventorySingleton() + .isDistributor! && + !InventorySingleton() + .isWareHouseMgr! && + deliveryTeamSelected) || + deliveryTeamSelected + ? "STAFF" + : "WAREHOUSE", + ), + ); + context.router.push( + StockDetailsRoute(), + ); + } + }, + ); + }, ), - ), + ] ), ), children: [ DigitCard( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, + margin: const EdgeInsets.all(spacer2), children: [ Text( InventorySingleton().isDistributor! && @@ -261,44 +254,56 @@ class WarehouseDetailsPageState extends LocalizedState { i18.warehouseDetails .warehouseDetailsLabel, ), - style: theme.textTheme.displayMedium, + style: textTheme.headingXl, ), - Column(children: [ - DigitDateFormPicker( - isEnabled: false, + ReactiveWrapperField( formControlName: _dateOfEntryKey, - label: localizations.translate( - i18.warehouseDetails.dateOfReceipt, - ), - isRequired: false, - confirmText: localizations.translate( - i18.common.coreCommonOk, - ), - cancelText: localizations.translate( - i18.common.coreCommonCancel, - ), - ), - DigitTextFormField( - readOnly: true, + builder: (field) { + return InputField( + type: InputType.date, + label: localizations.translate( + i18.warehouseDetails + .dateOfReceipt, + ), + confirmText: localizations.translate( + i18.common.coreCommonOk, + ), + cancelText: localizations.translate( + i18.common.coreCommonCancel, + ), + initialValue: DateFormat( + 'dd/MM/yy') + .format( + field.control.value), + readOnly: true, + ); + }), + ReactiveWrapperField( formControlName: _administrativeUnitKey, - label: localizations.translate( - i18.warehouseDetails - .administrativeUnit, - ), - ), - ]), + builder: (field) { + return InputField( + type: InputType.text, + label: localizations.translate( + i18.warehouseDetails + .administrativeUnit, + ), + initialValue: field.control.value, + readOnly: true, + ); + } + ), InkWell( onTap: () async { clearQRCodes(); form.control(_teamCodeKey).value = ''; final facility = - await Navigator.of(context).push( + await Navigator.of(context).push( MaterialPageRoute( builder: (context) => InventoryFacilitySelectionPage( - facilities: facilities, - ), + facilities: facilities, + ), ), ); @@ -306,6 +311,8 @@ class WarehouseDetailsPageState extends LocalizedState { form.control(_warehouseKey).value = localizations.translate( 'FAC_${facility.id}'); + controller1.text = localizations.translate( + 'FAC_${facility.id}'); setState(() { selectedFacilityId = facility.id; @@ -321,123 +328,82 @@ class WarehouseDetailsPageState extends LocalizedState { } }, child: IgnorePointer( - child: DigitTextFormField( - hideKeyboard: true, - padding: const EdgeInsets.only( - bottom: kPadding, - ), - isRequired: true, - label: localizations.translate( - i18.stockReconciliationDetails - .facilityLabel, - ), - validationMessages: { - 'required': (object) => - localizations.translate( - '${i18.individualDetails.nameLabelText}_IS_REQUIRED', - ), - }, - suffix: const Padding( - padding: EdgeInsets.all(8.0), - child: Icon(Icons.search), - ), - formControlName: _warehouseKey, - readOnly: true, - onTap: () async { - context - .read() - .add( - const DigitScannerEvent - .handleScanner( - barCode: [], - qrCode: [], + child: ReactiveWrapperField( + formControlName: _warehouseKey, + validationMessages: { + 'required': (object) => + localizations.translate( + '${i18.individualDetails + .nameLabelText}_IS_REQUIRED', ), - ); - form.control(_teamCodeKey).value = - ''; - final facility = - await Navigator.of(context) - .push( - MaterialPageRoute( - builder: (context) => - InventoryFacilitySelectionPage( - facilities: facilities, + }, + showErrors: (control) => control.invalid && control.touched, + builder: (field) { + return InputField( + type: InputType.search, + label: localizations.translate( + i18.stockReconciliationDetails + .facilityLabel, ), - ), - ); - - if (facility == null) return; - form.control(_warehouseKey).value = - localizations.translate( - 'FAC_${facility.id}'); - - setState(() { - selectedFacilityId = facility.id; - }); - if (facility.id == - 'Delivery Team') { - setState(() { - deliveryTeamSelected = true; - }); - } else { - setState(() { - deliveryTeamSelected = false; - }); + controller: controller1, + isRequired: true, + errorMessage: field.errorText, + onChange: (value) { + field.control.markAsTouched(); + }, + ); } - }, ), ), ), if (deliveryTeamSelected) - DigitTextFormField( - label: localizations.translate( - i18.stockReconciliationDetails - .teamCodeLabel, - ), - formControlName: _teamCodeKey, - onChanged: (val) { - String? value = val as String?; - if (value != null && - value.trim().isNotEmpty) { - context - .read() - .add( - DigitScannerEvent - .handleScanner( - barCode: [], - qrCode: [value], + ReactiveWrapperField( + formControlName: _teamCodeKey, + builder: (field) { + return InputField( + type: InputType.text, + label: localizations.translate( + i18.stockReconciliationDetails + .teamCodeLabel, + ), + isRequired: deliveryTeamSelected, + suffixIcon: Icons.qr_code_2, + onSuffixTap: (value){ + //[TODO: Add route to auto_route] + Navigator.of(context).push( + MaterialPageRoute( + builder: (context) => + const DigitScannerPage( + quantity: 5, + isGS1code: false, + singleValue: false, + ), + settings: const RouteSettings( + name: '/qr-scanner'), ), ); - } else { - clearQRCodes(); - } - }, - isRequired: true, - suffix: IconButton( - onPressed: () { - //[TODO: Add route to auto_route] - Navigator.of(context).push( - MaterialPageRoute( - builder: (context) => - const DigitScannerPage( - quantity: 1, - isGS1code: false, - singleValue: false, - ), - settings: const RouteSettings( - name: '/qr-scanner'), - ), + }, + onChange: (val) { + String? value = val; + if (value != null && + value.trim().isNotEmpty) { + context + .read() + .add( + DigitScannerEvent + .handleScanner( + barCode: [], + qrCode: [value], + ), + ); + } else { + clearQRCodes(); + } + }, ); - }, - icon: Icon( - Icons.qr_code_2, - color: theme.colorScheme.secondary, - ), - ), - ), - ], - ), - ), + }) + ]), + ], ); }, diff --git a/packages/inventory_management/lib/pages/reports/report_details.dart b/packages/inventory_management/lib/pages/reports/report_details.dart index 1cefbb72c..22e86346d 100644 --- a/packages/inventory_management/lib/pages/reports/report_details.dart +++ b/packages/inventory_management/lib/pages/reports/report_details.dart @@ -1,7 +1,10 @@ import 'package:auto_route/auto_route.dart'; import 'package:collection/collection.dart'; -import 'package:digit_components/digit_components.dart'; import 'package:digit_data_model/data_model.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/atoms/input_wrapper.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:inventory_management/router/inventory_router.gm.dart'; @@ -21,7 +24,6 @@ import '../../models/entities/stock.dart'; import '../../models/entities/stock_reconciliation.dart'; import '../../utils/utils.dart'; import '../../widgets/back_navigation_help_header.dart'; -import '../facility_selection.dart'; @RoutePage() class InventoryReportDetailsPage extends LocalizedStatefulWidget { @@ -44,6 +46,8 @@ class InventoryReportDetailsPageState static const _facilityKey = 'facilityKey'; String? selectedFacilityId; + TextEditingController controller1 = TextEditingController(); + /// Handles the selection of a facility and product variant from the form and triggers the loading of the corresponding inventory report data. /// /// This function takes a [FormGroup] and an [InventoryReportBloc] as parameters. @@ -118,17 +122,17 @@ class InventoryReportDetailsPageState ), child: Scaffold( bottomNavigationBar: DigitCard( - padding: const EdgeInsets.all(8.0), - child: DigitElevatedButton( - onPressed: () => context.router.popUntilRoot(), - child: Text( - localizations.translate( + children: [ + DigitButton( + size: DigitButtonSize.large, + type: DigitButtonType.secondary, + mainAxisSize: MainAxisSize.max, + onPressed: () => context.router.popUntilRoot(), + label: localizations.translate( i18.inventoryReportDetails.backToHomeButtonLabel, ), - textAlign: TextAlign.center, - maxLines: 1, ), - ), + ], ), body: BlocBuilder( builder: (context, inventoryReportState) { @@ -147,13 +151,14 @@ class InventoryReportDetailsPageState children: [ const BackNavigationHelpHeaderWidget(), Container( - padding: const EdgeInsets.all(kPadding), + padding: const EdgeInsets.all(spacer2), child: Align( alignment: Alignment.centerLeft, child: Text( title, maxLines: 1, - style: Theme.of(context).textTheme.displayMedium, + style: + Theme.of(context).digitTextTheme(context).headingXl, ), ), ), @@ -190,31 +195,32 @@ class InventoryReportDetailsPageState return Column( children: [ DigitCard( - child: Column( - children: [ - if (isWareHouseManager) - BlocConsumer( - listener: (context, state) => - state.whenOrNull( - empty: () => - NoFacilitiesAssignedDialog - .show( - context, - localizations, - ), + margin: const EdgeInsets.all(spacer2), + children: [ + if (isWareHouseManager) + BlocConsumer( + listener: (context, state) => + state.whenOrNull( + empty: () => + NoFacilitiesAssignedDialog + .show( + context, + localizations, ), - builder: (context, state) { - final facilities = - state.whenOrNull( - fetched: (facilities, - allFacilities) => - facilities, - ) ?? - []; - - return InkWell( - onTap: () async { + ), + builder: (context, state) { + final facilities = + state.whenOrNull( + fetched: (facilities, + allFacilities) => + facilities, + ) ?? + []; + + return InkWell( + onTap: () async { + if (mounted) { final stockReconciliationBloc = context.read< StockReconciliationBloc>(); @@ -226,8 +232,9 @@ class InventoryReportDetailsPageState facilities)) as FacilityModel?; - if (facility == null) + if (facility == null) { return; + } form .control(_facilityKey) .value = @@ -239,143 +246,125 @@ class InventoryReportDetailsPageState selectedFacilityId = facility.id; }); + + controller1.text = + localizations.translate( + 'FAC_${facility.id}'); stockReconciliationBloc.add( StockReconciliationSelectFacilityEvent( facility, ), ); - handleSelection( - form, - context.read< - InventoryReportBloc>()); + if (mounted) { + handleSelection( + form, + context.read< + InventoryReportBloc>()); + } + } + }, + child: IgnorePointer( + child: ReactiveWrapperField( + formControlName: + _facilityKey, + builder: (field) { + return InputField( + type: InputType.search, + isRequired: true, + controller: controller1, + label: localizations + .translate( + i18.stockReconciliationDetails + .facilityLabel, + ), + ); + }, + ), + ), + ); + }, + ), + BlocBuilder( + builder: (context, state) { + return state.maybeWhen( + orElse: () => const Offstage(), + loading: () => const Center( + child: + CircularProgressIndicator(), + ), + empty: () => Center( + child: Text( + i18.stockDetails + .noProductsFound, + ), + ), + fetched: (productVariants) { + return ReactiveWrapperField( + formControlName: + _productVariantKey, + validationMessages: { + 'required': (object) => + localizations.translate( + i18.common + .corecommonRequired, + ), }, - child: IgnorePointer( - child: DigitTextFormField( - key: const Key( - _facilityKey), + builder: (field) { + return LabeledField( + isRequired: true, label: localizations .translate( i18.stockReconciliationDetails - .facilityLabel, - ), - suffix: const Padding( - padding: - EdgeInsets.all(8.0), - child: - Icon(Icons.search), + .productLabel, ), - formControlName: - _facilityKey, - readOnly: false, - isRequired: true, - onTap: () async { - final stockReconciliationBloc = - context.read< - StockReconciliationBloc>(); - - final facility = await context - .router - .push(InventoryFacilitySelectionRoute( - facilities: - facilities)) - as FacilityModel?; - - if (facility == null) - return; - form - .control( - _facilityKey) - .value = + child: DigitDropdown( + emptyItemText: localizations .translate( - 'FAC_${facility.id}', - ); - - setState(() { - selectedFacilityId = - facility.id; - }); - form - .control( - _facilityKey) - .value = facility; - stockReconciliationBloc - .add( - StockReconciliationSelectFacilityEvent( - facility, - ), - ); - - handleSelection( - form, - context.read< - InventoryReportBloc>()); - }, - ), - ), + i18.common + .noMatchFound, + ), + items: productVariants + .map((variant) { + return DropdownItem( + name: localizations + .translate( + variant.sku ?? + variant.id, + ), + code: variant.id, + ); + }).toList(), + onSelect: (value) { + /// Find the selected product variant model by matching the id + final selectedVariant = + productVariants + .firstWhere( + (variant) => + variant.id == + value.code, + ); + + /// Update the form control with the selected product variant model + field.control.value = + selectedVariant; + + handleSelection( + form, + context.read< + InventoryReportBloc>()); + }, + ), + ); + }, ); }, - ), - BlocBuilder< - InventoryProductVariantBloc, - InventoryProductVariantState>( - builder: (context, state) { - return state.maybeWhen( - orElse: () => const Offstage(), - loading: () => const Center( - child: - CircularProgressIndicator(), - ), - empty: () => Center( - child: Text( - i18.stockDetails - .noProductsFound, - ), - ), - fetched: (productVariants) { - return DigitReactiveSearchDropdown< - ProductVariantModel>( - key: const Key( - _productVariantKey), - label: - localizations.translate( - i18.stockReconciliationDetails - .productLabel, - ), - form: form, - menuItems: productVariants, - formControlName: - _productVariantKey, - isRequired: true, - valueMapper: (value) { - return localizations - .translate( - value.sku ?? value.id, - ); - }, - onSelected: (value) { - handleSelection( - form, - context.read< - InventoryReportBloc>()); - }, - validationMessage: - localizations.translate( - i18.common - .corecommonRequired, - ), - emptyText: - localizations.translate( - i18.common.noMatchFound, - ), - ); - }, - ); - }, - ), - ], - ), + ); + }, + ), + ], ), Expanded( child: Align( @@ -395,8 +384,7 @@ class InventoryReportDetailsPageState if (data.isEmpty) { return Padding( padding: const EdgeInsets.all( - kPadding * 2, - ), + spacer4), child: _NoReportContent( title: title, message: noRecordsMessage, @@ -505,8 +493,7 @@ class InventoryReportDetailsPageState if (data.isEmpty) { return Padding( padding: const EdgeInsets.all( - kPadding * 2, - ), + spacer4), child: _NoReportContent( title: title, message: noRecordsMessage, @@ -799,6 +786,9 @@ class InventoryReportDetailsPageState } return (double.tryParse(count.value.toString()) ?? 0.0).toStringAsFixed(0); } + + handleFacilitySelection( + FormGroup form, List facilities) async {} } class _ReportDetailsContent extends StatelessWidget { @@ -813,12 +803,12 @@ class _ReportDetailsContent extends StatelessWidget { @override Widget build(BuildContext context) { return Padding( - padding: const EdgeInsets.all(kPadding), + padding: const EdgeInsets.all(spacer2), child: Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min, children: [ - const SizedBox(height: kPadding * 2), + const SizedBox(height: spacer4), Flexible( child: ReadonlyDigitGrid( data: data, @@ -847,7 +837,7 @@ class _NoReportContent extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ const SizedBox( - height: kPadding * 2, + height: spacer4, width: double.maxFinite, ), Center( diff --git a/packages/inventory_management/lib/pages/reports/report_selection.dart b/packages/inventory_management/lib/pages/reports/report_selection.dart index 5f7cfd145..ad2301125 100644 --- a/packages/inventory_management/lib/pages/reports/report_selection.dart +++ b/packages/inventory_management/lib/pages/reports/report_selection.dart @@ -1,5 +1,7 @@ import 'package:auto_route/auto_route.dart'; -import 'package:digit_components/digit_components.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/atoms/menu_card.dart'; import 'package:flutter/material.dart'; import 'package:inventory_management/router/inventory_router.gm.dart'; @@ -30,6 +32,7 @@ class InventoryReportSelectionPageState @override Widget build(BuildContext context) { final theme = Theme.of(context); + final textTheme = theme.digitTextTheme(context); return Scaffold( body: ScrollableContent( @@ -43,112 +46,130 @@ class InventoryReportSelectionPageState children: [ Padding( padding: const EdgeInsets.fromLTRB( - kPadding * 2, kPadding, kPadding * 2, kPadding), + spacer4, spacer2, spacer4, spacer2), child: Align( alignment: Alignment.topLeft, child: Text( localizations.translate(i18.inventoryReportSelection.label), - style: theme.textTheme.displayMedium, + style: textTheme.headingXl, textAlign: TextAlign.center, ), ), ), Column(children: [ - DigitListView( - title: localizations.translate( - i18.inventoryReportSelection.inventoryReportReceiptLabel, - ), - description: localizations.translate(i18 - .inventoryReportSelection - .inventoryReportReceiptDescription), - prefixIcon: Icons.login, - sufixIcon: Icons.arrow_circle_right, - onPressed: () => context.router.push( - InventoryReportDetailsRoute( - reportType: InventoryReportType.receipt, + Padding( + padding: const EdgeInsets.symmetric(horizontal: spacer2), + child: MenuCard( + heading: localizations.translate( + i18.inventoryReportSelection.inventoryReportReceiptLabel, + ), + description: localizations.translate(i18 + .inventoryReportSelection + .inventoryReportReceiptDescription), + icon: Icons.login, + onTap: () => context.router.push( + InventoryReportDetailsRoute( + reportType: InventoryReportType.receipt, + ), ), ), ), - DigitListView( - title: localizations.translate( - i18.inventoryReportSelection.inventoryReportIssuedLabel, - ), - description: localizations.translate(i18 - .inventoryReportSelection - .inventoryReportIssuedDescription), - prefixIcon: Icons.logout, - sufixIcon: Icons.arrow_circle_right, - onPressed: () => context.router.push( - InventoryReportDetailsRoute( - reportType: InventoryReportType.dispatch, + const SizedBox(height: spacer4), + Padding( + padding: const EdgeInsets.symmetric(horizontal: spacer2), + child: MenuCard( + heading: localizations.translate( + i18.inventoryReportSelection.inventoryReportIssuedLabel, + ), + description: localizations.translate(i18 + .inventoryReportSelection + .inventoryReportIssuedDescription), + icon: Icons.logout, + onTap: () => context.router.push( + InventoryReportDetailsRoute( + reportType: InventoryReportType.dispatch, + ), ), ), ), - DigitListView( - title: localizations.translate(i18 - .inventoryReportSelection.inventoryReportReturnedLabel), - description: localizations.translate( - i18.inventoryReportSelection - .inventoryReportReturnedDescription, - ), - prefixIcon: Icons.settings_backup_restore, - sufixIcon: Icons.arrow_circle_right, - onPressed: () => context.router.push( - InventoryReportDetailsRoute( - reportType: InventoryReportType.returned, + const SizedBox(height: spacer4), + Padding( + padding: const EdgeInsets.symmetric(horizontal: spacer2), + child: MenuCard( + heading: localizations.translate(i18 + .inventoryReportSelection.inventoryReportReturnedLabel), + description: localizations.translate( + i18.inventoryReportSelection + .inventoryReportReturnedDescription, + ), + icon: Icons.settings_backup_restore, + onTap: () => context.router.push( + InventoryReportDetailsRoute( + reportType: InventoryReportType.returned, + ), ), ), ), - DigitListView( - title: localizations.translate( - i18.inventoryReportSelection.inventoryReportDamagedLabel, - ), - description: localizations.translate( - i18.inventoryReportSelection - .inventoryReportDamagedDescription, - ), - prefixIcon: Icons.store, - sufixIcon: Icons.arrow_circle_right, - onPressed: () => context.router.push( - InventoryReportDetailsRoute( - reportType: InventoryReportType.damage, + const SizedBox(height: spacer4), + Padding( + padding: const EdgeInsets.symmetric(horizontal: spacer2), + child: MenuCard( + heading: localizations.translate( + i18.inventoryReportSelection.inventoryReportDamagedLabel, + ), + description: localizations.translate( + i18.inventoryReportSelection + .inventoryReportDamagedDescription, + ), + icon: Icons.store, + onTap: () => context.router.push( + InventoryReportDetailsRoute( + reportType: InventoryReportType.damage, + ), ), ), ), - DigitListView( - title: localizations.translate( - i18.inventoryReportSelection.inventoryReportLossLabel, - ), - description: localizations.translate( - i18.inventoryReportSelection.inventoryReportLossDescription, - ), - prefixIcon: Icons.store, - sufixIcon: Icons.arrow_circle_right, - onPressed: () => context.router.push( - InventoryReportDetailsRoute( - reportType: InventoryReportType.loss, + const SizedBox(height: spacer4), + Padding( + padding: const EdgeInsets.symmetric(horizontal: spacer2), + child: MenuCard( + heading: localizations.translate( + i18.inventoryReportSelection.inventoryReportLossLabel, + ), + description: localizations.translate( + i18.inventoryReportSelection + .inventoryReportLossDescription, + ), + icon: Icons.store, + onTap: () => context.router.push( + InventoryReportDetailsRoute( + reportType: InventoryReportType.loss, + ), ), ), ), - DigitListView( - title: localizations.translate( - i18.inventoryReportSelection - .inventoryReportReconciliationLabel, - ), - description: localizations.translate( - i18.inventoryReportSelection - .inventoryReportReconciliationDescription, - ), - prefixIcon: Icons.store, - sufixIcon: Icons.arrow_circle_right, - onPressed: () => context.router.push( - InventoryReportDetailsRoute( - reportType: InventoryReportType.reconciliation, + const SizedBox(height: spacer4), + Padding( + padding: const EdgeInsets.symmetric(horizontal: spacer2), + child: MenuCard( + heading: localizations.translate( + i18.inventoryReportSelection + .inventoryReportReconciliationLabel, + ), + description: localizations.translate( + i18.inventoryReportSelection + .inventoryReportReconciliationDescription, + ), + icon: Icons.store, + onTap: () => context.router.push( + InventoryReportDetailsRoute( + reportType: InventoryReportType.reconciliation, + ), ), ), ), ]), - const SizedBox(height: 16), + const SizedBox(height: spacer4), ], ), ], diff --git a/packages/inventory_management/lib/pages/stock_reconciliation/stock_reconciliation.dart b/packages/inventory_management/lib/pages/stock_reconciliation/stock_reconciliation.dart index a1257b850..ecb0cbcd1 100644 --- a/packages/inventory_management/lib/pages/stock_reconciliation/stock_reconciliation.dart +++ b/packages/inventory_management/lib/pages/stock_reconciliation/stock_reconciliation.dart @@ -1,7 +1,13 @@ import 'package:auto_route/auto_route.dart'; -import 'package:digit_components/digit_components.dart'; -import 'package:digit_components/widgets/atoms/digit_divider.dart'; import 'package:digit_data_model/data_model.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/atoms/digit_divider.dart'; +import 'package:digit_ui_components/widgets/atoms/input_wrapper.dart'; +import 'package:digit_ui_components/widgets/atoms/label_value_list.dart'; +import 'package:digit_ui_components/widgets/atoms/pop_up_card.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; +import 'package:digit_ui_components/widgets/molecules/show_pop_up.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:intl/intl.dart'; @@ -38,6 +44,7 @@ class StockReconciliationPageState static const _manualCountKey = 'manualCountKey'; static const _reconciliationCommentsKey = 'reconciliationCommentsKey'; String? selectedFacilityId; + TextEditingController controller1 = TextEditingController(); FormGroup _form(bool isDistributor) { return fb.group({ @@ -48,9 +55,9 @@ class StockReconciliationPageState _manualCountKey: FormControl( value: '0', validators: [ - Validators.number, + Validators.number(), Validators.required, - CustomValidator.validStockCount, + Validators.delegate(CustomValidator.validStockCount) ], ), _reconciliationCommentsKey: FormControl(), @@ -103,500 +110,497 @@ class StockReconciliationPageState builder: (ctx, form, child) { return Scaffold( body: ScrollableContent( - enableFixedButton: true, + enableFixedDigitButton: true, header: const BackNavigationHelpHeaderWidget(), footer: SizedBox( child: DigitCard( - margin: const EdgeInsets.fromLTRB( - 0, kPadding, 0, 0), - padding: const EdgeInsets.fromLTRB( - kPadding, 0, kPadding, 0), - child: ReactiveFormConsumer( - builder: (ctx, form, child) => - DigitElevatedButton( - onPressed: !form.valid || - (form - .control(_productVariantKey) - .value == - null) - ? null - : () async { - form.markAllAsTouched(); - FocusManager.instance.primaryFocus - ?.unfocus(); - if (!form.valid) return; + margin: const EdgeInsets.fromLTRB( + 0, spacer2, 0, 0), + children: [ + ReactiveFormConsumer( + builder: (ctx, form, child) => + DigitButton( + mainAxisSize: MainAxisSize.max, + size: DigitButtonSize.large, + type: DigitButtonType.primary, + onPressed: !form.valid || + (form + .control( + _productVariantKey) + .value == + null) + ? () {} + : () async { + form.markAllAsTouched(); + FocusManager + .instance.primaryFocus + ?.unfocus(); + if (!form.valid) return; - final bloc = ctx.read< - StockReconciliationBloc>(); + final bloc = ctx.read< + StockReconciliationBloc>(); - final facilityId = - InventorySingleton() - .isDistributor! && - !InventorySingleton() - .isWareHouseMgr! - ? FacilityModel( - id: InventorySingleton() - .loggedInUserUuid!, - ) - : FacilityModel( - id: selectedFacilityId - .toString(), - ); - - final productVariant = form - .control(_productVariantKey) - .value as ProductVariantModel; + final facilityId = + InventorySingleton() + .isDistributor! && + !InventorySingleton() + .isWareHouseMgr! + ? FacilityModel( + id: InventorySingleton() + .loggedInUserUuid!, + ) + : FacilityModel( + id: selectedFacilityId + .toString(), + ); - final calculatedCount = form - .control(_manualCountKey) - .value as String; + final productVariant = form + .control(_productVariantKey) + .value as ProductVariantModel; - final comments = form - .control( - _reconciliationCommentsKey, - ) - .value as String?; + final calculatedCount = form + .control(_manualCountKey) + .value as String; - final model = - StockReconciliationModel( - clientReferenceId: - IdGen.i.identifier, - dateOfReconciliation: stockState - .dateOfReconciliation - .millisecondsSinceEpoch, - facilityId: facilityId.id, - productVariantId: - productVariant.id, - calculatedCount: stockState - .stockInHand - .toInt(), - commentsOnReconciliation: - comments, - physicalCount: int.tryParse( - calculatedCount, - ) ?? - 0, - auditDetails: AuditDetails( - createdBy: InventorySingleton() - .loggedInUserUuid, - createdTime: context - .millisecondsSinceEpoch(), - ), - clientAuditDetails: - ClientAuditDetails( - createdBy: InventorySingleton() - .loggedInUserUuid, - createdTime: context - .millisecondsSinceEpoch(), - lastModifiedBy: - InventorySingleton() - .loggedInUserUuid, - lastModifiedTime: context - .millisecondsSinceEpoch(), - ), - ); + final comments = form + .control( + _reconciliationCommentsKey, + ) + .value as String?; - final submit = - await DigitDialog.show( - context, - options: DigitDialogOptions( - key: const Key('submitDialog'), - titleText: - localizations.translate( - i18.stockReconciliationDetails - .dialogTitle, - ), - contentText: - localizations.translate( - i18.stockReconciliationDetails - .dialogContent, - ), - primaryAction: - DigitDialogActions( - label: - localizations.translate( - i18.common.coreCommonSubmit, + final model = + StockReconciliationModel( + clientReferenceId: + IdGen.i.identifier, + dateOfReconciliation: stockState + .dateOfReconciliation + .millisecondsSinceEpoch, + facilityId: facilityId.id, + productVariantId: + productVariant.id, + calculatedCount: stockState + .stockInHand + .toInt(), + commentsOnReconciliation: + comments, + physicalCount: int.tryParse( + calculatedCount, + ) ?? + 0, + auditDetails: AuditDetails( + createdBy: + InventorySingleton() + .loggedInUserUuid, + createdTime: context + .millisecondsSinceEpoch(), ), - action: (context) { - Navigator.of( - context, - rootNavigator: true, - ).pop(true); - }, - ), - secondaryAction: - DigitDialogActions( - label: - localizations.translate( - i18.common.coreCommonCancel, + clientAuditDetails: + ClientAuditDetails( + createdBy: + InventorySingleton() + .loggedInUserUuid, + createdTime: context + .millisecondsSinceEpoch(), + lastModifiedBy: + InventorySingleton() + .loggedInUserUuid, + lastModifiedTime: context + .millisecondsSinceEpoch(), ), - action: (context) => + ); + + final submit = + await showCustomPopup( + context: context, + builder: (popupContext) => + Popup( + title: + localizations.translate( + i18.stockReconciliationDetails + .dialogTitle, + ), + onOutsideTap: () { Navigator.of( - context, - rootNavigator: true, - ).pop(false), - ), - ), - ); + popupContext, + rootNavigator: true, + ).pop(false); + }, + description: + localizations.translate( + i18.stockReconciliationDetails + .dialogContent, + ), + type: PopUpType.simple, + actions: [ + DigitButton( + label: localizations + .translate( + i18.common + .coreCommonSubmit, + ), + onPressed: () { + Navigator.of( + popupContext, + rootNavigator: true, + ).pop(true); + }, + type: DigitButtonType + .primary, + size: DigitButtonSize + .large, + ), + DigitButton( + label: localizations + .translate( + i18.common + .coreCommonCancel, + ), + onPressed: () { + Navigator.of( + popupContext, + rootNavigator: true, + ).pop(false); + }, + type: DigitButtonType + .secondary, + size: DigitButtonSize + .large, + ), + ], + ), + ) as bool; - if (submit ?? false) { - bloc.add( - StockReconciliationCreateEvent( - model, - ), - ); - } - }, - child: Center( - child: Text( - localizations.translate( + if (submit ?? false) { + bloc.add( + StockReconciliationCreateEvent( + model, + ), + ); + } + }, + label: localizations.translate( i18.common.coreCommonSubmit, ), ), ), - ), - ), - ), + ]), ), children: [ DigitCard( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - Text( - localizations.translate( - i18.stockReconciliationDetails - .reconciliationPageTitle, + margin: const EdgeInsets.all(spacer2), + children: [ + Text( + localizations.translate( + i18.stockReconciliationDetails + .reconciliationPageTitle, + ), + style: Theme.of(context).digitTextTheme(context).headingXl, + ), + if (InventorySingleton().isWareHouseMgr!) + BlocConsumer( + listener: (context, state) => + state.whenOrNull( + empty: () => + NoFacilitiesAssignedDialog.show( + context, + localizations, + ), ), - style: Theme.of(context) - .textTheme - .displayMedium, + builder: (context, state) { + return state.maybeWhen( + orElse: () => const Offstage(), + loading: () => const Center( + child: + CircularProgressIndicator(), + ), + fetched: + (facilities, allFacilities) { + return Column( + children: [ + InkWell( + onTap: () async { + final stockReconciliationBloc = + context.read< + StockReconciliationBloc>(); + final facility = await context + .router + .push(InventoryFacilitySelectionRoute( + facilities: + facilities)) + as FacilityModel?; + + if (facility == null) + return; + form + .control(_facilityKey) + .value = + localizations + .translate( + 'FAC_${facility.id}', + ); + controller1.text = + localizations + .translate( + 'FAC_${facility.id}', + ); + setState(() { + selectedFacilityId = + facility.id; + }); + stockReconciliationBloc + .add( + StockReconciliationSelectFacilityEvent( + facility, + ), + ); + }, + child: IgnorePointer( + child: + ReactiveWrapperField( + formControlName: + _facilityKey, + builder: (field) { + return InputField( + type: InputType + .search, + isRequired: true, + controller: + controller1, + label: localizations + .translate( + i18.stockReconciliationDetails + .facilityLabel, + ), + ); + }, + ), + ), + ), + ], + ); + }); + }, ), - if (InventorySingleton().isWareHouseMgr!) - BlocConsumer( - listener: (context, state) => - state.whenOrNull( - empty: () => - NoFacilitiesAssignedDialog.show( - context, - localizations, + BlocBuilder( + builder: (context, state) { + return state.maybeWhen( + orElse: () => const Offstage(), + loading: () => const Center( + child: CircularProgressIndicator(), + ), + empty: () => Center( + child: Text( + i18.stockDetails.noProductsFound, ), ), - builder: (context, state) { - return state.maybeWhen( - orElse: () => const Offstage(), - loading: () => const Center( - child: - CircularProgressIndicator(), + fetched: (productVariants) { + return ReactiveWrapperField( + formControlName: _productVariantKey, + validationMessages: { + 'required': (error) => + localizations.translate(i18 + .common + .corecommonRequired), + }, + showErrors: (control) => + control.invalid && + control.touched, + builder: (field) { + return LabeledField( + isRequired: true, + label: localizations.translate( + i18.stockReconciliationDetails + .productLabel, + ), + child: DigitDropdown( + emptyItemText: + localizations.translate( + i18.common.noMatchFound, ), - fetched: - (facilities, allFacilities) { - return InkWell( - onTap: () async { - final stockReconciliationBloc = - context.read< - StockReconciliationBloc>(); - final facility = await context - .router - .push(InventoryFacilitySelectionRoute( - facilities: - facilities)) - as FacilityModel?; - - if (facility == null) { - return; - } - form - .control(_facilityKey) - .value = - localizations.translate( - 'FAC_${facility.id}', - ); - setState(() { - selectedFacilityId = - facility.id; - }); - stockReconciliationBloc.add( - StockReconciliationSelectFacilityEvent( - facility, - ), - ); - }, - child: IgnorePointer( - child: DigitTextFormField( - key: const Key( - _facilityKey), - hideKeyboard: true, - label: localizations + items: productVariants + .map((variant) { + return DropdownItem( + name: localizations .translate( - i18.stockReconciliationDetails - .facilityLabel, - ), - suffix: const Padding( - padding: - EdgeInsets.all(8.0), - child: - Icon(Icons.search), + variant.sku ?? + variant.id, ), - formControlName: - _facilityKey, - readOnly: true, - isRequired: true, - onTap: () async { - final stockReconciliationBloc = - context.read< - StockReconciliationBloc>(); + code: variant.id, + ); + }).toList(), + onSelect: (value) { + field.control + .markAsTouched(); - final facility = await context - .router - .push(InventoryFacilitySelectionRoute( - facilities: - facilities)) - as FacilityModel?; + /// Find the selected product variant model by matching the id + final selectedVariant = + productVariants + .firstWhere( + (variant) => + variant.id == + value.code, + ); - if (facility == null) { - return; - } - form - .control( - _facilityKey) - .value = - localizations - .translate( - 'FAC_${facility.id}', - ); - setState(() { - selectedFacilityId = - facility.id; - }); - stockReconciliationBloc - .add( - StockReconciliationSelectFacilityEvent( - facility, + /// Update the form control with the selected product variant model + field.control.value = + selectedVariant; + + ctx + .read< + StockReconciliationBloc>() + .add( + StockReconciliationSelectProductEvent( + value.code, + isDistributor: InventorySingleton() + .isDistributor! && + !InventorySingleton() + .isWareHouseMgr!, ), ); - }, - ), - ), - ); - }); + }, + ), + ); + }, + ); }, - ), - BlocBuilder( - builder: (context, state) { - return state.maybeWhen( - orElse: () => const Offstage(), - loading: () => const Center( - child: CircularProgressIndicator(), - ), - empty: () => Center( - child: Text( - i18.stockDetails.noProductsFound, - ), - ), - fetched: (productVariants) { - return DigitReactiveSearchDropdown< - ProductVariantModel>( - key: - const Key(_productVariantKey), - label: localizations.translate( - i18.stockReconciliationDetails - .productLabel, - ), - form: form, - menuItems: productVariants, - formControlName: - _productVariantKey, - isRequired: true, - valueMapper: (value) { - return localizations.translate( - value.sku ?? value.id, - ); - }, - onSelected: (value) { - ctx - .read< - StockReconciliationBloc>() - .add( - StockReconciliationSelectProductEvent( - value.id, - isDistributor: InventorySingleton() - .isDistributor! && - !InventorySingleton() - .isWareHouseMgr!, - ), - ); - }, - validationMessage: - localizations.translate(i18 - .common - .corecommonRequired), - emptyText: - localizations.translate( - i18.common.noMatchFound, - ), - ); - }, - ); - }, - ), - DigitTableCard( - fraction: 2.5, - gap: kPadding, - element: { - localizations.translate(i18 - .stockReconciliationDetails - .dateOfReconciliation): - DateFormat('dd MMMM yyyy').format( - stockState.dateOfReconciliation, - ), - }, - ), - const DigitDivider(), - DigitTableCard( - key: const Key('stockReconStockReceived'), - fraction: 2.5, - gap: kPadding, - element: { - localizations.translate( - i18.stockReconciliationDetails - .stockReceived, - ): stockState.stockReceived - .toStringAsFixed(0), - }, - ), - const DigitDivider(), - DigitTableCard( - key: const Key('stockReconStockIssued'), - fraction: 2.5, - gap: kPadding, - element: { - localizations.translate( - i18.stockReconciliationDetails - .stockIssued, - ): stockState.stockIssued - .toStringAsFixed(0), - }, - ), - const DigitDivider(), - DigitTableCard( - key: const Key('stockReconStockReturned'), - fraction: 2.5, - gap: kPadding, - element: { - localizations.translate( - i18.stockReconciliationDetails - .stockReturned, - ): stockState.stockReturned - .toStringAsFixed(0), - }, + ); + }, + ), + LabelValueItem( + label: localizations.translate(i18 + .stockReconciliationDetails + .dateOfReconciliation), + value: DateFormat('dd MMMM yyyy').format( + stockState.dateOfReconciliation), + labelFlex: 5, + ), + const DigitDivider(), + LabelValueItem( + label: localizations.translate( + i18.stockReconciliationDetails + .stockReceived, ), - const DigitDivider(), - DigitTableCard( - key: const Key('stockReconStockLost'), - fraction: 2.5, - gap: kPadding, - element: { - localizations.translate( - i18.stockReconciliationDetails - .stockLost, - ): stockState.stockLost - .toStringAsFixed(0), - }, + value: stockState.stockReceived + .toStringAsFixed(0), + labelFlex: 5, + ), + const DigitDivider(), + LabelValueItem( + label: localizations.translate( + i18.stockReconciliationDetails + .stockIssued, ), - const DigitDivider(), - DigitTableCard( - key: const Key('stockReconStockDamaged'), - fraction: 2.5, - gap: kPadding, - element: { - localizations.translate( - i18.stockReconciliationDetails - .stockDamaged, - ): stockState.stockDamaged - .toStringAsFixed(0), - }, + value: stockState.stockIssued + .toStringAsFixed(0), + labelFlex: 5, + ), + const DigitDivider(), + LabelValueItem( + label: localizations.translate( + i18.stockReconciliationDetails + .stockReturned, ), - const DigitDivider(), - DigitTableCard( - key: const Key('stockReconStockOnHand'), - fraction: 2.5, - gap: kPadding, - element: { - localizations.translate( - i18.stockReconciliationDetails - .stockOnHand, - ): stockState.stockInHand - .toStringAsFixed(0), - }, + value: stockState.stockReturned + .toStringAsFixed(0), + labelFlex: 5, + ), + const DigitDivider(), + LabelValueItem( + label: localizations.translate( + i18.stockReconciliationDetails.stockLost, ), - DigitInfoCard( - margin: EdgeInsets.zero, - icon: Icons.info, - backgroundColor: - theme.colorScheme.tertiaryContainer, - iconColor: theme.colorScheme.surfaceTint, - description: localizations.translate( - i18.stockReconciliationDetails - .infoCardContent, - ), - title: localizations.translate( - i18.stockReconciliationDetails - .infoCardTitle, - ), + value: + stockState.stockLost.toStringAsFixed(0), + labelFlex: 5, + ), + const DigitDivider(), + LabelValueItem( + label: localizations.translate( + i18.stockReconciliationDetails + .stockDamaged, ), - const SizedBox( - height: kPadding * 2, + value: stockState.stockDamaged + .toStringAsFixed(0), + labelFlex: 5, + ), + const DigitDivider(), + LabelValueItem( + label: localizations.translate(i18 + .stockReconciliationDetails + .stockOnHand), + value: stockState.stockInHand + .toStringAsFixed(0), + labelFlex: 5, + ), + InfoCard( + type: InfoType.info, + description: localizations.translate( + i18.stockReconciliationDetails + .infoCardContent, ), - const DigitDivider(), - const SizedBox( - height: kPadding, + title: localizations.translate( + i18.stockReconciliationDetails + .infoCardTitle, ), - DigitTextFormField( - key: const Key(_manualCountKey), - isRequired: true, - label: localizations.translate( - i18.stockReconciliationDetails - .manualCountLabel, - ), + ), + const DigitDivider(), + ReactiveWrapperField( formControlName: _manualCountKey, - keyboardType: - const TextInputType.numberWithOptions( - decimal: false, - ), validationMessages: { - "required": (object) => - localizations.translate(i18 - .stockReconciliationDetails - .manualCountRequiredError), - "number": (object) => - localizations.translate(i18 - .stockReconciliationDetails - .manualCountInvalidType), - "min": (object) => - localizations.translate(i18 - .stockReconciliationDetails - .manualCountMinError), - "max": (object) => - localizations.translate(i18 - .stockReconciliationDetails - .manualCountMaxError), + "required": (object) => i18 + .stockReconciliationDetails + .manualCountRequiredError, + "number": (object) => i18 + .stockReconciliationDetails + .manualCountInvalidType, + "min": (object) => i18 + .stockReconciliationDetails + .manualCountMinError, + "max": (object) => i18 + .stockReconciliationDetails + .manualCountMaxError, }, - ), - DigitTextFormField( - label: localizations.translate( - i18.stockReconciliationDetails - .commentsLabel, - ), - maxLines: 3, - minLines: 3, - formControlName: - _reconciliationCommentsKey, - ), - ], - ), + showErrors: (control) => + control.invalid && control.touched, + builder: (field) { + return LabeledField( + label: localizations.translate( + i18.stockReconciliationDetails + .manualCountLabel, + ), + isRequired: true, + child: BaseDigitFormInput( + errorMessage: field.errorText, + keyboardType: const TextInputType + .numberWithOptions( + decimal: false, + ), + initialValue: '0', + onChange: (value) { + field.control.markAsTouched(); + field.control.value = value; + }, + ), + ); + }), + ReactiveWrapperField( + formControlName: _reconciliationCommentsKey, + builder: (field) { + return InputField( + type: InputType.textArea, + label: localizations.translate( + i18.stockReconciliationDetails + .commentsLabel, + ), + textAreaScroll: TextAreaScroll.smart, + onChange: (value) { + field.control.value = value; + }, + ); + }, + ), + ], ), ], ), diff --git a/packages/inventory_management/lib/router/inventory_router.dart b/packages/inventory_management/lib/router/inventory_router.dart index 7f2e849f5..e333f5c14 100644 --- a/packages/inventory_management/lib/router/inventory_router.dart +++ b/packages/inventory_management/lib/router/inventory_router.dart @@ -4,10 +4,8 @@ import 'inventory_router.gm.dart'; @AutoRouterConfig.module() class InventoryRoute extends $InventoryRoute { - @override RouteType get defaultRouteType => const RouteType.material(); - @override List routes = [ AutoRoute( page: ManageStocksRoute.page, diff --git a/packages/inventory_management/lib/widgets/back_navigation_help_header.dart b/packages/inventory_management/lib/widgets/back_navigation_help_header.dart index a3c76941e..7a327946d 100644 --- a/packages/inventory_management/lib/widgets/back_navigation_help_header.dart +++ b/packages/inventory_management/lib/widgets/back_navigation_help_header.dart @@ -1,5 +1,8 @@ import 'package:auto_route/auto_route.dart'; -import 'package:digit_components/digit_components.dart'; +import 'package:digit_ui_components/theme/ComponentTheme/back_button_theme.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/theme/spacers.dart'; +import 'package:digit_ui_components/widgets/atoms/digit_back_button.dart'; import 'package:flutter/material.dart'; import 'package:inventory_management/blocs/app_localization.dart'; @@ -26,36 +29,33 @@ class BackNavigationHelpHeaderWidget extends StatelessWidget { final theme = Theme.of(context); return Padding( - padding: const EdgeInsets.all(kPadding / 2), + padding: const EdgeInsets.all(spacer1), child: Row( children: [ Expanded( child: Row( children: [ if (showBackNavigation) - Flexible( - child: TextButton.icon( - style: TextButton.styleFrom( - foregroundColor: theme.colorScheme.onBackground, - padding: EdgeInsets.zero, - ), - onPressed: () { - context.router.maybePop(); - handleBack != null ? handleBack!() : null; - }, - icon: const Icon(Icons.arrow_left_sharp), - label: Text( - InventoryLocalization.of(context).translate( - i18.common.coreCommonBack, - ), - overflow: TextOverflow.ellipsis, + DigitBackButton(label: InventoryLocalization.of(context).translate( + i18.common.coreCommonBack, + ), + digitBackButtonThemeData: + const DigitBackButtonThemeData().copyWith( + context: context, + backDigitButtonIcon: Icon( + Icons.arrow_left, + size:Theme.of(context).spacerTheme.spacer5, ), ), - ), + handleBack: () { + context.router.maybePop(); + handleBack != null ? handleBack!() : null; + }, + ) ], ), ), - SizedBox(width: showHelp ? kPadding * 2 : 0), + SizedBox(width: showHelp ? spacer2: 0), if (showHelp) TextButton( style: TextButton.styleFrom(padding: EdgeInsets.zero), diff --git a/packages/inventory_management/lib/widgets/inventory/no_facilities_assigned_dialog.dart b/packages/inventory_management/lib/widgets/inventory/no_facilities_assigned_dialog.dart index d7d0d9358..6388e73dd 100644 --- a/packages/inventory_management/lib/widgets/inventory/no_facilities_assigned_dialog.dart +++ b/packages/inventory_management/lib/widgets/inventory/no_facilities_assigned_dialog.dart @@ -1,5 +1,8 @@ import 'package:auto_route/auto_route.dart'; -import 'package:digit_components/digit_components.dart'; +import 'package:digit_ui_components/enum/app_enums.dart'; +import 'package:digit_ui_components/widgets/atoms/digit_button.dart'; +import 'package:digit_ui_components/widgets/atoms/pop_up_card.dart'; +import 'package:digit_ui_components/widgets/molecules/show_pop_up.dart'; import 'package:flutter/material.dart'; import '../../../utils/i18_key_constants.dart' as i18; import '../../blocs/app_localization.dart'; @@ -7,29 +10,34 @@ import '../../blocs/app_localization.dart'; class NoFacilitiesAssignedDialog { static Future show( BuildContext context, InventoryLocalization localizations) { - return DigitDialog.show( - context, - options: DigitDialogOptions( - titleIcon: Icon( - Icons.warning, - color: Theme.of(context).colorScheme.error, - ), - titleText: localizations.translate( - i18.warehouseDetails.noFacilitiesAssigned, - ), - contentText: localizations.translate( - i18.warehouseDetails.noFacilitiesAssignedDescription, - ), - primaryAction: DigitDialogActions( - label: localizations.translate( - i18.common.corecommonclose, + return + showCustomPopup( + context: context, + builder: (popupContext) => Popup( + title: localizations.translate( + i18.warehouseDetails.noFacilitiesAssigned, ), - action: (dialogContext) { - Navigator.of(context, rootNavigator: true).pop(); - context.router.maybePop(); + onOutsideTap: () { + Navigator.of(popupContext).pop(); }, + description:localizations.translate( + i18.warehouseDetails.noFacilitiesAssignedDescription, + ), + type: PopUpType.alert, + actions: [ + DigitButton( + label: localizations.translate( + i18.common.corecommonclose, + ), + onPressed: () { + Navigator.of(popupContext, rootNavigator: true).pop(); + popupContext.router.maybePop(); + }, + type: DigitButtonType.primary, + size: DigitButtonSize.large, + ), + ], ), - ), - ); + ); } } diff --git a/packages/inventory_management/lib/widgets/reports/readonly_pluto_grid.dart b/packages/inventory_management/lib/widgets/reports/readonly_pluto_grid.dart index fd5d36d7d..e94fd8dbf 100644 --- a/packages/inventory_management/lib/widgets/reports/readonly_pluto_grid.dart +++ b/packages/inventory_management/lib/widgets/reports/readonly_pluto_grid.dart @@ -1,4 +1,4 @@ -import 'package:digit_components/theme/colors.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; import 'package:flutter/material.dart'; import 'package:pluto_grid/pluto_grid.dart'; import '../../../utils/i18_key_constants.dart' as i18; @@ -35,6 +35,7 @@ class ReadonlyDigitGrid extends LocalizedStatefulWidget { class ReadonlyDigitGridState extends LocalizedState { @override Widget build(BuildContext context) { + final theme = Theme.of(context); // Returns a PlutoGrid with the given configuration and data return PlutoGrid( mode: PlutoGridMode.readOnly, @@ -51,15 +52,15 @@ class ReadonlyDigitGridState extends LocalizedState { restoreAutoSizeAfterFrozenColumn: true, ), style: PlutoGridStyleConfig( - gridBorderColor: const DigitColors().seaShellGray, - oddRowColor: const DigitColors().seaShellGray, - borderColor: const DigitColors().seaShellGray, + gridBorderColor: theme.colorTheme.generic.background, + oddRowColor: theme.colorTheme.generic.background, + borderColor: theme.colorTheme.generic.background, iconColor: Colors.transparent, evenRowColor: Colors.transparent, - activatedColor: const DigitColors().burningOrange.withOpacity( + activatedColor: theme.colorTheme.primary.primary1.withOpacity( 0.2, ), - activatedBorderColor: const DigitColors().burningOrange.withOpacity( + activatedBorderColor: theme.colorTheme.primary.primary1.withOpacity( 0.8, ), enableRowColorAnimation: true, diff --git a/packages/inventory_management/pubspec.lock b/packages/inventory_management/pubspec.lock index 8d4d079e1..db72d69b2 100644 --- a/packages/inventory_management/pubspec.lock +++ b/packages/inventory_management/pubspec.lock @@ -117,18 +117,18 @@ packages: dependency: "direct main" description: name: auto_route - sha256: eb33554581a0a4aa7e6da0f13a44291a55bf71359012f1d9feb41634ff908ff8 + sha256: a9001a90539ca3effc168f7e1029a5885c7326b9032c09ac895e303c1d137704 url: "https://pub.dev" source: hosted - version: "7.9.2" + version: "8.3.0" auto_route_generator: dependency: "direct dev" description: name: auto_route_generator - sha256: "11067a3bcd643812518fe26c0c9ec073990286cabfd9d74b6da9ef9b913c4d22" + sha256: ba28133d3a3bf0a66772bcc98dade5843753cd9f1a8fb4802b842895515b67d3 url: "https://pub.dev" source: hosted - version: "7.3.2" + version: "8.0.0" bloc: dependency: transitive description: @@ -186,13 +186,13 @@ packages: source: hosted version: "2.4.2" build_runner: - dependency: "direct main" + dependency: "direct dev" description: name: build_runner - sha256: "3ac61a79bfb6f6cc11f693591063a7f19a7af628dc52f141743edac5c16e8c22" + sha256: "644dc98a0f179b872f612d3eb627924b578897c629788e858157fa5e704ca0c7" url: "https://pub.dev" source: hosted - version: "2.4.9" + version: "2.4.11" build_runner_core: dependency: transitive description: @@ -221,26 +221,26 @@ packages: dependency: transitive description: name: camera - sha256: "9499cbc2e51d8eb0beadc158b288380037618ce4e30c9acbc4fae1ac3ecb5797" + sha256: "26ff41045772153f222ffffecba711a206f670f5834d40ebf5eed3811692f167" url: "https://pub.dev" source: hosted - version: "0.10.5+9" - camera_android: + version: "0.11.0+2" + camera_android_camerax: dependency: transitive description: - name: camera_android - sha256: b350ac087f111467e705b2b76cc1322f7f5bdc122aa83b4b243b0872f390d229 + name: camera_android_camerax + sha256: "011be2ab0e5b3e3aa8094413fa890f8c5c5afd7cfdaef353a992047d4dab5780" url: "https://pub.dev" source: hosted - version: "0.10.9+2" + version: "0.6.8+2" camera_avfoundation: dependency: transitive description: name: camera_avfoundation - sha256: "608b56b0880722f703871329c4d7d4c2f379c8e2936940851df7fc041abc6f51" + sha256: "2e4c568f70e406ccb87376bc06b53d2f5bebaab71e2fbcc1a950e31449381bcf" url: "https://pub.dev" source: hosted - version: "0.9.13+10" + version: "0.9.17+5" camera_platform_interface: dependency: transitive description: @@ -333,10 +333,10 @@ packages: dependency: transitive description: name: cross_file - sha256: fedaadfa3a6996f75211d835aaeb8fede285dae94262485698afd832371b9a5e + sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670" url: "https://pub.dev" source: hosted - version: "0.3.3+8" + version: "0.3.4+2" crypto: dependency: transitive description: @@ -349,10 +349,10 @@ packages: dependency: transitive description: name: csslib - sha256: "706b5707578e0c1b4b7550f64078f0a0f19dec3f50a178ffae7006b0a9ca58fb" + sha256: "09bad715f418841f976c77db72d5398dc1253c21fb9c0c7f0b0b985860b2d58e" url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.0.2" cupertino_icons: dependency: transitive description: @@ -361,22 +361,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.8" - dart_code_metrics: - dependency: "direct dev" - description: - name: dart_code_metrics - sha256: "3dede3f7abc077a4181ec7445448a289a9ce08e2981e6a4d49a3fb5099d47e1f" - url: "https://pub.dev" - source: hosted - version: "5.7.6" - dart_code_metrics_presets: - dependency: transitive - description: - name: dart_code_metrics_presets - sha256: b71eadf02a3787ebd5c887623f83f6fdc204d45c75a081bd636c4104b3fd8b73 - url: "https://pub.dev" - source: hosted - version: "1.8.0" dart_mappable: dependency: "direct main" description: @@ -388,12 +372,11 @@ packages: dart_mappable_builder: dependency: "direct dev" description: - path: "packages/dart_mappable_builder" - ref: master - resolved-ref: e3d8ac43f70568b4a17c200cae5cde285050ef23 - url: "https://github.com/egovernments/health-campaign-field-worker-app/" - source: git - version: "4.2.0" + name: dart_mappable_builder + sha256: ab5cf9086862d3fceb9773e945b5f95cc5471a28c782a4fc451bd400a4e0c64e + url: "https://pub.dev" + source: hosted + version: "4.2.3" dart_style: dependency: transitive description: @@ -418,46 +401,54 @@ packages: url: "https://pub.dev" source: hosted version: "0.4.1" - digit_components: - dependency: "direct main" - description: - name: digit_components - sha256: "07b585e5d8010639366da72a4a8b215ce9b8790c75b2162b66af3cea57ca35d9" - url: "https://pub.dev" - source: hosted - version: "1.0.2+1" digit_data_model: dependency: "direct main" description: name: digit_data_model - sha256: "560b806cbb9f760ed956ecf2d01a8e5ea5640d8fca9ec1332ee15b34998d2e15" + sha256: c3bc7299a7d927ebb83d8e91c1d7a8a51f6a1d1295dafeacb642012b72b99a2f url: "https://pub.dev" source: hosted - version: "1.0.3+3" + version: "1.0.5" digit_scanner: dependency: "direct main" description: name: digit_scanner - sha256: "9862c4885465bb1942e36dc9b42596c201648db9b0f5ffb8ad768e2409fc2742" + sha256: c33af61ed9ab3d7740fc3c8948af4b763d946cba5e902f8bfb00948d4d69d60a + url: "https://pub.dev" + source: hosted + version: "1.0.4" + digit_ui_components: + dependency: "direct main" + description: + name: digit_ui_components + sha256: "57c4da5237be6025783e7357a02b6b492f02e38f711d674bf46f5f8c8a93ad76" url: "https://pub.dev" source: hosted - version: "1.0.3+1" + version: "0.0.2-dev.4" dio: - dependency: transitive + dependency: "direct main" description: name: dio sha256: "11e40df547d418cc0c4900a9318b26304e665da6fa4755399a9ff9efd09034b5" url: "https://pub.dev" source: hosted version: "5.4.3+1" + dotted_border: + dependency: transitive + description: + name: dotted_border + sha256: "108837e11848ca776c53b30bc870086f84b62ed6e01c503ed976e8f8c7df9c04" + url: "https://pub.dev" + source: hosted + version: "2.1.0" drift: dependency: "direct main" description: name: drift - sha256: b50a8342c6ddf05be53bda1d246404cbad101b64dc73e8d6d1ac1090d119b4e2 + sha256: "6acedc562ffeed308049f78fb1906abad3d65714580b6745441ee6d50ec564cd" url: "https://pub.dev" source: hosted - version: "2.15.0" + version: "2.18.0" drift_db_viewer: dependency: "direct main" description: @@ -470,18 +461,10 @@ packages: dependency: "direct dev" description: name: drift_dev - sha256: c037d9431b6f8dc633652b1469e5f53aaec6e4eb405ed29dd232fa888ef10d88 + sha256: d9b020736ea85fff1568699ce18b89fabb3f0f042e8a7a05e84a3ec20d39acde url: "https://pub.dev" source: hosted - version: "2.15.0" - easy_stepper: - dependency: transitive - description: - name: easy_stepper - sha256: "77f3ab4ee3c867b5a2236bf712abb08fed2b1c533cf24cf3fcd46c2821072ffd" - url: "https://pub.dev" - source: hosted - version: "0.5.2+1" + version: "2.18.0" fake_async: dependency: transitive description: @@ -506,91 +489,104 @@ packages: url: "https://pub.dev" source: hosted version: "6.1.4" - fixnum: + file_picker: dependency: transitive description: - name: fixnum - sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + name: file_picker + sha256: "2ca051989f69d1b2ca012b2cf3ccf78c70d40144f0861ff2c063493f7c8c3d45" url: "https://pub.dev" source: hosted - version: "1.1.0" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_bloc: - dependency: "direct main" + version: "8.0.5" + file_selector_linux: + dependency: transitive description: - name: flutter_bloc - sha256: f0ecf6e6eb955193ca60af2d5ca39565a86b8a142452c5b24d96fb477428f4d2 + name: file_selector_linux + sha256: "54cbbd957e1156d29548c7d9b9ec0c0ebb6de0a90452198683a7d23aed617a33" url: "https://pub.dev" source: hosted - version: "8.1.5" - flutter_focus_watcher: + version: "0.9.3+2" + file_selector_macos: dependency: transitive description: - name: flutter_focus_watcher - sha256: a72ee539ae0237961308a25839887ca93a0b1cb6f87b0d492b139c8fccff8e79 + name: file_selector_macos + sha256: "271ab9986df0c135d45c3cdb6bd0faa5db6f4976d3e4b437cf7d0f258d941bfc" url: "https://pub.dev" source: hosted - version: "2.0.0" - flutter_keyboard_visibility: + version: "0.9.4+2" + file_selector_platform_interface: dependency: transitive description: - name: flutter_keyboard_visibility - sha256: "4983655c26ab5b959252ee204c2fffa4afeb4413cd030455194ec0caa3b8e7cb" + name: file_selector_platform_interface + sha256: a3994c26f10378a039faa11de174d7b78eb8f79e4dd0af2a451410c1a5c3f66b url: "https://pub.dev" source: hosted - version: "5.4.1" - flutter_keyboard_visibility_linux: + version: "2.6.2" + file_selector_windows: dependency: transitive description: - name: flutter_keyboard_visibility_linux - sha256: "6fba7cd9bb033b6ddd8c2beb4c99ad02d728f1e6e6d9b9446667398b2ac39f08" + name: file_selector_windows + sha256: "8f5d2f6590d51ecd9179ba39c64f722edc15226cc93dcc8698466ad36a4a85a4" url: "https://pub.dev" source: hosted - version: "1.0.0" - flutter_keyboard_visibility_macos: + version: "0.9.3+3" + fixnum: dependency: transitive description: - name: flutter_keyboard_visibility_macos - sha256: c5c49b16fff453dfdafdc16f26bdd8fb8d55812a1d50b0ce25fc8d9f2e53d086 + name: fixnum + sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" url: "https://pub.dev" source: hosted - version: "1.0.0" - flutter_keyboard_visibility_platform_interface: + version: "1.1.0" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_bloc: + dependency: "direct main" + description: + name: flutter_bloc + sha256: f0ecf6e6eb955193ca60af2d5ca39565a86b8a142452c5b24d96fb477428f4d2 + url: "https://pub.dev" + source: hosted + version: "8.1.5" + flutter_dropzone: dependency: transitive description: - name: flutter_keyboard_visibility_platform_interface - sha256: e43a89845873f7be10cb3884345ceb9aebf00a659f479d1c8f4293fcb37022a4 + name: flutter_dropzone + sha256: b399c60411f9bf9c4c2f97933c6a3a185859e75aade8897831e76cee4346c8e1 url: "https://pub.dev" source: hosted - version: "2.0.0" - flutter_keyboard_visibility_web: + version: "3.0.7" + flutter_dropzone_platform_interface: dependency: transitive description: - name: flutter_keyboard_visibility_web - sha256: d3771a2e752880c79203f8d80658401d0c998e4183edca05a149f5098ce6e3d1 + name: flutter_dropzone_platform_interface + sha256: "96d2c51c86063ba150551c3b40fd26c5a18785bee071c0c751502d28a545df3b" url: "https://pub.dev" source: hosted - version: "2.0.0" - flutter_keyboard_visibility_windows: + version: "2.2.0" + flutter_dropzone_web: dependency: transitive description: - name: flutter_keyboard_visibility_windows - sha256: fc4b0f0b6be9b93ae527f3d527fb56ee2d918cd88bbca438c478af7bcfd0ef73 + name: flutter_dropzone_web + sha256: c5a0fdb63b7216352a01761ec1b6eba1982e49541e60675735e2d3d95e207b19 url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "3.0.13" flutter_lints: dependency: "direct dev" description: name: flutter_lints - sha256: "9e8c3858111da373efc5aa341de011d9bd23e2c5c5e0c62bccf32438e192d7b1" + sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c" url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "4.0.0" + flutter_localizations: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" flutter_plugin_android_lifecycle: dependency: transitive description: @@ -607,27 +603,27 @@ packages: url: "https://pub.dev" source: hosted version: "5.2.1" + flutter_styled_toast: + dependency: transitive + description: + name: flutter_styled_toast + sha256: e667f13a665820eb0fa8506547e47eacbcddf1948d6d3036cfd3b089bd4b0516 + url: "https://pub.dev" + source: hosted + version: "2.2.1" flutter_svg: dependency: "direct main" description: name: flutter_svg - sha256: d39e7f95621fc84376bc0f7d504f05c3a41488c562f4a8ad410569127507402c + sha256: "54900a1a1243f3c4a5506d853a2b5c2dbc38d5f27e52a52618a8054401431123" url: "https://pub.dev" source: hosted - version: "2.0.9" + version: "2.0.16" flutter_test: dependency: "direct dev" description: flutter source: sdk version: "0.0.0" - flutter_typeahead: - dependency: transitive - description: - name: flutter_typeahead - sha256: b9942bd5b7611a6ec3f0730c477146cffa4cd4b051077983ba67ddfc9e7ee818 - url: "https://pub.dev" - source: hosted - version: "4.8.0" flutter_web_plugins: dependency: transitive description: flutter @@ -637,10 +633,10 @@ packages: dependency: "direct main" description: name: fluttertoast - sha256: "81b68579e23fcbcada2db3d50302813d2371664afe6165bc78148050ab94bf66" + sha256: "95f349437aeebe524ef7d6c9bde3e6b4772717cf46a0eb6a3ceaddc740b297cc" url: "https://pub.dev" source: hosted - version: "8.2.5" + version: "8.2.8" freezed: dependency: "direct dev" description: @@ -665,6 +661,54 @@ packages: url: "https://pub.dev" source: hosted version: "3.2.0" + geolocator: + dependency: transitive + description: + name: geolocator + sha256: f4efb8d3c4cdcad2e226af9661eb1a0dd38c71a9494b22526f9da80ab79520e5 + url: "https://pub.dev" + source: hosted + version: "10.1.1" + geolocator_android: + dependency: transitive + description: + name: geolocator_android + sha256: "7aefc530db47d90d0580b552df3242440a10fe60814496a979aa67aa98b1fd47" + url: "https://pub.dev" + source: hosted + version: "4.6.1" + geolocator_apple: + dependency: transitive + description: + name: geolocator_apple + sha256: "6154ea2682563f69fc0125762ed7e91e7ed85d0b9776595653be33918e064807" + url: "https://pub.dev" + source: hosted + version: "2.3.8+1" + geolocator_platform_interface: + dependency: transitive + description: + name: geolocator_platform_interface + sha256: "386ce3d9cce47838355000070b1d0b13efb5bc430f8ecda7e9238c8409ace012" + url: "https://pub.dev" + source: hosted + version: "4.2.4" + geolocator_web: + dependency: transitive + description: + name: geolocator_web + sha256: "102e7da05b48ca6bf0a5bda0010f886b171d1a08059f01bfe02addd0175ebece" + url: "https://pub.dev" + source: hosted + version: "2.2.1" + geolocator_windows: + dependency: transitive + description: + name: geolocator_windows + sha256: "53da08937d07c24b0d9952eb57a3b474e29aae2abf9dd717f7e1230995f13f0e" + url: "https://pub.dev" + source: hosted + version: "0.2.3" glob: dependency: transitive description: @@ -677,26 +721,26 @@ packages: dependency: transitive description: name: google_fonts - sha256: "6b6f10f0ce3c42f6552d1c70d2c28d764cf22bb487f50f66cca31dcd5194f4d6" + sha256: b1ac0fe2832c9cc95e5e88b57d627c5e68c223b9657f4b96e1487aa9098c7b82 url: "https://pub.dev" source: hosted - version: "4.0.4" + version: "6.2.1" google_mlkit_barcode_scanning: dependency: transitive description: name: google_mlkit_barcode_scanning - sha256: "965183a8cd5cef8477ceea5dbdf29c34a739cf0cfbf1bdad54cd3f9f1807afe5" + sha256: f1a2a39cf1730b9a5e2784a07efa1ca5bfdfdde6aa00b193b3f8cd1953c638ec url: "https://pub.dev" source: hosted - version: "0.10.0" + version: "0.12.0" google_mlkit_commons: dependency: transitive description: name: google_mlkit_commons - sha256: "046586b381cdd139f7f6a05ad6998f7e339d061bd70158249907358394b5f496" + sha256: "27d626c66a181351a953eba5b6ff1ff123aadb891b4dab085b292118f039d6ac" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.1" graphs: dependency: transitive description: @@ -725,18 +769,18 @@ packages: dependency: transitive description: name: html - sha256: "3a7812d5bcd2894edf53dfaf8cd640876cf6cef50a8f238745c8b8120ea74d3a" + sha256: "1fc58edeaec4307368c60d59b7e15b9d658b57d7f3125098b6294153c75337ec" url: "https://pub.dev" source: hosted - version: "0.15.4" + version: "0.15.5" http: dependency: transitive description: name: http - sha256: "5895291c13fa8a3bd82e76d5627f69e0d85ca6a30dcac95c4ea19a5d555879c2" + sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 url: "https://pub.dev" source: hosted - version: "0.13.6" + version: "1.2.2" http_multi_server: dependency: transitive description: @@ -753,14 +797,78 @@ packages: url: "https://pub.dev" source: hosted version: "4.0.2" + image_picker: + dependency: transitive + description: + name: image_picker + sha256: "021834d9c0c3de46bf0fe40341fa07168407f694d9b2bb18d532dc1261867f7a" + url: "https://pub.dev" + source: hosted + version: "1.1.2" + image_picker_android: + dependency: transitive + description: + name: image_picker_android + sha256: "8c5abf0dcc24fe6e8e0b4a5c0b51a5cf30cefdf6407a3213dae61edc75a70f56" + url: "https://pub.dev" + source: hosted + version: "0.8.12+12" + image_picker_for_web: + dependency: transitive + description: + name: image_picker_for_web + sha256: "717eb042ab08c40767684327be06a5d8dbb341fe791d514e4b92c7bbe1b7bb83" + url: "https://pub.dev" + source: hosted + version: "3.0.6" + image_picker_ios: + dependency: transitive + description: + name: image_picker_ios + sha256: "4f0568120c6fcc0aaa04511cb9f9f4d29fc3d0139884b1d06be88dcec7641d6b" + url: "https://pub.dev" + source: hosted + version: "0.8.12+1" + image_picker_linux: + dependency: transitive + description: + name: image_picker_linux + sha256: "4ed1d9bb36f7cd60aa6e6cd479779cc56a4cb4e4de8f49d487b1aaad831300fa" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + image_picker_macos: + dependency: transitive + description: + name: image_picker_macos + sha256: "3f5ad1e8112a9a6111c46d0b57a7be2286a9a07fc6e1976fdf5be2bd31d4ff62" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + image_picker_platform_interface: + dependency: transitive + description: + name: image_picker_platform_interface + sha256: "9ec26d410ff46f483c5519c29c02ef0e02e13a543f882b152d4bfd2f06802f80" + url: "https://pub.dev" + source: hosted + version: "2.10.0" + image_picker_windows: + dependency: transitive + description: + name: image_picker_windows + sha256: "6ad07afc4eb1bc25f3a01084d28520496c4a3bb0cb13685435838167c9dcedeb" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" intl: dependency: "direct main" description: name: intl - sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" + sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf url: "https://pub.dev" source: hosted - version: "0.18.1" + version: "0.19.0" io: dependency: transitive description: @@ -809,38 +917,62 @@ packages: url: "https://pub.dev" source: hosted version: "6.8.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + url: "https://pub.dev" + source: hosted + version: "10.0.4" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + url: "https://pub.dev" + source: hosted + version: "3.0.3" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" lints: dependency: transitive description: name: lints - sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290 + sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235" url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "4.0.0" location: - dependency: transitive + dependency: "direct main" description: name: location - sha256: "06be54f682c9073cbfec3899eb9bc8ed90faa0e17735c9d9fa7fe426f5be1dd1" + sha256: "37ffdadcd4b1498b769824f45ebb4de8ed46663a4a67ac27b33a590ee486579f" url: "https://pub.dev" source: hosted - version: "5.0.3" + version: "6.0.2" location_platform_interface: dependency: transitive description: name: location_platform_interface - sha256: "8aa1d34eeecc979d7c9fe372931d84f6d2ebbd52226a54fe1620de6fdc0753b1" + sha256: "2ecde6bb0f88032b0bbbde37e18975b4468711dd92619c2235cc0c0ee93b4b8e" url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "4.0.0" location_web: dependency: transitive description: name: location_web - sha256: ec484c66e8a4ff1ee5d044c203f4b6b71e3a0556a97b739a5bc9616de672412b + sha256: "49dda13d415c4603c5775a33fb22f575e0aa3f0ec2916644ddcd722db31ee884" url: "https://pub.dev" source: hosted - version: "4.2.0" + version: "5.0.2" logging: dependency: transitive description: @@ -853,34 +985,34 @@ packages: dependency: transitive description: name: lottie - sha256: a93542cc2d60a7057255405f62252533f8e8956e7e06754955669fd32fb4b216 + sha256: "7afc60865a2429d994144f7d66ced2ae4305fe35d82890b8766e3359872d872c" url: "https://pub.dev" source: hosted - version: "2.7.0" + version: "3.1.3" matcher: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.12.0" mime: dependency: transitive description: @@ -929,30 +1061,22 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.0" - package_info_plus: - dependency: transitive + path: + dependency: "direct main" description: - name: package_info_plus - sha256: "88bc797f44a94814f2213db1c9bd5badebafdfb8290ca9f78d4b9ee2a3db4d79" + name: path + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "5.0.1" - package_info_plus_platform_interface: + version: "1.9.0" + path_drawing: dependency: transitive description: - name: package_info_plus_platform_interface - sha256: "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6" + name: path_drawing + sha256: bbb1934c0cbb03091af082a6389ca2080345291ef07a5fa6d6e078ba8682f977 url: "https://pub.dev" source: hosted - version: "2.0.1" - path: - dependency: "direct main" - description: - name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" - url: "https://pub.dev" - source: hosted - version: "1.8.3" + version: "1.0.1" path_parsing: dependency: transitive description: @@ -1037,18 +1161,10 @@ packages: dependency: "direct main" description: name: pluto_grid - sha256: e77c34a33dd9d74abbe20ba1df96474dded150dd042c7f7495be1bc2c26bd37f - url: "https://pub.dev" - source: hosted - version: "7.0.2" - pointer_interceptor: - dependency: transitive - description: - name: pointer_interceptor - sha256: adf7a637f97c077041d36801b43be08559fd4322d2127b3f20bb7be1b9eebc22 + sha256: "1d4cd9d2652742b556aa9b3230cc64672a3f63c34a9acc80fef794ab36ad903b" url: "https://pub.dev" source: hosted - version: "0.9.3+7" + version: "8.0.0" pool: dependency: transitive description: @@ -1057,14 +1173,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.5.1" - process: - dependency: transitive - description: - name: process - sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09" - url: "https://pub.dev" - source: hosted - version: "4.2.4" provider: dependency: transitive description: @@ -1081,14 +1189,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" - pub_updater: - dependency: transitive - description: - name: pub_updater - sha256: "05ae70703e06f7fdeb05f7f02dd680b8aad810e87c756a618f33e1794635115c" - url: "https://pub.dev" - source: hosted - version: "0.3.0" pubspec_parse: dependency: transitive description: @@ -1097,22 +1197,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.3" - reactive_flutter_typeahead: - dependency: transitive - description: - name: reactive_flutter_typeahead - sha256: ef91627df8cef70e603e8a6458749d8a99a385b78854332602fd08ad905cdab8 - url: "https://pub.dev" - source: hosted - version: "0.8.1" reactive_forms: dependency: "direct main" description: name: reactive_forms - sha256: "5aa9c48a0626c20d00a005e597cb10efbdebbfeecb9c4227b03a5945fbb91ec4" + sha256: "9b1fb18e0aae9c50cfa0aaabaaa38bc4d78eefc9b7b95fa9c947b051f6524b8e" url: "https://pub.dev" source: hosted - version: "14.3.0" + version: "17.0.1" recase: dependency: "direct main" description: @@ -1121,14 +1213,6 @@ packages: url: "https://pub.dev" source: hosted version: "4.1.0" - remove_emoji_input_formatter: - dependency: transitive - description: - name: remove_emoji_input_formatter - sha256: "82d195984f890de7a8fea936c698848e78c1a67ccefe18db3baf9f7a3bc0177f" - url: "https://pub.dev" - source: hosted - version: "0.0.1+1" rxdart: dependency: transitive description: @@ -1214,6 +1298,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.10.0" + sprintf: + dependency: transitive + description: + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" + url: "https://pub.dev" + source: hosted + version: "7.0.0" sqlite3: dependency: transitive description: @@ -1226,18 +1318,18 @@ packages: dependency: "direct main" description: name: sqlite3_flutter_libs - sha256: fb2a106a2ea6042fe57de2c47074cc31539a941819c91e105b864744605da3f5 + sha256: "636b0fe8a2de894e5455572f6cbbc458f4ffecfe9f860b79439e27041ea4f0b9" url: "https://pub.dev" source: hosted - version: "0.5.21" + version: "0.5.27" sqlparser: dependency: transitive description: name: sqlparser - sha256: "7b20045d1ccfb7bc1df7e8f9fee5ae58673fce6ff62cefbb0e0fd7214e90e5a0" + sha256: ade9a67fd70d0369329ed3373208de7ebd8662470e8c396fc8d0d60f9acdfc9f url: "https://pub.dev" source: hosted - version: "0.34.1" + version: "0.36.0" stack_trace: dependency: transitive description: @@ -1290,26 +1382,26 @@ packages: dependency: transitive description: name: test - sha256: a1f7595805820fcc05e5c52e3a231aedd0b72972cb333e8c738a8b1239448b6f + sha256: "7ee446762c2c50b3bd4ea96fe13ffac69919352bd3b4b17bac3f3465edc58073" url: "https://pub.dev" source: hosted - version: "1.24.9" + version: "1.25.2" test_api: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.0" test_core: dependency: transitive description: name: test_core - sha256: a757b14fc47507060a162cc2530d9a4a2f92f5100a952c7443b5cad5ef5b106a + sha256: "2bc4b4ecddd75309300d8096f781c0e3280ca1ef85beda558d33fcbedc2eead4" url: "https://pub.dev" source: hosted - version: "0.5.9" + version: "0.6.0" timing: dependency: transitive description: @@ -1334,38 +1426,118 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.2" + universal_html: + dependency: transitive + description: + name: universal_html + sha256: "56536254004e24d9d8cfdb7dbbf09b74cf8df96729f38a2f5c238163e3d58971" + url: "https://pub.dev" + source: hosted + version: "2.2.4" + universal_io: + dependency: transitive + description: + name: universal_io + sha256: "1722b2dcc462b4b2f3ee7d188dad008b6eb4c40bbd03a3de451d82c78bba9aad" + url: "https://pub.dev" + source: hosted + version: "2.2.2" + url_launcher: + dependency: transitive + description: + name: url_launcher + sha256: "9d06212b1362abc2f0f0d78e6f09f726608c74e3b9462e8368bb03314aa8d603" + url: "https://pub.dev" + source: hosted + version: "6.3.1" + url_launcher_android: + dependency: transitive + description: + name: url_launcher_android + sha256: f0c73347dfcfa5b3db8bc06e1502668265d39c08f310c29bff4e28eea9699f79 + url: "https://pub.dev" + source: hosted + version: "6.3.9" + url_launcher_ios: + dependency: transitive + description: + name: url_launcher_ios + sha256: "16a513b6c12bb419304e72ea0ae2ab4fed569920d1c7cb850263fe3acc824626" + url: "https://pub.dev" + source: hosted + version: "6.3.2" + url_launcher_linux: + dependency: transitive + description: + name: url_launcher_linux + sha256: "4e9ba368772369e3e08f231d2301b4ef72b9ff87c31192ef471b380ef29a4935" + url: "https://pub.dev" + source: hosted + version: "3.2.1" + url_launcher_macos: + dependency: transitive + description: + name: url_launcher_macos + sha256: "17ba2000b847f334f16626a574c702b196723af2a289e7a93ffcb79acff855c2" + url: "https://pub.dev" + source: hosted + version: "3.2.2" + url_launcher_platform_interface: + dependency: transitive + description: + name: url_launcher_platform_interface + sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + url_launcher_web: + dependency: transitive + description: + name: url_launcher_web + sha256: "772638d3b34c779ede05ba3d38af34657a05ac55b06279ea6edd409e323dca8e" + url: "https://pub.dev" + source: hosted + version: "2.3.3" + url_launcher_windows: + dependency: transitive + description: + name: url_launcher_windows + sha256: "44cf3aabcedde30f2dba119a9dea3b0f2672fbe6fa96e85536251d678216b3c4" + url: "https://pub.dev" + source: hosted + version: "3.1.3" uuid: dependency: "direct main" description: name: uuid - sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" + sha256: a5be9ef6618a7ac1e964353ef476418026db906c4facdedaa299b7a2e71690ff url: "https://pub.dev" source: hosted - version: "3.0.7" + version: "4.5.1" vector_graphics: dependency: transitive description: name: vector_graphics - sha256: "4ac59808bbfca6da38c99f415ff2d3a5d7ca0a6b4809c71d9cf30fba5daf9752" + sha256: "27d5fefe86fb9aace4a9f8375b56b3c292b64d8c04510df230f849850d912cb7" url: "https://pub.dev" source: hosted - version: "1.1.10+1" + version: "1.1.15" vector_graphics_codec: dependency: transitive description: name: vector_graphics_codec - sha256: f3247e7ab0ec77dc759263e68394990edc608fb2b480b80db8aa86ed09279e33 + sha256: "2430b973a4ca3c4dbc9999b62b8c719a160100dcbae5c819bae0cacce32c9cdb" url: "https://pub.dev" source: hosted - version: "1.1.10+1" + version: "1.1.12" vector_graphics_compiler: dependency: transitive description: name: vector_graphics_compiler - sha256: "18489bdd8850de3dd7ca8a34e0c446f719ec63e2bab2e7a8cc66a9028dd76c5a" + sha256: "1b4b9e706a10294258727674a340ae0d6e64a7231980f9f9a3d12e4b42407aad" url: "https://pub.dev" source: hosted - version: "1.1.10+1" + version: "1.1.16" vector_math: dependency: transitive description: @@ -1374,14 +1546,22 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" + visibility_detector: + dependency: transitive + description: + name: visibility_detector + sha256: dd5cc11e13494f432d15939c3aa8ae76844c42b723398643ce9addb88a5ed420 + url: "https://pub.dev" + source: hosted + version: "0.4.0+2" vm_service: dependency: transitive description: name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" url: "https://pub.dev" source: hosted - version: "13.0.0" + version: "14.2.1" watcher: dependency: transitive description: @@ -1394,10 +1574,10 @@ packages: dependency: transitive description: name: web - sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "0.5.1" web_socket_channel: dependency: transitive description: @@ -1447,5 +1627,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.2.0 <3.9.0" - flutter: ">=3.16.0" + dart: ">=3.4.0 <3.9.0" + flutter: ">=3.22.0" diff --git a/packages/inventory_management/pubspec.yaml b/packages/inventory_management/pubspec.yaml index 75f1edbaf..344ede57b 100644 --- a/packages/inventory_management/pubspec.yaml +++ b/packages/inventory_management/pubspec.yaml @@ -1,6 +1,6 @@ name: inventory_management description: This package offers inventory management features, allowing users to view stock reports and perform inventory resource reconciliation. -version: 1.0.3+5 +version: 1.0.4 homepage: https://github.com/egovernments/health-campaign-field-worker-app/tree/master/packages/inventory_management repository: https://github.com/egovernments/health-campaign-field-worker-app @@ -11,46 +11,43 @@ environment: dependencies: flutter: sdk: flutter - digit_components: ^1.0.2+1 - flutter_bloc: ^8.1.1 - freezed_annotation: ^2.1.0 - build_runner: ^2.2.1 - reactive_forms: ^14.1.0 + digit_ui_components: ^0.0.2-dev.4 + flutter_bloc: ^8.1.5 + freezed_annotation: ^2.4.1 + reactive_forms: ^17.0.0 + intl: ^0.19.0 + flutter_svg: ^2.0.10+1 + dart_mappable: ^4.2.2 + drift: ^2.18.0 + auto_route: ^8.1.3 + digit_data_model: ^1.0.5 + collection: ^1.18.0 + dio: ^5.4.3+1 + location: ^6.0.2 + gs1_barcode_parser: ^1.0.5 + uuid: ^4.4.0 fluttertoast: ^8.1.2 overlay_builder: ^1.1.0 - intl: ^0.18.0 - flutter_svg: ^2.0.8 - dart_mappable: ^4.2.0 - drift: ^2.0.0 sqlite3_flutter_libs: ^0.5.10 path_provider: ^2.0.11 path: ^1.8.2 drift_db_viewer: ^2.0.0 - uuid: ^3.0.6 recase: ^4.1.0 - pluto_grid: ^7.0.1 - digit_scanner: ^1.0.3+1 - gs1_barcode_parser: ^1.0.5 - auto_route: ^7.8.4 - digit_data_model: ^1.0.3+3 - collection: ^1.16.0 + digit_scanner: ^1.0.4 + pluto_grid: ^8.0.0 dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^3.0.1 - dart_code_metrics: ^5.7.6 + flutter_lints: ^4.0.0 freezed: ^2.1.0+1 json_serializable: ^6.4.0 drift_dev: ^2.14.1 bloc_test: ^9.1.0 + build_runner: ^2.4.11 mocktail: ^1.0.2 - dart_mappable_builder: - git: - url: https://github.com/egovernments/health-campaign-field-worker-app/ - ref: master - path: ./packages/dart_mappable_builder - auto_route_generator: ^7.3.2 + dart_mappable_builder: ^4.2.2 + auto_route_generator: ^8.0.0 flutter: assets: diff --git a/packages/inventory_management/test/blocs/record_stock_test.dart b/packages/inventory_management/test/blocs/record_stock_test.dart index 84b5b6947..39a016da6 100644 --- a/packages/inventory_management/test/blocs/record_stock_test.dart +++ b/packages/inventory_management/test/blocs/record_stock_test.dart @@ -30,19 +30,8 @@ void main() { // Grouping tests related to RecordStockBloc group('RecordStockBloc', () { - // Declaring variables for mock and bloc - late RecordStockBloc recordStockBloc; - // Setting up the mock and the bloc for each test - setUp(() { - recordStockBloc = RecordStockBloc( - stockRepository: MockStockDataRepository(), - const RecordStockState.create( - entryType: InventoryReportConstants.entryType, - projectId: InventoryReportConstants.projectId, - ), - ); - }); + setUp(() {}); // Test for saveWarehouseDetails event blocTest( diff --git a/packages/referral_reconciliation/CHANGELOG.md b/packages/referral_reconciliation/CHANGELOG.md index df1ef695a..5d57bc4a1 100644 --- a/packages/referral_reconciliation/CHANGELOG.md +++ b/packages/referral_reconciliation/CHANGELOG.md @@ -1,8 +1,18 @@ +## 1.0.3 + +* Upgrade to Flutter 3.22 +* Updated digit_data_model, survey_form to latest version +* Migrated to digit_ui_components + ## 1.0.2+2 * Updated digit_components, digit_data_model * Service model additionalDetails objectType changes in checklist +## 1.0.3-dev.1 + +* Integrated with survey_form package + ## 1.0.2+1 * Updated digit_scanner package, digit_components, digit_data_model diff --git a/packages/referral_reconciliation/assets/animated_json/alert.json b/packages/referral_reconciliation/assets/animated_json/alert.json new file mode 100644 index 000000000..171b416cd --- /dev/null +++ b/packages/referral_reconciliation/assets/animated_json/alert.json @@ -0,0 +1,1127 @@ +{ + "nm": "48 - Warning", + "ddd": 0, + "h": 500, + "w": 500, + "meta": { + "g": "LottieFiles AE " + }, + "layers": [ + { + "ty": 3, + "nm": "48 - Warning", + "sr": 1, + "st": 0, + "op": 144, + "ip": 0, + "hd": false, + "ddd": 0, + "bm": 0, + "hasMask": false, + "ao": 0, + "ks": { + "a": { + "a": 0, + "k": [ + 60, + 60, + 0 + ], + "ix": 1 + }, + "s": { + "a": 0, + "k": [ + 180, + 180, + 100 + ], + "ix": 6 + }, + "sk": { + "a": 0, + "k": 0 + }, + "p": { + "a": 0, + "k": [ + 250.045, + 290.339, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 10 + }, + "sa": { + "a": 0, + "k": 0 + }, + "o": { + "a": 0, + "k": 0, + "ix": 11 + } + }, + "ef": [], + "ind": 1 + }, + { + "ty": 4, + "nm": "Line", + "sr": 1, + "st": 0, + "op": 144, + "ip": 12, + "hd": false, + "ddd": 0, + "bm": 0, + "hasMask": false, + "ao": 0, + "ks": { + "a": { + "a": 0, + "k": [ + -1, + 21.25, + 0 + ], + "ix": 1 + }, + "s": { + "a": 1, + "k": [ + { + "o": { + "x": 0.167, + "y": 0.167 + }, + "i": { + "x": 0, + "y": 1 + }, + "s": [ + 0, + 0, + 100 + ], + "t": 12 + }, + { + "s": [ + 55.556, + 55.556, + 100 + ], + "t": 32 + } + ], + "ix": 6 + }, + "sk": { + "a": 0, + "k": 0 + }, + "p": { + "a": 0, + "k": [ + 85.533, + 85.887, + 0 + ], + "ix": 2 + }, + "r": { + "a": 1, + "k": [ + { + "o": { + "x": 0.167, + "y": 0.167 + }, + "i": { + "x": 0, + "y": 1 + }, + "s": [ + 180 + ], + "t": 12 + }, + { + "s": [ + 0 + ], + "t": 32 + } + ], + "ix": 10 + }, + "sa": { + "a": 0, + "k": 0 + }, + "o": { + "a": 0, + "k": 100, + "ix": 11 + } + }, + "ef": [], + "shapes": [ + { + "ty": "gr", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Group", + "nm": "Shape 1", + "ix": 1, + "cix": 2, + "np": 3, + "it": [ + { + "ty": "sh", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Shape - Group", + "nm": "Path 1", + "ix": 1, + "d": 1, + "ks": { + "a": 0, + "k": { + "c": false, + "i": [ + [ + 0, + 0 + ], + [ + 0, + 0 + ] + ], + "o": [ + [ + 0, + 0 + ], + [ + 0, + 0 + ] + ], + "v": [ + [ + -1, + 80 + ], + [ + -1, + -37.5 + ] + ] + }, + "ix": 2 + } + }, + { + "ty": "st", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Graphic - Stroke", + "nm": "Stroke 1", + "lc": 2, + "lj": 1, + "ml": 4, + "o": { + "a": 0, + "k": 100, + "ix": 4 + }, + "w": { + "a": 0, + "k": 28, + "ix": 5 + }, + "c": { + "a": 0, + "k": [ + 1, + 1, + 1 + ], + "ix": 3 + } + }, + { + "ty": "tr", + "a": { + "a": 0, + "k": [ + 0, + 0 + ], + "ix": 1 + }, + "s": { + "a": 0, + "k": [ + 100, + 100 + ], + "ix": 3 + }, + "sk": { + "a": 0, + "k": 0, + "ix": 4 + }, + "p": { + "a": 0, + "k": [ + 0, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 6 + }, + "sa": { + "a": 0, + "k": 0, + "ix": 5 + }, + "o": { + "a": 0, + "k": 100, + "ix": 7 + } + } + ] + }, + { + "ty": "tm", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Filter - Trim", + "nm": "Trim Paths 1", + "ix": 2, + "e": { + "a": 0, + "k": 100, + "ix": 2 + }, + "o": { + "a": 0, + "k": 0, + "ix": 3 + }, + "s": { + "a": 1, + "k": [ + { + "o": { + "x": 0.167, + "y": 0.167 + }, + "i": { + "x": 0, + "y": 1 + }, + "s": [ + 0 + ], + "t": 22 + }, + { + "s": [ + 40 + ], + "t": 42 + } + ], + "ix": 1 + }, + "m": 1 + } + ], + "ind": 2, + "parent": 5 + }, + { + "ty": 4, + "nm": "Dot", + "sr": 1, + "st": 0, + "op": 144, + "ip": 12, + "hd": false, + "ddd": 0, + "bm": 0, + "hasMask": false, + "ao": 0, + "ks": { + "a": { + "a": 0, + "k": [ + 0, + 0, + 0 + ], + "ix": 1 + }, + "s": { + "a": 0, + "k": [ + 100, + 100, + 100 + ], + "ix": 6 + }, + "sk": { + "a": 0, + "k": 0 + }, + "p": { + "a": 0, + "k": [ + 0, + 0, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 10 + }, + "sa": { + "a": 0, + "k": 0 + }, + "o": { + "a": 0, + "k": 100, + "ix": 11 + } + }, + "ef": [], + "shapes": [ + { + "ty": "gr", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Group", + "nm": "Shape 1", + "ix": 1, + "cix": 2, + "np": 4, + "it": [ + { + "ty": "sh", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Shape - Group", + "nm": "Path 1", + "ix": 1, + "d": 1, + "ks": { + "a": 0, + "k": { + "c": false, + "i": [ + [ + 0, + 0 + ], + [ + 0, + 0 + ] + ], + "o": [ + [ + 0, + 0 + ], + [ + 0, + 0 + ] + ], + "v": [ + [ + -1, + 80 + ], + [ + -1, + -37.5 + ] + ] + }, + "ix": 2 + } + }, + { + "ty": "tm", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Filter - Trim", + "nm": "Trim Paths 1", + "ix": 2, + "e": { + "a": 0, + "k": 0.1, + "ix": 2 + }, + "o": { + "a": 0, + "k": 0, + "ix": 3 + }, + "s": { + "a": 0, + "k": 0, + "ix": 1 + }, + "m": 1 + }, + { + "ty": "st", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Graphic - Stroke", + "nm": "Stroke 1", + "lc": 2, + "lj": 1, + "ml": 4, + "o": { + "a": 0, + "k": 100, + "ix": 4 + }, + "w": { + "a": 0, + "k": 33, + "ix": 5 + }, + "c": { + "a": 0, + "k": [ + 1, + 1, + 1 + ], + "ix": 3 + } + }, + { + "ty": "tr", + "a": { + "a": 0, + "k": [ + 0, + 0 + ], + "ix": 1 + }, + "s": { + "a": 0, + "k": [ + 100, + 100 + ], + "ix": 3 + }, + "sk": { + "a": 0, + "k": 0, + "ix": 4 + }, + "p": { + "a": 0, + "k": [ + 0, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 6 + }, + "sa": { + "a": 0, + "k": 0, + "ix": 5 + }, + "o": { + "a": 0, + "k": 100, + "ix": 7 + } + } + ] + } + ], + "ind": 3, + "parent": 2 + }, + { + "ty": 4, + "nm": "Tri Outlines", + "sr": 1, + "st": 0, + "op": 144, + "ip": 10, + "hd": false, + "ddd": 0, + "bm": 0, + "hasMask": false, + "ao": 0, + "ks": { + "a": { + "a": 0, + "k": [ + 85.513, + 72.848, + 0 + ], + "ix": 1 + }, + "s": { + "a": 1, + "k": [ + { + "o": { + "x": 0.167, + "y": 0.167 + }, + "i": { + "x": 0.833, + "y": 0.833 + }, + "s": [ + 0, + 0, + 100 + ], + "t": 10 + }, + { + "s": [ + 100, + 100, + 100 + ], + "t": 15 + } + ], + "ix": 6, + "x": "var $bm_rt;\nvar amp, freq, decay, n, t, v;\ntry {\n amp = $bm_div(effect('Scale - Overshoot')('ADBE Slider Control-0001'), 2.5), freq = $bm_div(effect('Scale - Bounce')('ADBE Slider Control-0001'), 20), decay = $bm_div(effect('Scale - Friction')('ADBE Slider Control-0001'), 20), n = 0, 0 < numKeys && (n = nearestKey(time).index, key(n).time > time && n--), t = 0 === n ? 0 : $bm_sub(time, key(n).time), $bm_rt = 0 < n ? (v = velocityAtTime($bm_sub(key(n).time, $bm_div(thisComp.frameDuration, 10))), $bm_sum(value, $bm_div($bm_mul($bm_mul($bm_div(v, 100), amp), Math.sin($bm_mul($bm_mul($bm_mul(freq, t), 2), Math.PI))), Math.exp($bm_mul(decay, t))))) : value;\n} catch (e$$4) {\n $bm_rt = value = value;\n}" + }, + "sk": { + "a": 0, + "k": 0 + }, + "p": { + "a": 0, + "k": [ + 59.955, + 37.467, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 10 + }, + "sa": { + "a": 0, + "k": 0 + }, + "o": { + "a": 0, + "k": 100, + "ix": 11 + } + }, + "ef": [ + { + "ty": 5, + "mn": "ADBE Slider Control", + "nm": "Scale - Overshoot", + "ix": 1, + "en": 1, + "ef": [ + { + "ty": 0, + "mn": "ADBE Slider Control-0001", + "nm": "Slider", + "ix": 1, + "v": { + "a": 0, + "k": 10, + "ix": 1, + "x": "var $bm_rt;\n$bm_rt = clamp(value, 0, 100);" + } + } + ] + }, + { + "ty": 5, + "mn": "ADBE Slider Control", + "nm": "Scale - Bounce", + "ix": 2, + "en": 1, + "ef": [ + { + "ty": 0, + "mn": "ADBE Slider Control-0001", + "nm": "Slider", + "ix": 1, + "v": { + "a": 0, + "k": 35, + "ix": 1, + "x": "var $bm_rt;\n$bm_rt = clamp(value, 0, 100);" + } + } + ] + }, + { + "ty": 5, + "mn": "ADBE Slider Control", + "nm": "Scale - Friction", + "ix": 3, + "en": 1, + "ef": [ + { + "ty": 0, + "mn": "ADBE Slider Control-0001", + "nm": "Slider", + "ix": 1, + "v": { + "a": 0, + "k": 65, + "ix": 1, + "x": "var $bm_rt;\n$bm_rt = clamp(value, 0, 100);" + } + } + ] + } + ], + "shapes": [ + { + "ty": "gr", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Group", + "nm": "Group 1", + "ix": 1, + "cix": 2, + "np": 2, + "it": [ + { + "ty": "sh", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Shape - Group", + "nm": "Path 1", + "ix": 1, + "d": 1, + "ks": { + "a": 0, + "k": { + "c": true, + "i": [ + [ + -3.315, + 5.634 + ], + [ + 0, + 0 + ], + [ + -3.267, + -5.554 + ], + [ + 0, + 0 + ], + [ + 6.537, + 0 + ], + [ + 0, + 0 + ] + ], + "o": [ + [ + 0, + 0 + ], + [ + 3.268, + -5.554 + ], + [ + 0, + 0 + ], + [ + 3.315, + 5.634 + ], + [ + 0, + 0 + ], + [ + -6.536, + 0 + ] + ], + "v": [ + [ + -81.948, + 59.861 + ], + [ + -7.284, + -67.044 + ], + [ + 7.284, + -67.044 + ], + [ + 81.948, + 59.861 + ], + [ + 74.664, + 72.598 + ], + [ + -74.664, + 72.598 + ] + ] + }, + "ix": 2 + } + }, + { + "ty": "fl", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Graphic - Fill", + "nm": "Fill 1", + "c": { + "a": 0, + "k": [ + 0.7255, + 0.098, + 0 + ], + "ix": 4 + }, + "r": 1, + "o": { + "a": 0, + "k": 100, + "ix": 5 + } + }, + { + "ty": "tr", + "a": { + "a": 0, + "k": [ + 0, + 0 + ], + "ix": 1 + }, + "s": { + "a": 0, + "k": [ + 100, + 100 + ], + "ix": 3 + }, + "sk": { + "a": 0, + "k": 0, + "ix": 4 + }, + "p": { + "a": 0, + "k": [ + 85.513, + 72.848 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 6 + }, + "sa": { + "a": 0, + "k": 0, + "ix": 5 + }, + "o": { + "a": 0, + "k": 100, + "ix": 7 + } + } + ] + } + ], + "ind": 4, + "parent": 1 + }, + { + "ty": 3, + "nm": "Tri", + "sr": 1, + "st": 0, + "op": 144, + "ip": 10, + "hd": false, + "ddd": 0, + "bm": 0, + "hasMask": false, + "ao": 0, + "ks": { + "a": { + "a": 0, + "k": [ + 85.513, + 72.848, + 0 + ], + "ix": 1 + }, + "s": { + "a": 1, + "k": [ + { + "o": { + "x": 0.167, + "y": 0.167 + }, + "i": { + "x": 0.833, + "y": 0.833 + }, + "s": [ + 0, + 0, + 100 + ], + "t": 10 + }, + { + "s": [ + 100, + 100, + 100 + ], + "t": 15 + } + ], + "ix": 6, + "x": "var $bm_rt;\nvar amp, freq, decay, n, t, v;\ntry {\n amp = $bm_div(effect('Scale - Overshoot')('ADBE Slider Control-0001'), 2.5), freq = $bm_div(effect('Scale - Bounce')('ADBE Slider Control-0001'), 20), decay = $bm_div(effect('Scale - Friction')('ADBE Slider Control-0001'), 20), n = 0, 0 < numKeys && (n = nearestKey(time).index, key(n).time > time && n--), t = 0 === n ? 0 : $bm_sub(time, key(n).time), $bm_rt = 0 < n ? (v = velocityAtTime($bm_sub(key(n).time, $bm_div(thisComp.frameDuration, 10))), $bm_sum(value, $bm_div($bm_mul($bm_mul($bm_div(v, 100), amp), Math.sin($bm_mul($bm_mul($bm_mul(freq, t), 2), Math.PI))), Math.exp($bm_mul(decay, t))))) : value;\n} catch (e$$4) {\n $bm_rt = value = value;\n}" + }, + "sk": { + "a": 0, + "k": 0 + }, + "p": { + "a": 0, + "k": [ + 59.955, + 37.467, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 10 + }, + "sa": { + "a": 0, + "k": 0 + }, + "o": { + "a": 0, + "k": 100, + "ix": 11 + } + }, + "ef": [ + { + "ty": 5, + "mn": "ADBE Slider Control", + "nm": "Scale - Overshoot", + "ix": 1, + "en": 1, + "ef": [ + { + "ty": 0, + "mn": "ADBE Slider Control-0001", + "nm": "Slider", + "ix": 1, + "v": { + "a": 0, + "k": 10, + "ix": 1, + "x": "var $bm_rt;\n$bm_rt = clamp(value, 0, 100);" + } + } + ] + }, + { + "ty": 5, + "mn": "ADBE Slider Control", + "nm": "Scale - Bounce", + "ix": 2, + "en": 1, + "ef": [ + { + "ty": 0, + "mn": "ADBE Slider Control-0001", + "nm": "Slider", + "ix": 1, + "v": { + "a": 0, + "k": 35, + "ix": 1, + "x": "var $bm_rt;\n$bm_rt = clamp(value, 0, 100);" + } + } + ] + }, + { + "ty": 5, + "mn": "ADBE Slider Control", + "nm": "Scale - Friction", + "ix": 3, + "en": 1, + "ef": [ + { + "ty": 0, + "mn": "ADBE Slider Control-0001", + "nm": "Slider", + "ix": 1, + "v": { + "a": 0, + "k": 65, + "ix": 1, + "x": "var $bm_rt;\n$bm_rt = clamp(value, 0, 100);" + } + } + ] + } + ], + "ind": 5, + "parent": 1 + }, + { + "ty": 1, + "nm": "Plate_white", + "sr": 1, + "st": 0, + "op": 144, + "ip": 0, + "hd": false, + "ddd": 0, + "bm": 0, + "hasMask": false, + "ao": 0, + "ks": { + "a": { + "a": 0, + "k": [ + 250, + 250, + 0 + ], + "ix": 1 + }, + "s": { + "a": 0, + "k": [ + 100, + 100, + 100 + ], + "ix": 6 + }, + "sk": { + "a": 0, + "k": 0 + }, + "p": { + "a": 0, + "k": [ + 250, + 250, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 10 + }, + "sa": { + "a": 0, + "k": 0 + }, + "o": { + "a": 0, + "k": 100, + "ix": 11 + } + }, + "ef": [], + "sc": "#ffffff", + "sh": 500, + "sw": 500, + "ind": 6 + } + ], + "v": "5.5.7", + "fr": 48, + "op": 144, + "ip": 0, + "assets": [] +} \ No newline at end of file diff --git a/packages/referral_reconciliation/assets/animated_json/error.json b/packages/referral_reconciliation/assets/animated_json/error.json new file mode 100644 index 000000000..96b4f9626 --- /dev/null +++ b/packages/referral_reconciliation/assets/animated_json/error.json @@ -0,0 +1,728 @@ +{ + "nm": "ckeck", + "ddd": 0, + "h": 50, + "w": 50, + "meta": { + "g": "@lottiefiles/toolkit-js 0.33.2" + }, + "layers": [ + { + "ty": 4, + "nm": "! Outlines", + "sr": 1, + "st": 0, + "op": 213, + "ip": 0, + "hd": false, + "ddd": 0, + "bm": 0, + "hasMask": false, + "ao": 0, + "ks": { + "a": { + "a": 0, + "k": [ + 2, + 12, + 0 + ], + "ix": 1 + }, + "s": { + "a": 1, + "k": [ + { + "o": { + "x": 0.653, + "y": -0.834 + }, + "i": { + "x": 0.667, + "y": 1 + }, + "s": [ + 100, + 100, + 100 + ], + "t": 60 + }, + { + "o": { + "x": 0.167, + "y": 0.167 + }, + "i": { + "x": 0.833, + "y": 0.833 + }, + "s": [ + 115, + 115, + 100 + ], + "t": 73 + }, + { + "o": { + "x": 0.333, + "y": 0 + }, + "i": { + "x": 0.127, + "y": 1.695 + }, + "s": [ + 115, + 115, + 100 + ], + "t": 83 + }, + { + "s": [ + 100, + 100, + 100 + ], + "t": 90 + } + ], + "ix": 6 + }, + "sk": { + "a": 0, + "k": 0 + }, + "p": { + "a": 0, + "k": [ + 25, + 25, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 10 + }, + "sa": { + "a": 0, + "k": 0 + }, + "o": { + "a": 0, + "k": 100, + "ix": 11 + } + }, + "ef": [], + "shapes": [ + { + "ty": "gr", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Group", + "nm": "Group 1", + "ix": 1, + "cix": 2, + "np": 4, + "it": [ + { + "ty": "sh", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Shape - Group", + "nm": "Path 1", + "ix": 1, + "d": 1, + "ks": { + "a": 0, + "k": { + "c": true, + "i": [ + [ + 0, + 1.104 + ], + [ + -1.104, + 0 + ], + [ + 0, + -1.104 + ], + [ + 1.104, + 0 + ] + ], + "o": [ + [ + 0, + -1.104 + ], + [ + 1.104, + 0 + ], + [ + 0, + 1.104 + ], + [ + -1.104, + 0 + ] + ], + "v": [ + [ + -2, + 10 + ], + [ + 0, + 8 + ], + [ + 2, + 10 + ], + [ + 0, + 12 + ] + ] + }, + "ix": 2 + } + }, + { + "ty": "sh", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Shape - Group", + "nm": "Path 2", + "ix": 2, + "d": 1, + "ks": { + "a": 0, + "k": { + "c": true, + "i": [ + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ] + ], + "o": [ + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ] + ], + "v": [ + [ + -1.036, + 5 + ], + [ + -2, + -6.625 + ], + [ + -2, + -12 + ], + [ + 2, + -12 + ], + [ + 2, + -6.625 + ], + [ + 1.052, + 5 + ] + ] + }, + "ix": 2 + } + }, + { + "ty": "mm", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Filter - Merge", + "nm": "Merge Paths 1", + "mm": 1 + }, + { + "ty": "fl", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Graphic - Fill", + "nm": "Fill 1", + "c": { + "a": 0, + "k": [ + 1, + 1, + 1 + ], + "ix": 4 + }, + "r": 1, + "o": { + "a": 0, + "k": 100, + "ix": 5 + } + }, + { + "ty": "tr", + "a": { + "a": 0, + "k": [ + 0.099, + 9.982 + ], + "ix": 1 + }, + "s": { + "a": 0, + "k": [ + 100, + 100 + ], + "ix": 3 + }, + "sk": { + "a": 0, + "k": 0, + "ix": 4 + }, + "p": { + "a": 0, + "k": [ + 2.099, + 21.982 + ], + "ix": 2 + }, + "r": { + "a": 1, + "k": [ + { + "o": { + "x": 0.167, + "y": 0.167 + }, + "i": { + "x": 0.833, + "y": 0.833 + }, + "s": [ + 0 + ], + "t": 10 + }, + { + "o": { + "x": 0.167, + "y": 0.167 + }, + "i": { + "x": 0.833, + "y": 0.833 + }, + "s": [ + 5 + ], + "t": 12 + }, + { + "o": { + "x": 0.167, + "y": 0.167 + }, + "i": { + "x": 0.833, + "y": 0.833 + }, + "s": [ + -5 + ], + "t": 14 + }, + { + "o": { + "x": 0.167, + "y": 0.167 + }, + "i": { + "x": 0.833, + "y": 0.833 + }, + "s": [ + 5 + ], + "t": 16 + }, + { + "o": { + "x": 0.167, + "y": 0.167 + }, + "i": { + "x": 0.833, + "y": 0.833 + }, + "s": [ + -5 + ], + "t": 18 + }, + { + "o": { + "x": 0.167, + "y": 0.167 + }, + "i": { + "x": 0.833, + "y": 0.833 + }, + "s": [ + 5 + ], + "t": 20 + }, + { + "o": { + "x": 0.167, + "y": 0.167 + }, + "i": { + "x": 0.833, + "y": 0.833 + }, + "s": [ + -5 + ], + "t": 22 + }, + { + "s": [ + 0 + ], + "t": 24 + } + ], + "ix": 6 + }, + "sa": { + "a": 0, + "k": 0, + "ix": 5 + }, + "o": { + "a": 0, + "k": 100, + "ix": 7 + } + } + ] + } + ], + "ind": 1 + }, + { + "ty": 4, + "nm": "Shape Layer 1", + "sr": 1, + "st": 0, + "op": 193, + "ip": 0, + "hd": false, + "ddd": 0, + "bm": 0, + "hasMask": false, + "ao": 0, + "ks": { + "a": { + "a": 0, + "k": [ + 0, + 10, + 0 + ], + "ix": 1 + }, + "s": { + "a": 1, + "k": [ + { + "o": { + "x": 0.41, + "y": -0.602 + }, + "i": { + "x": 0.667, + "y": 1 + }, + "s": [ + 100, + 100, + 100 + ], + "t": 60 + }, + { + "o": { + "x": 0.333, + "y": 0 + }, + "i": { + "x": 0.436, + "y": 1.492 + }, + "s": [ + 115, + 115, + 100 + ], + "t": 83 + }, + { + "s": [ + 100, + 100, + 100 + ], + "t": 90 + } + ], + "ix": 6 + }, + "sk": { + "a": 0, + "k": 0 + }, + "p": { + "a": 0, + "k": [ + 25, + 35, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 10 + }, + "sa": { + "a": 0, + "k": 0 + }, + "o": { + "a": 0, + "k": 100, + "ix": 11 + } + }, + "ef": [], + "shapes": [ + { + "ty": "gr", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Group", + "nm": "Ellipse 1", + "ix": 1, + "cix": 2, + "np": 3, + "it": [ + { + "ty": "el", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Shape - Ellipse", + "nm": "Ellipse Path 1", + "d": 1, + "p": { + "a": 0, + "k": [ + 0, + 0 + ], + "ix": 3 + }, + "s": { + "a": 0, + "k": [ + 40, + 40 + ], + "ix": 2 + } + }, + { + "ty": "st", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Graphic - Stroke", + "nm": "Stroke 1", + "lc": 1, + "lj": 1, + "ml": 4, + "o": { + "a": 0, + "k": 100, + "ix": 4 + }, + "w": { + "a": 0, + "k": 2, + "ix": 5 + }, + "c": { + "a": 0, + "k": [ + 1, + 1, + 1 + ], + "ix": 3 + } + }, + { + "ty": "tr", + "a": { + "a": 0, + "k": [ + 0, + 0 + ], + "ix": 1 + }, + "s": { + "a": 0, + "k": [ + 100, + 100 + ], + "ix": 3 + }, + "sk": { + "a": 0, + "k": 0, + "ix": 4 + }, + "p": { + "a": 0, + "k": [ + 0, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 6 + }, + "sa": { + "a": 0, + "k": 0, + "ix": 5 + }, + "o": { + "a": 0, + "k": 100, + "ix": 7 + } + } + ] + }, + { + "ty": "tm", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Filter - Trim", + "nm": "Trim Paths 1", + "ix": 2, + "e": { + "a": 0, + "k": 100, + "ix": 2 + }, + "o": { + "a": 0, + "k": 0, + "ix": 3 + }, + "s": { + "a": 0, + "k": 0, + "ix": 1 + }, + "m": 1 + } + ], + "ind": 2 + } + ], + "v": "5.6.5", + "fr": 60, + "op": 180, + "ip": 0, + "assets": [] +} \ No newline at end of file diff --git a/packages/referral_reconciliation/assets/animated_json/success.json b/packages/referral_reconciliation/assets/animated_json/success.json new file mode 100644 index 000000000..43192f708 --- /dev/null +++ b/packages/referral_reconciliation/assets/animated_json/success.json @@ -0,0 +1,917 @@ +{ + "nm": "sucess", + "ddd": 0, + "h": 120, + "w": 120, + "meta": { + "g": "LottieFiles AE 0.1.21" + }, + "layers": [ + { + "ty": 3, + "nm": "scale up null", + "sr": 1, + "st": 0, + "op": 300.00001221925, + "ip": 0, + "hd": false, + "ddd": 0, + "bm": 0, + "hasMask": false, + "ao": 0, + "ks": { + "a": { + "a": 0, + "k": [ + 0, + 0, + 0 + ], + "ix": 1 + }, + "s": { + "a": 1, + "k": [ + { + "o": { + "x": 0.167, + "y": 0 + }, + "i": { + "x": 0.833, + "y": 1 + }, + "s": [ + 111, + 111, + 100 + ], + "t": 27 + }, + { + "o": { + "x": 0.167, + "y": 0 + }, + "i": { + "x": 0.833, + "y": 1 + }, + "s": [ + 101, + 101, + 100 + ], + "t": 36 + }, + { + "s": [ + 121, + 121, + 100 + ], + "t": 42.0000017106951 + } + ], + "ix": 6 + }, + "sk": { + "a": 0, + "k": 0 + }, + "p": { + "a": 0, + "k": [ + 60, + 60, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 10 + }, + "sa": { + "a": 0, + "k": 0 + }, + "o": { + "a": 0, + "k": 0, + "ix": 11 + } + }, + "ef": [], + "ind": 1 + }, + { + "ty": 4, + "nm": "spark", + "sr": 1, + "st": 35.0000014255792, + "op": 335.00001364483, + "ip": 35.0000014255792, + "hd": false, + "ddd": 0, + "bm": 0, + "hasMask": false, + "ao": 0, + "ks": { + "a": { + "a": 0, + "k": [ + 0, + 0, + 0 + ], + "ix": 1 + }, + "s": { + "a": 0, + "k": [ + 100, + 100, + 100 + ], + "ix": 6 + }, + "sk": { + "a": 0, + "k": 0 + }, + "p": { + "a": 0, + "k": [ + 0, + 0.5, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 10 + }, + "sa": { + "a": 0, + "k": 0 + }, + "o": { + "a": 0, + "k": 100, + "ix": 11 + } + }, + "ef": [], + "shapes": [ + { + "ty": "gr", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Group", + "nm": "Rectangle 1", + "ix": 1, + "cix": 2, + "np": 3, + "it": [ + { + "ty": "rc", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Shape - Rect", + "nm": "Rectangle Path 1", + "d": 1, + "p": { + "a": 1, + "k": [ + { + "o": { + "x": 0.333, + "y": 0 + }, + "i": { + "x": 0.667, + "y": 1 + }, + "s": [ + 0, + -21 + ], + "t": 35, + "ti": [ + 0, + 1.5 + ], + "to": [ + 0, + -1.5 + ] + }, + { + "s": [ + 0, + -30 + ], + "t": 53.0000021587343 + } + ], + "ix": 3 + }, + "r": { + "a": 0, + "k": 0, + "ix": 4 + }, + "s": { + "a": 1, + "k": [ + { + "o": { + "x": 0.976, + "y": 0 + }, + "i": { + "x": 0.667, + "y": 1 + }, + "s": [ + 2, + 0 + ], + "t": 35 + }, + { + "o": { + "x": 0.33299999999999996, + "y": 0 + }, + "i": { + "x": 0.15355432054499818, + "y": 0.9999999999999999 + }, + "s": [ + 2, + 8 + ], + "t": 42 + }, + { + "s": [ + 1.633, + 0 + ], + "t": 53.0000021587343 + } + ], + "ix": 2 + } + }, + { + "ty": "fl", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Graphic - Fill", + "nm": "Fill 1", + "c": { + "a": 0, + "k": [ + 0.9804, + 0.9804, + 0.9804 + ], + "ix": 4 + }, + "r": 1, + "o": { + "a": 0, + "k": 100, + "ix": 5 + } + }, + { + "ty": "tr", + "a": { + "a": 0, + "k": [ + 0, + 0 + ], + "ix": 1 + }, + "s": { + "a": 0, + "k": [ + 100, + 100 + ], + "ix": 3 + }, + "sk": { + "a": 0, + "k": 0, + "ix": 4 + }, + "p": { + "a": 0, + "k": [ + 0, + -8 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 6 + }, + "sa": { + "a": 0, + "k": 0, + "ix": 5 + }, + "o": { + "a": 0, + "k": 100, + "ix": 7 + } + } + ] + }, + { + "ty": "rp", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Filter - Repeater", + "nm": "Repeater 1", + "ix": 2, + "m": 1, + "c": { + "a": 0, + "k": 8, + "ix": 1 + }, + "o": { + "a": 0, + "k": 0, + "ix": 2 + }, + "tr": { + "a": { + "a": 0, + "k": [ + 0, + 0 + ], + "ix": 1 + }, + "s": { + "a": 0, + "k": [ + 100, + 100 + ], + "ix": 3 + }, + "sk": { + "a": 0, + "k": 0 + }, + "p": { + "a": 0, + "k": [ + 0, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 45, + "ix": 4 + }, + "sa": { + "a": 0, + "k": 0 + }, + "so": { + "a": 0, + "k": 100, + "ix": 5 + }, + "eo": { + "a": 0, + "k": 100, + "ix": 6 + } + } + } + ], + "ind": 2, + "parent": 1 + }, + { + "ty": 4, + "nm": "check", + "sr": 1, + "st": 10.0000004073083, + "op": 310.000012626559, + "ip": 22.0000008960784, + "hd": false, + "ddd": 0, + "bm": 0, + "hasMask": false, + "ao": 0, + "ks": { + "a": { + "a": 0, + "k": [ + 0, + 0, + 0 + ], + "ix": 1 + }, + "s": { + "a": 0, + "k": [ + 100, + 100, + 100 + ], + "ix": 6 + }, + "sk": { + "a": 0, + "k": 0 + }, + "p": { + "a": 0, + "k": [ + 0, + 0, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 10 + }, + "sa": { + "a": 0, + "k": 0 + }, + "o": { + "a": 0, + "k": 100, + "ix": 11 + } + }, + "ef": [], + "shapes": [ + { + "ty": "sh", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Shape - Group", + "nm": "Path 1", + "ix": 1, + "d": 1, + "ks": { + "a": 0, + "k": { + "c": false, + "i": [ + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 3.5, + 3.75 + ], + [ + -12.973, + 5.349 + ], + [ + -6.124, + -9.992 + ], + [ + 12.125, + -7.431 + ], + [ + 7.431, + 12.125 + ] + ], + "o": [ + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + -3.5, + -3.75 + ], + [ + 10.764, + -2.941 + ], + [ + 7.431, + 12.125 + ], + [ + -12.125, + 7.431 + ], + [ + -7.431, + -12.125 + ] + ], + "v": [ + [ + 15.25, + -9.688 + ], + [ + -5.75, + 10.062 + ], + [ + -16, + 0.25 + ], + [ + -6.777, + -24.849 + ], + [ + 21.955, + -13.456 + ], + [ + 13.456, + 21.955 + ], + [ + -21.955, + 13.456 + ] + ] + }, + "ix": 2 + } + }, + { + "ty": "tm", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Filter - Trim", + "nm": "Trim Paths 1", + "ix": 2, + "e": { + "a": 1, + "k": [ + { + "o": { + "x": 0.714, + "y": 0 + }, + "i": { + "x": 0.351, + "y": 1 + }, + "s": [ + 100 + ], + "t": 10 + }, + { + "s": [ + 23 + ], + "t": 40.0000016292334 + } + ], + "ix": 2 + }, + "o": { + "a": 0, + "k": 0, + "ix": 3 + }, + "s": { + "a": 1, + "k": [ + { + "o": { + "x": 0.742, + "y": 0 + }, + "i": { + "x": 0.363, + "y": 1 + }, + "s": [ + 100 + ], + "t": 17 + }, + { + "s": [ + 0 + ], + "t": 45.0000018328876 + } + ], + "ix": 1 + }, + "m": 1 + }, + { + "ty": "st", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Graphic - Stroke", + "nm": "Stroke 1", + "lc": 1, + "lj": 1, + "ml": 4, + "o": { + "a": 0, + "k": 100, + "ix": 4 + }, + "w": { + "a": 0, + "k": 4, + "ix": 5 + }, + "c": { + "a": 0, + "k": [ + 0.9804, + 0.9804, + 0.9804 + ], + "ix": 3 + } + } + ], + "ind": 3, + "parent": 1 + }, + { + "ty": 4, + "nm": "circle", + "sr": 1, + "st": 0, + "op": 300.00001221925, + "ip": 0, + "hd": false, + "ddd": 0, + "bm": 0, + "hasMask": false, + "ao": 0, + "ks": { + "a": { + "a": 0, + "k": [ + 0, + 0, + 0 + ], + "ix": 1 + }, + "s": { + "a": 0, + "k": [ + 100, + 100, + 100 + ], + "ix": 6 + }, + "sk": { + "a": 0, + "k": 0 + }, + "p": { + "a": 0, + "k": [ + 0, + 0, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 10 + }, + "sa": { + "a": 0, + "k": 0 + }, + "o": { + "a": 0, + "k": 100, + "ix": 11 + } + }, + "ef": [], + "shapes": [ + { + "ty": "sh", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Shape - Group", + "nm": "Path 1", + "ix": 1, + "d": 1, + "ks": { + "a": 0, + "k": { + "c": true, + "i": [ + [ + -14.221, + 0 + ], + [ + 0, + -14.221 + ], + [ + 14.221, + 0 + ], + [ + 0, + 14.221 + ] + ], + "o": [ + [ + 14.221, + 0 + ], + [ + 0, + 14.221 + ], + [ + -14.221, + 0 + ], + [ + 0, + -14.221 + ] + ], + "v": [ + [ + 0, + -25.75 + ], + [ + 25.75, + 0 + ], + [ + 0, + 25.75 + ], + [ + -25.75, + 0 + ] + ] + }, + "ix": 2 + } + }, + { + "ty": "st", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Graphic - Stroke", + "nm": "Stroke 1", + "lc": 1, + "lj": 1, + "ml": 4, + "o": { + "a": 0, + "k": 100, + "ix": 4 + }, + "w": { + "a": 0, + "k": 2, + "ix": 5 + }, + "c": { + "a": 0, + "k": [ + 0.9804, + 0.9804, + 0.9804 + ], + "ix": 3 + } + }, + { + "ty": "tm", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Filter - Trim", + "nm": "Trim Paths 1", + "ix": 3, + "e": { + "a": 1, + "k": [ + { + "o": { + "x": 0.714, + "y": 0 + }, + "i": { + "x": 0.351, + "y": 1 + }, + "s": [ + 100 + ], + "t": 0 + }, + { + "s": [ + 100 + ], + "t": 30.0000012219251 + } + ], + "ix": 2 + }, + "o": { + "a": 0, + "k": 0, + "ix": 3 + }, + "s": { + "a": 1, + "k": [ + { + "o": { + "x": 0.742, + "y": 0 + }, + "i": { + "x": 0.363, + "y": 1 + }, + "s": [ + 100 + ], + "t": 7 + }, + { + "s": [ + 0 + ], + "t": 33.0000013441176 + } + ], + "ix": 1 + }, + "m": 1 + } + ], + "ind": 4, + "parent": 1 + } + ], + "v": "5.5.7", + "fr": 29.9700012207031, + "op": 60.0000024438501, + "ip": 0, + "assets": [] +} \ No newline at end of file diff --git a/packages/referral_reconciliation/lib/blocs/referral_recon_record.dart b/packages/referral_reconciliation/lib/blocs/referral_recon_record.dart index 477a7dd1a..bb8c7b13d 100644 --- a/packages/referral_reconciliation/lib/blocs/referral_recon_record.dart +++ b/packages/referral_reconciliation/lib/blocs/referral_recon_record.dart @@ -91,20 +91,18 @@ class RecordHFReferralBloc emit(value.copyWith(loading: true)); try { - if (event.hfReferralModel != null) { - referralReconDataRepository?.create(event.hfReferralModel); - emit( - RecordHFReferralPersistedState( - hfReferralModel: event.hfReferralModel, - projectId: value.projectId, - facilityId: value.facilityId, - dateOfEvaluation: value.dateOfEvaluation, - healthFacilityCord: value.healthFacilityCord, - referredBy: value.referredBy, - ), - ); - } - } catch (error) { + referralReconDataRepository?.create(event.hfReferralModel); + emit( + RecordHFReferralPersistedState( + hfReferralModel: event.hfReferralModel, + projectId: value.projectId, + facilityId: value.facilityId, + dateOfEvaluation: value.dateOfEvaluation, + healthFacilityCord: value.healthFacilityCord, + referredBy: value.referredBy, + ), + ); + } catch (error) { emit(value.copyWith(loading: false)); rethrow; } diff --git a/packages/referral_reconciliation/lib/blocs/referral_recon_service_definition.dart b/packages/referral_reconciliation/lib/blocs/referral_recon_service_definition.dart index 74bcc987f..5c8c05fd9 100644 --- a/packages/referral_reconciliation/lib/blocs/referral_recon_service_definition.dart +++ b/packages/referral_reconciliation/lib/blocs/referral_recon_service_definition.dart @@ -1,9 +1,9 @@ import 'dart:async'; -import 'package:digit_data_model/data_model.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:referral_reconciliation/utils/typedefs.dart'; +import 'package:survey_form/survey_form.dart'; import '../utils/utils.dart'; diff --git a/packages/referral_reconciliation/lib/blocs/search_referral_reconciliations.dart b/packages/referral_reconciliation/lib/blocs/search_referral_reconciliations.dart index 3de05f833..4be5d9693 100644 --- a/packages/referral_reconciliation/lib/blocs/search_referral_reconciliations.dart +++ b/packages/referral_reconciliation/lib/blocs/search_referral_reconciliations.dart @@ -53,7 +53,7 @@ class SearchReferralsBloc ); // Update state with fetched referrals. emit(state.copyWith( - referrals: beneficiaries ?? [], + referrals: beneficiaries, loading: false, tag: event.tag, )); diff --git a/packages/referral_reconciliation/lib/models/entities/hf_additional_fields.mapper.dart b/packages/referral_reconciliation/lib/models/entities/hf_additional_fields.mapper.dart index 37aee54c8..9477d3596 100644 --- a/packages/referral_reconciliation/lib/models/entities/hf_additional_fields.mapper.dart +++ b/packages/referral_reconciliation/lib/models/entities/hf_additional_fields.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'hf_additional_fields.dart'; diff --git a/packages/referral_reconciliation/lib/models/entities/hf_referral.mapper.dart b/packages/referral_reconciliation/lib/models/entities/hf_referral.mapper.dart index 8ac04e2ae..35caf2b29 100644 --- a/packages/referral_reconciliation/lib/models/entities/hf_referral.mapper.dart +++ b/packages/referral_reconciliation/lib/models/entities/hf_referral.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'hf_referral.dart'; @@ -152,10 +152,8 @@ mixin HFReferralSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - HFReferralSearchModelMapper.ensureInitialized() - .isValueEqual(this as HFReferralSearchModel, other)); + return HFReferralSearchModelMapper.ensureInitialized() + .equalsValue(this as HFReferralSearchModel, other); } @override @@ -500,10 +498,8 @@ mixin HFReferralModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - HFReferralModelMapper.ensureInitialized() - .isValueEqual(this as HFReferralModel, other)); + return HFReferralModelMapper.ensureInitialized() + .equalsValue(this as HFReferralModel, other); } @override @@ -730,10 +726,8 @@ mixin HFReferralAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - HFReferralAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as HFReferralAdditionalFields, other)); + return HFReferralAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as HFReferralAdditionalFields, other); } @override diff --git a/packages/referral_reconciliation/lib/models/entities/referral_recon_enums.mapper.dart b/packages/referral_reconciliation/lib/models/entities/referral_recon_enums.mapper.dart index 3d6a27c56..4a6a244b6 100644 --- a/packages/referral_reconciliation/lib/models/entities/referral_recon_enums.mapper.dart +++ b/packages/referral_reconciliation/lib/models/entities/referral_recon_enums.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'referral_recon_enums.dart'; diff --git a/packages/referral_reconciliation/lib/pages/acknowledgement.dart b/packages/referral_reconciliation/lib/pages/acknowledgement.dart index f5d95349e..52ecaf0c1 100644 --- a/packages/referral_reconciliation/lib/pages/acknowledgement.dart +++ b/packages/referral_reconciliation/lib/pages/acknowledgement.dart @@ -1,5 +1,6 @@ import 'package:auto_route/auto_route.dart'; -import 'package:digit_components/digit_components.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/widgets/molecules/panel_cards.dart'; import 'package:flutter/material.dart'; import '../utils/i18_key_constants.dart' as i18; @@ -32,70 +33,59 @@ class _AcknowledgementPageState final theme = Theme.of(context); return Scaffold( - body: DigitAcknowledgement.success( - description: widget.description ?? - localizations.translate( - i18.acknowledgementSuccess.acknowledgementDescriptionText, - ), - descriptionWidget: widget.isDataRecordSuccess - ? DigitTableCard( - element: widget.descriptionTableData ?? {}, - ) - : null, - label: widget.label ?? - localizations.translate( - i18.acknowledgementSuccess.acknowledgementLabelText, - ), - action: () { - context.router.popUntilRoot(); - }, - enableBackToSearch: widget.isDataRecordSuccess ? false : true, - actionLabel: - localizations.translate(i18.acknowledgementSuccess.actionLabelText), - ), + body: PanelCard( + type: PanelType.success, + title: widget.label ?? + localizations.translate( + i18.acknowledgementSuccess.acknowledgementLabelText, + ), + description: widget.description ?? + localizations.translate( + i18.acknowledgementSuccess.acknowledgementDescriptionText, + ), + actions: [ + DigitButton( + label: localizations + .translate(i18.acknowledgementSuccess.actionLabelText), + onPressed: () { + context.router.popUntilRoot(); + }, + type: DigitButtonType.primary, + size: DigitButtonSize.large, + mainAxisSize: MainAxisSize.max, + ) + ]), bottomNavigationBar: Offstage( offstage: !widget.isDataRecordSuccess, // Show the bottom navigation bar if `isDataRecordSuccess` is true child: SizedBox( height: 150, - child: DigitCard( - margin: const EdgeInsets.fromLTRB(0, kPadding, 0, 0), - padding: const EdgeInsets.fromLTRB(kPadding, 0, kPadding, 0), - child: Column( - children: [ - DigitElevatedButton( - child: Text(localizations - .translate(i18.acknowledgementSuccess.goToHome)), - onPressed: () { - context.router.popUntilRoot(); - }, - ), - const SizedBox( - height: 12, - ), - DigitOutLineButton( - onPressed: () { - context.router.popUntilRoot(); - }, - label: localizations - .translate(i18.acknowledgementSuccess.downloadmoredata), - buttonStyle: OutlinedButton.styleFrom( - backgroundColor: Colors.white, - shape: const RoundedRectangleBorder( - borderRadius: BorderRadius.zero, - ), - side: BorderSide( - width: 1.0, - color: theme.colorScheme.secondary, - ), - minimumSize: Size( - MediaQuery.of(context).size.width, - 50, - ), - ), - ), - ], - ), + child: Column( + children: [ + DigitButton( + size: DigitButtonSize.large, + type: DigitButtonType.primary, + mainAxisSize: MainAxisSize.max, + label: localizations + .translate(i18.acknowledgementSuccess.goToHome), + onPressed: () { + context.router.popUntilRoot(); + }, + ), + const SizedBox( + height: 12, + ), + DigitButton( + size: DigitButtonSize.large, + type: DigitButtonType.secondary, + mainAxisSize: MainAxisSize.max, + onPressed: () { + context.router.popUntilRoot(); + }, + label: localizations + .translate(i18.acknowledgementSuccess.downloadmoredata), + ), + ], ), ), ), diff --git a/packages/referral_reconciliation/lib/pages/create_referral/create_hf_referral_wrapper.dart b/packages/referral_reconciliation/lib/pages/create_referral/create_hf_referral_wrapper.dart index c0c2c108a..34b2e1398 100644 --- a/packages/referral_reconciliation/lib/pages/create_referral/create_hf_referral_wrapper.dart +++ b/packages/referral_reconciliation/lib/pages/create_referral/create_hf_referral_wrapper.dart @@ -1,5 +1,5 @@ import 'package:auto_route/auto_route.dart'; -import 'package:digit_data_model/data_model.dart'; +import 'package:survey_form/survey_form.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:referral_reconciliation/blocs/app_localization.dart'; diff --git a/packages/referral_reconciliation/lib/pages/create_referral/reason_checklist_preview.dart b/packages/referral_reconciliation/lib/pages/create_referral/reason_checklist_preview.dart index 02ca9eb26..b93730a75 100644 --- a/packages/referral_reconciliation/lib/pages/create_referral/reason_checklist_preview.dart +++ b/packages/referral_reconciliation/lib/pages/create_referral/reason_checklist_preview.dart @@ -1,13 +1,16 @@ import 'package:auto_route/auto_route.dart'; -import 'package:digit_components/digit_components.dart'; -import 'package:digit_components/widgets/atoms/digit_divider.dart'; -import 'package:digit_data_model/data_model.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/atoms/digit_divider.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:intl/intl.dart'; import 'package:referral_reconciliation/utils/constants.dart'; +import 'package:survey_form/survey_form.dart'; import '../../blocs/referral_recon_service_definition.dart'; +import '../../router/referral_reconciliation_router.gm.dart'; import '../../utils/i18_key_constants.dart' as i18; import '../../widgets/back_navigation_help_header.dart'; import '../../widgets/localized.dart'; @@ -29,6 +32,7 @@ class _ReferralReasonChecklistPreviewPageState @override Widget build(BuildContext context) { final theme = Theme.of(context); + final textTheme = theme.digitTextTheme(context); return Scaffold( body: ScrollableContent( @@ -42,17 +46,27 @@ class _ReferralReasonChecklistPreviewPageState serviceSearch: (serviceList, selectedService, loading) { return selectedService != null ? DigitCard( - child: DigitElevatedButton( - onPressed: () { - context.read().add( - ServiceResetEvent(serviceList: serviceList), - ); - }, - child: Text( - localizations.translate(i18.common.corecommonclose), - ), - ), - ) + cardType: CardType.primary, + padding: EdgeInsets.all(theme.spacerTheme.spacer2), + children: [ + DigitButton( + size: DigitButtonSize.large, + label: localizations + .translate(i18.common.corecommonclose), + mainAxisSize: MainAxisSize.max, + onPressed: () { + context.read().add( + ServiceResetEvent( + serviceList: serviceList), + ); + context.router.popUntil((route) => + route.settings.name == + SearchReferralReconciliationsRoute.name); + context.router.maybePop(); + }, + type: DigitButtonType.primary, + ) + ]) : const Offstage(); }, ); @@ -69,57 +83,60 @@ class _ReferralReasonChecklistPreviewPageState children: [ ...value1.map((e) => e.serviceDefId != null ? DigitCard( - child: Column( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Align( - alignment: Alignment.centerLeft, - child: Text( - DateFormat(defaultDateFormat).format( - DateFormat(defaultDateFormat).parse( - e.createdAt.toString(), - ), - ), - style: theme.textTheme.headlineMedium, - ), - ), - Row( + margin: + EdgeInsets.all(theme.spacerTheme.spacer2), + cardType: CardType.primary, + children: [ + Column( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - SizedBox( + Align( + alignment: Alignment.centerLeft, child: Text( - localizations.translate( - '${e.tenantId}', + DateFormat(defaultDateFormat) + .format( + DateFormat(defaultDateFormat) + .parse( + e.createdAt.toString(), + ), ), + style: textTheme.headingM, ), ), - DigitOutLineButton( - label: localizations.translate( - i18.referralReconciliation - .iconLabel, - ), - onPressed: () { - context.read().add( - ServiceSelectionEvent( - service: e, - ), - ); - }, - buttonStyle: - OutlinedButton.styleFrom( - shape: - const RoundedRectangleBorder( - borderRadius: BorderRadius.zero, + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + SizedBox( + child: Text( + localizations.translate( + '${e.tenantId}', + ), + ), ), - ), + DigitButton( + label: localizations.translate( + i18.referralReconciliation + .iconLabel, + ), + onPressed: () { + context + .read() + .add( + ServiceSelectionEvent( + service: e, + ), + ); + }, + type: DigitButtonType.secondary, + size: DigitButtonSize.large, + ), + ], ), ], ), - ], - ), - ) + ]) : const Offstage()), ], ) @@ -132,120 +149,133 @@ class _ReferralReasonChecklistPreviewPageState item2, ) { return DigitCard( - child: Column( - children: [ - Container( - width: MediaQuery.of(context).size.width, - margin: const EdgeInsets.all(8), - child: Column( - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - Align( - alignment: Alignment.centerLeft, - child: Text( - localizations.translate( - item2?.code ?? '', + cardType: CardType.primary, + children: [ + Column( + children: [ + Container( + width: MediaQuery.of(context).size.width, + margin: const EdgeInsets.all(8), + child: Column( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + Align( + alignment: Alignment.centerLeft, + child: Text( + localizations.translate( + item2?.code ?? '', + ), + style: + textTheme.headingXl, ), - style: - theme.textTheme.displayMedium, ), - ), - ...(value2.attributes ?? []) - .where((a) => - a.value != - i18.checklist - .notSelectedKey && - a.value != '') - .map( - (e) => Padding( - padding: - const EdgeInsets.all(8), - child: Column( - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - Align( - alignment: - Alignment.centerLeft, - child: Text( - localizations.translate( - "${item2?.code ?? ''}.${e.attributeCode!}", - ), - style: theme.textTheme - .headlineSmall, - ), - ), - Container( - margin: const EdgeInsets - .only() - .copyWith( - top: kPadding, - bottom: kPadding, - ), - child: Align( + ...(value2.attributes ?? []) + .where((a) => + a.value != + i18.checklist + .notSelectedKey && + a.value != '') + .map( + (e) => Padding( + padding: + const EdgeInsets.all(8), + child: Column( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + Align( alignment: Alignment .centerLeft, child: Text( - e.dataType == - 'SingleValueList' - ? localizations - .translate( - 'CORE_COMMON_${e.value.toString().toUpperCase()}', - ) - : e.value ?? "", + localizations + .translate( + "${item2?.code ?? ''}.${e.attributeCode!}", + ), + style: textTheme.headingS, + ), + ), + Container( + margin: const EdgeInsets + .only() + .copyWith( + top: theme.spacerTheme + .spacer2, + bottom: theme + .spacerTheme + .spacer2, + ), + child: Align( + alignment: Alignment + .centerLeft, + child: Text( + e.dataType == + 'SingleValueList' + ? localizations + .translate( + e.value + .toString() + .toUpperCase(), + ) + : e.value ?? "", + ), ), ), - ), - e.additionalDetails != '' && - e.additionalDetails != - null - ? Container( - margin: - const EdgeInsets - .only() - .copyWith( - top: kPadding, - bottom: kPadding, - ), - child: Column( - children: [ - Align( - alignment: - Alignment - .centerLeft, - child: Text( - localizations - .translate( - "${item2?.code ?? ''}.${e.attributeCode!}.ADDITIONAL_FIELD", + e.additionalDetails != + '' && + e.additionalDetails != + null + ? Container( + margin: + const EdgeInsets + .only() + .copyWith( + top: theme + .spacerTheme + .spacer2, + bottom: theme + .spacerTheme + .spacer2, + ), + child: Column( + children: [ + Align( + alignment: + Alignment + .centerLeft, + child: Text( + localizations + .translate( + "${item2?.code ?? ''}.${e.attributeCode!}.ADDITIONAL_FIELD", + ), ), ), - ), - Align( - alignment: - Alignment - .centerLeft, - child: Text( - localizations - .translate( - e.additionalDetails, + Align( + alignment: + Alignment + .centerLeft, + child: Text( + localizations + .translate( + e.additionalDetails, + ), ), ), - ), - ], - ), - ) - : const Offstage(), - const DigitDivider(), - ], + ], + ), + ) + : const Offstage(), + const DigitDivider(), + ], + ), ), ), - ), - ].toList(), + ].toList(), + ), ), - ), - ], - ), + ], + ) + ], ); }, orElse: () => const Offstage(), diff --git a/packages/referral_reconciliation/lib/pages/create_referral/record_facility_details.dart b/packages/referral_reconciliation/lib/pages/create_referral/record_facility_details.dart index 0f2bb4a98..0406ebf95 100644 --- a/packages/referral_reconciliation/lib/pages/create_referral/record_facility_details.dart +++ b/packages/referral_reconciliation/lib/pages/create_referral/record_facility_details.dart @@ -1,8 +1,8 @@ import 'package:auto_route/auto_route.dart'; -import 'package:digit_components/digit_components.dart'; -import 'package:digit_components/utils/date_utils.dart'; -import 'package:digit_components/widgets/atoms/digit_toaster.dart'; import 'package:digit_data_model/data_model.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:reactive_forms/reactive_forms.dart'; @@ -10,6 +10,7 @@ import 'package:referral_reconciliation/models/entities/referral_recon_enums.dar import 'package:referral_reconciliation/router/referral_reconciliation_router.gm.dart'; import 'package:referral_reconciliation/utils/constants.dart'; +import '../../../utils/date_utils.dart'; import '../../../utils/i18_key_constants.dart' as i18; import '../../blocs/referral_recon_record.dart'; import '../../utils/utils.dart'; @@ -21,11 +22,8 @@ import '../project_facility/project_facility_selection.dart'; class ReferralFacilityPage extends LocalizedStatefulWidget { final bool isEditing; - const ReferralFacilityPage({ - super.key, - super.appLocalizations, - this.isEditing = false, - }); + const ReferralFacilityPage( + {super.key, super.appLocalizations, this.isEditing = false}); @override State createState() => _ReferralFacilityPageState(); @@ -61,6 +59,7 @@ class _ReferralFacilityPageState extends LocalizedState { @override Widget build(BuildContext context) { final theme = Theme.of(context); + final textTheme = theme.digitTextTheme(context); // final router = context.router; return BlocConsumer( @@ -90,99 +89,104 @@ class _ReferralFacilityPageState extends LocalizedState { return ReactiveFormBuilder( form: () => buildForm(recordState, projectFacilities), builder: (context, form, child) => ScrollableContent( - enableFixedButton: true, + enableFixedDigitButton: true, header: const Column(children: [ BackNavigationHelpHeaderWidget(), ]), footer: DigitCard( - margin: - const EdgeInsets.fromLTRB(0, kPadding, 0, 0), - padding: const EdgeInsets.fromLTRB( - kPadding, 0, kPadding, 0), - child: ValueListenableBuilder( - valueListenable: clickedStatus, - builder: (context, bool isClicked, _) { - return DigitElevatedButton( - onPressed: () { - form.markAllAsTouched(); - if (!form.valid) { - return; - } else { - clickedStatus.value = true; - if (viewOnly) { - context.router.push( - RecordReferralDetailsRoute( - projectId: - ReferralReconSingleton() - .projectId, - cycles: ReferralReconSingleton() - .cycles, - ), - ); - } else { - final evaluationFacility = - selectedProjectFacilityId; - if (evaluationFacility == null) { - DigitToast.show( - context, - options: DigitToastOptions( - 'Facility is mandatory', - true, - theme, - ), - ); + margin: EdgeInsets.fromLTRB( + 0, theme.spacerTheme.spacer2, 0, 0), + padding: + EdgeInsets.all(theme.spacerTheme.spacer2), + cardType: CardType.primary, + children: [ + ValueListenableBuilder( + valueListenable: clickedStatus, + builder: (context, bool isClicked, _) { + return DigitButton( + size: DigitButtonSize.large, + label: localizations.translate( + i18.common.coreCommonNext, + ), + onPressed: () { + form.markAllAsTouched(); + if (!form.valid) { + return; } else { - final dateOfEvaluation = form - .control(_dateOfEvaluationKey) - .value as DateTime; - final hfCoordinator = form - .control(_hfCoordinatorKey) - .value as String?; - final referredByTeam = form - .control(_referredByKey) - .value as String?; + clickedStatus.value = true; + if (viewOnly) { + context.router.push( + RecordReferralDetailsRoute( + projectId: + ReferralReconSingleton() + .projectId, + cycles: + ReferralReconSingleton() + .cycles, + ), + ); + } else { + final evaluationFacility = + selectedProjectFacilityId; + if (evaluationFacility == null) { + Toast.showToast( + context, + message: localizations + .translate(i18 + .referralReconciliation + .facilityIsMandatory), + type: ToastType.error, + ); + } else { + final dateOfEvaluation = form + .control( + _dateOfEvaluationKey) + .value as DateTime; + final hfCoordinator = form + .control(_hfCoordinatorKey) + .value as String?; + final referredByTeam = form + .control(_referredByKey) + .value as String?; - final event = context - .read(); - event.add( - RecordHFReferralSaveFacilityDetailsEvent( - dateOfEvaluation: - dateOfEvaluation, - facilityId: evaluationFacility - .toString(), - healthFacilityCord: - hfCoordinator, - referredBy: referredByTeam, - ), - ); + final event = context.read< + RecordHFReferralBloc>(); + event.add( + RecordHFReferralSaveFacilityDetailsEvent( + dateOfEvaluation: + dateOfEvaluation, + facilityId: + evaluationFacility + .toString(), + healthFacilityCord: + hfCoordinator, + referredBy: referredByTeam, + ), + ); - context.router.push( - RecordReferralDetailsRoute( - projectId: - ReferralReconSingleton() - .projectId, - cycles: ReferralReconSingleton() - .cycles, - )); + context.router.push( + RecordReferralDetailsRoute( + projectId: + ReferralReconSingleton() + .projectId, + cycles: + ReferralReconSingleton() + .cycles, + )); + } + } } - } - } + }, + type: DigitButtonType.primary, + mainAxisSize: MainAxisSize.max, + ); }, - child: Center( - child: Text( - localizations.translate( - i18.common.coreCommonNext, - ), - ), - ), - ); - }, - ), - ), + ), + ]), slivers: [ SliverToBoxAdapter( child: DigitCard( - child: Column( + cardType: CardType.primary, children: [ Row( mainAxisAlignment: @@ -195,94 +199,110 @@ class _ReferralFacilityPageState extends LocalizedState { .facilityDetails, ), style: - theme.textTheme.displayMedium, + textTheme.headingXl, ), ), ], ), - Column(children: [ - DigitTextFormField( + ReactiveWrapperField( formControlName: _administrativeUnitKey, - label: localizations.translate( - i18.referralReconciliation - .administrationUnitFormLabel, - ), - isRequired: true, - readOnly: true, - ), - DigitDateFormPicker( + builder: (field) { + return LabeledField( + isRequired: true, + label: localizations.translate( + i18.referralReconciliation + .administrationUnitFormLabel, + ), + child: DigitTextFormInput( + readOnly: true, + initialValue: field.value, + ), + ); + }), + ReactiveWrapperField( formControlName: _dateOfEvaluationKey, - label: localizations.translate( - i18.referralReconciliation - .dateOfEvaluationLabel, - ), - isEnabled: !viewOnly, - isRequired: true, - initialDate: DateTime.now(), - cancelText: localizations.translate( - i18.common.coreCommonCancel, - ), - confirmText: localizations.translate( - i18.common.coreCommonOk, - ), - padding: const EdgeInsets.only( - bottom: kPadding, - top: kPadding, - ), - lastDate: DateTime.now(), validationMessages: { 'required': (_) => localizations.translate( i18.common.corecommonRequired, ), }, - ), - InkWell( - onTap: viewOnly - ? null - : () async { - final facility = - await Navigator.of( - context) - .push( - MaterialPageRoute( - builder: (context) => - ReferralReconProjectFacilitySelectionPage( - projectFacilities: - facilities, - ), - ), - ); - - if (facility == null) return; + showErrors: (control) => + control.invalid && + control + .touched, // Ensures error is shown if invalid and touched + builder: (field) { + return LabeledField( + isRequired: true, + label: localizations.translate( + i18.referralReconciliation + .dateOfEvaluationLabel, + ), + child: DigitDateFormInput( + onChange: (val) => { + form + .control( + _dateOfEvaluationKey) + .markAsTouched(), form .control( - _evaluationFacilityKey, - ) + _dateOfEvaluationKey) .value = - localizations.translate( - 'PJ_FAC_${facility.id}'); - setState(() { - selectedProjectFacilityId = - facility.id; - }); + DigitDateUtils + .getFormattedDateToDateTime( + val), }, - child: IgnorePointer( - child: DigitTextFormField( - hideKeyboard: true, - readOnly: viewOnly, - label: localizations.translate( - i18.referralReconciliation - .evaluationFacilityLabel, - ), - isRequired: true, - suffix: const Padding( - padding: EdgeInsets.all(8.0), - child: Icon(Icons.search), + readOnly: viewOnly, + errorMessage: field.errorText, + initialValue: DigitDateUtils + .getDateString(form + .control( + _dateOfEvaluationKey) + .value), + lastDate: DateTime.now(), + cancelText: + localizations.translate( + i18.common.coreCommonCancel, + ), + confirmText: + localizations.translate( + i18.common.coreCommonOk, + ), ), - formControlName: - _evaluationFacilityKey, + ); + }), + InkWell( + onTap: viewOnly + ? null + : () async { + final facility = + await Navigator.of(context) + .push( + MaterialPageRoute( + builder: (context) => + ReferralReconProjectFacilitySelectionPage( + projectFacilities: + facilities, + ), + ), + ); + + if (facility == null) return; + form + .control( + _evaluationFacilityKey, + ) + .value = + localizations.translate( + 'PJ_FAC_${facility.id}'); + setState(() { + selectedProjectFacilityId = + facility.id; + }); + }, + child: IgnorePointer( + child: ReactiveWrapperField( validationMessages: { 'required': (_) => localizations.translate( @@ -290,61 +310,93 @@ class _ReferralFacilityPageState extends LocalizedState { .facilityValidationMessage, ), }, - onTap: viewOnly - ? null - : () async { - final facility = - await Navigator.of( - context) - .push( - MaterialPageRoute( - builder: (context) => - ReferralReconProjectFacilitySelectionPage( - projectFacilities: - facilities, - ), - ), - ); - - if (facility == null) - return; + formControlName: + _evaluationFacilityKey, + showErrors: (control) => + control.invalid && + control + .touched, // Ensures error is shown if invalid and touched + builder: (field) { + return LabeledField( + isRequired: true, + label: + localizations.translate( + i18.referralReconciliation + .evaluationFacilityLabel, + ), + child: DigitSearchFormInput( + onChange: (val) => { form - .control( - _evaluationFacilityKey, - ) - .value = - localizations - .translate( - 'PJ_FAC_${facility.id}', - ); - setState(() { - selectedProjectFacilityId = - facility.id; - }); + .control( + _evaluationFacilityKey) + .markAsTouched(), + form + .control( + _evaluationFacilityKey) + .value = val, }, - ), - ), + readOnly: viewOnly, + errorMessage: + field.errorText, + initialValue: form + .control( + _evaluationFacilityKey) + .value, + ), + ); + }), ), - DigitTextFormField( + ), + ReactiveWrapperField( formControlName: _hfCoordinatorKey, - label: localizations.translate( - i18.referralReconciliation - .healthFacilityCoordinatorLabel, - ), - readOnly: viewOnly, - ), - DigitTextFormField( + builder: (field) { + return LabeledField( + label: localizations.translate( + i18.referralReconciliation + .healthFacilityCoordinatorLabel, + ), + child: DigitTextFormInput( + onChange: (val) => { + form + .control( + _hfCoordinatorKey) + .markAsTouched(), + form + .control( + _hfCoordinatorKey) + .value = val, + }, + readOnly: viewOnly, + initialValue: form + .control( + _hfCoordinatorKey) + .value, + )); + }), + ReactiveWrapperField( formControlName: _referredByKey, - label: localizations.translate( - i18.referralReconciliation - .referredByTeamCodeLabel, - ), - readOnly: viewOnly, - ), - ]), - ], - ), - ), + builder: (field) { + return LabeledField( + label: localizations.translate( + i18.referralReconciliation + .referredByTeamCodeLabel, + ), + child: DigitTextFormInput( + onChange: (val) => { + form + .control(_referredByKey) + .markAsTouched(), + form + .control(_referredByKey) + .value = val, + }, + readOnly: viewOnly, + initialValue: form + .control(_referredByKey) + .value, + )); + }), + ]), ), ], ), diff --git a/packages/referral_reconciliation/lib/pages/create_referral/record_reason_checklist.dart b/packages/referral_reconciliation/lib/pages/create_referral/record_reason_checklist.dart index 771ac72bd..075cc8b37 100644 --- a/packages/referral_reconciliation/lib/pages/create_referral/record_reason_checklist.dart +++ b/packages/referral_reconciliation/lib/pages/create_referral/record_reason_checklist.dart @@ -1,17 +1,23 @@ import 'dart:math'; import 'package:auto_route/auto_route.dart'; -import 'package:digit_components/digit_components.dart'; -import 'package:digit_components/utils/date_utils.dart'; import 'package:digit_data_model/data_model.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/models/RadioButtonModel.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/atoms/input_wrapper.dart'; +import 'package:digit_ui_components/widgets/atoms/pop_up_card.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:group_radio_button/group_radio_button.dart'; import 'package:referral_reconciliation/router/referral_reconciliation_router.gm.dart'; import 'package:referral_reconciliation/utils/constants.dart'; +import 'package:referral_reconciliation/utils/extensions/extensions.dart'; +import 'package:survey_form/survey_form.dart'; import '../../blocs/referral_recon_service_definition.dart'; +import '../../utils/date_utils.dart'; import '../../utils/i18_key_constants.dart' as i18; import '../../utils/utils.dart'; import '../../widgets/localized.dart'; @@ -19,6 +25,7 @@ import '../../widgets/localized.dart'; @RoutePage() class ReferralReasonChecklistPage extends LocalizedStatefulWidget { final String? referralClientRefId; + const ReferralReasonChecklistPage({ super.key, this.referralClientRefId, @@ -45,7 +52,7 @@ class _ReferralReasonChecklistPageState @override void initState() { context.read().add( - ServiceChecklistEvent( + ServiceSurveyFormEvent( value: Random().nextInt(100).toString(), submitTriggered: true, ), @@ -56,6 +63,7 @@ class _ReferralReasonChecklistPageState @override Widget build(BuildContext context) { final theme = Theme.of(context); + final textTheme = theme.digitTextTheme(context); return PopScope( canPop: false, @@ -82,312 +90,389 @@ class _ReferralReasonChecklistPageState orElse: () => Text(state.runtimeType.toString()), serviceDefinitionFetch: (value) { return ScrollableContent( - enableFixedButton: true, + enableFixedDigitButton: true, footer: DigitCard( - margin: const EdgeInsets.fromLTRB(0, kPadding, 0, 0), - padding: - const EdgeInsets.fromLTRB(kPadding, 0, kPadding, 0), - child: DigitElevatedButton( - onPressed: () async { - final router = context.router; - submitTriggered = true; - - context.read().add( - const ServiceChecklistEvent( - value: '', - submitTriggered: true, - ), - ); - final isValid = - checklistFormKey.currentState?.validate(); - if (!isValid!) { - return; - } - final itemsAttributes = initialAttributes; - - for (int i = 0; i < controller.length; i++) { - if (itemsAttributes?[i].required == true && - ((itemsAttributes?[i].dataType == - 'SingleValueList' && - visibleChecklistIndexes - .any((e) => e == i) && - (controller[i].text == '')) || - (itemsAttributes?[i].dataType != - 'SingleValueList' && - (controller[i].text == '' && - !(widget.referralClientRefId != - null))))) { - return; - } - } - - final shouldSubmit = await DigitDialog.show( - context, - options: DigitDialogOptions( - titleText: localizations.translate( - i18.checklist.checklistDialogLabel, - ), - content: Text(localizations.translate( - i18.checklist.checklistDialogDescription, - )), - primaryAction: DigitDialogActions( - label: localizations.translate( - i18.checklist.checklistDialogPrimaryAction, - ), - action: (ctx) { - List attributes = []; - for (int i = 0; i < controller.length; i++) { - final attribute = initialAttributes; - attributes.add(ServiceAttributesModel( - attributeCode: '${attribute?[i].code}', - dataType: attribute?[i].dataType, - clientReferenceId: IdGen.i.identifier, - referenceId: widget.referralClientRefId, - value: attribute?[i].dataType != - 'SingleValueList' - ? controller[i] - .text - .toString() - .trim() - .isNotEmpty - ? controller[i].text.toString() - : '' - : visibleChecklistIndexes.contains(i) - ? controller[i].text.toString() - : i18.checklist.notSelectedKey, - rowVersion: 1, - tenantId: attribute?[i].tenantId, - additionalDetails: null)); - } + cardType: CardType.primary, + padding: EdgeInsets.all(theme.spacerTheme.spacer2), + children: [ + DigitButton( + size: DigitButtonSize.large, + label: localizations + .translate(i18.common.coreCommonSubmit), + type: DigitButtonType.primary, + mainAxisSize: MainAxisSize.max, + onPressed: () async { + final router = context.router; + submitTriggered = true; - context.read().add( - ServiceCreateEvent( - serviceModel: ServiceModel( - createdAt: DigitDateUtils - .getDateFromTimestamp( - DateTime.now() - .toLocal() - .millisecondsSinceEpoch, - dateFormat: defaultDateTimeFormat, - ), - tenantId: value - .selectedServiceDefinition! - .tenantId, - clientId: widget.referralClientRefId - .toString(), - serviceDefId: value - .selectedServiceDefinition?.id, - attributes: attributes, - rowVersion: 1, - accountId: ReferralReconSingleton() - .projectId, - additionalDetails: { - "boundaryCode": - ReferralReconSingleton() - .boundary - ?.code - }, + context.read().add( + const ServiceSurveyFormEvent( + value: '', + submitTriggered: true, + ), + ); + final isValid = + checklistFormKey.currentState?.validate(); + if (!isValid!) { + return; + } + final itemsAttributes = initialAttributes; + + for (int i = 0; i < controller.length; i++) { + if (itemsAttributes?[i].required == true && + ((itemsAttributes?[i].dataType == + 'SingleValueList' && + visibleChecklistIndexes + .any((e) => e == i) && + (controller[i].text == '')) || + (itemsAttributes?[i].dataType != + 'SingleValueList' && + (controller[i].text == '' && + !(widget.referralClientRefId != + null))))) { + return; + } + } + + final shouldSubmit = await showDialog( + context: context, + builder: (BuildContext ctx) { + return Popup( + title: localizations.translate( + i18.checklist.checklistDialogLabel, + ), + description: localizations.translate( + i18.checklist.checklistDialogDescription, + ), + actions: [ + DigitButton( + label: localizations.translate( + i18.checklist + .checklistDialogPrimaryAction, ), + type: DigitButtonType.primary, + size: DigitButtonSize.large, + onPressed: () { + List + attributes = []; + for (int i = 0; + i < controller.length; + i++) { + final attribute = initialAttributes; + attributes.add( + ServiceAttributesModel( + attributeCode: + '${attribute?[i].code}', + dataType: + attribute?[i].dataType, + clientReferenceId: + IdGen.i.identifier, + referenceId: widget + .referralClientRefId, + value: attribute?[i] + .dataType != + 'SingleValueList' + ? controller[i] + .text + .toString() + .trim() + .isNotEmpty + ? controller[i] + .text + .toString() + : '' + : visibleChecklistIndexes + .contains(i) + ? controller[i] + .text + .toString() + : i18.checklist + .notSelectedKey, + rowVersion: 1, + tenantId: + attribute?[i].tenantId, + additionalDetails: null)); + } + + context.read().add( + ServiceCreateEvent( + serviceModel: ServiceModel( + createdAt: DigitDateUtils + .getDateFromTimestamp( + DateTime.now() + .toLocal() + .millisecondsSinceEpoch, + dateFormat: + defaultDateTimeFormat, + ), + tenantId: value + .selectedServiceDefinition! + .tenantId, + clientId: widget + .referralClientRefId + .toString(), + serviceDefId: value + .selectedServiceDefinition + ?.id, + attributes: attributes, + rowVersion: 1, + accountId: + ReferralReconSingleton() + .projectId, + auditDetails: + AuditDetails( + createdBy: + ReferralReconSingleton() + .userUUid, + createdTime: context + .millisecondsSinceEpoch(), + lastModifiedBy: + ReferralReconSingleton() + .userUUid, + lastModifiedTime: context + .millisecondsSinceEpoch(), + ), + clientAuditDetails: + ClientAuditDetails( + createdBy: + ReferralReconSingleton() + .userUUid, + createdTime: context + .millisecondsSinceEpoch(), + lastModifiedBy: + ReferralReconSingleton() + .userUUid, + lastModifiedTime: context + .millisecondsSinceEpoch(), + ), + additionalFields: + ServiceAdditionalFields( + version: 1, + fields: [ + AdditionalField( + 'boundaryCode', + SurveyFormSingleton() + .boundary + ?.code) + ])), + ), + ); + + Navigator.of( + context, + rootNavigator: true, + ).pop(true); + }, ), - ); - - Navigator.of( - context, - rootNavigator: true, - ).pop(true); - }, - ), - secondaryAction: DigitDialogActions( - label: localizations.translate( - i18.checklist.checklistDialogSecondaryAction, - ), - action: (context) { - Navigator.of( - context, - rootNavigator: true, - ).pop(false); - }, - ), - ), - ); - if (shouldSubmit ?? false) { - router.maybePop(); - router.push(ReferralReconAcknowledgementRoute()); - } - }, - child: Text( - localizations.translate(i18.common.coreCommonSubmit), - ), - ), - ), + DigitButton( + label: localizations.translate( + i18.checklist + .checklistDialogSecondaryAction, + ), + type: DigitButtonType.secondary, + size: DigitButtonSize.large, + onPressed: () { + Navigator.of( + context, + rootNavigator: true, + ).pop(false); + }, + ) + ], + ); + }); + + if (shouldSubmit ?? false) { + router.maybePop(); + router.push(ReferralReconAcknowledgementRoute()); + } + }, + ), + ]), children: [ Form( key: checklistFormKey, //assigning key to form - child: DigitCard( - child: Column(children: [ - Padding( - padding: const EdgeInsets.only(bottom: 8), - child: Text( - '${localizations.translate( - value.selectedServiceDefinition!.code - .toString(), - )} ${localizations.translate(i18.checklist.checklist)}', - style: theme.textTheme.displayMedium, - textAlign: TextAlign.left, - ), + child: DigitCard(cardType: CardType.primary, children: [ + Padding( + padding: const EdgeInsets.only(bottom: 8), + child: Text( + '${localizations.translate( + value.selectedServiceDefinition!.code.toString(), + )} ${localizations.translate(i18.checklist.checklist)}', + style: textTheme.headingXl, + textAlign: TextAlign.left, ), - ...initialAttributes!.map(( - e, - ) { - int index = (initialAttributes ?? []).indexOf(e); - - return Column(children: [ - if (e.dataType == 'String' && - !(e.code ?? '').contains('.')) ...[ - DigitTextField( + ), + ...initialAttributes!.map(( + e, + ) { + int index = (initialAttributes ?? []).indexOf(e); + + return Column(children: [ + if (e.dataType == 'String' && + !(e.code ?? '').contains('.')) ...[ + FormField(validator: (value) { + if (((controller[index].text == '') && + e.required == true)) { + return localizations + .translate("${e.code}_REQUIRED"); + } + if (e.regex != null) { + return (RegExp(e.regex!) + .hasMatch(controller[index].text)) + ? null + : localizations + .translate("${e.code}_REGEX"); + } + + return null; + }, builder: (FormFieldState field) { + return InputField( onChange: (value) { + controller[index].text = value; checklistFormKey.currentState?.validate(); }, + errorMessage: field.errorText, isRequired: false, controller: controller[index], - inputFormatter: [ + inputFormatters: [ FilteringTextInputFormatter.allow(RegExp( "[a-zA-Z0-9]", )), ], - validator: (value) { - if (((value == null || value == '') && - e.required == true)) { - return localizations - .translate("${e.code}_REQUIRED"); - } - if (e.regex != null) { - return (RegExp(e.regex!).hasMatch(value!)) - ? null - : localizations - .translate("${e.code}_REGEX"); - } - - return null; - }, + type: InputType.text, label: localizations.translate( '${value.selectedServiceDefinition?.code}.${e.code}', ), - ), - ] else if (e.dataType == 'Number' && - !(e.code ?? '').contains('.')) ...[ - DigitTextField( + ); + }) + ] else if (e.dataType == 'Number' && + !(e.code ?? '').contains('.')) ...[ + FormField(validator: (value) { + if (((controller[index].text == '') && + e.required == true)) { + return localizations.translate( + i18.common.corecommonRequired, + ); + } + if (e.regex != null) { + return (RegExp(e.regex!) + .hasMatch(controller[index].text)) + ? null + : localizations + .translate("${e.code}_REGEX"); + } + + return null; + }, builder: (FormFieldState field) { + return InputField( onChange: (value) { + controller[index].text = value; checklistFormKey.currentState?.validate(); }, - textStyle: theme.textTheme.headlineMedium, - textInputType: TextInputType.number, - inputFormatter: [ + controller: controller[index], + errorMessage: field.errorText, + inputFormatters: [ FilteringTextInputFormatter.allow(RegExp( "[0-9]", )), ], - validator: (value) { - if (((value == null || value == '') && - e.required == true)) { - return localizations.translate( - i18.common.corecommonRequired, - ); - } - if (e.regex != null) { - return (RegExp(e.regex!).hasMatch(value!)) - ? null - : localizations - .translate("${e.code}_REGEX"); - } - - return null; - }, - controller: controller[index], + type: InputType.text, + keyboardType: TextInputType.number, label: '${localizations.translate( '${value.selectedServiceDefinition?.code}.${e.code}', ).trim()} ${e.required == true ? '*' : ''}', - ), - ] else if (e.dataType == 'MultiValueList' && - !(e.code ?? '').contains('.')) ...[ - Align( - alignment: Alignment.topLeft, - child: Padding( - padding: const EdgeInsets.all(8), - child: Column( - children: [ - Text( - '${localizations.translate( - '${value.selectedServiceDefinition?.code}.${e.code}', - )} ${e.required == true ? '*' : ''}', - style: theme.textTheme.headlineSmall, - ), - ], - ), + ); + }) + ] else if (e.dataType == 'MultiValueList' && + !(e.code ?? '').contains('.')) ...[ + Align( + alignment: Alignment.topLeft, + child: Padding( + padding: const EdgeInsets.all(8), + child: Column( + children: [ + Text( + '${localizations.translate( + '${value.selectedServiceDefinition?.code}.${e.code}', + )} ${e.required == true ? '*' : ''}', + style: textTheme.headingS, + ), + ], ), ), - BlocBuilder( - builder: (context, state) { - return Column( - children: e.values! - .map((e) => DigitCheckboxTile( - label: e, - value: controller[index] - .text - .split('.') - .contains(e), - onChanged: (value) { - context - .read() - .add( - ServiceChecklistEvent( - value: e.toString(), - submitTriggered: - submitTriggered, - ), - ); - final String ele; - var val = controller[index] + ), + BlocBuilder( + builder: (context, state) { + return Column( + children: e.values! + .map((e) => Column( + children: [ + DigitCheckbox( + label: e, + value: controller[index] .text - .split('.'); - if (val.contains(e)) { - val.remove(e); - ele = val.join("."); - } else { - ele = - "${controller[index].text}.$e"; - } - controller[index].value = - TextEditingController - .fromValue( - TextEditingValue( - text: ele, - ), - ).value; - }, - )) - .toList(), - ); - }, - ), - ] else if (e.dataType == 'SingleValueList') ...[ - if (!(e.code ?? '').contains('.')) - DigitCard( - child: _buildChecklist( - e, - index, - value.selectedServiceDefinition, - context, - ), - ), - ], - ]); - }), - const SizedBox( - height: 15, - ), - ]), - ), + .split('.') + .contains(e), + onChanged: (value) { + context + .read() + .add( + ServiceSurveyFormEvent( + value: e.toString(), + submitTriggered: + submitTriggered, + ), + ); + final String ele; + var val = controller[index] + .text + .split('.'); + if (val.contains(e)) { + val.remove(e); + ele = val.join("."); + } else { + ele = + "${controller[index].text}.$e"; + } + controller[index].value = + TextEditingController + .fromValue( + TextEditingValue( + text: ele, + ), + ).value; + }, + ), + SizedBox( + height: + theme.spacerTheme.spacer3, + ) + ], + )) + .toList(), + ); + }, + ), + ] else if (e.dataType == 'SingleValueList') ...[ + if (!(e.code ?? '').contains('.')) + DigitCard( + cardType: CardType.primary, + children: [ + _buildChecklist( + e, + index, + value.selectedServiceDefinition, + context, + ), + ]), + ], + ]); + }), + const SizedBox( + height: 15, + ), + ]), ), ], ); @@ -406,6 +491,8 @@ class _ReferralReasonChecklistPageState BuildContext context, ) { final theme = Theme.of(context); + final textTheme = theme.digitTextTheme(context); + /* Check the data type of the attribute*/ if (item.dataType == 'SingleValueList') { final childItems = getNextQuestions( @@ -437,7 +524,7 @@ class _ReferralReasonChecklistPageState '${localizations.translate( '${selectedServiceDefinition?.code}.${item.code}', )} ${item.required == true ? '*' : ''}', - style: theme.textTheme.headlineSmall, + style: textTheme.headingS, ), ), ), @@ -445,58 +532,63 @@ class _ReferralReasonChecklistPageState children: [ BlocBuilder( builder: (context, state) { - return RadioGroup.builder( - groupValue: controller[index].text.trim(), - onChanged: (value) { - context.read().add( - ServiceChecklistEvent( - value: Random().nextInt(100).toString(), - submitTriggered: submitTriggered, - ), - ); - setState(() { - // Clear child controllers and update visibility - for (final matchingChildItem in childItems) { - final childIndex = - initialAttributes?.indexOf(matchingChildItem); - if (childIndex != null) { - controller[childIndex].clear(); - visibleChecklistIndexes - .removeWhere((v) => v == childIndex); - } - } - - // Update the current controller's value - controller[index].value = - TextEditingController.fromValue( - TextEditingValue( - text: value!, - ), - ).value; + return Align( + alignment: Alignment.topLeft, + child: Padding( + padding: EdgeInsets.only(left: theme.spacerTheme.spacer2), + child: RadioList( + radioDigitButtons: item.values != null + ? item.values! + .where((e) => e != i18.checklist.notSelectedKey) + .map((e) => RadioButtonModel( + code: e, + name: localizations.translate( + 'CORE_COMMON_${e.trim().toUpperCase()}'), + )) + .toList() + : [], + groupValue: controller[index].text.trim(), + onChanged: (selectedValue) { + context.read().add( + ServiceSurveyFormEvent( + value: Random().nextInt(100).toString(), + submitTriggered: submitTriggered, + ), + ); + setState(() { + // Clear child controllers and update visibility + for (final matchingChildItem in childItems) { + final childIndex = + initialAttributes?.indexOf(matchingChildItem); + if (childIndex != null) { + controller[childIndex].clear(); + visibleChecklistIndexes + .removeWhere((v) => v == childIndex); + } + } - if (excludedIndexes.isNotEmpty) { - for (int i = 0; i < excludedIndexes.length; i++) { - // Clear excluded child controllers - controller[excludedIndexes[i]].value = + // Update the current controller's value + controller[index].value = TextEditingController.fromValue( - const TextEditingValue( - text: '', + TextEditingValue( + text: selectedValue.code, ), ).value; - } - } - - // Remove corresponding controllers based on the removed attributes - }); - }, - items: item.values != null - ? item.values! - .where((e) => e != i18.checklist.notSelectedKey) - .toList() - : [], - itemBuilder: (item) => RadioButtonBuilder( - localizations.translate( - item.trim().toUpperCase(), + + if (excludedIndexes.isNotEmpty) { + for (int i = 0; i < excludedIndexes.length; i++) { + // Clear excluded child controllers + controller[excludedIndexes[i]].value = + TextEditingController.fromValue( + const TextEditingValue( + text: '', + ), + ).value; + } + } + }); + }, + isDisabled: false, // Set this based on your logic ), ), ); @@ -512,12 +604,17 @@ class _ReferralReasonChecklistPageState offstage: !hasError, child: Align( alignment: Alignment.centerLeft, - child: Text( - localizations.translate( - i18.common.corecommonRequired, - ), - style: TextStyle( - color: theme.colorScheme.error, + child: Padding( + padding: EdgeInsets.only( + left: theme.spacerTheme.spacer4, + bottom: theme.spacerTheme.spacer3), + child: Text( + localizations.translate( + i18.common.corecommonRequired, + ), + style: TextStyle( + color: theme.colorTheme.alert.error, + ), ), ), ), @@ -540,94 +637,105 @@ class _ReferralReasonChecklistPageState } else if (item.dataType == 'String') { return Padding( padding: const EdgeInsets.all(8.0), - child: DigitTextField( - onChange: (value) { - checklistFormKey.currentState?.validate(); - }, - isRequired: item.required ?? true, - controller: controller[index], - inputFormatter: [ - FilteringTextInputFormatter.allow(RegExp( - "[a-zA-Z0-9 ]", - )), - ], + child: FormField( validator: (value) { - if (((value == null || value == '') && item.required == true)) { + // Custom validation logic + if (((controller[index].text == '') && item.required == true)) { return localizations.translate("${item.code}_REQUIRED"); } if (item.regex != null) { - return (RegExp(item.regex!).hasMatch(value!)) + return (RegExp(item.regex!).hasMatch(controller[index].text)) ? null : localizations.translate("${item.code}_REGEX"); } return null; }, - label: localizations.translate( - '${selectedServiceDefinition?.code}.${item.code}', - ), + builder: (FormFieldState field) { + return InputField( + onChange: (value) { + controller[index].text = value; + checklistFormKey.currentState?.validate(); + }, + errorMessage: field.errorText, + isRequired: item.required ?? true, + type: InputType.text, + label: localizations.translate( + '${selectedServiceDefinition?.code}.${item.code}', + ), + controller: controller[index], + inputFormatters: [ + FilteringTextInputFormatter.allow(RegExp( + "[a-zA-Z0-9 ]", + )), + ], + ); + }, ), ); } else if (item.dataType == 'Number') { - return DigitTextField( - onChange: (value) { - checklistFormKey.currentState?.validate(); - }, - textStyle: theme.textTheme.headlineMedium, - textInputType: TextInputType.number, - inputFormatter: [ - FilteringTextInputFormatter.allow(RegExp( - "[0-9]", - )), - ], - validator: (value) { - if (((value == null || value == '') && item.required == true)) { - return localizations.translate( - i18.common.corecommonRequired, - ); - } - if (item.regex != null) { - return (RegExp(item.regex!).hasMatch(value!)) - ? null - : localizations.translate("${item.code}_REGEX"); - } - - return null; - }, - controller: controller[index], - label: '${localizations.translate( - '${selectedServiceDefinition?.code}.${item.code}', - ).trim()} ${item.required == true ? '*' : ''}', - ); + return FormField(validator: (value) { + if (((controller[index].text == '') && item.required == true)) { + return localizations.translate( + i18.common.corecommonRequired, + ); + } + if (item.regex != null) { + return (RegExp(item.regex!).hasMatch(controller[index].text)) + ? null + : localizations.translate("${item.code}_REGEX"); + } + + return null; + }, builder: (FormFieldState field) { + return InputField( + onChange: (value) { + controller[index].text = value; + checklistFormKey.currentState?.validate(); + }, + controller: controller[index], + errorMessage: field.errorText, + inputFormatters: [ + FilteringTextInputFormatter.allow(RegExp( + "[0-9]", + )), + ], + type: InputType.text, + keyboardType: TextInputType.number, + label: '${localizations.translate( + '${selectedServiceDefinition?.code}.${item.code}', + ).trim()} ${item.required == true ? '*' : ''}', + ); + }); } else if (item.dataType == 'MultiValueList') { - return Column( - children: [ - Align( - alignment: Alignment.topLeft, - child: Padding( - padding: const EdgeInsets.all(8), - child: Column( - children: [ - Text( - '${localizations.translate( - '${selectedServiceDefinition?.code}.${item.code}', - )} ${item.required == true ? '*' : ''}', - style: theme.textTheme.headlineSmall, - ), - ], - ), + return Column(children: [ + Align( + alignment: Alignment.topLeft, + child: Padding( + padding: const EdgeInsets.all(8), + child: Column( + children: [ + Text( + '${localizations.translate( + '${selectedServiceDefinition?.code}.${item.code}', + )} ${item.required == true ? '*' : ''}', + style: textTheme.headingS, + ), + ], ), ), - BlocBuilder( - builder: (context, state) { - return Column( - children: item.values! - .map((e) => DigitCheckboxTile( + ), + BlocBuilder(builder: (context, state) { + return Column( + children: item.values! + .map((e) => Column( + children: [ + DigitCheckbox( label: e, value: controller[index].text.split('.').contains(e), onChanged: (value) { context.read().add( - ServiceChecklistEvent( + ServiceSurveyFormEvent( value: e.toString(), submitTriggered: submitTriggered, ), @@ -647,13 +755,16 @@ class _ReferralReasonChecklistPageState ), ).value; }, - )) - .toList(), - ); - }, - ), - ], - ); + ), + SizedBox( + height: theme.spacerTheme.spacer3, + ) + ], + )) + .toList(), + ); + }) + ]); } else { return const SizedBox.shrink(); } @@ -672,6 +783,8 @@ class _ReferralReasonChecklistPageState initialAttributes ?? [], ); + final theme = Theme.of(context); + return Column( children: [ // Build cards for each matching child attribute @@ -681,11 +794,11 @@ class _ReferralReasonChecklistPageState margin: const EdgeInsets.only(bottom: 8.0, left: 4.0, right: 4.0), color: countDots(matchingChildItem.code ?? '') % 4 == 2 ? const Color.fromRGBO(238, 238, 238, 1) - : const DigitColors().white, + : theme.colorTheme.paper.secondary, child: _buildChecklist( matchingChildItem, - initialAttributes?.indexOf(matchingChildItem) ?? - parentIndex, // Pass parentIndex here as we're building at the same level + initialAttributes?.indexOf(matchingChildItem) ?? parentIndex, + // Pass parentIndex here as we're building at the same level selectedServiceDefinition, context, ), diff --git a/packages/referral_reconciliation/lib/pages/create_referral/record_referral_details.dart b/packages/referral_reconciliation/lib/pages/create_referral/record_referral_details.dart index f80e23055..597ae276f 100644 --- a/packages/referral_reconciliation/lib/pages/create_referral/record_referral_details.dart +++ b/packages/referral_reconciliation/lib/pages/create_referral/record_referral_details.dart @@ -1,8 +1,10 @@ import 'package:auto_route/auto_route.dart'; -import 'package:digit_components/digit_components.dart'; -import 'package:digit_components/widgets/atoms/digit_radio_button_list.dart'; -import 'package:digit_components/widgets/atoms/digit_toaster.dart'; import 'package:digit_data_model/data_model.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/models/RadioButtonModel.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/atoms/dropdown_wrapper.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; @@ -10,6 +12,7 @@ import 'package:reactive_forms/reactive_forms.dart'; import 'package:referral_reconciliation/models/entities/referral_recon_enums.dart'; import 'package:referral_reconciliation/router/referral_reconciliation_router.gm.dart'; import 'package:referral_reconciliation/utils/extensions/extensions.dart'; +import 'package:survey_form/survey_form.dart'; import '../../../utils/i18_key_constants.dart' as i18; import '../../blocs/referral_recon_record.dart'; @@ -49,6 +52,7 @@ class _RecordReferralDetailsPageState static const _beneficiaryIdKey = 'beneficiaryId'; static const _referralCodeKey = 'referralCode'; static const _ageKey = 'ageInMonths'; + String selectedReasonIndex = ''; final clickedStatus = ValueNotifier(false); @override @@ -60,7 +64,7 @@ class _RecordReferralDetailsPageState @override Widget build(BuildContext context) { final theme = Theme.of(context); - // final router = context.router; + final textTheme = theme.digitTextTheme(context); return BlocBuilder( @@ -94,7 +98,7 @@ class _RecordReferralDetailsPageState : null, ); return ScrollableContent( - enableFixedButton: true, + enableFixedDigitButton: true, header: const Column(children: [ BackNavigationHelpHeaderWidget(), ]), @@ -102,299 +106,18 @@ class _RecordReferralDetailsPageState builder: (context, serviceState) { return serviceState.maybeWhen( orElse: () => DigitCard( - margin: const EdgeInsets.fromLTRB( - 0, kPadding, 0, 0), - padding: const EdgeInsets.fromLTRB( - kPadding, 0, kPadding, 0), - child: ValueListenableBuilder( - valueListenable: clickedStatus, - builder: (context, bool isClicked, _) { - return DigitElevatedButton( - onPressed: isClicked - ? null - : () { - if (form - .control(_cycleKey) - .value == - null) { - clickedStatus.value = false; - form - .control(_cycleKey) - .setErrors({'': true}); - } else if (form - .control(_genderKey) - .value == - null) { - clickedStatus.value = false; - form - .control(_genderKey) - .setErrors({'': true}); - } else if (form - .control(_referralReason) - .value == - null) { - clickedStatus.value = false; - form - .control(_referralReason) - .setErrors({'': true}); - } - form.markAllAsTouched(); - - if (viewOnly) { - final symptom = form - .control(_referralReason) - .value as String; - context - .read< - ReferralReconServiceDefinitionBloc>() - .add( - ReferralReconServiceDefinitionSelectionEvent( - serviceDefinitionCode: - symptom, - ), - ); - context.read().add( - ServiceSearchEvent( - serviceSearchModel: - ServiceSearchModel( - clientId: recordState - .mapOrNull( - create: (value) => value - .viewOnly - ? value - .hfReferralModel - ?.clientReferenceId - : null, - ), - ), - ), - ); - context.router.push( - ReferralReasonChecklistPreviewRoute(), - ); - } else if (!form.valid) { - return; - } else if (value - .serviceDefinitionList - .isEmpty) { - DigitToast.show( - context, - options: DigitToastOptions( - i18.referralReconciliation - .noChecklistFound, - true, - DigitTheme - .instance.mobileTheme, - ), - ); - } else { - final hfState = BlocProvider.of< - RecordHFReferralBloc>( - context, - ).state; - clickedStatus.value = true; - final cycle = form - .control(_cycleKey) - .value; - final nameOfChild = form - .control(_nameOfChildKey) - .value as String; - final age = form - .control(_ageKey) - .value as int; - final gender = form - .control(_genderKey) - .value as String; - final beneficiaryId = form - .control(_beneficiaryIdKey) - .value as String?; - final referralCode = form - .control(_referralCodeKey) - .value as String?; - final symptom = form - .control(_referralReason) - .value as String; - final hfCoordinator = - hfState.mapOrNull( - create: (val) => - val.healthFacilityCord, - ); - final referredBy = - hfState.mapOrNull( - create: (val) => - val.referredBy, - ); - final dateOfEvaluation = hfState - .mapOrNull( - create: (val) => - val.dateOfEvaluation, - ) - ?.millisecondsSinceEpoch; - final facilityId = - hfState.mapOrNull( - create: (val) => - val.facilityId, - ); - final hfClientRefId = - IdGen.i.identifier; - - final event = context.read< - RecordHFReferralBloc>(); - event.add( - RecordHFReferralCreateEntryEvent( - hfReferralModel: - HFReferralModel( - clientReferenceId: - hfClientRefId, - projectFacilityId: - facilityId, - projectId: - widget.projectId, - name: nameOfChild.trim(), - beneficiaryId: - beneficiaryId, - referralCode: - referralCode, - symptom: symptom, - tenantId: - ReferralReconSingleton() - .tenantId, - rowVersion: 1, - auditDetails: - AuditDetails( - createdBy: - ReferralReconSingleton() - .userUUid, - createdTime: context - .millisecondsSinceEpoch(), - lastModifiedBy: - ReferralReconSingleton() - .userUUid, - lastModifiedTime: context - .millisecondsSinceEpoch(), - ), - clientAuditDetails: - ClientAuditDetails( - createdBy: - ReferralReconSingleton() - .userUUid, - createdTime: context - .millisecondsSinceEpoch(), - lastModifiedBy: - ReferralReconSingleton() - .userUUid, - lastModifiedTime: context - .millisecondsSinceEpoch(), - ), - additionalFields: - HFReferralAdditionalFields( - version: 1, - fields: [ - if (hfCoordinator != - null && - hfCoordinator - .toString() - .trim() - .isNotEmpty) - AdditionalField( - ReferralReconEnums - .hFCoordinator - .toValue(), - hfCoordinator, - ), - if (referredBy != - null && - referredBy - .toString() - .trim() - .isNotEmpty) - AdditionalField( - ReferralReconEnums - .referredBy - .toValue(), - referredBy, - ), - if (dateOfEvaluation != - null && - dateOfEvaluation - .toString() - .trim() - .isNotEmpty) - AdditionalField( - ReferralReconEnums - .dateOfEvaluation - .toValue(), - dateOfEvaluation, - ), - if (nameOfChild != - null && - nameOfChild - .toString() - .trim() - .isNotEmpty) - AdditionalField( - ReferralReconEnums - .nameOfReferral - .toValue(), - nameOfChild, - ), - if (age != null && - age - .toString() - .trim() - .isNotEmpty) - AdditionalField( - ReferralReconEnums - .age - .toValue(), - age, - ), - if (gender != null && - gender - .toString() - .trim() - .isNotEmpty) - AdditionalField( - ReferralReconEnums - .gender - .toValue(), - gender, - ), - if (cycle != null && - cycle - .toString() - .trim() - .isNotEmpty) - AdditionalField( - ReferralReconEnums - .cycle - .toValue(), - cycle, - ), - ], - ), - ), - ), - ); - context - .read< - ReferralReconServiceDefinitionBloc>() - .add( - ReferralReconServiceDefinitionSelectionEvent( - serviceDefinitionCode: - symptom), - ); - context.router.push( - ReferralReasonChecklistRoute( - referralClientRefId: - hfClientRefId, - ), - ); - } - }, - child: Center( - child: Text( - localizations + padding: + EdgeInsets.all(theme.spacerTheme.spacer2), + cardType: CardType.primary, + children: [ + ValueListenableBuilder( + valueListenable: clickedStatus, + builder: (context, bool isClicked, _) { + return DigitButton( + size: DigitButtonSize.large, + type: DigitButtonType.primary, + mainAxisSize: MainAxisSize.max, + label: localizations .translate(recordState.mapOrNull( create: (value) => value .viewOnly @@ -404,65 +127,51 @@ class _RecordReferralDetailsPageState .coreCommonSubmit, ) ?? i18.common.coreCommonSubmit), - ), - ), - ); - }, - ), - ), - serviceSearch: (value1, value2, value3) { - return DigitCard( - margin: const EdgeInsets.fromLTRB( - 0, kPadding, 0, 0), - padding: const EdgeInsets.fromLTRB( - kPadding, 0, kPadding, 0), - child: ValueListenableBuilder( - valueListenable: clickedStatus, - builder: (context, bool isClicked, _) { - return DigitElevatedButton( - onPressed: isClicked - ? null - : () { - if (form + onPressed: isClicked + ? () {} + : () { + if (form + .control(_cycleKey) + .value == + null) { + clickedStatus.value = false; + form .control(_cycleKey) - .value == - null) { - clickedStatus.value = false; - form - .control(_cycleKey) - .setErrors({'': true}); - } else if (form + .setErrors({'': true}); + } else if (form + .control(_genderKey) + .value == + null) { + clickedStatus.value = false; + form .control(_genderKey) - .value == - null) { - clickedStatus.value = false; - form - .control(_genderKey) - .setErrors({'': true}); - } else if (form + .setErrors({'': true}); + } else if (form + .control( + _referralReason) + .value == + null) { + clickedStatus.value = false; + form .control( _referralReason) - .value == - null) { - clickedStatus.value = false; - form - .control(_referralReason) - .setErrors({'': true}); - } - form.markAllAsTouched(); + .setErrors({'': true}); + } + form.markAllAsTouched(); - if (viewOnly) { - final symptom = form - .control(_referralReason) - .value as String; - if (value1.isNotEmpty) { + if (viewOnly) { + final symptom = form + .control( + _referralReason) + .value as String; context .read< ReferralReconServiceDefinitionBloc>() .add( ReferralReconServiceDefinitionSelectionEvent( - serviceDefinitionCode: - symptom), + serviceDefinitionCode: + symptom, + ), ); context .read() @@ -486,21 +195,229 @@ class _RecordReferralDetailsPageState context.router.push( ReferralReasonChecklistPreviewRoute(), ); + } else if (!form.valid) { + return; + } else if (value + .serviceDefinitionList + .isEmpty) { + Toast.showToast( + context, + message: localizations + .translate(i18 + .referralReconciliation + .noChecklistFound), + type: ToastType.error, + ); } else { + final hfState = BlocProvider + .of( + context, + ).state; + clickedStatus.value = true; + final cycle = form + .control(_cycleKey) + .value; + final nameOfChild = form + .control( + _nameOfChildKey) + .value as String; + final age = form + .control(_ageKey) + .value as int; + final gender = form + .control(_genderKey) + .value as String; + final beneficiaryId = form + .control( + _beneficiaryIdKey) + .value as String?; + final referralCode = form + .control( + _referralCodeKey) + .value as String?; + final symptom = form + .control( + _referralReason) + .value as String; + final hfCoordinator = + hfState.mapOrNull( + create: (val) => val + .healthFacilityCord, + ); + final referredBy = + hfState.mapOrNull( + create: (val) => + val.referredBy, + ); + final dateOfEvaluation = hfState + .mapOrNull( + create: (val) => val + .dateOfEvaluation, + ) + ?.millisecondsSinceEpoch; + final facilityId = + hfState.mapOrNull( + create: (val) => + val.facilityId, + ); final hfClientRefId = - recordState.mapOrNull( - create: (value) => value - .hfReferralModel - ?.clientReferenceId, + IdGen.i.identifier; + + final event = context.read< + RecordHFReferralBloc>(); + event.add( + RecordHFReferralCreateEntryEvent( + hfReferralModel: + HFReferralModel( + clientReferenceId: + hfClientRefId, + projectFacilityId: + facilityId, + projectId: + widget.projectId, + name: nameOfChild + .trim(), + beneficiaryId: + beneficiaryId, + referralCode: + referralCode, + symptom: symptom, + tenantId: + ReferralReconSingleton() + .tenantId, + rowVersion: 1, + auditDetails: + AuditDetails( + createdBy: + ReferralReconSingleton() + .userUUid, + createdTime: context + .millisecondsSinceEpoch(), + lastModifiedBy: + ReferralReconSingleton() + .userUUid, + lastModifiedTime: + context + .millisecondsSinceEpoch(), + ), + clientAuditDetails: + ClientAuditDetails( + createdBy: + ReferralReconSingleton() + .userUUid, + createdTime: context + .millisecondsSinceEpoch(), + lastModifiedBy: + ReferralReconSingleton() + .userUUid, + lastModifiedTime: + context + .millisecondsSinceEpoch(), + ), + additionalFields: + HFReferralAdditionalFields( + version: 1, + fields: [ + AdditionalField( + "boundaryCode", + ReferralReconSingleton() + .boundary + ?.code), + if (hfCoordinator != + null && + hfCoordinator + .toString() + .trim() + .isNotEmpty) + AdditionalField( + ReferralReconEnums + .hFCoordinator + .toValue(), + hfCoordinator, + ), + if (referredBy != + null && + referredBy + .toString() + .trim() + .isNotEmpty) + AdditionalField( + ReferralReconEnums + .referredBy + .toValue(), + referredBy, + ), + if (dateOfEvaluation != + null && + dateOfEvaluation + .toString() + .trim() + .isNotEmpty) + AdditionalField( + ReferralReconEnums + .dateOfEvaluation + .toValue(), + dateOfEvaluation, + ), + if (nameOfChild != + null && + nameOfChild + .toString() + .trim() + .isNotEmpty) + AdditionalField( + ReferralReconEnums + .nameOfReferral + .toValue(), + nameOfChild, + ), + if (age != null && + age + .toString() + .trim() + .isNotEmpty) + AdditionalField( + ReferralReconEnums + .age + .toValue(), + age, + ), + if (gender != + null && + gender + .toString() + .trim() + .isNotEmpty) + AdditionalField( + ReferralReconEnums + .gender + .toValue(), + gender, + ), + if (cycle != + null && + cycle + .toString() + .trim() + .isNotEmpty) + AdditionalField( + ReferralReconEnums + .cycle + .toValue(), + cycle, + ), + ], + ), + ), + ), ); context .read< ReferralReconServiceDefinitionBloc>() .add( ReferralReconServiceDefinitionSelectionEvent( - serviceDefinitionCode: - symptom, - ), + serviceDefinitionCode: + symptom), ); context.router.push( ReferralReasonChecklistRoute( @@ -509,251 +426,369 @@ class _RecordReferralDetailsPageState ), ); } - } else if (!form.valid) { - return; - } else if (value - .serviceDefinitionList - .isEmpty) { - DigitToast.show( - context, - options: DigitToastOptions( - i18.referralReconciliation - .noChecklistFound, - true, - DigitTheme - .instance.mobileTheme, - ), - ); - } else { - final hfState = BlocProvider - .of( - context, - ).state; - clickedStatus.value = true; - final cycle = form - .control(_cycleKey) - .value; - final nameOfChild = form - .control(_nameOfChildKey) - .value as String; - final age = form - .control(_ageKey) - .value as int; - final gender = form - .control(_genderKey) - .value as String; - final beneficiaryId = form - .control( - _beneficiaryIdKey) - .value as String?; - final referralCode = form - .control(_referralCodeKey) - .value as String?; - final symptom = form - .control(_referralReason) - .value as String; - final hfCoordinator = - hfState.mapOrNull( - create: (val) => - val.healthFacilityCord, - ); - final referredBy = - hfState.mapOrNull( - create: (val) => - val.referredBy, - ); - final dateOfEvaluation = hfState - .mapOrNull( - create: (val) => val - .dateOfEvaluation, - ) - ?.millisecondsSinceEpoch; - final facilityId = - hfState.mapOrNull( - create: (val) => - val.facilityId, - ); - final hfClientRefId = - IdGen.i.identifier; + }, + ); + }, + ), + ]), + serviceSearch: (value1, value2, value3) { + return DigitCard( + padding: EdgeInsets.all( + theme.spacerTheme.spacer2), + cardType: CardType.primary, + children: [ + ValueListenableBuilder( + valueListenable: clickedStatus, + builder: (context, bool isClicked, _) { + return DigitButton( + size: DigitButtonSize.large, + type: DigitButtonType.primary, + mainAxisSize: MainAxisSize.max, + label: localizations.translate( + recordState.mapOrNull( + create: (value) => value + .viewOnly + ? i18.common + .coreCommonNext + : i18.common + .coreCommonSubmit, + ) ?? + i18.common + .coreCommonSubmit), + onPressed: isClicked + ? () {} + : () { + if (form + .control(_cycleKey) + .value == + null) { + clickedStatus.value = + false; + form + .control(_cycleKey) + .setErrors( + {'': true}); + } + if (form + .control(_genderKey) + .value == + null) { + clickedStatus.value = + false; + form + .control(_genderKey) + .setErrors( + {'': true}); + } + form.markAllAsTouched(); + if (form.invalid) return; - final event = context.read< - RecordHFReferralBloc>(); - event.add( - RecordHFReferralCreateEntryEvent( - hfReferralModel: - HFReferralModel( - clientReferenceId: - hfClientRefId, - projectFacilityId: - facilityId, - projectId: - ReferralReconSingleton() - .projectId, - name: - nameOfChild.trim(), - beneficiaryId: - beneficiaryId, - referralCode: - referralCode, - symptom: symptom, - tenantId: - ReferralReconSingleton() - .tenantId, - rowVersion: 1, - auditDetails: - AuditDetails( - createdBy: - ReferralReconSingleton() - .userUUid, - createdTime: context - .millisecondsSinceEpoch(), - lastModifiedBy: - ReferralReconSingleton() - .userUUid, - lastModifiedTime: context - .millisecondsSinceEpoch(), - ), - clientAuditDetails: - ClientAuditDetails( - createdBy: - ReferralReconSingleton() - .userUUid, - createdTime: context - .millisecondsSinceEpoch(), - lastModifiedBy: - ReferralReconSingleton() - .userUUid, - lastModifiedTime: context - .millisecondsSinceEpoch(), - ), - additionalFields: - HFReferralAdditionalFields( - version: 1, - fields: [ - if (hfCoordinator != - null && - hfCoordinator - .toString() - .trim() - .isNotEmpty) - AdditionalField( - ReferralReconEnums - .hFCoordinator - .toValue(), - hfCoordinator, - ), - if (referredBy != - null && - referredBy - .toString() - .trim() - .isNotEmpty) - AdditionalField( - ReferralReconEnums - .referredBy - .toValue(), - referredBy, - ), - if (dateOfEvaluation != - null && - dateOfEvaluation - .toString() - .trim() - .isNotEmpty) - AdditionalField( - ReferralReconEnums - .dateOfEvaluation - .toValue(), - dateOfEvaluation, - ), - if (nameOfChild != - null && - nameOfChild - .toString() - .trim() - .isNotEmpty) - AdditionalField( - ReferralReconEnums - .nameOfReferral - .toValue(), - nameOfChild, - ), - if (age != null && - age - .toString() - .trim() - .isNotEmpty) - AdditionalField( - ReferralReconEnums - .age - .toValue(), - age, - ), - if (gender != - null && - gender - .toString() - .trim() - .isNotEmpty) - AdditionalField( - ReferralReconEnums - .gender - .toValue(), - gender, + if (viewOnly) { + final symptom = form + .control( + _referralReason) + .value as String; + if (value1.isNotEmpty) { + context + .read< + ReferralReconServiceDefinitionBloc>() + .add( + ReferralReconServiceDefinitionSelectionEvent( + serviceDefinitionCode: + symptom), + ); + context + .read() + .add( + ServiceSearchEvent( + serviceSearchModel: + ServiceSearchModel( + clientId: + recordState + .mapOrNull( + create: (value) => value + .viewOnly + ? value + .hfReferralModel + ?.clientReferenceId + : null, + ), + ), ), - if (cycle != null && - cycle - .toString() - .trim() - .isNotEmpty) - AdditionalField( - ReferralReconEnums - .cycle - .toValue(), - cycle, + ); + context.router.push( + ReferralReasonChecklistPreviewRoute(), + ); + } else { + final hfClientRefId = + recordState + .mapOrNull( + create: (value) => value + .hfReferralModel + ?.clientReferenceId, + ); + context + .read< + ReferralReconServiceDefinitionBloc>() + .add( + ReferralReconServiceDefinitionSelectionEvent( + serviceDefinitionCode: + symptom, ), - ], + ); + context.router.push( + ReferralReasonChecklistRoute( + referralClientRefId: + hfClientRefId, + ), + ); + } + } else if (!form.valid) { + return; + } else if (value + .serviceDefinitionList + .isEmpty) { + Toast.showToast( + context, + message: localizations + .translate(i18 + .referralReconciliation + .noChecklistFound), + type: ToastType.error, + ); + } else { + final hfState = + BlocProvider.of< + RecordHFReferralBloc>( + context, + ).state; + clickedStatus.value = + true; + final cycle = form + .control(_cycleKey) + .value; + final nameOfChild = form + .control( + _nameOfChildKey) + .value as String; + final age = form + .control(_ageKey) + .value as int; + final gender = form + .control(_genderKey) + .value as String; + final beneficiaryId = form + .control( + _beneficiaryIdKey) + .value as String?; + final referralCode = form + .control( + _referralCodeKey) + .value as String?; + final symptom = form + .control( + _referralReason) + .value as String; + final hfCoordinator = + hfState.mapOrNull( + create: (val) => val + .healthFacilityCord, + ); + final referredBy = + hfState.mapOrNull( + create: (val) => + val.referredBy, + ); + final dateOfEvaluation = + hfState + .mapOrNull( + create: (val) => + val.dateOfEvaluation, + ) + ?.millisecondsSinceEpoch; + final facilityId = + hfState.mapOrNull( + create: (val) => + val.facilityId, + ); + final hfClientRefId = + IdGen.i.identifier; + + final event = context.read< + RecordHFReferralBloc>(); + event.add( + RecordHFReferralCreateEntryEvent( + hfReferralModel: + HFReferralModel( + clientReferenceId: + hfClientRefId, + projectFacilityId: + facilityId, + projectId: + ReferralReconSingleton() + .projectId, + name: nameOfChild + .trim(), + beneficiaryId: + beneficiaryId, + referralCode: + referralCode, + symptom: symptom, + tenantId: + ReferralReconSingleton() + .tenantId, + rowVersion: 1, + auditDetails: + AuditDetails( + createdBy: + ReferralReconSingleton() + .userUUid, + createdTime: context + .millisecondsSinceEpoch(), + lastModifiedBy: + ReferralReconSingleton() + .userUUid, + lastModifiedTime: + context + .millisecondsSinceEpoch(), + ), + clientAuditDetails: + ClientAuditDetails( + createdBy: + ReferralReconSingleton() + .userUUid, + createdTime: context + .millisecondsSinceEpoch(), + lastModifiedBy: + ReferralReconSingleton() + .userUUid, + lastModifiedTime: + context + .millisecondsSinceEpoch(), + ), + additionalFields: + HFReferralAdditionalFields( + version: 1, + fields: [ + AdditionalField( + "boundaryCode", + ReferralReconSingleton() + .boundary + ?.code), + if (hfCoordinator != + null && + hfCoordinator + .toString() + .trim() + .isNotEmpty) + AdditionalField( + ReferralReconEnums + .hFCoordinator + .toValue(), + hfCoordinator, + ), + if (referredBy != + null && + referredBy + .toString() + .trim() + .isNotEmpty) + AdditionalField( + ReferralReconEnums + .referredBy + .toValue(), + referredBy, + ), + if (dateOfEvaluation != + null && + dateOfEvaluation + .toString() + .trim() + .isNotEmpty) + AdditionalField( + ReferralReconEnums + .dateOfEvaluation + .toValue(), + dateOfEvaluation, + ), + if (nameOfChild != + null && + nameOfChild + .toString() + .trim() + .isNotEmpty) + AdditionalField( + ReferralReconEnums + .nameOfReferral + .toValue(), + nameOfChild, + ), + if (age != + null && + age + .toString() + .trim() + .isNotEmpty) + AdditionalField( + ReferralReconEnums + .age + .toValue(), + age, + ), + if (gender != + null && + gender + .toString() + .trim() + .isNotEmpty) + AdditionalField( + ReferralReconEnums + .gender + .toValue(), + gender, + ), + if (cycle != + null && + cycle + .toString() + .trim() + .isNotEmpty) + AdditionalField( + ReferralReconEnums + .cycle + .toValue(), + cycle, + ), + ], + ), + ), ), - ), - ), - ); - context - .read< - ReferralReconServiceDefinitionBloc>() - .add( - ReferralReconServiceDefinitionSelectionEvent( - serviceDefinitionCode: - symptom, + ); + context + .read< + ReferralReconServiceDefinitionBloc>() + .add( + ReferralReconServiceDefinitionSelectionEvent( + serviceDefinitionCode: + symptom, + ), + ); + final parent = context + .router + .parent() + as StackRouter; + parent.push( + ReferralReasonChecklistRoute( + referralClientRefId: + hfClientRefId, ), ); - final parent = context.router - .parent() as StackRouter; - parent.push( - ReferralReasonChecklistRoute( - referralClientRefId: - hfClientRefId, - ), - ); - } - }, - child: Center( - child: Text( - localizations.translate(recordState - .mapOrNull( - create: (value) => - value.viewOnly - ? i18.common - .coreCommonNext - : i18.common - .coreCommonSubmit, - ) ?? - i18.common.coreCommonSubmit), - ), - ), - ); - }, - ), - ); + } + }, + ); + }, + ), + ]); }, ); }, @@ -763,7 +798,7 @@ class _RecordReferralDetailsPageState child: Column( children: [ DigitCard( - child: Column( + cardType: CardType.primary, children: [ Row( mainAxisAlignment: @@ -776,76 +811,158 @@ class _RecordReferralDetailsPageState .referralDetails, ), style: - theme.textTheme.displayMedium, + textTheme.headingXl, ), ), ], ), - Column(children: [ - DigitReactiveSearchDropdown( - label: localizations.translate( - i18.referralReconciliation - .selectCycle, - ), - form: form, - isRequired: true, - enabled: !viewOnly, - menuItems: widget.cycles, + ReactiveWrapperField( formControlName: _cycleKey, - valueMapper: (value) { - return '${localizations.translate(i18.referralReconciliation.cycle)} $value'; + validationMessages: { + '': (_) => localizations.translate( + i18.common.corecommonRequired), }, - validationMessage: - localizations.translate( - i18.common.corecommonRequired, - ), - emptyText: localizations.translate( - i18.common.noMatchFound), - ), - DigitTextFormField( - formControlName: _nameOfChildKey, - label: localizations.translate( - i18.referralReconciliation - .nameOfTheChildLabel, - ), - readOnly: viewOnly, - isRequired: true, + showErrors: (control) => + control.invalid && + control.touched, + // Ensures error is shown if invalid and touched + builder: (field) { + return LabeledField( + isRequired: true, + label: localizations.translate( + i18.referralReconciliation + .selectCycle, + ), + child: Dropdown( + readOnly: viewOnly, + onSelect: (val) => { + form + .control(_cycleKey) + .markAsTouched(), + form + .control(_cycleKey) + .value = val.code, + }, + selectedOption: widget.cycles + .map((item) => + DropdownItem( + name: + '${localizations.translate(i18.referralReconciliation.cycle)} $item', + code: + item.toString(), + )) + .firstWhere( + (item) => + item.code == + form + .control( + _cycleKey) + .value, + orElse: () => + const DropdownItem( + name: '', + code: ''), + ), + errorMessage: field.errorText, + items: widget.cycles + .map( + (item) => DropdownItem( + name: + '${localizations.translate(i18.referralReconciliation.cycle)} $item', + code: item.toString(), + ), + ) + .toList(), + )); + }), + ReactiveWrapperField( validationMessages: { 'required': (_) => localizations.translate( i18.common.corecommonRequired, ), }, - ), - DigitTextFormField( + formControlName: _nameOfChildKey, + showErrors: (control) => + control.invalid && + control.touched, + // Ensures error is shown if invalid and touched + builder: (field) { + return LabeledField( + isRequired: true, + label: localizations.translate( + i18.referralReconciliation + .nameOfTheChildLabel, + ), + child: DigitTextFormInput( + onChange: (val) => { + form + .control(_nameOfChildKey) + .markAsTouched(), + form + .control(_nameOfChildKey) + .value = val, + }, + errorMessage: field.errorText, + readOnly: viewOnly, + initialValue: form + .control(_nameOfChildKey) + .value, + ), + ); + }), + ReactiveWrapperField( formControlName: _beneficiaryIdKey, - label: localizations.translate( - i18.referralReconciliation - .beneficiaryIdLabel, - ), - readOnly: viewOnly, - ), - DigitTextFormField( + builder: (field) { + return LabeledField( + label: localizations.translate( + i18.referralReconciliation + .beneficiaryIdLabel, + ), + child: DigitTextFormInput( + onChange: (val) => { + form + .control( + _beneficiaryIdKey) + .markAsTouched(), + form + .control( + _beneficiaryIdKey) + .value = val, + }, + initialValue: form + .control(_beneficiaryIdKey) + .value, + readOnly: viewOnly, + ), + ); + }), + ReactiveWrapperField( formControlName: _referralCodeKey, - label: localizations.translate( - i18.referralReconciliation - .referralCodeLabel, - ), - readOnly: viewOnly, - ), - DigitTextFormField( + builder: (field) { + return LabeledField( + label: localizations.translate( + i18.referralReconciliation + .referralCodeLabel, + ), + child: DigitTextFormInput( + onChange: (val) => { + form + .control(_referralCodeKey) + .markAsTouched(), + form + .control(_referralCodeKey) + .value = val, + }, + initialValue: form + .control(_referralCodeKey) + .value, + readOnly: viewOnly, + ), + ); + }), + ReactiveWrapperField( formControlName: _ageKey, - label: localizations.translate( - i18.common.ageInMonths, - ), - readOnly: viewOnly, - keyboardType: TextInputType.number, - inputFormatters: [ - FilteringTextInputFormatter - .digitsOnly, - LengthLimitingTextInputFormatter(4) - ], - isRequired: true, validationMessages: { 'required': (_) => localizations.translate( @@ -874,33 +991,114 @@ class _RecordReferralDetailsPageState .toString(), ), }, - ), - DigitReactiveSearchDropdown( - label: localizations.translate( - i18.common.genderLabelText, - ), - enabled: !viewOnly, - form: form, - isRequired: true, - menuItems: ReferralReconSingleton() - .genderOptions, - validationMessage: - localizations.translate( - i18.common.corecommonRequired, - ), - formControlName: _genderKey, - valueMapper: (value) { - return localizations - .translate(value); + showErrors: (control) => + control.invalid && + control.touched, + // Ensures error is shown if invalid and touched + builder: (field) { + return LabeledField( + isRequired: true, + label: localizations.translate( + i18.common.ageInMonths, + ), + child: DigitTextFormInput( + onChange: (val) => { + form + .control(_ageKey) + .markAsTouched(), + form.control(_ageKey).value = + int.tryParse(val), + }, + keyboardType: + TextInputType.number, + inputFormatters: [ + FilteringTextInputFormatter + .digitsOnly, + LengthLimitingTextInputFormatter( + 4) + ], + readOnly: viewOnly, + initialValue: form + .control(_ageKey) + .value == + null + ? "" + : form + .control(_ageKey) + .value + .toString(), + errorMessage: field.errorText, + ), + ); + }), + ReactiveWrapperField( + validationMessages: { + '': (_) => localizations.translate( + i18.common.corecommonRequired, + ), }, - emptyText: localizations.translate( - i18.common.noMatchFound, - ), - ) - ]), - ], - ), - ), + formControlName: _genderKey, + showErrors: (control) => + control.invalid && + control.touched, + // Ensures error is shown if invalid and touched + builder: (field) { + return LabeledField( + isRequired: true, + label: localizations.translate( + i18.common.genderLabelText, + ), + child: Dropdown( + readOnly: viewOnly, + onSelect: (val) => { + form + .control(_genderKey) + .markAsTouched(), + form + .control(_genderKey) + .value = val.code, + }, + errorMessage: field.errorText, + selectedOption: + ReferralReconSingleton() + .genderOptions + .map((item) => + DropdownItem( + name: localizations + .translate( + item), + code: item + .toString(), + )) + .firstWhere( + (item) => + item.code == + form + .control( + _genderKey) + .value, + orElse: () => + const DropdownItem( + name: '', + code: ''), + ), + items: + ReferralReconSingleton() + .genderOptions + .map( + (item) => + DropdownItem( + name: localizations + .translate( + item), + code: item + .toString(), + ), + ) + .toList(), + )); + }), + ]), StatefulBuilder(builder: (context, set) { form.control(_referralReason).value = recordState.mapOrNull( @@ -914,26 +1112,70 @@ class _RecordReferralDetailsPageState : null, ); return DigitCard( - child: DigitRadioButtonList( - labelStyle: theme.textTheme.displayMedium, - isEnabled: !viewOnly, - formControlName: _referralReason, - valueMapper: (val) => - localizations.translate(val), - options: ReferralReconSingleton() - .referralReasons, - labelText: localizations.translate( - i18.referralReconciliation - .reasonForReferralHeader, - ), - isRequired: true, - errorMessage: localizations.translate( - i18.common.corecommonRequired, - ), - onValueChange: (val) { - form.control(_referralReason).value = val; - }, - )); + cardType: CardType.primary, + children: [ + SizedBox( + width: double.infinity, + child: ReactiveWrapperField( + formControlName: _referralReason, + validationMessages: { + 'required': (_) => + localizations.translate( + i18.common + .corecommonRequired, + ), + }, + showErrors: (control) => + control.invalid && + control.touched, + // Ensures error is shown if invalid and touched + builder: (field) { + return LabeledField( + isRequired: true, + label: + localizations.translate( + i18.referralReconciliation + .reasonForReferralHeader, + ), + child: RadioList( + readOnly: viewOnly, + onChanged: (val) { + form + .control( + _referralReason) + .markAsTouched(); + form + .control( + _referralReason) + .value = val.code; + }, + groupValue: form + .control( + _referralReason) + .value ?? + "", + errorMessage: + field.errorText, + radioDigitButtons: + ReferralReconSingleton() + .referralReasons + .map((r) { + return RadioButtonModel( + code: r + .toString() + .toUpperCase(), + // Use the index as the code + name: localizations + .translate(r + .toString() + .toUpperCase()), + ); + }).toList(), + ), + ); + }), + ), + ]); }), ], ), @@ -973,6 +1215,9 @@ class _RecordReferralDetailsPageState create: (value) => value.viewOnly, ) ?? false, + validators: [ + Validators.required, + ], ), _nameOfChildKey: FormControl( value: referralState.mapOrNull( @@ -1095,9 +1340,9 @@ class _RecordReferralDetailsPageState create: (value) => value.viewOnly, ) ?? false, - // validators: [ - // Validators.required, - // ], + validators: [ + Validators.required, + ], ), }); } diff --git a/packages/referral_reconciliation/lib/pages/project_facility/project_facility_selection.dart b/packages/referral_reconciliation/lib/pages/project_facility/project_facility_selection.dart index ee1f22aa3..83e2bb29e 100644 --- a/packages/referral_reconciliation/lib/pages/project_facility/project_facility_selection.dart +++ b/packages/referral_reconciliation/lib/pages/project_facility/project_facility_selection.dart @@ -1,10 +1,10 @@ import 'package:auto_route/auto_route.dart'; import 'package:collection/collection.dart'; -import 'package:digit_components/digit_components.dart'; import 'package:digit_data_model/data_model.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; import 'package:flutter/material.dart'; import 'package:reactive_forms/reactive_forms.dart'; -import 'package:referral_reconciliation/blocs/app_localization.dart'; import 'package:referral_reconciliation/utils/constants.dart'; import 'package:referral_reconciliation/widgets/localized.dart'; @@ -35,6 +35,7 @@ class _ReferralReconProjectFacilitySelectionPageState @override Widget build(BuildContext context) { final theme = Theme.of(context); + final textTheme = theme.digitTextTheme(context); final BorderSide borderSide = BorderSide( color: theme.colorScheme.outline, width: 1.0, @@ -48,7 +49,7 @@ class _ReferralReconProjectFacilitySelectionPageState body: ReactiveFormConsumer( builder: (context, form, _) { final filteredProjectFacilities = - (widget.projectFacilities ?? []).isNotEmpty + (widget.projectFacilities).isNotEmpty ? widget.projectFacilities.where((element) { final query = form.control(_facilityName).value as String?; @@ -72,33 +73,44 @@ class _ReferralReconProjectFacilitySelectionPageState child: Container( color: Colors.white, child: Padding( - padding: const EdgeInsets.only( - left: kPadding * 2, - right: kPadding * 2, + padding: EdgeInsets.only( + left: theme.spacerTheme.spacer2 * 2, + right: theme.spacerTheme.spacer2 * 2, ), child: Column( children: [ Padding( - padding: const EdgeInsets.all(kPadding), + padding: + EdgeInsets.all(theme.spacerTheme.spacer2), child: Align( alignment: Alignment.topLeft, child: Text( localizations.translate( i18.common.projectFacilitySearchHeaderLabel, ), - style: theme.textTheme.displayMedium, + style: textTheme.headingXl, textAlign: TextAlign.left, ), ), ), - const DigitTextFormField( - suffix: Padding( - padding: EdgeInsets.all(8.0), - child: Icon(Icons.search), - ), - label: '', - formControlName: _facilityName, - ), + ReactiveWrapperField( + formControlName: _facilityName, + builder: (field) { + return LabeledField( + label: '', + child: DigitSearchFormInput( + onChange: (val) => { + form + .control(_facilityName) + .markAsTouched(), + form.control(_facilityName).value = val, + }, + initialValue: + form.control(_facilityName).value ?? + "", + ), + ); + }), ], ), ), @@ -116,7 +128,7 @@ class _ReferralReconProjectFacilitySelectionPageState child: Container( margin: const EdgeInsets.only(left: 8, right: 8), decoration: BoxDecoration( - color: DigitTheme.instance.colors.alabasterWhite, + color: theme.colorTheme.paper.secondary, border: Border( top: index == 0 ? borderSide : BorderSide.none, bottom: (filteredProjectFacilities != null && @@ -134,14 +146,13 @@ class _ReferralReconProjectFacilitySelectionPageState Navigator.of(context).pop(projectFacility); }, child: Container( - margin: const EdgeInsets.only( - top: kPadding, - left: kPadding, - right: kPadding, + margin: EdgeInsets.only( + top: theme.spacerTheme.spacer2, + left: theme.spacerTheme.spacer2, + right: theme.spacerTheme.spacer2, ), decoration: BoxDecoration( - color: - DigitTheme.instance.colors.alabasterWhite, + color: DigitTheme.instance.colors.transparent, border: Border( bottom: BorderSide( // <--- left side @@ -151,10 +162,10 @@ class _ReferralReconProjectFacilitySelectionPageState ), ), child: Padding( - padding: const EdgeInsets.only( - left: kPadding * 2, - bottom: kPadding * 2, - top: kPadding * 2, + padding: EdgeInsets.only( + left: theme.spacerTheme.spacer2 * 2, + bottom: theme.spacerTheme.spacer2 * 2, + top: theme.spacerTheme.spacer2 * 2, ), child: Text(projectFacility != null ? localizations.translate( diff --git a/packages/referral_reconciliation/lib/pages/search_referral_reconciliations.dart b/packages/referral_reconciliation/lib/pages/search_referral_reconciliations.dart index 51b1f0c13..9c86a67c7 100644 --- a/packages/referral_reconciliation/lib/pages/search_referral_reconciliations.dart +++ b/packages/referral_reconciliation/lib/pages/search_referral_reconciliations.dart @@ -1,12 +1,18 @@ import 'package:auto_route/auto_route.dart'; -import 'package:digit_components/digit_components.dart'; import 'package:digit_data_model/data_model.dart'; import 'package:digit_scanner/blocs/scanner.dart'; import 'package:digit_scanner/router/digit_scanner_router.gm.dart'; +import 'package:digit_ui_components/enum/app_enums.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/atoms/digit_button.dart'; +import 'package:digit_ui_components/widgets/atoms/digit_info_card.dart'; +import 'package:digit_ui_components/widgets/atoms/digit_search_bar.dart'; +import 'package:digit_ui_components/widgets/scrollable_content.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_keyboard_visibility/flutter_keyboard_visibility.dart'; import 'package:referral_reconciliation/utils/extensions/extensions.dart'; +import 'package:survey_form/survey_form.dart'; import '../blocs/search_referral_reconciliations.dart'; import '../models/entities/hf_referral.dart'; @@ -51,7 +57,7 @@ class _SearchReferralReconciliationsPageState @override Widget build(BuildContext context) { final theme = Theme.of(context); - + final textTheme = theme.digitTextTheme(context); return KeyboardVisibilityBuilder( builder: (context, isKeyboardVisible) => BlocProvider< SearchReferralsBloc>( @@ -86,11 +92,13 @@ class _SearchReferralReconciliationsPageState slivers: [ SliverToBoxAdapter( child: Padding( - padding: const EdgeInsets.all(kPadding), + padding: + EdgeInsets.all(theme.spacerTheme.spacer2), child: Column( children: [ Padding( - padding: const EdgeInsets.all(kPadding), + padding: EdgeInsets.all( + theme.spacerTheme.spacer2), child: Align( alignment: Alignment.topLeft, child: Text( @@ -98,8 +106,7 @@ class _SearchReferralReconciliationsPageState i18.referralReconciliation .searchReferralsHeader, ), - style: - theme.textTheme.displayMedium, + style: textTheme.headingXl, textAlign: TextAlign.left, ), ), @@ -133,17 +140,20 @@ class _SearchReferralReconciliationsPageState ), ], ), - const SizedBox(height: kPadding * 2), - if (searchState.resultsNotFound) - DigitInfoCard( + SizedBox( + height: + theme.spacerTheme.spacer2 * 2), + if (searchState.resultsNotFound && + searchController.text.isNotEmpty) + InfoCard( + title: localizations.translate(i18 + .referralReconciliation + .beneficiaryInfoTitle), + type: InfoType.info, description: localizations.translate( i18.referralReconciliation .referralInfoDescription, ), - title: localizations.translate( - i18.referralReconciliation - .beneficiaryInfoTitle, - ), ), ], ), @@ -156,8 +166,8 @@ class _SearchReferralReconciliationsPageState searchState.referrals.elementAt(index); return Container( - margin: const EdgeInsets.only( - bottom: kPadding), + margin: EdgeInsets.only( + bottom: theme.spacerTheme.spacer2), child: ViewReferralCard( hfReferralModel: i, onOpenPressed: () { @@ -192,84 +202,78 @@ class _SearchReferralReconciliationsPageState ); }, ))), - bottomNavigationBar: SizedBox( - height: 150, - child: Card( - margin: const EdgeInsets.all(0), - // padding: const EdgeInsets.fromLTRB(kPadding, 0, kPadding, 0), - child: Container( - padding: - const EdgeInsets.fromLTRB(kPadding, 0, kPadding, 0), - child: Column( - children: [ - BlocBuilder( - builder: (context, state) { - final router = context.router; - - VoidCallback? onPressed; + bottomNavigationBar: Card( + margin: const EdgeInsets.all(0), + child: Container( + padding: EdgeInsets.all(theme.spacerTheme.spacer2), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + BlocBuilder( + builder: (context, state) { + final router = context.router; - onPressed = state.loading || - state.searchQuery == null || - (state.searchQuery ?? '').length < 2 - ? null - : () { - FocusManager.instance.primaryFocus - ?.unfocus(); - final bloc = - context.read(); - router.push( - HFCreateReferralWrapperRoute( - viewOnly: false, - referralReconciliation: HFReferralModel( - clientReferenceId: IdGen.i.identifier, - name: state.searchQuery, - beneficiaryId: state.tag, - ), - projectId: - ReferralReconSingleton().projectId, - cycles: ReferralReconSingleton().cycles, - ), - ); - searchController.clear(); - bloc.add( - const SearchReferralsClearEvent(), - ); - }; + VoidCallback? onPressed; - return DigitElevatedButton( - onPressed: onPressed, - child: Center( - child: Text(localizations.translate( - i18.referralReconciliation - .createReferralLabel, - )), + onPressed = () { + FocusManager.instance.primaryFocus?.unfocus(); + final bloc = context.read(); + router.push( + HFCreateReferralWrapperRoute( + viewOnly: false, + referralReconciliation: HFReferralModel( + clientReferenceId: IdGen.i.identifier, + name: state.searchQuery, + beneficiaryId: state.tag, + ), + projectId: ReferralReconSingleton().projectId, + cycles: ReferralReconSingleton().cycles, ), ); - }, - ), - DigitOutlineIconButton( - buttonStyle: OutlinedButton.styleFrom( - shape: const RoundedRectangleBorder( - borderRadius: BorderRadius.zero, + searchController.clear(); + bloc.add( + const SearchReferralsClearEvent(), + ); + }; + return DigitButton( + size: DigitButtonSize.large, + label: localizations.translate( + i18.referralReconciliation.createReferralLabel, ), - ), - onPressed: () async { - context.read().add( - const DigitScannerEvent.handleScanner(), - ); - context.router.push(DigitScannerRoute( - quantity: 1, - isGS1code: false, - singleValue: true, - )); - }, - icon: Icons.qr_code, - label: localizations.translate( - i18.referralReconciliation.scannerLabel, - ), - ), - ], - ), + mainAxisSize: MainAxisSize.max, + isDisabled: !(searchController.text.isNotEmpty && + searchController.text.length >= 2), + onPressed: () { + if (onPressed != null) { + onPressed(); + } + }, + type: DigitButtonType.primary, + ); + }, + ), + SizedBox( + height: theme.spacerTheme.spacer2, + ), + DigitButton( + size: DigitButtonSize.large, + label: localizations + .translate(i18.referralReconciliation.scannerLabel), + onPressed: () async { + context.read().add( + const DigitScannerEvent.handleScanner(), + ); + context.router.push(DigitScannerRoute( + quantity: 1, + isGS1code: false, + singleValue: true, + )); + }, + type: DigitButtonType.secondary, + prefixIcon: Icons.qr_code, + mainAxisSize: MainAxisSize.max, + ), + ], ), ), ), diff --git a/packages/referral_reconciliation/lib/router/referral_reconciliation_router.dart b/packages/referral_reconciliation/lib/router/referral_reconciliation_router.dart index 161831916..e382a5ca0 100644 --- a/packages/referral_reconciliation/lib/router/referral_reconciliation_router.dart +++ b/packages/referral_reconciliation/lib/router/referral_reconciliation_router.dart @@ -4,10 +4,8 @@ import 'referral_reconciliation_router.gm.dart'; @AutoRouterConfig.module() class ReferralReconciliationRoute extends $ReferralReconciliationRoute { - @override RouteType get defaultRouteType => const RouteType.material(); - @override List routes = [ AutoRoute( page: SearchReferralReconciliationsRoute.page, diff --git a/packages/referral_reconciliation/lib/utils/date_utils.dart b/packages/referral_reconciliation/lib/utils/date_utils.dart new file mode 100644 index 000000000..6062af222 --- /dev/null +++ b/packages/referral_reconciliation/lib/utils/date_utils.dart @@ -0,0 +1,34 @@ +import 'package:intl/intl.dart'; +import 'package:flutter/foundation.dart'; + +class DigitDateUtils { + static String getDateString(DateTime date) { + final DateFormat formatter = DateFormat('yyyy-MM-dd'); + return formatter.format(date); + } + + // Function to parse the provided date string and return a DateTime object. + static DateTime? getFormattedDateToDateTime(String date) { + try { + DateFormat inputFormat; + inputFormat = date.contains('-') + ? DateFormat('dd-MM-yyyy') + : DateFormat('dd/MM/yyyy'); + DateTime inputDate = inputFormat.parse(date); + + return inputDate; + } on Exception catch (e) { + if (kDebugMode) { + print(e); + } + + return null; + } + } + + // Function to get a formatted date string from the provided timestamp in milliseconds. + static String getDateFromTimestamp(int timestamp, {String? dateFormat}) { + DateTime date = DateTime.fromMillisecondsSinceEpoch(timestamp); + return DateFormat(dateFormat ?? "dd/MM/yyyy").format(date); + } +} diff --git a/packages/referral_reconciliation/lib/utils/i18_key_constants.dart b/packages/referral_reconciliation/lib/utils/i18_key_constants.dart index bdb903ae3..822c08dfe 100644 --- a/packages/referral_reconciliation/lib/utils/i18_key_constants.dart +++ b/packages/referral_reconciliation/lib/utils/i18_key_constants.dart @@ -191,4 +191,5 @@ class ReferralReconciliation { String get beneficiaryInfoTitle => 'BENEFICIARY_INFO_TITLE'; String get scannerLabel => 'SCANNER_LABEL'; String get noFacilitiesAssigned => 'NO_FACILITIES_ASSIGNED'; + String get facilityIsMandatory => 'FACILITY_IS_MANDATORY'; } diff --git a/packages/referral_reconciliation/lib/utils/typedefs.dart b/packages/referral_reconciliation/lib/utils/typedefs.dart index 00ce8a627..638b1a60b 100644 --- a/packages/referral_reconciliation/lib/utils/typedefs.dart +++ b/packages/referral_reconciliation/lib/utils/typedefs.dart @@ -1,5 +1,6 @@ import 'package:digit_data_model/data_model.dart'; import 'package:referral_reconciliation/models/entities/hf_referral.dart'; +import 'package:survey_form/survey_form.dart'; typedef HFReferralDataRepository = DataRepository; diff --git a/packages/referral_reconciliation/lib/widgets/back_navigation_help_header.dart b/packages/referral_reconciliation/lib/widgets/back_navigation_help_header.dart index e5ee13230..87a0d7635 100644 --- a/packages/referral_reconciliation/lib/widgets/back_navigation_help_header.dart +++ b/packages/referral_reconciliation/lib/widgets/back_navigation_help_header.dart @@ -1,5 +1,5 @@ import 'package:auto_route/auto_route.dart'; -import 'package:digit_components/theme/digit_theme.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; import 'package:flutter/material.dart'; import '../../utils/i18_key_constants.dart' as i18; @@ -24,9 +24,10 @@ class BackNavigationHelpHeaderWidget extends StatelessWidget { @override Widget build(BuildContext context) { final theme = Theme.of(context); + final textTheme = theme.digitTextTheme(context); return Padding( - padding: const EdgeInsets.all(kPadding/2), + padding: EdgeInsets.all(theme.spacerTheme.spacer2 / 2), child: Row( children: [ Expanded( @@ -36,7 +37,7 @@ class BackNavigationHelpHeaderWidget extends StatelessWidget { Flexible( child: TextButton.icon( style: TextButton.styleFrom( - foregroundColor: theme.colorScheme.onBackground, + foregroundColor: theme.colorTheme.primary.primary2, padding: EdgeInsets.zero, ), onPressed: () { @@ -55,7 +56,7 @@ class BackNavigationHelpHeaderWidget extends StatelessWidget { ], ), ), - SizedBox(width: showHelp ? kPadding *2 : 0), + SizedBox(width: showHelp ? theme.spacerTheme.spacer2 * 2 : 0), if (showHelp) TextButton( style: TextButton.styleFrom(padding: EdgeInsets.zero), diff --git a/packages/referral_reconciliation/lib/widgets/beneficiary_card.dart b/packages/referral_reconciliation/lib/widgets/beneficiary_card.dart index af213d6b4..d55249f8c 100644 --- a/packages/referral_reconciliation/lib/widgets/beneficiary_card.dart +++ b/packages/referral_reconciliation/lib/widgets/beneficiary_card.dart @@ -1,4 +1,4 @@ -import 'package:digit_components/digit_components.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; import 'package:flutter/material.dart'; import 'package:referral_reconciliation/models/entities/referral_recon_enums.dart'; @@ -23,48 +23,71 @@ class ReferralBeneficiaryCard extends StatelessWidget { @override Widget build(BuildContext context) { final theme = Theme.of(context); + final textTheme = theme.digitTextTheme(context); return Column( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( - padding: const EdgeInsets.all(kPadding / 2), + padding: EdgeInsets.all(theme.spacerTheme.spacer2 / 2), child: Text( title, - style: theme.textTheme.headlineSmall, + style: textTheme.headingS, ), ), Offstage( offstage: status == null, child: status == ReferralReconEnums.visited.toValue() - ? DigitIconButton( - icon: Icons.check_circle, - iconText: ReferralReconLocalization.of(context) - .translate(status.toString()), - iconTextColor: theme.colorScheme.onSurfaceVariant, - iconColor: theme.colorScheme.onSurfaceVariant, + ? Row( + children: [ + Icon( + Icons.check_circle, + color: theme.colorTheme.alert.success, + ), + SizedBox( + width: theme.spacerTheme.spacer1, + ), + Text( + ReferralReconLocalization.of(context) + .translate(status.toString()), + style: TextStyle( + color: Colors.green, + fontSize: theme.spacerTheme.spacer4), + ) + ], ) - : DigitIconButton( - icon: Icons.info_rounded, - iconText: ReferralReconLocalization.of(context) - .translate(status.toString()), - iconTextColor: theme.colorScheme.error, - iconColor: theme.colorScheme.error, + : Row( + children: [ + Icon( + Icons.info_rounded, + color: theme.colorTheme.alert.error, + ), + SizedBox( + width: theme.spacerTheme.spacer1, + ), + Text( + ReferralReconLocalization.of(context) + .translate(status.toString()), + style: TextStyle( + color: Colors.red, + fontSize: theme.spacerTheme.spacer4), + ) + ], ), ), Padding( - padding: const EdgeInsets.all(kPadding / 2), + padding: EdgeInsets.all(theme.spacerTheme.spacer2 / 2), child: Text( subtitle, - style: theme.textTheme.bodyMedium, + style: textTheme.bodyS, ), ), Padding( - padding: const EdgeInsets.all(kPadding / 2), + padding: EdgeInsets.all(theme.spacerTheme.spacer2 / 2), child: Text( description, - style: theme.textTheme.bodySmall, + style: textTheme.bodyS, ), ), ], diff --git a/packages/referral_reconciliation/lib/widgets/view_referral_card.dart b/packages/referral_reconciliation/lib/widgets/view_referral_card.dart index 8edbb33a7..8efc9af34 100644 --- a/packages/referral_reconciliation/lib/widgets/view_referral_card.dart +++ b/packages/referral_reconciliation/lib/widgets/view_referral_card.dart @@ -1,11 +1,13 @@ -import 'package:digit_components/digit_components.dart'; -import 'package:digit_components/utils/date_utils.dart'; +import 'package:digit_ui_components/enum/app_enums.dart'; +import 'package:digit_ui_components/widgets/atoms/digit_button.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; import 'package:flutter/material.dart'; import 'package:referral_reconciliation/models/entities/hf_referral.dart'; import '../../utils/i18_key_constants.dart' as i18; import '../models/entities/referral_recon_enums.dart'; import '../utils/constants.dart'; +import '../utils/date_utils.dart'; import 'beneficiary_card.dart'; import 'localized.dart'; @@ -55,39 +57,31 @@ class _ViewReferralCardState extends LocalizedState { .value .toString() ?? ''); - - return DigitCard( - child: Column( + return DigitCard(children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - SizedBox( - width: MediaQuery.of(context).size.width / 1.8, - child: ReferralBeneficiaryCard( - description: '', - subtitle: - '${localizations.translate(i18.referralReconciliation.dateOfEvaluationLabel)}: ${dateOfEvaluation != null ? DigitDateUtils.getDateFromTimestamp(dateOfEvaluation, dateFormat: defaultDateFormat) : localizations.translate(i18.common.coreCommonNA)}', - title: hfReferralModel.name.toString(), - ), - ), - Flexible( - child: DigitOutLineButton( - buttonStyle: OutlinedButton.styleFrom( - shape: const RoundedRectangleBorder( - borderRadius: BorderRadius.zero, - ), - ), - label: localizations - .translate(i18.referralReconciliation.iconLabel), - onPressed: widget.onOpenPressed, - ), - ), - ], + SizedBox( + width: MediaQuery.of(context).size.width / 1.8, + child: ReferralBeneficiaryCard( + description: '', + subtitle: + '${localizations.translate(i18.referralReconciliation.dateOfEvaluationLabel)}: ${dateOfEvaluation != null ? DigitDateUtils.getDateFromTimestamp(dateOfEvaluation, dateFormat: defaultDateFormat) : localizations.translate(i18.common.coreCommonNA)}', + title: hfReferralModel.name.toString(), + ), + ), + Flexible( + child: DigitButton( + size: DigitButtonSize.large, + type: DigitButtonType.secondary, + label: + localizations.translate(i18.referralReconciliation.iconLabel), + onPressed: widget.onOpenPressed ?? () {}, + ), ), ], ), - ); + ]); } } diff --git a/packages/referral_reconciliation/pubspec.lock b/packages/referral_reconciliation/pubspec.lock index 8a79c12b0..ed63fd65a 100644 --- a/packages/referral_reconciliation/pubspec.lock +++ b/packages/referral_reconciliation/pubspec.lock @@ -117,18 +117,18 @@ packages: dependency: "direct main" description: name: auto_route - sha256: eb33554581a0a4aa7e6da0f13a44291a55bf71359012f1d9feb41634ff908ff8 + sha256: a9001a90539ca3effc168f7e1029a5885c7326b9032c09ac895e303c1d137704 url: "https://pub.dev" source: hosted - version: "7.9.2" + version: "8.3.0" auto_route_generator: dependency: "direct dev" description: name: auto_route_generator - sha256: "11067a3bcd643812518fe26c0c9ec073990286cabfd9d74b6da9ef9b913c4d22" + sha256: ba28133d3a3bf0a66772bcc98dade5843753cd9f1a8fb4802b842895515b67d3 url: "https://pub.dev" source: hosted - version: "7.3.2" + version: "8.0.0" bloc: dependency: transitive description: @@ -189,10 +189,10 @@ packages: dependency: "direct dev" description: name: build_runner - sha256: "3ac61a79bfb6f6cc11f693591063a7f19a7af628dc52f141743edac5c16e8c22" + sha256: "644dc98a0f179b872f612d3eb627924b578897c629788e858157fa5e704ca0c7" url: "https://pub.dev" source: hosted - version: "2.4.9" + version: "2.4.11" build_runner_core: dependency: transitive description: @@ -221,26 +221,26 @@ packages: dependency: transitive description: name: camera - sha256: "9499cbc2e51d8eb0beadc158b288380037618ce4e30c9acbc4fae1ac3ecb5797" + sha256: "26ff41045772153f222ffffecba711a206f670f5834d40ebf5eed3811692f167" url: "https://pub.dev" source: hosted - version: "0.10.5+9" - camera_android: + version: "0.11.0+2" + camera_android_camerax: dependency: transitive description: - name: camera_android - sha256: b350ac087f111467e705b2b76cc1322f7f5bdc122aa83b4b243b0872f390d229 + name: camera_android_camerax + sha256: "011be2ab0e5b3e3aa8094413fa890f8c5c5afd7cfdaef353a992047d4dab5780" url: "https://pub.dev" source: hosted - version: "0.10.9+2" + version: "0.6.8+2" camera_avfoundation: dependency: transitive description: name: camera_avfoundation - sha256: "608b56b0880722f703871329c4d7d4c2f379c8e2936940851df7fc041abc6f51" + sha256: "2e4c568f70e406ccb87376bc06b53d2f5bebaab71e2fbcc1a950e31449381bcf" url: "https://pub.dev" source: hosted - version: "0.9.13+10" + version: "0.9.17+5" camera_platform_interface: dependency: transitive description: @@ -333,10 +333,10 @@ packages: dependency: transitive description: name: cross_file - sha256: fedaadfa3a6996f75211d835aaeb8fede285dae94262485698afd832371b9a5e + sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670" url: "https://pub.dev" source: hosted - version: "0.3.3+8" + version: "0.3.4+2" crypto: dependency: transitive description: @@ -361,22 +361,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.8" - dart_code_metrics: - dependency: "direct dev" - description: - name: dart_code_metrics - sha256: "3dede3f7abc077a4181ec7445448a289a9ce08e2981e6a4d49a3fb5099d47e1f" - url: "https://pub.dev" - source: hosted - version: "5.7.6" - dart_code_metrics_presets: - dependency: transitive - description: - name: dart_code_metrics_presets - sha256: b71eadf02a3787ebd5c887623f83f6fdc204d45c75a081bd636c4104b3fd8b73 - url: "https://pub.dev" - source: hosted - version: "1.8.0" dart_mappable: dependency: "direct main" description: @@ -389,11 +373,11 @@ packages: dependency: "direct dev" description: path: "packages/dart_mappable_builder" - ref: master - resolved-ref: "9b887d24c05459c027a92391869d4c10b440e00f" + ref: "1.6-final-dev" + resolved-ref: "1e7467577a9701d396f7e23afbf00065e54c5469" url: "https://github.com/egovernments/health-campaign-field-worker-app/" source: git - version: "4.2.0" + version: "4.2.3" dart_style: dependency: transitive description: @@ -402,14 +386,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.3.2" - db_viewer: - dependency: transitive - description: - name: db_viewer - sha256: "5f7e3cfcde9663321797d8f6f0c876f7c13f0825a2e77ec1ef065656797144d9" - url: "https://pub.dev" - source: hosted - version: "1.1.0" diff_match_patch: dependency: transitive description: @@ -418,70 +394,62 @@ packages: url: "https://pub.dev" source: hosted version: "0.4.1" - digit_components: - dependency: "direct main" - description: - name: digit_components - sha256: "07b585e5d8010639366da72a4a8b215ce9b8790c75b2162b66af3cea57ca35d9" - url: "https://pub.dev" - source: hosted - version: "1.0.2+1" digit_data_model: dependency: "direct main" description: name: digit_data_model - sha256: "560b806cbb9f760ed956ecf2d01a8e5ea5640d8fca9ec1332ee15b34998d2e15" + sha256: c3bc7299a7d927ebb83d8e91c1d7a8a51f6a1d1295dafeacb642012b72b99a2f url: "https://pub.dev" source: hosted - version: "1.0.3+3" + version: "1.0.5" digit_scanner: dependency: "direct main" description: name: digit_scanner - sha256: "9862c4885465bb1942e36dc9b42596c201648db9b0f5ffb8ad768e2409fc2742" + sha256: c33af61ed9ab3d7740fc3c8948af4b763d946cba5e902f8bfb00948d4d69d60a + url: "https://pub.dev" + source: hosted + version: "1.0.4" + digit_ui_components: + dependency: "direct main" + description: + name: digit_ui_components + sha256: "57c4da5237be6025783e7357a02b6b492f02e38f711d674bf46f5f8c8a93ad76" url: "https://pub.dev" source: hosted - version: "1.0.3+1" + version: "0.0.2-dev.4" dio: - dependency: transitive + dependency: "direct main" description: name: dio sha256: "11e40df547d418cc0c4900a9318b26304e665da6fa4755399a9ff9efd09034b5" url: "https://pub.dev" source: hosted version: "5.4.3+1" - drift: - dependency: "direct main" + dotted_border: + dependency: transitive description: - name: drift - sha256: b50a8342c6ddf05be53bda1d246404cbad101b64dc73e8d6d1ac1090d119b4e2 + name: dotted_border + sha256: "108837e11848ca776c53b30bc870086f84b62ed6e01c503ed976e8f8c7df9c04" url: "https://pub.dev" source: hosted - version: "2.15.0" - drift_db_viewer: + version: "2.1.0" + drift: dependency: "direct main" description: - name: drift_db_viewer - sha256: "5ea77858c52b55460a1e8f34ab5f88324621d486717d876fd745765fbc227f3f" + name: drift + sha256: "6acedc562ffeed308049f78fb1906abad3d65714580b6745441ee6d50ec564cd" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.18.0" drift_dev: dependency: "direct dev" description: name: drift_dev - sha256: c037d9431b6f8dc633652b1469e5f53aaec6e4eb405ed29dd232fa888ef10d88 - url: "https://pub.dev" - source: hosted - version: "2.15.0" - easy_stepper: - dependency: transitive - description: - name: easy_stepper - sha256: "77f3ab4ee3c867b5a2236bf712abb08fed2b1c533cf24cf3fcd46c2821072ffd" + sha256: d9b020736ea85fff1568699ce18b89fabb3f0f042e8a7a05e84a3ec20d39acde url: "https://pub.dev" source: hosted - version: "0.5.2+1" + version: "2.18.0" fake_async: dependency: transitive description: @@ -506,6 +474,46 @@ packages: url: "https://pub.dev" source: hosted version: "6.1.4" + file_picker: + dependency: transitive + description: + name: file_picker + sha256: d1d0ac3966b36dc3e66eeefb40280c17feb87fa2099c6e22e6a1fc959327bd03 + url: "https://pub.dev" + source: hosted + version: "8.0.0+1" + file_selector_linux: + dependency: transitive + description: + name: file_selector_linux + sha256: "045d372bf19b02aeb69cacf8b4009555fb5f6f0b7ad8016e5f46dd1387ddd492" + url: "https://pub.dev" + source: hosted + version: "0.9.2+1" + file_selector_macos: + dependency: transitive + description: + name: file_selector_macos + sha256: f42eacb83b318e183b1ae24eead1373ab1334084404c8c16e0354f9a3e55d385 + url: "https://pub.dev" + source: hosted + version: "0.9.4" + file_selector_platform_interface: + dependency: transitive + description: + name: file_selector_platform_interface + sha256: a3994c26f10378a039faa11de174d7b78eb8f79e4dd0af2a451410c1a5c3f66b + url: "https://pub.dev" + source: hosted + version: "2.6.2" + file_selector_windows: + dependency: transitive + description: + name: file_selector_windows + sha256: "2ad726953f6e8affbc4df8dc78b77c3b4a060967a291e528ef72ae846c60fb69" + url: "https://pub.dev" + source: hosted + version: "0.9.3+2" fixnum: dependency: transitive description: @@ -527,14 +535,30 @@ packages: url: "https://pub.dev" source: hosted version: "8.1.5" - flutter_focus_watcher: + flutter_dropzone: dependency: transitive description: - name: flutter_focus_watcher - sha256: a72ee539ae0237961308a25839887ca93a0b1cb6f87b0d492b139c8fccff8e79 + name: flutter_dropzone + sha256: b399c60411f9bf9c4c2f97933c6a3a185859e75aade8897831e76cee4346c8e1 url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "3.0.7" + flutter_dropzone_platform_interface: + dependency: transitive + description: + name: flutter_dropzone_platform_interface + sha256: "96d2c51c86063ba150551c3b40fd26c5a18785bee071c0c751502d28a545df3b" + url: "https://pub.dev" + source: hosted + version: "2.2.0" + flutter_dropzone_web: + dependency: transitive + description: + name: flutter_dropzone_web + sha256: c5a0fdb63b7216352a01761ec1b6eba1982e49541e60675735e2d3d95e207b19 + url: "https://pub.dev" + source: hosted + version: "3.0.13" flutter_keyboard_visibility: dependency: "direct main" description: @@ -587,10 +611,15 @@ packages: dependency: "direct dev" description: name: flutter_lints - sha256: "9e8c3858111da373efc5aa341de011d9bd23e2c5c5e0c62bccf32438e192d7b1" + sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c" url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "4.0.0" + flutter_localizations: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" flutter_plugin_android_lifecycle: dependency: transitive description: @@ -607,27 +636,27 @@ packages: url: "https://pub.dev" source: hosted version: "5.2.1" + flutter_styled_toast: + dependency: transitive + description: + name: flutter_styled_toast + sha256: e667f13a665820eb0fa8506547e47eacbcddf1948d6d3036cfd3b089bd4b0516 + url: "https://pub.dev" + source: hosted + version: "2.2.1" flutter_svg: dependency: "direct main" description: name: flutter_svg - sha256: d39e7f95621fc84376bc0f7d504f05c3a41488c562f4a8ad410569127507402c + sha256: "7b4ca6cf3304575fe9c8ec64813c8d02ee41d2afe60bcfe0678bcb5375d596a2" url: "https://pub.dev" source: hosted - version: "2.0.9" + version: "2.0.10+1" flutter_test: dependency: "direct dev" description: flutter source: sdk version: "0.0.0" - flutter_typeahead: - dependency: transitive - description: - name: flutter_typeahead - sha256: b9942bd5b7611a6ec3f0730c477146cffa4cd4b051077983ba67ddfc9e7ee818 - url: "https://pub.dev" - source: hosted - version: "4.8.0" flutter_web_plugins: dependency: transitive description: flutter @@ -637,10 +666,10 @@ packages: dependency: "direct main" description: name: fluttertoast - sha256: "81b68579e23fcbcada2db3d50302813d2371664afe6165bc78148050ab94bf66" + sha256: "95f349437aeebe524ef7d6c9bde3e6b4772717cf46a0eb6a3ceaddc740b297cc" url: "https://pub.dev" source: hosted - version: "8.2.5" + version: "8.2.8" freezed: dependency: "direct dev" description: @@ -665,6 +694,54 @@ packages: url: "https://pub.dev" source: hosted version: "3.2.0" + geolocator: + dependency: transitive + description: + name: geolocator + sha256: f4efb8d3c4cdcad2e226af9661eb1a0dd38c71a9494b22526f9da80ab79520e5 + url: "https://pub.dev" + source: hosted + version: "10.1.1" + geolocator_android: + dependency: transitive + description: + name: geolocator_android + sha256: "7aefc530db47d90d0580b552df3242440a10fe60814496a979aa67aa98b1fd47" + url: "https://pub.dev" + source: hosted + version: "4.6.1" + geolocator_apple: + dependency: transitive + description: + name: geolocator_apple + sha256: bc2aca02423ad429cb0556121f56e60360a2b7d694c8570301d06ea0c00732fd + url: "https://pub.dev" + source: hosted + version: "2.3.7" + geolocator_platform_interface: + dependency: transitive + description: + name: geolocator_platform_interface + sha256: "386ce3d9cce47838355000070b1d0b13efb5bc430f8ecda7e9238c8409ace012" + url: "https://pub.dev" + source: hosted + version: "4.2.4" + geolocator_web: + dependency: transitive + description: + name: geolocator_web + sha256: "102e7da05b48ca6bf0a5bda0010f886b171d1a08059f01bfe02addd0175ebece" + url: "https://pub.dev" + source: hosted + version: "2.2.1" + geolocator_windows: + dependency: transitive + description: + name: geolocator_windows + sha256: "53da08937d07c24b0d9952eb57a3b474e29aae2abf9dd717f7e1230995f13f0e" + url: "https://pub.dev" + source: hosted + version: "0.2.3" glob: dependency: transitive description: @@ -677,26 +754,26 @@ packages: dependency: transitive description: name: google_fonts - sha256: "6b6f10f0ce3c42f6552d1c70d2c28d764cf22bb487f50f66cca31dcd5194f4d6" + sha256: b1ac0fe2832c9cc95e5e88b57d627c5e68c223b9657f4b96e1487aa9098c7b82 url: "https://pub.dev" source: hosted - version: "4.0.4" + version: "6.2.1" google_mlkit_barcode_scanning: dependency: transitive description: name: google_mlkit_barcode_scanning - sha256: "965183a8cd5cef8477ceea5dbdf29c34a739cf0cfbf1bdad54cd3f9f1807afe5" + sha256: f1a2a39cf1730b9a5e2784a07efa1ca5bfdfdde6aa00b193b3f8cd1953c638ec url: "https://pub.dev" source: hosted - version: "0.10.0" + version: "0.12.0" google_mlkit_commons: dependency: transitive description: name: google_mlkit_commons - sha256: "046586b381cdd139f7f6a05ad6998f7e339d061bd70158249907358394b5f496" + sha256: "27d626c66a181351a953eba5b6ff1ff123aadb891b4dab085b292118f039d6ac" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.1" graphs: dependency: transitive description: @@ -741,10 +818,10 @@ packages: dependency: transitive description: name: http - sha256: "5895291c13fa8a3bd82e76d5627f69e0d85ca6a30dcac95c4ea19a5d555879c2" + sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 url: "https://pub.dev" source: hosted - version: "0.13.6" + version: "1.2.2" http_multi_server: dependency: transitive description: @@ -761,14 +838,78 @@ packages: url: "https://pub.dev" source: hosted version: "4.0.2" + image_picker: + dependency: transitive + description: + name: image_picker + sha256: "1f498d086203360cca099d20ffea2963f48c39ce91bdd8a3b6d4a045786b02c8" + url: "https://pub.dev" + source: hosted + version: "1.0.8" + image_picker_android: + dependency: transitive + description: + name: image_picker_android + sha256: "844c6da4e4f2829dffdab97816bca09d0e0977e8dcef7450864aba4e07967a58" + url: "https://pub.dev" + source: hosted + version: "0.8.9+6" + image_picker_for_web: + dependency: transitive + description: + name: image_picker_for_web + sha256: e2423c53a68b579a7c37a1eda967b8ae536c3d98518e5db95ca1fe5719a730a3 + url: "https://pub.dev" + source: hosted + version: "3.0.2" + image_picker_ios: + dependency: transitive + description: + name: image_picker_ios + sha256: fadafce49e8569257a0cad56d24438a6fa1f0cbd7ee0af9b631f7492818a4ca3 + url: "https://pub.dev" + source: hosted + version: "0.8.9+1" + image_picker_linux: + dependency: transitive + description: + name: image_picker_linux + sha256: "4ed1d9bb36f7cd60aa6e6cd479779cc56a4cb4e4de8f49d487b1aaad831300fa" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + image_picker_macos: + dependency: transitive + description: + name: image_picker_macos + sha256: "3f5ad1e8112a9a6111c46d0b57a7be2286a9a07fc6e1976fdf5be2bd31d4ff62" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + image_picker_platform_interface: + dependency: transitive + description: + name: image_picker_platform_interface + sha256: fa4e815e6fcada50e35718727d83ba1c92f1edf95c0b4436554cec301b56233b + url: "https://pub.dev" + source: hosted + version: "2.9.3" + image_picker_windows: + dependency: transitive + description: + name: image_picker_windows + sha256: "6ad07afc4eb1bc25f3a01084d28520496c4a3bb0cb13685435838167c9dcedeb" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" intl: dependency: "direct main" description: name: intl - sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" + sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf url: "https://pub.dev" source: hosted - version: "0.18.1" + version: "0.19.0" io: dependency: transitive description: @@ -817,38 +958,62 @@ packages: url: "https://pub.dev" source: hosted version: "6.8.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + url: "https://pub.dev" + source: hosted + version: "10.0.4" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + url: "https://pub.dev" + source: hosted + version: "3.0.3" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" lints: dependency: transitive description: name: lints - sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290 + sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235" url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "4.0.0" location: - dependency: transitive + dependency: "direct main" description: name: location - sha256: "06be54f682c9073cbfec3899eb9bc8ed90faa0e17735c9d9fa7fe426f5be1dd1" + sha256: "37ffdadcd4b1498b769824f45ebb4de8ed46663a4a67ac27b33a590ee486579f" url: "https://pub.dev" source: hosted - version: "5.0.3" + version: "6.0.2" location_platform_interface: dependency: transitive description: name: location_platform_interface - sha256: "8aa1d34eeecc979d7c9fe372931d84f6d2ebbd52226a54fe1620de6fdc0753b1" + sha256: "2ecde6bb0f88032b0bbbde37e18975b4468711dd92619c2235cc0c0ee93b4b8e" url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "4.0.0" location_web: dependency: transitive description: name: location_web - sha256: ec484c66e8a4ff1ee5d044c203f4b6b71e3a0556a97b739a5bc9616de672412b + sha256: "49dda13d415c4603c5775a33fb22f575e0aa3f0ec2916644ddcd722db31ee884" url: "https://pub.dev" source: hosted - version: "4.2.0" + version: "5.0.2" logging: dependency: transitive description: @@ -861,34 +1026,34 @@ packages: dependency: transitive description: name: lottie - sha256: a93542cc2d60a7057255405f62252533f8e8956e7e06754955669fd32fb4b216 + sha256: "7afc60865a2429d994144f7d66ced2ae4305fe35d82890b8766e3359872d872c" url: "https://pub.dev" source: hosted - version: "2.7.0" + version: "3.1.3" matcher: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.12.0" mime: dependency: transitive description: @@ -937,30 +1102,22 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.0" - package_info_plus: - dependency: transitive + path: + dependency: "direct main" description: - name: package_info_plus - sha256: "88bc797f44a94814f2213db1c9bd5badebafdfb8290ca9f78d4b9ee2a3db4d79" + name: path + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "5.0.1" - package_info_plus_platform_interface: + version: "1.9.0" + path_drawing: dependency: transitive description: - name: package_info_plus_platform_interface - sha256: "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6" - url: "https://pub.dev" - source: hosted - version: "2.0.1" - path: - dependency: "direct main" - description: - name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + name: path_drawing + sha256: bbb1934c0cbb03091af082a6389ca2080345291ef07a5fa6d6e078ba8682f977 url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.0.1" path_parsing: dependency: transitive description: @@ -1045,18 +1202,10 @@ packages: dependency: "direct main" description: name: pluto_grid - sha256: e77c34a33dd9d74abbe20ba1df96474dded150dd042c7f7495be1bc2c26bd37f + sha256: "1d4cd9d2652742b556aa9b3230cc64672a3f63c34a9acc80fef794ab36ad903b" url: "https://pub.dev" source: hosted - version: "7.0.2" - pointer_interceptor: - dependency: transitive - description: - name: pointer_interceptor - sha256: adf7a637f97c077041d36801b43be08559fd4322d2127b3f20bb7be1b9eebc22 - url: "https://pub.dev" - source: hosted - version: "0.9.3+7" + version: "8.0.0" pool: dependency: transitive description: @@ -1065,14 +1214,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.5.1" - process: - dependency: transitive - description: - name: process - sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09" - url: "https://pub.dev" - source: hosted - version: "4.2.4" provider: dependency: transitive description: @@ -1089,14 +1230,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" - pub_updater: - dependency: transitive - description: - name: pub_updater - sha256: "05ae70703e06f7fdeb05f7f02dd680b8aad810e87c756a618f33e1794635115c" - url: "https://pub.dev" - source: hosted - version: "0.3.0" pubspec_parse: dependency: transitive description: @@ -1105,22 +1238,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.3" - reactive_flutter_typeahead: - dependency: transitive - description: - name: reactive_flutter_typeahead - sha256: ef91627df8cef70e603e8a6458749d8a99a385b78854332602fd08ad905cdab8 - url: "https://pub.dev" - source: hosted - version: "0.8.1" reactive_forms: dependency: "direct main" description: name: reactive_forms - sha256: "5aa9c48a0626c20d00a005e597cb10efbdebbfeecb9c4227b03a5945fbb91ec4" + sha256: "9b1fb18e0aae9c50cfa0aaabaaa38bc4d78eefc9b7b95fa9c947b051f6524b8e" url: "https://pub.dev" source: hosted - version: "14.3.0" + version: "17.0.1" recase: dependency: "direct main" description: @@ -1129,14 +1254,6 @@ packages: url: "https://pub.dev" source: hosted version: "4.1.0" - remove_emoji_input_formatter: - dependency: transitive - description: - name: remove_emoji_input_formatter - sha256: "82d195984f890de7a8fea936c698848e78c1a67ccefe18db3baf9f7a3bc0177f" - url: "https://pub.dev" - source: hosted - version: "0.0.1+1" rxdart: dependency: transitive description: @@ -1222,6 +1339,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.10.0" + sprintf: + dependency: transitive + description: + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" + url: "https://pub.dev" + source: hosted + version: "7.0.0" sqlite3: dependency: transitive description: @@ -1234,18 +1359,18 @@ packages: dependency: "direct main" description: name: sqlite3_flutter_libs - sha256: fb2a106a2ea6042fe57de2c47074cc31539a941819c91e105b864744605da3f5 + sha256: "636b0fe8a2de894e5455572f6cbbc458f4ffecfe9f860b79439e27041ea4f0b9" url: "https://pub.dev" source: hosted - version: "0.5.21" + version: "0.5.27" sqlparser: dependency: transitive description: name: sqlparser - sha256: "7b20045d1ccfb7bc1df7e8f9fee5ae58673fce6ff62cefbb0e0fd7214e90e5a0" + sha256: ade9a67fd70d0369329ed3373208de7ebd8662470e8c396fc8d0d60f9acdfc9f url: "https://pub.dev" source: hosted - version: "0.34.1" + version: "0.36.0" stack_trace: dependency: transitive description: @@ -1278,6 +1403,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.0" + survey_form: + dependency: "direct main" + description: + name: survey_form + sha256: "5e3a08570fe8c97d7dfd0bc6f28b2ae829e2fe66ce987504920c20d091c47c19" + url: "https://pub.dev" + source: hosted + version: "1.0.0" synchronized: dependency: transitive description: @@ -1298,26 +1431,26 @@ packages: dependency: transitive description: name: test - sha256: a1f7595805820fcc05e5c52e3a231aedd0b72972cb333e8c738a8b1239448b6f + sha256: "7ee446762c2c50b3bd4ea96fe13ffac69919352bd3b4b17bac3f3465edc58073" url: "https://pub.dev" source: hosted - version: "1.24.9" + version: "1.25.2" test_api: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.0" test_core: dependency: transitive description: name: test_core - sha256: a757b14fc47507060a162cc2530d9a4a2f92f5100a952c7443b5cad5ef5b106a + sha256: "2bc4b4ecddd75309300d8096f781c0e3280ca1ef85beda558d33fcbedc2eead4" url: "https://pub.dev" source: hosted - version: "0.5.9" + version: "0.6.0" timing: dependency: transitive description: @@ -1342,38 +1475,118 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.2" + universal_html: + dependency: transitive + description: + name: universal_html + sha256: "56536254004e24d9d8cfdb7dbbf09b74cf8df96729f38a2f5c238163e3d58971" + url: "https://pub.dev" + source: hosted + version: "2.2.4" + universal_io: + dependency: transitive + description: + name: universal_io + sha256: "1722b2dcc462b4b2f3ee7d188dad008b6eb4c40bbd03a3de451d82c78bba9aad" + url: "https://pub.dev" + source: hosted + version: "2.2.2" + url_launcher: + dependency: transitive + description: + name: url_launcher + sha256: "21b704ce5fa560ea9f3b525b43601c678728ba46725bab9b01187b4831377ed3" + url: "https://pub.dev" + source: hosted + version: "6.3.0" + url_launcher_android: + dependency: transitive + description: + name: url_launcher_android + sha256: "17cd5e205ea615e2c6ea7a77323a11712dffa0720a8a90540db57a01347f9ad9" + url: "https://pub.dev" + source: hosted + version: "6.3.2" + url_launcher_ios: + dependency: transitive + description: + name: url_launcher_ios + sha256: "75bb6fe3f60070407704282a2d295630cab232991eb52542b18347a8a941df03" + url: "https://pub.dev" + source: hosted + version: "6.2.4" + url_launcher_linux: + dependency: transitive + description: + name: url_launcher_linux + sha256: ab360eb661f8879369acac07b6bb3ff09d9471155357da8443fd5d3cf7363811 + url: "https://pub.dev" + source: hosted + version: "3.1.1" + url_launcher_macos: + dependency: transitive + description: + name: url_launcher_macos + sha256: "9a1a42d5d2d95400c795b2914c36fdcb525870c752569438e4ebb09a2b5d90de" + url: "https://pub.dev" + source: hosted + version: "3.2.0" + url_launcher_platform_interface: + dependency: transitive + description: + name: url_launcher_platform_interface + sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + url_launcher_web: + dependency: transitive + description: + name: url_launcher_web + sha256: "772638d3b34c779ede05ba3d38af34657a05ac55b06279ea6edd409e323dca8e" + url: "https://pub.dev" + source: hosted + version: "2.3.3" + url_launcher_windows: + dependency: transitive + description: + name: url_launcher_windows + sha256: "49c10f879746271804767cb45551ec5592cdab00ee105c06dddde1a98f73b185" + url: "https://pub.dev" + source: hosted + version: "3.1.2" uuid: dependency: "direct main" description: name: uuid - sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" + sha256: a5be9ef6618a7ac1e964353ef476418026db906c4facdedaa299b7a2e71690ff url: "https://pub.dev" source: hosted - version: "3.0.7" + version: "4.5.1" vector_graphics: dependency: transitive description: name: vector_graphics - sha256: "4ac59808bbfca6da38c99f415ff2d3a5d7ca0a6b4809c71d9cf30fba5daf9752" + sha256: "32c3c684e02f9bc0afb0ae0aa653337a2fe022e8ab064bcd7ffda27a74e288e3" url: "https://pub.dev" source: hosted - version: "1.1.10+1" + version: "1.1.11+1" vector_graphics_codec: dependency: transitive description: name: vector_graphics_codec - sha256: f3247e7ab0ec77dc759263e68394990edc608fb2b480b80db8aa86ed09279e33 + sha256: c86987475f162fadff579e7320c7ddda04cd2fdeffbe1129227a85d9ac9e03da url: "https://pub.dev" source: hosted - version: "1.1.10+1" + version: "1.1.11+1" vector_graphics_compiler: dependency: transitive description: name: vector_graphics_compiler - sha256: "18489bdd8850de3dd7ca8a34e0c446f719ec63e2bab2e7a8cc66a9028dd76c5a" + sha256: "12faff3f73b1741a36ca7e31b292ddeb629af819ca9efe9953b70bd63fc8cd81" url: "https://pub.dev" source: hosted - version: "1.1.10+1" + version: "1.1.11+1" vector_math: dependency: transitive description: @@ -1382,14 +1595,22 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" + visibility_detector: + dependency: transitive + description: + name: visibility_detector + sha256: dd5cc11e13494f432d15939c3aa8ae76844c42b723398643ce9addb88a5ed420 + url: "https://pub.dev" + source: hosted + version: "0.4.0+2" vm_service: dependency: transitive description: name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" url: "https://pub.dev" source: hosted - version: "13.0.0" + version: "14.2.1" watcher: dependency: transitive description: @@ -1402,10 +1623,10 @@ packages: dependency: transitive description: name: web - sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "0.5.1" web_socket_channel: dependency: transitive description: @@ -1455,5 +1676,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.2.0 <3.9.0" - flutter: ">=3.16.0" + dart: ">=3.4.0 <3.9.0" + flutter: ">=3.22.0" diff --git a/packages/referral_reconciliation/pubspec.yaml b/packages/referral_reconciliation/pubspec.yaml index 6973be72c..0a1746511 100644 --- a/packages/referral_reconciliation/pubspec.yaml +++ b/packages/referral_reconciliation/pubspec.yaml @@ -1,6 +1,6 @@ name: referral_reconciliation description: "This module will enable the health facility supervisors to track referrals made by on-field health workers to different health facilities digitally via the Digit HCM app" -version: 1.0.2+2 +version: 1.0.3 homepage: https://github.com/egovernments/health-campaign-field-worker-app/tree/master/packages/referral_reconciliation repository: https://github.com/egovernments/health-campaign-field-worker-app @@ -11,38 +11,40 @@ environment: dependencies: flutter: sdk: flutter - digit_components: ^1.0.2+1 - flutter_bloc: ^8.1.1 - freezed_annotation: ^2.1.0 - reactive_forms: ^14.1.0 + digit_ui_components: ^0.0.2-dev.4 + flutter_bloc: ^8.1.5 + freezed_annotation: ^2.4.1 + reactive_forms: ^17.0.0 + intl: ^0.19.0 + flutter_svg: ^2.0.10+1 + dart_mappable: ^4.2.2 + drift: ^2.18.0 + auto_route: ^8.1.3 + collection: ^1.18.0 + dio: ^5.4.3+1 + location: ^6.0.2 + uuid: ^4.4.0 + recase: ^4.1.0 + pluto_grid: ^8.0.0 fluttertoast: ^8.1.2 overlay_builder: ^1.1.0 - intl: ^0.18.0 - flutter_svg: ^2.0.8 - dart_mappable: ^4.2.0 - drift: ^2.0.0 sqlite3_flutter_libs: ^0.5.10 path_provider: ^2.0.11 path: ^1.8.2 - drift_db_viewer: ^2.0.0 - uuid: ^3.0.6 - recase: ^4.1.0 - pluto_grid: ^7.0.1 - digit_scanner: ^1.0.3+1 + digit_scanner: ^1.0.4 group_radio_button: ^1.3.0 - flutter_keyboard_visibility: ^5.4.0 - auto_route: ^7.8.4 - collection: ^1.16.0 - digit_data_model: ^1.0.3+3 + flutter_keyboard_visibility: ^5.4.1 + digit_data_model: ^1.0.5 stream_transform: ^2.1.0 + survey_form: ^1.0.0 + dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^3.0.1 - dart_code_metrics: ^5.7.6 + flutter_lints: ^4.0.0 freezed: ^2.1.0+1 - build_runner: ^2.4.7 + build_runner: ^2.4.11 json_serializable: ^6.4.0 drift_dev: ^2.14.1 bloc_test: ^9.1.0 @@ -50,11 +52,12 @@ dev_dependencies: dart_mappable_builder: git: url: https://github.com/egovernments/health-campaign-field-worker-app/ - ref: master + ref: 1.6-final-dev path: ./packages/dart_mappable_builder - auto_route_generator: ^7.3.2 + auto_route_generator: ^8.0.0 flutter: assets: - assets/images/ - - assets/icons/svg/ \ No newline at end of file + - assets/icons/svg/ + - assets/animated_json/ \ No newline at end of file diff --git a/packages/referral_reconciliation/test/blocs/referral_recon_record_test.dart b/packages/referral_reconciliation/test/blocs/referral_recon_record_test.dart index d3d474acb..03a1c0d6e 100644 --- a/packages/referral_reconciliation/test/blocs/referral_recon_record_test.dart +++ b/packages/referral_reconciliation/test/blocs/referral_recon_record_test.dart @@ -35,22 +35,7 @@ void main() { // Grouping tests related to RecordStockBloc group('RecordHFReferralBloc', () { - // Declaring variables for mock and bloc - late MockReferralReconSingleton mockReferralReconSingleton; - late RecordHFReferralBloc recordHFReferralBloc; - - // Setting up the mock and the bloc for each test - setUp(() { - mockReferralReconSingleton = MockReferralReconSingleton(); - recordHFReferralBloc = RecordHFReferralBloc( - RecordHFReferralState.create( - projectId: mockProjectId, - facilityId: mockProjectFacilityModel.id, - healthFacilityCord: mockHealthFacilityCoordinator, - dateOfEvaluation: mockDateOfRecord, - ), - ); - }); + setUp(() {}); // Test for saveWarehouseDetails event blocTest( diff --git a/packages/referral_reconciliation/test/blocs/referral_recon_service_definition_test.dart b/packages/referral_reconciliation/test/blocs/referral_recon_service_definition_test.dart index 638c25ec9..19dd4013b 100644 --- a/packages/referral_reconciliation/test/blocs/referral_recon_service_definition_test.dart +++ b/packages/referral_reconciliation/test/blocs/referral_recon_service_definition_test.dart @@ -1,6 +1,7 @@ // Importing necessary packages and modules import 'package:bloc_test/bloc_test.dart'; import 'package:digit_data_model/data_model.dart'; +import 'package:survey_form/survey_form.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mocktail/mocktail.dart'; import 'package:referral_reconciliation/blocs/referral_recon_service_definition.dart'; @@ -25,14 +26,10 @@ void main() { registerFallbackValue(FakeServiceDefinitionSearchModel()); }); group('ReferralReconServiceBloc', () { - // Declare variables for MockInventorySingleton and FacilityBloc - late MockReferralReconSingleton mockReferralReconSingleton; late ReferralReconServiceDefinitionBloc serviceBloc; late MockServiceDataRepository serviceDefinitionDataRepository; setUp(() { - // Initialize MockReferralReconSingleton and ReferralReconServiceBloc before each test - mockReferralReconSingleton = MockReferralReconSingleton(); serviceDefinitionDataRepository = MockServiceDataRepository(); serviceBloc = ReferralReconServiceDefinitionBloc( const ReferralReconServiceDefinitionState.empty(), @@ -91,7 +88,7 @@ void main() { // Description of the test 'emits [ReferralReconServiceDefinitionServiceFetchedState] when getServiceDefinitionsList returns non-null List', build: () { - // Mock the method getServiceDefinitions to return a saved checklist + // Mock the method getServiceDefinitions to return a saved survey_form when(() => serviceDefinitionDataRepository.search(any())).thenAnswer( (_) async => [ ServiceDefinitionModel( diff --git a/packages/referral_reconciliation/test/constants/test_constants.dart b/packages/referral_reconciliation/test/constants/test_constants.dart index 18ab284e4..bec892985 100644 --- a/packages/referral_reconciliation/test/constants/test_constants.dart +++ b/packages/referral_reconciliation/test/constants/test_constants.dart @@ -1,5 +1,6 @@ import 'package:digit_data_model/data_model.dart'; import 'package:referral_reconciliation/models/entities/hf_referral.dart'; +import 'package:survey_form/survey_form.dart'; class ReferralReconTestConstants { final String projectId = '11891de8-02a2-4844-80ff-a080b7b40b70'; diff --git a/packages/registration_delivery/CHANGELOG.md b/packages/registration_delivery/CHANGELOG.md index ed914cc19..bcad861e0 100644 --- a/packages/registration_delivery/CHANGELOG.md +++ b/packages/registration_delivery/CHANGELOG.md @@ -1,17 +1,46 @@ +## 1.0.5+2 + +* Action label and status change with projectType + +## 1.0.5+1 + +* householdOverViewActionText localization fix + +## 1.0.5 + +* Upgrade to Flutter 3.22 +* Updated latest version's of digit_data_model, survey_form, digit_scanner +* Migrated to digit_ui_components + +## 1.0.3+4 + +* Delivery action label and administered_success status update based on the project + +## 1.0.4-dev.5 + +* Updated digit_data_model to latest version +* Updated survey_form to latest version +* Migrated to digit_ui_components + ## 1.0.3+3 + * Updated Service model additionalDetails objectType in digit_data_model package ## 1.0.3+2 * Bug Fix - - * fixed wrong status map of beneficiaryRefused in utils + * fixed wrong status map of beneficiaryRefused in utils * Sorting tasks based on createTime +## 1.0.4-dev.1 + +* Integrated survey_form package + ## 1.0.3+1 * Bug Fixes - - * Reload fix after edit - * Project Beneficiary create for all members if not registered for campaign + * Reload fix after edit + * Project Beneficiary create for all members if not registered for campaign * Updated digit_scanner package, digit_components, digit_data_model ## 1.0.3 @@ -30,11 +59,11 @@ ## 1.0.3-dev.10 -* Removed stepper if number of deliveries is greater than 1 +* Removed stepper if number of deliveries is greater than 1 ## 1.0.3-dev.9 -* Updated localization key +* Updated localization key * Resolved taskStatus key from task table entity ## 1.0.3-dev.8 @@ -51,7 +80,7 @@ ## 1.0.3-dev.5 -* Added count for filter search +* Added count for filter search * Bug fixes ## 1.0.3-dev.4 @@ -62,7 +91,6 @@ * Closed household flow change - ## 1.0.3-dev.2 * Closed household search fixes @@ -138,7 +166,7 @@ ## 0.0.0-dev.2 -* Boundary v2 Integrated, to use Boundary v1 0.0.0-dev.1 version can be used +* Boundary v2 Integrated, to use Boundary v1 0.0.0-dev.1 version can be used ## 0.0.0-dev.1 diff --git a/packages/registration_delivery/lib/blocs/beneficiary_registration/beneficiary_registration.dart b/packages/registration_delivery/lib/blocs/beneficiary_registration/beneficiary_registration.dart index ba5a9736b..0b2b6f069 100644 --- a/packages/registration_delivery/lib/blocs/beneficiary_registration/beneficiary_registration.dart +++ b/packages/registration_delivery/lib/blocs/beneficiary_registration/beneficiary_registration.dart @@ -1,7 +1,6 @@ // GENERATED using mason_cli import 'dart:async'; -import 'package:collection/collection.dart'; import 'package:digit_data_model/data_model.dart'; import 'package:digit_data_model/utils/typedefs.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; @@ -409,6 +408,11 @@ class BeneficiaryRegistrationBloc editHousehold: (value) async { emit(value.copyWith(loading: true)); try { + final HouseholdModel? existingHousehold = + (await householdRepository.search(HouseholdSearchModel( + clientReferenceId: [value.householdModel.clientReferenceId], + ))) + .firstOrNull; await householdRepository.update( event.household.copyWith( clientAuditDetails: ClientAuditDetails( @@ -426,6 +430,10 @@ class BeneficiaryRegistrationBloc relatedClientReferenceId: value.householdModel.clientReferenceId, ), + id: existingHousehold?.id, + rowVersion: existingHousehold?.rowVersion ?? 1, + nonRecoverableError: + existingHousehold?.nonRecoverableError ?? false, ), ); final projectBeneficiary = await projectBeneficiaryRepository.search( @@ -492,6 +500,11 @@ class BeneficiaryRegistrationBloc } for (var element in value.individualModel) { + final IndividualModel? existingIndividual = + (await individualRepository.search(IndividualSearchModel( + clientReferenceId: [element.clientReferenceId], + ))) + .firstOrNull; await individualRepository.update( element.copyWith( address: [ @@ -503,6 +516,10 @@ class BeneficiaryRegistrationBloc ); }), ], + id: existingIndividual?.id, + rowVersion: existingIndividual?.rowVersion ?? 1, + nonRecoverableError: + existingIndividual?.nonRecoverableError ?? false, ), ); } @@ -548,7 +565,17 @@ class BeneficiaryRegistrationBloc ], ), ); - await individualRepository.update(individual); + final IndividualModel? existingIndividual = + (await individualRepository.search(IndividualSearchModel( + clientReferenceId: [individual.clientReferenceId], + ))) + .firstOrNull; + await individualRepository.update(individual.copyWith( + id: existingIndividual?.id, + rowVersion: existingIndividual?.rowVersion ?? 1, + nonRecoverableError: + existingIndividual?.nonRecoverableError ?? false, + )); if (projectBeneficiary.isNotEmpty) { if (projectBeneficiary.first.tag != event.tag) { await projectBeneficiaryRepository diff --git a/packages/registration_delivery/lib/blocs/household_overview/household_overview.dart b/packages/registration_delivery/lib/blocs/household_overview/household_overview.dart index 96fc6d58b..e85ac489b 100644 --- a/packages/registration_delivery/lib/blocs/household_overview/household_overview.dart +++ b/packages/registration_delivery/lib/blocs/household_overview/household_overview.dart @@ -222,16 +222,65 @@ class HouseholdOverviewBloc HouseholdOverviewEmitter emit, ) async { // Delete the household from the repository. + final HouseholdModel? existingHousehold = + (await householdRepository.search(HouseholdSearchModel( + clientReferenceId: [event.householdModel.clientReferenceId], + ))) + .firstOrNull; await householdRepository.delete( event.householdModel.copyWith( - rowVersion: event.householdModel.rowVersion, + id: existingHousehold?.id, + rowVersion: existingHousehold?.rowVersion ?? 1, + nonRecoverableError: existingHousehold?.nonRecoverableError ?? false, ), ); // Iterate through individual members of the household. for (final i in event.members) { - // Delete the individual from the repository. - await individualRepository.delete(i); +// Delete the individual from the repository. + final IndividualModel? existingIndividual = + (await individualRepository.search(IndividualSearchModel( + clientReferenceId: [i.clientReferenceId], + ))) + .firstOrNull; + await individualRepository.delete(i.copyWith( + id: existingIndividual?.id, + rowVersion: existingIndividual?.rowVersion ?? 1, + nonRecoverableError: existingIndividual?.nonRecoverableError ?? false, + )); + if (event.projectBeneficiaryType == BeneficiaryType.individual) { + // Search for project beneficiary associated with the deleted individual. + final projectBeneficiaries = await projectBeneficiaryRepository.search( + ProjectBeneficiarySearchModel( + beneficiaryClientReferenceId: [ + i.clientReferenceId, + ], + ), + ); + // Delete the associated project beneficiaries. + for (final projectBeneficiary in projectBeneficiaries) { + await projectBeneficiaryRepository.delete( + projectBeneficiary.copyWith( + rowVersion: projectBeneficiary.rowVersion, + clientAuditDetails: (projectBeneficiary + .clientAuditDetails?.createdBy != + null && + projectBeneficiary.clientAuditDetails?.createdTime != + null) + ? ClientAuditDetails( + createdBy: + projectBeneficiary.clientAuditDetails!.createdBy, + createdTime: + projectBeneficiary.clientAuditDetails!.createdTime, + lastModifiedBy: + projectBeneficiary.clientAuditDetails!.lastModifiedBy, + lastModifiedTime: DateTime.now().millisecondsSinceEpoch, + ) + : null, + ), + ); + } + } // Search for household members associated with the deleted individual. final householdMember = @@ -250,12 +299,23 @@ class HouseholdOverviewBloc } } - // Delete the project beneficiary associated with the household. - await projectBeneficiaryRepository.delete( - event.projectBeneficiaryModel.copyWith( - rowVersion: event.projectBeneficiaryModel.rowVersion, - ), - ); + if (BeneficiaryType.household == event.projectBeneficiaryType) { + // Delete the project beneficiary associated with the household. + final ProjectBeneficiaryModel? existingProjectBeneficiary = + (await projectBeneficiaryRepository + .search(ProjectBeneficiarySearchModel( + clientReferenceId: [event.projectBeneficiaryModel.clientReferenceId], + ))) + .firstOrNull; + await projectBeneficiaryRepository.delete( + event.projectBeneficiaryModel.copyWith( + id: existingProjectBeneficiary?.id, + rowVersion: existingProjectBeneficiary?.rowVersion ?? 1, + nonRecoverableError: + existingProjectBeneficiary?.nonRecoverableError ?? false, + ), + ); + } } // This function handles the deletion of an individual from a household. @@ -263,9 +323,48 @@ class HouseholdOverviewBloc HouseholdOverviewDeleteIndividualEvent event, HouseholdOverviewEmitter emit, ) async { - // Delete the individual from the repository. - await individualRepository.delete(event.individualModel); - +// Delete the individual from the repository. + final IndividualModel? existingIndividual = + (await individualRepository.search(IndividualSearchModel( + clientReferenceId: [event.individualModel.clientReferenceId], + ))) + .firstOrNull; + await individualRepository.delete(event.individualModel.copyWith( + id: existingIndividual?.id, + rowVersion: existingIndividual?.rowVersion ?? 1, + nonRecoverableError: existingIndividual?.nonRecoverableError ?? false, + )); + if (event.projectBeneficiaryType == BeneficiaryType.individual) { + // Search for project beneficiary associated with the deleted individual. + final projectBeneficiaries = await projectBeneficiaryRepository.search( + ProjectBeneficiarySearchModel( + beneficiaryClientReferenceId: [ + event.individualModel.clientReferenceId, + ], + ), + ); + // Delete the associated project beneficiaries. + for (final projectBeneficiary in projectBeneficiaries) { + await projectBeneficiaryRepository.delete( + projectBeneficiary.copyWith( + rowVersion: projectBeneficiary.rowVersion, + clientAuditDetails: (projectBeneficiary + .clientAuditDetails?.createdBy != + null && + projectBeneficiary.clientAuditDetails?.createdTime != null) + ? ClientAuditDetails( + createdBy: projectBeneficiary.clientAuditDetails!.createdBy, + createdTime: + projectBeneficiary.clientAuditDetails!.createdTime, + lastModifiedBy: + projectBeneficiary.clientAuditDetails!.lastModifiedBy, + lastModifiedTime: DateTime.now().millisecondsSinceEpoch, + ) + : null, + ), + ); + } + } // Search for household members associated with the deleted individual. final householdMembers = await householdMemberRepository.search( HouseholdMemberSearchModel( diff --git a/packages/registration_delivery/lib/blocs/search_households/household_global_seach.dart b/packages/registration_delivery/lib/blocs/search_households/household_global_seach.dart index 11e576113..b0054207f 100644 --- a/packages/registration_delivery/lib/blocs/search_households/household_global_seach.dart +++ b/packages/registration_delivery/lib/blocs/search_households/household_global_seach.dart @@ -331,7 +331,7 @@ class HouseHoldGlobalSearchBloc extends SearchHouseholdsBloc { if (projectBeneficiariesList.isNotEmpty) { if (taskList.isEmpty) { taskList = - await fetchTaskbyProjectBeneficiary(projectBeneficiariesList); + await fetchTaskByProjectBeneficiary(projectBeneficiariesList); } sideEffectsList = await sideEffectDataRepository.search(SideEffectSearchModel( diff --git a/packages/registration_delivery/lib/blocs/search_households/individual_global_search.dart b/packages/registration_delivery/lib/blocs/search_households/individual_global_search.dart index 696df872e..c0972ac55 100644 --- a/packages/registration_delivery/lib/blocs/search_households/individual_global_search.dart +++ b/packages/registration_delivery/lib/blocs/search_households/individual_global_search.dart @@ -79,14 +79,14 @@ class IndividualGlobalSearchBloc extends SearchHouseholdsBloc { clientReferenceId: individualClientReferenceIds.map((e) => e.toString()).toList())); - final List householdMembers = - await fetchHouseholdMembersBulk( + householdMembersList = await fetchHouseholdMembersBulk( individualClientReferenceIds, null, ); - final houseHoldIds = - householdMembers.map((e) => e.householdClientReferenceId!).toList(); + final houseHoldIds = householdMembersList + .map((e) => e.householdClientReferenceId!) + .toList(); householdList = await household.search( HouseholdSearchModel( @@ -94,12 +94,32 @@ class IndividualGlobalSearchBloc extends SearchHouseholdsBloc { ), ); + individualsList = await individual.search( + IndividualSearchModel( + clientReferenceId: householdMembersList + .map((e) => e.individualClientReferenceId.toString()) + .toList(), + ), + ); + + individualClientReferenceIds = householdMembersList + .map((e) => e.individualClientReferenceId.toString()) + .toList(); + projectBeneficiariesList = await projectBeneficiary.search( ProjectBeneficiarySearchModel( - projectId: [RegistrationDeliverySingleton().projectId.toString()], + projectId: [ + event.globalSearchParams.filter!.contains(Status.registered.name) + ? RegistrationDeliverySingleton().projectId.toString() + : '' + ], beneficiaryClientReferenceId: individualClientReferenceIds.map((e) => e).toList())); + individualsList = await individual.search( + IndividualSearchModel(clientReferenceId: individualClientReferenceIds), + ); + List tasksRelated = await _processTasksAndRelatedData( projectBeneficiariesList, taskList, sideEffectsList, referralsList); @@ -108,7 +128,7 @@ class IndividualGlobalSearchBloc extends SearchHouseholdsBloc { referralsList = tasksRelated[2]; await _processHouseholdEntries( - householdMembers, + householdMembersList, householdList, individualsList, projectBeneficiariesList, @@ -141,14 +161,6 @@ class IndividualGlobalSearchBloc extends SearchHouseholdsBloc { null, ); - final List individualClientReferenceIds = householdMembersList - .map((e) => e.individualClientReferenceId.toString()) - .toList(); - - individualsList = await individual.search( - IndividualSearchModel(clientReferenceId: individualClientReferenceIds), - ); - late List houseHoldClientReferenceIds = []; houseHoldClientReferenceIds = householdMembersList @@ -159,6 +171,33 @@ class IndividualGlobalSearchBloc extends SearchHouseholdsBloc { clientReferenceId: houseHoldClientReferenceIds, )); + householdMembersList = await fetchHouseholdMembersBulk( + null, + houseHoldClientReferenceIds, + ); + + individualsList = await individual.search( + IndividualSearchModel( + clientReferenceId: householdMembersList + .map((e) => e.individualClientReferenceId.toString()) + .toList(), + ), + ); + + final List individualClientReferenceIds = householdMembersList + .map((e) => e.individualClientReferenceId.toString()) + .toList(); + + projectBeneficiariesList = await projectBeneficiary.search( + ProjectBeneficiarySearchModel( + projectId: [RegistrationDeliverySingleton().projectId.toString()], + beneficiaryClientReferenceId: + individualClientReferenceIds.map((e) => e).toList())); + + individualsList = await individual.search( + IndividualSearchModel(clientReferenceId: individualClientReferenceIds), + ); + finalResults.forEach((element) { taskList.add(element); }); @@ -193,7 +232,7 @@ class IndividualGlobalSearchBloc extends SearchHouseholdsBloc { individualClientReferenceIds.map((e) => e.toString()).toList())); // Search for individual results using the extracted IDs and search text. - final List householdMembers = + List householdMembers = await fetchHouseholdMembersBulk( individualClientReferenceIds, null, @@ -205,6 +244,19 @@ class IndividualGlobalSearchBloc extends SearchHouseholdsBloc { .toList(), )); + householdMembers = await fetchHouseholdMembersBulk( + null, + householdList.map((e) => e.clientReferenceId).toList(), + ); + + individualsList = await individual.search( + IndividualSearchModel( + clientReferenceId: householdMembers + .map((e) => e.individualClientReferenceId.toString()) + .toList(), + ), + ); + projectBeneficiariesList = await projectBeneficiary.search( ProjectBeneficiarySearchModel( projectId: [RegistrationDeliverySingleton().projectId.toString()], @@ -326,7 +378,7 @@ class IndividualGlobalSearchBloc extends SearchHouseholdsBloc { if (projectBeneficiariesList.isNotEmpty) { if (taskList.isEmpty) { taskList = - await fetchTaskbyProjectBeneficiary(projectBeneficiariesList); + await fetchTaskByProjectBeneficiary(projectBeneficiariesList); } sideEffectsList = await sideEffectDataRepository.search(SideEffectSearchModel( diff --git a/packages/registration_delivery/lib/blocs/search_households/proximity_search.dart b/packages/registration_delivery/lib/blocs/search_households/proximity_search.dart new file mode 100644 index 000000000..e69de29bb diff --git a/packages/registration_delivery/lib/blocs/search_households/search_households.dart b/packages/registration_delivery/lib/blocs/search_households/search_households.dart index ed259aa84..2219eb5cc 100644 --- a/packages/registration_delivery/lib/blocs/search_households/search_households.dart +++ b/packages/registration_delivery/lib/blocs/search_households/search_households.dart @@ -100,7 +100,7 @@ class SearchHouseholdsBloc }, )?.individualClientReferenceId, ); - final tasks = await fetchTaskbyProjectBeneficiary(projectBeneficiaries); + final tasks = await fetchTaskByProjectBeneficiary(projectBeneficiaries); final sideEffects = await sideEffectDataRepository.search(SideEffectSearchModel( @@ -189,7 +189,7 @@ class SearchHouseholdsBloc } // Fetch the task - Future> fetchTaskbyProjectBeneficiary( + Future> fetchTaskByProjectBeneficiary( List projectBeneficiaries, ) async { return await taskDataRepository.search(TaskSearchModel( diff --git a/packages/registration_delivery/lib/blocs/search_households/tag_by_search.dart b/packages/registration_delivery/lib/blocs/search_households/tag_by_search.dart index 33ef8f30f..67c5966cd 100644 --- a/packages/registration_delivery/lib/blocs/search_households/tag_by_search.dart +++ b/packages/registration_delivery/lib/blocs/search_households/tag_by_search.dart @@ -99,7 +99,7 @@ class TagSearchBloc extends SearchHouseholdsBloc { )); // Search for tasks and side effects based on project beneficiaries. - final tasks = await fetchTaskbyProjectBeneficiary(beneficiaries); + final tasks = await fetchTaskByProjectBeneficiary(beneficiaries); final referrals = await referralDataRepository.search(ReferralSearchModel( projectBeneficiaryClientReferenceId: diff --git a/packages/registration_delivery/lib/data/repositories/local/base/household_base.dart b/packages/registration_delivery/lib/data/repositories/local/base/household_base.dart index 77ef0896e..f319c6bba 100644 --- a/packages/registration_delivery/lib/data/repositories/local/base/household_base.dart +++ b/packages/registration_delivery/lib/data/repositories/local/base/household_base.dart @@ -13,6 +13,5 @@ abstract class HouseholdLocalBaseRepository @override DataModelType get type => DataModelType.household; - @override TableInfo get table => sql.household; } diff --git a/packages/registration_delivery/lib/data/repositories/local/base/household_member_base.dart b/packages/registration_delivery/lib/data/repositories/local/base/household_member_base.dart index e1cd54e07..033457ecf 100644 --- a/packages/registration_delivery/lib/data/repositories/local/base/household_member_base.dart +++ b/packages/registration_delivery/lib/data/repositories/local/base/household_member_base.dart @@ -9,6 +9,5 @@ abstract class HouseholdMemberLocalBaseRepository @override DataModelType get type => DataModelType.householdMember; - @override TableInfo get table => sql.householdMember; } diff --git a/packages/registration_delivery/lib/data/repositories/local/base/project_beneficiary_base.dart b/packages/registration_delivery/lib/data/repositories/local/base/project_beneficiary_base.dart index d1f6b4b81..1a4657b45 100644 --- a/packages/registration_delivery/lib/data/repositories/local/base/project_beneficiary_base.dart +++ b/packages/registration_delivery/lib/data/repositories/local/base/project_beneficiary_base.dart @@ -10,6 +10,5 @@ abstract class ProjectBeneficiaryLocalBaseRepository @override DataModelType get type => DataModelType.projectBeneficiary; - @override TableInfo get table => sql.projectBeneficiary; } diff --git a/packages/registration_delivery/lib/data/repositories/local/base/side_effect_base.dart b/packages/registration_delivery/lib/data/repositories/local/base/side_effect_base.dart index ec036cfd8..c03e9da60 100644 --- a/packages/registration_delivery/lib/data/repositories/local/base/side_effect_base.dart +++ b/packages/registration_delivery/lib/data/repositories/local/base/side_effect_base.dart @@ -11,6 +11,5 @@ abstract class SideEffectLocalBaseRepository @override DataModelType get type => DataModelType.sideEffect; - @override TableInfo get table => sql.sideEffect; } diff --git a/packages/registration_delivery/lib/data/repositories/local/base/task_base.dart b/packages/registration_delivery/lib/data/repositories/local/base/task_base.dart index e051ce653..561a4e4b3 100644 --- a/packages/registration_delivery/lib/data/repositories/local/base/task_base.dart +++ b/packages/registration_delivery/lib/data/repositories/local/base/task_base.dart @@ -12,6 +12,5 @@ abstract class TaskLocalBaseRepository @override DataModelType get type => DataModelType.task; - @override TableInfo get table => sql.task; } diff --git a/packages/registration_delivery/lib/data/repositories/local/household_global_search.dart b/packages/registration_delivery/lib/data/repositories/local/household_global_search.dart index 26ffbd225..13dca03cc 100644 --- a/packages/registration_delivery/lib/data/repositories/local/household_global_search.dart +++ b/packages/registration_delivery/lib/data/repositories/local/household_global_search.dart @@ -234,8 +234,7 @@ class HouseHoldGlobalSearchRepository extends LocalRepository { sql.householdMember, sql.householdMember.individualClientReferenceId .equalsExp(sql.individual.clientReferenceId)) - ]) - ..where(sql.householdMember.isHeadOfHousehold.equals(true)); + ]); selectQuery.join([ leftOuterJoin( sql.household, @@ -266,6 +265,20 @@ class HouseHoldGlobalSearchRepository extends LocalRepository { sql.name.givenName.contains( params.nameSearch!, ), + sql.name.familyName.contains( + params.nameSearch!, + ), + buildOr([ + sql.name.givenName.contains( + params.nameSearch!, + ), + sql.name.familyName.contains( + params.nameSearch!, + ), + sql.name.otherNames.equals( + params.nameSearch!, + ), + ]), ]), ])); } @@ -497,7 +510,7 @@ class HouseHoldGlobalSearchRepository extends LocalRepository { var variables = selectQuery.constructQuery().introducedVariables; var indexesLength = selectQuery.constructQuery().variableIndices; - var totalCount; + dynamic totalCount; try { totalCount = await sql diff --git a/packages/registration_delivery/lib/data/repositories/local/household_member.dart b/packages/registration_delivery/lib/data/repositories/local/household_member.dart index 5815eb473..cb1f426bf 100644 --- a/packages/registration_delivery/lib/data/repositories/local/household_member.dart +++ b/packages/registration_delivery/lib/data/repositories/local/household_member.dart @@ -4,7 +4,6 @@ import 'package:digit_data_model/data_model.dart'; import 'package:drift/drift.dart'; import 'package:registration_delivery/models/entities/household_member.dart'; import 'package:registration_delivery/utils/extensions/extensions.dart'; -import 'package:registration_delivery/utils/utils.dart'; class HouseholdMemberLocalRepository extends LocalRepository { diff --git a/packages/registration_delivery/lib/data/repositories/local/individual_global_search.dart b/packages/registration_delivery/lib/data/repositories/local/individual_global_search.dart index abd395fef..1dfad5ded 100644 --- a/packages/registration_delivery/lib/data/repositories/local/individual_global_search.dart +++ b/packages/registration_delivery/lib/data/repositories/local/individual_global_search.dart @@ -1,6 +1,7 @@ import 'dart:async'; import 'dart:math' as math; +import 'package:collection/collection.dart'; import 'package:digit_data_model/data_model.dart'; import 'package:drift/drift.dart'; import 'package:flutter/material.dart'; @@ -219,19 +220,15 @@ class IndividualGlobalSearchRepository extends LocalRepository { return selectQuery; } else if (params.nameSearch != null || params.nameSearch!.isNotEmpty && selectQuery == null) { - selectQuery = super - .sql - .individual - .select() - .join([joinName(sql), joinIndividualAddress(sql)]); + selectQuery = super.sql.individual.select().join( + [joinName(sql), joinIdentifier(sql), joinIndividualAddress(sql)]); await searchByName(selectQuery, params, sql); selectQuery = selectQuery.join([ leftOuterJoin( sql.householdMember, sql.householdMember.individualClientReferenceId .equalsExp(sql.individual.clientReferenceId)) - ]) - ..where(sql.householdMember.isHeadOfHousehold.equals(true)); + ]); selectQuery.join([ leftOuterJoin( sql.household, @@ -245,9 +242,7 @@ class IndividualGlobalSearchRepository extends LocalRepository { } else if (params.nameSearch != null && params.nameSearch!.isNotEmpty && selectQuery != null) { - selectQuery = selectQuery.join([ - joinName(sql), - ]); + selectQuery = selectQuery.join([joinName(sql), joinIdentifier(sql)]); selectQuery = searchByName(selectQuery, params, sql); } return selectQuery; @@ -261,6 +256,20 @@ class IndividualGlobalSearchRepository extends LocalRepository { sql.name.givenName.contains( params.nameSearch!, ), + sql.name.familyName.contains( + params.nameSearch!, + ), + buildOr([ + sql.name.givenName.contains( + params.nameSearch!, + ), + sql.name.familyName.contains( + params.nameSearch!, + ), + sql.name.otherNames.equals( + params.nameSearch!, + ), + ]), ]), ])); } @@ -325,6 +334,7 @@ class IndividualGlobalSearchRepository extends LocalRepository { Status.closeHousehold.name: Status.closeHousehold, }; var applyFilter = filter; + var appliedFilter = statusMap[filter]!.toValue(); if (selectQuery == null) { selectQuery = sql.select(sql.task).join([ leftOuterJoin( @@ -333,11 +343,11 @@ class IndividualGlobalSearchRepository extends LocalRepository { .equalsExp(sql.task.projectBeneficiaryClientReferenceId)), leftOuterJoin( sql.individual, - sql.individual.clientReferenceId - .equalsExp(sql.projectBeneficiary.beneficiaryClientReferenceId)), + sql.individual.clientReferenceId.equalsExp( + sql.projectBeneficiary.beneficiaryClientReferenceId)), ]) ..where(sql.task.status.equals( - statusMap[applyFilter]!.toValue(), + appliedFilter, )); if (!(params.filter!.contains(Status.notRegistered.name))) { selectQuery @@ -370,6 +380,15 @@ class IndividualGlobalSearchRepository extends LocalRepository { ); } + joinIdentifier(LocalSqlDataStore sql) { + return leftOuterJoin( + sql.identifier, + sql.identifier.clientReferenceId.equalsExp( + sql.individual.clientReferenceId, + ), + ); + } + joinIndividualAddress(LocalSqlDataStore sql) { return leftOuterJoin( sql.address, @@ -393,7 +412,7 @@ class IndividualGlobalSearchRepository extends LocalRepository { var variables = selectQuery.constructQuery().introducedVariables; var indexesLength = selectQuery.constructQuery().variableIndices; - var totalCount; + dynamic totalCount; try { totalCount = await sql @@ -414,38 +433,71 @@ class IndividualGlobalSearchRepository extends LocalRepository { final individual = e.readTableOrNull(sql.individual); final address = e.readTableOrNull(sql.address); final name = e.readTableOrNull(sql.name); + final identifier = e.readTableOrNull(sql.identifier); return IndividualModel( - id: individual?.id, - tenantId: individual?.tenantId, - clientReferenceId: individual!.clientReferenceId, + id: individual.id, + tenantId: individual.tenantId, + individualId: individual.individualId, + clientReferenceId: individual.clientReferenceId, dateOfBirth: individual.dateOfBirth, - name: NameModel( - givenName: name?.givenName, - individualClientReferenceId: individual.clientReferenceId, - tenantId: individual.tenantId, - auditDetails: AuditDetails( - createdBy: individual.auditCreatedBy!, - createdTime: individual.auditCreatedTime!, - lastModifiedBy: individual.auditModifiedBy, - lastModifiedTime: individual.auditModifiedTime, - ), - ), - rowVersion: individual.rowVersion, + mobileNumber: individual.mobileNumber, isDeleted: individual.isDeleted, - auditDetails: AuditDetails( - createdBy: individual.auditCreatedBy!, - createdTime: individual.auditCreatedTime!, - lastModifiedBy: individual.auditModifiedBy, - lastModifiedTime: individual.auditModifiedTime, - ), - address: address == null + rowVersion: individual.rowVersion, + clientAuditDetails: (individual.clientCreatedBy != null && + individual.clientCreatedTime != null) + ? ClientAuditDetails( + createdBy: individual.clientCreatedBy!, + createdTime: individual.clientCreatedTime!, + lastModifiedBy: individual.clientModifiedBy, + lastModifiedTime: individual.clientModifiedTime, + ) + : null, + auditDetails: (individual.auditCreatedBy != null && + individual.auditCreatedTime != null) + ? AuditDetails( + createdBy: individual.auditCreatedBy!, + createdTime: individual.auditCreatedTime!, + lastModifiedBy: individual.auditModifiedBy, + lastModifiedTime: individual.auditModifiedTime, + ) + : null, + name: name == null ? null - : [ - AddressModel( + : NameModel( + id: name.id, + individualClientReferenceId: individual.clientReferenceId, + familyName: name.familyName, + givenName: name.givenName, + otherNames: name.otherNames, + rowVersion: name.rowVersion, + tenantId: name.tenantId, + auditDetails: (name.auditCreatedBy != null && + name.auditCreatedTime != null) + ? AuditDetails( + createdBy: name.auditCreatedBy!, + createdTime: name.auditCreatedTime!, + lastModifiedBy: name.auditModifiedBy, + lastModifiedTime: name.auditModifiedTime, + ) + : null, + clientAuditDetails: (name.clientCreatedBy != null && + name.clientCreatedTime != null) + ? ClientAuditDetails( + createdBy: name.clientCreatedBy!, + createdTime: name.clientCreatedTime!, + lastModifiedBy: name.clientModifiedBy, + lastModifiedTime: name.clientModifiedTime, + ) + : null, + ), + bloodGroup: individual.bloodGroup, + address: [ + address == null + ? null + : AddressModel( id: address.id, - relatedClientReferenceId: - address.relatedClientReferenceId, + relatedClientReferenceId: individual.clientReferenceId, tenantId: address.tenantId, doorNo: address.doorNo, latitude: address.latitude, @@ -456,22 +508,57 @@ class IndividualGlobalSearchRepository extends LocalRepository { addressLine2: address.addressLine2, city: address.city, pincode: address.pincode, + type: address.type, locality: address.localityBoundaryCode != null ? LocalityModel( code: address.localityBoundaryCode!, name: address.localityBoundaryName, ) : null, - type: address.type, rowVersion: address.rowVersion, - auditDetails: AuditDetails( - createdBy: individual.auditCreatedBy!, - createdTime: individual.auditCreatedTime!, - lastModifiedBy: individual.auditModifiedBy, - lastModifiedTime: individual.auditModifiedTime, - ), + auditDetails: (address.auditCreatedBy != null && + address.auditCreatedTime != null) + ? AuditDetails( + createdBy: address.auditCreatedBy!, + createdTime: address.auditCreatedTime!, + lastModifiedBy: address.auditModifiedBy, + lastModifiedTime: address.auditModifiedTime, + ) + : null, + clientAuditDetails: (address.clientCreatedBy != null && + address.clientCreatedTime != null) + ? ClientAuditDetails( + createdBy: address.clientCreatedBy!, + createdTime: address.clientCreatedTime!, + lastModifiedBy: address.clientModifiedBy, + lastModifiedTime: address.clientModifiedTime, + ) + : null, ), - ], + ].whereNotNull().toList(), + gender: individual.gender, + identifiers: [ + if (identifier != null) + IdentifierModel( + id: identifier.id, + clientReferenceId: individual.clientReferenceId, + identifierType: identifier.identifierType, + identifierId: identifier.identifierId, + rowVersion: identifier.rowVersion, + tenantId: identifier.tenantId, + auditDetails: AuditDetails( + createdBy: identifier.auditCreatedBy!, + createdTime: identifier.auditCreatedTime!, + lastModifiedBy: identifier.auditModifiedBy, + lastModifiedTime: identifier.auditModifiedTime, + ), + ), + ], + additionalFields: individual.additionalFields == null + ? null + : IndividualAdditionalFieldsMapper.fromJson( + individual.additionalFields!, + ), ); }) .where((element) => element.isDeleted != true) diff --git a/packages/registration_delivery/lib/data/repositories/local/project_beneficiary.dart b/packages/registration_delivery/lib/data/repositories/local/project_beneficiary.dart index 1a63c8013..3beb9ed45 100644 --- a/packages/registration_delivery/lib/data/repositories/local/project_beneficiary.dart +++ b/packages/registration_delivery/lib/data/repositories/local/project_beneficiary.dart @@ -202,8 +202,7 @@ class ProjectBeneficiaryLocalRepository extends LocalRepository< final updated = entity.copyWith( isDeleted: true, rowVersion: entity.rowVersion, - clientAuditDetails: (entity.clientAuditDetails?.createdBy != null && - entity.clientAuditDetails!.createdTime != null) + clientAuditDetails: (entity.clientAuditDetails?.createdBy != null) ? ClientAuditDetails( createdBy: entity.clientAuditDetails!.createdBy, createdTime: entity.clientAuditDetails!.createdTime, diff --git a/packages/registration_delivery/lib/data/repositories/local/side_effect.dart b/packages/registration_delivery/lib/data/repositories/local/side_effect.dart index 71c57557e..4e7080092 100644 --- a/packages/registration_delivery/lib/data/repositories/local/side_effect.dart +++ b/packages/registration_delivery/lib/data/repositories/local/side_effect.dart @@ -4,7 +4,6 @@ import 'package:collection/collection.dart'; import 'package:digit_data_model/data_model.dart'; import 'package:drift/drift.dart'; import 'package:registration_delivery/models/entities/side_effect.dart'; -import 'package:registration_delivery/utils/utils.dart'; class SideEffectLocalRepository extends LocalRepository { diff --git a/packages/registration_delivery/lib/models/entities/additional_fields_type.mapper.dart b/packages/registration_delivery/lib/models/entities/additional_fields_type.mapper.dart index 62bd69053..2cec78d77 100644 --- a/packages/registration_delivery/lib/models/entities/additional_fields_type.mapper.dart +++ b/packages/registration_delivery/lib/models/entities/additional_fields_type.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'additional_fields_type.dart'; diff --git a/packages/registration_delivery/lib/models/entities/deliver_strategy_type.mapper.dart b/packages/registration_delivery/lib/models/entities/deliver_strategy_type.mapper.dart index d51b33c6a..ea054fe4b 100644 --- a/packages/registration_delivery/lib/models/entities/deliver_strategy_type.mapper.dart +++ b/packages/registration_delivery/lib/models/entities/deliver_strategy_type.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'deliver_strategy_type.dart'; diff --git a/packages/registration_delivery/lib/models/entities/household.mapper.dart b/packages/registration_delivery/lib/models/entities/household.mapper.dart index 17d2a4ef9..442a81e82 100644 --- a/packages/registration_delivery/lib/models/entities/household.mapper.dart +++ b/packages/registration_delivery/lib/models/entities/household.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'household.dart'; @@ -132,10 +132,8 @@ mixin HouseholdSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - HouseholdSearchModelMapper.ensureInitialized() - .isValueEqual(this as HouseholdSearchModel, other)); + return HouseholdSearchModelMapper.ensureInitialized() + .equalsValue(this as HouseholdSearchModel, other); } @override @@ -376,10 +374,8 @@ mixin HouseholdModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - HouseholdModelMapper.ensureInitialized() - .isValueEqual(this as HouseholdModel, other)); + return HouseholdModelMapper.ensureInitialized() + .equalsValue(this as HouseholdModel, other); } @override @@ -593,10 +589,8 @@ mixin HouseholdAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - HouseholdAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as HouseholdAdditionalFields, other)); + return HouseholdAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as HouseholdAdditionalFields, other); } @override diff --git a/packages/registration_delivery/lib/models/entities/household_member.mapper.dart b/packages/registration_delivery/lib/models/entities/household_member.mapper.dart index 83b8174d6..5856ef4cd 100644 --- a/packages/registration_delivery/lib/models/entities/household_member.mapper.dart +++ b/packages/registration_delivery/lib/models/entities/household_member.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'household_member.dart'; @@ -165,10 +165,8 @@ mixin HouseholdMemberSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - HouseholdMemberSearchModelMapper.ensureInitialized() - .isValueEqual(this as HouseholdMemberSearchModel, other)); + return HouseholdMemberSearchModelMapper.ensureInitialized() + .equalsValue(this as HouseholdMemberSearchModel, other); } @override @@ -500,10 +498,8 @@ mixin HouseholdMemberModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - HouseholdMemberModelMapper.ensureInitialized() - .isValueEqual(this as HouseholdMemberModel, other)); + return HouseholdMemberModelMapper.ensureInitialized() + .equalsValue(this as HouseholdMemberModel, other); } @override @@ -726,10 +722,8 @@ mixin HouseholdMemberAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - HouseholdMemberAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as HouseholdMemberAdditionalFields, other)); + return HouseholdMemberAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as HouseholdMemberAdditionalFields, other); } @override diff --git a/packages/registration_delivery/lib/models/entities/project_beneficiary.mapper.dart b/packages/registration_delivery/lib/models/entities/project_beneficiary.mapper.dart index 81ad3c276..dd6b0bd74 100644 --- a/packages/registration_delivery/lib/models/entities/project_beneficiary.mapper.dart +++ b/packages/registration_delivery/lib/models/entities/project_beneficiary.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'project_beneficiary.dart'; @@ -183,10 +183,8 @@ mixin ProjectBeneficiarySearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProjectBeneficiarySearchModelMapper.ensureInitialized() - .isValueEqual(this as ProjectBeneficiarySearchModel, other)); + return ProjectBeneficiarySearchModelMapper.ensureInitialized() + .equalsValue(this as ProjectBeneficiarySearchModel, other); } @override @@ -516,10 +514,8 @@ mixin ProjectBeneficiaryModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProjectBeneficiaryModelMapper.ensureInitialized() - .isValueEqual(this as ProjectBeneficiaryModel, other)); + return ProjectBeneficiaryModelMapper.ensureInitialized() + .equalsValue(this as ProjectBeneficiaryModel, other); } @override @@ -748,11 +744,8 @@ mixin ProjectBeneficiaryAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProjectBeneficiaryAdditionalFieldsMapper.ensureInitialized() - .isValueEqual( - this as ProjectBeneficiaryAdditionalFields, other)); + return ProjectBeneficiaryAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as ProjectBeneficiaryAdditionalFields, other); } @override diff --git a/packages/registration_delivery/lib/models/entities/referral.mapper.dart b/packages/registration_delivery/lib/models/entities/referral.mapper.dart index 7fd1e1e76..ca225ff86 100644 --- a/packages/registration_delivery/lib/models/entities/referral.mapper.dart +++ b/packages/registration_delivery/lib/models/entities/referral.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'referral.dart'; @@ -143,10 +143,8 @@ mixin ReferralSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ReferralSearchModelMapper.ensureInitialized() - .isValueEqual(this as ReferralSearchModel, other)); + return ReferralSearchModelMapper.ensureInitialized() + .equalsValue(this as ReferralSearchModel, other); } @override @@ -428,10 +426,8 @@ mixin ReferralModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ReferralModelMapper.ensureInitialized() - .isValueEqual(this as ReferralModel, other)); + return ReferralModelMapper.ensureInitialized() + .equalsValue(this as ReferralModel, other); } @override @@ -658,10 +654,8 @@ mixin ReferralAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ReferralAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as ReferralAdditionalFields, other)); + return ReferralAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as ReferralAdditionalFields, other); } @override diff --git a/packages/registration_delivery/lib/models/entities/reg_form_validations_type.mapper.dart b/packages/registration_delivery/lib/models/entities/reg_form_validations_type.mapper.dart index aa90cca7b..6892165ce 100644 --- a/packages/registration_delivery/lib/models/entities/reg_form_validations_type.mapper.dart +++ b/packages/registration_delivery/lib/models/entities/reg_form_validations_type.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'reg_form_validations_type.dart'; diff --git a/packages/registration_delivery/lib/models/entities/registration_delivery_enums.mapper.dart b/packages/registration_delivery/lib/models/entities/registration_delivery_enums.mapper.dart index 96206f505..442d8d348 100644 --- a/packages/registration_delivery/lib/models/entities/registration_delivery_enums.mapper.dart +++ b/packages/registration_delivery/lib/models/entities/registration_delivery_enums.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'registration_delivery_enums.dart'; diff --git a/packages/registration_delivery/lib/models/entities/side_effect.dart b/packages/registration_delivery/lib/models/entities/side_effect.dart index c405455c2..1577f12b8 100644 --- a/packages/registration_delivery/lib/models/entities/side_effect.dart +++ b/packages/registration_delivery/lib/models/entities/side_effect.dart @@ -48,6 +48,7 @@ class SideEffectModel extends EntityModel with SideEffectModelMappable { final String? id; final String? projectId; final String? taskClientReferenceId; + final String? projectBeneficiaryClientReferenceId; final int? reAttempts; final List? symptoms; final bool? nonRecoverableError; @@ -60,6 +61,7 @@ class SideEffectModel extends EntityModel with SideEffectModelMappable { this.additionalFields, this.id, this.projectId, + this.projectBeneficiaryClientReferenceId, this.taskClientReferenceId, this.reAttempts, this.symptoms, @@ -93,6 +95,8 @@ class SideEffectModel extends EntityModel with SideEffectModelMappable { clientReferenceId: Value(clientReferenceId), tenantId: Value(tenantId), rowVersion: Value(rowVersion), + projectBeneficiaryClientReferenceId: + Value(projectBeneficiaryClientReferenceId), ); } } diff --git a/packages/registration_delivery/lib/models/entities/side_effect.mapper.dart b/packages/registration_delivery/lib/models/entities/side_effect.mapper.dart index ad644a277..06ed7253e 100644 --- a/packages/registration_delivery/lib/models/entities/side_effect.mapper.dart +++ b/packages/registration_delivery/lib/models/entities/side_effect.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'side_effect.dart'; @@ -129,10 +129,8 @@ mixin SideEffectSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - SideEffectSearchModelMapper.ensureInitialized() - .isValueEqual(this as SideEffectSearchModel, other)); + return SideEffectSearchModelMapper.ensureInitialized() + .equalsValue(this as SideEffectSearchModel, other); } @override @@ -278,6 +276,13 @@ class SideEffectModelMapper extends SubClassMapperBase { static String? _$projectId(SideEffectModel v) => v.projectId; static const Field _f$projectId = Field('projectId', _$projectId, opt: true); + static String? _$projectBeneficiaryClientReferenceId(SideEffectModel v) => + v.projectBeneficiaryClientReferenceId; + static const Field + _f$projectBeneficiaryClientReferenceId = Field( + 'projectBeneficiaryClientReferenceId', + _$projectBeneficiaryClientReferenceId, + opt: true); static String? _$taskClientReferenceId(SideEffectModel v) => v.taskClientReferenceId; static const Field _f$taskClientReferenceId = @@ -319,6 +324,8 @@ class SideEffectModelMapper extends SubClassMapperBase { #additionalFields: _f$additionalFields, #id: _f$id, #projectId: _f$projectId, + #projectBeneficiaryClientReferenceId: + _f$projectBeneficiaryClientReferenceId, #taskClientReferenceId: _f$taskClientReferenceId, #reAttempts: _f$reAttempts, #symptoms: _f$symptoms, @@ -346,6 +353,8 @@ class SideEffectModelMapper extends SubClassMapperBase { additionalFields: data.dec(_f$additionalFields), id: data.dec(_f$id), projectId: data.dec(_f$projectId), + projectBeneficiaryClientReferenceId: + data.dec(_f$projectBeneficiaryClientReferenceId), taskClientReferenceId: data.dec(_f$taskClientReferenceId), reAttempts: data.dec(_f$reAttempts), symptoms: data.dec(_f$symptoms), @@ -392,10 +401,8 @@ mixin SideEffectModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - SideEffectModelMapper.ensureInitialized() - .isValueEqual(this as SideEffectModel, other)); + return SideEffectModelMapper.ensureInitialized() + .equalsValue(this as SideEffectModel, other); } @override @@ -426,6 +433,7 @@ abstract class SideEffectModelCopyWith<$R, $In extends SideEffectModel, $Out> {SideEffectAdditionalFields? additionalFields, String? id, String? projectId, + String? projectBeneficiaryClientReferenceId, String? taskClientReferenceId, int? reAttempts, List? symptoms, @@ -473,6 +481,7 @@ class _SideEffectModelCopyWithImpl<$R, $Out> {Object? additionalFields = $none, Object? id = $none, Object? projectId = $none, + Object? projectBeneficiaryClientReferenceId = $none, Object? taskClientReferenceId = $none, Object? reAttempts = $none, Object? symptoms = $none, @@ -487,6 +496,9 @@ class _SideEffectModelCopyWithImpl<$R, $Out> if (additionalFields != $none) #additionalFields: additionalFields, if (id != $none) #id: id, if (projectId != $none) #projectId: projectId, + if (projectBeneficiaryClientReferenceId != $none) + #projectBeneficiaryClientReferenceId: + projectBeneficiaryClientReferenceId, if (taskClientReferenceId != $none) #taskClientReferenceId: taskClientReferenceId, if (reAttempts != $none) #reAttempts: reAttempts, @@ -507,6 +519,9 @@ class _SideEffectModelCopyWithImpl<$R, $Out> data.get(#additionalFields, or: $value.additionalFields), id: data.get(#id, or: $value.id), projectId: data.get(#projectId, or: $value.projectId), + projectBeneficiaryClientReferenceId: data.get( + #projectBeneficiaryClientReferenceId, + or: $value.projectBeneficiaryClientReferenceId), taskClientReferenceId: data.get(#taskClientReferenceId, or: $value.taskClientReferenceId), reAttempts: data.get(#reAttempts, or: $value.reAttempts), @@ -616,10 +631,8 @@ mixin SideEffectAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - SideEffectAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as SideEffectAdditionalFields, other)); + return SideEffectAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as SideEffectAdditionalFields, other); } @override diff --git a/packages/registration_delivery/lib/models/entities/status.mapper.dart b/packages/registration_delivery/lib/models/entities/status.mapper.dart index 3f1896d6e..d14fb9e9b 100644 --- a/packages/registration_delivery/lib/models/entities/status.mapper.dart +++ b/packages/registration_delivery/lib/models/entities/status.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'status.dart'; diff --git a/packages/registration_delivery/lib/models/entities/task.mapper.dart b/packages/registration_delivery/lib/models/entities/task.mapper.dart index b334f9db3..2200cf74b 100644 --- a/packages/registration_delivery/lib/models/entities/task.mapper.dart +++ b/packages/registration_delivery/lib/models/entities/task.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'task.dart'; @@ -188,10 +188,8 @@ mixin TaskSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - TaskSearchModelMapper.ensureInitialized() - .isValueEqual(this as TaskSearchModel, other)); + return TaskSearchModelMapper.ensureInitialized() + .equalsValue(this as TaskSearchModel, other); } @override @@ -543,10 +541,8 @@ mixin TaskModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - TaskModelMapper.ensureInitialized() - .isValueEqual(this as TaskModel, other)); + return TaskModelMapper.ensureInitialized() + .equalsValue(this as TaskModel, other); } @override @@ -801,10 +797,8 @@ mixin TaskAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - TaskAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as TaskAdditionalFields, other)); + return TaskAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as TaskAdditionalFields, other); } @override diff --git a/packages/registration_delivery/lib/models/entities/task_resource.mapper.dart b/packages/registration_delivery/lib/models/entities/task_resource.mapper.dart index e8d69a39b..bad4526c4 100644 --- a/packages/registration_delivery/lib/models/entities/task_resource.mapper.dart +++ b/packages/registration_delivery/lib/models/entities/task_resource.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'task_resource.dart'; @@ -102,10 +102,8 @@ mixin TaskResourceSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - TaskResourceSearchModelMapper.ensureInitialized() - .isValueEqual(this as TaskResourceSearchModel, other)); + return TaskResourceSearchModelMapper.ensureInitialized() + .equalsValue(this as TaskResourceSearchModel, other); } @override @@ -315,10 +313,8 @@ mixin TaskResourceModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - TaskResourceModelMapper.ensureInitialized() - .isValueEqual(this as TaskResourceModel, other)); + return TaskResourceModelMapper.ensureInitialized() + .equalsValue(this as TaskResourceModel, other); } @override @@ -540,10 +536,8 @@ mixin TaskResourceAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - TaskResourceAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as TaskResourceAdditionalFields, other)); + return TaskResourceAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as TaskResourceAdditionalFields, other); } @override diff --git a/packages/registration_delivery/lib/pages/beneficiary/beneficiary_checklist.dart b/packages/registration_delivery/lib/pages/beneficiary/beneficiary_checklist.dart index c204e6090..97659817d 100644 --- a/packages/registration_delivery/lib/pages/beneficiary/beneficiary_checklist.dart +++ b/packages/registration_delivery/lib/pages/beneficiary/beneficiary_checklist.dart @@ -1,16 +1,20 @@ import 'dart:math'; import 'package:auto_route/auto_route.dart'; -import 'package:digit_components/digit_components.dart'; -import 'package:digit_components/utils/date_utils.dart'; -import 'package:digit_components/widgets/atoms/digit_toaster.dart'; -import 'package:digit_components/widgets/atoms/selection_card.dart'; import 'package:digit_data_model/data_model.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/utils/date_utils.dart'; +import 'package:digit_ui_components/widgets/atoms/pop_up_card.dart'; +import 'package:digit_ui_components/widgets/atoms/selection_card.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; +import 'package:digit_ui_components/widgets/molecules/show_pop_up.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:registration_delivery/models/entities/registration_delivery_enums.dart'; import 'package:registration_delivery/utils/constants.dart'; +import 'package:survey_form/survey_form.dart'; import '../../router/registration_delivery_router.gm.dart'; import '../../utils/i18_key_constants.dart' as i18; @@ -48,7 +52,7 @@ class _BeneficiaryChecklistPageState @override void initState() { context.read().add( - ServiceChecklistEvent( + ServiceSurveyFormEvent( value: Random().nextInt(100).toString(), submitTriggered: true, ), @@ -60,6 +64,7 @@ class _BeneficiaryChecklistPageState @override Widget build(BuildContext context) { final theme = Theme.of(context); + final textTheme = theme.digitTextTheme(context); return PopScope( canPop: false, @@ -99,398 +104,393 @@ class _BeneficiaryChecklistPageState }, ), ]), - enableFixedButton: true, + enableFixedDigitButton: true, footer: DigitCard( - margin: const EdgeInsets.fromLTRB(0, kPadding, 0, 0), - padding: - const EdgeInsets.fromLTRB(kPadding, 0, kPadding, 0), - child: DigitElevatedButton( - onPressed: () async { - // TODO: Submit checklist - final router = context.router; - submitTriggered = true; + margin: const EdgeInsets.only(top: spacer2), + children: [ + DigitButton( + label: localizations + .translate(i18.common.coreCommonSubmit), + type: DigitButtonType.primary, + size: DigitButtonSize.large, + mainAxisSize: MainAxisSize.max, + onPressed: () async { + // TODO: Submit checklist + final router = context.router; + submitTriggered = true; - context.read().add( - const ServiceChecklistEvent( - value: '', - submitTriggered: true, - ), - ); - final isValid = - checklistFormKey.currentState?.validate(); - if (!isValid!) { - return; - } - final itemsAttributes = initialAttributes; + context.read().add( + const ServiceSurveyFormEvent( + value: '', + submitTriggered: true, + ), + ); + final isValid = + checklistFormKey.currentState?.validate(); + if (!isValid!) { + return; + } + final itemsAttributes = initialAttributes; - var validChecklist = true; + var validChecklist = true; - for (int i = 0; i < controller.length; i++) { - if (itemsAttributes?[i].required == true && - ((itemsAttributes?[i].dataType == 'Boolean' && - (controller[i].text == '')))) { - setState(() { - validFields = false; - validChecklist = false; - }); - } - } + for (int i = 0; i < controller.length; i++) { + if (itemsAttributes?[i].required == true && + ((itemsAttributes?[i].dataType == 'Boolean' && + (controller[i].text == '')))) { + setState(() { + validFields = false; + validChecklist = false; + }); + } + } - if (!validChecklist) { - return; - } - List attributes = []; - for (int i = 0; i < controller.length; i++) { - final attribute = initialAttributes; - attributes.add(ServiceAttributesModel( - attributeCode: '${attribute?[i].code}', - dataType: attribute?[i].dataType, - clientReferenceId: IdGen.i.identifier, - referenceId: widget.beneficiaryClientRefId, - value: attribute?[i].dataType != 'SingleValueList' - ? controller[i] - .text - .toString() - .trim() - .isNotEmpty - ? controller[i].text.toString() - : '' - : visibleChecklistIndexes.contains(i) - ? controller[i].text.toString() - : i18.checklist.notSelectedKey, - rowVersion: 1, - tenantId: attribute?[i].tenantId, - additionalDetails: null, - )); - } + if (!validChecklist) { + return; + } + List attributes = []; + for (int i = 0; i < controller.length; i++) { + final attribute = initialAttributes; + attributes.add(ServiceAttributesModel( + attributeCode: '${attribute?[i].code}', + dataType: attribute?[i].dataType, + clientReferenceId: IdGen.i.identifier, + referenceId: widget.beneficiaryClientRefId, + value: + attribute?[i].dataType != 'SingleValueList' + ? controller[i] + .text + .toString() + .trim() + .isNotEmpty + ? controller[i].text.toString() + : '' + : visibleChecklistIndexes.contains(i) + ? controller[i].text.toString() + : i18.checklist.notSelectedKey, + rowVersion: 1, + tenantId: attribute?[i].tenantId, + additionalDetails: null, + )); + } - context.read().add( - ServiceCreateEvent( - serviceModel: ServiceModel( - createdAt: - DigitDateUtils.getDateFromTimestamp( - DateTime.now() - .toLocal() - .millisecondsSinceEpoch, - dateFormat: - Constants.checklistViewDateFormat, - ), - tenantId: selectedServiceDefinition!.tenantId, - clientId: - widget.beneficiaryClientRefId.toString(), - serviceDefId: selectedServiceDefinition?.id, - attributes: attributes, - rowVersion: 1, - accountId: - RegistrationDeliverySingleton().projectId, - additionalDetails: - { - "boundaryCode": RegistrationDeliverySingleton() - .boundary - ?.code - }, - auditDetails: AuditDetails( - createdBy: RegistrationDeliverySingleton() - .loggedInUserUuid!, - createdTime: - DateTime.now().millisecondsSinceEpoch, - ), - clientAuditDetails: ClientAuditDetails( - createdBy: RegistrationDeliverySingleton() - .loggedInUserUuid!, - createdTime: - DateTime.now().millisecondsSinceEpoch, - lastModifiedBy: - RegistrationDeliverySingleton() - .loggedInUserUuid!, - lastModifiedTime: - DateTime.now().millisecondsSinceEpoch, + context.read().add( + ServiceCreateEvent( + serviceModel: ServiceModel( + createdAt: + DigitDateUtils.getDateFromTimestamp( + DateTime.now() + .toLocal() + .millisecondsSinceEpoch, + dateFormat: + Constants.checklistViewDateFormat, + ), + tenantId: + selectedServiceDefinition!.tenantId, + clientId: widget.beneficiaryClientRefId + .toString(), + serviceDefId: + selectedServiceDefinition?.id, + attributes: attributes, + rowVersion: 1, + accountId: RegistrationDeliverySingleton() + .projectId, + additionalDetails: { + "boundaryCode": + RegistrationDeliverySingleton() + .boundary + ?.code + }, + auditDetails: AuditDetails( + createdBy: + RegistrationDeliverySingleton() + .loggedInUserUuid!, + createdTime: DateTime.now() + .millisecondsSinceEpoch, + ), + clientAuditDetails: ClientAuditDetails( + createdBy: + RegistrationDeliverySingleton() + .loggedInUserUuid!, + createdTime: DateTime.now() + .millisecondsSinceEpoch, + lastModifiedBy: + RegistrationDeliverySingleton() + .loggedInUserUuid!, + lastModifiedTime: DateTime.now() + .millisecondsSinceEpoch, + ), + ), ), - ), - ), - ); - - DigitDialog.show( - context, - options: DigitDialogOptions( - titleText: localizations.translate(i18 - .deliverIntervention - .beneficiaryChecklistDialogTitle), - titlePadding: const EdgeInsets.only(top: kPadding), - barrierDismissible: false, - enableRecordPast: true, - dialogPadding: const EdgeInsets.fromLTRB( - kPadding, - kPadding, - kPadding, - 0, - ), - contentPadding: EdgeInsets.zero, - primaryAction: DigitDialogActions( - label: localizations.translate( - i18.common.coreCommonYes, - ), - action: (ctx) { - Navigator.of(ctx).pop(); - ctx.router.push( - DeliverInterventionRoute(), - ); - }, - ), - secondaryAction: DigitDialogActions( - label: localizations.translate( - i18.common.coreCommonNo, - ), - action: (ctx) { - Navigator.of(ctx).pop(); - ctx.router.push( - RefusedDeliveryRoute(), ); - }, - ), - ), - ); - }, - child: Text( - localizations.translate(i18.common.coreCommonSubmit), - ), - ), - ), + + showCustomPopup( + context: context, + builder: (popUpContext) => Popup( + title: localizations.translate(i18 + .deliverIntervention + .beneficiaryChecklistDialogTitle), + type: PopUpType.simple, + actions: [ + DigitButton( + label: localizations.translate( + i18.common.coreCommonYes, + ), + onPressed: () { + context.router.push( + DeliverInterventionRoute(), + ); + Navigator.of(context, + rootNavigator: true) + .pop(); + }, + type: DigitButtonType.primary, + size: DigitButtonSize.large), + DigitButton( + label: localizations.translate( + i18.common.coreCommonNo, + ), + onPressed: () { + context.router.push( + RefusedDeliveryRoute(), + ); + Navigator.of( + context, + rootNavigator: true, + ).pop(); + }, + type: DigitButtonType.secondary, + size: DigitButtonSize.large) + ])); + }, + ), + ]), children: [ Form( key: checklistFormKey, //assigning key to form child: DigitCard( - padding: EdgeInsets.zero, - child: Column(children: [ - ...initialAttributes!.map(( - e, - ) { - int index = (initialAttributes ?? []).indexOf(e); + margin: const EdgeInsets.all(spacer2), + children: [ + ...initialAttributes!.map(( + e, + ) { + int index = (initialAttributes ?? []).indexOf(e); - return Column(children: [ - if (e.dataType == 'String' && - !(e.code ?? '').contains('.')) ...[ - DigitTextField( - onChange: (value) { - checklistFormKey.currentState?.validate(); - }, - isRequired: false, - controller: controller[index], - inputFormatter: [ - FilteringTextInputFormatter.allow(RegExp( - "[a-zA-Z0-9]", - )), - ], - validator: (value) { - if (((value == null || value == '') && - e.required == true)) { - return localizations - .translate("${e.code}_REQUIRED"); - } - if (e.regex != null) { - return (RegExp(e.regex!).hasMatch(value!)) - ? null - : localizations - .translate("${e.code}_REGEX"); - } + return Column(children: [ + if (e.dataType == 'String' && + !(e.code ?? '').contains('.')) ...[ + FormField( + autovalidateMode: + AutovalidateMode.onUserInteraction, + validator: (value) { + if (((value == null || value == '') && + e.required == true)) { + return localizations + .translate("${e.code}_REQUIRED"); + } + if (e.regex != null) { + return (RegExp(e.regex!).hasMatch(value!)) + ? null + : localizations + .translate("${e.code}_REGEX"); + } - return null; - }, + return null; + }, + builder: (field) => LabeledField( label: localizations.translate( '${selectedServiceDefinition?.code}.${e.code}', ), + isRequired: e.required ?? false, + child: DigitTextFormInput( + onChange: (value) { + field.didChange(value); + controller[index].text = value; + checklistFormKey.currentState?.validate(); + }, + isRequired: e.required ?? false, + controller: controller[index], + inputFormatters: [ + FilteringTextInputFormatter.allow(RegExp( + "[a-zA-Z0-9]", + )), + ], + ), ), - ] else if (e.dataType == 'Number' && - !(e.code ?? '').contains('.')) ...[ - DigitTextField( - onChange: (value) { - checklistFormKey.currentState?.validate(); - }, - textStyle: theme.textTheme.headlineMedium, - textInputType: TextInputType.number, - inputFormatter: [ - FilteringTextInputFormatter.allow(RegExp( - "[0-9]", - )), - ], - validator: (value) { - if (((value == null || value == '') && - e.required == true)) { - return localizations.translate( - i18.common.corecommonRequired, - ); - } - if (e.regex != null) { - return (RegExp(e.regex!).hasMatch(value!)) - ? null - : localizations - .translate("${e.code}_REGEX"); - } + ), + ] else if (e.dataType == 'Number' && + !(e.code ?? '').contains('.')) ...[ + FormField( + autovalidateMode: + AutovalidateMode.onUserInteraction, + validator: (value) { + if (((value == null || value == '') && + e.required == true)) { + return localizations.translate( + i18.common.corecommonRequired, + ); + } + if (e.regex != null) { + return (RegExp(e.regex!).hasMatch(value!)) + ? null + : localizations + .translate("${e.code}_REGEX"); + } - return null; - }, - controller: controller[index], - label: '${localizations.translate( + return null; + }, + builder: (field) => LabeledField( + label: localizations + .translate( '${value.selectedServiceDefinition?.code}.${e.code}', - ).trim()} ${e.required == true ? '*' : ''}', - ), - ] else if (e.dataType == 'MultiValueList' && - !(e.code ?? '').contains('.')) ...[ - Align( - alignment: Alignment.topLeft, - child: Padding( - padding: const EdgeInsets.all(8), - child: Column( - children: [ - Text( - '${localizations.translate( - '${selectedServiceDefinition?.code}.${e.code}', - )} ${e.required == true ? '*' : ''}', - style: theme.textTheme.headlineSmall, - ), - ], - ), + ) + .trim(), + isRequired: e.required ?? false, + child: DigitTextFormInput( + onChange: (value) { + field.didChange(value); + controller[index].text = value; + checklistFormKey.currentState?.validate(); + }, + keyboardType: TextInputType.number, + inputFormatters: [ + FilteringTextInputFormatter.allow(RegExp( + "[0-9]", + )), + ], + controller: controller[index], ), ), - BlocBuilder( - builder: (context, state) { - return Column( - children: e.values! - .map((e) => DigitCheckboxTile( - label: e, - value: controller[index] - .text - .split('.') - .contains(e), - onChanged: (value) { - context - .read() - .add( - ServiceChecklistEvent( - value: e.toString(), - submitTriggered: - submitTriggered, - ), - ); - final String ele; - var val = controller[index] - .text - .split('.'); - if (val.contains(e)) { - val.remove(e); - ele = val.join("."); - } else { - ele = - "${controller[index].text}.$e"; - } - controller[index].value = - TextEditingController - .fromValue( - TextEditingValue( - text: ele, - ), - ).value; - }, - )) - .toList(), - ); - }, + ), + ] else if (e.dataType == 'MultiValueList' && + !(e.code ?? '').contains('.')) ...[ + Align( + alignment: Alignment.topLeft, + child: Padding( + padding: const EdgeInsets.all(8), + child: Column( + children: [ + Text( + '${localizations.translate( + '${selectedServiceDefinition?.code}.${e.code}', + )} ${e.required == true ? '*' : ''}', + style: textTheme.headingM, + ), + ], + ), ), - ] else if (e.dataType == 'Boolean') ...[ - if (!(e.code ?? '').contains('.')) - DigitCard( - child: Column( - children: [ - Align( - alignment: Alignment.topLeft, - child: Padding( - padding: EdgeInsets.zero, - child: Column( - children: [ - Text( - '${localizations.translate( - '${selectedServiceDefinition?.code}.${e.code}', - )} ${e.required == true ? '*' : ''}', - style: theme - .textTheme.headlineSmall, - ), - ], - ), - ), - ), - BlocBuilder( - builder: (context, state) { - return SelectionBox( - //label: e, - allowMultipleSelection: false, - width: 110, - valueMapper: (value) { - return value - ? localizations.translate( - i18.common - .coreCommonYes, - ) - : localizations.translate( - i18.common.coreCommonNo, - ); - }, - errorMessage: (!validFields && - (controller[index].text == - '')) - ? localizations.translate(i18 - .common - .corecommonRequired) - : null, - initialSelection: - controller[index].text == - 'true' - ? [true] - : controller[index] - .text == - 'false' - ? [false] - : [], - options: const [true, false], - onSelectionChanged: (curValue) { - if (curValue.isNotEmpty) { - context - .read() - .add( - ServiceChecklistEvent( - value: curValue - .toString(), - submitTriggered: - submitTriggered, - ), - ); - setState(() { - controller[index].value = - TextEditingValue( - text: curValue.first - .toString(), + ), + BlocBuilder( + builder: (context, state) { + return Column( + children: e.values! + .map((e) => DigitCheckbox( + label: e, + value: controller[index] + .text + .split('.') + .contains(e), + onChanged: (value) { + context.read().add( + ServiceSurveyFormEvent( + value: e.toString(), + submitTriggered: + submitTriggered, + ), ); - }); + final String ele; + var val = controller[index] + .text + .split('.'); + if (val.contains(e)) { + val.remove(e); + ele = val.join("."); } else { - controller[index].value = - const TextEditingValue( - text: '', - ); + ele = + "${controller[index].text}.$e"; } + controller[index].value = + TextEditingController + .fromValue( + TextEditingValue( + text: ele, + ), + ).value; }, - ); + )) + .toList(), + ); + }, + ), + ] else if (e.dataType == 'Boolean') ...[ + if (!(e.code ?? '').contains('.')) + BlocBuilder( + builder: (context, state) { + return Align( + alignment: Alignment.topLeft, + child: SelectionCard( + showParentContainer: true, + title: localizations.translate( + '${selectedServiceDefinition?.code}.${e.code}', + ), + isRequired: e.required ?? false, + allowMultipleSelection: false, + width: 110, + valueMapper: (value) { + return value + ? localizations.translate( + i18.common.coreCommonYes, + ) + : localizations.translate( + i18.common.coreCommonNo, + ); + }, + errorMessage: (!validFields && + (controller[index].text == + '')) + ? localizations.translate( + i18.common.corecommonRequired) + : null, + initialSelection: + controller[index].text == 'true' + ? [true] + : controller[index].text == + 'false' + ? [false] + : [], + options: const [true, false], + onSelectionChanged: (curValue) { + if (curValue.isNotEmpty) { + context.read().add( + ServiceSurveyFormEvent( + value: + curValue.toString(), + submitTriggered: + submitTriggered, + ), + ); + setState(() { + controller[index].value = + TextEditingValue( + text: + curValue.first.toString(), + ); + }); + } else { + controller[index].value = + const TextEditingValue( + text: '', + ); + } }, ), - ], - ), + ); + }, ), - ], - ]); - }), - const SizedBox( - height: 15, - ), - ]), - ), + ], + ]); + }), + ]), ), ], ); diff --git a/packages/registration_delivery/lib/pages/beneficiary/beneficiary_details.dart b/packages/registration_delivery/lib/pages/beneficiary/beneficiary_details.dart index e0543da70..6423490fc 100644 --- a/packages/registration_delivery/lib/pages/beneficiary/beneficiary_details.dart +++ b/packages/registration_delivery/lib/pages/beneficiary/beneficiary_details.dart @@ -1,8 +1,12 @@ import 'package:auto_route/auto_route.dart'; import 'package:collection/collection.dart'; -import 'package:digit_components/digit_components.dart'; -import 'package:digit_components/utils/date_utils.dart'; import 'package:digit_data_model/data_model.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/utils/date_utils.dart'; +import 'package:digit_ui_components/widgets/atoms/pop_up_card.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; +import 'package:digit_ui_components/widgets/molecules/show_pop_up.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:intl/intl.dart'; @@ -19,6 +23,7 @@ import '../../utils/utils.dart'; import '../../widgets/back_navigation_help_header.dart'; import '../../widgets/component_wrapper/product_variant_bloc_wrapper.dart'; import '../../widgets/localized.dart'; +import '../../widgets/table_card/table_card.dart'; import 'widgets/record_delivery_cycle.dart'; @RoutePage() @@ -45,6 +50,7 @@ class BeneficiaryDetailsPageState final theme = Theme.of(context); final localizations = RegistrationDeliveryLocalization.of(context); final router = context.router; + final textTheme = theme.digitTextTheme(context); return ProductVariantBlocWrapper( child: BlocBuilder( @@ -127,7 +133,7 @@ class BeneficiaryDetailsPageState return Scaffold( body: ScrollableContent( - enableFixedButton: true, + enableFixedDigitButton: true, header: const Column(children: [ BackNavigationHelpHeaderWidget(), ]), @@ -141,115 +147,115 @@ class BeneficiaryDetailsPageState return cycles != null && cycles.isNotEmpty ? deliverState.hasCycleArrived ? DigitCard( - margin: const EdgeInsets.fromLTRB( - 0, kPadding, 0, 0), - padding: const EdgeInsets.fromLTRB( - kPadding, 0, kPadding, 0), - child: DigitElevatedButton( - onPressed: () async { - final selectedCycle = - cycles.firstWhereOrNull((c) => - c.id == deliverState.cycle); - if (selectedCycle != null) { - bloc.add( - DeliverInterventionEvent - .selectFutureCycleDose( - dose: deliverState.dose, - cycle: - RegistrationDeliverySingleton() - .projectType! - .cycles! - .firstWhere((c) => - c.id == - deliverState - .cycle), - individualModel: - state.selectedIndividual, - ), - ); - await DigitDialog.show( - context, - options: DigitDialogOptions( - titlePadding: - const EdgeInsets.fromLTRB( - kPadding, - 0, - kPadding, - 0, - ), - titleText: localizations - .translate(i18 - .beneficiaryDetails - .resourcesTobeDelivered), - content: buildTableContent( - deliverState, - context, - variant, - state.selectedIndividual, - state.householdMemberWrapper.household - ), - barrierDismissible: true, - primaryAction: - DigitDialogActions( - label: localizations - .translate(i18 - .beneficiaryDetails - .ctaProceed), - action: (ctx) { - Navigator.of(ctx).pop(); - router.push( - DeliverInterventionRoute(), - ); - }, - ), - ), - ); - } - }, - child: Center( - child: Text( - '${localizations.translate(i18.beneficiaryDetails.recordCycle)} ${(deliverState.cycle == 0 ? (deliverState.cycle + 1) : deliverState.cycle).toString()} ${localizations.translate(i18.deliverIntervention.dose)} ${(deliverState.dose).toString()}', + margin: + const EdgeInsets.only(top: spacer2), + padding: const EdgeInsets.all(spacer2), + children: [ + DigitButton( + label: + '${localizations.translate(i18.beneficiaryDetails.recordCycle)} ' + '${(deliverState.cycle == 0 ? (deliverState.cycle + 1) : deliverState.cycle).toString()} ${localizations.translate(i18.deliverIntervention.dose)} ' + '${(deliverState.dose).toString()}', + type: DigitButtonType.primary, + size: DigitButtonSize.large, + mainAxisSize: MainAxisSize.max, + onPressed: () async { + final selectedCycle = cycles + .firstWhereOrNull((c) => + c.id == + deliverState.cycle); + if (selectedCycle != null) { + bloc.add( + DeliverInterventionEvent + .selectFutureCycleDose( + dose: deliverState.dose, + cycle: + RegistrationDeliverySingleton() + .projectType! + .cycles! + .firstWhere((c) => + c.id == + deliverState + .cycle), + individualModel: state + .selectedIndividual, + ), + ); + showCustomPopup( + context: context, + builder: (popUpContext) => Popup( + title: localizations + .translate(i18 + .beneficiaryDetails + .resourcesTobeDelivered), + type: PopUpType.simple, + additionalWidgets: [ + buildTableContent( + deliverState, + context, + variant, + state + .selectedIndividual, + state + .householdMemberWrapper + .household), + ], + actions: [ + DigitButton( + label: localizations + .translate(i18 + .beneficiaryDetails + .ctaProceed), + onPressed: () { + Navigator.of( + context, + rootNavigator: + true, + ).pop(); + router.push( + DeliverInterventionRoute(), + ); + }, + type: + DigitButtonType + .primary, + size: + DigitButtonSize + .large), + ]), + ); + } + }, ), - ), - ), - ) + ]) : const SizedBox.shrink() : DigitCard( - margin: - const EdgeInsets.only(top: kPadding), - padding: const EdgeInsets.fromLTRB( - kPadding, 0, kPadding, 0), - child: DigitElevatedButton( - child: Center( - child: Text(localizations.translate(i18 - .householdOverView - .householdOverViewActionText)), - ), - onPressed: () { - context.router - .push(DeliverInterventionRoute()); - }, - ), - ); + margin: const EdgeInsets.only(top: spacer2), + padding: const EdgeInsets.all(spacer2), + children: [ + DigitButton( + label: localizations.translate(i18 + .householdOverView + .householdOverViewActionText), + type: DigitButtonType.primary, + size: DigitButtonSize.large, + mainAxisSize: MainAxisSize.max, + onPressed: () { + context.router.push( + DeliverInterventionRoute()); + }, + ), + ]); }, ), children: [ DigitCard( - child: Column( + margin: const EdgeInsets.all(spacer2), children: [ - Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Flexible( - child: Text( - localizations.translate(i18 - .beneficiaryDetails - .beneficiarysDetailsLabelText), - style: theme.textTheme.displayMedium, - ), - ), - ], + Text( + localizations.translate(i18.beneficiaryDetails + .beneficiarysDetailsLabelText), + style: textTheme.headingXl, ), DigitTableCard( element: { @@ -305,9 +311,8 @@ class BeneficiaryDetailsPageState } return maskString(identifiers - .first.identifierId - .toString()) ?? - '--'; + .first.identifierId + .toString()); }(), localizations.translate( i18.common.coreCommonAge, @@ -381,53 +386,51 @@ class BeneficiaryDetailsPageState }(), }, ), - ], - ), - ), + ]), if ((RegistrationDeliverySingleton() .projectType ?.cycles ?? []) .isNotEmpty) DigitCard( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: RegistrationDeliverySingleton() - .projectType - ?.cycles != - null - ? [ - BlocBuilder( - builder: (context, deliverState) { - return Column( - children: [ - (RegistrationDeliverySingleton() - .projectType - ?.cycles ?? - []) - .isNotEmpty - ? RecordDeliveryCycle( - projectCycles: - RegistrationDeliverySingleton() + margin: const EdgeInsets.all(spacer2), + children: [ + Column( + children: RegistrationDeliverySingleton() + .projectType + ?.cycles != + null + ? [ + BlocBuilder( + builder: (context, deliverState) { + return Column( + children: [ + (RegistrationDeliverySingleton() .projectType ?.cycles ?? - [], - taskData: - taskData ?? [], - individualModel: state - .selectedIndividual, - ) - : const Offstage(), - ], - ); - }, - ), - ] - : [], - ), - ) + []) + .isNotEmpty + ? RecordDeliveryCycle( + projectCycles: + RegistrationDeliverySingleton() + .projectType + ?.cycles ?? + [], + taskData: + taskData ?? [], + individualModel: state + .selectedIndividual, + ) + : const Offstage(), + ], + ); + }, + ), + ] + : [], + ), + ]) ], ), ); diff --git a/packages/registration_delivery/lib/pages/beneficiary/beneficiary_wrapper.dart b/packages/registration_delivery/lib/pages/beneficiary/beneficiary_wrapper.dart index c8fe2c357..8a786d6a2 100644 --- a/packages/registration_delivery/lib/pages/beneficiary/beneficiary_wrapper.dart +++ b/packages/registration_delivery/lib/pages/beneficiary/beneficiary_wrapper.dart @@ -3,6 +3,7 @@ import 'package:digit_data_model/data_model.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:registration_delivery/utils/utils.dart'; +import 'package:survey_form/survey_form.dart'; import '../../blocs/delivery_intervention/deliver_intervention.dart'; import '../../blocs/household_overview/household_overview.dart'; @@ -56,9 +57,6 @@ class BeneficiaryWrapperPage extends StatelessWidget { final referral = context.repository(context); - final serviceDefinationRepo = context.repository(context); - return MultiBlocProvider( providers: [ BlocProvider( diff --git a/packages/registration_delivery/lib/pages/beneficiary/deliver_intervention.dart b/packages/registration_delivery/lib/pages/beneficiary/deliver_intervention.dart index 29e580d8a..24ea7100d 100644 --- a/packages/registration_delivery/lib/pages/beneficiary/deliver_intervention.dart +++ b/packages/registration_delivery/lib/pages/beneficiary/deliver_intervention.dart @@ -1,13 +1,16 @@ import 'package:auto_route/auto_route.dart'; import 'package:collection/collection.dart'; -import 'package:digit_components/digit_components.dart'; -import 'package:digit_components/widgets/atoms/digit_stepper.dart'; -import 'package:digit_components/widgets/atoms/digit_toaster.dart'; -import 'package:digit_components/widgets/digit_sync_dialog.dart'; import 'package:digit_data_model/data_model.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/services/location_bloc.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/utils/component_utils.dart'; +import 'package:digit_ui_components/widgets/atoms/digit_stepper.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; import 'package:flutter/material.dart'; import 'package:flutter/scheduler.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:intl/intl.dart'; import 'package:reactive_forms/reactive_forms.dart'; import 'package:registration_delivery/models/entities/deliver_strategy_type.dart'; import 'package:registration_delivery/registration_delivery.dart'; @@ -111,14 +114,15 @@ class DeliverInterventionPageState HouseholdMemberWrapper householdMember, ProjectBeneficiaryModel projectBeneficiary) { if (context.mounted) { - DigitComponentsUtils().showLocationCapturingDialog( - context, - localizations.translate(i18.common.locationCapturing), - DigitSyncDialogType.inProgress); + DigitComponentsUtils.showDialog( + context, + localizations.translate(i18.common.locationCapturing), + DialogType.inProgress, + ); Future.delayed(const Duration(seconds: 2), () { // After delay, hide the initial dialog - DigitComponentsUtils().hideDialog(context); + DigitComponentsUtils.hideDialog(context); handleCapturedLocationState( locationState, context, @@ -133,13 +137,13 @@ class DeliverInterventionPageState @override Widget build(BuildContext context) { final theme = Theme.of(context); + final textTheme = theme.digitTextTheme(context); - List generateSteps(int numberOfDoses) { + List generateSteps(int numberOfDoses) { return List.generate(numberOfDoses, (index) { - return StepsModel( + return StepperData( title: '${localizations.translate(i18.deliverIntervention.dose)}${index + 1}', - number: (index + 1).toString(), ); }); } @@ -214,17 +218,12 @@ class DeliverInterventionPageState final steps = generateSteps(numberOfDoses); if ((productVariants ?? []).isEmpty && context.mounted) { SchedulerBinding.instance.addPostFrameCallback((_) { - DigitToast.show( - context, - options: DigitToastOptions( - localizations.translate( + Toast.showToast(context, + message: localizations.translate( i18.deliverIntervention .checkForProductVariantsConfig, ), - true, - theme, - ), - ); + type: ToastType.error); }); } @@ -248,116 +247,103 @@ class DeliverInterventionPageState ), builder: (context, form, child) { return ScrollableContent( - enableFixedButton: true, + enableFixedDigitButton: true, footer: BlocBuilder( builder: (context, state) { return DigitCard( - margin: const EdgeInsets.fromLTRB( - 0, kPadding, 0, 0), - padding: const EdgeInsets.fromLTRB( - kPadding, 0, kPadding, 0), - child: ValueListenableBuilder( - valueListenable: clickedStatus, - builder: - (context, bool isClicked, _) { - return BlocBuilder( - builder: - (context, locationState) { - return DigitElevatedButton( - onPressed: isClicked - ? null - : () async { - final deliveredProducts = - ((form.control(_resourceDeliveredKey) - as FormArray) - .value - as List< - ProductVariantModel?>); - final hasEmptyResources = - hasEmptyOrNullResources( - deliveredProducts); - final hasZeroQuantity = - hasEmptyOrZeroQuantity( - form); - final hasDuplicates = - hasDuplicateResources( - deliveredProducts, - form); - - if (hasEmptyResources) { - await DigitToast - .show( - context, - options: - DigitToastOptions( - localizations - .translate(i18 - .deliverIntervention - .resourceDeliveredValidation), - true, - theme, - ), - ); - } else if (hasDuplicates) { - await DigitToast - .show( - context, - options: - DigitToastOptions( - localizations - .translate(i18 - .deliverIntervention - .resourceDuplicateValidation), - true, - theme, - ), - ); - } else if (hasZeroQuantity) { - await DigitToast - .show( - context, - options: - DigitToastOptions( - localizations - .translate(i18 - .deliverIntervention - .resourceCannotBeZero), - true, - theme, - ), - ); - } else { - context - .read< - LocationBloc>() - .add( - const LoadLocationEvent()); - handleLocationState( - locationState, - context, - deliveryInterventionState, - form, - householdMemberWrapper, - projectBeneficiary! - .first, - ); - } - }, - child: Center( - child: Text( - localizations.translate( + margin: const EdgeInsets.only( + top: spacer2), + children: [ + ValueListenableBuilder( + valueListenable: clickedStatus, + builder: (context, + bool isClicked, _) { + return BlocBuilder< + LocationBloc, + LocationState>( + builder: (context, + locationState) { + return DigitButton( + label: localizations + .translate( i18.common .coreCommonSubmit, ), - ), - ), - ); - }); - }, - ), - ); + type: DigitButtonType + .primary, + size: + DigitButtonSize.large, + mainAxisSize: + MainAxisSize.max, + isDisabled: isClicked, + onPressed: () async { + final deliveredProducts = + ((form.control(_resourceDeliveredKey) + as FormArray) + .value + as List< + ProductVariantModel?>); + final hasEmptyResources = + hasEmptyOrNullResources( + deliveredProducts); + final hasZeroQuantity = + hasEmptyOrZeroQuantity( + form); + final hasDuplicates = + hasDuplicateResources( + deliveredProducts, + form); + + if (hasEmptyResources) { + Toast.showToast( + context, + message: localizations + .translate(i18 + .deliverIntervention + .resourceDeliveredValidation), + type: ToastType + .error); + } else if (hasDuplicates) { + Toast.showToast( + context, + message: localizations + .translate(i18 + .deliverIntervention + .resourceDuplicateValidation), + type: ToastType + .error); + } else if (hasZeroQuantity) { + Toast.showToast( + context, + message: localizations + .translate(i18 + .deliverIntervention + .resourceCannotBeZero), + type: ToastType + .error); + } else { + context + .read< + LocationBloc>() + .add( + const LoadLocationEvent()); + handleLocationState( + locationState, + context, + deliveryInterventionState, + form, + householdMemberWrapper, + projectBeneficiary! + .first, + ); + } + }, + ); + }); + }, + ), + ]); }, ), header: const Column(children: [ @@ -369,91 +355,97 @@ class DeliverInterventionPageState Column( children: [ DigitCard( - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, + margin: + const EdgeInsets.all(spacer2), children: [ Text( localizations.translate( i18.deliverIntervention .deliverInterventionLabel, ), - style: theme - .textTheme.displayMedium, + style: textTheme.headingXl, ), if (RegistrationDeliverySingleton() .beneficiaryType == BeneficiaryType.individual) - DigitTextFormField( - readOnly: true, + ReactiveWrapperField( formControlName: _doseAdministrationKey, - keyboardType: - TextInputType.number, - label: localizations - .translate(i18 - .deliverIntervention - .currentCycle), + builder: (field) => + LabeledField( + label: localizations + .translate(i18 + .deliverIntervention + .currentCycle), + child: DigitTextFormInput( + readOnly: true, + keyboardType: + TextInputType + .number, + initialValue: form + .control( + _doseAdministrationKey) + .value, + ), + ), ), if (numberOfDoses > 1) - DigitStepper( - activeStep: - deliveryInterventionState - .dose - - 1, - stepRadius: 12.5, - steps: steps, - maxStepReached: 3, - lineLength: (MediaQuery.of( - context) - .size - .width - - 12.5 * - 2 * - steps.length - - 50) / - (steps.length - 1), + SizedBox( + height: MediaQuery.sizeOf( + context) + .height * + 0.08, + child: DigitStepper( + activeIndex: + deliveryInterventionState + .dose - + 1, + stepperList: steps, + inverted: true, + ), ), - DigitDateFormPicker( - isEnabled: false, + ReactiveWrapperField( formControlName: _dateOfAdministrationKey, - label: - localizations.translate( - i18.householdDetails - .dateOfRegistrationLabel, - ), - confirmText: - localizations.translate( - i18.common.coreCommonOk, - ), - cancelText: - localizations.translate( - i18.common.coreCommonCancel, - ), - isRequired: false, - padding: - const EdgeInsets.only( - top: kPadding, + builder: (field) => + LabeledField( + label: + localizations.translate( + i18.householdDetails + .dateOfRegistrationLabel, + ), + child: DigitDateFormInput( + readOnly: true, + initialValue: DateFormat( + 'dd MMM yyyy') + .format(form + .control( + _dateOfAdministrationKey) + .value) + .toString(), + confirmText: localizations + .translate( + i18.common.coreCommonOk, + ), + cancelText: localizations + .translate( + i18.common + .coreCommonCancel, + ), + ), ), ), - ], - ), - ), + ]), DigitCard( - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, + margin: + const EdgeInsets.all(spacer2), children: [ Text( localizations.translate( i18.deliverIntervention .deliverInterventionResourceLabel, ), - style: theme - .textTheme.headlineLarge, + style: textTheme.headingXl, ), ..._controllers.map((e) => ResourceBeneficiaryCard( @@ -484,39 +476,17 @@ class DeliverInterventionPageState }, )), Center( - child: DigitIconButton( - onPressed: ((form.control(_resourceDeliveredKey) - as FormArray) - .value ?? - []) - .length < - (productVariants ?? - []) - .length - ? () async { - addController(form); - setState(() { - _controllers.add( - _controllers - .length, - ); - }); - } - : null, - icon: Icons.add_circle, - iconColor: ((form.control(_resourceDeliveredKey) - as FormArray) - .value ?? - []) - .length < - (productVariants ?? - []) - .length - ? theme.colorScheme - .secondary - : theme.colorScheme - .outline, - iconTextColor: ((form.control(_resourceDeliveredKey) + child: DigitButton( + label: + localizations.translate( + i18.deliverIntervention + .resourceAddBeneficiary, + ), + type: DigitButtonType + .tertiary, + size: + DigitButtonSize.medium, + isDisabled: ((form.control(_resourceDeliveredKey) as FormArray) .value ?? []) @@ -524,61 +494,74 @@ class DeliverInterventionPageState (productVariants ?? []) .length - ? theme.colorScheme - .secondary - : theme.colorScheme - .outline, - iconText: - localizations.translate( - i18.deliverIntervention - .resourceAddBeneficiary, - ), + ? false + : true, + onPressed: () async { + addController(form); + setState(() { + _controllers.add( + _controllers.length, + ); + }); + }, + prefixIcon: + Icons.add_circle, ), ), - ], - ), - ), + ]), DigitCard( - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, + margin: + const EdgeInsets.all(spacer2), children: [ Text( localizations.translate( i18.deliverIntervention .deliveryCommentHeading, ), - style: theme - .textTheme.headlineLarge, + style: textTheme.headingXl, ), - DigitReactiveSearchDropdown< - String>( - label: - localizations.translate( - i18.deliverIntervention - .deliveryCommentLabel, - ), - form: form, - menuItems: - RegistrationDeliverySingleton() - .deliveryCommentOptions! - .map((e) { - return localizations - .translate(e); - }).toList() - ..sort((a, b) => - a.compareTo(b)), + ReactiveWrapperField( formControlName: _deliveryCommentKey, - valueMapper: (value) => value, - emptyText: localizations - .translate(i18 - .common.noMatchFound), - ) - ], - ), - ), + builder: (field) => + LabeledField( + label: + localizations.translate( + i18.deliverIntervention + .deliveryCommentLabel, + ), + child: + DigitDropdown( + items: + RegistrationDeliverySingleton() + .deliveryCommentOptions! + .map((e) => + DropdownItem( + name: localizations + .translate( + e), + code: e, + )) + .toList() + ..sort((a, b) => a + .code + .compareTo( + b.code)), + emptyItemText: + localizations + .translate(i18 + .common + .noMatchFound), + onChange: (value) { + form + .control( + _deliveryCommentKey) + .value = value; + }, + ), + ), + ), + ]), ], ), ], @@ -805,8 +788,8 @@ class DeliverInterventionPageState ?.cycles![bloc.cycle - 1] .deliveries?[bloc.dose - 1], overViewbloc.selectedIndividual, - overViewbloc.householdMemberWrapper.household)! - .productVariants + overViewbloc.householdMemberWrapper.household) + ?.productVariants ?.length ?? 0; diff --git a/packages/registration_delivery/lib/pages/beneficiary/delivery_summary_page.dart b/packages/registration_delivery/lib/pages/beneficiary/delivery_summary_page.dart index 3d06173d8..00102ed38 100644 --- a/packages/registration_delivery/lib/pages/beneficiary/delivery_summary_page.dart +++ b/packages/registration_delivery/lib/pages/beneficiary/delivery_summary_page.dart @@ -1,7 +1,10 @@ import 'package:auto_route/auto_route.dart'; -import 'package:digit_components/digit_components.dart'; -import 'package:digit_components/widgets/atoms/details_card.dart'; import 'package:digit_data_model/data_model.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/widgets/atoms/label_value_list.dart'; +import 'package:digit_ui_components/widgets/atoms/pop_up_card.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; +import 'package:digit_ui_components/widgets/molecules/label_value_summary.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:recase/recase.dart'; @@ -11,13 +14,13 @@ import 'package:registration_delivery/models/entities/additional_fields_type.dar import 'package:registration_delivery/models/entities/status.dart'; import 'package:registration_delivery/router/registration_delivery_router.gm.dart'; import 'package:registration_delivery/utils/constants.dart'; -import 'package:registration_delivery/utils/utils.dart'; import 'package:registration_delivery/widgets/back_navigation_help_header.dart'; import 'package:registration_delivery/widgets/component_wrapper/product_variant_bloc_wrapper.dart'; import 'package:registration_delivery/widgets/showcase/showcase_button.dart'; import '../../../widgets/localized.dart'; import '../../utils/i18_key_constants.dart' as i18; +import '../../utils/utils.dart'; @RoutePage() class DeliverySummaryPage extends LocalizedStatefulWidget { @@ -47,15 +50,14 @@ class DeliverySummaryPageState extends LocalizedState { }, builder: (context, deliverState) { return ScrollableContent( - enableFixedButton: true, + enableFixedDigitButton: true, header: Column(children: [ const BackNavigationHelpHeaderWidget( showHelp: false, showcaseButton: ShowcaseButton(), ), Padding( - padding: - const EdgeInsets.only(bottom: kPadding, left: kPadding), + padding: const EdgeInsets.all(spacer2), child: Align( alignment: Alignment.centerLeft, child: Text( @@ -69,227 +71,267 @@ class DeliverySummaryPageState extends LocalizedState { ), ]), footer: DigitCard( - margin: const EdgeInsets.fromLTRB(0, kPadding, 0, 0), - padding: const EdgeInsets.fromLTRB(kPadding, 0, kPadding, 0), - child: ValueListenableBuilder( - valueListenable: clickedStatus, - builder: (context, bool isClicked, _) { - return DigitElevatedButton( - onPressed: isClicked - ? null - : () async { - final submit = await DigitDialog.show( - context, - options: DigitDialogOptions( - titleText: localizations.translate( - i18.deliverIntervention.dialogTitle), - contentText: localizations.translate( - i18.deliverIntervention.dialogContent), - primaryAction: DigitDialogActions( - label: localizations - .translate(i18.common.coreCommonSubmit), - action: (ctx) { - clickedStatus.value = true; - Navigator.of(context, rootNavigator: true) - .pop(true); - }, - ), - secondaryAction: DigitDialogActions( - label: localizations - .translate(i18.common.coreCommonCancel), - action: (context) => Navigator.of(context, - rootNavigator: true) - .pop(false), - ), - ), - ); - if (submit ?? false) { - if (context.mounted) { - context.read().add( - DeliverInterventionSubmitEvent( - task: deliverState.oldTask!, - isEditing: (deliverState.tasks ?? []) - .isNotEmpty && - RegistrationDeliverySingleton() - .beneficiaryType == - BeneficiaryType.household - ? true - : false, - boundaryModel: - RegistrationDeliverySingleton() - .boundary!, - ), - ); - - if (deliverState.futureDeliveries != null && - deliverState - .futureDeliveries!.isNotEmpty && - RegistrationDeliverySingleton() - .projectType - ?.cycles - ?.isNotEmpty == - true) { - context.router.popUntilRouteWithName( - BeneficiaryWrapperRoute.name, - ); - context.router.push( - SplashAcknowledgementRoute( - enableBackToSearch: false, - ), - ); - } else { - final reloadState = - context.read(); - - reloadState.add( - HouseholdOverviewReloadEvent( - projectId: + margin: const EdgeInsets.only(top: spacer2), + children: [ + ValueListenableBuilder( + valueListenable: clickedStatus, + builder: (context, bool isClicked, _) { + return DigitButton( + label: localizations + .translate(i18.common.coreCommonNext), + type: DigitButtonType.primary, + size: DigitButtonSize.large, + mainAxisSize: MainAxisSize.max, + isDisabled: isClicked ? true : false, + onPressed: () async { + final submit = await showDialog( + context: context, + builder: (ctx) => Popup( + title: localizations.translate( + i18.deliverIntervention.dialogTitle), + description: localizations.translate( + i18.deliverIntervention.dialogContent), + actions: [ + DigitButton( + label: localizations.translate( + i18.common.coreCommonSubmit), + onPressed: () { + clickedStatus.value = true; + Navigator.of(context, + rootNavigator: true) + .pop(true); + }, + type: DigitButtonType.primary, + size: DigitButtonSize.large), + DigitButton( + label: localizations.translate( + i18.common.coreCommonCancel), + onPressed: () => Navigator.of(context, + rootNavigator: true) + .pop(false), + type: DigitButtonType.secondary, + size: DigitButtonSize.large), + ], + ), + ); + if (submit ?? false) { + if (context.mounted) { + context.read().add( + DeliverInterventionSubmitEvent( + task: deliverState.oldTask!, + isEditing: (deliverState.tasks ?? []) + .isNotEmpty && + RegistrationDeliverySingleton() + .beneficiaryType == + BeneficiaryType.household + ? true + : false, + boundaryModel: RegistrationDeliverySingleton() - .projectId!, - projectBeneficiaryType: - RegistrationDeliverySingleton() - .beneficiaryType!, + .boundary!, ), ); - context.router.popAndPush( - HouseholdAcknowledgementRoute( - enableViewHousehold: true, - ), - ); - } + + if (deliverState.futureDeliveries != null && + deliverState.futureDeliveries!.isNotEmpty && + RegistrationDeliverySingleton() + .projectType + ?.cycles + ?.isNotEmpty == + true) { + context.router.popUntilRouteWithName( + BeneficiaryWrapperRoute.name, + ); + context.router.push( + SplashAcknowledgementRoute( + enableBackToSearch: false, + ), + ); + } else { + final reloadState = + context.read(); + + reloadState.add( + HouseholdOverviewReloadEvent( + projectId: RegistrationDeliverySingleton() + .projectId!, + projectBeneficiaryType: + RegistrationDeliverySingleton() + .beneficiaryType!, + ), + ); + context.router.popAndPush( + HouseholdAcknowledgementRoute( + enableViewHousehold: true, + ), + ); } } - }, - child: Center( - child: Text( - localizations.translate(i18.common.coreCommonNext), - ), - ), - ); - }, - ), - ), + } + }, + ); + }, + ), + ]), slivers: [ SliverToBoxAdapter( child: Column( children: [ DigitCard( - child: LabelValueList( - heading: localizations.translate(i18 - .householdLocation.householdLocationLabelText), - withDivider: true, - items: [ - LabelValuePair( - label: localizations.translate( - i18.householdLocation.villageLabel), - value: deliverState.householdMemberWrapper - ?.household?.address?.locality?.code - .split('_') - .last - .titleCase ?? - localizations - .translate(i18.common.coreCommonNA), - isInline: true), - LabelValuePair( - label: localizations.translate( - i18.householdLocation.landmarkFormLabel), - value: deliverState.householdMemberWrapper - ?.household?.address?.landmark ?? - localizations - .translate(i18.common.coreCommonNA), - isInline: true), - ]), - ), + margin: const EdgeInsets.all(spacer2), + children: [ + LabelValueSummary( + padding: EdgeInsets.zero, + heading: localizations.translate(i18 + .householdLocation + .householdLocationLabelText), + withDivider: true, + items: [ + LabelValueItem( + label: localizations.translate( + i18.householdLocation.villageLabel), + value: localizations.translate(deliverState + .householdMemberWrapper + ?.household + ?.address + ?.locality + ?.code + .split('_') + .last + .titleCase ?? + i18.common.coreCommonNA), + isInline: true, + labelFlex: 5, + ), + LabelValueItem( + label: localizations.translate(i18 + .householdLocation.landmarkFormLabel), + value: deliverState.householdMemberWrapper + ?.household?.address?.landmark ?? + localizations + .translate(i18.common.coreCommonNA), + isInline: true, + labelFlex: 5, + ), + ]), + ]), DigitCard( - child: LabelValueList( - heading: localizations.translate( - i18.householdDetails.householdDetailsLabel), - withDivider: true, - items: [ - LabelValuePair( - label: localizations.translate( - i18.beneficiaryDetails.totalMembers), - value: deliverState.householdMemberWrapper - ?.household?.memberCount - .toString() ?? - '0', - isInline: true), - LabelValuePair( - label: localizations.translate(i18 - .householdDetails - .noOfPregnantWomenCountLabel), - value: deliverState.householdMemberWrapper - ?.household?.additionalFields?.fields - .where((h) => - h.key == - AdditionalFieldsType.pregnantWomen - .toValue()) - .firstOrNull - ?.value - .toString() ?? - '0', - isInline: true), - LabelValuePair( - label: localizations.translate(i18 - .householdDetails - .noOfChildrenBelow5YearsLabel), - value: deliverState.householdMemberWrapper - ?.household?.additionalFields?.fields - .where((h) => - h.key == - AdditionalFieldsType.children - .toValue()) - .firstOrNull - ?.value - .toString() ?? - '0', - isInline: true), - ]), - ), + margin: const EdgeInsets.all(spacer2), + children: [ + LabelValueSummary( + padding: EdgeInsets.zero, + heading: localizations.translate( + i18.householdDetails.householdDetailsLabel), + withDivider: true, + items: [ + LabelValueItem( + label: localizations.translate( + i18.beneficiaryDetails.totalMembers), + value: deliverState.householdMemberWrapper + ?.household?.memberCount + .toString() ?? + '0', + isInline: true, + labelFlex: 5, + ), + LabelValueItem( + label: localizations.translate(i18 + .householdDetails + .noOfPregnantWomenCountLabel), + value: deliverState + .householdMemberWrapper + ?.household + ?.additionalFields + ?.fields + .where((h) => + h.key == + AdditionalFieldsType + .pregnantWomen + .toValue()) + .firstOrNull + ?.value + .toString() ?? + '0', + isInline: true, + labelFlex: 5, + ), + LabelValueItem( + label: localizations.translate(i18 + .householdDetails + .noOfChildrenBelow5YearsLabel), + value: deliverState + .householdMemberWrapper + ?.household + ?.additionalFields + ?.fields + .where((h) => + h.key == + AdditionalFieldsType.children + .toValue()) + .firstOrNull + ?.value + .toString() ?? + '0', + isInline: true, + labelFlex: 5, + ), + ]), + ]), DigitCard( - child: LabelValueList( - heading: localizations.translate( - i18.householdDetails.houseDetailsLabel), - withDivider: true, - items: [ - LabelValuePair( - label: localizations.translate( - i18.householdDetails.noOfRoomsLabel), - value: deliverState.householdMemberWrapper - ?.household?.additionalFields?.fields - .where((h) => - h.key == - AdditionalFieldsType.noOfRooms - .toValue()) - .firstOrNull - ?.value - .toString() ?? - '0', - isInline: true), - LabelValuePair( - label: localizations.translate( - i18.householdDetails.typeOfStructure), - value: (deliverState - .householdMemberWrapper - ?.household - ?.additionalFields - ?.fields - .where((h) => - h.key == - AdditionalFieldsType - .houseStructureTypes - .toValue()) - .firstOrNull - ?.value ?? - []) - .toString() - .split('|') - .map((item) => getLocalizedMessage(item)) - .toList() - .join(', '), - isInline: true), - ]), - ), + margin: const EdgeInsets.all(spacer2), + children: [ + LabelValueSummary( + padding: EdgeInsets.zero, + heading: localizations.translate( + i18.householdDetails.houseDetailsLabel), + withDivider: true, + items: [ + LabelValueItem( + label: localizations.translate( + i18.householdDetails.noOfRoomsLabel), + value: deliverState + .householdMemberWrapper + ?.household + ?.additionalFields + ?.fields + .where((h) => + h.key == + AdditionalFieldsType.noOfRooms + .toValue()) + .firstOrNull + ?.value + .toString() ?? + '0', + isInline: true, + labelFlex: 5, + ), + LabelValueItem( + label: localizations.translate( + i18.householdDetails.typeOfStructure), + value: (deliverState + .householdMemberWrapper + ?.household + ?.additionalFields + ?.fields + .where((h) => + h.key == + AdditionalFieldsType + .houseStructureTypes + .toValue()) + .firstOrNull + ?.value ?? + []) + .toString() + .split('|') + .map( + (item) => getLocalizedMessage(item)) + .toList() + .join(', '), + isInline: true, + labelFlex: 5, + ), + ]), + ]), BlocBuilder( builder: (context, productState) { final variants = productState.whenOrNull( @@ -314,50 +356,56 @@ class DeliverySummaryPageState extends LocalizedState { }, ); return DigitCard( - child: LabelValueList( - heading: localizations.translate( - '${RegistrationDeliverySingleton().selectedProject?.name.toUpperCase()}_${i18.deliverIntervention.deliveryDetailsLabel}_${deliverState.oldTask?.status}'), - withDivider: true, - items: [ - LabelValuePair( - label: localizations.translate(deliverState - .oldTask?.status == - Status.administeredFailed - .toValue() || - deliverState.oldTask?.status == - Status.beneficiaryRefused - .toValue() - ? i18.deliverIntervention - .reasonForRefusalLabel - : '${RegistrationDeliverySingleton().selectedProject?.name.toUpperCase()}_${i18.deliverIntervention.typeOfResourceUsed}'), - value: deliverState.oldTask?.status == - Status.administeredFailed - .toValue() || - deliverState.oldTask?.status == - Status.beneficiaryRefused - .toValue() - ? getLocalizedMessage(deliverState - .oldTask?.additionalFields?.fields - .where( - (d) => - d.key == - AdditionalFieldsType - .reasonOfRefusal - .toValue(), - ) - .firstOrNull - ?.value ?? - i18.common.coreCommonNA) - : variants - ?.map((e) => - '${getLocalizedMessage(e.productName)} : ${e.quantityDelivered}') - .toList() - .join('\n') ?? - localizations.translate( - i18.common.coreCommonNA), - ), - ]), - ); + margin: const EdgeInsets.all(spacer2), + children: [ + LabelValueSummary( + padding: EdgeInsets.zero, + heading: localizations.translate( + '${RegistrationDeliverySingleton().selectedProject?.projectType?.toUpperCase()}_${i18.deliverIntervention.deliveryDetailsLabel}_${deliverState.oldTask?.status}'), + withDivider: true, + items: [ + LabelValueItem( + label: localizations.translate(deliverState + .oldTask?.status == + Status.administeredFailed + .toValue() || + deliverState.oldTask?.status == + Status.beneficiaryRefused + .toValue() + ? i18.deliverIntervention + .reasonForRefusalLabel + : '${RegistrationDeliverySingleton().selectedProject?.projectType?.toUpperCase()}_${i18.deliverIntervention.typeOfResourceUsed}'), + value: deliverState.oldTask?.status == + Status.administeredFailed + .toValue() || + deliverState.oldTask?.status == + Status.beneficiaryRefused + .toValue() + ? getLocalizedMessage(deliverState + .oldTask + ?.additionalFields + ?.fields + .where( + (d) => + d.key == + AdditionalFieldsType + .reasonOfRefusal + .toValue(), + ) + .firstOrNull + ?.value ?? + i18.common.coreCommonNA) + : variants + ?.map((e) => + '${getLocalizedMessage(e.productName)} : ${e.quantityDelivered}') + .toList() + .join('\n') ?? + localizations.translate( + i18.common.coreCommonNA), + labelFlex: 5, + ), + ]), + ]); }), ], ), diff --git a/packages/registration_delivery/lib/pages/beneficiary/dose_administered.dart b/packages/registration_delivery/lib/pages/beneficiary/dose_administered.dart index 74cb1f27a..c48207880 100644 --- a/packages/registration_delivery/lib/pages/beneficiary/dose_administered.dart +++ b/packages/registration_delivery/lib/pages/beneficiary/dose_administered.dart @@ -1,14 +1,12 @@ import 'package:auto_route/auto_route.dart'; -import 'package:digit_components/blocs/location/location.dart'; -import 'package:digit_components/models/digit_table_model.dart'; -import 'package:digit_components/theme/digit_theme.dart'; -import 'package:digit_components/widgets/atoms/digit_radio_button_list.dart'; -import 'package:digit_components/widgets/digit_card.dart'; -import 'package:digit_components/widgets/digit_elevated_button.dart'; -import 'package:digit_components/widgets/molecules/digit_table.dart'; -import 'package:digit_components/widgets/molecules/digit_table_card.dart'; -import 'package:digit_components/widgets/scrollable_content.dart'; import 'package:digit_data_model/data_model.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/models/RadioButtonModel.dart'; +import 'package:digit_ui_components/services/location_bloc.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/atoms/table_cell.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_table.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:reactive_forms/reactive_forms.dart'; @@ -28,6 +26,7 @@ import '../../utils/utils.dart'; import '../../widgets/back_navigation_help_header.dart'; import '../../widgets/component_wrapper/product_variant_bloc_wrapper.dart'; import '../../widgets/localized.dart'; +import '../../widgets/table_card/table_card.dart'; @RoutePage() class DoseAdministeredPage extends LocalizedStatefulWidget { @@ -58,15 +57,19 @@ class DoseAdministeredPageState extends LocalizedState { final theme = Theme.of(context); final localizations = RegistrationDeliveryLocalization.of(context); final overViewBloc = context.read().state; + final textTheme = theme.digitTextTheme(context); // Define a list of TableHeader objects for the header of a table final headerListResource = [ - TableHeader( - localizations.translate(i18.beneficiaryDetails.beneficiaryDose), - cellKey: 'dose', + DigitTableColumn( + header: localizations.translate(i18.beneficiaryDetails.beneficiaryDose), + cellValue: 'dose', + width: MediaQuery.of(context).size.width / 2.18, ), - TableHeader( - localizations.translate(i18.beneficiaryDetails.beneficiaryResources), - cellKey: 'resources', + DigitTableColumn( + header: localizations + .translate(i18.beneficiaryDetails.beneficiaryResources), + cellValue: 'resources', + width: MediaQuery.of(context).size.width / 2.18, ), ]; @@ -79,7 +82,7 @@ class DoseAdministeredPageState extends LocalizedState { return ReactiveFormBuilder( form: () => buildForm(context), builder: (context, form, child) => ScrollableContent( - enableFixedButton: true, + enableFixedDigitButton: true, header: const Column(children: [ BackNavigationHelpHeaderWidget( showBackNavigation: false, @@ -87,263 +90,259 @@ class DoseAdministeredPageState extends LocalizedState { ), ]), footer: DigitCard( - margin: const EdgeInsets.fromLTRB(0, kPadding, 0, 0), - padding: - const EdgeInsets.fromLTRB(kPadding, 0, kPadding, 0), - child: ValueListenableBuilder( - valueListenable: clickedStatus, - builder: (context, bool isClicked, _) { - return DigitElevatedButton( - onPressed: isClicked - ? null - : () { - if (form - .control(_doseAdministeredKey) - .value == - null) { - clickedStatus.value = false; - form - .control(_doseAdministeredKey) - .setErrors({'': true}); - } - form.markAllAsTouched(); + margin: const EdgeInsets.only(top: spacer2), + padding: const EdgeInsets.all(spacer2), + children: [ + ValueListenableBuilder( + valueListenable: clickedStatus, + builder: (context, bool isClicked, _) { + return DigitButton( + label: localizations + .translate(i18.common.coreCommonNext), + type: DigitButtonType.primary, + size: DigitButtonSize.large, + mainAxisSize: MainAxisSize.max, + isDisabled: isClicked, + onPressed: () { + if (form.control(_doseAdministeredKey).value == + null) { + clickedStatus.value = false; + form + .control(_doseAdministeredKey) + .setErrors({'': true}); + } + form.markAllAsTouched(); - if (!form.valid) { - return; - } else { - final doseAdministered = form - .control(_doseAdministeredKey) - .value as KeyValue; - final lat = locationState.latitude; - final long = locationState.longitude; - clickedStatus.value = true; - final bloc = context - .read() - .state; - final event = - context.read(); + if (!form.valid) { + return; + } else { + final doseAdministered = form + .control(_doseAdministeredKey) + .value as bool; + final lat = locationState.latitude; + final long = locationState.longitude; + clickedStatus.value = true; + final bloc = context + .read() + .state; + final event = + context.read(); - if (doseAdministered.key == true && - context.mounted) { - // Iterate through future deliveries + if (doseAdministered == true && + context.mounted) { + // Iterate through future deliveries - for (var e in bloc.futureDeliveries!) { - int doseIndex = e.id; - final clientReferenceId = - IdGen.i.identifier; - final address = bloc.oldTask?.address; - // Create and dispatch a DeliverInterventionSubmitEvent with a new TaskModel - event - .add(DeliverInterventionSubmitEvent( - task: TaskModel( - projectId: - RegistrationDeliverySingleton() - .projectId, - address: address?.copyWith( - relatedClientReferenceId: - clientReferenceId, - id: null, - ), - status: Status.delivered.toValue(), - clientReferenceId: + for (var e in bloc.futureDeliveries!) { + int doseIndex = e.id; + final clientReferenceId = + IdGen.i.identifier; + final address = bloc.oldTask?.address; + // Create and dispatch a DeliverInterventionSubmitEvent with a new TaskModel + event.add(DeliverInterventionSubmitEvent( + task: TaskModel( + projectId: + RegistrationDeliverySingleton() + .projectId, + address: address?.copyWith( + relatedClientReferenceId: clientReferenceId, - projectBeneficiaryClientReferenceId: - bloc.oldTask - ?.projectBeneficiaryClientReferenceId, - tenantId: + id: null, + ), + status: Status.delivered.toValue(), + clientReferenceId: clientReferenceId, + projectBeneficiaryClientReferenceId: bloc + .oldTask + ?.projectBeneficiaryClientReferenceId, + tenantId: + RegistrationDeliverySingleton() + .tenantId, + rowVersion: 1, + auditDetails: AuditDetails( + createdBy: RegistrationDeliverySingleton() - .tenantId, - rowVersion: 1, - auditDetails: AuditDetails( - createdBy: - RegistrationDeliverySingleton() - .loggedInUserUuid!, - createdTime: context - .millisecondsSinceEpoch(), - ), - clientAuditDetails: - ClientAuditDetails( - createdBy: - RegistrationDeliverySingleton() - .loggedInUserUuid!, - createdTime: context - .millisecondsSinceEpoch(), - ), - resources: fetchProductVariant( - e, - overViewBloc - .selectedIndividual, - overViewBloc - .householdMemberWrapper - .household) - ?.productVariants - ?.map((variant) => - TaskResourceModel( - clientReferenceId: - IdGen.i.identifier, - tenantId: + .loggedInUserUuid!, + createdTime: context + .millisecondsSinceEpoch(), + ), + clientAuditDetails: + ClientAuditDetails( + createdBy: + RegistrationDeliverySingleton() + .loggedInUserUuid!, + createdTime: context + .millisecondsSinceEpoch(), + ), + resources: fetchProductVariant( + e, + overViewBloc + .selectedIndividual, + overViewBloc + .householdMemberWrapper + .household) + ?.productVariants + ?.map((variant) => + TaskResourceModel( + clientReferenceId: + IdGen.i.identifier, + tenantId: + RegistrationDeliverySingleton() + .tenantId, + taskclientReferenceId: + clientReferenceId, + quantity: variant.quantity + .toString(), + productVariantId: variant + .productVariantId, + isDelivered: true, + auditDetails: AuditDetails( + createdBy: RegistrationDeliverySingleton() - .tenantId, - taskclientReferenceId: - clientReferenceId, - quantity: variant.quantity - .toString(), - productVariantId: variant - .productVariantId, - isDelivered: true, - auditDetails: - AuditDetails( - createdBy: - RegistrationDeliverySingleton() - .loggedInUserUuid!, - createdTime: context - .millisecondsSinceEpoch(), - ), - clientAuditDetails: - ClientAuditDetails( - createdBy: - RegistrationDeliverySingleton() - .loggedInUserUuid!, - createdTime: context - .millisecondsSinceEpoch(), - ), - )) - .toList(), - additionalFields: - TaskAdditionalFields( - version: 1, - fields: [ - AdditionalField( - AdditionalFieldsType - .dateOfDelivery - .toValue(), - DateTime.now() - .millisecondsSinceEpoch - .toString(), - ), - AdditionalField( - AdditionalFieldsType - .dateOfAdministration - .toValue(), - DateTime.now() - .millisecondsSinceEpoch - .toString(), - ), - AdditionalField( - AdditionalFieldsType - .dateOfVerification - .toValue(), - DateTime.now() - .millisecondsSinceEpoch - .toString(), - ), - AdditionalField( - AdditionalFieldsType - .cycleIndex - .toValue(), - "0${bloc.cycle}", - ), + .loggedInUserUuid!, + createdTime: context + .millisecondsSinceEpoch(), + ), + clientAuditDetails: + ClientAuditDetails( + createdBy: + RegistrationDeliverySingleton() + .loggedInUserUuid!, + createdTime: context + .millisecondsSinceEpoch(), + ), + )) + .toList(), + additionalFields: + TaskAdditionalFields( + version: 1, + fields: [ + AdditionalField( + AdditionalFieldsType + .dateOfDelivery + .toValue(), + DateTime.now() + .millisecondsSinceEpoch + .toString(), + ), + AdditionalField( + AdditionalFieldsType + .dateOfAdministration + .toValue(), + DateTime.now() + .millisecondsSinceEpoch + .toString(), + ), + AdditionalField( + AdditionalFieldsType + .dateOfVerification + .toValue(), + DateTime.now() + .millisecondsSinceEpoch + .toString(), + ), + AdditionalField( + AdditionalFieldsType.cycleIndex + .toValue(), + "0${bloc.cycle}", + ), + AdditionalField( + AdditionalFieldsType.doseIndex + .toValue(), + "0$doseIndex", + ), + AdditionalField( + AdditionalFieldsType + .deliveryStrategy + .toValue(), + e.deliveryStrategy, + ), + if (lat != null) AdditionalField( - AdditionalFieldsType.doseIndex + AdditionalFieldsType.latitude .toValue(), - "0$doseIndex", + lat, ), + if (long != null) AdditionalField( - AdditionalFieldsType - .deliveryStrategy + AdditionalFieldsType.longitude .toValue(), - e.deliveryStrategy, + long, ), - if (lat != null) - AdditionalField( - AdditionalFieldsType - .latitude - .toValue(), - lat, - ), - if (long != null) - AdditionalField( - AdditionalFieldsType - .longitude - .toValue(), - long, - ), - ], - ), + ], ), - isEditing: false, - boundaryModel: - RegistrationDeliverySingleton() - .boundary!, - )); - } + ), + isEditing: false, + boundaryModel: + RegistrationDeliverySingleton() + .boundary!, + )); } + } - final reloadState = - context.read(); + final reloadState = + context.read(); - Future.delayed( - const Duration(milliseconds: 1000), - () { - reloadState - .add(HouseholdOverviewReloadEvent( - projectId: - RegistrationDeliverySingleton() - .projectId!, - projectBeneficiaryType: - RegistrationDeliverySingleton() - .beneficiaryType!, - )); - }, - ).then((value) => context.router.popAndPush( - HouseholdAcknowledgementRoute( - enableViewHousehold: true, - ), - )); - } - }, - child: Center( - child: Text( - localizations - .translate(i18.common.coreCommonNext), - ), - ), - ); - }, - ), - ), + Future.delayed( + const Duration(milliseconds: 1000), + () { + reloadState + .add(HouseholdOverviewReloadEvent( + projectId: + RegistrationDeliverySingleton() + .projectId!, + projectBeneficiaryType: + RegistrationDeliverySingleton() + .beneficiaryType!, + )); + }, + ).then((value) => context.router.popAndPush( + HouseholdAcknowledgementRoute( + enableViewHousehold: true, + ), + )); + } + }, + ); + }, + ), + ]), children: [ DigitCard( - child: Column( + margin: const EdgeInsets.only( + top: spacer2, bottom: spacer2), children: [ Text( localizations.translate( i18.deliverIntervention.wasTheDoseAdministered, ), - style: theme.textTheme.displayMedium, + style: textTheme.headingXl, ), - DigitRadioButtonList( - contentPadding: EdgeInsets.zero, - labelStyle: DigitTheme - .instance.mobileTheme.textTheme.headlineSmall, + ReactiveWrapperField( formControlName: _doseAdministeredKey, - valueMapper: (val) => - localizations.translate(val.label), - options: Constants.yesNo, - isRequired: true, - errorMessage: localizations.translate( - i18.common.corecommonRequired, + builder: (field) => RadioList( + radioDigitButtons: Constants.yesNo + .map((e) => RadioButtonModel( + code: e.key.toString(), + name: localizations.translate(e.label), + )) + .toList(), + errorMessage: + form.control(_doseAdministeredKey).hasErrors + ? localizations.translate( + i18.common.corecommonRequired, + ) + : null, + groupValue: form + .control(_doseAdministeredKey) + .value + .toString() ?? + '', + onChanged: (val) { + form.control(_doseAdministeredKey).value = + val.code == 'true' ? true : false; + }, ), - onValueChange: (val) { - setState(() { - doseAdministered = val - .key; // Update doseAdministered with setState - }); - }, ), - ], - ), - ), + ]), BlocBuilder( builder: (context, productState) { return productState.maybeWhen( @@ -356,100 +355,102 @@ class DoseAdministeredPageState extends LocalizedState { ); return DigitCard( - child: BlocBuilder( - builder: (context, deliveryState) { - List tableDataRows = - deliveryState.futureDeliveries!.map((e) { - int doseIndex = deliveryState - .futureDeliveries! - .indexOf(e) + - deliveryState.dose + - 1; - List skus = fetchProductVariant( - e, - overViewBloc.selectedIndividual, - overViewBloc.householdMemberWrapper - .household)! - .productVariants! - .map((ele) { - final pv = variant!.firstWhere( - (element) => - element.id == ele.productVariantId, - ); + margin: const EdgeInsets.only( + top: spacer2, bottom: spacer2), + children: [ + BlocBuilder( + builder: (context, deliveryState) { + List tableDataRows = + deliveryState.futureDeliveries! + .map((e) { + int doseIndex = deliveryState + .futureDeliveries! + .indexOf(e) + + deliveryState.dose + + 1; + List skus = fetchProductVariant( + e, + overViewBloc.selectedIndividual, + overViewBloc + .householdMemberWrapper + .household)! + .productVariants! + .map((ele) { + final pv = variant!.firstWhere( + (element) => + element.id == + ele.productVariantId, + ); - return '${ele.quantity} - ${pv.sku.toString()}'; - }).toList(); + return '${ele.quantity} - ${pv.sku.toString()}'; + }).toList(); - return TableDataRow([ - TableData( - 'Dose $doseIndex', - cellKey: 'dose', - ), - TableData( - skus.join(' + '), - cellKey: 'resources', - ), - ]); - }).toList(); - - return Column( - children: [ - Align( - alignment: Alignment.centerLeft, - child: Padding( - padding: const EdgeInsets.only( - bottom: kPadding * 2, + return DigitTableRow(tableRow: [ + DigitTableData( + 'Dose $doseIndex', + cellKey: 'dose', + ), + DigitTableData( + skus.join(' + '), + cellKey: 'resources', ), - child: Text( - localizations.translate( - i18.beneficiaryDetails - .resourcesTobeProvided, + ]); + }).toList(); + + return Column( + children: [ + Align( + alignment: Alignment.centerLeft, + child: Padding( + padding: const EdgeInsets.only( + bottom: spacer2 * 2, + ), + child: Text( + localizations.translate( + i18.beneficiaryDetails + .resourcesTobeProvided, + ), + style: textTheme.headingXl, + ), ), - style: - theme.textTheme.displayMedium, ), - ), - ), - DigitTableCard( - padding: - const EdgeInsets.only(bottom: 4.0), - topPadding: - const EdgeInsets.only(top: 4.0), - element: { - localizations.translate( - i18.beneficiaryDetails - .beneficiaryAge, - ): localizations.translate( - fetchProductVariant( - deliveryState - .futureDeliveries - ?.first, - overViewBloc - .selectedIndividual, - overViewBloc - .householdMemberWrapper - .household)! - .condition!), - }, - ), - const Divider( - thickness: 2.0, - ), - DigitTable( - headerList: headerListResource, - tableData: tableDataRows, - columnWidth: - MediaQuery.of(context).size.width / - 2.18, - height: - (tableDataRows.length + 1) * 57.5, - ), - ], - ); - }, - ), - ); + DigitTableCard( + element: { + localizations.translate( + i18.beneficiaryDetails + .beneficiaryAge, + ): localizations.translate( + fetchProductVariant( + deliveryState + .futureDeliveries + ?.first, + overViewBloc + .selectedIndividual, + overViewBloc + .householdMemberWrapper + .household)! + .condition!), + }, + ), + const Divider( + thickness: 2.0, + ), + DigitTable( + enableBorder: true, + showPagination: false, + showSelectedState: false, + columns: headerListResource, + rows: tableDataRows, + tableHeight: + (tableDataRows.length + 1) * + 57.5, + ), + ], + ); + }, + ), + ]); }, ); }, @@ -466,7 +467,7 @@ class DoseAdministeredPageState extends LocalizedState { FormGroup buildForm(BuildContext context) { return fb.group({ - _doseAdministeredKey: FormControl( + _doseAdministeredKey: FormControl( value: null, ), }); diff --git a/packages/registration_delivery/lib/pages/beneficiary/facility_selection.dart b/packages/registration_delivery/lib/pages/beneficiary/facility_selection.dart index 6ca094d1e..62d80a1f6 100644 --- a/packages/registration_delivery/lib/pages/beneficiary/facility_selection.dart +++ b/packages/registration_delivery/lib/pages/beneficiary/facility_selection.dart @@ -1,7 +1,8 @@ import 'package:auto_route/auto_route.dart'; import 'package:collection/collection.dart'; -import 'package:digit_components/digit_components.dart'; import 'package:digit_data_model/data_model.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; import 'package:flutter/material.dart'; import 'package:reactive_forms/reactive_forms.dart'; import 'package:registration_delivery/blocs/app_localization.dart'; @@ -24,12 +25,13 @@ class FacilitySelectionPage extends StatelessWidget { @override Widget build(BuildContext context) { RegistrationDeliveryLocalization localizations = - RegistrationDeliveryLocalization.of(context); + RegistrationDeliveryLocalization.of(context); final theme = Theme.of(context); final BorderSide borderSide = BorderSide( color: theme.colorScheme.outline, width: 1.0, ); + final textTheme = theme.digitTextTheme(context); return SafeArea( child: ReactiveFormBuilder( @@ -47,7 +49,6 @@ class FacilitySelectionPage extends StatelessWidget { .toLowerCase(); final lowerCaseQuery = query.toLowerCase(); return localizedFacilityIdWithPrefix.contains(lowerCaseQuery); - return false; }).toList(); return ScrollableContent( @@ -61,29 +62,33 @@ class FacilitySelectionPage extends StatelessWidget { color: Colors.white, child: Padding( padding: const EdgeInsets.symmetric( - horizontal: kPadding * 2), + horizontal: spacer2*2, + ), child: Column( children: [ Padding( - padding: const EdgeInsets.all(kPadding), + padding: const EdgeInsets.all(spacer2), child: Align( alignment: Alignment.topLeft, child: Text( localizations.translate( i18.common.facilitySearchHeaderLabel, ), - style: theme.textTheme.displayMedium, + style: textTheme.headingXl, textAlign: TextAlign.left, ), ), ), - const DigitTextFormField( - suffix: Padding( - padding: EdgeInsets.all(8.0), - child: Icon(Icons.search), + Padding( + padding: const EdgeInsets.all(spacer2), + child: ReactiveWrapperField( + formControlName: _facilityName, + builder: (field)=> DigitSearchFormInput( + onChange: (value){ + form.control(_facilityName).value=value; + }, + ), ), - label: '', - formControlName: _facilityName, ), ], ), @@ -92,22 +97,23 @@ class FacilitySelectionPage extends StatelessWidget { ), SliverList( delegate: SliverChildBuilderDelegate( - (context, index) { + (context, index) { final facility = filteredFacilities[index]; return Container( color: Colors.white, padding: const EdgeInsets.symmetric( - horizontal: kPadding), + horizontal: spacer2 + ), child: Container( margin: const EdgeInsets.symmetric( - horizontal: kPadding), + horizontal: spacer2), decoration: BoxDecoration( color: - DigitTheme.instance.colors.alabasterWhite, + DigitTheme.instance.colors.light.paperPrimary, border: Border( top: - index == 0 ? borderSide : BorderSide.none, + index == 0 ? borderSide : BorderSide.none, bottom: index == filteredFacilities.length - 1 ? borderSide : BorderSide.none, @@ -120,10 +126,10 @@ class FacilitySelectionPage extends StatelessWidget { Navigator.of(context).pop(facility); }, child: Container( - margin: const EdgeInsets.all(kPadding), + margin: const EdgeInsets.all(spacer2), decoration: BoxDecoration( color: DigitTheme - .instance.colors.alabasterWhite, + .instance.colors.light.paperPrimary, border: Border( bottom: BorderSide( color: theme.colorScheme.outline, @@ -132,7 +138,7 @@ class FacilitySelectionPage extends StatelessWidget { ), ), child: Padding( - padding: const EdgeInsets.all(kPadding * 2), + padding: const EdgeInsets.all(spacer2 * 2), child: Text( localizations .translate('FAC_${facility.id}'), diff --git a/packages/registration_delivery/lib/pages/beneficiary/household_overview.dart b/packages/registration_delivery/lib/pages/beneficiary/household_overview.dart index 61ca961b9..a6ea0f158 100644 --- a/packages/registration_delivery/lib/pages/beneficiary/household_overview.dart +++ b/packages/registration_delivery/lib/pages/beneficiary/household_overview.dart @@ -1,10 +1,20 @@ import 'package:auto_route/auto_route.dart'; import 'package:collection/collection.dart'; -import 'package:digit_components/digit_components.dart'; -import 'package:digit_components/utils/date_utils.dart'; import 'package:digit_data_model/data_model.dart'; +import 'package:digit_ui_components/enum/app_enums.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/theme/digit_theme.dart'; +import 'package:digit_ui_components/theme/spacers.dart'; +import 'package:digit_ui_components/utils/date_utils.dart'; +import 'package:digit_ui_components/widgets/atoms/digit_action_card.dart'; +import 'package:digit_ui_components/widgets/atoms/digit_button.dart'; +import 'package:digit_ui_components/widgets/atoms/pop_up_card.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; +import 'package:digit_ui_components/widgets/molecules/show_pop_up.dart'; +import 'package:digit_ui_components/widgets/scrollable_content.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:survey_form/survey_form.dart'; import '../../blocs/beneficiary_registration/beneficiary_registration.dart'; import '../../blocs/delivery_intervention/deliver_intervention.dart'; @@ -17,10 +27,10 @@ import '../../models/entities/status.dart'; import '../../router/registration_delivery_router.gm.dart'; import '../../utils/i18_key_constants.dart' as i18; import '../../utils/utils.dart'; -import '../../widgets/action_card/action_card.dart'; import '../../widgets/back_navigation_help_header.dart'; import '../../widgets/localized.dart'; import '../../widgets/member_card/member_card.dart'; +import '../../widgets/table_card/table_card.dart'; @RoutePage() class HouseholdOverviewPage extends LocalizedStatefulWidget { @@ -49,6 +59,7 @@ class _HouseholdOverviewPageState Widget build(BuildContext context) { final theme = Theme.of(context); final beneficiaryType = RegistrationDeliverySingleton().beneficiaryType!; + final textTheme = theme.digitTextTheme(context); return PopScope( onPopInvoked: (didPop) async { @@ -64,83 +75,49 @@ class _HouseholdOverviewPageState body: state.loading ? const Center(child: CircularProgressIndicator()) : ScrollableContent( - header: BackNavigationHelpHeaderWidget( - handleBack: (){ - context.read().add(const SearchHouseholdsEvent.clear()); + header: BackNavigationHelpHeaderWidget( + handleBack: () { + context + .read() + .add(const SearchHouseholdsEvent.clear()); }, ), - enableFixedButton: true, + enableFixedDigitButton: true, footer: Offstage( - offstage: beneficiaryType == BeneficiaryType.individual || isOutsideProjectDateRange(), + offstage: beneficiaryType == BeneficiaryType.individual || + isOutsideProjectDateRange(), child: BlocBuilder( builder: (context, serviceDefinitionState) => BlocBuilder( builder: (ctx, deliverInterventionState) => DigitCard( - margin: - const EdgeInsets.fromLTRB(0, kPadding, 0, 0), - padding: const EdgeInsets.fromLTRB( - kPadding, 0, kPadding, 0), - child: state.householdMemberWrapper.tasks?.lastOrNull?.status == - Status.administeredSuccess.toValue() - ? Padding( - padding: const EdgeInsets.symmetric( - vertical: kPadding), - child: DigitOutLineButton( - label: localizations.translate( - i18.memberCard - .deliverDetailsUpdateLabel, - ), - onPressed: state.householdMemberWrapper.tasks?.lastOrNull?.status == Status.administeredSuccess.toValue() ? null :() { - serviceDefinitionState.when( - empty: () {}, - isloading: () {}, - serviceDefinitionFetch: - (value, model) { - if (value - .where((element) => element - .code - .toString() - .contains( - '${RegistrationDeliverySingleton().selectedProject?.name}.${RegistrationDeliveryEnums.iec.toValue()}')) - .toList() - .isEmpty) { - context.router.push( - DeliverInterventionRoute(), - ); - } else { - navigateToChecklist(ctx); - } - }); - }, - ), - ) - : DigitElevatedButton( - onPressed: (state.householdMemberWrapper - .projectBeneficiaries ?? - []) - .isEmpty || - state.householdMemberWrapper.tasks - ?.lastOrNull?.status == - Status.closeHousehold.toValue() - ? null - : () async { - final bloc = ctx - .read(); - - final projectId = - RegistrationDeliverySingleton() - .projectId!; - - bloc.add( - HouseholdOverviewReloadEvent( - projectId: projectId, - projectBeneficiaryType: - beneficiaryType, - ), - ); - + margin: const EdgeInsets.only(top: spacer2), + children: [ + state.householdMemberWrapper.tasks?.lastOrNull + ?.status == + Status.administeredSuccess.toValue() + ? Padding( + padding: const EdgeInsets.symmetric( + vertical: spacer2), + child: DigitButton( + label: localizations.translate( + '${RegistrationDeliverySingleton().selectedProject!.projectType}_${i18.memberCard.deliverDetailsUpdateLabel}', + ), + capitalizeLetters: false, + isDisabled: state + .householdMemberWrapper + .tasks + ?.lastOrNull + ?.status == + Status.administeredSuccess + .toValue() + ? true + : false, + type: DigitButtonType.secondary, + size: DigitButtonSize.large, + mainAxisSize: MainAxisSize.max, + onPressed: () { serviceDefinitionState.when( empty: () {}, isloading: () {}, @@ -162,555 +139,644 @@ class _HouseholdOverviewPageState } }); }, - child: Center( - child: Text( - localizations.translate( - i18.householdOverView - .householdOverViewActionText, ), + ) + : DigitButton( + label: localizations.translate( + '${RegistrationDeliverySingleton().selectedProject!.projectType}_${i18.householdOverView.householdOverViewActionText}', + ), + capitalizeLetters: false, + type: DigitButtonType.primary, + size: DigitButtonSize.large, + mainAxisSize: MainAxisSize.max, + isDisabled: (state.householdMemberWrapper + .projectBeneficiaries ?? + []) + .isEmpty || + state + .householdMemberWrapper + .tasks + ?.lastOrNull + ?.status == + Status.closeHousehold + .toValue() + ? true + : false, + onPressed: () async { + final bloc = + ctx.read(); + + final projectId = + RegistrationDeliverySingleton() + .projectId!; + + bloc.add( + HouseholdOverviewReloadEvent( + projectId: projectId, + projectBeneficiaryType: + beneficiaryType, + ), + ); + + serviceDefinitionState.when( + empty: () {}, + isloading: () {}, + serviceDefinitionFetch: + (value, model) { + if (value + .where((element) => element + .code + .toString() + .contains( + '${RegistrationDeliverySingleton().selectedProject?.name}.${RegistrationDeliveryEnums.iec.toValue()}')) + .toList() + .isEmpty) { + context.router.push( + DeliverInterventionRoute(), + ); + } else { + navigateToChecklist(ctx); + } + }); + }, ), - ), - ), - ), + ]), ), ), ), slivers: [ SliverToBoxAdapter( child: DigitCard( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.max, + margin: const EdgeInsets.all(spacer2), children: [ - if ((state.householdMemberWrapper - .projectBeneficiaries ?? - []) - .isNotEmpty) - Align( - alignment: Alignment.centerLeft, - child: DigitIconButton( - onPressed: () { - final projectId = - RegistrationDeliverySingleton() - .projectId!; - - final bloc = - context.read(); - bloc.add( - HouseholdOverviewReloadEvent( - projectId: projectId, - projectBeneficiaryType: - beneficiaryType, - ), - ); - DigitActionDialog.show( - context, - widget: ActionCard( - items: [ - ActionCardModel( - icon: Icons.edit, - label: localizations.translate( - i18.householdOverView - .householdOverViewEditLabel, - ), - action: () async { - Navigator.of( - context, - rootNavigator: true, - ).pop(); - - HouseholdMemberWrapper wrapper = - state - .householdMemberWrapper; - - final timestamp = wrapper - .headOfHousehold - ?.clientAuditDetails - ?.createdTime; - final date = DateTime - .fromMillisecondsSinceEpoch( - timestamp ?? - DateTime.now() - .millisecondsSinceEpoch, - ); + Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.max, + children: [ + if ((state.householdMemberWrapper + .projectBeneficiaries ?? + []) + .isNotEmpty) + Align( + alignment: Alignment.centerLeft, + child: DigitButton( + onPressed: () { + final projectId = + RegistrationDeliverySingleton() + .projectId!; + + final bloc = context + .read(); + bloc.add( + HouseholdOverviewReloadEvent( + projectId: projectId, + projectBeneficiaryType: + beneficiaryType, + ), + ); + showDialog( + context: context, + builder: (ctx) => DigitActionCard( + actions: [ + DigitButton( + prefixIcon: Icons.edit, + label: + localizations.translate( + i18.householdOverView + .householdOverViewEditLabel, + ), + type: + DigitButtonType.secondary, + size: DigitButtonSize.large, + onPressed: () async { + Navigator.of( + context, + rootNavigator: true, + ).pop(); + + HouseholdMemberWrapper + wrapper = state + .householdMemberWrapper; + + final timestamp = wrapper + .headOfHousehold + ?.clientAuditDetails + ?.createdTime; + final date = DateTime + .fromMillisecondsSinceEpoch( + timestamp ?? + DateTime.now() + .millisecondsSinceEpoch, + ); - final address = - wrapper.household?.address; + final address = wrapper + .household?.address; - if (address == null) return; + if (address == null) return; - final projectBeneficiary = state - .householdMemberWrapper - .projectBeneficiaries - ?.firstWhereOrNull( - (element) => - element - .beneficiaryClientReferenceId == - wrapper.household - ?.clientReferenceId, - ); + final projectBeneficiary = state + .householdMemberWrapper + .projectBeneficiaries + ?.firstWhereOrNull( + (element) => + element + .beneficiaryClientReferenceId == + wrapper.household + ?.clientReferenceId, + ); - await context.router.root.push( - BeneficiaryRegistrationWrapperRoute( - initialState: - BeneficiaryRegistrationEditHouseholdState( - addressModel: address, - individualModel: state + await context.router.root + .push( + BeneficiaryRegistrationWrapperRoute( + initialState: + BeneficiaryRegistrationEditHouseholdState( + addressModel: address, + individualModel: state + .householdMemberWrapper + .members ?? + [], + householdModel: state .householdMemberWrapper - .members ?? - [], - householdModel: state - .householdMemberWrapper - .household!, - registrationDate: date, - projectBeneficiaryModel: - projectBeneficiary, - ), - children: [ - HouseholdLocationRoute(), - ], - ), - ); - }, + .household!, + registrationDate: + date, + projectBeneficiaryModel: + projectBeneficiary, + ), + children: [ + HouseholdLocationRoute(), + ], + ), + ); + }, + ), + ], ), - ], + ); + }, + label: localizations.translate( + i18.householdOverView + .householdOverViewEditIconText, ), - ); - }, - iconText: localizations.translate( - i18.householdOverView - .householdOverViewEditIconText, + type: DigitButtonType.tertiary, + size: DigitButtonSize.medium, + prefixIcon: Icons.edit, + ), + ), + // BlocBuilder( + // builder: (ctx, deliverInterventionState) => + // Offstage( + // offstage: beneficiaryType == + // BeneficiaryType.individual, + // child: Align( + // alignment: Alignment.centerLeft, + // child: DigitIconButton( + // icon: getStatusAttributes(state, + // deliverInterventionState)['icon'], + // iconText: localizations.translate( + // getStatusAttributes(state, + // deliverInterventionState)[ + // 'textLabel'], + // ), // [TODO: map task status accordingly based on projectBeneficiaries and tasks] + // iconTextColor: getStatusAttributes(state, + // deliverInterventionState)['color'], + // iconColor: getStatusAttributes(state, + // deliverInterventionState)['color'], + // ), + // ), + // ), + // ), + Padding( + padding: const EdgeInsets.all(spacer2), + child: Text( + localizations.translate(i18 + .householdOverView + .householdOverViewLabel), + style: textTheme.headingXl, ), - icon: Icons.edit, ), - ), - // BlocBuilder( - // builder: (ctx, deliverInterventionState) => - // Offstage( - // offstage: beneficiaryType == - // BeneficiaryType.individual, - // child: Align( - // alignment: Alignment.centerLeft, - // child: DigitIconButton( - // icon: getStatusAttributes(state, - // deliverInterventionState)['icon'], - // iconText: localizations.translate( - // getStatusAttributes(state, - // deliverInterventionState)[ - // 'textLabel'], - // ), // [TODO: map task status accordingly based on projectBeneficiaries and tasks] - // iconTextColor: getStatusAttributes(state, - // deliverInterventionState)['color'], - // iconColor: getStatusAttributes(state, - // deliverInterventionState)['color'], - // ), - // ), - // ), - // ), - Padding( - padding: const EdgeInsets.only( - left: kPadding, - right: kPadding, - ), - child: Text( - localizations.translate(i18.householdOverView - .householdOverViewLabel), - style: theme.textTheme.displayMedium, - ), - ), - Padding( - padding: const EdgeInsets.only( - left: kPadding, - right: kPadding, - ), - child: BlocBuilder( - builder: (ctx, deliverInterventionState) { - - bool shouldShowStatus = beneficiaryType == BeneficiaryType.household; - - return Column( - children: [ - DigitTableCard( - element: { - localizations.translate(i18 - .householdOverView - .householdOverViewHouseholdHeadNameLabel): - state + Padding( + padding: const EdgeInsets.only( + left: spacer2, + right: spacer2, + ), + child: BlocBuilder( + builder: + (ctx, deliverInterventionState) { + bool shouldShowStatus = beneficiaryType == + BeneficiaryType.household; + + return Column( + children: [ + DigitTableCard( + element: { + localizations.translate(i18 + .householdOverView + .householdOverViewHouseholdHeadNameLabel): + state + .householdMemberWrapper + .headOfHousehold + ?.name + ?.givenName ?? + localizations.translate( + i18.common + .coreCommonNA), + localizations.translate( + i18.householdLocation + .administrationAreaFormLabel, + ): localizations.translate(state .householdMemberWrapper .headOfHousehold - ?.name - ?.givenName ?? - localizations.translate( - i18.common.coreCommonNA), - localizations.translate( - i18.householdLocation - .administrationAreaFormLabel, - ): state.householdMemberWrapper.headOfHousehold?.address?.first.locality?.code, - localizations.translate( - i18.deliverIntervention - .memberCountText, - ): state.householdMemberWrapper - .household?.memberCount, - if(shouldShowStatus) - localizations.translate(i18 - .beneficiaryDetails - .status): localizations.translate( - getStatusAttributes(state, - deliverInterventionState)[ - 'textLabel'], - ) - }, - ), - ], - ); - }), - ), - Column( - children: - (state.householdMemberWrapper.members ?? []) - .map( - (e) { - final isHead = state - .householdMemberWrapper - .headOfHousehold - ?.clientReferenceId == - e.clientReferenceId; - final projectBeneficiaryId = state - .householdMemberWrapper - .projectBeneficiaries - ?.firstWhereOrNull((b) => - b.beneficiaryClientReferenceId == - e.clientReferenceId) - ?.clientReferenceId; - - final projectBeneficiary = state - .householdMemberWrapper - .projectBeneficiaries - ?.where( - (element) => - element - .beneficiaryClientReferenceId == - (RegistrationDeliverySingleton() - .beneficiaryType == - BeneficiaryType.individual - ? e.clientReferenceId - : state - .householdMemberWrapper - .household - ?.clientReferenceId), - ) - .toList(); - - final taskData = (projectBeneficiary ?? []) - .isNotEmpty - ? state.householdMemberWrapper.tasks - ?.where((element) => - element - .projectBeneficiaryClientReferenceId == - projectBeneficiary - ?.first.clientReferenceId) - .toList() - : null; - final referralData = (projectBeneficiary ?? + ?.address + ?.first + .locality + ?.code ?? + i18.common.coreCommonNA), + localizations.translate( + i18.deliverIntervention + .memberCountText, + ): state.householdMemberWrapper + .household?.memberCount, + if (shouldShowStatus) + localizations.translate(i18 + .beneficiaryDetails + .status): + localizations.translate( + getStatusAttributes(state, + deliverInterventionState)[ + 'textLabel'], + ) + }, + ), + ], + ); + }), + ), + Column( + children: + (state.householdMemberWrapper.members ?? []) - .isNotEmpty - ? state.householdMemberWrapper.referrals - ?.where((element) => - element - .projectBeneficiaryClientReferenceId == - projectBeneficiary - ?.first.clientReferenceId) - .toList() - : null; - final sideEffectData = taskData != null && - taskData.isNotEmpty - ? state - .householdMemberWrapper.sideEffects - ?.where((element) => - element.taskClientReferenceId == - taskData.lastOrNull?.clientReferenceId) - .toList() - : null; - final ageInYears = e.dateOfBirth != null - ? DigitDateUtils.calculateAge( - DigitDateUtils - .getFormattedDateToDateTime( - e.dateOfBirth!, - ) ?? - DateTime.now(), - ).years - : 0; - final ageInMonths = e.dateOfBirth != null - ? DigitDateUtils.calculateAge( - DigitDateUtils - .getFormattedDateToDateTime( - e.dateOfBirth!, - ) ?? - DateTime.now(), - ).months - : 0; - final currentCycle = - RegistrationDeliverySingleton() - .projectType - ?.cycles - ?.firstWhereOrNull( - (e) => - (e.startDate) < - DateTime.now() - .millisecondsSinceEpoch && - (e.endDate) > - DateTime.now() - .millisecondsSinceEpoch, - ); + .map( + (e) { + final isHead = state + .householdMemberWrapper + .headOfHousehold + ?.clientReferenceId == + e.clientReferenceId; + final projectBeneficiaryId = state + .householdMemberWrapper + .projectBeneficiaries + ?.firstWhereOrNull((b) => + b.beneficiaryClientReferenceId == + e.clientReferenceId) + ?.clientReferenceId; - final isBeneficiaryRefused = - checkIfBeneficiaryRefused( - taskData, - ); - final isBeneficiaryReferred = - checkIfBeneficiaryReferred( - referralData, - currentCycle, - ); - - return MemberCard( - isHead: isHead, - individual: e, - projectBeneficiaries: - projectBeneficiary ?? [], - tasks: taskData, - sideEffects: sideEffectData, - editMemberAction: () async { - final bloc = - ctx.read(); - - Navigator.of( - context, - rootNavigator: true, - ).pop(); - - final address = e.address; - if (address == null || - address.isEmpty) { - return; - } - - final projectId = - RegistrationDeliverySingleton() - .projectId!; - bloc.add( - HouseholdOverviewReloadEvent( - projectId: projectId, - projectBeneficiaryType: - beneficiaryType, - ), - ); + final projectBeneficiary = state + .householdMemberWrapper + .projectBeneficiaries + ?.where( + (element) => + element + .beneficiaryClientReferenceId == + (RegistrationDeliverySingleton() + .beneficiaryType == + BeneficiaryType + .individual + ? e.clientReferenceId + : state + .householdMemberWrapper + .household + ?.clientReferenceId), + ) + .toList(); - await context.router.root.push( - BeneficiaryRegistrationWrapperRoute( - initialState: - BeneficiaryRegistrationEditIndividualState( - individualModel: e, - householdModel: state - .householdMemberWrapper - .household!, - addressModel: address.first, - projectBeneficiaryModel: state - .householdMemberWrapper - .projectBeneficiaries - ?.firstWhereOrNull( - (element) => + final taskData = (projectBeneficiary ?? + []) + .isNotEmpty + ? state.householdMemberWrapper.tasks + ?.where((element) => element - .beneficiaryClientReferenceId == - (RegistrationDeliverySingleton() - .beneficiaryType == - BeneficiaryType - .individual - ? e.clientReferenceId - : state - .householdMemberWrapper - .household - ?.clientReferenceId), - ), - ), - children: [ - IndividualDetailsRoute( - isHeadOfHousehold: isHead, - ), - ], - ), + .projectBeneficiaryClientReferenceId == + projectBeneficiary?.first + .clientReferenceId) + .toList() + : null; + final referralData = (projectBeneficiary ?? + []) + .isNotEmpty + ? state.householdMemberWrapper + .referrals + ?.where((element) => + element + .projectBeneficiaryClientReferenceId == + projectBeneficiary?.first + .clientReferenceId) + .toList() + : null; + final sideEffectData = taskData != + null && + taskData.isNotEmpty + ? state.householdMemberWrapper + .sideEffects + ?.where((element) => + element + .taskClientReferenceId == + taskData.lastOrNull + ?.clientReferenceId) + .toList() + : null; + final ageInYears = e.dateOfBirth != null + ? DigitDateUtils.calculateAge( + DigitDateUtils + .getFormattedDateToDateTime( + e.dateOfBirth!, + ) ?? + DateTime.now(), + ).years + : 0; + final ageInMonths = + e.dateOfBirth != null + ? DigitDateUtils.calculateAge( + DigitDateUtils + .getFormattedDateToDateTime( + e.dateOfBirth!, + ) ?? + DateTime.now(), + ).months + : 0; + final currentCycle = + RegistrationDeliverySingleton() + .projectType + ?.cycles + ?.firstWhereOrNull( + (e) => + (e.startDate) < + DateTime.now() + .millisecondsSinceEpoch && + (e.endDate) > + DateTime.now() + .millisecondsSinceEpoch, + ); + + final isBeneficiaryRefused = + checkIfBeneficiaryRefused( + taskData, ); - }, - setAsHeadAction: () { - ctx.read().add( - HouseholdOverviewSetAsHeadEvent( - individualModel: e, - projectId: - RegistrationDeliverySingleton() - .projectId!, - householdModel: state - .householdMemberWrapper - .household!, + final isBeneficiaryReferred = + checkIfBeneficiaryReferred( + referralData, + currentCycle, + ); + + return MemberCard( + isHead: isHead, + individual: e, + projectBeneficiaries: + projectBeneficiary ?? [], + tasks: taskData, + sideEffects: sideEffectData, + editMemberAction: () async { + final bloc = ctx + .read(); + + Navigator.of( + context, + rootNavigator: true, + ).pop(); + + final address = e.address; + if (address == null || + address.isEmpty) { + return; + } + + final projectId = + RegistrationDeliverySingleton() + .projectId!; + bloc.add( + HouseholdOverviewReloadEvent( + projectId: projectId, projectBeneficiaryType: beneficiaryType, ), ); - Navigator.of( - context, - rootNavigator: true, - ).pop(); - }, - deleteMemberAction: () { - DigitDialog.show( - context, - options: DigitDialogOptions( - titlePadding: - const EdgeInsets.fromLTRB( - kPadding * 2, - kPadding * 2, - kPadding * 2, - kPadding / 2, - ), - titleText: localizations.translate(i18 - .householdOverView - .householdOverViewActionCardTitle), - primaryAction: DigitDialogActions( - label: localizations.translate(i18 - .householdOverView - .householdOverViewPrimaryActionLabel), - action: (ctx) { - Navigator.of( - context, - rootNavigator: true, - ) - ..pop() - ..pop(); - context - .read< - HouseholdOverviewBloc>() - .add( - HouseholdOverviewEvent - .selectedIndividual( - individualModel: e, - ), - ); - context.router.push( - ReasonForDeletionRoute( - isHousholdDelete: false, + await context.router.root.push( + BeneficiaryRegistrationWrapperRoute( + initialState: + BeneficiaryRegistrationEditIndividualState( + individualModel: e, + householdModel: state + .householdMemberWrapper + .household!, + addressModel: address.first, + projectBeneficiaryModel: state + .householdMemberWrapper + .projectBeneficiaries + ?.firstWhereOrNull( + (element) => + element + .beneficiaryClientReferenceId == + (RegistrationDeliverySingleton() + .beneficiaryType == + BeneficiaryType + .individual + ? e + .clientReferenceId + : state + .householdMemberWrapper + .household + ?.clientReferenceId), + ), + ), + children: [ + IndividualDetailsRoute( + isHeadOfHousehold: isHead, + ), + ], + ), + ); + }, + setAsHeadAction: () { + ctx + .read() + .add( + HouseholdOverviewSetAsHeadEvent( + individualModel: e, + projectId: + RegistrationDeliverySingleton() + .projectId!, + householdModel: state + .householdMemberWrapper + .household!, + projectBeneficiaryType: + beneficiaryType, ), ); + + Navigator.of( + context, + rootNavigator: true, + ).pop(); + }, + deleteMemberAction: () { + showCustomPopup( + context: context, + builder: (BuildContext) { + return Popup( + title: localizations + .translate(i18 + .householdOverView + .householdOverViewActionCardTitle), + type: PopUpType.simple, + actions: [ + DigitButton( + label: localizations + .translate(i18 + .householdOverView + .householdOverViewPrimaryActionLabel), + onPressed: () { + Navigator.of( + context, + rootNavigator: + true, + ) + ..pop() + ..pop(); + context + .read< + HouseholdOverviewBloc>() + .add( + HouseholdOverviewEvent + .selectedIndividual( + individualModel: + e, + ), + ); + context.router.push( + ReasonForDeletionRoute( + isHousholdDelete: + false, + ), + ); + }, + type: DigitButtonType + .primary, + size: DigitButtonSize + .large), + DigitButton( + label: localizations + .translate(i18 + .householdOverView + .householdOverViewSecondaryActionLabel), + onPressed: () { + Navigator.of( + context, + rootNavigator: + true, + ).pop(); + }, + type: DigitButtonType + .tertiary, + size: DigitButtonSize + .large) + ]); }, - ), - secondaryAction: DigitDialogActions( - label: localizations.translate(i18 - .householdOverView - .householdOverViewSecondaryActionLabel), - action: (context) { - Navigator.of( - context, - rootNavigator: true, - ).pop(); - }, - ), - ), - ); - }, - isNotEligible: RegistrationDeliverySingleton() - .projectType - ?.cycles != - null - ? !checkEligibilityForAgeAndSideEffect( - DigitDOBAge( - years: ageInYears, - months: ageInMonths, - ), + ); + }, + isNotEligible: RegistrationDeliverySingleton() - .projectType, - (taskData ?? []).isNotEmpty - ? taskData?.lastOrNull - : null, - sideEffectData, - ) - : false, - name: e.name?.givenName ?? ' - - ', - years: (e.dateOfBirth == null - ? null - : DigitDateUtils.calculateAge( - DigitDateUtils - .getFormattedDateToDateTime( - e.dateOfBirth!, - ) ?? - DateTime.now(), - ).years), - months: (e.dateOfBirth == null - ? null - : DigitDateUtils.calculateAge( - DigitDateUtils - .getFormattedDateToDateTime( - e.dateOfBirth!, - ) ?? - DateTime.now(), - ).months), - gender: e.gender?.name, - isBeneficiaryRefused: - isBeneficiaryRefused && - !checkStatus( - taskData, - currentCycle, - ), - isBeneficiaryReferred: - isBeneficiaryReferred, - isDelivered: taskData == null - ? false - : taskData.isNotEmpty && + .projectType + ?.cycles != + null + ? !checkEligibilityForAgeAndSideEffect( + DigitDOBAgeConvertor( + years: ageInYears, + months: ageInMonths, + ), + RegistrationDeliverySingleton() + .projectType, + (taskData ?? []) + .isNotEmpty + ? taskData?.lastOrNull + : null, + sideEffectData, + ) + : false, + name: e.name?.givenName ?? ' - - ', + years: (e.dateOfBirth == null + ? null + : DigitDateUtils.calculateAge( + DigitDateUtils + .getFormattedDateToDateTime( + e.dateOfBirth!, + ) ?? + DateTime.now(), + ).years), + months: (e.dateOfBirth == null + ? null + : DigitDateUtils.calculateAge( + DigitDateUtils + .getFormattedDateToDateTime( + e.dateOfBirth!, + ) ?? + DateTime.now(), + ).months), + gender: e.gender?.name, + isBeneficiaryRefused: + isBeneficiaryRefused && !checkStatus( taskData, currentCycle, - ) - ? true - : false, - localizations: localizations, - projectBeneficiaryClientReferenceId: - projectBeneficiaryId, - ); - }, - ).toList(), - ), - const SizedBox( - height: kPadding, - ), - Center( - child: DigitIconButton( - buttonDisabled: (state.householdMemberWrapper - .projectBeneficiaries ?? - []) - .isEmpty, - onPressed: (state.householdMemberWrapper + ), + isBeneficiaryReferred: + isBeneficiaryReferred, + isDelivered: taskData == null + ? false + : taskData.isNotEmpty && + !checkStatus( + taskData, + currentCycle, + ) + ? true + : false, + localizations: localizations, + projectBeneficiaryClientReferenceId: + projectBeneficiaryId, + ); + }, + ).toList(), + ), + const SizedBox( + height: spacer2, + ), + Center( + child: DigitButton( + isDisabled: (state.householdMemberWrapper .projectBeneficiaries ?? []) - .isEmpty - ? null - : () => addIndividual( - context, - state.householdMemberWrapper - .household!, - ), - iconText: localizations.translate( - i18.householdOverView - .householdOverViewAddActionText, + .isEmpty, + onPressed: () => addIndividual( + context, + state.householdMemberWrapper.household!, + ), + label: localizations.translate( + i18.householdOverView + .householdOverViewAddActionText, + ), + prefixIcon: Icons.add_circle, + type: DigitButtonType.tertiary, + size: DigitButtonSize.medium, + ), ), - icon: Icons.add_circle, - ), - ), - const SizedBox( - height: kPadding, + const SizedBox( + height: spacer2, + ), + ], ), - ], - ), - ), + ]), ), ], ), @@ -752,7 +818,7 @@ class _HouseholdOverviewPageState if (project?.startDate != null && project?.endDate != null) { final now = DateTime.now().millisecondsSinceEpoch; final startDate = project!.startDate!; - final endDate = project!.endDate!; + final endDate = project.endDate!; return now < startDate || now > endDate; } @@ -760,7 +826,6 @@ class _HouseholdOverviewPageState return false; } - getStatusAttributes(HouseholdOverviewState state, DeliverInterventionState deliverInterventionState) { var textLabel = @@ -770,7 +835,11 @@ class _HouseholdOverviewPageState if ((state.householdMemberWrapper.projectBeneficiaries ?? []).isNotEmpty) { textLabel = state.householdMemberWrapper.tasks?.isNotEmpty ?? false - ? getTaskStatus(state.householdMemberWrapper.tasks ?? []).toValue() + ? getTaskStatus(state.householdMemberWrapper.tasks ?? []).toValue() == + Status.administeredSuccess.toValue() + ? '${RegistrationDeliverySingleton().selectedProject!.projectType}_${getTaskStatus(state.householdMemberWrapper.tasks ?? []).toValue()}' + : getTaskStatus(state.householdMemberWrapper.tasks ?? []) + .toValue() : Status.registered.toValue(); color = state.householdMemberWrapper.tasks?.isNotEmpty ?? false diff --git a/packages/registration_delivery/lib/pages/beneficiary/record_past_delivery_details.dart b/packages/registration_delivery/lib/pages/beneficiary/record_past_delivery_details.dart index 2199df0d0..44b3712c8 100644 --- a/packages/registration_delivery/lib/pages/beneficiary/record_past_delivery_details.dart +++ b/packages/registration_delivery/lib/pages/beneficiary/record_past_delivery_details.dart @@ -1,7 +1,10 @@ import 'package:auto_route/auto_route.dart'; import 'package:collection/collection.dart'; -import 'package:digit_components/digit_components.dart'; -import 'package:digit_components/widgets/atoms/digit_radio_button_list.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/models/RadioButtonModel.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/atoms/pop_up_card.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:reactive_forms/reactive_forms.dart'; @@ -42,6 +45,7 @@ class RecordPastDeliveryDetailsPageState final theme = Theme.of(context); final localizations = RegistrationDeliveryLocalization.of(context); final router = context.router; + final textTheme = theme.digitTextTheme(context); final futureTaskList = widget.tasks ?.where((task) => task.status == Status.delivered.toValue()) @@ -59,195 +63,203 @@ class RecordPastDeliveryDetailsPageState ), ]), footer: DigitCard( - margin: const EdgeInsets.fromLTRB(0, kPadding, 0, 0), - padding: const EdgeInsets.fromLTRB(kPadding, 0, kPadding, 0), - child: DigitElevatedButton( - onPressed: () { - for (int i = 0; i < (futureTaskList ?? []).length; i++) { - if (form - .control("$_recordDoseAdministeredKey.$i") - .value == - null) { - form - .control("$_recordDoseAdministeredKey.$i") - .setErrors({'': true}); - } - } + margin: const EdgeInsets.only(top: spacer2), + padding: const EdgeInsets.all(spacer2), + children: [ + DigitButton( + label: localizations.translate(i18.common.coreCommonNext), + type: DigitButtonType.primary, + size: DigitButtonSize.large, + mainAxisSize: MainAxisSize.max, + onPressed: () { + for (int i = 0; + i < (futureTaskList ?? []).length; + i++) { + if (form + .control("$_recordDoseAdministeredKey.$i") + .value == + null) { + form + .control("$_recordDoseAdministeredKey.$i") + .setErrors({'': true}); + } + } - form.markAllAsTouched(); + form.markAllAsTouched(); - if (!form.valid) return; + if (!form.valid) return; - DigitDialog.show( - context, - options: DigitDialogOptions( - titleText: localizations.translate(i18 - .deliverIntervention - .didYouObservePreviousAdvEventsTitle), - barrierDismissible: false, - enableRecordPast: true, - dialogPadding: const EdgeInsets.fromLTRB( - kPadding, - kPadding, - kPadding, - 0, - ), - primaryAction: DigitDialogActions( - label: localizations.translate( - i18.common.coreCommonNo, - ), - action: (ctx) { - router.maybePop(); - final event = - context.read(); + showDialog( + context: context, + barrierDismissible: false, + builder: (ctx) => Popup( + title: localizations.translate(i18 + .deliverIntervention + .didYouObservePreviousAdvEventsTitle), + inlineActions: true, + actions: [ + DigitButton( + label: localizations.translate( + i18.common.coreCommonYes, + ), + onPressed: () async { + router.maybePop(); + final event = + context.read(); + final bloc = + context.read(); - for (int i = 0; - i < (futureTaskList ?? []).length; - i++) { - // Get the value of the form control for each task + for (int i = 0; + i < (futureTaskList ?? []).length; + i++) { + // Get the value of the form control for each task - final formControllValue = (form - .control( - "$_recordDoseAdministeredKey.$i", - ) - .value as KeyValue) - .key; + final formControlValue = (form + .control( + "$_recordDoseAdministeredKey.$i", + ) + .value as bool); - // Determine the status based on the form control value - final status = formControllValue - ? Status.administeredSuccess.toValue() - : Status.administeredFailed.toValue(); + // Determine the status based on the form control value + final status = formControlValue + ? Status.administeredSuccess.toValue() + : Status.administeredFailed.toValue(); - // Create a new task with the updated status - final result = - futureTaskList![i].copyWith(status: status); + // Create a new task with the updated status + final result = futureTaskList![i] + .copyWith(status: status); - // Add the updated task to the event - event.add(DeliverInterventionSubmitEvent( - task: result, - isEditing: true, - boundaryModel: - RegistrationDeliverySingleton().boundary!, - )); - } - final bloc = context.read(); + // Add the updated task to the event + event.add(DeliverInterventionSubmitEvent( + task: result, + isEditing: true, + boundaryModel: + RegistrationDeliverySingleton() + .boundary!, + )); + } + context.router.popUntilRouteWithName( + HouseholdOverviewRoute.name, + ); + Navigator.of(ctx).pop(); + final response = await router.push( + SideEffectsRoute( + tasks: [(futureTaskList ?? []).last], + ), + ); + if (response == null) { + bloc.add(HouseholdOverviewReloadEvent( + projectId: + RegistrationDeliverySingleton() + .projectId!, + projectBeneficiaryType: + RegistrationDeliverySingleton() + .beneficiaryType!, + )); + } + }, + type: DigitButtonType.secondary, + size: DigitButtonSize.medium), + DigitButton( + label: localizations.translate( + i18.common.coreCommonNo, + ), + onPressed: () { + router.maybePop(); + final event = + context.read(); - bloc.add(HouseholdOverviewReloadEvent( - projectId: - RegistrationDeliverySingleton().projectId!, - projectBeneficiaryType: - RegistrationDeliverySingleton() - .beneficiaryType!, - )); + for (int i = 0; + i < (futureTaskList ?? []).length; + i++) { + // Get the value of the form control for each task - event.add(DeliverInterventionSearchEvent( - taskSearch: TaskSearchModel( - projectBeneficiaryClientReferenceId: bloc.state - .householdMemberWrapper.projectBeneficiaries - ?.map((e) => e.clientReferenceId) - .toList(), - ), - )); - context.router.popUntilRouteWithName( - SearchBeneficiaryRoute.name, - ); - bloc.add(HouseholdOverviewReloadEvent( - projectId: - RegistrationDeliverySingleton().projectId!, - projectBeneficiaryType: - RegistrationDeliverySingleton() - .beneficiaryType!, - )); - Navigator.of(ctx).pop(); + final formControllValue = (form + .control( + "$_recordDoseAdministeredKey.$i", + ) + .value as bool); - router.push( - BeneficiaryDetailsRoute(), - ); - }, - ), - secondaryAction: DigitDialogActions( - label: localizations.translate( - i18.common.coreCommonYes, - ), - action: (ctx) async { - router.maybePop(); - final event = - context.read(); - final bloc = context.read(); + // Determine the status based on the form control value + final status = formControllValue + ? Status.administeredSuccess.toValue() + : Status.administeredFailed.toValue(); - for (int i = 0; - i < (futureTaskList ?? []).length; - i++) { - // Get the value of the form control for each task + // Create a new task with the updated status + final result = futureTaskList![i] + .copyWith(status: status); - final formControlValue = (form - .control( - "$_recordDoseAdministeredKey.$i", - ) - .value as KeyValue) - .key; + // Add the updated task to the event + event.add(DeliverInterventionSubmitEvent( + task: result, + isEditing: true, + boundaryModel: + RegistrationDeliverySingleton() + .boundary!, + )); + } + final bloc = + context.read(); - // Determine the status based on the form control value - final status = formControlValue - ? Status.administeredSuccess.toValue() - : Status.administeredFailed.toValue(); + bloc.add(HouseholdOverviewReloadEvent( + projectId: RegistrationDeliverySingleton() + .projectId!, + projectBeneficiaryType: + RegistrationDeliverySingleton() + .beneficiaryType!, + )); - // Create a new task with the updated status - final result = - futureTaskList![i].copyWith(status: status); + event.add(DeliverInterventionSearchEvent( + taskSearch: TaskSearchModel( + projectBeneficiaryClientReferenceId: + bloc.state.householdMemberWrapper + .projectBeneficiaries + ?.map( + (e) => e.clientReferenceId) + .toList(), + ), + )); + context.router.popUntilRouteWithName( + SearchBeneficiaryRoute.name, + ); + bloc.add(HouseholdOverviewReloadEvent( + projectId: RegistrationDeliverySingleton() + .projectId!, + projectBeneficiaryType: + RegistrationDeliverySingleton() + .beneficiaryType!, + )); + Navigator.of(ctx).pop(); - // Add the updated task to the event - event.add(DeliverInterventionSubmitEvent( - task: result, - isEditing: true, - boundaryModel: - RegistrationDeliverySingleton().boundary!, - )); - } - context.router.popUntilRouteWithName( - HouseholdOverviewRoute.name, - ); - Navigator.of(ctx).pop(); - final response = await router.push( - SideEffectsRoute( - tasks: [(futureTaskList ?? []).last], - ), - ); - if (response == null) { - bloc.add(HouseholdOverviewReloadEvent( - projectId: - RegistrationDeliverySingleton().projectId!, - projectBeneficiaryType: - RegistrationDeliverySingleton() - .beneficiaryType!, - )); - } - }, - ), - ), - ); - }, - child: Center( - child: Text( - localizations.translate(i18.common.coreCommonNext), + router.push( + BeneficiaryDetailsRoute(), + ); + }, + type: DigitButtonType.primary, + size: DigitButtonSize.medium), + ], + ), + ); + }, ), - ), - ), - ), + ]), children: [ - DigitCard( - child: Padding( + DigitCard(children: [ + Padding( padding: const EdgeInsets.symmetric( - horizontal: kPadding, - vertical: kPadding, + horizontal: spacer2, + vertical: spacer2, ), child: Column( children: [ - Text( - localizations.translate( - i18.deliverIntervention.recordPastDeliveryDeatils, + Padding( + padding: const EdgeInsets.all(spacer2), + child: Text( + localizations.translate( + i18.deliverIntervention.recordPastDeliveryDeatils, + ), + style: DigitTheme.instance.mobileTheme.textTheme.displayMedium, ), - style: theme.textTheme.displayMedium, ), ...(futureTaskList?.asMap().entries.map((entry) { final int doseNumber = int.parse( @@ -265,31 +277,54 @@ class RecordPastDeliveryDetailsPageState builder: (context, setState) { return Column( children: [ - DigitRadioButtonList( - labelText: - "${localizations.translate(i18.deliverIntervention.wasDosePastDeliveryDetails)} $doseNumber ${localizations.translate(i18.deliverIntervention.wasDosePastRecordDeliveryDetails)} ${localizations.translate(i18.beneficiaryDetails.beneficiaryDose)} ${doseNumber - 1} ? *", - labelStyle: DigitTheme - .instance - .mobileTheme - .textTheme - .headlineSmall, + ReactiveWrapperField( formControlName: "$_recordDoseAdministeredKey.${futureTaskList.indexOf(entry.value)}", - valueMapper: (val) => - localizations.translate(val.label), - options: Constants.yesNo, - onValueChange: (val) { - form - .control( - "$_recordDoseAdministeredKey.${futureTaskList.indexOf(entry.value)}", - ) - .value = val; - }, - errorMessage: localizations.translate( - i18.common.corecommonRequired, - ), - labelPadding: const EdgeInsets.only( - top: kPadding, + builder: (field) => LabeledField( + label: + "${localizations.translate(i18.deliverIntervention.wasDosePastDeliveryDetails)} $doseNumber ${localizations.translate(i18.deliverIntervention.wasDosePastRecordDeliveryDetails)} ${localizations.translate(i18.beneficiaryDetails.beneficiaryDose)} ${doseNumber - 1} ?", + isRequired: true, + labelStyle: DigitTheme + .instance + .mobileTheme + .textTheme + .headlineSmall, + padding: const EdgeInsets.only( + top: spacer2, + ), + child: RadioList( + radioDigitButtons: Constants.yesNo + .map((e) => RadioButtonModel( + code: e.key.toString(), + name: localizations + .translate(e.label), + )) + .toList(), + groupValue: form + .control( + "$_recordDoseAdministeredKey.${futureTaskList.indexOf(entry.value)}") + .value + .toString() ?? + '', + onChanged: (val) { + form + .control( + "$_recordDoseAdministeredKey.${futureTaskList.indexOf(entry.value)}") + .value = val.code == + 'true' + ? true + : false; + }, + errorMessage: form + .control( + "$_recordDoseAdministeredKey.${futureTaskList.indexOf(entry.value)}") + .hasErrors + ? localizations.translate( + i18.common + .corecommonRequired, + ) + : null, + ), ), ), if (entry.key != @@ -306,7 +341,7 @@ class RecordPastDeliveryDetailsPageState ], ), ), - ), + ]), ], ), ); @@ -316,8 +351,6 @@ class RecordPastDeliveryDetailsPageState } FormGroup buildForm(BuildContext context) { - final bloc = context.read().state; - final futureTaskList = widget.tasks ?.where((task) => task.status == Status.delivered.toValue()) .toList(); @@ -325,9 +358,9 @@ class RecordPastDeliveryDetailsPageState // Create a form group with a FormArray of KeyValue form controls return fb.group( { - _recordDoseAdministeredKey: FormArray([ + _recordDoseAdministeredKey: FormArray([ ...futureTaskList?.map( - (e) => FormControl(), + (e) => FormControl(), ) ?? [], ]), diff --git a/packages/registration_delivery/lib/pages/beneficiary/refer_beneficiary.dart b/packages/registration_delivery/lib/pages/beneficiary/refer_beneficiary.dart index 256fb74ef..f101d5e74 100644 --- a/packages/registration_delivery/lib/pages/beneficiary/refer_beneficiary.dart +++ b/packages/registration_delivery/lib/pages/beneficiary/refer_beneficiary.dart @@ -1,9 +1,12 @@ import 'package:auto_route/auto_route.dart'; -import 'package:digit_components/digit_components.dart'; -import 'package:digit_components/widgets/atoms/digit_radio_button_list.dart'; import 'package:digit_data_model/data_model.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/models/RadioButtonModel.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:intl/intl.dart'; import 'package:reactive_forms/reactive_forms.dart'; import 'package:registration_delivery/utils/extensions/extensions.dart'; @@ -62,6 +65,7 @@ class ReferBeneficiaryPageState extends LocalizedState { @override Widget build(BuildContext context) { final theme = Theme.of(context); + final textTheme = theme.digitTextTheme(context); return BlocConsumer( listener: (context, state) { @@ -93,280 +97,303 @@ class ReferBeneficiaryPageState extends LocalizedState { body: ReactiveFormBuilder( form: buildForm, builder: (context, form, child) => ScrollableContent( - enableFixedButton: true, + enableFixedDigitButton: true, header: const Column(children: [ BackNavigationHelpHeaderWidget(), ]), footer: DigitCard( - margin: const EdgeInsets.fromLTRB(0, kPadding, 0, 0), - padding: const EdgeInsets.fromLTRB(kPadding, 0, kPadding, 0), - child: ValueListenableBuilder( - valueListenable: clickedStatus, - builder: (context, bool isClicked, _) { - return DigitElevatedButton( - onPressed: isClicked - ? null - : () { - if (form.control(_referralReason).value == null) { - clickedStatus.value = false; - form - .control(_referralReason) - .setErrors({'': true}); - } - form.markAllAsTouched(); + margin: const EdgeInsets.only(top: spacer2), + padding: const EdgeInsets.all(spacer2), + children: [ + ValueListenableBuilder( + valueListenable: clickedStatus, + builder: (context, bool isClicked, _) { + return DigitButton( + label: localizations + .translate(i18.common.coreCommonSubmit), + type: DigitButtonType.primary, + size: DigitButtonSize.large, + mainAxisSize: MainAxisSize.max, + isDisabled: isClicked ? true : false, + onPressed: () { + if (form.control(_referralReason).value == null) { + clickedStatus.value = false; + } + form.markAllAsTouched(); - if (!form.valid) { - return; - } else { - clickedStatus.value = true; - final reason = form - .control(_referralReason) - .value as KeyValue; - final recipientType = - selectedProjectFacilityId == - 'Community Health Worker' - ? 'STAFF' - : 'FACILITY'; - final recipientId = selectedProjectFacilityId == - 'Community Health Worker' - ? RegistrationDeliverySingleton() - .loggedInUserUuid - : selectedProjectFacilityId; - final referralComment = - form.control(_referralComments).value; + if (!form.valid) { + return; + } else { + clickedStatus.value = true; + final reason = + form.control(_referralReason).value as String; + final recipientType = selectedProjectFacilityId == + 'Community Health Worker' + ? 'STAFF' + : 'FACILITY'; + final recipientId = selectedProjectFacilityId == + 'Community Health Worker' + ? RegistrationDeliverySingleton() + .loggedInUserUuid + : selectedProjectFacilityId; + final referralComment = + form.control(_referralComments).value; - final event = context.read(); - event.add(ReferralSubmitEvent( - ReferralModel( - clientReferenceId: IdGen.i.identifier, - projectId: RegistrationDeliverySingleton() - .projectId, - projectBeneficiaryClientReferenceId: - widget.projectBeneficiaryClientRefId, - referrerId: RegistrationDeliverySingleton() - .loggedInUserUuid, - recipientId: recipientId, - recipientType: recipientType, - reasons: [reason.key], - tenantId: RegistrationDeliverySingleton() - .tenantId, - rowVersion: 1, - auditDetails: AuditDetails( - createdBy: RegistrationDeliverySingleton() - .loggedInUserUuid!, - createdTime: - context.millisecondsSinceEpoch(), - lastModifiedBy: - RegistrationDeliverySingleton() - .loggedInUserUuid, - lastModifiedTime: - context.millisecondsSinceEpoch(), - ), - clientAuditDetails: ClientAuditDetails( - createdBy: RegistrationDeliverySingleton() - .loggedInUserUuid!, - createdTime: - context.millisecondsSinceEpoch(), - lastModifiedBy: + final event = context.read(); + event.add(ReferralSubmitEvent( + ReferralModel( + clientReferenceId: IdGen.i.identifier, + projectId: + RegistrationDeliverySingleton().projectId, + projectBeneficiaryClientReferenceId: + widget.projectBeneficiaryClientRefId, + referrerId: RegistrationDeliverySingleton() + .loggedInUserUuid, + recipientId: recipientId, + recipientType: recipientType, + reasons: [reason], + tenantId: + RegistrationDeliverySingleton().tenantId, + rowVersion: 1, + auditDetails: AuditDetails( + createdBy: RegistrationDeliverySingleton() + .loggedInUserUuid!, + createdTime: + context.millisecondsSinceEpoch(), + lastModifiedBy: + RegistrationDeliverySingleton() + .loggedInUserUuid, + lastModifiedTime: + context.millisecondsSinceEpoch(), + ), + clientAuditDetails: ClientAuditDetails( + createdBy: RegistrationDeliverySingleton() + .loggedInUserUuid!, + createdTime: + context.millisecondsSinceEpoch(), + lastModifiedBy: + RegistrationDeliverySingleton() + .loggedInUserUuid!, + lastModifiedTime: + context.millisecondsSinceEpoch(), + ), + additionalFields: ReferralAdditionalFields( + version: 1, + fields: [ + AdditionalField( + "boundaryCode", RegistrationDeliverySingleton() - .loggedInUserUuid!, - lastModifiedTime: - context.millisecondsSinceEpoch(), - ), - additionalFields: ReferralAdditionalFields( - version: 1, - fields: [ - if (referralComment != null && - referralComment - .toString() - .trim() - .isNotEmpty) - AdditionalField( - AdditionalFieldsType - .referralComments - .toValue(), - referralComment, - ), - ], - ), + .boundary + ?.code), + if (referralComment != null && + referralComment + .toString() + .trim() + .isNotEmpty) + AdditionalField( + AdditionalFieldsType.referralComments + .toValue(), + referralComment, + ), + ], ), - false, - )); + ), + false, + )); - final reloadState = - context.read(); + final reloadState = + context.read(); - Future.delayed( - const Duration(milliseconds: 500), - () { - reloadState - .add(HouseholdOverviewReloadEvent( - projectId: RegistrationDeliverySingleton() - .projectId!, - projectBeneficiaryType: - RegistrationDeliverySingleton() - .beneficiaryType!, - )); - }, - ).then((value) => context.router.popAndPush( - HouseholdAcknowledgementRoute( - enableViewHousehold: true, - ), - )); - } - }, - child: Center( - child: Text( - localizations.translate(i18.common.coreCommonSubmit), - ), - ), - ); - }, - ), - ), + Future.delayed( + const Duration(milliseconds: 500), + () { + reloadState.add(HouseholdOverviewReloadEvent( + projectId: RegistrationDeliverySingleton() + .projectId!, + projectBeneficiaryType: + RegistrationDeliverySingleton() + .beneficiaryType!, + )); + }, + ).then((value) => context.router.popAndPush( + HouseholdAcknowledgementRoute( + enableViewHousehold: true, + ), + )); + } + }, + ); + }, + ), + ]), slivers: [ SliverToBoxAdapter( - child: DigitCard( - child: Column( - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Expanded( - child: Text( - localizations.translate( - i18.referBeneficiary.referralDetails, - ), - style: theme.textTheme.displayMedium, - ), - ), - ], + child: DigitCard(children: [ + Text( + localizations.translate( + i18.referBeneficiary.referralDetails, + ), + style: textTheme.headingXl, + ), + ReactiveWrapperField( + formControlName: _dateOfReferralKey, + builder: (field) => LabeledField( + label: localizations.translate( + i18.referBeneficiary.dateOfReferralLabel, ), - Column(children: [ - DigitDateFormPicker( - isEnabled: false, - formControlName: _dateOfReferralKey, - label: localizations.translate( - i18.referBeneficiary.dateOfReferralLabel, - ), - isRequired: false, - initialDate: DateTime.now(), - cancelText: localizations - .translate(i18.common.coreCommonCancel), - confirmText: localizations - .translate(i18.common.coreCommonOk), - padding: const EdgeInsets.only( - bottom: kPadding, - top: kPadding, + child: DigitDateFormInput( + readOnly: true, + isRequired: false, + initialValue: DateFormat('dd MMM yyyy') + .format(form.control(_dateOfReferralKey).value) + .toString(), + initialDate: DateTime.now(), + cancelText: localizations + .translate(i18.common.coreCommonCancel), + confirmText: + localizations.translate(i18.common.coreCommonOk), + ), + ), + ), + ReactiveWrapperField( + formControlName: _administrativeUnitKey, + builder: (field) => LabeledField( + label: localizations.translate( + i18.referBeneficiary.administrationUnitFormLabel, + ), + isRequired: true, + child: DigitTextFormInput( + readOnly: true, + initialValue: + form.control(_administrativeUnitKey).value, + ), + ), + ), + ReactiveWrapperField( + formControlName: _referredByKey, + validationMessages: { + 'required': (_) => localizations.translate( + i18.common.corecommonRequired, ), + }, + builder: (field) => LabeledField( + label: localizations.translate( + i18.referBeneficiary.referredByLabel, + ), + isRequired: true, + child: DigitTextFormInput( + errorMessage: field.errorText, + onChange: (value) { + form.control(_referredByKey).value = value; + }, + initialValue: form.control(_referredByKey).value, + ), + ), + ), + InkWell( + onTap: () async { + final parent = context.router.parent() as StackRouter; + final facility = await parent.push( + FacilitySelectionRoute( + facilities: facilities, ), - DigitTextFormField( - formControlName: _administrativeUnitKey, + ) as FacilityModel?; + + if (facility == null) return; + form.control(_referredToKey).value = + localizations.translate('FAC_${facility.id}'); + setState(() { + selectedProjectFacilityId = facility.id; + }); + }, + child: IgnorePointer( + child: ReactiveWrapperField( + formControlName: _referredToKey, + validationMessages: { + 'required': (_) => localizations.translate( + i18.referBeneficiary + .facilityValidationMessage, + ), + }, + builder: (field) => LabeledField( label: localizations.translate( - i18.referBeneficiary.administrationUnitFormLabel, + i18.referBeneficiary.referredToLabel, ), isRequired: true, - readOnly: true, - ), - DigitTextFormField( - formControlName: _referredByKey, - label: localizations.translate( - i18.referBeneficiary.referredByLabel, - ), - validationMessages: { - 'required': (_) => localizations.translate( - i18.common.corecommonRequired, + child: DigitSearchFormInput( + // hideKeyboard: true, + // readOnly: true,r + errorMessage: field.errorText, + initialValue: form.control(_referredToKey).value, + onSuffixTap: (value) async { + final parent = + context.router.parent() as StackRouter; + final facility = await parent.push( + FacilitySelectionRoute( + facilities: facilities, ), - }, - isRequired: true, - ), - InkWell( - onTap: () async { - final parent = - context.router.parent() as StackRouter; - final facility = await parent.push( - FacilitySelectionRoute( - facilities: facilities, - ), - ) as FacilityModel?; - - if (facility == null) return; - form.control(_referredToKey).value = - localizations.translate('FAC_${facility.id}'); - setState(() { - selectedProjectFacilityId = facility.id; - }); - }, - child: IgnorePointer( - child: DigitTextFormField( - hideKeyboard: true, - label: localizations.translate( - i18.referBeneficiary.referredToLabel, - ), - isRequired: true, - suffix: const Padding( - padding: EdgeInsets.all(8.0), - child: Icon(Icons.search), - ), - formControlName: _referredToKey, - readOnly: true, - validationMessages: { - 'required': (_) => localizations.translate( - i18.referBeneficiary - .facilityValidationMessage, - ), - }, - onTap: () async { - final parent = - context.router.parent() as StackRouter; - final facility = await parent.push( - FacilitySelectionRoute( - facilities: facilities, - ), - ) as FacilityModel?; + ) as FacilityModel?; - if (facility == null) return; - form.control(_referredToKey).value = - localizations - .translate('FAC_${facility.id}'); + if (facility == null) return; + form.control(_referredToKey).value = + localizations + .translate('FAC_${facility.id}'); - setState(() { - selectedProjectFacilityId = facility.id; - }); - }, - ), + setState(() { + selectedProjectFacilityId = facility.id; + }); + }, ), ), - DigitRadioButtonList( - labelStyle: DigitTheme - .instance.mobileTheme.textTheme.bodyLarge, - formControlName: _referralReason, - valueMapper: (val) => - localizations.translate(val.label), - options: reasons, - labelText: localizations.translate( - i18.referBeneficiary.reasonForReferral, - ), - isRequired: true, - errorMessage: localizations.translate( + ), + ), + ), + ReactiveWrapperField( + formControlName: _referralReason, + validationMessages: { + 'required': (_) => localizations.translate( i18.common.corecommonRequired, ), - onValueChange: (val) { - form.control(_referralReason).value = val; + }, + builder: (field) => LabeledField( + label: localizations.translate( + i18.referBeneficiary.reasonForReferral, + ), + isRequired: true, + child: Align( + alignment: Alignment.topLeft, + child: RadioList( + radioDigitButtons: reasons + .map((e) => RadioButtonModel( + code: e.key.toString(), + name: localizations.translate(e.label))) + .toList(), + errorMessage: field.errorText, + groupValue: + form.control(_referralReason).value ?? '', + onChanged: (val) { + form.control(_referralReason).value = val.code; }, ), - DigitTextFormField( - formControlName: _referralComments, - label: localizations.translate( - i18.referBeneficiary.referralComments, - ), - minLines: 3, - maxLines: 3, - ), - ]), - ], + ), + ), + ), + ReactiveWrapperField( + formControlName: _referralComments, + builder: (field) => LabeledField( + label: localizations.translate( + i18.referBeneficiary.referralComments, + ), + child: DigitTextAreaFormInput( + maxLine: 3, + initialValue: form.control(_referralComments).value, + onChange: (value) { + form.control(_referralComments).value = value; + }, + ), + ), ), - ), + ]), ), ], ), @@ -387,7 +414,10 @@ class ReferBeneficiaryPageState extends LocalizedState { validators: [Validators.required], ), _referredToKey: FormControl(validators: [Validators.required]), - _referralReason: FormControl(value: null), + _referralReason: FormControl( + value: null, + validators: [Validators.required], + ), _referralComments: FormControl(value: null), }); } diff --git a/packages/registration_delivery/lib/pages/beneficiary/refused_delivery.dart b/packages/registration_delivery/lib/pages/beneficiary/refused_delivery.dart index 033d184ac..fb29c698c 100644 --- a/packages/registration_delivery/lib/pages/beneficiary/refused_delivery.dart +++ b/packages/registration_delivery/lib/pages/beneficiary/refused_delivery.dart @@ -1,9 +1,12 @@ import 'package:auto_route/auto_route.dart'; -import 'package:digit_components/digit_components.dart'; -import 'package:digit_components/widgets/atoms/selection_card.dart'; import 'package:digit_data_model/data_model.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/atoms/selection_card.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:intl/intl.dart'; import 'package:reactive_forms/reactive_forms.dart'; import 'package:registration_delivery/models/entities/additional_fields_type.dart'; import 'package:registration_delivery/registration_delivery.dart'; @@ -35,8 +38,6 @@ class RefusedDeliveryPageState extends LocalizedState { @override void initState() { - final registrationState = context.read().state; - super.initState(); } @@ -45,6 +46,7 @@ class RefusedDeliveryPageState extends LocalizedState { final theme = Theme.of(context); final bloc = context.read(); final router = context.router; + final textTheme = theme.digitTextTheme(context); return Scaffold( body: ReactiveFormBuilder( @@ -53,7 +55,7 @@ class RefusedDeliveryPageState extends LocalizedState { BlocBuilder( builder: (context, registrationState) { return ScrollableContent( - enableFixedButton: true, + enableFixedDigitButton: true, header: const Column( children: [ BackNavigationHelpHeaderWidget( @@ -63,199 +65,194 @@ class RefusedDeliveryPageState extends LocalizedState { ], ), footer: DigitCard( - margin: const EdgeInsets.fromLTRB(0, kPadding, 0, 0), - padding: - const EdgeInsets.fromLTRB(kPadding, 0, kPadding, 0), - child: DigitElevatedButton( - onPressed: () { - form.markAllAsTouched(); + margin: const EdgeInsets.only(top: spacer2), + padding: const EdgeInsets.all(spacer2), + children: [ + DigitButton( + label: localizations.translate( + i18.householdLocation.actionLabel, + ), + type: DigitButtonType.primary, + size: DigitButtonSize.large, + mainAxisSize: MainAxisSize.max, + onPressed: () { + form.markAllAsTouched(); - if (form.control(_reasonOfRefusal).value == null) { - setState(() { - form - .control(_reasonOfRefusal) - .setErrors({'': true}); - }); - } + if (form.control(_reasonOfRefusal).value == + null) { + setState(() { + form + .control(_reasonOfRefusal) + .setErrors({'': true}); + }); + } - if (!form.valid) return; + if (!form.valid) return; - final reasonOfRefusal = - form.control(_reasonOfRefusal).value; + final reasonOfRefusal = + form.control(_reasonOfRefusal).value; - final refusalComment = - form.control(_deliveryCommentKey).value; + final refusalComment = + form.control(_deliveryCommentKey).value; - final projectBeneficiary = - RegistrationDeliverySingleton().beneficiaryType != - BeneficiaryType.individual - ? [ - registrationState.householdMemberWrapper - .projectBeneficiaries?.first - ] - : registrationState.householdMemberWrapper - .projectBeneficiaries - ?.where( - (element) => - element - .beneficiaryClientReferenceId == - registrationState.selectedIndividual - ?.clientReferenceId, - ) - .toList(); + final projectBeneficiary = + RegistrationDeliverySingleton() + .beneficiaryType != + BeneficiaryType.individual + ? [ + registrationState + .householdMemberWrapper + .projectBeneficiaries + ?.first + ] + : registrationState.householdMemberWrapper + .projectBeneficiaries + ?.where( + (element) => + element + .beneficiaryClientReferenceId == + registrationState + .selectedIndividual + ?.clientReferenceId, + ) + .toList(); - // Determine the status based on the reason of refusal - String status; - if (reasonOfRefusal == - Status.beneficiaryRefused.toValue()) { - status = Status.beneficiaryRefused.toValue(); - } else { - status = Status.administeredFailed.toValue(); - } - final oldTask = - RegistrationDeliverySingleton().beneficiaryType != + // Determine the status based on the reason of refusal + String status; + if (reasonOfRefusal == + Status.beneficiaryRefused.toValue()) { + status = Status.beneficiaryRefused.toValue(); + } else { + status = Status.administeredFailed.toValue(); + } + final oldTask = RegistrationDeliverySingleton() + .beneficiaryType != BeneficiaryType.individual ? registrationState .householdMemberWrapper.tasks?.last : null; - context.read().add( - DeliverInterventionSubmitEvent( - navigateToSummary: true, - householdMemberWrapper: - registrationState.householdMemberWrapper, - task: _getTaskModel( - oldTask, - projectBeneficiary - ?.first?.clientReferenceId, - status, - reasonOfRefusal, - refusalComment, - registrationState.householdMemberWrapper - .members?.first.address?.first), - isEditing: false, - boundaryModel: - RegistrationDeliverySingleton().boundary!, - ), - ); - context.router.push(DeliverySummaryRoute()); - }, - child: Center( - child: Text( - localizations.translate( - i18.householdLocation.actionLabel, - ), + context.read().add( + DeliverInterventionSubmitEvent( + navigateToSummary: true, + householdMemberWrapper: registrationState + .householdMemberWrapper, + task: _getTaskModel( + oldTask, + projectBeneficiary + ?.first?.clientReferenceId, + status, + reasonOfRefusal, + refusalComment, + registrationState + .householdMemberWrapper + .members + ?.first + .address + ?.first), + isEditing: false, + boundaryModel: + RegistrationDeliverySingleton() + .boundary!, + ), + ); + context.router.push(DeliverySummaryRoute()); + }, ), - ), - ), - ), + ]), slivers: [ SliverToBoxAdapter( child: DigitCard( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, + margin: const EdgeInsets.all(spacer2), children: [ - Padding( - padding: const EdgeInsets.fromLTRB( - 0, 0, 0, kPadding), - child: Text( - localizations.translate( - i18.deliverIntervention - .refusedDeliveryLabel, - ), - style: theme.textTheme.displayMedium, + Text( + localizations.translate( + i18.deliverIntervention.refusedDeliveryLabel, + ), + style: textTheme.headingXl, + ), + refusedDeliveryShowcaseData.dateOfVisit.buildWith( + child: ReactiveWrapperField( + formControlName: _dataOfRefusalKey, + builder: (field) => LabeledField( + label: localizations.translate( + i18.deliverIntervention + .refusedDeliveryVisitDateLabel, ), - ), - Column(children: [ - refusedDeliveryShowcaseData.dateOfVisit - .buildWith( - child: DigitDateFormPicker( - isEnabled: false, - formControlName: _dataOfRefusalKey, - label: localizations.translate( - i18.deliverIntervention - .refusedDeliveryVisitDateLabel, - ), - confirmText: localizations.translate( - i18.common.coreCommonOk, - ), - cancelText: localizations.translate( - i18.common.coreCommonCancel, - ), - isRequired: false, - padding: const EdgeInsets.only( - top: kPadding, - ), + child: DigitDateFormInput( + readOnly: true, + confirmText: localizations.translate( + i18.common.coreCommonOk, ), - ), - const SizedBox( - height: kPadding, - ), - refusedDeliveryShowcaseData.reasonOfRefusal - .buildWith( - child: LabeledField( - label: localizations.translate( - i18.deliverIntervention - .reasonForRefusalLabel, - ), - isRequired: true, - child: SelectionBox( - width: MediaQuery.of(context).size.width * - .36, - allowMultipleSelection: false, - options: RegistrationDeliverySingleton() - .refusalReasons ?? - [], - onSelectionChanged: (value) { - form - .control(_reasonOfRefusal) - .markAsTouched(); - setState(() { - if (value.isNotEmpty) { - form - .control(_reasonOfRefusal) - .value = value.first; - } else { - form - .control(_reasonOfRefusal) - .value = null; - setState(() { - form - .control(_reasonOfRefusal) - .setErrors({'': true}); - }); - } - }); - }, - valueMapper: (value) { - return localizations.translate( - 'REASON_${value.toString()}'); - }, - errorMessage: form - .control(_reasonOfRefusal) - .hasErrors && - form - .control(_reasonOfRefusal) - .touched - ? localizations.translate( - i18.common.corecommonRequired) - : null, - ), + cancelText: localizations.translate( + i18.common.coreCommonCancel, ), + initialValue: DateFormat('dd MMM yyyy') + .format(form + .control(_dataOfRefusalKey) + .value), ), - refusedDeliveryShowcaseData.comments.buildWith( - child: DigitTextFormField( - formControlName: _deliveryCommentKey, - label: localizations.translate(i18 - .deliverIntervention - .reasonForRefusalCommentLabel), - ), + ), + ), + ), + refusedDeliveryShowcaseData.reasonOfRefusal.buildWith( + child: SelectionCard( + title: localizations.translate( + i18.deliverIntervention.reasonForRefusalLabel, + ), + showParentContainer: true, + isRequired: true, + width: MediaQuery.of(context).size.width * .34, + allowMultipleSelection: false, + options: RegistrationDeliverySingleton() + .refusalReasons ?? + [], + onSelectionChanged: (value) { + form.control(_reasonOfRefusal).markAsTouched(); + setState(() { + if (value.isNotEmpty) { + form.control(_reasonOfRefusal).value = + value.first; + } else { + form.control(_reasonOfRefusal).value = null; + setState(() { + form + .control(_reasonOfRefusal) + .setErrors({'': true}); + }); + } + }); + }, + valueMapper: (value) { + return localizations + .translate('REASON_${value.toString()}'); + }, + errorMessage: form + .control(_reasonOfRefusal) + .hasErrors && + form.control(_reasonOfRefusal).touched + ? localizations + .translate(i18.common.corecommonRequired) + : null, + ), + ), + refusedDeliveryShowcaseData.comments.buildWith( + child: ReactiveWrapperField( + formControlName: _deliveryCommentKey, + builder: (field) => LabeledField( + label: localizations.translate(i18 + .deliverIntervention + .reasonForRefusalCommentLabel), + child: DigitTextFormInput( + onChange: (value) { + form.control(_deliveryCommentKey).value = + value; + }, ), - ]), - ], + ), + ), ), - ), + ]), ), ], ); diff --git a/packages/registration_delivery/lib/pages/beneficiary/side_effects.dart b/packages/registration_delivery/lib/pages/beneficiary/side_effects.dart index 3f479f68c..28820929d 100644 --- a/packages/registration_delivery/lib/pages/beneficiary/side_effects.dart +++ b/packages/registration_delivery/lib/pages/beneficiary/side_effects.dart @@ -1,7 +1,10 @@ import 'package:auto_route/auto_route.dart'; import 'package:collection/collection.dart'; -import 'package:digit_components/digit_components.dart'; import 'package:digit_data_model/data_model.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/atoms/pop_up_card.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:registration_delivery/utils/extensions/extensions.dart'; @@ -16,8 +19,8 @@ import '../../utils/constants.dart'; import '../../utils/i18_key_constants.dart' as i18; import '../../utils/utils.dart'; import '../../widgets/back_navigation_help_header.dart'; -import '../../widgets/localized.dart'; import '../../widgets/component_wrapper/product_variant_bloc_wrapper.dart'; +import '../../widgets/localized.dart'; @RoutePage() class SideEffectsPage extends LocalizedStatefulWidget { @@ -58,6 +61,7 @@ class SideEffectsPageState extends LocalizedState { @override Widget build(BuildContext context) { final theme = Theme.of(context); + final textTheme = theme.digitTextTheme(context); return ProductVariantBlocWrapper( child: BlocBuilder( @@ -78,272 +82,256 @@ class SideEffectsPageState extends LocalizedState { showHelp: false, ), footer: DigitCard( - margin: const EdgeInsets.fromLTRB( - 0, kPadding, 0, 0), - padding: const EdgeInsets.fromLTRB( - kPadding, 0, kPadding, 0), - child: DigitElevatedButton( - onPressed: () async { - if (symptomsValues.any((e) => e)) { - setState(() { - symptomsSelected = true; - }); + margin: const EdgeInsets.only(top: spacer2), + padding: const EdgeInsets.all(spacer2), + children: [ + DigitButton( + label: localizations.translate( + i18.common.coreCommonNext, + ), + type: DigitButtonType.primary, + size: DigitButtonSize.large, + mainAxisSize: MainAxisSize.max, + onPressed: () async { + if (symptomsValues.any((e) => e)) { + setState(() { + symptomsSelected = true; + }); - final shouldSubmit = - await DigitDialog.show( - context, - options: DigitDialogOptions( - titleText: localizations.translate( - i18.deliverIntervention - .dialogTitle, - ), - contentText: - localizations.translate( - i18.deliverIntervention - .dialogContent, - ), - primaryAction: DigitDialogActions( - label: localizations.translate( - i18.common.coreCommonSubmit, - ), - action: (ctx) { - final List symptoms = - []; + final shouldSubmit = + await showDialog( + context: context, + builder: (ctx) => Popup( + title: localizations.translate( + i18.deliverIntervention + .dialogTitle, + ), + description: + localizations.translate( + i18.deliverIntervention + .dialogContent, + ), + actions: [ + DigitButton( + label: localizations + .translate( + i18.common + .coreCommonSubmit, + ), + onPressed: () { + final List + symptoms = []; - for (int i = 0; - i < symptomsValues.length; - i++) { - if (symptomsValues[i]) { - symptoms.add( - symptomsTypes[i], - ); - } - } + for (int i = 0; + i < + symptomsValues + .length; + i++) { + if (symptomsValues[ + i]) { + symptoms.add( + symptomsTypes[i], + ); + } + } - final clientReferenceId = - IdGen.i.identifier; - context - .read() - .add( - SideEffectsSubmitEvent( - SideEffectModel( - id: null, - taskClientReferenceId: - widget.tasks.last - .clientReferenceId, - projectId: - RegistrationDeliverySingleton() - .projectId, - symptoms: symptoms, - clientReferenceId: - clientReferenceId, - tenantId: - RegistrationDeliverySingleton() - .tenantId, - rowVersion: 1, - auditDetails: - AuditDetails( - createdBy: - RegistrationDeliverySingleton() - .loggedInUserUuid!, - createdTime: context - .millisecondsSinceEpoch(), - lastModifiedBy: - RegistrationDeliverySingleton() - .loggedInUserUuid, - lastModifiedTime: - context - .millisecondsSinceEpoch(), - ), - clientAuditDetails: - ClientAuditDetails( - createdBy: - RegistrationDeliverySingleton() - .loggedInUserUuid!, - createdTime: context - .millisecondsSinceEpoch(), - lastModifiedBy: - RegistrationDeliverySingleton() - .loggedInUserUuid, - lastModifiedTime: - context - .millisecondsSinceEpoch(), - ), - ), - false, + final clientReferenceId = + IdGen.i.identifier; + context + .read< + SideEffectsBloc>() + .add( + SideEffectsSubmitEvent( + SideEffectModel( + id: null, + additionalFields: + SideEffectAdditionalFields( + version: 1, + fields: [ + AdditionalField( + "boundaryCode", + RegistrationDeliverySingleton() + .boundary + ?.code), + ], + ), + taskClientReferenceId: + widget + .tasks + .last + .clientReferenceId, + projectBeneficiaryClientReferenceId: + widget + .tasks + .last + .projectBeneficiaryClientReferenceId, + projectId: + RegistrationDeliverySingleton() + .projectId, + symptoms: + symptoms, + clientReferenceId: + clientReferenceId, + tenantId: + RegistrationDeliverySingleton() + .tenantId, + rowVersion: 1, + auditDetails: + AuditDetails( + createdBy: + RegistrationDeliverySingleton() + .loggedInUserUuid!, + createdTime: + context + .millisecondsSinceEpoch(), + lastModifiedBy: + RegistrationDeliverySingleton() + .loggedInUserUuid, + lastModifiedTime: + context + .millisecondsSinceEpoch(), + ), + clientAuditDetails: + ClientAuditDetails( + createdBy: + RegistrationDeliverySingleton() + .loggedInUserUuid!, + createdTime: + context + .millisecondsSinceEpoch(), + lastModifiedBy: + RegistrationDeliverySingleton() + .loggedInUserUuid, + lastModifiedTime: + context + .millisecondsSinceEpoch(), + ), + ), + false, + ), + ); + Navigator.of( + context, + rootNavigator: true, + ).pop(true); + }, + type: DigitButtonType + .primary, + size: DigitButtonSize + .large), + DigitButton( + label: localizations + .translate( + i18.common + .coreCommonCancel, ), - ); - Navigator.of( - context, - rootNavigator: true, - ).pop(true); - }, - ), - secondaryAction: DigitDialogActions( - label: localizations.translate( - i18.common.coreCommonCancel, + onPressed: () => + Navigator.of( + context, + rootNavigator: true, + ).pop(false), + type: DigitButtonType + .secondary, + size: + DigitButtonSize.large) + ], ), - action: (context) => Navigator.of( - context, - rootNavigator: true, - ).pop(false), - ), - ), - ); - - if (shouldSubmit ?? false) { - final reloadState = context - .read(); + ); - Future.delayed( - const Duration(milliseconds: 500), - () { - reloadState.add( - HouseholdOverviewReloadEvent( - projectId: - RegistrationDeliverySingleton() - .projectId!, - projectBeneficiaryType: - RegistrationDeliverySingleton() - .beneficiaryType!, - ), - ); - }, - ).then((value) => context.router.push( - HouseholdAcknowledgementRoute( - enableViewHousehold: true, - ), - )); - } - } else { - setState(() { - symptomsSelected = false; - }); - } - }, - child: Center( - child: Text( - localizations.translate( - i18.common.coreCommonNext, - ), + if (shouldSubmit ?? false) { + submitSideEffects(); + } + } else { + setState(() { + symptomsSelected = false; + }); + } + }, ), - ), - ), - ), + ]), slivers: [ SliverToBoxAdapter( - child: DigitCard( - padding: const EdgeInsets.only( - left: kPadding * 2, - right: kPadding * 2, - top: kPadding * 2, - bottom: kPadding * 2, + child: DigitCard(children: [ + Text( + localizations.translate( + i18.adverseEvents.sideEffectsLabel, + ), + style: textTheme.headingXl, + ), + Text( + '${localizations.translate( + i18.adverseEvents.selectSymptomsLabel, + )}*', + style: textTheme.headingS, ), - child: Column( - children: [ - Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, + StatefulBuilder( + builder: ( + BuildContext context, + StateSetter stateSetter, + ) { + return Column( children: [ - Expanded( - child: Text( - localizations.translate( - i18.adverseEvents - .sideEffectsLabel, - ), - style: theme - .textTheme.displayMedium, - ), - ), - ], - ), - Align( - alignment: Alignment.topLeft, - child: Padding( - padding: const EdgeInsets.only( - right: kPadding * 2, - top: kPadding * 2, - bottom: kPadding * 2, - ), - child: Text( - '${localizations.translate( - i18.adverseEvents - .selectSymptomsLabel, - )}*', - style: theme - .textTheme.headlineSmall, - ), - ), - ), - StatefulBuilder( - builder: ( - BuildContext context, - StateSetter stateSetter, - ) { - return Column( - children: [ - Column( - children: - symptomTypesOptions - .mapIndexed( - (i, e) => - DigitCheckboxTile( - padding: - EdgeInsets - .zero, - label: localizations - .translate( - e.key, - ), - value: - symptomsValues[ - i], - onChanged: - (value) { - stateSetter( - () { - symptomsValues[ - i] = - !symptomsValues[ - i]; - symptomsSelected = - symptomsValues - .any( - (e) => - e, - ); - }, - ); - }, - ), - ) - .toList(), - ), - Visibility( - visible: !symptomsSelected, - child: Align( - alignment: - Alignment.centerLeft, - child: Text( - localizations.translate( - i18.common - .coreCommonRequiredItems, - ), - style: TextStyle( - color: theme - .colorScheme - .error, + Column( + children: symptomTypesOptions + .mapIndexed( + (i, e) => Padding( + padding: + const EdgeInsets + .all(spacer2), + child: DigitCheckbox( + label: localizations + .translate( + e.key, + ), + value: + symptomsValues[i], + onChanged: (value) { + stateSetter( + () { + symptomsValues[ + i] = + !symptomsValues[ + i]; + symptomsSelected = + symptomsValues + .any( + (e) => e, + ); + }, + ); + }, ), ), + ) + .toList(), + ), + Visibility( + visible: !symptomsSelected, + child: Padding( + padding: + const EdgeInsets.only( + top: spacer2), + child: Align( + alignment: + Alignment.centerLeft, + child: Text( + localizations.translate( + i18.common + .coreCommonRequiredItems, + ), + style: TextStyle( + color: theme.colorTheme + .alert.error, + ), ), ), - ], - ); - }, - ), - ], + ), + ), + ], + ); + }, ), - ), + ]), ), ], ), @@ -358,4 +346,25 @@ class SideEffectsPageState extends LocalizedState { ), ); } + + void submitSideEffects() async { + final reloadState = context.read(); + + Future.delayed( + const Duration(milliseconds: 500), + () { + reloadState.add( + HouseholdOverviewReloadEvent( + projectId: RegistrationDeliverySingleton().projectId!, + projectBeneficiaryType: + RegistrationDeliverySingleton().beneficiaryType!, + ), + ); + }, + ).then((value) => context.router.push( + HouseholdAcknowledgementRoute( + enableViewHousehold: true, + ), + )); + } } diff --git a/packages/registration_delivery/lib/pages/beneficiary/widgets/household_acknowledgement.dart b/packages/registration_delivery/lib/pages/beneficiary/widgets/household_acknowledgement.dart index 8ff5bcfc5..726883908 100644 --- a/packages/registration_delivery/lib/pages/beneficiary/widgets/household_acknowledgement.dart +++ b/packages/registration_delivery/lib/pages/beneficiary/widgets/household_acknowledgement.dart @@ -1,5 +1,6 @@ import 'package:auto_route/auto_route.dart'; -import 'package:digit_components/digit_components.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/widgets/molecules/panel_cards.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:registration_delivery/registration_delivery.dart'; @@ -32,36 +33,46 @@ class HouseholdAcknowledgementPageState child: Scaffold( body: BlocBuilder( builder: (context, householdState) { - return DigitAcknowledgement.success( - action: () { - context - .read().add(const SearchHouseholdsEvent.clear()); - final parent = context.router.parent() as StackRouter; - // Pop twice to navigate back to the previous screen - parent.popUntilRoot(); - }, - secondaryAction: () { - final wrapper = context - .read() - .state - .householdMemberWrapper; - - context.router.popAndPush( - BeneficiaryWrapperRoute(wrapper: wrapper), - ); - }, - enableViewHousehold: widget.enableViewHousehold ?? false, - secondaryLabel: localizations.translate( - i18.householdDetails.viewHouseHoldDetailsAction, - ), - actionLabel: localizations - .translate(i18.acknowledgementSuccess.actionLabelText), + return PanelCard( + type: PanelType.success, description: localizations.translate( i18.acknowledgementSuccess.acknowledgementDescriptionText, ), - label: localizations.translate( + title: localizations.translate( i18.acknowledgementSuccess.acknowledgementLabelText, ), + actions: [ + DigitButton( + label: localizations.translate( + i18.householdDetails.viewHouseHoldDetailsAction, + ), + isDisabled: !(widget.enableViewHousehold ?? false), + onPressed: () { + final wrapper = context + .read() + .state + .householdMemberWrapper; + + context.router.popAndPush( + BeneficiaryWrapperRoute(wrapper: wrapper), + ); + }, + type: DigitButtonType.primary, + size: DigitButtonSize.large), + DigitButton( + label: localizations + .translate(i18.acknowledgementSuccess.actionLabelText), + onPressed: () { + context + .read() + .add(const SearchHouseholdsEvent.clear()); + final parent = context.router.parent() as StackRouter; + // Pop twice to navigate back to the previous screen + parent.popUntilRoot(); + }, + type: DigitButtonType.secondary, + size: DigitButtonSize.large), + ], ); }, ), diff --git a/packages/registration_delivery/lib/pages/beneficiary/widgets/past_delivery.dart b/packages/registration_delivery/lib/pages/beneficiary/widgets/past_delivery.dart index ba7118d19..a4bd2a8a4 100644 --- a/packages/registration_delivery/lib/pages/beneficiary/widgets/past_delivery.dart +++ b/packages/registration_delivery/lib/pages/beneficiary/widgets/past_delivery.dart @@ -1,14 +1,16 @@ import 'package:collection/collection.dart'; -import 'package:digit_components/digit_components.dart'; -import 'package:digit_components/models/digit_table_model.dart'; import 'package:digit_data_model/data_model.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/widgets/atoms/digit_divider.dart'; +import 'package:digit_ui_components/widgets/atoms/table_cell.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_table.dart'; import 'package:flutter/material.dart'; import 'package:registration_delivery/blocs/app_localization.dart'; import 'package:registration_delivery/registration_delivery.dart'; -import '../../../blocs/delivery_intervention/deliver_intervention.dart'; import '../../../utils/i18_key_constants.dart' as i18; import '../../../utils/utils.dart'; +import '../../../widgets/table_card/table_card.dart'; // This function builds a table with the given data and headers Widget buildTableContent( @@ -28,14 +30,15 @@ Widget buildTableContent( final localizations = RegistrationDeliveryLocalization.of(context); // Defining a list of table headers for resource popup - final headerListResource = [ - TableHeader( - localizations.translate(i18.beneficiaryDetails.beneficiaryDose), - cellKey: 'dose', + final columnListResource = [ + DigitTableColumn( + header: localizations.translate(i18.beneficiaryDetails.beneficiaryDose), + cellValue: 'dose', ), - TableHeader( - localizations.translate(i18.beneficiaryDetails.beneficiaryResources), - cellKey: 'resources', + DigitTableColumn( + header: + localizations.translate(i18.beneficiaryDetails.beneficiaryResources), + cellValue: 'resources', ), ]; @@ -46,19 +49,20 @@ Widget buildTableContent( final item = projectType.cycles?[currentCycle - 1].deliveries?[currentDose - 1]; final productVariants = - fetchProductVariant(item, individualModel, householdModel)?.productVariants; + fetchProductVariant(item, individualModel, householdModel) + ?.productVariants; final numRows = productVariants?.length ?? 0; const rowHeight = 84; - const paddingHeight = (kPadding * 2); + const paddingHeight = (spacer2 * 2); final containerHeight = (numRows + 1) * rowHeight + (paddingHeight * 2); const columnWidth = 150.0; const cellHeight = 59.5; return Container( padding: const EdgeInsets.only( - left: kPadding, + left: spacer2, bottom: 0, - right: kPadding, + right: spacer2, top: 0, ), height: containerHeight, @@ -67,70 +71,74 @@ Widget buildTableContent( crossAxisAlignment: CrossAxisAlignment.start, // mainAxisSize: MainAxisSize.min, children: [ - DigitTableCard( - topPadding: const EdgeInsets.only(top: 0.0), - padding: const EdgeInsets.only(bottom: kPadding / 2), - fraction: 2.5, - element: { - localizations.translate( - i18.beneficiaryDetails.beneficiaryAge, - ): fetchProductVariant(item, individualModel, householdModel)?.condition != null - ? localizations.translate( - fetchProductVariant(item, individualModel, householdModel)!.condition!) - : null, - }, - ), - const Divider( - thickness: 1.0, + Padding( + padding: const EdgeInsets.only(bottom: spacer1), + child: DigitTableCard( + topPadding: const EdgeInsets.only(top: 0.0), + fraction: 2.5, + element: { + localizations.translate( + i18.beneficiaryDetails.beneficiaryAge, + ): fetchProductVariant(item, individualModel, householdModel) + ?.condition != + null + ? localizations.translate(fetchProductVariant( + item, individualModel, householdModel)! + .condition!) + : null, + }, + ), ), + const DigitDivider(), // Build the DigitTable with the data - fetchProductVariant(item, individualModel, householdModel)?.productVariants != null - ? DigitTable( - headerList: headerListResource, - tableData: [ - ...fetchProductVariant(item, individualModel, householdModel )! - .productVariants! - .map( - (e) { - // Retrieve the SKU value for the product variant. - final value = variant - ?.firstWhereOrNull( - (element) => element.id == e.productVariantId, - ) - ?.sku; - final quantity = e.quantity; + if (fetchProductVariant(item, individualModel, householdModel) + ?.productVariants != + null) + DigitTable( + enableBorder: true, + withRowDividers: true, + withColumnDividers: true, + showSelectedState: false, + showPagination: false, + columns: columnListResource, + rows: [ + ...fetchProductVariant(item, individualModel, householdModel)! + .productVariants! + .map( + (e) { + // Retrieve the SKU value for the product variant. + final value = variant + ?.firstWhereOrNull( + (element) => element.id == e.productVariantId, + ) + ?.sku; + final quantity = e.quantity; - return TableDataRow([ - // Display the dose information in the first column if it's the first row, - // otherwise, display an empty cell. + return DigitTableRow(tableRow: [ + // Display the dose information in the first column if it's the first row, + // otherwise, display an empty cell. - fetchProductVariant(item, individualModel, householdModel) - ?.productVariants - ?.indexOf(e) == - 0 - ? TableData( - '${localizations.translate(i18.deliverIntervention.dose)} ${deliverInterventionState.dose}', - cellKey: 'dose', - ) - : TableData(''), - // Display the SKU value in the second column. - TableData( - '$quantity - ${localizations.translate(value.toString())}', - cellKey: 'resources', - ), - ]); - }, - ), - ], - columnWidth: columnWidth, - height: ((fetchProductVariant(item, individualModel, householdModel) - ?.productVariants ?? - []) - .length + - 1) * - cellHeight, - ) - : Text(localizations.translate(i18.common.noProjectSelected)) + fetchProductVariant(item, individualModel, householdModel) + ?.productVariants + ?.indexOf(e) == + 0 + ? DigitTableData( + '${localizations.translate(i18.deliverIntervention.dose)} ${deliverInterventionState.dose}', + cellKey: 'dose', + ) + : DigitTableData('', cellKey: ''), + // Display the SKU value in the second column. + DigitTableData( + '$quantity - ${localizations.translate(value.toString())}', + cellKey: 'resources', + ), + ]); + }, + ), + ], + ) + else + Text(localizations.translate(i18.common.noProjectSelected)) ], ), ); diff --git a/packages/registration_delivery/lib/pages/beneficiary/widgets/record_delivery_cycle.dart b/packages/registration_delivery/lib/pages/beneficiary/widgets/record_delivery_cycle.dart index ca9a04d45..e5c842a80 100644 --- a/packages/registration_delivery/lib/pages/beneficiary/widgets/record_delivery_cycle.dart +++ b/packages/registration_delivery/lib/pages/beneficiary/widgets/record_delivery_cycle.dart @@ -1,7 +1,9 @@ import 'package:collection/collection.dart'; -import 'package:digit_components/digit_components.dart'; -import 'package:digit_components/models/digit_table_model.dart'; import 'package:digit_data_model/data_model.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/atoms/table_cell.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_table.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:registration_delivery/blocs/app_localization.dart'; @@ -40,17 +42,20 @@ class RecordDeliveryCycleState extends LocalizedState { final localizations = RegistrationDeliveryLocalization.of(context); final headerList = [ - TableHeader( - localizations.translate(i18.beneficiaryDetails.beneficiaryDoseNo), - cellKey: 'dose', + DigitTableColumn( + header: + localizations.translate(i18.beneficiaryDetails.beneficiaryDoseNo), + cellValue: 'dose', ), - TableHeader( - localizations.translate(i18.beneficiaryDetails.beneficiaryStatus), - cellKey: 'status', + DigitTableColumn( + header: + localizations.translate(i18.beneficiaryDetails.beneficiaryStatus), + cellValue: 'status', ), - TableHeader( - localizations.translate(i18.beneficiaryDetails.beneficiaryCompletedOn), - cellKey: 'completedOn', + DigitTableColumn( + header: localizations + .translate(i18.beneficiaryDetails.beneficiaryCompletedOn), + cellValue: 'completedOn', ), ]; // List of table headers for displaying cycle and dose information @@ -115,7 +120,7 @@ class RecordDeliveryCycleState extends LocalizedState { Padding( padding: const EdgeInsets.symmetric( - horizontal: kPadding / 2, + horizontal: spacer2 / 2, ), child: TextButton( style: TextButton.styleFrom( @@ -126,12 +131,11 @@ class RecordDeliveryCycleState extends LocalizedState { onPressed: null, child: Text( style: TextStyle( - fontSize: kPadding * 2, - decoration: TextDecoration - .underline, + fontSize: spacer2 * 2, color: Theme.of(context) - .colorScheme - .secondary, + .colorTheme + .primary + .primary1, ), isExpanded ? localizations.translate( @@ -148,15 +152,17 @@ class RecordDeliveryCycleState extends LocalizedState { !isExpanded ? Icon( color: Theme.of(context) - .colorScheme - .secondary, + .colorTheme + .primary + .primary1, Icons.keyboard_arrow_down, size: 24, ) : Icon( color: Theme.of(context) - .colorScheme - .secondary, + .colorTheme + .primary + .primary1, Icons.keyboard_arrow_up, size: 24, ), @@ -183,7 +189,7 @@ class RecordDeliveryCycleState extends LocalizedState { Widget buildCycleAndDoseTable( List cycles, - List headerList, + List headerList, int? selectedIndex, bool isCurrentCycle, ) { @@ -196,14 +202,12 @@ class RecordDeliveryCycleState extends LocalizedState { final e = cycles[i]; widgetList.add( Column( + mainAxisSize: MainAxisSize.min, children: [ Padding( padding: isCurrentCycle - ? EdgeInsets.zero - : const EdgeInsets.only( - top: kPadding + 2, - bottom: 0, - ), + ? const EdgeInsets.all(spacer2) + : const EdgeInsets.all(spacer2), child: Align( alignment: Alignment.centerLeft, child: Text( @@ -216,84 +220,86 @@ class RecordDeliveryCycleState extends LocalizedState { ), ), ), - DigitTable( - selectedIndex: selectedIndex, - headerList: headerList, - tableData: e.deliveries!.mapIndexed( - (index, item) { - final tasks = widget.taskData - ?.where((element) => - element.additionalFields?.fields - .firstWhereOrNull( - (f) => - f.key == - AdditionalFieldsType.doseIndex - .toValue(), - ) - ?.value == - '0${item.id}' && - element.additionalFields?.fields - .firstWhereOrNull( - (c) => - c.key == - AdditionalFieldsType.cycleIndex - .toValue(), - ) - ?.value == - '0${e.id}') - .lastOrNull; + SizedBox( + width: MediaQuery.of(context).size.width, + height: ((e.deliveries?.length ?? 0) + 1) * 57.5, + child: DigitTable( + enableBorder: true, + withRowDividers: true, + withColumnDividers: true, + showSelectedState: false, + showPagination: false, + highlightedRows: (selectedIndex != null) ? [selectedIndex] : [], + columns: headerList, + rows: e.deliveries!.mapIndexed( + (index, item) { + final tasks = widget.taskData + ?.where((element) => + element.additionalFields?.fields + .firstWhereOrNull( + (f) => + f.key == + AdditionalFieldsType.doseIndex + .toValue(), + ) + ?.value == + '0${item.id}' && + element.additionalFields?.fields + .firstWhereOrNull( + (c) => + c.key == + AdditionalFieldsType.cycleIndex + .toValue(), + ) + ?.value == + '0${e.id}') + .lastOrNull; - return TableDataRow([ - TableData( - '${localizations.translate(i18.deliverIntervention.dose)} ${e.deliveries!.indexOf(item) + 1}', - cellKey: 'dose', - ), - TableData( - localizations.translate( - index == selectedIndex - ? Status.toAdminister.toValue() - : tasks?.status ?? Status.inComplete.toValue(), + return DigitTableRow(tableRow: [ + DigitTableData( + '${localizations.translate(i18.deliverIntervention.dose)} ${e.deliveries!.indexOf(item) + 1}', + cellKey: 'dose', ), - cellKey: 'status', - style: TextStyle( - color: index == selectedIndex - ? null - : tasks?.status == - Status.administeredSuccess.toValue() - ? DigitTheme - .instance.colorScheme.onSurfaceVariant - : DigitTheme.instance.colorScheme.error, - fontWeight: - index == selectedIndex ? FontWeight.w700 : null, + DigitTableData( + localizations.translate( + index == selectedIndex + ? Status.toAdminister.toValue() + : tasks?.status ?? Status.inComplete.toValue(), + ), + cellKey: 'status', + style: TextStyle( + color: index == selectedIndex + ? null + : tasks?.status == + Status.administeredSuccess.toValue() + ? DigitTheme + .instance.colorScheme.onSurfaceVariant + : DigitTheme.instance.colorScheme.error, + fontWeight: + index == selectedIndex ? FontWeight.w700 : null, + ), ), - ), - TableData( - tasks?.status == Status.administeredFailed.toValue() || - (tasks?.additionalFields?.fields - .where((e) => - e.key == - AdditionalFieldsType.deliveryStrategy - .toValue()) - .firstOrNull - ?.value == - DeliverStrategyType.indirect.toValue()) - ? ' -- ' - : tasks?.clientAuditDetails?.createdTime.toDateTime - .getFormattedDate() ?? - ' -- ', - cellKey: 'completedOn', - ), - ]); - }, - ).toList(), - columnWidth: 130, - height: ((e.deliveries?.length ?? 0) + 1) * 57.5, - ), - const SizedBox( - height: 16, - ), - const Divider( - thickness: 1.0, + DigitTableData( + tasks?.status == Status.administeredFailed.toValue() || + (tasks?.additionalFields?.fields + .where((e) => + e.key == + AdditionalFieldsType + .deliveryStrategy + .toValue()) + .firstOrNull + ?.value == + DeliverStrategyType.indirect.toValue()) + ? ' -- ' + : tasks?.clientAuditDetails?.createdTime.toDateTime + .getFormattedDate() ?? + ' -- ', + cellKey: 'completedOn', + ), + ]); + }, + ).toList(), + ), ), ], ), @@ -301,6 +307,7 @@ class RecordDeliveryCycleState extends LocalizedState { } return Column( + mainAxisSize: MainAxisSize.min, children: widgetList, ); } diff --git a/packages/registration_delivery/lib/pages/beneficiary/widgets/splash_acknowledgement.dart b/packages/registration_delivery/lib/pages/beneficiary/widgets/splash_acknowledgement.dart index e1b7e02a0..71a8a21c0 100644 --- a/packages/registration_delivery/lib/pages/beneficiary/widgets/splash_acknowledgement.dart +++ b/packages/registration_delivery/lib/pages/beneficiary/widgets/splash_acknowledgement.dart @@ -1,12 +1,14 @@ import 'dart:async'; import 'package:auto_route/auto_route.dart'; -import 'package:digit_components/digit_components.dart'; +import 'package:digit_ui_components/enum/app_enums.dart'; +import 'package:digit_ui_components/widgets/atoms/digit_button.dart'; +import 'package:digit_ui_components/widgets/molecules/panel_cards.dart'; import 'package:flutter/material.dart'; import '../../../router/registration_delivery_router.gm.dart'; -import '../../../widgets/localized.dart'; import '../../../utils/i18_key_constants.dart' as i18; +import '../../../widgets/localized.dart'; @RoutePage() class SplashAcknowledgementPage extends LocalizedStatefulWidget { @@ -43,17 +45,23 @@ class SplashAcknowledgementPageState @override Widget build(BuildContext context) { return Scaffold( - body: DigitAcknowledgement.success( - action: () { - context.router.maybePop(); - }, - enableBackToSearch: widget.enableBackToSearch ?? true, - actionLabel: - localizations.translate(i18.acknowledgementSuccess.actionLabelText), + body: PanelCard( + type: PanelType.success, + actions: [ + DigitButton( + label: localizations + .translate(i18.acknowledgementSuccess.actionLabelText), + type: DigitButtonType.primary, + size: DigitButtonSize.large, + onPressed: () { + context.router.maybePop(); + }, + ), + ], description: localizations.translate( i18.acknowledgementSuccess.acknowledgementDescriptionText, ), - label: localizations + title: localizations .translate(i18.acknowledgementSuccess.acknowledgementLabelText), ), ); diff --git a/packages/registration_delivery/lib/pages/beneficiary_registration/beneficiary_acknowledgement.dart b/packages/registration_delivery/lib/pages/beneficiary_registration/beneficiary_acknowledgement.dart index 10b7e82b8..8914963de 100644 --- a/packages/registration_delivery/lib/pages/beneficiary_registration/beneficiary_acknowledgement.dart +++ b/packages/registration_delivery/lib/pages/beneficiary_registration/beneficiary_acknowledgement.dart @@ -1,5 +1,6 @@ import 'package:auto_route/auto_route.dart'; -import 'package:digit_components/digit_components.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/widgets/molecules/panel_cards.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; @@ -28,30 +29,36 @@ class BeneficiaryAcknowledgementPageState @override Widget build(BuildContext context) { return Scaffold( - body: DigitAcknowledgement.success( - action: () { - context.router.maybePop(); - }, - secondaryAction: () { - final bloc = context.read(); + body: PanelCard( + type: PanelType.success, + title: localizations + .translate(i18.acknowledgementSuccess.acknowledgementLabelText), + actions: [ + DigitButton( + label: localizations.translate( + i18.householdDetails.viewHouseHoldDetailsAction, + ), + onPressed: () { + final bloc = context.read(); - context.router.popAndPush( - BeneficiaryWrapperRoute( - wrapper: bloc.state.householdMembers.first, - ), - ); - }, - enableViewHousehold: widget.enableViewHousehold ?? false, - secondaryLabel: localizations.translate( - i18.householdDetails.viewHouseHoldDetailsAction, - ), - actionLabel: - localizations.translate(i18.acknowledgementSuccess.actionLabelText), + context.router.popAndPush( + BeneficiaryWrapperRoute( + wrapper: bloc.state.householdMembers.first, + ), + ); + }, + type: DigitButtonType.primary, + size: DigitButtonSize.large), + DigitButton( + label: localizations + .translate(i18.acknowledgementSuccess.actionLabelText), + onPressed: () => context.router.maybePop(), + type: DigitButtonType.secondary, + size: DigitButtonSize.large), + ], description: localizations.translate( i18.acknowledgementSuccess.acknowledgementDescriptionText, ), - label: localizations - .translate(i18.acknowledgementSuccess.acknowledgementLabelText), ), ); } diff --git a/packages/registration_delivery/lib/pages/beneficiary_registration/house_details.dart b/packages/registration_delivery/lib/pages/beneficiary_registration/house_details.dart index 55d762731..34ab06d1e 100644 --- a/packages/registration_delivery/lib/pages/beneficiary_registration/house_details.dart +++ b/packages/registration_delivery/lib/pages/beneficiary_registration/house_details.dart @@ -1,7 +1,9 @@ import 'package:auto_route/auto_route.dart'; -import 'package:digit_components/digit_components.dart'; -import 'package:digit_components/widgets/atoms/selection_card.dart'; import 'package:digit_data_model/data_model.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/atoms/selection_card.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:reactive_forms/reactive_forms.dart'; @@ -34,8 +36,6 @@ class HouseDetailsPageState extends LocalizedState { @override void initState() { - final registrationState = context.read().state; - super.initState(); } @@ -44,6 +44,7 @@ class HouseDetailsPageState extends LocalizedState { final theme = Theme.of(context); final bloc = context.read(); final router = context.router; + final textTheme = theme.digitTextTheme(context); return Scaffold( body: ReactiveFormBuilder( @@ -52,7 +53,7 @@ class HouseDetailsPageState extends LocalizedState { BeneficiaryRegistrationState>( builder: (context, registrationState) { return ScrollableContent( - enableFixedButton: true, + enableFixedDigitButton: true, header: const Column( children: [ BackNavigationHelpHeaderWidget( @@ -62,69 +63,118 @@ class HouseDetailsPageState extends LocalizedState { ], ), footer: DigitCard( - margin: const EdgeInsets.fromLTRB(0, kPadding, 0, 0), - padding: - const EdgeInsets.fromLTRB(kPadding, 0, kPadding, 0), - child: DigitElevatedButton( - onPressed: () { - form.markAllAsTouched(); - if (form.control(_householdStructureKey).value == - null) { - setState(() { - form - .control(_householdStructureKey) - .setErrors({'': true}); - }); - } + margin: const EdgeInsets.only(top: spacer2), + children: [ + DigitButton( + onPressed: () { + form.markAllAsTouched(); + if (form.control(_householdStructureKey).value == + null) { + setState(() { + form + .control(_householdStructureKey) + .setErrors({'': true}); + }); + } - if (!form.valid) return; - selectedHouseStructureTypes = - form.control(_householdStructureKey).value; + if (!form.valid) return; + selectedHouseStructureTypes = + form.control(_householdStructureKey).value; - final noOfRooms = - form.control(_noOfRoomsKey).value as int; - registrationState.maybeWhen( - orElse: () { - return; - }, - create: ( - address, - householdModel, - individualModel, - projectBeneficiaryModel, - registrationDate, - searchQuery, - loading, - isHeadOfHousehold, - ) { - var houseModel = HouseholdModel( - clientReferenceId: IdGen.i.identifier, - tenantId: - RegistrationDeliverySingleton().tenantId, - rowVersion: 1, - auditDetails: AuditDetails( - createdBy: RegistrationDeliverySingleton() - .loggedInUserUuid!, - createdTime: - context.millisecondsSinceEpoch(), - ), - memberCount: householdModel?.memberCount, - clientAuditDetails: ClientAuditDetails( - createdBy: RegistrationDeliverySingleton() - .loggedInUserUuid!, - createdTime: - context.millisecondsSinceEpoch(), - lastModifiedBy: - RegistrationDeliverySingleton() - .loggedInUserUuid, - lastModifiedTime: - context.millisecondsSinceEpoch(), - ), - additionalFields: HouseholdAdditionalFields( - version: 1, - fields: [ + final noOfRooms = + form.control(_noOfRoomsKey).value as int; + registrationState.maybeWhen( + orElse: () { + return; + }, + create: ( + address, + householdModel, + individualModel, + projectBeneficiaryModel, + registrationDate, + searchQuery, + loading, + isHeadOfHousehold, + ) { + var houseModel = HouseholdModel( + clientReferenceId: IdGen.i.identifier, + tenantId: RegistrationDeliverySingleton() + .tenantId, + rowVersion: 1, + auditDetails: AuditDetails( + createdBy: + RegistrationDeliverySingleton() + .loggedInUserUuid!, + createdTime: + context.millisecondsSinceEpoch(), + ), + memberCount: householdModel?.memberCount, + clientAuditDetails: ClientAuditDetails( + createdBy: + RegistrationDeliverySingleton() + .loggedInUserUuid!, + createdTime: + context.millisecondsSinceEpoch(), + lastModifiedBy: + RegistrationDeliverySingleton() + .loggedInUserUuid, + lastModifiedTime: + context.millisecondsSinceEpoch(), + ), + additionalFields: + HouseholdAdditionalFields( + version: 1, + fields: [ + ...?householdModel + ?.additionalFields?.fields + .where((e) => + e.key != + AdditionalFieldsType + .houseStructureTypes + .toValue() && + e.key != + AdditionalFieldsType + .noOfRooms + .toValue()), + AdditionalField( + AdditionalFieldsType + .houseStructureTypes + .toValue(), + selectedHouseStructureTypes + ?.join("|") + .toString(), + ), + AdditionalField( + AdditionalFieldsType.noOfRooms + .toValue(), + noOfRooms, + ) + ])); + + bloc.add( + BeneficiaryRegistrationSaveHouseDetailsEvent( + model: houseModel, + ), + ); + router.push(HouseHoldDetailsRoute()); + }, + editHousehold: ( + address, + householdModel, + individuals, + registrationDate, + projectBeneficiaryModel, + loading, + headOfHousehold, + ) { + var houseModel = householdModel.copyWith( + additionalFields: + HouseholdAdditionalFields( + version: 1, + fields: [ ...?householdModel - ?.additionalFields?.fields + .additionalFields?.fields .where((e) => e.key != AdditionalFieldsType @@ -148,150 +198,117 @@ class HouseDetailsPageState extends LocalizedState { noOfRooms, ) ])); + // TODO [Linking of Voucher for Household based project need to be handled] - bloc.add( - BeneficiaryRegistrationSaveHouseDetailsEvent( - model: houseModel, - ), - ); - router.push(HouseHoldDetailsRoute()); - }, - editHousehold: ( - address, - householdModel, - individuals, - registrationDate, - projectBeneficiaryModel, - loading, - headOfHousehold, - ) { - var houseModel = householdModel.copyWith( - additionalFields: HouseholdAdditionalFields( - version: 1, - fields: [ - ...?householdModel.additionalFields?.fields - .where((e) => - e.key != - AdditionalFieldsType - .houseStructureTypes - .toValue() && - e.key != - AdditionalFieldsType.noOfRooms - .toValue()), - AdditionalField( - AdditionalFieldsType.houseStructureTypes - .toValue(), - selectedHouseStructureTypes - ?.join("|") - .toString(), + bloc.add( + BeneficiaryRegistrationSaveHouseDetailsEvent( + model: houseModel, ), - AdditionalField( - AdditionalFieldsType.noOfRooms.toValue(), - noOfRooms, - ) - ])); - // TODO [Linking of Voucher for Household based project need to be handled] - - bloc.add( - BeneficiaryRegistrationSaveHouseDetailsEvent( - model: houseModel, - ), + ); + router.push(HouseHoldDetailsRoute()); + }, ); - router.push(HouseHoldDetailsRoute()); }, - ); - }, - child: Center( - child: Text( - localizations.translate( + type: DigitButtonType.primary, + size: DigitButtonSize.large, + mainAxisSize: MainAxisSize.max, + label: localizations.translate( i18.householdLocation.actionLabel, ), ), - ), - ), - ), + ]), slivers: [ SliverToBoxAdapter( child: DigitCard( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, + margin: const EdgeInsets.all(spacer2), children: [ - Padding( - padding: const EdgeInsets.fromLTRB( - 0, 0, 0, kPadding), - child: Text( - localizations.translate( - i18.householdDetails.houseDetailsLabel, - ), - style: theme.textTheme.displayMedium, - ), + Padding( + padding: const EdgeInsets.all(0), + child: Text( + localizations.translate( + i18.householdDetails.houseDetailsLabel, ), - Column(children: [ - houseShowcaseData.typeOfStructure.buildWith( - child: SelectionBox( - isRequired: true, - title: localizations.translate( - i18.householdDetails.typeOfStructure), - equalWidthOptions: true, - allowMultipleSelection: false, - options: RegistrationDeliverySingleton() - .houseStructureTypes ?? - [], - initialSelection: form.control(_householdStructureKey).value!= null ? [...form.control(_householdStructureKey).value ] : [], - onSelectionChanged: (values) { + style: textTheme.headingXl, + ), + ), + houseShowcaseData.typeOfStructure.buildWith( + child: SelectionCard( + showParentContainer: true, + isRequired: true, + title: localizations.translate( + i18.householdDetails.typeOfStructure), + equalWidthOptions: true, + allowMultipleSelection: false, + options: RegistrationDeliverySingleton() + .houseStructureTypes ?? + [], + initialSelection: + form.control(_householdStructureKey).value != + null + ? [ + ...form + .control(_householdStructureKey) + .value + ] + : [], + onSelectionChanged: (values) { + form + .control(_householdStructureKey) + .markAsTouched(); + if (values.isEmpty) { + form.control(_householdStructureKey).value = + null; + setState(() { + form + .control(_householdStructureKey) + .setErrors({'': true}); + }); + } else { + setState(() { + form.control(_householdStructureKey).value = + values; + }); + } + }, + valueMapper: (value) { + return localizations + .translate(value.toString()); + }, + errorMessage: form + .control(_householdStructureKey) + .hasErrors && form .control(_householdStructureKey) - .markAsTouched(); - if (values.isEmpty) { - form - .control(_householdStructureKey) - .value = null; - setState(() { - form - .control(_householdStructureKey) - .setErrors({'': true}); - }); - } else { - setState(() { - form - .control(_householdStructureKey) - .value = values; - }); - } - }, - valueMapper: (value) { - return localizations - .translate(value.toString()); - }, - errorMessage: form - .control(_householdStructureKey) - .hasErrors && - form - .control(_householdStructureKey) - .touched - ? localizations.translate(i18 - .householdDetails - .selectStructureTypeError) - : null, - ), + .touched + ? localizations.translate(i18.householdDetails + .selectStructureTypeError) + : null, + ), + ), + houseShowcaseData.noOfRooms.buildWith( + child: ReactiveWrapperField( + formControlName: _noOfRoomsKey, + builder: (field) => LabeledField( + label: localizations.translate( + i18.householdDetails.noOfRoomsLabel, ), - houseShowcaseData.noOfRooms.buildWith( - child: DigitIntegerFormPicker( - minimum: 1, - maximum: 20, - form: form, - formControlName: _noOfRoomsKey, - label: localizations.translate( - i18.householdDetails.noOfRoomsLabel, - ), - incrementer: true, - ), + child: DigitNumericFormInput( + minValue: 1, + maxValue: 20, + initialValue: form + .control(_noOfRoomsKey) + .value + .toString(), + step: 1, + onChange: (value) { + form.control(_noOfRoomsKey).value = + int.parse(value); + }, ), - ]), - ], + ), + ), ), - ), + ]), ), ], ); diff --git a/packages/registration_delivery/lib/pages/beneficiary_registration/household_details.dart b/packages/registration_delivery/lib/pages/beneficiary_registration/household_details.dart index 8d0f29b23..0889fccdc 100644 --- a/packages/registration_delivery/lib/pages/beneficiary_registration/household_details.dart +++ b/packages/registration_delivery/lib/pages/beneficiary_registration/household_details.dart @@ -1,10 +1,12 @@ import 'package:auto_route/auto_route.dart'; -import 'package:digit_components/digit_components.dart'; -import 'package:digit_components/widgets/atoms/digit_toaster.dart'; -import 'package:digit_components/widgets/atoms/text_block.dart'; import 'package:digit_data_model/data_model.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/atoms/text_block.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:intl/intl.dart'; import 'package:reactive_forms/reactive_forms.dart'; import 'package:registration_delivery/blocs/household_overview/household_overview.dart'; import 'package:registration_delivery/blocs/search_households/search_households.dart'; @@ -14,6 +16,7 @@ import 'package:registration_delivery/utils/extensions/extensions.dart'; import '../../blocs/beneficiary_registration/beneficiary_registration.dart'; import '../../models/entities/household.dart'; import '../../router/registration_delivery_router.gm.dart'; +import '../../utils/constants.dart'; import '../../utils/i18_key_constants.dart' as i18; import '../../utils/utils.dart'; import '../../widgets/back_navigation_help_header.dart'; @@ -43,6 +46,7 @@ class HouseHoldDetailsPageState extends LocalizedState { final theme = Theme.of(context); final bloc = context.read(); final router = context.router; + final textTheme = theme.digitTextTheme(context); return Scaffold( body: ReactiveFormBuilder( @@ -50,32 +54,27 @@ class HouseHoldDetailsPageState extends LocalizedState { builder: (context, form, child) { int pregnantWomen = form.control(_pregnantWomenCountKey).value; int children = form.control(_childrenCountKey).value; - int memberCount = form.control(_memberCountKey).value; return BlocConsumer( listener: (context, state) { - if (state is BeneficiaryRegistrationPersistedState && state.isEdit) { - final overviewBloc = - context.read(); + if (state is BeneficiaryRegistrationPersistedState && + state.isEdit) { + final overviewBloc = context.read(); overviewBloc.add( HouseholdOverviewReloadEvent( - projectId: RegistrationDeliverySingleton() - .projectId - .toString(), + projectId: + RegistrationDeliverySingleton().projectId.toString(), projectBeneficiaryType: - RegistrationDeliverySingleton() - .beneficiaryType ?? - BeneficiaryType.household, + RegistrationDeliverySingleton().beneficiaryType ?? + BeneficiaryType.household, ), ); HouseholdMemberWrapper memberWrapper = overviewBloc.state.householdMemberWrapper; final route = router.parent() as StackRouter; - route.popUntilRouteWithName( - SearchBeneficiaryRoute.name); - route.push(BeneficiaryWrapperRoute( - wrapper: memberWrapper)); + route.popUntilRouteWithName(SearchBeneficiaryRoute.name); + route.push(BeneficiaryWrapperRoute(wrapper: memberWrapper)); } }, builder: (context, registrationState) { @@ -86,393 +85,428 @@ class HouseHoldDetailsPageState extends LocalizedState { showcaseButton: ShowcaseButton(), ), ]), - enableFixedButton: true, + enableFixedDigitButton: true, footer: DigitCard( - margin: const EdgeInsets.fromLTRB(0, kPadding, 0, 0), - padding: const EdgeInsets.fromLTRB(kPadding, 0, kPadding, 0), - child: DigitElevatedButton( - onPressed: () { - form.markAllAsTouched(); - if (!form.valid) return; + margin: const EdgeInsets.only(top: spacer2), + children: [ + DigitButton( + label: registrationState.mapOrNull( + editHousehold: (value) => localizations + .translate(i18.common.coreCommonSave), + ) ?? + localizations + .translate(i18.householdDetails.actionLabel), + type: DigitButtonType.primary, + size: DigitButtonSize.large, + mainAxisSize: MainAxisSize.max, + onPressed: () { + form.markAllAsTouched(); + if (!form.valid) return; - final memberCount = - form.control(_memberCountKey).value as int; + final memberCount = + form.control(_memberCountKey).value as int; - final dateOfRegistration = form - .control(_dateOfRegistrationKey) - .value as DateTime; - //[TODO: Use pregnant women form value based on project config - final pregnantWomen = - form.control(_pregnantWomenCountKey).value as int; - final children = - form.control(_childrenCountKey).value as int; + final dateOfRegistration = form + .control(_dateOfRegistrationKey) + .value as DateTime; + //[TODO: Use pregnant women form value based on project config + final pregnantWomen = + form.control(_pregnantWomenCountKey).value as int; + final children = + form.control(_childrenCountKey).value as int; - if (memberCount < (pregnantWomen + children)) { - DigitToast.show(context, - options: DigitToastOptions( - localizations.translate( + if (memberCount < (pregnantWomen + children)) { + Toast.showToast(context, + message: localizations.translate( i18.householdDetails.memberCountError), - true, - theme)); - } else { - registrationState.maybeWhen( - orElse: () { - return; - }, - create: ( - addressModel, - householdModel, - individualModel, - projectBeneficiaryModel, - registrationDate, - searchQuery, - loading, - isHeadOfHousehold, - ) { - var household = householdModel; - household ??= HouseholdModel( - tenantId: - RegistrationDeliverySingleton().tenantId, - clientReferenceId: - householdModel?.clientReferenceId ?? - IdGen.i.identifier, - rowVersion: 1, - clientAuditDetails: ClientAuditDetails( - createdBy: RegistrationDeliverySingleton() - .loggedInUserUuid!, - createdTime: context.millisecondsSinceEpoch(), - lastModifiedBy: RegistrationDeliverySingleton() - .loggedInUserUuid, - lastModifiedTime: - context.millisecondsSinceEpoch(), - ), - auditDetails: AuditDetails( - createdBy: RegistrationDeliverySingleton() - .loggedInUserUuid!, - createdTime: context.millisecondsSinceEpoch(), - lastModifiedBy: RegistrationDeliverySingleton() - .loggedInUserUuid, - lastModifiedTime: - context.millisecondsSinceEpoch(), - ), - ); + type: ToastType.error); + } else { + registrationState.maybeWhen( + orElse: () { + return; + }, + create: ( + addressModel, + householdModel, + individualModel, + projectBeneficiaryModel, + registrationDate, + searchQuery, + loading, + isHeadOfHousehold, + ) { + var household = householdModel; + household ??= HouseholdModel( + tenantId: + RegistrationDeliverySingleton().tenantId, + clientReferenceId: + householdModel?.clientReferenceId ?? + IdGen.i.identifier, + rowVersion: 1, + clientAuditDetails: ClientAuditDetails( + createdBy: RegistrationDeliverySingleton() + .loggedInUserUuid!, + createdTime: + context.millisecondsSinceEpoch(), + lastModifiedBy: + RegistrationDeliverySingleton() + .loggedInUserUuid, + lastModifiedTime: + context.millisecondsSinceEpoch(), + ), + auditDetails: AuditDetails( + createdBy: RegistrationDeliverySingleton() + .loggedInUserUuid!, + createdTime: + context.millisecondsSinceEpoch(), + lastModifiedBy: + RegistrationDeliverySingleton() + .loggedInUserUuid, + lastModifiedTime: + context.millisecondsSinceEpoch(), + ), + ); - household = household.copyWith( - rowVersion: 1, - tenantId: - RegistrationDeliverySingleton().tenantId, - clientReferenceId: - householdModel?.clientReferenceId ?? - IdGen.i.identifier, - memberCount: memberCount, - clientAuditDetails: ClientAuditDetails( - createdBy: RegistrationDeliverySingleton() - .loggedInUserUuid - .toString(), - createdTime: context.millisecondsSinceEpoch(), - lastModifiedBy: - RegistrationDeliverySingleton() + household = household.copyWith( + rowVersion: 1, + tenantId: RegistrationDeliverySingleton() + .tenantId, + clientReferenceId: + householdModel?.clientReferenceId ?? + IdGen.i.identifier, + memberCount: memberCount, + clientAuditDetails: ClientAuditDetails( + createdBy: RegistrationDeliverySingleton() .loggedInUserUuid .toString(), - lastModifiedTime: - context.millisecondsSinceEpoch(), - ), - auditDetails: AuditDetails( - createdBy: RegistrationDeliverySingleton() - .loggedInUserUuid - .toString(), - createdTime: context.millisecondsSinceEpoch(), - lastModifiedBy: - RegistrationDeliverySingleton() + createdTime: + context.millisecondsSinceEpoch(), + lastModifiedBy: + RegistrationDeliverySingleton() + .loggedInUserUuid + .toString(), + lastModifiedTime: + context.millisecondsSinceEpoch(), + ), + auditDetails: AuditDetails( + createdBy: RegistrationDeliverySingleton() .loggedInUserUuid .toString(), - lastModifiedTime: - context.millisecondsSinceEpoch(), - ), - address: addressModel, - additionalFields: HouseholdAdditionalFields( - version: 1, - fields: [ - //[TODO: Use pregnant women form value based on project config - ...?householdModel - ?.additionalFields?.fields - .where((e) => - e.key != - AdditionalFieldsType - .pregnantWomen - .toValue() && - e.key != - AdditionalFieldsType.children - .toValue()), - AdditionalField( - AdditionalFieldsType.pregnantWomen - .toValue(), - pregnantWomen, - ), - AdditionalField( - AdditionalFieldsType.children.toValue(), - children, - ) - ])); + createdTime: + context.millisecondsSinceEpoch(), + lastModifiedBy: + RegistrationDeliverySingleton() + .loggedInUserUuid + .toString(), + lastModifiedTime: + context.millisecondsSinceEpoch(), + ), + address: addressModel, + additionalFields: HouseholdAdditionalFields( + version: 1, + fields: [ + //[TODO: Use pregnant women form value based on project config + ...?householdModel + ?.additionalFields?.fields + .where((e) => + e.key != + AdditionalFieldsType + .pregnantWomen + .toValue() && + e.key != + AdditionalFieldsType + .children + .toValue()), + AdditionalField( + AdditionalFieldsType.pregnantWomen + .toValue(), + pregnantWomen, + ), + AdditionalField( + AdditionalFieldsType.children + .toValue(), + children, + ) + ])); - bloc.add( - BeneficiaryRegistrationSaveHouseholdDetailsEvent( - household: household, - registrationDate: dateOfRegistration, - ), - ); - context.router.push( - IndividualDetailsRoute(isHeadOfHousehold: true), - ); - }, - editHousehold: ( - addressModel, - householdModel, - individuals, - registrationDate, - projectBeneficiaryModel, - loading, - isHeadOfHousehold, - ) { - var household = householdModel.copyWith( - memberCount: memberCount, - address: addressModel, - clientAuditDetails: (householdModel - .clientAuditDetails - ?.createdBy != - null && - householdModel.clientAuditDetails - ?.createdTime != - null) - ? ClientAuditDetails( - createdBy: householdModel - .clientAuditDetails!.createdBy, - createdTime: householdModel - .clientAuditDetails!.createdTime, - lastModifiedBy: - RegistrationDeliverySingleton() - .loggedInUserUuid, - lastModifiedTime: DateTime.now() - .millisecondsSinceEpoch, - ) - : null, - rowVersion: householdModel.rowVersion, - additionalFields: HouseholdAdditionalFields( - version: householdModel - .additionalFields?.version ?? - 1, - fields: [ - //[TODO: Use pregnant women form value based on project config - ...?householdModel - .additionalFields?.fields - .where((e) => - e.key != - AdditionalFieldsType - .pregnantWomen - .toValue() && - e.key != - AdditionalFieldsType.children - .toValue()), - AdditionalField( - AdditionalFieldsType.pregnantWomen - .toValue(), - pregnantWomen, - ), - AdditionalField( - AdditionalFieldsType.children.toValue(), - children, - ) - ])); + bloc.add( + BeneficiaryRegistrationSaveHouseholdDetailsEvent( + household: household, + registrationDate: dateOfRegistration, + ), + ); + context.router.push( + IndividualDetailsRoute( + isHeadOfHousehold: true), + ); + }, + editHousehold: ( + addressModel, + householdModel, + individuals, + registrationDate, + projectBeneficiaryModel, + loading, + isHeadOfHousehold, + ) { + var household = householdModel.copyWith( + memberCount: memberCount, + address: addressModel, + clientAuditDetails: (householdModel + .clientAuditDetails + ?.createdBy != + null && + householdModel.clientAuditDetails + ?.createdTime != + null) + ? ClientAuditDetails( + createdBy: householdModel + .clientAuditDetails!.createdBy, + createdTime: householdModel + .clientAuditDetails! + .createdTime, + lastModifiedBy: + RegistrationDeliverySingleton() + .loggedInUserUuid, + lastModifiedTime: DateTime.now() + .millisecondsSinceEpoch, + ) + : null, + rowVersion: householdModel.rowVersion, + additionalFields: HouseholdAdditionalFields( + version: householdModel + .additionalFields?.version ?? + 1, + fields: [ + //[TODO: Use pregnant women form value based on project config + ...?householdModel + .additionalFields?.fields + .where((e) => + e.key != + AdditionalFieldsType + .pregnantWomen + .toValue() && + e.key != + AdditionalFieldsType + .children + .toValue()), + AdditionalField( + AdditionalFieldsType.pregnantWomen + .toValue(), + pregnantWomen, + ), + AdditionalField( + AdditionalFieldsType.children + .toValue(), + children, + ) + ])); - bloc.add( - BeneficiaryRegistrationUpdateHouseholdDetailsEvent( - household: household.copyWith( - clientAuditDetails: (addressModel - .clientAuditDetails - ?.createdBy != - null && - addressModel.clientAuditDetails - ?.createdTime != - null) - ? ClientAuditDetails( - createdBy: addressModel - .clientAuditDetails!.createdBy, - createdTime: addressModel - .clientAuditDetails!.createdTime, - lastModifiedBy: - RegistrationDeliverySingleton() - .loggedInUserUuid, - lastModifiedTime: - context.millisecondsSinceEpoch(), - ) - : null, - ), - addressModel: addressModel.copyWith( - clientAuditDetails: (addressModel - .clientAuditDetails - ?.createdBy != - null && - addressModel.clientAuditDetails - ?.createdTime != - null) - ? ClientAuditDetails( - createdBy: addressModel - .clientAuditDetails!.createdBy, - createdTime: addressModel - .clientAuditDetails!.createdTime, - lastModifiedBy: - RegistrationDeliverySingleton() - .loggedInUserUuid, - lastModifiedTime: - context.millisecondsSinceEpoch(), - ) - : null, - ), - ), + bloc.add( + BeneficiaryRegistrationUpdateHouseholdDetailsEvent( + household: household.copyWith( + clientAuditDetails: (addressModel + .clientAuditDetails + ?.createdBy != + null && + addressModel.clientAuditDetails + ?.createdTime != + null) + ? ClientAuditDetails( + createdBy: addressModel + .clientAuditDetails! + .createdBy, + createdTime: addressModel + .clientAuditDetails! + .createdTime, + lastModifiedBy: + RegistrationDeliverySingleton() + .loggedInUserUuid, + lastModifiedTime: context + .millisecondsSinceEpoch(), + ) + : null, + ), + addressModel: addressModel.copyWith( + clientAuditDetails: (addressModel + .clientAuditDetails + ?.createdBy != + null && + addressModel.clientAuditDetails + ?.createdTime != + null) + ? ClientAuditDetails( + createdBy: addressModel + .clientAuditDetails! + .createdBy, + createdTime: addressModel + .clientAuditDetails! + .createdTime, + lastModifiedBy: + RegistrationDeliverySingleton() + .loggedInUserUuid, + lastModifiedTime: context + .millisecondsSinceEpoch(), + ) + : null, + ), + ), + ); + }, ); - - }, - ); - } - }, - child: Center( - child: Text( - registrationState.mapOrNull( - editHousehold: (value) => localizations - .translate(i18.common.coreCommonSave), - ) ?? - localizations - .translate(i18.householdDetails.actionLabel), + } + }, ), - ), - ), - ), + ]), slivers: [ SliverToBoxAdapter( child: DigitCard( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, + margin: const EdgeInsets.all(spacer2), children: [ - TextBlock( - padding: const EdgeInsets.only(top: kPadding), - heading: localizations.translate( - i18.householdDetails.householdDetailsLabel, + DigitTextBlock( + padding: const EdgeInsets.all(0), + heading: localizations.translate( + i18.householdDetails.householdDetailsLabel, + ), + description: localizations.translate( + i18.householdDetails.householdDetailsDescription, + ), + ), + householdDetailsShowcaseData.dateOfRegistration.buildWith( + child: ReactiveWrapperField( + formControlName: _dateOfRegistrationKey, + builder: (field) => LabeledField( + label: localizations.translate( + i18.householdDetails.dateOfRegistrationLabel, ), - headingStyle: theme.textTheme.displayMedium, - body: localizations.translate( - i18.householdDetails.householdDetailsDescription, + child: DigitDateFormInput( + readOnly: true, + confirmText: localizations.translate( + i18.common.coreCommonOk, + ), + cancelText: localizations.translate( + i18.common.coreCommonCancel, + ), + initialValue: + DateFormat(Constants().dateMonthYearFormat) + .format(form + .control(_dateOfRegistrationKey) + .value) + .toString(), ), ), - Column(children: [ - householdDetailsShowcaseData.dateOfRegistration - .buildWith( - child: DigitDateFormPicker( - isEnabled: false, - formControlName: _dateOfRegistrationKey, - label: localizations.translate( - i18.householdDetails.dateOfRegistrationLabel, - ), - isRequired: false, - confirmText: localizations.translate( - i18.common.coreCommonOk, - ), - cancelText: localizations.translate( - i18.common.coreCommonCancel, - ), - ), + ), + ), + //[TODO: Use pregnant women form value based on project config + householdDetailsShowcaseData + .numberOfPregnantWomenInHousehold + .buildWith( + child: ReactiveWrapperField( + formControlName: _pregnantWomenCountKey, + builder: (field) => LabeledField( + label: localizations.translate( + i18.householdDetails.noOfPregnantWomenCountLabel, ), - //[TODO: Use pregnant women form value based on project config - householdDetailsShowcaseData - .numberOfPregnantWomenInHousehold - .buildWith( - child: DigitIntegerFormPicker( - minimum: 0, - maximum: 10, - onChange: () { - int pregnantWomen = form - .control(_pregnantWomenCountKey) - .value; - int children = - form.control(_childrenCountKey).value; - int memberCount = - form.control(_memberCountKey).value; - form.control(_memberCountKey).value = - memberCount < (children + pregnantWomen) - ? children + pregnantWomen - : memberCount; - }, - form: form, - formControlName: _pregnantWomenCountKey, - label: localizations.translate( - i18.householdDetails - .noOfPregnantWomenCountLabel, - ), - incrementer: true, - ), + child: DigitNumericFormInput( + minValue: 0, + maxValue: 10, + step: 1, + initialValue: form + .control(_pregnantWomenCountKey) + .value + .toString(), + onChange: (value) { + form.control(_pregnantWomenCountKey).value = + int.parse(value); + int pregnantWomen = + form.control(_pregnantWomenCountKey).value; + int children = + form.control(_childrenCountKey).value; + int memberCount = + form.control(_memberCountKey).value; + form.control(_memberCountKey).value = + memberCount < (children + pregnantWomen) + ? children + pregnantWomen + : memberCount; + }, ), - householdDetailsShowcaseData - .numberOfChildrenBelow5InHousehold - .buildWith( - child: DigitIntegerFormPicker( - minimum: 0, - maximum: 20, - onChange: () { - int pregnantWomen = form - .control(_pregnantWomenCountKey) - .value; - int children = - form.control(_childrenCountKey).value; - int memberCount = - form.control(_memberCountKey).value; - form.control(_memberCountKey).value = - memberCount <= (children + pregnantWomen) - ? children + pregnantWomen - : memberCount; - }, - form: form, - formControlName: _childrenCountKey, - label: localizations.translate( - i18.householdDetails - .noOfChildrenBelow5YearsLabel, - ), - incrementer: true, - ), + ), + ), + ), + householdDetailsShowcaseData + .numberOfChildrenBelow5InHousehold + .buildWith( + child: ReactiveWrapperField( + formControlName: _childrenCountKey, + builder: (field) => LabeledField( + label: localizations.translate( + i18.householdDetails.noOfChildrenBelow5YearsLabel, ), - householdDetailsShowcaseData - .numberOfMembersLivingInHousehold - .buildWith( - child: DigitIntegerFormPicker( - minimum: children + pregnantWomen != 0 - ? children + pregnantWomen - : 1, - maximum: 30, - onChange: () { - int pregnantWomen = form - .control(_pregnantWomenCountKey) - .value; - int children = - form.control(_childrenCountKey).value; - int memberCount = - form.control(_memberCountKey).value; - if (memberCount <= pregnantWomen + children) { - form.control(_memberCountKey).value = - (children + pregnantWomen); - } - }, - form: form, - formControlName: _memberCountKey, - label: localizations.translate( - i18.householdDetails.noOfMembersCountLabel, - ), - incrementer: true, - ), + child: DigitNumericFormInput( + minValue: 0, + maxValue: 20, + step: 1, + initialValue: form + .control(_childrenCountKey) + .value + .toString(), + onChange: (value) { + form.control(_childrenCountKey).value = + int.parse(value); + int pregnantWomen = + form.control(_pregnantWomenCountKey).value; + int children = + form.control(_childrenCountKey).value; + int memberCount = + form.control(_memberCountKey).value; + form.control(_memberCountKey).value = + memberCount <= (children + pregnantWomen) + ? children + pregnantWomen + : memberCount; + }, + ), + ), + ), + ), + householdDetailsShowcaseData + .numberOfMembersLivingInHousehold + .buildWith( + child: ReactiveWrapperField( + formControlName: _memberCountKey, + builder: (field) => LabeledField( + label: localizations.translate( + i18.householdDetails.noOfMembersCountLabel, ), - ]), - const SizedBox(height: 16), - ], + child: DigitNumericFormInput( + minValue: children + pregnantWomen != 0 + ? children + pregnantWomen + : 1, + maxValue: 30, + step: 1, + initialValue: form + .control(_memberCountKey) + .value + .toString(), + onChange: (value) { + form.control(_memberCountKey).value = + int.parse(value); + int pregnantWomen = + form.control(_pregnantWomenCountKey).value; + int children = + form.control(_childrenCountKey).value; + int memberCount = + form.control(_memberCountKey).value; + if (memberCount <= pregnantWomen + children) { + form.control(_memberCountKey).value = + (children + pregnantWomen); + } + }, + ), + ), + ), ), - ), + const SizedBox(height: 16), + ]), ), ], ); diff --git a/packages/registration_delivery/lib/pages/beneficiary_registration/household_location.dart b/packages/registration_delivery/lib/pages/beneficiary_registration/household_location.dart index 59a3eb206..a8b251f03 100644 --- a/packages/registration_delivery/lib/pages/beneficiary_registration/household_location.dart +++ b/packages/registration_delivery/lib/pages/beneficiary_registration/household_location.dart @@ -1,9 +1,12 @@ import 'package:auto_route/auto_route.dart'; -import 'package:digit_components/digit_components.dart'; -import 'package:digit_components/widgets/atoms/text_block.dart'; -import 'package:digit_components/widgets/digit_sync_dialog.dart'; import 'package:digit_data_model/data_model.dart'; import 'package:digit_data_model/models/entities/address_type.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/services/location_bloc.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/utils/component_utils.dart'; +import 'package:digit_ui_components/widgets/atoms/text_block.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; @@ -51,10 +54,10 @@ class HouseholdLocationPageState extends LocalizedState { create: (value) { WidgetsBinding.instance.addPostFrameCallback((_) { // Show the dialog after the first frame is built - DigitComponentsUtils().showLocationCapturingDialog( + DigitComponentsUtils.showDialog( context, localizations.translate(i18.common.locationCapturing), - DigitSyncDialogType.inProgress, + DialogType.inProgress, ); }); return true; @@ -81,7 +84,7 @@ class HouseholdLocationPageState extends LocalizedState { if (locationState.accuracy != null) { //Hide the dialog after 1 seconds Future.delayed(const Duration(seconds: 1), () { - DigitComponentsUtils().hideDialog(context); + DigitComponentsUtils.hideDialog(context); }); } }); @@ -105,7 +108,7 @@ class HouseholdLocationPageState extends LocalizedState { : true; }, child: ScrollableContent( - enableFixedButton: true, + enableFixedDigitButton: true, header: const Column( children: [ BackNavigationHelpHeaderWidget( @@ -115,274 +118,322 @@ class HouseholdLocationPageState extends LocalizedState { ], ), footer: DigitCard( - margin: const EdgeInsets.fromLTRB(0, kPadding, 0, 0), - padding: const EdgeInsets.fromLTRB(kPadding, 0, kPadding, 0), - child: BlocBuilder( - builder: (context, locationState) { - return DigitElevatedButton( - onPressed: () { - form.markAllAsTouched(); - if (!form.valid) return; + margin: const EdgeInsets.only(top: spacer2), + children: [ + BlocBuilder( + builder: (context, locationState) { + return DigitButton( + label: localizations.translate( + i18.householdLocation.actionLabel, + ), + type: DigitButtonType.primary, + size: DigitButtonSize.large, + mainAxisSize: MainAxisSize.max, + onPressed: () { + form.markAllAsTouched(); + if (!form.valid) return; - final addressLine1 = - form.control(_addressLine1Key).value as String?; - final addressLine2 = - form.control(_addressLine2Key).value as String?; - final landmark = - form.control(_landmarkKey).value as String?; - final postalCode = - form.control(_postalCodeKey).value as String?; - registrationState.maybeWhen( - orElse: () { - return; - }, - create: ( - address, - householdModel, - individualModel, - projectBeneficiaryModel, - registrationDate, - searchQuery, - loading, - isHeadOfHousehold, - ) { - var addressModel = AddressModel( - addressLine1: addressLine1 != null && - addressLine1.trim().isNotEmpty - ? addressLine1 - : null, - addressLine2: addressLine2 != null && - addressLine2.trim().isNotEmpty - ? addressLine2 - : null, - landmark: - landmark != null && landmark.trim().isNotEmpty + final addressLine1 = + form.control(_addressLine1Key).value as String?; + final addressLine2 = + form.control(_addressLine2Key).value as String?; + final landmark = + form.control(_landmarkKey).value as String?; + final postalCode = + form.control(_postalCodeKey).value as String?; + registrationState.maybeWhen( + orElse: () { + return; + }, + create: ( + address, + householdModel, + individualModel, + projectBeneficiaryModel, + registrationDate, + searchQuery, + loading, + isHeadOfHousehold, + ) { + var addressModel = AddressModel( + addressLine1: addressLine1 != null && + addressLine1.trim().isNotEmpty + ? addressLine1 + : null, + addressLine2: addressLine2 != null && + addressLine2.trim().isNotEmpty + ? addressLine2 + : null, + landmark: landmark != null && + landmark.trim().isNotEmpty ? landmark : null, - pincode: postalCode != null && - postalCode.trim().isNotEmpty - ? postalCode - : null, - type: AddressType.correspondence, - latitude: form.control(_latKey).value ?? - locationState.latitude, - longitude: form.control(_lngKey).value ?? - locationState.longitude, - locationAccuracy: - form.control(_accuracyKey).value ?? - locationState.accuracy, - locality: LocalityModel( - code: RegistrationDeliverySingleton() - .boundary! - .code!, - name: RegistrationDeliverySingleton() - .boundary! - .name, - ), - tenantId: - RegistrationDeliverySingleton().tenantId, - rowVersion: 1, - auditDetails: AuditDetails( - createdBy: RegistrationDeliverySingleton() - .loggedInUserUuid!, - createdTime: context.millisecondsSinceEpoch(), - ), - clientAuditDetails: ClientAuditDetails( - createdBy: RegistrationDeliverySingleton() - .loggedInUserUuid!, - createdTime: context.millisecondsSinceEpoch(), - lastModifiedBy: RegistrationDeliverySingleton() - .loggedInUserUuid, - lastModifiedTime: - context.millisecondsSinceEpoch(), - ), - ); + pincode: postalCode != null && + postalCode.trim().isNotEmpty + ? postalCode + : null, + type: AddressType.correspondence, + latitude: form.control(_latKey).value ?? + locationState.latitude, + longitude: form.control(_lngKey).value ?? + locationState.longitude, + locationAccuracy: + form.control(_accuracyKey).value ?? + locationState.accuracy, + locality: LocalityModel( + code: RegistrationDeliverySingleton() + .boundary! + .code!, + name: RegistrationDeliverySingleton() + .boundary! + .name, + ), + tenantId: + RegistrationDeliverySingleton().tenantId, + rowVersion: 1, + auditDetails: AuditDetails( + createdBy: RegistrationDeliverySingleton() + .loggedInUserUuid!, + createdTime: + context.millisecondsSinceEpoch(), + ), + clientAuditDetails: ClientAuditDetails( + createdBy: RegistrationDeliverySingleton() + .loggedInUserUuid!, + createdTime: + context.millisecondsSinceEpoch(), + lastModifiedBy: + RegistrationDeliverySingleton() + .loggedInUserUuid, + lastModifiedTime: + context.millisecondsSinceEpoch(), + ), + ); - bloc.add( - BeneficiaryRegistrationSaveAddressEvent( - addressModel, - ), - ); - router.push(HouseDetailsRoute()); - }, - editHousehold: ( - address, - householdModel, - individuals, - registrationDate, - projectBeneficiaryModel, - loading, - headOfHousehold, - ) { - var addressModel = address.copyWith( - addressLine1: addressLine1 != null && - addressLine1.trim().isNotEmpty - ? addressLine1 - : null, - addressLine2: addressLine2 != null && - addressLine2.trim().isNotEmpty - ? addressLine2 - : null, - landmark: - landmark != null && landmark.trim().isNotEmpty + bloc.add( + BeneficiaryRegistrationSaveAddressEvent( + addressModel, + ), + ); + router.push(HouseDetailsRoute()); + }, + editHousehold: ( + address, + householdModel, + individuals, + registrationDate, + projectBeneficiaryModel, + loading, + headOfHousehold, + ) { + var addressModel = address.copyWith( + addressLine1: addressLine1 != null && + addressLine1.trim().isNotEmpty + ? addressLine1 + : null, + addressLine2: addressLine2 != null && + addressLine2.trim().isNotEmpty + ? addressLine2 + : null, + landmark: landmark != null && + landmark.trim().isNotEmpty ? landmark : null, - locality: address.locality, - pincode: postalCode != null && - postalCode.trim().isNotEmpty - ? postalCode - : null, - type: AddressType.correspondence, - latitude: form.control(_latKey).value, - longitude: form.control(_lngKey).value, - locationAccuracy: - form.control(_accuracyKey).value, - ); - // TODO [Linking of Voucher for Household based project need to be handled] + locality: address.locality, + pincode: postalCode != null && + postalCode.trim().isNotEmpty + ? postalCode + : null, + type: AddressType.correspondence, + latitude: form.control(_latKey).value, + longitude: form.control(_lngKey).value, + locationAccuracy: + form.control(_accuracyKey).value, + ); + // TODO [Linking of Voucher for Household based project need to be handled] - bloc.add( - BeneficiaryRegistrationSaveAddressEvent( - addressModel, - ), + bloc.add( + BeneficiaryRegistrationSaveAddressEvent( + addressModel, + ), + ); + router.push(HouseDetailsRoute()); + }, ); - router.push(HouseDetailsRoute()); }, ); }, - child: Center( - child: Text( - localizations.translate( - i18.householdLocation.actionLabel, - ), - ), - ), - ); - }, - ), - ), + ), + ]), slivers: [ SliverToBoxAdapter( child: DigitCard( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, + margin: const EdgeInsets.all(spacer2), children: [ - TextBlock( - padding: const EdgeInsets.only(top: kPadding), - heading: localizations.translate( - i18.householdLocation.householdLocationLabelText, - ), - headingStyle: theme.textTheme.displayMedium, - body: localizations.translate( - i18.householdLocation - .householdLocationDescriptionText, - )), - Column(children: [ - householdLocationShowcaseData.administrativeArea - .buildWith( - child: DigitTextFormField( - formControlName: _administrationAreaKey, - label: localizations.translate( + DigitTextBlock( + padding: const EdgeInsets.only(top: spacer2), + heading: localizations.translate( + i18.householdLocation.householdLocationLabelText, + ), + description: localizations.translate( + i18.householdLocation + .householdLocationDescriptionText, + )), + householdLocationShowcaseData.administrativeArea.buildWith( + child: ReactiveWrapperField( + formControlName: _administrationAreaKey, + validationMessages: { + 'required': (_) => localizations.translate( i18.householdLocation - .administrationAreaFormLabel, + .administrationAreaRequiredValidation, ), - readOnly: true, - validationMessages: { - 'required': (_) => localizations.translate( - i18.householdLocation - .administrationAreaRequiredValidation, - ), - }, - ), + }, + builder: (field) => LabeledField( + label: localizations.translate( + i18.householdLocation.administrationAreaFormLabel, + ), + child: DigitTextFormInput( + readOnly: true, + errorMessage: field.errorText, + initialValue: + form.control(_administrationAreaKey).value, + onChange: (value) { + form.control(_administrationAreaKey).value = + value; + }, ), - householdLocationShowcaseData.gpsAccuracy.buildWith( - child: DigitTextFormField( - formControlName: _accuracyKey, - label: localizations.translate( - i18.householdLocation.gpsAccuracyLabel, + ), + ), + ), + householdLocationShowcaseData.gpsAccuracy.buildWith( + child: ReactiveWrapperField( + formControlName: _accuracyKey, + validationMessages: { + 'required': (_) => localizations.translate( + i18.common.corecommonRequired, ), - readOnly: true, - validationMessages: { - 'required': (_) => localizations.translate( - i18.common.corecommonRequired, - ), - }, - ), + }, + builder: (field) => LabeledField( + label: localizations.translate( + i18.householdLocation.gpsAccuracyLabel, ), - householdLocationShowcaseData.addressLine1.buildWith( - child: DigitTextFormField( - formControlName: _addressLine1Key, - label: localizations.translate( - i18.householdLocation - .householdAddressLine1LabelText, + child: DigitTextFormInput( + readOnly: true, + errorMessage: field.errorText, + initialValue: + form.control(_accuracyKey).value.toString(), + ), + ), + ), + ), + householdLocationShowcaseData.addressLine1.buildWith( + child: ReactiveWrapperField( + formControlName: _addressLine1Key, + validationMessages: { + 'required': (_) => localizations.translate( + i18.common.min2CharsRequired, ), - validationMessages: { - 'required': (_) => localizations.translate( - i18.common.min2CharsRequired, - ), - 'maxLength': (object) => localizations - .translate(i18.common.maxCharsRequired) - .replaceAll('{}', maxLength.toString()), - }, - ), + 'maxLength': (object) => localizations + .translate(i18.common.maxCharsRequired) + .replaceAll('{}', maxLength.toString()), + }, + builder: (field) => LabeledField( + label: localizations.translate( + i18.householdLocation + .householdAddressLine1LabelText, ), - householdLocationShowcaseData.addressLine2.buildWith( - child: DigitTextFormField( - formControlName: _addressLine2Key, - label: localizations.translate( - i18.householdLocation - .householdAddressLine2LabelText, + child: DigitTextFormInput( + errorMessage: field.errorText, + onChange: (value) { + form.control(_addressLine1Key).value = value; + }, + initialValue: form.control(_addressLine1Key).value, + ), + ), + ), + ), + householdLocationShowcaseData.addressLine2.buildWith( + child: ReactiveWrapperField( + formControlName: _addressLine2Key, + validationMessages: { + 'required': (_) => localizations.translate( + i18.common.min2CharsRequired, ), - validationMessages: { - 'required': (_) => localizations.translate( - i18.common.min2CharsRequired, - ), - 'maxLength': (object) => localizations - .translate(i18.common.maxCharsRequired) - .replaceAll('{}', maxLength.toString()), - }, - ), + 'maxLength': (object) => localizations + .translate(i18.common.maxCharsRequired) + .replaceAll('{}', maxLength.toString()), + }, + builder: (field) => LabeledField( + label: localizations.translate( + i18.householdLocation + .householdAddressLine2LabelText, ), - householdLocationShowcaseData.landmark.buildWith( - child: DigitTextFormField( - formControlName: _landmarkKey, - label: localizations.translate( - i18.householdLocation.landmarkFormLabel, + child: DigitTextFormInput( + errorMessage: field.errorText, + onChange: (value) { + form.control(_addressLine2Key).value = value; + }, + initialValue: form.control(_addressLine2Key).value, + ), + ), + ), + ), + householdLocationShowcaseData.landmark.buildWith( + child: ReactiveWrapperField( + formControlName: _landmarkKey, + validationMessages: { + 'required': (_) => localizations.translate( + i18.common.min2CharsRequired, ), - validationMessages: { - 'required': (_) => localizations.translate( - i18.common.min2CharsRequired, - ), - 'maxLength': (object) => localizations - .translate(i18.common.maxCharsRequired) - .replaceAll('{}', maxLength.toString()), - }, - ), + 'maxLength': (object) => localizations + .translate(i18.common.maxCharsRequired) + .replaceAll('{}', maxLength.toString()), + }, + builder: (field) => LabeledField( + label: localizations.translate( + i18.householdLocation.landmarkFormLabel, + ), + child: DigitTextFormInput( + errorMessage: field.errorText, + onChange: (value) { + form.control(_landmarkKey).value = value; + }, + initialValue: form.control(_landmarkKey).value, ), - householdLocationShowcaseData.postalCode.buildWith( - child: DigitTextFormField( - keyboardType: TextInputType.text, - formControlName: _postalCodeKey, - label: localizations.translate( - i18.householdLocation.postalCodeFormLabel, + ), + ), + ), + householdLocationShowcaseData.postalCode.buildWith( + child: ReactiveWrapperField( + formControlName: _postalCodeKey, + validationMessages: { + 'required': (_) => localizations.translate( + i18.common.min2CharsRequired, ), - validationMessages: { - 'required': (_) => localizations.translate( - i18.common.min2CharsRequired, - ), - 'maxLength': (object) => localizations - .translate(i18.common.maxCharsRequired) - .replaceAll('{}', '6'), - }, - inputFormatters: [ - FilteringTextInputFormatter.digitsOnly, - ], - ), + 'maxLength': (object) => localizations + .translate(i18.common.maxCharsRequired) + .replaceAll('{}', '6'), + }, + builder: (field) => LabeledField( + label: localizations.translate( + i18.householdLocation.postalCodeFormLabel, ), - ]), - ], + child: DigitTextFormInput( + keyboardType: TextInputType.text, + inputFormatters: [ + FilteringTextInputFormatter.digitsOnly, + ], + errorMessage: field.errorText, + onChange: (value) { + form.control(_postalCodeKey).value = value; + }, + maxLength: 6, + initialValue: form.control(_postalCodeKey).value, + ), + ), + ), ), - ), + ]), ), ], ), @@ -399,35 +450,37 @@ class HouseholdLocationPageState extends LocalizedState { return fb.group({ _administrationAreaKey: FormControl( - value: localizations.translate( - RegistrationDeliverySingleton().boundary!.code ?? ''), + value: localizations + .translate(RegistrationDeliverySingleton().boundary!.code ?? ''), validators: [Validators.required], ), _addressLine1Key: FormControl(value: addressModel?.addressLine1, validators: [ - CustomValidator.requiredMin, + Validators.delegate( + (validator) => CustomValidator.requiredMin(validator)), Validators.maxLength(64), ]), _addressLine2Key: FormControl( value: addressModel?.addressLine2, validators: [ - CustomValidator.requiredMin, + Validators.delegate( + (validator) => CustomValidator.requiredMin(validator)), Validators.maxLength(64), ], ), _landmarkKey: FormControl(value: addressModel?.landmark, validators: [ - CustomValidator.requiredMin, + Validators.delegate( + (validator) => CustomValidator.requiredMin(validator)), Validators.maxLength(64), ]), _postalCodeKey: FormControl(value: addressModel?.pincode, validators: [ - CustomValidator.requiredMin, + Validators.delegate( + (validator) => CustomValidator.requiredMin(validator)), Validators.maxLength(6), ]), - _latKey: FormControl(value: addressModel?.latitude, validators: [ - CustomValidator.requiredMin, - ]), + _latKey: FormControl(value: addressModel?.latitude), _lngKey: FormControl( value: addressModel?.longitude, ), diff --git a/packages/registration_delivery/lib/pages/beneficiary_registration/individual_details.dart b/packages/registration_delivery/lib/pages/beneficiary_registration/individual_details.dart index 34ea6c862..93f41c144 100644 --- a/packages/registration_delivery/lib/pages/beneficiary_registration/individual_details.dart +++ b/packages/registration_delivery/lib/pages/beneficiary_registration/individual_details.dart @@ -1,14 +1,14 @@ import 'package:auto_route/auto_route.dart'; import 'package:collection/collection.dart'; -import 'package:digit_components/digit_components.dart'; -import 'package:digit_components/utils/date_utils.dart'; -import 'package:digit_components/widgets/atoms/digit_checkbox.dart'; -import 'package:digit_components/widgets/atoms/digit_toaster.dart'; -import 'package:digit_components/widgets/atoms/selection_card.dart'; -import 'package:digit_components/widgets/digit_dob_picker.dart'; import 'package:digit_data_model/data_model.dart'; import 'package:digit_scanner/blocs/scanner.dart'; import 'package:digit_scanner/pages/qr_scanner.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/utils/date_utils.dart'; +import 'package:digit_ui_components/widgets/atoms/digit_dob_picker.dart'; +import 'package:digit_ui_components/widgets/atoms/selection_card.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; @@ -60,6 +60,7 @@ class IndividualDetailsPageState extends LocalizedState { final router = context.router; final theme = Theme.of(context); DateTime before150Years = DateTime(now.year - 150, now.month, now.day); + final textTheme = theme.digitTextTheme(context); return Scaffold( body: ReactiveFormBuilder( @@ -95,9 +96,8 @@ class IndividualDetailsPageState extends LocalizedState { ); }, builder: (context, state) { - // context. return ScrollableContent( - enableFixedButton: true, + enableFixedDigitButton: true, header: const Column(children: [ BackNavigationHelpHeaderWidget( showHelp: false, @@ -105,435 +105,465 @@ class IndividualDetailsPageState extends LocalizedState { ), ]), footer: DigitCard( - margin: const EdgeInsets.fromLTRB(0, kPadding, 0, 0), - padding: const EdgeInsets.fromLTRB(kPadding, 0, kPadding, 0), - child: ValueListenableBuilder( - valueListenable: clickedStatus, - builder: (context, bool isClicked, _) { - return DigitElevatedButton( - onPressed: () async { - final age = DigitDateUtils.calculateAge( - form.control(_dobKey).value as DateTime?, - ); - if ((age.years == 0 && age.months == 0) || - age.years >= 150 && age.months > 0) { - form.control(_dobKey).setErrors({'': true}); - } - if (form.control(_idTypeKey).value == null) { - form.control(_idTypeKey).setErrors({'': true}); - } - if (form.control(_genderKey).value == null) { - setState(() { - form.control(_genderKey).setErrors({'': true}); - }); - } - final userId = - RegistrationDeliverySingleton().loggedInUserUuid; - final projectId = - RegistrationDeliverySingleton().projectId; - form.markAllAsTouched(); - if (!form.valid) return; - FocusManager.instance.primaryFocus?.unfocus(); - - state.maybeWhen( - orElse: () { - return; - }, - create: ( - addressModel, - householdModel, - individualModel, - projectBeneficiaryModel, - registrationDate, - searchQuery, - loading, - isHeadOfHousehold, - ) async { - final individual = _getIndividualModel( - context, - form: form, - oldIndividual: null, - ); - - final boundary = - RegistrationDeliverySingleton().boundary; - - bloc.add( - BeneficiaryRegistrationSaveIndividualDetailsEvent( - model: individual, - isHeadOfHousehold: widget.isHeadOfHousehold, - ), + margin: const EdgeInsets.only(top: spacer2), + children: [ + ValueListenableBuilder( + valueListenable: clickedStatus, + builder: (context, bool isClicked, _) { + return DigitButton( + label: state.mapOrNull( + editIndividual: (value) => localizations + .translate(i18.common.coreCommonSave), + ) ?? + localizations + .translate(i18.common.coreCommonSubmit), + type: DigitButtonType.primary, + size: DigitButtonSize.large, + mainAxisSize: MainAxisSize.max, + onPressed: () async { + final age = DigitDateUtils.calculateAge( + form.control(_dobKey).value as DateTime, ); - final scannerBloc = - context.read(); - - if (scannerBloc.state.duplicate) { - DigitToast.show( - context, - options: DigitToastOptions( - localizations.translate( - i18.deliverIntervention - .resourceAlreadyScanned, - ), - true, - theme, - ), - ); - } else { - clickedStatus.value = true; - final scannerBloc = - context.read(); - bloc.add( - BeneficiaryRegistrationSummaryEvent( - projectId: projectId!, - userUuid: userId!, - boundary: boundary!, - tag: scannerBloc.state.qrCodes.isNotEmpty - ? scannerBloc.state.qrCodes.first - : null, - ), - ); - router.push(SummaryRoute()); + if ((age.years == 0 && age.months == 0) || + age.years >= 150 && age.months > 0) { + form.control(_dobKey).setErrors({'': true}); } - }, - editIndividual: ( - householdModel, - individualModel, - addressModel, - projectBeneficiaryModel, - loading, - ) { - final scannerBloc = - context.read(); - final individual = _getIndividualModel( - context, - form: form, - oldIndividual: individualModel, - ); - final tag = scannerBloc.state.qrCodes.isNotEmpty - ? scannerBloc.state.qrCodes.first - : null; - - if (tag != null && - tag != projectBeneficiaryModel?.tag && - scannerBloc.state.duplicate) { - DigitToast.show( - context, - options: DigitToastOptions( - localizations.translate( - i18.deliverIntervention - .resourceAlreadyScanned, - ), - true, - theme, - ), - ); - } else { - bloc.add( - BeneficiaryRegistrationUpdateIndividualDetailsEvent( - addressModel: addressModel, - householdModel: householdModel, - model: individual.copyWith( - clientAuditDetails: (individual - .clientAuditDetails - ?.createdBy != - null && - individual.clientAuditDetails - ?.createdTime != - null) - ? ClientAuditDetails( - createdBy: individual - .clientAuditDetails!.createdBy, - createdTime: individual - .clientAuditDetails! - .createdTime, - lastModifiedBy: - RegistrationDeliverySingleton() - .loggedInUserUuid, - lastModifiedTime: context - .millisecondsSinceEpoch(), - ) - : null, - ), - tag: scannerBloc.state.qrCodes.isNotEmpty - ? scannerBloc.state.qrCodes.first - : null, - ), - ); + if (form.control(_idTypeKey).value == null) { + form.control(_idTypeKey).setErrors({'': true}); } - }, - addMember: ( - addressModel, - householdModel, - loading, - ) { - final individual = _getIndividualModel( - context, - form: form, - ); - - if (context.mounted) { - final scannerBloc = - context.read(); + if (form.control(_genderKey).value == null) { + setState(() { + form.control(_genderKey).setErrors({'': true}); + }); + } + final userId = RegistrationDeliverySingleton() + .loggedInUserUuid; + final projectId = + RegistrationDeliverySingleton().projectId; + form.markAllAsTouched(); + if (!form.valid) return; + FocusManager.instance.primaryFocus?.unfocus(); - if (scannerBloc.state.duplicate) { - DigitToast.show( + state.maybeWhen( + orElse: () { + return; + }, + create: ( + addressModel, + householdModel, + individualModel, + projectBeneficiaryModel, + registrationDate, + searchQuery, + loading, + isHeadOfHousehold, + ) async { + final individual = _getIndividualModel( context, - options: DigitToastOptions( - localizations.translate( - i18.deliverIntervention - .resourceAlreadyScanned, - ), - true, - theme, - ), + form: form, + oldIndividual: null, ); - } else { + + final boundary = + RegistrationDeliverySingleton().boundary; + bloc.add( - BeneficiaryRegistrationAddMemberEvent( - beneficiaryType: - RegistrationDeliverySingleton() - .beneficiaryType!, - householdModel: householdModel, - individualModel: individual, - addressModel: addressModel, - userUuid: RegistrationDeliverySingleton() - .loggedInUserUuid!, - projectId: RegistrationDeliverySingleton() - .projectId!, - tag: scannerBloc.state.qrCodes.isNotEmpty - ? scannerBloc.state.qrCodes.first - : null, + BeneficiaryRegistrationSaveIndividualDetailsEvent( + model: individual, + isHeadOfHousehold: widget.isHeadOfHousehold, ), ); - } - } + final scannerBloc = + context.read(); + scannerBloc.add( + const DigitScannerEvent.handleScanner(), + ); + + if (scannerBloc.state.duplicate) { + Toast.showToast(context, + message: localizations.translate( + i18.deliverIntervention + .resourceAlreadyScanned, + ), + type: ToastType.error); + } else { + clickedStatus.value = true; + final scannerBloc = + context.read(); + scannerBloc.add( + const DigitScannerEvent.handleScanner(), + ); + bloc.add( + BeneficiaryRegistrationSummaryEvent( + projectId: projectId!, + userUuid: userId!, + boundary: boundary!, + tag: scannerBloc.state.qrCodes.isNotEmpty + ? scannerBloc.state.qrCodes.first + : null, + ), + ); + router.push(SummaryRoute()); + } + }, + editIndividual: ( + householdModel, + individualModel, + addressModel, + projectBeneficiaryModel, + loading, + ) { + final scannerBloc = + context.read(); + scannerBloc.add( + const DigitScannerEvent.handleScanner(), + ); + final individual = _getIndividualModel( + context, + form: form, + oldIndividual: individualModel, + ); + final tag = scannerBloc.state.qrCodes.isNotEmpty + ? scannerBloc.state.qrCodes.first + : null; + + if (tag != null && + tag != projectBeneficiaryModel?.tag && + scannerBloc.state.duplicate) { + Toast.showToast(context, + message: localizations.translate( + i18.deliverIntervention + .resourceAlreadyScanned, + ), + type: ToastType.error); + } else { + bloc.add( + BeneficiaryRegistrationUpdateIndividualDetailsEvent( + addressModel: addressModel, + householdModel: householdModel, + model: individual.copyWith( + clientAuditDetails: (individual + .clientAuditDetails + ?.createdBy != + null && + individual.clientAuditDetails + ?.createdTime != + null) + ? ClientAuditDetails( + createdBy: individual + .clientAuditDetails! + .createdBy, + createdTime: individual + .clientAuditDetails! + .createdTime, + lastModifiedBy: + RegistrationDeliverySingleton() + .loggedInUserUuid, + lastModifiedTime: context + .millisecondsSinceEpoch(), + ) + : null, + ), + tag: scannerBloc.state.qrCodes.isNotEmpty + ? scannerBloc.state.qrCodes.first + : null, + ), + ); + } + }, + addMember: ( + addressModel, + householdModel, + loading, + ) { + final individual = _getIndividualModel( + context, + form: form, + ); + + if (context.mounted) { + final scannerBloc = + context.read(); + scannerBloc.add( + const DigitScannerEvent.handleScanner(), + ); + if (scannerBloc.state.duplicate) { + Toast.showToast( + context, + message: localizations.translate( + i18.deliverIntervention + .resourceAlreadyScanned, + ), + type: ToastType.error, + ); + } else { + bloc.add( + BeneficiaryRegistrationAddMemberEvent( + beneficiaryType: + RegistrationDeliverySingleton() + .beneficiaryType!, + householdModel: householdModel, + individualModel: individual, + addressModel: addressModel, + userUuid: + RegistrationDeliverySingleton() + .loggedInUserUuid!, + projectId: + RegistrationDeliverySingleton() + .projectId!, + tag: scannerBloc + .state.qrCodes.isNotEmpty + ? scannerBloc.state.qrCodes.first + : null, + ), + ); + } + } + }, + ); }, ); }, - child: Center( - child: Text( - state.mapOrNull( - editIndividual: (value) => localizations - .translate(i18.common.coreCommonSave), - ) ?? - localizations - .translate(i18.common.coreCommonSubmit), - ), - ), - ); - }, - ), - ), + ), + ]), slivers: [ SliverToBoxAdapter( child: DigitCard( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, + margin: const EdgeInsets.all(spacer2), children: [ - Padding( - padding: const EdgeInsets.only(bottom: kPadding), - child: Text( - localizations.translate( - i18.individualDetails.individualsDetailsLabelText, - ), - style: theme.textTheme.displayMedium, + Text( + localizations.translate( + i18.individualDetails.individualsDetailsLabelText, ), + style: textTheme.headingXl, ), - Column(children: [ - individualDetailsShowcaseData.nameOfIndividual - .buildWith( - child: DigitTextFormField( - formControlName: _individualNameKey, + individualDetailsShowcaseData.nameOfIndividual + .buildWith( + child: ReactiveWrapperField( + formControlName: _individualNameKey, + validationMessages: { + 'required': (object) => localizations.translate( + '${i18.individualDetails.nameLabelText}_IS_REQUIRED', + ), + 'maxLength': (object) => localizations + .translate(i18.common.maxCharsRequired) + .replaceAll('{}', maxLength.toString()), + }, + builder: (field) => LabeledField( label: localizations.translate( i18.individualDetails.nameLabelText, ), isRequired: true, - validationMessages: { - 'required': (object) => localizations.translate( - '${i18.individualDetails.nameLabelText}_IS_REQUIRED', - ), - 'maxLength': (object) => localizations - .translate(i18.common.maxCharsRequired) - .replaceAll('{}', maxLength.toString()), - }, + child: DigitTextFormInput( + initialValue: + form.control(_individualNameKey).value, + onChange: (value) { + form.control(_individualNameKey).value = + value; + }, + errorMessage: field.errorText, + ), ), ), - Offstage( - offstage: !widget.isHeadOfHousehold, - child: DigitCheckbox( - label: localizations.translate( - i18.individualDetails.checkboxLabelText, - ), - value: widget.isHeadOfHousehold, + ), + Offstage( + offstage: !widget.isHeadOfHousehold, + child: DigitCheckbox( + label: localizations.translate( + i18.individualDetails.checkboxLabelText, ), + value: widget.isHeadOfHousehold, + readOnly: widget.isHeadOfHousehold, + onChanged: (_) {}, ), - DigitReactiveSearchDropdown( + ), + ReactiveWrapperField( + formControlName: _idTypeKey, + validationMessages: { + 'required': (_) => localizations.translate( + i18.common.corecommonRequired, + ), + }, + builder: (field) => LabeledField( label: localizations.translate( i18.individualDetails.idTypeLabelText, ), - form: form, - menuItems: RegistrationDeliverySingleton() - .idTypeOptions! - .map( - (e) { - return e; - }, - ).toList(), - formControlName: _idTypeKey, - valueMapper: (value) { - return localizations.translate(value); - }, - onSelected: (value) { - setState(() { - if (value == 'DEFAULT') { - form.control(_idNumberKey).value = - IdGen.i.identifier.toString(); - } else { - form.control(_idNumberKey).value = null; - } - }); - }, isRequired: true, - validationMessage: localizations.translate( - i18.common.corecommonRequired, + child: DigitDropdown( + selectedOption: + (form.control(_idTypeKey).value != null) + ? DropdownItem( + name: localizations.translate( + form.control(_idTypeKey).value), + code: form.control(_idTypeKey).value) + : const DropdownItem(name: '', code: ''), + items: RegistrationDeliverySingleton() + .idTypeOptions! + .map( + (e) => DropdownItem( + name: localizations.translate(e), + code: e), + ) + .toList(), + onSelect: (value) { + form.control(_idTypeKey).value = value.code; + setState(() { + if (value.code == 'DEFAULT') { + form.control(_idNumberKey).value = + IdGen.i.identifier.toString(); + } else { + form.control(_idNumberKey).value = null; + } + }); + }, + emptyItemText: localizations + .translate(i18.common.noMatchFound), + errorMessage: form.control(_idTypeKey).hasErrors + ? localizations.translate( + i18.common.corecommonRequired, + ) + : null, ), - emptyText: localizations - .translate(i18.common.noMatchFound), ), - if (form.control(_idTypeKey).value != 'DEFAULT') - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - ReactiveFormConsumer( - builder: (context, formGroup, child) { - return DigitTextFormField( - readOnly: - form.control(_idTypeKey).value == - 'DEFAULT', + ), + if (form.control(_idTypeKey).value != 'DEFAULT') + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + ReactiveFormConsumer( + builder: (context, formGroup, child) { + return ReactiveWrapperField( + formControlName: _idNumberKey, + validationMessages: { + 'required': (object) => + localizations.translate( + '${i18.individualDetails.idNumberLabelText}_IS_REQUIRED', + ), + }, + builder: (field) => LabeledField( + label: localizations.translate( + i18.individualDetails.idNumberLabelText, + ), isRequired: form .control(_idNumberKey) .validators .isNotEmpty, - formControlName: _idNumberKey, - label: localizations.translate( - i18.individualDetails.idNumberLabelText, + child: DigitTextFormInput( + readOnly: + form.control(_idTypeKey).value == + 'DEFAULT', + initialValue: + form.control(_idNumberKey).value, + onChange: (value) { + form.control(_idNumberKey).value = + value; + }, + errorMessage: field.errorText, ), - validationMessages: { - 'required': (object) => - localizations.translate( - '${i18.individualDetails.idNumberLabelText}_IS_REQUIRED', - ), - }, - padding: const EdgeInsets.only( - top: kPadding * 2, - left: kPadding / 2, - right: kPadding / 2, - ), - ); - }, - ), - const SizedBox(height: 4), - ], + ), + ); + }, + ), + const SizedBox(height: 4), + ], + ), + if (form.control(_idTypeKey).value == 'DEFAULT') + const SizedBox( + height: spacer2, + ), + individualDetailsShowcaseData.dateOfBirth.buildWith( + child: DigitDobPicker( + datePickerFormControl: _dobKey, + datePickerLabel: localizations.translate( + i18.individualDetails.dobLabelText, ), - if (form.control(_idTypeKey).value == 'DEFAULT') - const SizedBox( - height: kPadding, + ageFieldLabel: localizations.translate( + i18.individualDetails.ageLabelText, ), - individualDetailsShowcaseData.dateOfBirth.buildWith( - child: DigitDobPicker( - datePickerFormControl: _dobKey, - datePickerLabel: localizations.translate( - i18.individualDetails.dobLabelText, - ), - ageFieldLabel: localizations.translate( - i18.individualDetails.ageLabelText, - ), - yearsHintLabel: localizations.translate( - i18.individualDetails.yearsHintText, - ), - monthsHintLabel: localizations.translate( - i18.individualDetails.monthsHintText, - ), - separatorLabel: localizations.translate( - i18.individualDetails.separatorLabelText, - ), - yearsAndMonthsErrMsg: localizations.translate( - i18.individualDetails.yearsAndMonthsErrorText, - ), - initialDate: before150Years, - onChangeOfFormControl: (formControl) { - // Handle changes to the control's value here - final value = formControl.value; - if (value == null) { - formControl.setErrors({'': true}); - } else { - DigitDOBAge age = - DigitDateUtils.calculateAge(value); - if ((age.years == 0 && age.months == 0) || - age.months > 11 || - (age.years >= 150 && age.months >= 0)) { - formControl.setErrors({'': true}); - } else { - formControl.removeError(''); - } - } - }, - cancelText: localizations - .translate(i18.common.coreCommonCancel), - confirmText: localizations - .translate(i18.common.coreCommonOk), + yearsHintLabel: localizations.translate( + i18.individualDetails.yearsHintText, ), - ), - SelectionBox( - isRequired: true, - title: localizations.translate( - i18.individualDetails.genderLabelText, + monthsHintLabel: localizations.translate( + i18.individualDetails.monthsHintText, ), - allowMultipleSelection: false, - width: 126, - initialSelection: - form.control(_genderKey).value != null - ? [form.control(_genderKey).value] - : [], - options: RegistrationDeliverySingleton() - .genderOptions! - .map( - (e) => e, - ) - .toList(), - onSelectionChanged: (value) { - setState(() { - if (value.isNotEmpty) { - form.control(_genderKey).value = value.first; - } else { - form.control(_genderKey).value = null; - setState(() { - form - .control(_genderKey) - .setErrors({'': true}); - }); - } - }); - }, - valueMapper: (value) { - return localizations.translate(value); - }, - errorMessage: form.control(_genderKey).hasErrors + separatorLabel: localizations.translate( + i18.individualDetails.separatorLabelText, + ), + yearsAndMonthsErrMsg: localizations.translate( + i18.individualDetails.yearsAndMonthsErrorText, + ), + errorMessage: form.control(_dobKey).hasErrors ? localizations .translate(i18.common.corecommonRequired) : null, + initialDate: before150Years, + initialValue: getInitialDateValue(form), + onChangeOfFormControl: (value) { + if (value == null) { + form.control(_dobKey).setErrors({'': true}); + } else { + DigitDOBAgeConvertor age = + DigitDateUtils.calculateAge(value); + if ((age.years == 0 && age.months == 0) || + age.months > 11 || + (age.years >= 150 && age.months >= 0)) { + form.control(_dobKey).setErrors({'': true}); + } else { + form.control(_dobKey).removeError(''); + } + } + // Handle changes to the control's value here + form.control(_dobKey).value = value; + }, + cancelText: localizations + .translate(i18.common.coreCommonCancel), + confirmText: localizations + .translate(i18.common.coreCommonOk), + ), + ), + SelectionCard( + isRequired: true, + showParentContainer: true, + title: localizations.translate( + i18.individualDetails.genderLabelText, ), - ]), + allowMultipleSelection: false, + width: 126, + initialSelection: + form.control(_genderKey).value != null + ? [form.control(_genderKey).value] + : [], + options: RegistrationDeliverySingleton() + .genderOptions! + .map( + (e) => e, + ) + .toList(), + onSelectionChanged: (value) { + setState(() { + if (value.isNotEmpty) { + form.control(_genderKey).value = value.first; + } else { + form.control(_genderKey).value = null; + setState(() { + form + .control(_genderKey) + .setErrors({'': true}); + }); + } + }); + }, + valueMapper: (value) { + return localizations.translate(value); + }, + errorMessage: form.control(_genderKey).hasErrors + ? localizations + .translate(i18.common.corecommonRequired) + : null, + ), individualDetailsShowcaseData.mobile.buildWith( - child: DigitTextFormField( - keyboardType: TextInputType.number, + child: ReactiveWrapperField( formControlName: _mobileNumberKey, - maxLength: 10, - label: localizations.translate( - i18.individualDetails.mobileNumberLabelText, - ), validationMessages: { 'maxLength': (object) => localizations.translate( i18.individualDetails @@ -542,12 +572,26 @@ class IndividualDetailsPageState extends LocalizedState { i18.individualDetails .mobileNumberLengthValidationMessage), }, - inputFormatters: [ - FilteringTextInputFormatter.digitsOnly, - ], + builder: (field) => LabeledField( + label: localizations.translate( + i18.individualDetails.mobileNumberLabelText, + ), + child: DigitTextFormInput( + keyboardType: TextInputType.number, + maxLength: 10, + inputFormatters: [ + FilteringTextInputFormatter.digitsOnly, + ], + initialValue: + form.control(_mobileNumberKey).value, + onChange: (value) { + form.control(_mobileNumberKey).value = value; + }, + ), + ), ), ), - const SizedBox(height: 16), + // const SizedBox(height: spacer4), if ((RegistrationDeliverySingleton().beneficiaryType == BeneficiaryType.household && widget.isHeadOfHousehold) || @@ -571,7 +615,7 @@ class IndividualDetailsPageState extends LocalizedState { localizations.translate( i18.deliverIntervention.voucherCode, ), - style: theme.textTheme.headlineSmall, + style: textTheme.headingS, ), ), Flexible( @@ -583,10 +627,11 @@ class IndividualDetailsPageState extends LocalizedState { ), Padding( padding: const EdgeInsets.only( - bottom: kPadding * 2, + bottom: spacer2 * 2, ), child: IconButton( - color: theme.colorScheme.secondary, + color: + theme.colorTheme.primary.primary1, icon: const Icon(Icons.edit), onPressed: () { Navigator.of(context).push( @@ -610,12 +655,10 @@ class IndividualDetailsPageState extends LocalizedState { // ignore: no-empty-block ) - : DigitOutlineIconButton( - buttonStyle: OutlinedButton.styleFrom( - shape: const RoundedRectangleBorder( - borderRadius: BorderRadius.zero, - ), - ), + : DigitButton( + type: DigitButtonType.secondary, + size: DigitButtonSize.large, + mainAxisSize: MainAxisSize.max, onPressed: () { Navigator.of(context).push( // [TODO: Add the route to auto_route] @@ -631,16 +674,14 @@ class IndividualDetailsPageState extends LocalizedState { ), ); }, - icon: Icons.qr_code, + prefixIcon: Icons.qr_code, label: localizations.translate( i18.individualDetails .linkVoucherToIndividual, ), ), ), - ], - ), - ), + ]), ), ], ); @@ -771,7 +812,8 @@ class IndividualDetailsPageState extends LocalizedState { _individualNameKey: FormControl( validators: [ Validators.required, - CustomValidator.requiredMin, + Validators.delegate( + (validator) => CustomValidator.requiredMin(validator)), Validators.maxLength(200), ], value: individual?.name?.givenName ?? searchQuery?.trim(), @@ -793,8 +835,9 @@ class IndividualDetailsPageState extends LocalizedState { _genderKey: FormControl(value: getGenderOptions(individual)), _mobileNumberKey: FormControl(value: individual?.mobileNumber, validators: [ - CustomValidator.validMobileNumber, - CustomValidator.minPhoneNumValidation, + Validators.pattern(Constants.mobileNumberRegExp, + validationMessage: + localizations.translate(i18.common.coreCommonMobileNumber)), Validators.maxLength(10) ]), }); @@ -807,4 +850,13 @@ class IndividualDetailsPageState extends LocalizedState { (element) => element.toLowerCase() == individual?.gender?.name, ); } + + getInitialDateValue(FormGroup form) { + var date = form.control(_dobKey).value != null + ? DateFormat(Constants().dateTimeExtFormat) + .format(form.control(_dobKey).value) + : null; + + return date; + } } diff --git a/packages/registration_delivery/lib/pages/reason_for_deletion.dart b/packages/registration_delivery/lib/pages/reason_for_deletion.dart index e001b3627..a9b2a330c 100644 --- a/packages/registration_delivery/lib/pages/reason_for_deletion.dart +++ b/packages/registration_delivery/lib/pages/reason_for_deletion.dart @@ -1,6 +1,7 @@ import 'package:auto_route/auto_route.dart'; -import 'package:digit_components/digit_components.dart'; -import 'package:digit_components/widgets/atoms/digit_toaster.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:reactive_forms/reactive_forms.dart'; @@ -15,6 +16,7 @@ import '../widgets/localized.dart'; @RoutePage() class ReasonForDeletionPage extends LocalizedStatefulWidget { final bool isHousholdDelete; + const ReasonForDeletionPage({ super.key, super.appLocalizations, @@ -31,6 +33,7 @@ class ReasonForDeletionPageState extends LocalizedState { @override Widget build(BuildContext context) { final theme = Theme.of(context); + final textTheme = theme.digitTextTheme(context); return Scaffold( body: ReactiveFormBuilder( @@ -38,146 +41,141 @@ class ReasonForDeletionPageState extends LocalizedState { builder: (context, form, child) { return ScrollableContent( footer: DigitCard( - margin: const EdgeInsets.only(left: 0, right: 0, top: 10), - child: BlocBuilder( - builder: (ctx, state) { - if (state.loading) { - return const Center( - child: CircularProgressIndicator(), - ); - } + margin: const EdgeInsets.only(top: spacer2), + padding: const EdgeInsets.all(spacer2), + children: [ + BlocBuilder( + builder: (ctx, state) { + if (state.loading) { + return const Center( + child: CircularProgressIndicator(), + ); + } - return DigitElevatedButton( - onPressed: () { - if (form.valid) { - !widget.isHousholdDelete - ? context.read().add( - HouseholdOverviewDeleteIndividualEvent( - projectId: RegistrationDeliverySingleton() - .projectId!, - householdModel: - state.householdMemberWrapper.household!, - individualModel: state.selectedIndividual!, - projectBeneficiaryType: - RegistrationDeliverySingleton() - .beneficiaryType!, - ), - ) - : context.read().add( - HouseholdOverviewDeleteHouseholdEvent( + return DigitButton( + label: localizations + .translate(i18.householdLocation.actionLabel), + type: DigitButtonType.primary, + size: DigitButtonSize.large, + mainAxisSize: MainAxisSize.max, + onPressed: () { + if (form.valid) { + !widget.isHousholdDelete + ? context.read().add( + HouseholdOverviewDeleteIndividualEvent( + projectId: + RegistrationDeliverySingleton() + .projectId!, + householdModel: state + .householdMemberWrapper.household!, + individualModel: + state.selectedIndividual!, + projectBeneficiaryType: + RegistrationDeliverySingleton() + .beneficiaryType!, + ), + ) + : context.read().add( + HouseholdOverviewDeleteHouseholdEvent( + projectId: + RegistrationDeliverySingleton() + .projectId!, + householdModel: state + .householdMemberWrapper.household!, + members: state + .householdMemberWrapper.members!, + projectBeneficiaryModel: state + .householdMemberWrapper + .projectBeneficiaries! + .first, + projectBeneficiaryType: + RegistrationDeliverySingleton() + .beneficiaryType!, + ), + ); + + // context.router.maybePop(); + final parent = + context.router.parent() as StackRouter; + + if (widget.isHousholdDelete) { + (context.router.parent() as StackRouter) + .maybePop(); + } + parent.popUntil((route) => + route.settings.name == + BeneficiaryWrapperRoute.name); + final reloadState = + context.read(); + Future.delayed( + const Duration(milliseconds: 500), + () { + reloadState.add( + HouseholdOverviewReloadEvent( projectId: RegistrationDeliverySingleton() .projectId!, - householdModel: - state.householdMemberWrapper.household!, - members: - state.householdMemberWrapper.members!, - projectBeneficiaryModel: state - .householdMemberWrapper - .projectBeneficiaries! - .first, projectBeneficiaryType: RegistrationDeliverySingleton() .beneficiaryType!, ), ); - - // context.router.maybePop(); - final parent = context.router.parent() as StackRouter; - - if (widget.isHousholdDelete) { - (context.router.parent() as StackRouter).maybePop(); - } - parent.popUntil((route) => - route.settings.name == - BeneficiaryWrapperRoute.name); - final reloadState = - context.read(); - Future.delayed( - const Duration(milliseconds: 500), - () { - reloadState.add( - HouseholdOverviewReloadEvent( - projectId: - RegistrationDeliverySingleton().projectId!, - projectBeneficiaryType: - RegistrationDeliverySingleton() - .beneficiaryType!, + }, + ).then( + (value) => context.router.push( + HouseholdAcknowledgementRoute( + enableViewHousehold: true, + ), ), ); - }, - ).then( - (value) => context.router.push( - HouseholdAcknowledgementRoute( - enableViewHousehold: true, - ), - ), - ); - // context.router.push(HouseholdAcknowledgementRoute( - // enableViewHousehold: true)); - } else { - DigitToast.show(context, - options: DigitToastOptions( - localizations + } else { + Toast.showToast(context, + message: localizations .translate(i18.common.corecommonRequired), - true, - theme)); - } + type: ToastType.error); + } + }, + ); }, - child: Center( - child: Text( - localizations - .translate(i18.householdLocation.actionLabel), - ), - ), - ); - }, - ), - ), + ), + ]), header: const Column(children: [ BackNavigationHelpHeaderWidget(), ]), children: [ - DigitCard( - child: Column( - children: [ - Align( - alignment: Alignment.topLeft, - child: Text( - localizations.translate( - i18.reasonForDeletion.reasonForDeletionLabel, - ), - style: theme.textTheme.displayMedium, - ), - ), - Padding( - padding: const EdgeInsets.only(bottom: 10.0), - child: Column( - children: widget.isHousholdDelete - ? RegistrationDeliverySingleton() - .householdDeletionReasonOptions! - .map((e) => ReactiveRadioListTile( - title: Text( - localizations.translate(e), - ), - value: e, - formControlName: _reasonForDeletionKey, - )) - .toList() - : RegistrationDeliverySingleton() - .householdMemberDeletionReasonOptions! - .map((e) => ReactiveRadioListTile( - title: Text( - localizations.translate(e), - ), - value: e, - formControlName: _reasonForDeletionKey, - )) - .toList(), - ), + DigitCard(children: [ + Align( + alignment: Alignment.topLeft, + child: Text( + localizations.translate( + i18.reasonForDeletion.reasonForDeletionLabel, ), - ], + style: textTheme.headingXl, + ), + ), + Column( + children: widget.isHousholdDelete + ? RegistrationDeliverySingleton() + .householdDeletionReasonOptions! + .map((e) => ReactiveRadioListTile( + title: Text( + localizations.translate(e), + ), + value: e, + formControlName: _reasonForDeletionKey, + )) + .toList() + : RegistrationDeliverySingleton() + .householdMemberDeletionReasonOptions! + .map((e) => ReactiveRadioListTile( + title: Text( + localizations.translate(e), + ), + value: e, + formControlName: _reasonForDeletionKey, + )) + .toList(), ), - ), + ]), ], ); }, diff --git a/packages/registration_delivery/lib/pages/registration_delivery_wrapper.dart b/packages/registration_delivery/lib/pages/registration_delivery_wrapper.dart index 45a6b8e05..5fa8af34d 100644 --- a/packages/registration_delivery/lib/pages/registration_delivery_wrapper.dart +++ b/packages/registration_delivery/lib/pages/registration_delivery_wrapper.dart @@ -1,7 +1,9 @@ import 'package:auto_route/auto_route.dart'; import 'package:digit_data_model/models/entities/individual.dart'; +import 'package:digit_ui_components/services/location_bloc.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:location/location.dart'; import 'package:registration_delivery/blocs/search_households/household_global_seach.dart'; import 'package:registration_delivery/blocs/search_households/individual_global_search.dart'; import 'package:registration_delivery/data/repositories/local/individual_global_search.dart'; @@ -160,6 +162,9 @@ class RegistrationDeliveryWrapperPage extends StatelessWidget { BlocProvider( create: (_) => HouseholdDetailsBloc(const HouseholdDetailsState()), ), + BlocProvider( + create: (_) => LocationBloc(location: Location()), + ), ], child: const AutoRouter(), ), diff --git a/packages/registration_delivery/lib/pages/search_beneficiary.dart b/packages/registration_delivery/lib/pages/search_beneficiary.dart index cae2556a2..46f5e156d 100644 --- a/packages/registration_delivery/lib/pages/search_beneficiary.dart +++ b/packages/registration_delivery/lib/pages/search_beneficiary.dart @@ -1,8 +1,15 @@ import 'package:auto_route/auto_route.dart'; -import 'package:digit_components/digit_components.dart'; import 'package:digit_data_model/data_model.dart'; import 'package:digit_scanner/blocs/scanner.dart'; import 'package:digit_scanner/pages/qr_scanner.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/services/location_bloc.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/atoms/digit_chip.dart'; +import 'package:digit_ui_components/widgets/atoms/digit_search_bar.dart'; +import 'package:digit_ui_components/widgets/atoms/pop_up_card.dart'; +import 'package:digit_ui_components/widgets/atoms/switch.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_keyboard_visibility/flutter_keyboard_visibility.dart'; @@ -72,6 +79,7 @@ class _SearchBeneficiaryPageState @override Widget build(BuildContext context) { final theme = Theme.of(context); + final textTheme = theme.digitTextTheme(context); return KeyboardVisibilityBuilder( builder: (context, isKeyboardVisible) => Scaffold( @@ -92,11 +100,11 @@ class _SearchBeneficiaryPageState slivers: [ SliverToBoxAdapter( child: Padding( - padding: const EdgeInsets.all(kPadding), + padding: const EdgeInsets.all(spacer2), child: Column( children: [ Padding( - padding: const EdgeInsets.all(kPadding), + padding: const EdgeInsets.all(spacer2), child: Align( alignment: Alignment.topLeft, child: Text( @@ -107,7 +115,7 @@ class _SearchBeneficiaryPageState : i18.searchBeneficiary .searchIndividualLabelText, ), - style: theme.textTheme.displayMedium, + style: textTheme.headingXl, textAlign: TextAlign.left, ), ), @@ -115,59 +123,60 @@ class _SearchBeneficiaryPageState BlocBuilder( builder: (context, locationState) { return Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, children: [ locationState.latitude != null - ? Row( - children: [ - Switch( - value: isProximityEnabled, - onChanged: (value) { - searchController.clear(); - setState(() { - isProximityEnabled = value; - lat = locationState.latitude!; - long = locationState.longitude!; - }); - - if (locationState.hasPermissions && - value && - locationState.latitude != - null && - locationState.longitude != - null && - RegistrationDeliverySingleton() - .maxRadius != - null && - isProximityEnabled) { - triggerGlobalSearchEvent(); - } else { - blocWrapper.clearEvent(); - triggerGlobalSearchEvent(); - } - }, - ), - Text( - localizations.translate( - i18.searchBeneficiary - .proximityLabel, - ), + ? Padding( + padding: const EdgeInsets.all(spacer2), + child: DigitSwitch( + mainAxisAlignment: + MainAxisAlignment.start, + label: localizations.translate( + i18.searchBeneficiary.proximityLabel, ), - ], + value: isProximityEnabled, + onChanged: (value) { + searchController.clear(); + setState(() { + isProximityEnabled = value; + lat = locationState.latitude!; + long = locationState.longitude!; + }); + + if (locationState.hasPermissions && + value && + locationState.latitude != null && + locationState.longitude != null && + RegistrationDeliverySingleton() + .maxRadius != + null && + isProximityEnabled) { + triggerGlobalSearchEvent(); + } else { + blocWrapper.clearEvent(); + triggerGlobalSearchEvent(); + } + }, + ), ) : const Offstage(), - DigitSearchBar( - controller: searchController, - hintText: localizations.translate( - i18.searchBeneficiary - .beneficiarySearchHintText, + Padding( + padding: const EdgeInsets.all(spacer2), + child: DigitSearchBar( + controller: searchController, + hintText: localizations.translate( + i18.searchBeneficiary + .beneficiarySearchHintText, + ), + textCapitalization: TextCapitalization.words, + onChanged: (value) { + if (value.isEmpty || + value.trim().length > 2) { + triggerGlobalSearchEvent(); + } + }, ), - textCapitalization: TextCapitalization.words, - onChanged: (value) { - if (value.isEmpty || - value.trim().length > 2) { - triggerGlobalSearchEvent(); - } - }, ), RegistrationDeliverySingleton() .searchHouseHoldFilter != @@ -178,13 +187,13 @@ class _SearchBeneficiaryPageState ? Align( alignment: Alignment.topLeft, child: Padding( - padding: const EdgeInsets.only( - left: kPadding), - child: DigitIconButton( - textDirection: TextDirection.rtl, - iconText: - getFilterIconNLabel()['label'], - icon: getFilterIconNLabel()['icon'], + padding: const EdgeInsets.all(spacer2), + child: DigitButton( + label: getFilterIconNLabel()['label'], + size: DigitButtonSize.medium, + type: DigitButtonType.tertiary, + suffixIcon: + getFilterIconNLabel()['icon'], onPressed: () => showFilterDialog(), ), ), @@ -203,72 +212,24 @@ class _SearchBeneficiaryPageState itemCount: selectedFilters.length, itemBuilder: (context, index) { return Padding( - padding: const EdgeInsets.all( - kPadding / 2), - child: Container( - padding: - const EdgeInsets.all( - kPadding / 2), - decoration: BoxDecoration( - border: Border.all( - color: - const DigitColors() - .cloudGray), - borderRadius: - BorderRadius.circular( - kPadding / 2), - ), - child: Row( - children: [ - Text( - localizations.translate( - getStatus( - selectedFilters[ - index])), - style: TextStyle( - color: const DigitColors() - .davyGray)), - Text( - ' (${searchHouseholdsState.totalResults})', - style: TextStyle( - color: const DigitColors() - .davyGray)), - const SizedBox( - width: kPadding), - GestureDetector( - onTap: () { - setState(() { - selectedFilters.remove( - selectedFilters[ - index]); - }); - blocWrapper - .clearEvent(); - triggerGlobalSearchEvent(); - }, - child: Container( - decoration: - BoxDecoration( - color: - const DigitColors() - .davyGray, - borderRadius: - BorderRadius - .circular( - kPadding / - 2), - ), - child: Icon( - Icons.close, - color: - const DigitColors() - .white, - ), - ), - ) - ], - ), - )); + padding: const EdgeInsets.all( + spacer1), + child: DigitChip( + label: + '${localizations.translate(getStatus(selectedFilters[index]))}' + ' (${searchHouseholdsState.totalResults})', + capitalizedFirstLetter: false, + onItemDelete: () { + setState(() { + selectedFilters.remove( + selectedFilters[ + index]); + }); + blocWrapper.clearEvent(); + triggerGlobalSearchEvent(); + }, + ), + ); }), ), ) @@ -277,15 +238,19 @@ class _SearchBeneficiaryPageState ); }, ), - const SizedBox(height: kPadding * 2), if (searchHouseholdsState.resultsNotFound && !searchHouseholdsState.loading) - DigitInfoCard( - description: localizations.translate( - i18.searchBeneficiary.beneficiaryInfoDescription, - ), - title: localizations.translate( - i18.searchBeneficiary.beneficiaryInfoTitle, + Padding( + padding: const EdgeInsets.only( + left: spacer2, top: spacer2, right: spacer2), + child: InfoCard( + type: InfoType.info, + description: localizations.translate( + i18.searchBeneficiary.beneficiaryInfoDescription, + ), + title: localizations.translate( + i18.searchBeneficiary.beneficiaryInfoTitle, + ), ), ), ], @@ -331,7 +296,7 @@ class _SearchBeneficiaryPageState ); return Container( - margin: const EdgeInsets.only(bottom: kPadding), + margin: const EdgeInsets.only(bottom: spacer2), child: ViewBeneficiaryCard( distance: isProximityEnabled ? distance : null, householdMember: i, @@ -398,70 +363,61 @@ class _SearchBeneficiaryPageState ], ), ), - bottomNavigationBar: SizedBox( - height: 150, - child: Card( - margin: const EdgeInsets.all(0), - child: Container( - padding: const EdgeInsets.fromLTRB(kPadding, 0, kPadding, 0), - child: Column( - children: [ - DigitElevatedButton( - onPressed: searchHouseholdsState.searchQuery != null && - searchHouseholdsState.searchQuery!.isNotEmpty - ? () { - FocusManager.instance.primaryFocus?.unfocus(); - context.read().add( - const DigitScannerEvent.handleScanner(), - ); - context.router - .push(BeneficiaryRegistrationWrapperRoute( - initialState: BeneficiaryRegistrationCreateState( - searchQuery: searchHouseholdsState.searchQuery, - ), - )); - searchController.clear(); - selectedFilters = []; - blocWrapper.clearEvent(); - } - : null, - child: Center( - child: Text(localizations.translate( - i18.searchBeneficiary.beneficiaryAddActionLabel, - )), + bottomNavigationBar: DigitCard( + margin: const EdgeInsets.only(top: spacer2), + padding: const EdgeInsets.all(spacer4), + children: [ + DigitButton( + label: localizations.translate( + i18.searchBeneficiary.beneficiaryAddActionLabel, + ), + mainAxisSize: MainAxisSize.max, + type: DigitButtonType.primary, + size: DigitButtonSize.large, + isDisabled: searchHouseholdsState.searchQuery != null && + searchHouseholdsState.searchQuery!.isNotEmpty + ? false + : true, + onPressed: () { + FocusManager.instance.primaryFocus?.unfocus(); + context.read().add( + const DigitScannerEvent.handleScanner(), + ); + context.router.push(BeneficiaryRegistrationWrapperRoute( + initialState: BeneficiaryRegistrationCreateState( + searchQuery: searchHouseholdsState.searchQuery, ), - ), - DigitOutlineIconButton( - buttonStyle: OutlinedButton.styleFrom( - shape: const RoundedRectangleBorder( - borderRadius: BorderRadius.zero, + )); + searchController.clear(); + selectedFilters = []; + blocWrapper.clearEvent(); + }, + ), + DigitButton( + type: DigitButtonType.secondary, + size: DigitButtonSize.large, + mainAxisSize: MainAxisSize.max, + onPressed: () { + blocWrapper.clearEvent(); + selectedFilters = []; + searchController.clear(); + Navigator.of(context).push( + MaterialPageRoute( + builder: (context) => const DigitScannerPage( + quantity: 1, + isGS1code: false, + singleValue: true, ), + settings: const RouteSettings(name: '/qr-scanner'), ), - onPressed: () { - blocWrapper.clearEvent(); - selectedFilters = []; - searchController.clear(); - Navigator.of(context).push( - MaterialPageRoute( - builder: (context) => const DigitScannerPage( - quantity: 1, - isGS1code: false, - singleValue: true, - ), - settings: const RouteSettings(name: '/qr-scanner'), - ), - ); - }, - icon: Icons.qr_code, - label: localizations.translate( - i18.deliverIntervention.scannerLabel, - ), - ), - ], + ); + }, + prefixIcon: Icons.qr_code, + label: localizations.translate( + i18.deliverIntervention.scannerLabel, + ), ), - ), - ), - ), + ]), ), ); } @@ -476,20 +432,25 @@ class _SearchBeneficiaryPageState } showFilterDialog() async { - var filters = await DigitDialog.show(context, - options: DigitDialogOptions( - titlePadding: EdgeInsets.zero, - dialogPadding: EdgeInsets.zero, - contentPadding: EdgeInsets.zero, - barrierDismissible: true, - content: StatusFilter( - selectedFilters: selectedFilters, - titleIcon: Icon(getFilterIconNLabel()['icon'], - color: const DigitColors().burningOrange), - titleText: getFilterIconNLabel()['label'], - isCloseIcon: true, - ), - )); + var filters = await showDialog( + context: context, + builder: (ctx) => Popup( + title: getFilterIconNLabel()['label'], + titleIcon: Icon( + getFilterIconNLabel()['icon'], + color: DigitTheme.instance.colorScheme.primary, + ), + onCrossTap: () { + Navigator.of( + context, + rootNavigator: true, + ).pop(); + }, + additionalWidgets: [ + StatusFilter( + selectedFilters: selectedFilters, + ), + ])); if (filters != null && filters.isNotEmpty) { setState(() { @@ -586,7 +547,9 @@ class _SearchBeneficiaryPageState .first .key; if (mappedStatus != null) { - return mappedStatus; + return mappedStatus == Status.administeredSuccess.toValue() + ? '${RegistrationDeliverySingleton().selectedProject!.projectType}_$mappedStatus' + : mappedStatus; } else { return selectedFilter; } diff --git a/packages/registration_delivery/lib/pages/summary_page.dart b/packages/registration_delivery/lib/pages/summary_page.dart index 873e85f30..454a00ddf 100644 --- a/packages/registration_delivery/lib/pages/summary_page.dart +++ b/packages/registration_delivery/lib/pages/summary_page.dart @@ -1,10 +1,12 @@ import 'package:auto_route/auto_route.dart'; -import 'package:digit_components/digit_components.dart'; -import 'package:digit_components/utils/date_utils.dart'; -import 'package:digit_components/widgets/atoms/details_card.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/utils/date_utils.dart'; +import 'package:digit_ui_components/widgets/atoms/label_value_list.dart'; +import 'package:digit_ui_components/widgets/atoms/pop_up_card.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; +import 'package:digit_ui_components/widgets/molecules/label_value_summary.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:recase/recase.dart'; import 'package:registration_delivery/models/entities/additional_fields_type.dart'; import 'package:registration_delivery/router/registration_delivery_router.gm.dart'; import 'package:registration_delivery/widgets/back_navigation_help_header.dart'; @@ -76,7 +78,7 @@ class SummaryPageState extends LocalizedState { }, builder: (context, householdState) { return ScrollableContent( - enableFixedButton: true, + enableFixedDigitButton: true, header: Column(children: [ const BackNavigationHelpHeaderWidget( showHelp: false, @@ -84,7 +86,7 @@ class SummaryPageState extends LocalizedState { ), Padding( padding: - const EdgeInsets.only(bottom: kPadding, left: kPadding), + const EdgeInsets.only(bottom: spacer2, left: spacer2), child: Align( alignment: Alignment.centerLeft, child: Text( @@ -98,297 +100,328 @@ class SummaryPageState extends LocalizedState { ), ]), footer: DigitCard( - margin: const EdgeInsets.fromLTRB(0, kPadding, 0, 0), - padding: const EdgeInsets.fromLTRB(kPadding, 0, kPadding, 0), - child: ValueListenableBuilder( - valueListenable: clickedStatus, - builder: (context, bool isClicked, _) { - return DigitElevatedButton( - onPressed: isClicked - ? null - : () async { - final bloc = - context.read(); - final userId = RegistrationDeliverySingleton() - .loggedInUserUuid; - final projectId = - RegistrationDeliverySingleton().projectId; - - householdState.maybeWhen( - orElse: () { - return; - }, - summary: ( - navigateToRoot, - householdModel, - individualModel, - projectBeneficiaryModel, - registrationDate, - addressModel, - loading, - isHeadOfHousehold, - ) async { - final submit = await DigitDialog.show( - context, - options: DigitDialogOptions( - titleText: localizations.translate( - i18.deliverIntervention.dialogTitle, - ), - contentText: localizations.translate( - i18.deliverIntervention.dialogContent, - ), - primaryAction: DigitDialogActions( - label: localizations.translate( - i18.common.coreCommonSubmit, - ), - action: (context) { - clickedStatus.value = true; - Navigator.of( - context, - rootNavigator: true, - ).pop(true); - }, - ), - secondaryAction: DigitDialogActions( - label: localizations.translate( - i18.common.coreCommonCancel, - ), - action: (context) => Navigator.of( - context, - rootNavigator: true, - ).pop(false), - ), - ), - ); - - if (submit ?? false) { - if (context.mounted) { - bloc.add( - BeneficiaryRegistrationCreateEvent( - projectId: projectId!, - userUuid: userId!, - boundary: - RegistrationDeliverySingleton() - .boundary!, - tag: projectBeneficiaryModel?.tag, - navigateToSummary: false), - ); - } - } - }, - ); - }, - child: Center( - child: Text( - householdState.mapOrNull( + margin: const EdgeInsets.only(top: spacer2), + children: [ + ValueListenableBuilder( + valueListenable: clickedStatus, + builder: (context, bool isClicked, _) { + return DigitButton( + label: householdState.mapOrNull( editIndividual: (value) => localizations .translate(i18.common.coreCommonSave), ) ?? localizations .translate(i18.common.coreCommonSubmit), - ), - ), - ); - }, - ), - ), + type: DigitButtonType.primary, + size: DigitButtonSize.large, + mainAxisSize: MainAxisSize.max, + isDisabled: isClicked ? true : false, + onPressed: () async { + final bloc = + context.read(); + final userId = RegistrationDeliverySingleton() + .loggedInUserUuid; + final projectId = + RegistrationDeliverySingleton().projectId; + + householdState.maybeWhen( + orElse: () { + return; + }, + summary: ( + navigateToRoot, + householdModel, + individualModel, + projectBeneficiaryModel, + registrationDate, + addressModel, + loading, + isHeadOfHousehold, + ) async { + final submit = await showDialog( + context: context, + builder: (ctx) => Popup( + title: localizations.translate( + i18.deliverIntervention.dialogTitle, + ), + description: localizations.translate( + i18.deliverIntervention.dialogContent, + ), + actions: [ + DigitButton( + label: localizations.translate( + i18.common.coreCommonSubmit, + ), + onPressed: () { + clickedStatus.value = true; + Navigator.of( + context, + rootNavigator: true, + ).pop(true); + }, + type: DigitButtonType.primary, + size: DigitButtonSize.large), + DigitButton( + label: localizations.translate( + i18.common.coreCommonCancel, + ), + onPressed: () => Navigator.of( + context, + rootNavigator: true, + ).pop(false), + type: DigitButtonType.secondary, + size: DigitButtonSize.large) + ], + ), + ); + + if (submit ?? false) { + if (context.mounted) { + bloc.add( + BeneficiaryRegistrationCreateEvent( + projectId: projectId!, + userUuid: userId!, + boundary: + RegistrationDeliverySingleton() + .boundary!, + tag: projectBeneficiaryModel?.tag, + navigateToSummary: false), + ); + } + } + }, + ); + }, + ); + }, + ), + ]), slivers: [ SliverToBoxAdapter( child: Column( children: [ DigitCard( - child: LabelValueList( - heading: localizations.translate(i18 - .householdLocation.householdLocationLabelText), - withDivider: true, - items: [ - LabelValuePair( - label: localizations.translate( - i18.householdLocation.villageLabel), - value: householdState.householdModel?.address - ?.locality?.code ?? - localizations - .translate(i18.common.coreCommonNA), - isInline: true), - LabelValuePair( - label: localizations.translate( - i18.householdLocation.landmarkFormLabel), - value: householdState - .householdModel?.address?.landmark ?? - localizations - .translate(i18.common.coreCommonNA), - isInline: true), - ]), - ), + margin: const EdgeInsets.all(spacer2), + children: [ + LabelValueSummary( + padding: EdgeInsets.zero, + heading: localizations.translate(i18 + .householdLocation + .householdLocationLabelText), + items: [ + LabelValueItem( + label: localizations.translate( + i18.householdLocation.villageLabel), + value: localizations.translate( + householdState.householdModel?.address + ?.locality?.code ?? + i18.common.coreCommonNA), + isInline: true, + labelFlex: 5, + ), + LabelValueItem( + label: localizations.translate(i18 + .householdLocation.landmarkFormLabel), + value: householdState.householdModel + ?.address?.landmark ?? + localizations + .translate(i18.common.coreCommonNA), + isInline: true, + labelFlex: 5, + ), + ]), + ]), DigitCard( - child: LabelValueList( - heading: localizations.translate( - i18.householdDetails.householdDetailsLabel), - withDivider: true, - items: [ - LabelValuePair( - label: localizations.translate( - i18.beneficiaryDetails.totalMembers), - value: householdState - .householdModel?.memberCount - .toString() ?? - '0', - isInline: true), - LabelValuePair( - label: localizations.translate(i18 - .householdDetails - .noOfPregnantWomenCountLabel), - value: householdState.householdModel - ?.additionalFields?.fields - .where((h) => - h.key == - AdditionalFieldsType.pregnantWomen - .toValue()) - .firstOrNull - ?.value - .toString() ?? - '0', - isInline: true), - LabelValuePair( - label: localizations.translate(i18 - .householdDetails - .noOfChildrenBelow5YearsLabel), - value: householdState.householdModel - ?.additionalFields?.fields - .where((h) => - h.key == - AdditionalFieldsType.children - .toValue()) - .firstOrNull - ?.value - .toString() ?? - '0', - isInline: true), - ]), - ), + margin: const EdgeInsets.all(spacer2), + children: [ + LabelValueSummary( + padding: EdgeInsets.zero, + heading: localizations.translate( + i18.householdDetails.householdDetailsLabel), + items: [ + LabelValueItem( + label: localizations.translate( + i18.beneficiaryDetails.totalMembers), + value: householdState + .householdModel?.memberCount + .toString() ?? + '0', + isInline: true, + labelFlex: 5, + ), + LabelValueItem( + label: localizations.translate(i18 + .householdDetails + .noOfPregnantWomenCountLabel), + value: householdState.householdModel + ?.additionalFields?.fields + .where((h) => + h.key == + AdditionalFieldsType + .pregnantWomen + .toValue()) + .firstOrNull + ?.value + .toString() ?? + '0', + isInline: true, + labelFlex: 5, + ), + LabelValueItem( + label: localizations.translate(i18 + .householdDetails + .noOfChildrenBelow5YearsLabel), + value: householdState.householdModel + ?.additionalFields?.fields + .where((h) => + h.key == + AdditionalFieldsType.children + .toValue()) + .firstOrNull + ?.value + .toString() ?? + '0', + isInline: true, + labelFlex: 5, + ), + ]), + ]), DigitCard( - child: LabelValueList( - heading: localizations.translate( - i18.householdDetails.houseDetailsLabel), - withDivider: true, - items: [ - LabelValuePair( - label: localizations.translate( - i18.householdDetails.noOfRoomsLabel), - value: householdState.householdModel - ?.additionalFields?.fields - .where((h) => - h.key == - AdditionalFieldsType.noOfRooms - .toValue()) - .firstOrNull - ?.value - .toString() ?? - '0', - isInline: true), - LabelValuePair( - label: localizations.translate( - i18.householdDetails.typeOfStructure), - value: (householdState.householdModel - ?.additionalFields?.fields - .where((h) => - h.key == - AdditionalFieldsType - .houseStructureTypes - .toValue()) - .firstOrNull - ?.value ?? - []) - .toString() - .split('|') - .map((item) => getLocalizedMessage(item)) - .toList() - .join(', '), - isInline: true), - ]), - ), + margin: const EdgeInsets.all(spacer2), + children: [ + LabelValueSummary( + padding: EdgeInsets.zero, + heading: localizations.translate( + i18.householdDetails.houseDetailsLabel), + items: [ + LabelValueItem( + label: localizations.translate( + i18.householdDetails.noOfRoomsLabel), + value: householdState.householdModel + ?.additionalFields?.fields + .where((h) => + h.key == + AdditionalFieldsType.noOfRooms + .toValue()) + .firstOrNull + ?.value + .toString() ?? + '0', + isInline: true, + labelFlex: 5, + ), + LabelValueItem( + label: localizations.translate( + i18.householdDetails.typeOfStructure), + value: (householdState.householdModel + ?.additionalFields?.fields + .where((h) => + h.key == + AdditionalFieldsType + .houseStructureTypes + .toValue()) + .firstOrNull + ?.value ?? + []) + .toString() + .split('|') + .map( + (item) => getLocalizedMessage(item)) + .toList() + .join(', '), + isInline: true, + labelFlex: 5, + ), + ]), + ]), DigitCard( - child: LabelValueList( - heading: localizations.translate(i18 - .individualDetails.individualsDetailsLabelText), - withDivider: true, - items: [ - LabelValuePair( - label: localizations.translate( - i18.individualDetails.nameLabelText), - value: householdState.maybeWhen( - orElse: () => localizations - .translate(i18.common.coreCommonNA), - summary: ( - navigateToRoot, - householdModel, - individualModel, - projectBeneficiaryModel, - registrationDate, - addressModel, - loading, - isHeadOfHousehold, - ) => - individualModel?.name?.givenName ?? - localizations.translate( - i18.common.coreCommonNA)), - ), - LabelValuePair( - label: localizations.translate( - i18.individualDetails.dobLabelText), - value: householdState.maybeWhen( - orElse: () => localizations - .translate(i18.common.coreCommonNA), - summary: ( - navigateToRoot, - householdModel, - individualModel, - projectBeneficiaryModel, - registrationDate, - addressModel, - loading, - isHeadOfHousehold, - ) => - individualModel?.dateOfBirth != null - ? DigitDateUtils.getFilteredDate( - DigitDateUtils - .getFormattedDateToDateTime( + margin: const EdgeInsets.all(spacer2), + children: [ + LabelValueSummary( + padding: EdgeInsets.zero, + heading: localizations.translate(i18 + .individualDetails + .individualsDetailsLabelText), + items: [ + LabelValueItem( + label: localizations.translate( + i18.individualDetails.nameLabelText), + value: householdState.maybeWhen( + orElse: () => localizations + .translate(i18.common.coreCommonNA), + summary: ( + navigateToRoot, + householdModel, + individualModel, + projectBeneficiaryModel, + registrationDate, + addressModel, + loading, + isHeadOfHousehold, + ) => + individualModel?.name?.givenName ?? + localizations.translate( + i18.common.coreCommonNA)), + labelFlex: 5, + ), + LabelValueItem( + label: localizations.translate( + i18.individualDetails.dobLabelText), + value: householdState.maybeWhen( + orElse: () => localizations + .translate(i18.common.coreCommonNA), + summary: ( + navigateToRoot, + householdModel, + individualModel, + projectBeneficiaryModel, + registrationDate, + addressModel, + loading, + isHeadOfHousehold, + ) => + individualModel?.dateOfBirth != null + ? DigitDateUtils.getFilteredDate( + DigitDateUtils.getFormattedDateToDateTime( individualModel ?.dateOfBirth ?? '') - .toString(), - dateFormat: Constants() - .dateMonthYearFormat) - .toString() - : localizations.translate( - i18.common.coreCommonNA)), - ), - LabelValuePair( - label: localizations.translate( - i18.individualDetails.genderLabelText), - value: householdState.maybeWhen( - orElse: () => localizations - .translate(i18.common.coreCommonNA), - summary: ( - navigateToRoot, - householdModel, - individualModel, - projectBeneficiaryModel, - registrationDate, - addressModel, - loading, - isHeadOfHousehold, - ) => - individualModel?.gender != null - ? localizations.translate( - individualModel?.gender?.name - .toUpperCase() ?? - '') - : localizations.translate( - i18.common.coreCommonNA)), - ), - ]), - ), + .toString(), + dateFormat: Constants() + .dateMonthYearFormat) + .toString() + : localizations.translate( + i18.common.coreCommonNA)), + labelFlex: 5, + ), + LabelValueItem( + label: localizations.translate( + i18.individualDetails.genderLabelText), + value: householdState.maybeWhen( + orElse: () => localizations + .translate(i18.common.coreCommonNA), + summary: ( + navigateToRoot, + householdModel, + individualModel, + projectBeneficiaryModel, + registrationDate, + addressModel, + loading, + isHeadOfHousehold, + ) => + individualModel?.gender != null + ? localizations.translate( + individualModel + ?.gender?.name + .toUpperCase() ?? + '') + : localizations.translate( + i18.common.coreCommonNA)), + labelFlex: 5, + ), + ]), + ]), ], ), ) diff --git a/packages/registration_delivery/lib/router/registration_delivery_router.dart b/packages/registration_delivery/lib/router/registration_delivery_router.dart index 14d14e52f..676799919 100644 --- a/packages/registration_delivery/lib/router/registration_delivery_router.dart +++ b/packages/registration_delivery/lib/router/registration_delivery_router.dart @@ -4,10 +4,8 @@ import 'registration_delivery_router.gm.dart'; @AutoRouterConfig.module() class RegistrationDeliveryRoute extends $RegistrationDeliveryRoute { - @override RouteType get defaultRouteType => const RouteType.material(); - @override List get routes => [ AutoRoute( page: RegistrationDeliveryWrapperRoute.page, diff --git a/packages/registration_delivery/lib/utils/constants.dart b/packages/registration_delivery/lib/utils/constants.dart index a3f9de2ad..fb559b041 100644 --- a/packages/registration_delivery/lib/utils/constants.dart +++ b/packages/registration_delivery/lib/utils/constants.dart @@ -4,6 +4,8 @@ class Constants { KeyValue('CORE_COMMON_NO', false), ]; + static RegExp mobileNumberRegExp = + RegExp(r'^(?=.{10}$)[+]*[(]{0,1}[0-9]{1,4}[)]{0,1}[-\s\./0-9]*$'); final String dateFormat = 'dd/MM/yyyy'; final String communityHealthWorker = 'Community Health Worker'; final String deliveryTeam = 'Delivery Team'; diff --git a/packages/registration_delivery/lib/utils/extensions/context_utility.dart b/packages/registration_delivery/lib/utils/extensions/context_utility.dart index fa5d9dfa5..f4307ef5c 100644 --- a/packages/registration_delivery/lib/utils/extensions/context_utility.dart +++ b/packages/registration_delivery/lib/utils/extensions/context_utility.dart @@ -5,12 +5,6 @@ extension ContextUtilityExtensions on BuildContext { return (dateTime ?? DateTime.now()).millisecondsSinceEpoch; } - Future get packageInfo async { - final info = await PackageInfo.fromPlatform(); - - return info.version; - } - ProjectCycle? get selectedCycle { final selectedCycle = RegistrationDeliverySingleton() .projectType diff --git a/packages/registration_delivery/lib/utils/extensions/extensions.dart b/packages/registration_delivery/lib/utils/extensions/extensions.dart index dbd3b40e0..37882c7c9 100644 --- a/packages/registration_delivery/lib/utils/extensions/extensions.dart +++ b/packages/registration_delivery/lib/utils/extensions/extensions.dart @@ -3,7 +3,6 @@ import 'package:digit_data_model/data_model.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:intl/intl.dart'; -import 'package:package_info_plus/package_info_plus.dart'; import 'package:registration_delivery/utils/constants.dart'; import '../utils.dart'; diff --git a/packages/registration_delivery/lib/utils/i18_key_constants.dart b/packages/registration_delivery/lib/utils/i18_key_constants.dart index 6dbb112c2..880ce5f22 100644 --- a/packages/registration_delivery/lib/utils/i18_key_constants.dart +++ b/packages/registration_delivery/lib/utils/i18_key_constants.dart @@ -643,6 +643,9 @@ class ReferBeneficiary { String get selectCycle => 'REFERRAL_SELECT_CYCLE'; String get createReferralLabel => 'CREATE_REFERRAL_LABEL'; String get noChecklistFound => 'NO_CHECKLISTS_FOUND'; + String get noFacilityAssigned => 'NO_FACILITY_ASSIGNED'; + String get noFacilityAssignedDescription => + 'NO_FACILITY_ASSIGNED_DESCRIPTION'; } class ReasonForDeletion { diff --git a/packages/registration_delivery/lib/utils/utils.dart b/packages/registration_delivery/lib/utils/utils.dart index c9fc6d2a9..e31105bca 100644 --- a/packages/registration_delivery/lib/utils/utils.dart +++ b/packages/registration_delivery/lib/utils/utils.dart @@ -2,8 +2,8 @@ import 'dart:math'; import 'package:collection/collection.dart'; -import 'package:digit_components/utils/date_utils.dart'; import 'package:digit_data_model/data_model.dart'; +import 'package:digit_ui_components/utils/date_utils.dart'; import 'package:formula_parser/formula_parser.dart'; import 'package:reactive_forms/reactive_forms.dart'; import 'package:registration_delivery/models/entities/household.dart'; @@ -26,32 +26,6 @@ class CustomValidator { ? null : {'required': true}; } - - static Map? validMobileNumber( - AbstractControl control, - ) { - if (control.value == null || control.value.toString().isEmpty) { - return null; - } - - const pattern = r'^[+]*[(]{0,1}[0-9]{1,4}[)]{0,1}[-\s\./0-9]*$'; - - if (RegExp(pattern).hasMatch(control.value.toString())) return null; - - if (control.value.toString().length < 10) return {'mobileNumber': true}; - - return {'mobileNumber': true}; - } - - static Map? minPhoneNumValidation( - AbstractControl control, - ) { - if (control.value != null && - control.value.toString().isNotEmpty && - control.value.toString().length < 9) { - return {'minLength': true}; - } - } } bool checkStatus(List? tasks, ProjectCycle? currentCycle) { @@ -89,7 +63,7 @@ bool checkIfBeneficiaryRefused( List? tasks, ) { final isBeneficiaryRefused = (tasks != null && - (tasks ?? []).isNotEmpty && + (tasks).isNotEmpty && tasks.last.status == Status.beneficiaryRefused.toValue()); return isBeneficiaryRefused; @@ -97,7 +71,7 @@ bool checkIfBeneficiaryRefused( /// * Returns [true] if the individual is in the same cycle and is eligible for the next dose, bool checkEligibilityForAgeAndSideEffect( - DigitDOBAge age, + DigitDOBAgeConvertor age, ProjectTypeModel? projectType, TaskModel? tasks, List? sideEffects, @@ -105,13 +79,11 @@ bool checkEligibilityForAgeAndSideEffect( int totalAgeMonths = age.years * 12 + age.months; final currentCycle = projectType?.cycles?.firstWhereOrNull( (e) => - (e.startDate!) < DateTime.now().millisecondsSinceEpoch && - (e.endDate!) > DateTime.now().millisecondsSinceEpoch, + (e.startDate) < DateTime.now().millisecondsSinceEpoch && + (e.endDate) > DateTime.now().millisecondsSinceEpoch, // Return null when no matching cycle is found ); - if (currentCycle != null && - currentCycle.startDate != null && - currentCycle.endDate != null) { + if (currentCycle != null) { bool recordedSideEffect = false; if ((tasks != null) && sideEffects != null && sideEffects.isNotEmpty) { final lastTaskTime = @@ -119,8 +91,8 @@ bool checkEligibilityForAgeAndSideEffect( ? tasks.clientAuditDetails?.createdTime : null; recordedSideEffect = lastTaskTime != null && - (lastTaskTime >= currentCycle.startDate! && - lastTaskTime <= currentCycle.endDate!); + (lastTaskTime >= currentCycle.startDate && + lastTaskTime <= currentCycle.endDate); return projectType?.validMinAge != null && projectType?.validMaxAge != null @@ -132,10 +104,14 @@ bool checkEligibilityForAgeAndSideEffect( : false : false; } else { - return totalAgeMonths >= projectType!.validMinAge! && - totalAgeMonths <= projectType.validMaxAge! - ? true - : false; + if (projectType?.validMaxAge != null && + projectType?.validMinAge != null) { + return totalAgeMonths >= projectType!.validMinAge! && + totalAgeMonths <= projectType.validMaxAge! + ? true + : false; + } + return false; } } @@ -147,9 +123,7 @@ bool recordedSideEffect( TaskModel? task, List? sideEffects, ) { - if (selectedCycle != null && - selectedCycle.startDate != null && - selectedCycle.endDate != null) { + if (selectedCycle != null) { if ((task != null) && (sideEffects ?? []).isNotEmpty) { final lastTaskCreatedTime = task.clientReferenceId == sideEffects?.last.taskClientReferenceId @@ -171,7 +145,7 @@ bool checkIfBeneficiaryReferred( ) { if (currentCycle?.startDate != null && currentCycle?.endDate != null) { final isBeneficiaryReferred = (referrals != null && - (referrals ?? []).isNotEmpty && + (referrals).isNotEmpty && referrals.last.clientAuditDetails!.createdTime >= currentCycle!.startDate && referrals.last.clientAuditDetails!.createdTime <= currentCycle.endDate); @@ -186,9 +160,10 @@ DeliveryDoseCriteria? fetchProductVariant(ProjectCycleDelivery? currentDelivery, IndividualModel? individualModel, HouseholdModel? householdModel) { if (currentDelivery != null) { var individualAgeInMonths = 0; - var gender; - var roomCount; - var memberCount; + int? gender; + int? roomCount; + int? memberCount; + String? structureType; if (individualModel != null) { final individualAge = DigitDateUtils.calculateAge( @@ -209,25 +184,32 @@ DeliveryDoseCriteria? fetchProductVariant(ProjectCycleDelivery? currentDelivery, ?.value .toString() ?? '1')!; + structureType = householdModel.additionalFields?.fields + .where((h) => + h.key == AdditionalFieldsType.houseStructureTypes.toValue()) + .firstOrNull + ?.value + .toString(); } final filteredCriteria = currentDelivery.doseCriteria?.where((criteria) { - final condition = criteria.condition; + final String? condition = criteria.condition; if (condition != null) { final conditions = condition.split('and'); List expressionParser = []; for (var element in conditions) { - final expression = FormulaParser( - element, - { + final expression = CustomFormulaParser.parseCondition(element, { + if (individualModel != null && individualAgeInMonths != 0) 'age': individualAgeInMonths, - if (gender != null) 'gender': gender, - if (memberCount != null) 'memberCount': memberCount, - if (roomCount != null) 'roomCount': roomCount - }, - ); - final error = expression.parse; + if (gender != null) 'gender': gender, + if (memberCount != null) 'memberCount': memberCount, + if (roomCount != null) 'roomCount': roomCount, + if (structureType != null) 'type_of_structure': structureType + }, stringKeys: [ + 'type_of_structure' + ]); + final error = expression; expressionParser.add(error["value"]); } @@ -255,6 +237,54 @@ String maskString(String input) { return maskedString; } +class CustomFormulaParser { + // Modify the function to accept stringKeys as nullable + static Map parseCondition( + String condition, + Map variables, { + List? stringKeys, + } // Accept stringKeys as nullable + ) { + // If stringKeys is null or empty, default to FormulaParser for all conditions + if (stringKeys == null || stringKeys.isEmpty) { + return _parseAsFormula(condition, variables); + } + + // Loop through stringKeys and check for string comparison in the condition + for (var key in stringKeys) { + if (condition.contains('$key==')) { + // Extract the expected value after '==' for string comparison + var value = condition.split('==')[1].trim(); + if (variables.containsKey(key) && variables[key] is String) { + return _compareString(condition, value, variables[key]); + } + } + } + + // If no string-specific comparison, use FormulaParser for numeric evaluation + return _parseAsFormula(condition, variables); + } + + // Handle string comparison + static Map _compareString( + String condition, String expectedValue, String actualValue) { + // Compare string values directly + bool comparisonResult = actualValue == expectedValue; + return {'value': comparisonResult}; + } + + // Handle numeric evaluation using FormulaParser + static Map _parseAsFormula( + String condition, Map variables) { + final expression = FormulaParser( + condition, + variables, + ); + final error = expression.parse; + return error; // Parsing the numeric expression + } +} + class Coordinate { final double? latitude; final double? longitude; @@ -379,27 +409,46 @@ class RegistrationDeliverySingleton { } String? get tenantId => _tenantId; + String? get loggedInUserUuid => _loggedInUserUuid; + double? get maxRadius => _maxRadius; + String? get projectId => _projectId; + BeneficiaryType? get beneficiaryType => _beneficiaryType; + ProjectTypeModel? get projectType => _projectType; + ProjectModel? get selectedProject => _selectedProject; + BoundaryModel? get boundary => _boundaryModel; + PersistenceConfiguration? get persistenceConfiguration => _persistenceConfiguration; + List? get genderOptions => _genderOptions; + List? get idTypeOptions => _idTypeOptions; + List? get householdDeletionReasonOptions => _householdDeletionReasonOptions; + List? get householdMemberDeletionReasonOptions => _householdMemberDeletionReasonOptions; + List? get deliveryCommentOptions => _deliveryCommentOptions; + List? get symptomsTypes => _symptomsTypes; + List? get searchHouseHoldFilter => _searchHouseHoldFilter; + List? get referralReasons => _referralReasons; + List? get houseStructureTypes => _houseStructureTypes; + List? get refusalReasons => _refusalReasons; + UserModel? get loggedInUser => _loggedInUser; } diff --git a/packages/registration_delivery/lib/widgets/action_card/action_card.dart b/packages/registration_delivery/lib/widgets/action_card/action_card.dart deleted file mode 100644 index c5468f7bf..000000000 --- a/packages/registration_delivery/lib/widgets/action_card/action_card.dart +++ /dev/null @@ -1,57 +0,0 @@ -import 'package:digit_components/digit_components.dart'; -import 'package:flutter/material.dart'; - -class ActionCard extends StatelessWidget { - final List items; - - const ActionCard({super.key, required this.items}); - - @override - Widget build(BuildContext context) { - final theme = Theme.of(context); - - return Column( - mainAxisSize: MainAxisSize.min, - children: items - .map( - (e) => Padding( - padding: const EdgeInsets.all(kPadding / 2), - child: DigitOutlineIconButton( - buttonStyle: OutlinedButton.styleFrom( - shape: const RoundedRectangleBorder( - borderRadius: BorderRadius.zero, - ), - backgroundColor: Colors.white, - side: BorderSide( - width: 1.0, - color: e.action != null - ? theme.colorScheme.secondary - : theme.colorScheme.outline, - ), - minimumSize: Size( - MediaQuery.of(context).size.width / 1.25, - 50, - ), - ), - icon: e.icon, - label: e.label, - onPressed: e.action, - ), - ), - ) - .toList(), - ); - } -} - -class ActionCardModel { - final IconData icon; - final String label; - final VoidCallback? action; - - const ActionCardModel({ - required this.icon, - required this.label, - required this.action, - }); -} diff --git a/packages/registration_delivery/lib/widgets/back_navigation_help_header.dart b/packages/registration_delivery/lib/widgets/back_navigation_help_header.dart index 46b9de3fe..3449b2a47 100644 --- a/packages/registration_delivery/lib/widgets/back_navigation_help_header.dart +++ b/packages/registration_delivery/lib/widgets/back_navigation_help_header.dart @@ -1,5 +1,8 @@ import 'package:auto_route/auto_route.dart'; -import 'package:digit_components/digit_components.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/theme/ComponentTheme/back_button_theme.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/atoms/digit_back_button.dart'; import 'package:flutter/material.dart'; import 'package:registration_delivery/blocs/app_localization.dart'; import 'package:registration_delivery/widgets/showcase/showcase_button.dart'; @@ -29,36 +32,36 @@ class BackNavigationHelpHeaderWidget extends StatelessWidget { final theme = Theme.of(context); return Padding( - padding: const EdgeInsets.all(kPadding / 2), + padding: const EdgeInsets.only(left: spacer2, top: spacer2), child: Row( children: [ Expanded( child: Row( children: [ if (showBackNavigation) - Flexible( - child: TextButton.icon( - style: TextButton.styleFrom( - foregroundColor: theme.colorScheme.onBackground, - padding: EdgeInsets.zero, - ), - onPressed: () { - context.router.maybePop(); - handleBack != null ? handleBack!() : null; - }, - icon: const Icon(Icons.arrow_left_sharp), - label: Text( - RegistrationDeliveryLocalization.of(context).translate( - i18.common.coreCommonBack, - ), - overflow: TextOverflow.ellipsis, + DigitBackButton(label: RegistrationDeliveryLocalization.of(context).translate( + i18.common.coreCommonBack, + ), + digitBackButtonThemeData: + const DigitBackButtonThemeData().copyWith( + context: context, + backDigitButtonIcon: Icon( + Icons.arrow_left, + size: MediaQuery.of(context).size.width < 500 + ? Theme.of(context).spacerTheme.spacer5 + : Theme.of(context).spacerTheme.spacer6, + color: Theme.of(context).colorTheme.primary.primary2, ), ), - ), + handleBack: () { + context.router.maybePop(); + handleBack != null ? handleBack!() : null; + }, + ) ], ), ), - SizedBox(width: showHelp ? kPadding * 2 : 0), + SizedBox(width: showHelp ? spacer2 * 2 : 0), if (showHelp) TextButton( style: TextButton.styleFrom(padding: EdgeInsets.zero), diff --git a/packages/registration_delivery/lib/widgets/beneficiary/beneficiary_card.dart b/packages/registration_delivery/lib/widgets/beneficiary/beneficiary_card.dart index 32bb08bed..98bd88e13 100644 --- a/packages/registration_delivery/lib/widgets/beneficiary/beneficiary_card.dart +++ b/packages/registration_delivery/lib/widgets/beneficiary/beneficiary_card.dart @@ -1,8 +1,9 @@ -import 'package:digit_components/digit_components.dart'; +import 'package:digit_ui_components/digit_components.dart'; import 'package:flutter/material.dart'; import 'package:registration_delivery/blocs/app_localization.dart'; import '../../models/entities/status.dart'; +import '../../utils/utils.dart'; class BeneficiaryCard extends StatelessWidget { final String title; @@ -29,33 +30,46 @@ class BeneficiaryCard extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( - padding: const EdgeInsets.all(4), + padding: const EdgeInsets.all(spacer1), child: Text( title, style: theme.textTheme.headlineSmall, ), ), - Offstage( - offstage: status == null, - child: status == Status.visited.toValue() || - status == Status.registered.toValue() || - status == Status.administeredSuccess.toValue() || - status == Status.delivered.toValue() - ? DigitIconButton( - icon: Icons.check_circle, - iconText: RegistrationDeliveryLocalization.of(context) - .translate(status.toString()), - iconTextColor: theme.colorScheme.onSurfaceVariant, - iconColor: theme.colorScheme.onSurfaceVariant, - ) - : DigitIconButton( - icon: Icons.info_rounded, - iconText: RegistrationDeliveryLocalization.of(context) - .translate(status.toString()), - iconTextColor: theme.colorScheme.error, - iconColor: theme.colorScheme.error, - ), - ), + if (status != null) + Offstage( + offstage: status == null, + child: status == Status.visited.toValue() || + status == Status.registered.toValue() || + status == Status.administeredSuccess.toValue() || + status == Status.delivered.toValue() + ? DigitButton( + prefixIcon: Icons.check_circle, + label: RegistrationDeliveryLocalization.of(context) + .translate(status.toString() == + Status.administeredSuccess.toValue() + ? '${RegistrationDeliverySingleton().selectedProject!.projectType}_${status.toString()}' + : status.toString()), + capitalizeLetters: false, + textColor: theme.colorScheme.onSurfaceVariant, + iconColor: theme.colorScheme.onSurfaceVariant, + isDisabled: true, + onPressed: () {}, + type: DigitButtonType.tertiary, + size: DigitButtonSize.medium, + ) + : DigitButton( + prefixIcon: Icons.info_rounded, + label: RegistrationDeliveryLocalization.of(context) + .translate(status.toString()), + textColor: theme.colorScheme.error, + iconColor: theme.colorScheme.error, + type: DigitButtonType.tertiary, + size: DigitButtonSize.medium, + isDisabled: true, + onPressed: () {}, + ), + ), if (subtitle != null) Padding( padding: const EdgeInsets.all(4), diff --git a/packages/registration_delivery/lib/widgets/beneficiary/beneficiary_statistics_card.dart b/packages/registration_delivery/lib/widgets/beneficiary/beneficiary_statistics_card.dart index d162b7105..11729ee6d 100644 --- a/packages/registration_delivery/lib/widgets/beneficiary/beneficiary_statistics_card.dart +++ b/packages/registration_delivery/lib/widgets/beneficiary/beneficiary_statistics_card.dart @@ -1,4 +1,4 @@ -import 'package:digit_components/widgets/digit_card.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; import 'package:flutter/material.dart'; import '../../models/beneficiary_statistics/beneficiary_statistics_model.dart'; @@ -16,7 +16,7 @@ class BeneficiaryStatisticsCard extends StatelessWidget { final theme = Theme.of(context); return DigitCard( - child: Row( + children: [Row( mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ SizedBox( @@ -56,7 +56,7 @@ class BeneficiaryStatisticsCard extends StatelessWidget { ), ), ], - ), + ),] ); } } diff --git a/packages/registration_delivery/lib/widgets/beneficiary/resource_beneficiary_card.dart b/packages/registration_delivery/lib/widgets/beneficiary/resource_beneficiary_card.dart index aa2a84f2a..41c94c625 100644 --- a/packages/registration_delivery/lib/widgets/beneficiary/resource_beneficiary_card.dart +++ b/packages/registration_delivery/lib/widgets/beneficiary/resource_beneficiary_card.dart @@ -1,9 +1,11 @@ -import 'package:digit_components/digit_components.dart'; -import 'package:digit_components/widgets/atoms/selection_card.dart'; +import 'package:digit_data_model/data_model.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/widgets/atoms/pop_up_card.dart'; +import 'package:digit_ui_components/widgets/atoms/selection_card.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:reactive_forms/reactive_forms.dart'; -import 'package:digit_data_model/data_model.dart'; import '../../utils/i18_key_constants.dart' as i18; import '../localized.dart'; @@ -32,116 +34,120 @@ class ResourceBeneficiaryCardState extends LocalizedState { @override Widget build(BuildContext context) { - return Container( - decoration: BoxDecoration( - color: DigitTheme.instance.colorScheme.surface, - border: Border.all( - color: DigitTheme.instance.colorScheme.outline, - width: 1, - ), - borderRadius: const BorderRadius.all( - Radius.circular(4.0), - ), - ), - margin: const EdgeInsets.only( - top: kPadding, - bottom: kPadding, - ), - padding: const EdgeInsets.all(kPadding), - child: Column( - children: [ - BlocBuilder( - builder: (context, productState) { - return productState.maybeWhen( - orElse: () => const Offstage(), - fetched: (productVariants) { - return - SelectionBox( - equalWidthOptions: true, - options: productVariants, - onSelectionChanged: (selectedOptions) { - if (selectedOptions.isNotEmpty) { - var selectedOption = selectedOptions.first; - widget.form.control('resourceDelivered.${widget.cardIndex}').value = selectedOption; - }else{ - widget.form.control('resourceDelivered.${widget.cardIndex}').value = null; - } - }, - initialSelection: widget.form.control('resourceDelivered.${widget.cardIndex}').value != null ? [ - widget.form.control('resourceDelivered.${widget.cardIndex}').value - ] : [], - valueMapper: (value) { - return localizations.translate( - value.sku ?? value.id, - ); - }, - allowMultipleSelection: false, - ); + return DigitCard(cardType: CardType.secondary, children: [ + BlocBuilder( + builder: (context, productState) { + return productState.maybeWhen( + orElse: () => const Offstage(), + fetched: (productVariants) { + return SelectionCard( + equalWidthOptions: true, + showParentContainer: true, + options: productVariants, + onSelectionChanged: (selectedOptions) { + if (selectedOptions.isNotEmpty) { + var selectedOption = selectedOptions.first; + widget.form + .control('resourceDelivered.${widget.cardIndex}') + .value = selectedOption; + } else { + widget.form + .control('resourceDelivered.${widget.cardIndex}') + .value = null; + } + }, + initialSelection: widget.form + .control('resourceDelivered.${widget.cardIndex}') + .value != + null + ? [ + widget.form + .control('resourceDelivered.${widget.cardIndex}') + .value + ] + : [], + valueMapper: (value) { + return localizations.translate( + value.sku ?? value.id, + ); }, + allowMultipleSelection: false, ); }, + ); + }, + ), + ReactiveWrapperField( + formControlName: 'quantityDistributed.${widget.cardIndex}', + builder: (field) => LabeledField( + label: localizations.translate( + i18.deliverIntervention.quantityDistributedLabel, ), - DigitIntegerFormPicker( - incrementer: true, - formControlName: 'quantityDistributed.${widget.cardIndex}', - form: widget.form, - label: localizations.translate( - i18.deliverIntervention.quantityDistributedLabel, - ), - minimum: 1, - + child: DigitNumericFormInput( + minValue: 1, + step: 1, + initialValue: "0", + onChange: (value) { + widget.form + .control('quantityDistributed.${widget.cardIndex}') + .value = int.parse(value); + }, ), - SizedBox( - child: Align( - alignment: Alignment.centerLeft, - child: (widget.cardIndex == widget.totalItems - 1 && - widget.totalItems > 1) - ? DigitIconButton( - onPressed: () async { - final submit = await DigitDialog.show( - context, - options: DigitDialogOptions( - titleText: localizations.translate( - i18.deliverIntervention - .resourceDeleteBeneficiaryDialogTitle, - ), - primaryAction: DigitDialogActions( - label: localizations.translate( - i18.deliverIntervention - .resourceDeleteBeneficiaryPrimaryActionLabel, - ), - action: (context) { - Navigator.of( - context, - rootNavigator: true, - ).pop(true); - }, - ), - secondaryAction: DigitDialogActions( - label: localizations.translate( - i18.common.coreCommonCancel, - ), - action: (context) => Navigator.of( - context, - rootNavigator: true, - ).pop(false), - ), + ), + ), + Align( + alignment: Alignment.centerLeft, + child: + (widget.cardIndex == widget.totalItems - 1 && widget.totalItems > 1) + ? DigitButton( + onPressed: () async { + final submit = await showDialog( + context: context, + builder: (ctx) => Popup( + title: localizations.translate( + i18.deliverIntervention + .resourceDeleteBeneficiaryDialogTitle, ), - ); - if (submit == true) { - widget.onDelete(widget.cardIndex); - } - }, - iconText: localizations.translate( - i18.deliverIntervention.resourceDeleteBeneficiary, - ), - icon: Icons.delete, - ) - : const Offstage(), - ), - ), - ], + actions: [ + DigitButton( + label: localizations.translate( + i18.deliverIntervention + .resourceDeleteBeneficiaryPrimaryActionLabel, + ), + onPressed: () { + Navigator.of( + context, + rootNavigator: true, + ).pop(true); + }, + type: DigitButtonType.primary, + size: DigitButtonSize.large), + DigitButton( + label: localizations.translate( + i18.common.coreCommonCancel, + ), + onPressed: () => Navigator.of( + context, + rootNavigator: true, + ).pop(false), + type: DigitButtonType.secondary, + size: DigitButtonSize.large), + ], + ), + ); + if (submit == true) { + widget.onDelete(widget.cardIndex); + } + }, + label: localizations.translate( + i18.deliverIntervention.resourceDeleteBeneficiary, + ), + prefixIcon: Icons.delete, + type: DigitButtonType.tertiary, + size: DigitButtonSize.medium, + ) + : const Offstage(), ), - ); + ]); } } diff --git a/packages/registration_delivery/lib/widgets/beneficiary/view_beneficiary_card.dart b/packages/registration_delivery/lib/widgets/beneficiary/view_beneficiary_card.dart index 92e9b0454..4ac6e2906 100644 --- a/packages/registration_delivery/lib/widgets/beneficiary/view_beneficiary_card.dart +++ b/packages/registration_delivery/lib/widgets/beneficiary/view_beneficiary_card.dart @@ -1,8 +1,10 @@ import 'package:collection/collection.dart'; -import 'package:digit_components/digit_components.dart'; -import 'package:digit_components/models/digit_table_model.dart'; -import 'package:digit_components/utils/date_utils.dart'; import 'package:digit_data_model/data_model.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/utils/date_utils.dart'; +import 'package:digit_ui_components/widgets/atoms/table_cell.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_table.dart'; import 'package:flutter/material.dart'; import 'package:registration_delivery/models/entities/project_beneficiary.dart'; @@ -17,14 +19,14 @@ import 'beneficiary_card.dart'; class ViewBeneficiaryCard extends LocalizedStatefulWidget { final HouseholdMemberWrapper householdMember; - final VoidCallback? onOpenPressed; + final VoidCallback onOpenPressed; final double? distance; const ViewBeneficiaryCard({ super.key, super.appLocalizations, required this.householdMember, - this.onOpenPressed, + required this.onOpenPressed, this.distance, }); @@ -58,28 +60,32 @@ class ViewBeneficiaryCardState extends LocalizedState { final theme = Theme.of(context); final headerList = [ - TableHeader( - localizations.translate(i18.beneficiaryDetails.beneficiaryHeader), - cellKey: 'beneficiary', + DigitTableColumn( + header: + localizations.translate(i18.beneficiaryDetails.beneficiaryHeader), + cellValue: 'beneficiary', + isFrozen: true, ), - TableHeader( - localizations.translate(i18.beneficiaryDetails.deliveryHeader), - cellKey: 'delivery', + DigitTableColumn( + header: localizations.translate(i18.beneficiaryDetails.deliveryHeader), + cellValue: 'delivery', ), - TableHeader( - localizations.translate(i18.individualDetails.ageLabelText), - cellKey: 'age', + DigitTableColumn( + header: localizations.translate(i18.individualDetails.ageLabelText), + cellValue: 'age', ), - TableHeader( - localizations.translate(i18.common.coreCommonGender), - cellKey: 'gender', + DigitTableColumn( + header: localizations.translate(i18.common.coreCommonGender), + cellValue: 'gender', ), ]; - final filteredHeaderList = RegistrationDeliverySingleton() - .beneficiaryType != - BeneficiaryType.individual - ? headerList.where((element) => element.cellKey != 'delivery').toList() - : headerList; + final filteredHeaderList = + RegistrationDeliverySingleton().beneficiaryType != + BeneficiaryType.individual + ? headerList + .where((element) => element.cellValue != 'delivery') + .toList() + : headerList; final currentCycle = RegistrationDeliverySingleton().projectType?.cycles?.firstWhereOrNull( (e) => @@ -142,7 +148,7 @@ class ViewBeneficiaryCardState extends LocalizedState { ).months; final isNotEligible = !checkEligibilityForAgeAndSideEffect( - DigitDOBAge( + DigitDOBAgeConvertor( years: ageInYears, months: ageInMonths, ), @@ -150,11 +156,6 @@ class ViewBeneficiaryCardState extends LocalizedState { (taskData ?? []).isNotEmpty ? taskData?.last : null, sideEffects, ); - final isSideEffectRecorded = recordedSideEffect( - currentCycle, - (taskData ?? []).isNotEmpty ? taskData?.last : null, - sideEffects, - ); final isBeneficiaryRefused = checkIfBeneficiaryRefused(taskData); final isBeneficiaryReferred = checkIfBeneficiaryReferred( referralData, @@ -164,7 +165,7 @@ class ViewBeneficiaryCardState extends LocalizedState { final isStatusReset = checkStatus(taskData, currentCycle); final rowTableData = [ - TableData( + DigitTableData( [ e.name?.givenName ?? '--', (e.name?.familyName?.trim().isNotEmpty ?? false) @@ -173,7 +174,7 @@ class ViewBeneficiaryCardState extends LocalizedState { ].whereNotNull().join(' '), cellKey: 'beneficiary', ), - TableData( + DigitTableData( getTableCellText( StatusKeys( isNotEligible, @@ -195,7 +196,7 @@ class ViewBeneficiaryCardState extends LocalizedState { ), ), ), - TableData( + DigitTableData( e.dateOfBirth == null ? '--' : '${DigitDateUtils.calculateAge( @@ -211,7 +212,7 @@ class ViewBeneficiaryCardState extends LocalizedState { ).months} ${localizations.translate(i18.searchBeneficiary.monthsAbbr)}', cellKey: 'age', ), - TableData( + DigitTableData( e.gender?.name == null ? '--' : localizations @@ -220,8 +221,8 @@ class ViewBeneficiaryCardState extends LocalizedState { ), ]; - return TableDataRow( - RegistrationDeliverySingleton().beneficiaryType != + return DigitTableRow( + tableRow: RegistrationDeliverySingleton().beneficiaryType != BeneficiaryType.individual ? rowTableData .where((element) => element.cellKey != 'delivery') @@ -250,7 +251,7 @@ class ViewBeneficiaryCardState extends LocalizedState { ).months; final isNotEligible = !checkEligibilityForAgeAndSideEffect( - DigitDOBAge( + DigitDOBAgeConvertor( years: ageInYears, months: ageInMonths, ), @@ -280,90 +281,78 @@ class ViewBeneficiaryCardState extends LocalizedState { t.projectBeneficiaryClientReferenceId == projectBeneficiary?.clientReferenceId); - return DigitCard( - child: Column( + return DigitCard(margin: const EdgeInsets.all(spacer2), children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - SizedBox( - width: MediaQuery.of(context).size.width / 1.8, - child: BeneficiaryCard( - description: [ - householdMember.household?.address?.doorNo, - householdMember.household?.address?.addressLine1, - householdMember.household?.address?.addressLine2, - householdMember.household?.address?.landmark, - householdMember.household?.address?.city, - householdMember.household?.address?.pincode, - ].whereNotNull().take(2).join(' '), - subtitle: widget.distance != null - ? '${householdMember.members?.length ?? 1} ${householdMember.members?.length == 1 ? localizations.translate(i18.beneficiaryDetails.householdMemberSingular) : localizations.translate(i18.beneficiaryDetails.householdMemberPlural)}\n${((widget.distance!) * 1000).round() > 999 ? '(${((widget.distance!).round())} km)' : '(${((widget.distance!) * 1000).round()} mts) ${localizations.translate(i18.beneficiaryDetails.fromCurrentLocation)}'}' - : '${householdMember.members?.length ?? 1} ${householdMember.members?.length == 1 ? localizations.translate(i18.beneficiaryDetails.householdMemberSingular) : localizations.translate(i18.beneficiaryDetails.householdMemberPlural)}', - status: getStatus( - tasks ?? [], - householdMember.projectBeneficiaries ?? [], - RegistrationDeliverySingleton().beneficiaryType == - BeneficiaryType.individual - ? isNotEligible - : false, - isBeneficiaryRefused), - title: [ - householdMember.headOfHousehold?.name?.givenName ?? - localizations.translate(i18.common.coreCommonNA), - householdMember.headOfHousehold?.name?.familyName, - ].whereNotNull().join(''), - ), - ), - Flexible( - child: DigitOutLineButton( - buttonStyle: OutlinedButton.styleFrom( - shape: const RoundedRectangleBorder( - borderRadius: BorderRadius.zero, - ), - ), - label: - localizations.translate(i18.searchBeneficiary.iconLabel), - onPressed: widget.onOpenPressed, - ), - ), - ], - ), - Offstage( - offstage: !isCardExpanded, - child: DigitTable( - headerList: filteredHeaderList, - tableData: tableData ?? [], - columnWidth: 130, - columnRowFixedHeight: 65, - height: householdMember.members?.length == 1 - ? 65 * 2 - : (householdMember.members?.length ?? 0) <= 4 - ? ((householdMember.members?.length ?? 0) + 1) * 65 - : 5 * 68, - scrollPhysics: (householdMember.members?.length ?? 0) <= 4 - ? const NeverScrollableScrollPhysics() - : const ClampingScrollPhysics(), + SizedBox( + width: MediaQuery.of(context).size.width / 1.8, + child: BeneficiaryCard( + description: [ + householdMember.household?.address?.doorNo, + householdMember.household?.address?.addressLine1, + householdMember.household?.address?.addressLine2, + householdMember.household?.address?.landmark, + householdMember.household?.address?.city, + householdMember.household?.address?.pincode, + ].whereNotNull().take(2).join(' '), + subtitle: widget.distance != null + ? '${householdMember.members?.length ?? 1} ${householdMember.members?.length == 1 ? localizations.translate(i18.beneficiaryDetails.householdMemberSingular) : localizations.translate(i18.beneficiaryDetails.householdMemberPlural)}\n${((widget.distance!) * 1000).round() > 999 ? '(${((widget.distance!).round())} km)' : '(${((widget.distance!) * 1000).round()} mts) ${localizations.translate(i18.beneficiaryDetails.fromCurrentLocation)}'}' + : '${householdMember.members?.length ?? 1} ${householdMember.members?.length == 1 ? localizations.translate(i18.beneficiaryDetails.householdMemberSingular) : localizations.translate(i18.beneficiaryDetails.householdMemberPlural)}', + status: getStatus( + tasks ?? [], + householdMember.projectBeneficiaries ?? [], + RegistrationDeliverySingleton().beneficiaryType == + BeneficiaryType.individual + ? isNotEligible + : false, + isBeneficiaryRefused), + title: [ + householdMember.headOfHousehold?.name?.givenName ?? + localizations.translate(i18.common.coreCommonNA), + householdMember.headOfHousehold?.name?.familyName, + ].whereNotNull().join(''), ), ), - Container( - height: 24, - margin: const EdgeInsets.all(4), - child: IconButton( - padding: EdgeInsets.zero, - icon: Icon( - isCardExpanded - ? Icons.keyboard_arrow_up - : Icons.keyboard_arrow_down, - size: 24, - ), - onPressed: () => isCardExpanded = !isCardExpanded, + Flexible( + child: DigitButton( + label: localizations.translate(i18.searchBeneficiary.iconLabel), + onPressed: widget.onOpenPressed, + type: DigitButtonType.secondary, + size: DigitButtonSize.medium, ), ), ], ), - ); + if (isCardExpanded) + Offstage( + offstage: !isCardExpanded, + child: DigitTable( + enableBorder: true, + showPagination: false, + showSelectedState: false, + columns: filteredHeaderList, + rows: tableData ?? [], + ), + ), + Container( + height: 24, + margin: const EdgeInsets.all(4), + child: Center( + child: IconButton( + padding: EdgeInsets.zero, + icon: Icon( + isCardExpanded + ? Icons.keyboard_arrow_up + : Icons.keyboard_arrow_down, + size: 24, + ), + onPressed: () => isCardExpanded = !isCardExpanded, + ), + ), + ), + ]); } String getTableCellText( diff --git a/packages/registration_delivery/lib/widgets/inventory/no_facilities_assigned_dialog.dart b/packages/registration_delivery/lib/widgets/inventory/no_facilities_assigned_dialog.dart index d66ccd130..927baa989 100644 --- a/packages/registration_delivery/lib/widgets/inventory/no_facilities_assigned_dialog.dart +++ b/packages/registration_delivery/lib/widgets/inventory/no_facilities_assigned_dialog.dart @@ -1,27 +1,38 @@ import 'package:auto_route/auto_route.dart'; -import 'package:digit_components/digit_components.dart'; +import 'package:digit_ui_components/enum/app_enums.dart'; +import 'package:digit_ui_components/theme/digit_theme.dart'; +import 'package:digit_ui_components/widgets/atoms/digit_button.dart'; +import 'package:digit_ui_components/widgets/atoms/pop_up_card.dart'; import 'package:flutter/material.dart'; +import 'package:registration_delivery/blocs/app_localization.dart'; + +import '../../utils/i18_key_constants.dart' as i18; class NoFacilitiesAssignedDialog { static Future show(BuildContext context) { - return DigitDialog.show( - context, - options: DigitDialogOptions( + return showDialog( + context: context, + builder: (ctx) => Popup( titleIcon: Icon( Icons.warning, - color: Theme.of(context).colorScheme.error, - ), - titleText: 'No facilities assigned', - contentText: 'Please select another boundary or ' - 'contact the system administrator to assign ' - 'a facility.', - primaryAction: DigitDialogActions( - label: 'Close', - action: (dialogContext) { - Navigator.of(context, rootNavigator: true).pop(); - context.router.maybePop(); - }, + color: DigitTheme.instance.colors.light.alertError, ), + title: RegistrationDeliveryLocalization.of(context) + .translate(i18.referBeneficiary.noFacilityAssigned), + description: RegistrationDeliveryLocalization.of(context) + .translate(i18.referBeneficiary.noFacilityAssignedDescription), + actions: [ + DigitButton( + label: RegistrationDeliveryLocalization.of(context) + .translate(i18.common.corecommonclose), + type: DigitButtonType.primary, + size: DigitButtonSize.large, + onPressed: () { + Navigator.of(context, rootNavigator: true).pop(); + context.router.maybePop(); + }, + ), + ], ), ); } diff --git a/packages/registration_delivery/lib/widgets/member_card/member_card.dart b/packages/registration_delivery/lib/widgets/member_card/member_card.dart index 014dab8dc..2879644da 100644 --- a/packages/registration_delivery/lib/widgets/member_card/member_card.dart +++ b/packages/registration_delivery/lib/widgets/member_card/member_card.dart @@ -1,6 +1,8 @@ import 'package:auto_route/auto_route.dart'; -import 'package:digit_components/digit_components.dart'; import 'package:digit_data_model/data_model.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/atoms/digit_action_card.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:registration_delivery/models/entities/project_beneficiary.dart'; @@ -15,7 +17,6 @@ import '../../models/entities/task.dart'; import '../../router/registration_delivery_router.gm.dart'; import '../../utils/i18_key_constants.dart' as i18; import '../../utils/utils.dart'; -import '../action_card/action_card.dart'; class MemberCard extends StatelessWidget { final String name; @@ -64,216 +65,199 @@ class MemberCard extends StatelessWidget { Widget build(BuildContext context) { final theme = Theme.of(context); final beneficiaryType = RegistrationDeliverySingleton().beneficiaryType; + final textTheme = theme.digitTextTheme(context); return Container( - decoration: BoxDecoration( - color: DigitTheme.instance.colorScheme.background, - border: Border.all( - color: DigitTheme.instance.colorScheme.outline, - width: 1, - ), - borderRadius: const BorderRadius.all( - Radius.circular(4.0), - ), - ), - margin: DigitTheme.instance.containerMargin, - padding: const EdgeInsets.only(left: 8.0, right: 8.0, bottom: 4.0), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Stack( + decoration: BoxDecoration( + color: theme.colorTheme.generic.background, + border: Border.all( + color: DigitTheme.instance.colorScheme.outline, + width: 0.5, + ), + borderRadius: const BorderRadius.all( + Radius.circular(spacer1), + )), + margin: DigitTheme.instance.containerMargin, + padding: const EdgeInsets.only( + left: spacer2, right: spacer2, bottom: spacer2), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.center, + Stack( children: [ - SizedBox( - width: MediaQuery.of(context).size.width / 1.8, - child: Padding( - padding: - const EdgeInsets.only(left: kPadding, top: kPadding), - child: Text( - name, - style: theme.textTheme.headlineMedium, + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox( + width: MediaQuery.of(context).size.width / 1.8, + child: Padding( + padding: const EdgeInsets.all(spacer2), + child: Text( + name, + style: textTheme.headingM, + ), + ), ), - ), + ], ), - ], - ), - Positioned( - child: Align( - alignment: Alignment.topRight, - child: DigitIconButton( - buttonDisabled: (projectBeneficiaries ?? []).isEmpty, - onPressed: (projectBeneficiaries ?? []).isEmpty - ? null - : () => DigitActionDialog.show( - context, - widget: ActionCard( - items: [ - ActionCardModel( - icon: Icons.person, - label: localizations.translate( - i18.memberCard.assignAsHouseholdhead, - ), - action: isHead ? null : setAsHeadAction, + Positioned( + child: Align( + alignment: Alignment.topRight, + child: Padding( + padding: const EdgeInsets.only(top: spacer2), + child: DigitButton( + isDisabled: (projectBeneficiaries ?? []).isEmpty, + onPressed: () => showDialog( + context: context, + builder: (ctx) => DigitActionCard( + onOutsideTap: () { + Navigator.of(context, rootNavigator: true).pop(); + }, + actions: [ + DigitButton( + prefixIcon: Icons.person, + label: localizations.translate( + i18.memberCard.assignAsHouseholdhead, ), - ActionCardModel( - icon: Icons.edit, - label: localizations.translate( - i18.memberCard.editIndividualDetails, - ), - action: editMemberAction, + isDisabled: isHead ? true : false, + onPressed: setAsHeadAction, + type: DigitButtonType.secondary, + size: DigitButtonSize.large, + ), + DigitButton( + prefixIcon: Icons.edit, + label: localizations.translate( + i18.memberCard.editIndividualDetails, ), - ActionCardModel( - icon: Icons.delete, - label: localizations.translate( - i18.memberCard.deleteIndividualActionText, - ), - action: isHead ? null : deleteMemberAction, + onPressed: editMemberAction, + type: DigitButtonType.secondary, + size: DigitButtonSize.large, + ), + DigitButton( + prefixIcon: Icons.delete, + label: localizations.translate( + i18.memberCard.deleteIndividualActionText, ), - ], - ), + isDisabled: isHead ? true : false, + onPressed: deleteMemberAction, + type: DigitButtonType.secondary, + size: DigitButtonSize.large, + ), + ], ), - iconText: localizations.translate( - i18.memberCard.editDetails, + ), + label: localizations.translate( + i18.memberCard.editDetails, + ), + prefixIcon: Icons.edit, + type: DigitButtonType.tertiary, + size: DigitButtonSize.medium, + ), + ), ), - icon: Icons.edit, ), - ), + ], ), - ], - ), - SizedBox( - width: MediaQuery.of(context).size.width / 1.8, - child: Row( - mainAxisSize: MainAxisSize.min, - children: [ - Container( - margin: DigitTheme.instance.containerMargin, - child: Text( - gender != null - ? localizations - .translate('CORE_COMMON_${gender?.toUpperCase()}') - : ' -- ', - style: theme.textTheme.bodyMedium, - ), - ), - Expanded( - child: Text( - years != null && months != null - ? " | $years ${localizations.translate(i18.memberCard.deliverDetailsYearText)} $months ${localizations.translate(i18.memberCard.deliverDetailsMonthsText)}" - : "| --", - style: theme.textTheme.bodyMedium, - ), + Padding( + padding: const EdgeInsets.all(spacer2), + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + Text( + gender != null + ? localizations + .translate('CORE_COMMON_${gender?.toUpperCase()}') + : ' -- ', + style: textTheme.bodyS, + ), + Expanded( + child: Text( + years != null && months != null + ? " | $years ${localizations.translate(i18.memberCard.deliverDetailsYearText)} $months ${localizations.translate(i18.memberCard.deliverDetailsMonthsText)}" + : "| --", + style: textTheme.bodyS, + ), + ), + ], ), - ], - ), - ), - Padding( - padding: const EdgeInsets.only( - left: kPadding / 2, - ), - child: Offstage( - offstage: beneficiaryType != BeneficiaryType.individual, - child: !isDelivered || - isNotEligible || - isBeneficiaryRefused || - isBeneficiaryReferred - ? Align( - alignment: Alignment.centerLeft, - child: DigitIconButton( - icon: Icons.info_rounded, - iconSize: 20, - iconText: localizations.translate( - isNotEligible - ? i18.householdOverView - .householdOverViewNotEligibleIconLabel - : isBeneficiaryReferred + ), + Padding( + padding: const EdgeInsets.only(left: spacer1, bottom: spacer2), + child: Offstage( + offstage: beneficiaryType != BeneficiaryType.individual, + child: !isDelivered || + isNotEligible || + isBeneficiaryRefused || + isBeneficiaryReferred + ? Align( + alignment: Alignment.centerLeft, + child: DigitButton( + prefixIcon: Icons.info_rounded, + label: localizations.translate( + isNotEligible ? i18.householdOverView - .householdOverViewBeneficiaryReferredLabel - : isBeneficiaryRefused - ? Status.beneficiaryRefused.toValue() - : i18.householdOverView - .householdOverViewNotDeliveredIconLabel, - ), - iconTextColor: theme.colorScheme.error, - iconColor: theme.colorScheme.error, - ), - ) - : Align( - alignment: Alignment.centerLeft, - child: DigitIconButton( - icon: Icons.check_circle, - iconText: localizations.translate( - i18.householdOverView - .householdOverViewDeliveredIconLabel, + .householdOverViewNotEligibleIconLabel + : isBeneficiaryReferred + ? i18.householdOverView + .householdOverViewBeneficiaryReferredLabel + : isBeneficiaryRefused + ? Status.beneficiaryRefused.toValue() + : i18.householdOverView + .householdOverViewNotDeliveredIconLabel, + ), + textColor: DigitTheme.instance.colorScheme.error, + iconColor: DigitTheme.instance.colorScheme.error, + type: DigitButtonType.tertiary, + size: DigitButtonSize.medium, + isDisabled: true, + onPressed: () {}, + ), + ) + : Align( + alignment: Alignment.centerLeft, + child: DigitButton( + prefixIcon: Icons.check_circle, + label: localizations.translate( + i18.householdOverView + .householdOverViewDeliveredIconLabel, + ), + isDisabled: true, + textColor: DigitTheme + .instance.colorScheme.onSurfaceVariant, + iconColor: DigitTheme + .instance.colorScheme.onSurfaceVariant, + type: DigitButtonType.tertiary, + size: DigitButtonSize.medium, + onPressed: () {}, + ), ), - iconSize: 20, - iconTextColor: - DigitTheme.instance.colorScheme.onSurfaceVariant, - iconColor: - DigitTheme.instance.colorScheme.onSurfaceVariant, - ), - ), - ), - ), - Offstage( - offstage: beneficiaryType != BeneficiaryType.individual || - isNotEligible || - isBeneficiaryRefused || - isBeneficiaryReferred, - child: Padding( - padding: const EdgeInsets.all(4.0), - child: Column( - children: [ - isNotEligible || isBeneficiaryRefused || isBeneficiaryReferred - ? const Offstage() - : !isNotEligible - ? DigitElevatedButton( - onPressed: (projectBeneficiaries ?? []).isEmpty - ? null - : () { - final bloc = - context.read(); - - bloc.add( - HouseholdOverviewEvent - .selectedIndividual( - individualModel: individual, - ), - ); - bloc.add(HouseholdOverviewReloadEvent( - projectId: - RegistrationDeliverySingleton() - .projectId!, - projectBeneficiaryType: - RegistrationDeliverySingleton() - .beneficiaryType ?? - BeneficiaryType.individual, - )); - - final futureTaskList = tasks - ?.where((task) => - task.status == - Status.delivered.toValue()) - .toList(); - - if ((futureTaskList ?? []).isNotEmpty) { - context.router.push( - RecordPastDeliveryDetailsRoute( - tasks: tasks, - ), - ); - } else { - context.router - .push(BeneficiaryDetailsRoute()); - } - }, - child: Center( - child: Text( - allDosesDelivered( + ), + ), + Offstage( + offstage: beneficiaryType != BeneficiaryType.individual || + isNotEligible || + isBeneficiaryRefused || + isBeneficiaryReferred, + child: Padding( + padding: const EdgeInsets.all(spacer1), + child: Column( + children: [ + isNotEligible || + isBeneficiaryRefused || + isBeneficiaryReferred + ? const Offstage() + : !isNotEligible + ? DigitButton( + mainAxisSize: MainAxisSize.max, + isDisabled: + (projectBeneficiaries ?? []).isEmpty + ? true + : false, + type: DigitButtonType.primary, + size: DigitButtonSize.large, + label: allDosesDelivered( tasks, context.selectedCycle, sideEffects, @@ -291,256 +275,227 @@ class MemberCard extends StatelessWidget { i18.householdOverView .householdOverViewActionText, ), - ), + onPressed: () { + final bloc = + context.read(); + + bloc.add( + HouseholdOverviewEvent.selectedIndividual( + individualModel: individual, + ), + ); + bloc.add(HouseholdOverviewReloadEvent( + projectId: RegistrationDeliverySingleton() + .projectId!, + projectBeneficiaryType: + RegistrationDeliverySingleton() + .beneficiaryType ?? + BeneficiaryType.individual, + )); + + final futureTaskList = tasks + ?.where((task) => + task.status == + Status.delivered.toValue()) + .toList(); + + if ((futureTaskList ?? []).isNotEmpty) { + context.router.push( + RecordPastDeliveryDetailsRoute( + tasks: tasks, + ), + ); + } else { + context.router + .push(BeneficiaryDetailsRoute()); + } + }, + ) + : const Offstage(), + const SizedBox( + height: 10, + ), + (isNotEligible || + isBeneficiaryRefused || + isBeneficiaryReferred || + (allDosesDelivered( + tasks, + context.selectedCycle, + sideEffects, + individual, + ) && + !checkStatus(tasks, context.selectedCycle))) + ? const Offstage() + : DigitButton( + label: localizations.translate( + i18.memberCard.unableToDeliverLabel, ), - ) - : const Offstage(), - const SizedBox( - height: 10, - ), - (isNotEligible || - isBeneficiaryRefused || - isBeneficiaryReferred || - (allDosesDelivered( - tasks, - context.selectedCycle, - sideEffects, - individual, - ) && - !checkStatus(tasks, context.selectedCycle))) - ? const Offstage() - : DigitOutLineButton( - label: localizations.translate( - i18.memberCard.unableToDeliverLabel, - ), - buttonStyle: OutlinedButton.styleFrom( - shape: const RoundedRectangleBorder( - borderRadius: BorderRadius.zero, - ), - backgroundColor: Colors.white, - side: BorderSide( - width: 1.0, - color: theme.colorScheme.secondary, - ), - minimumSize: Size( - MediaQuery.of(context).size.width / 1.15, - 50, - ), - ), - onPressed: (projectBeneficiaries ?? []).isEmpty - ? null - : () async { - await DigitActionDialog.show( - context, - widget: Column( - children: [ - DigitOutLineButton( - label: localizations.translate( - i18.memberCard - .beneficiaryRefusedLabel, - ), - buttonStyle: OutlinedButton.styleFrom( - shape: const RoundedRectangleBorder( - borderRadius: BorderRadius.zero, - ), - backgroundColor: Colors.white, - side: BorderSide( - width: 1.0, - color: - theme.colorScheme.secondary, - ), - minimumSize: Size( - MediaQuery.of(context) - .size - .width / - 1.25, - 50, - ), - ), - onPressed: () { - Navigator.of(context, - rootNavigator: true) - .pop(); - context - .read() - .add( - DeliverInterventionSubmitEvent( - task: TaskModel( - projectBeneficiaryClientReferenceId: - projectBeneficiaryClientReferenceId, - clientReferenceId: - IdGen.i.identifier, - tenantId: - RegistrationDeliverySingleton() - .tenantId, - rowVersion: 1, - auditDetails: - AuditDetails( - createdBy: - RegistrationDeliverySingleton() - .loggedInUserUuid!, - createdTime: context - .millisecondsSinceEpoch(), - ), - projectId: + isDisabled: (projectBeneficiaries ?? []).isEmpty + ? true + : false, + type: DigitButtonType.secondary, + size: DigitButtonSize.large, + mainAxisSize: MainAxisSize.max, + onPressed: () async { + await showDialog( + context: context, + builder: (ctx) => DigitActionCard( + onOutsideTap: () { + Navigator.of( + context, + rootNavigator: true, + ).pop(); + }, + actions: [ + DigitButton( + label: localizations.translate( + i18.memberCard + .beneficiaryRefusedLabel, + ), + type: DigitButtonType.secondary, + size: DigitButtonSize.large, + onPressed: () { + Navigator.of(context, + rootNavigator: true) + .pop(); + context + .read() + .add( + DeliverInterventionSubmitEvent( + task: TaskModel( + projectBeneficiaryClientReferenceId: + projectBeneficiaryClientReferenceId, + clientReferenceId: + IdGen.i.identifier, + tenantId: + RegistrationDeliverySingleton() + .tenantId, + rowVersion: 1, + auditDetails: AuditDetails( + createdBy: RegistrationDeliverySingleton() - .projectId, - status: Status - .beneficiaryRefused - .toValue(), - clientAuditDetails: - ClientAuditDetails( - createdBy: - RegistrationDeliverySingleton() - .loggedInUserUuid!, - createdTime: context - .millisecondsSinceEpoch(), - lastModifiedBy: - RegistrationDeliverySingleton() - .loggedInUserUuid, - lastModifiedTime: context - .millisecondsSinceEpoch(), - ), - additionalFields: - TaskAdditionalFields( - version: 1, - fields: [ - AdditionalField( - 'taskStatus', - Status - .beneficiaryRefused - .toValue(), - ), - ], - ), - address: individual - .address?.first, + .loggedInUserUuid!, + createdTime: context + .millisecondsSinceEpoch(), ), - isEditing: false, - boundaryModel: - RegistrationDeliverySingleton() - .boundary!, - ), - ); - final reloadState = context - .read(); - Future.delayed( - const Duration(milliseconds: 500), - () { - reloadState.add( - HouseholdOverviewReloadEvent( projectId: RegistrationDeliverySingleton() - .projectId!, - projectBeneficiaryType: - RegistrationDeliverySingleton() - .beneficiaryType!, + .projectId, + status: Status + .beneficiaryRefused + .toValue(), + clientAuditDetails: + ClientAuditDetails( + createdBy: + RegistrationDeliverySingleton() + .loggedInUserUuid!, + createdTime: context + .millisecondsSinceEpoch(), + lastModifiedBy: + RegistrationDeliverySingleton() + .loggedInUserUuid, + lastModifiedTime: context + .millisecondsSinceEpoch(), + ), + additionalFields: + TaskAdditionalFields( + version: 1, + fields: [ + AdditionalField( + 'taskStatus', + Status + .beneficiaryRefused + .toValue(), + ), + ], + ), + address: individual + .address?.first, ), - ); - }, - ).then( - (value) => context.router.push( - HouseholdAcknowledgementRoute( - enableViewHousehold: true, + isEditing: false, + boundaryModel: + RegistrationDeliverySingleton() + .boundary!, ), + ); + final reloadState = context + .read(); + Future.delayed( + const Duration(milliseconds: 500), + () { + reloadState.add( + HouseholdOverviewReloadEvent( + projectId: + RegistrationDeliverySingleton() + .projectId!, + projectBeneficiaryType: + RegistrationDeliverySingleton() + .beneficiaryType!, + ), + ); + }, + ).then( + (value) => context.router.push( + HouseholdAcknowledgementRoute( + enableViewHousehold: true, ), - ); - }, - ), - const SizedBox( - height: kPadding * 2, - ), - DigitOutLineButton( - label: localizations.translate( - i18.memberCard - .referBeneficiaryLabel, - ), - buttonStyle: OutlinedButton.styleFrom( - shape: const RoundedRectangleBorder( - borderRadius: BorderRadius.zero, ), - backgroundColor: Colors.white, - side: BorderSide( - width: 1.0, - color: - theme.colorScheme.secondary, - ), - minimumSize: Size( - MediaQuery.of(context) - .size - .width / - 1.25, - 50, - ), - ), - onPressed: () async { - Navigator.of( - context, - rootNavigator: true, - ).pop(); - await context.router.push( - ReferBeneficiaryRoute( - projectBeneficiaryClientRefId: - projectBeneficiaryClientReferenceId ?? - '', - ), - ); - }, + ); + }, + ), + DigitButton( + label: localizations.translate( + i18.memberCard.referBeneficiaryLabel, ), - const SizedBox( - height: kPadding * 2, - ), - DigitOutLineButton( - label: localizations.translate( - i18.memberCard - .recordAdverseEventsLabel, - ), - buttonStyle: OutlinedButton.styleFrom( - shape: const RoundedRectangleBorder( - borderRadius: BorderRadius.zero, - ), - backgroundColor: Colors.white, - side: BorderSide( - width: 1.0, - color: tasks != null && - (tasks ?? []).isNotEmpty - ? theme.colorScheme.secondary - : theme.colorScheme.outline, - ), - minimumSize: Size( - MediaQuery.of(context) - .size - .width / - 1.25, - 50, + type: DigitButtonType.secondary, + size: DigitButtonSize.large, + onPressed: () async { + Navigator.of( + context, + rootNavigator: true, + ).pop(); + await context.router.push( + ReferBeneficiaryRoute( + projectBeneficiaryClientRefId: + projectBeneficiaryClientReferenceId ?? + '', ), - ), - onPressed: tasks != null && - (tasks ?? []).isNotEmpty - ? () async { - Navigator.of( - context, - rootNavigator: true, - ).pop(); - await context.router.push( - SideEffectsRoute( - tasks: tasks!, - ), - ); - } - : null, + ); + }, + ), + DigitButton( + label: localizations.translate( + i18.memberCard + .recordAdverseEventsLabel, ), - ], - ), - ); - }, - ), - ], + isDisabled: tasks != null && + (tasks ?? []).isNotEmpty + ? false + : true, + type: DigitButtonType.secondary, + size: DigitButtonSize.large, + mainAxisSize: MainAxisSize.max, + onPressed: () async { + Navigator.of( + context, + rootNavigator: true, + ).pop(); + await context.router.push( + SideEffectsRoute( + tasks: tasks!, + ), + ); + }, + ), + ], + ), + ); + }, + ), + ], + ), + ), ), - ), - ), - ], - ), - ); + ])); } } diff --git a/packages/registration_delivery/lib/widgets/progress_bar/beneficiary_progress.dart b/packages/registration_delivery/lib/widgets/progress_bar/beneficiary_progress.dart index 5ae9047bd..eff24ef84 100644 --- a/packages/registration_delivery/lib/widgets/progress_bar/beneficiary_progress.dart +++ b/packages/registration_delivery/lib/widgets/progress_bar/beneficiary_progress.dart @@ -1,8 +1,9 @@ import 'dart:math'; import 'package:collection/collection.dart'; -import 'package:digit_components/widgets/digit_card.dart'; import 'package:digit_data_model/data/data_repository.dart'; +import 'package:digit_ui_components/theme/spacers.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; @@ -84,12 +85,13 @@ class BeneficiaryProgressBarState extends State { final target = targetModel?.targetNo ?? 0.0; return DigitCard( - child: ProgressIndicatorContainer( + margin: const EdgeInsets.all(spacer2), + children: [ProgressIndicatorContainer( label: '${max(target - current, 0).round()} ${widget.label}', prefixLabel: '$current ${widget.prefixLabel}', suffixLabel: target.toStringAsFixed(0), value: target == 0 ? 0 : min(current / target, 1), - ), + ),] ); } } diff --git a/packages/registration_delivery/lib/widgets/progress_indicator/progress_indicator.dart b/packages/registration_delivery/lib/widgets/progress_indicator/progress_indicator.dart index 0ff61f7ff..3c228f3e2 100644 --- a/packages/registration_delivery/lib/widgets/progress_indicator/progress_indicator.dart +++ b/packages/registration_delivery/lib/widgets/progress_indicator/progress_indicator.dart @@ -1,4 +1,4 @@ -import 'package:digit_components/theme/digit_theme.dart'; +import 'package:digit_ui_components/theme/spacers.dart'; import 'package:flutter/material.dart'; class ProgressIndicatorContainer extends StatelessWidget { @@ -32,7 +32,7 @@ class ProgressIndicatorContainer extends StatelessWidget { textAlign: TextAlign.center, ), Padding( - padding: const EdgeInsets.all(kPadding * 2), + padding: const EdgeInsets.all(spacer2 * 2), child: Column( children: [ LinearProgressIndicator( @@ -44,7 +44,7 @@ class ProgressIndicatorContainer extends StatelessWidget { minHeight: 7.0, ), Padding( - padding: const EdgeInsets.only(top: kPadding + 4), + padding: const EdgeInsets.only(top: spacer2 + 4), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ @@ -67,7 +67,7 @@ class ProgressIndicatorContainer extends StatelessWidget { if (subLabel != null) Center( child: Padding( - padding: const EdgeInsets.all(kPadding), + padding: const EdgeInsets.all(spacer2), child: Text( subLabel ?? '', style: TextStyle( diff --git a/packages/registration_delivery/lib/widgets/showcase/showcase_button.dart b/packages/registration_delivery/lib/widgets/showcase/showcase_button.dart index 32f0e5f1b..f54468e06 100644 --- a/packages/registration_delivery/lib/widgets/showcase/showcase_button.dart +++ b/packages/registration_delivery/lib/widgets/showcase/showcase_button.dart @@ -1,6 +1,6 @@ import 'package:auto_route/auto_route.dart'; -import 'package:digit_components/theme/digit_theme.dart'; import 'package:digit_showcase/showcase_widget.dart'; +import 'package:digit_ui_components/theme/spacers.dart'; import 'package:flutter/material.dart'; import 'package:registration_delivery/blocs/app_localization.dart'; @@ -44,10 +44,10 @@ class ShowcaseButtonState extends LocalizedState { children: [ Padding( padding: const EdgeInsets.fromLTRB( - kPadding, - kPadding, - kPadding / 2, - kPadding, + spacer2, + spacer2, + spacer2 / 2, + spacer2, ), child: Text( RegistrationDeliveryLocalization.of(context) diff --git a/packages/registration_delivery/lib/widgets/status_filter/status_filter.dart b/packages/registration_delivery/lib/widgets/status_filter/status_filter.dart index 90b0b2c44..3d2ef9bf6 100644 --- a/packages/registration_delivery/lib/widgets/status_filter/status_filter.dart +++ b/packages/registration_delivery/lib/widgets/status_filter/status_filter.dart @@ -1,9 +1,8 @@ -import 'package:digit_components/digit_components.dart'; -import 'package:digit_components/widgets/atoms/selection_card.dart'; import 'package:digit_scanner/widgets/localized.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/widgets/atoms/selection_card.dart'; import 'package:flutter/material.dart'; import 'package:registration_delivery/registration_delivery.dart'; -import '../../utils/i18_key_constants.dart' as i18; import '../../models/entities/status.dart'; import '../../utils/i18_key_constants.dart' as i18; @@ -46,19 +45,19 @@ class StatusFilterState extends LocalizedState { children: isLoading ? [ Padding( - padding: const EdgeInsets.only(top: kPadding * 2), + padding: const EdgeInsets.only(top: spacer2 * 2), child: Icon( Icons.autorenew, - color: const DigitColors().burningOrange, - size: kPadding * 4, + color: DigitTheme.instance.colorScheme.primary, + size: spacer2 * 4, ), ), - const SizedBox(height: kPadding * 2), + const SizedBox(height: spacer2 * 2), Center( child: Text( localizations.translate(i18.common.coreCommonLoadingText), - style: theme.textTheme.headlineSmall - ?.copyWith(color: const DigitColors().burningOrange), + style: theme.textTheme.headlineSmall?.copyWith( + color: DigitTheme.instance.colorScheme.primary), ), ) ] @@ -67,21 +66,23 @@ class StatusFilterState extends LocalizedState { children: [ if (widget.titleIcon != null) ...[ Padding( - padding: const EdgeInsets.all(kPadding), + padding: const EdgeInsets.all(spacer2), child: widget.titleIcon!, ), ], - Expanded( - child: Padding( - padding: const EdgeInsets.symmetric(vertical: kPadding), - child: Text( - widget.titleText!, - textAlign: TextAlign.left, - style: DigitTheme - .instance.mobileTheme.textTheme.headlineMedium, + if (widget.titleText != null) + Expanded( + child: Padding( + padding: + const EdgeInsets.symmetric(vertical: spacer2), + child: Text( + widget.titleText!, + textAlign: TextAlign.left, + style: DigitTheme + .instance.mobileTheme.textTheme.headlineMedium, + ), ), ), - ), if (widget.isCloseIcon) InkWell( onTap: () => Navigator.of(context).pop(), @@ -90,8 +91,8 @@ class StatusFilterState extends LocalizedState { ], ), Padding( - padding: const EdgeInsets.all(kPadding), - child: SelectionBox( + padding: const EdgeInsets.all(spacer2), + child: SelectionCard( options: getFilters() ?? [], allowMultipleSelection: false, equalWidthOptions: true, @@ -102,58 +103,59 @@ class StatusFilterState extends LocalizedState { }); }, valueMapper: (value) { - return localizations - .translate(value.toValue().toString()); + return localizations.translate(value == + Status.administeredSuccess + ? '${RegistrationDeliverySingleton().selectedProject!.projectType}_${value.toValue().toString()}' + : value.toValue().toString()); }, ), ), const SizedBox( - height: kPadding, + height: spacer2, ), Padding( - padding: const EdgeInsets.symmetric(horizontal: kPadding), + padding: const EdgeInsets.symmetric(horizontal: spacer2), child: Row( mainAxisAlignment: MainAxisAlignment.spaceEvenly, // Adjust button spacing children: [ Expanded( - child: DigitOutLineButton( + child: DigitButton( label: localizations.translate( i18.searchBeneficiary.clearFilter, ), - onPressed: selectedButtons.isEmpty - ? null - : () { - setState(() { - selectedButtons.clear(); - }); - }), + isDisabled: selectedButtons.isEmpty, + type: DigitButtonType.secondary, + size: DigitButtonSize.medium, + onPressed: () { + setState(() { + selectedButtons.clear(); + }); + }), ), const SizedBox( - width: kPadding, + width: spacer2, ), Expanded( - child: DigitElevatedButton( - onPressed: selectedButtons.isEmpty - ? null - : () { - setState(() { - isLoading = true; - }); - var selected = selectedButtons - .map((e) => e.name) - .toList(); + child: DigitButton( + label: localizations.translate( + i18.searchBeneficiary.applyFilter, + ), + isDisabled: selectedButtons.isEmpty, + type: DigitButtonType.primary, + size: DigitButtonSize.medium, + onPressed: () { + setState(() { + isLoading = true; + }); + var selected = + selectedButtons.map((e) => e.name).toList(); - Future.delayed(const Duration(seconds: 1), - () { - Navigator.pop(context, selected); - }); - }, - child: Text( - localizations.translate( - i18.searchBeneficiary.applyFilter, - ), - )), + Future.delayed(const Duration(seconds: 1), () { + Navigator.pop(context, selected); + }); + }, + ), ), ], ), diff --git a/packages/registration_delivery/lib/widgets/table_card/table_card.dart b/packages/registration_delivery/lib/widgets/table_card/table_card.dart new file mode 100644 index 000000000..f0231569a --- /dev/null +++ b/packages/registration_delivery/lib/widgets/table_card/table_card.dart @@ -0,0 +1,42 @@ +import 'package:digit_ui_components/widgets/atoms/label_value_list.dart'; +import 'package:digit_ui_components/widgets/molecules/label_value_summary.dart'; +import 'package:flutter/material.dart'; + +class DigitTableCard extends StatelessWidget { + final Map element; + final Border? border; + final Color? color; + final EdgeInsetsGeometry? padding; + final double gap; + final num fraction; + final EdgeInsetsGeometry? topPadding; + final TextStyle? labelStyle; + final TextStyle? descriptionStyle; + + const DigitTableCard({ + super.key, + required this.element, + this.border, + this.color, + this.padding, + this.gap = 0, + this.fraction = 1.8, + this.topPadding, + this.labelStyle, + this.descriptionStyle, + }); + + @override + Widget build(BuildContext context) { + return LabelValueSummary( + padding: EdgeInsets.all(0), + items: element.keys + .map((e) => LabelValueItem( + label: e, + value: element[e].toString(), + labelFlex: 5, + )) + .toList(), + ); + } +} diff --git a/packages/registration_delivery/pubspec.lock b/packages/registration_delivery/pubspec.lock index 5fd82ee9c..e027ca226 100644 --- a/packages/registration_delivery/pubspec.lock +++ b/packages/registration_delivery/pubspec.lock @@ -117,18 +117,18 @@ packages: dependency: "direct main" description: name: auto_route - sha256: eb33554581a0a4aa7e6da0f13a44291a55bf71359012f1d9feb41634ff908ff8 + sha256: a9001a90539ca3effc168f7e1029a5885c7326b9032c09ac895e303c1d137704 url: "https://pub.dev" source: hosted - version: "7.9.2" + version: "8.3.0" auto_route_generator: dependency: "direct dev" description: name: auto_route_generator - sha256: "11067a3bcd643812518fe26c0c9ec073990286cabfd9d74b6da9ef9b913c4d22" + sha256: ba28133d3a3bf0a66772bcc98dade5843753cd9f1a8fb4802b842895515b67d3 url: "https://pub.dev" source: hosted - version: "7.3.2" + version: "8.0.0" bloc: dependency: transitive description: @@ -186,13 +186,13 @@ packages: source: hosted version: "2.4.2" build_runner: - dependency: "direct main" + dependency: "direct dev" description: name: build_runner - sha256: "3ac61a79bfb6f6cc11f693591063a7f19a7af628dc52f141743edac5c16e8c22" + sha256: "644dc98a0f179b872f612d3eb627924b578897c629788e858157fa5e704ca0c7" url: "https://pub.dev" source: hosted - version: "2.4.9" + version: "2.4.11" build_runner_core: dependency: transitive description: @@ -221,26 +221,26 @@ packages: dependency: transitive description: name: camera - sha256: "9499cbc2e51d8eb0beadc158b288380037618ce4e30c9acbc4fae1ac3ecb5797" + sha256: "26ff41045772153f222ffffecba711a206f670f5834d40ebf5eed3811692f167" url: "https://pub.dev" source: hosted - version: "0.10.5+9" - camera_android: + version: "0.11.0+2" + camera_android_camerax: dependency: transitive description: - name: camera_android - sha256: b350ac087f111467e705b2b76cc1322f7f5bdc122aa83b4b243b0872f390d229 + name: camera_android_camerax + sha256: "011be2ab0e5b3e3aa8094413fa890f8c5c5afd7cfdaef353a992047d4dab5780" url: "https://pub.dev" source: hosted - version: "0.10.9+2" + version: "0.6.8+2" camera_avfoundation: dependency: transitive description: name: camera_avfoundation - sha256: "608b56b0880722f703871329c4d7d4c2f379c8e2936940851df7fc041abc6f51" + sha256: "2e4c568f70e406ccb87376bc06b53d2f5bebaab71e2fbcc1a950e31449381bcf" url: "https://pub.dev" source: hosted - version: "0.9.13+10" + version: "0.9.17+5" camera_platform_interface: dependency: transitive description: @@ -333,10 +333,10 @@ packages: dependency: transitive description: name: cross_file - sha256: fedaadfa3a6996f75211d835aaeb8fede285dae94262485698afd832371b9a5e + sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670" url: "https://pub.dev" source: hosted - version: "0.3.3+8" + version: "0.3.4+2" crypto: dependency: transitive description: @@ -361,22 +361,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.8" - dart_code_metrics: - dependency: "direct dev" - description: - name: dart_code_metrics - sha256: "3dede3f7abc077a4181ec7445448a289a9ce08e2981e6a4d49a3fb5099d47e1f" - url: "https://pub.dev" - source: hosted - version: "5.7.6" - dart_code_metrics_presets: - dependency: transitive - description: - name: dart_code_metrics_presets - sha256: b71eadf02a3787ebd5c887623f83f6fdc204d45c75a081bd636c4104b3fd8b73 - url: "https://pub.dev" - source: hosted - version: "1.8.0" dart_mappable: dependency: "direct main" description: @@ -389,11 +373,11 @@ packages: dependency: "direct dev" description: path: "packages/dart_mappable_builder" - ref: master - resolved-ref: e3d8ac43f70568b4a17c200cae5cde285050ef23 + ref: "1.6-final-dev" + resolved-ref: "1e7467577a9701d396f7e23afbf00065e54c5469" url: "https://github.com/egovernments/health-campaign-field-worker-app/" source: git - version: "4.2.0" + version: "4.2.3" dart_style: dependency: transitive description: @@ -418,30 +402,22 @@ packages: url: "https://pub.dev" source: hosted version: "0.4.1" - digit_components: - dependency: "direct main" - description: - name: digit_components - sha256: "07b585e5d8010639366da72a4a8b215ce9b8790c75b2162b66af3cea57ca35d9" - url: "https://pub.dev" - source: hosted - version: "1.0.2+1" digit_data_model: dependency: "direct main" description: name: digit_data_model - sha256: "560b806cbb9f760ed956ecf2d01a8e5ea5640d8fca9ec1332ee15b34998d2e15" + sha256: c3bc7299a7d927ebb83d8e91c1d7a8a51f6a1d1295dafeacb642012b72b99a2f url: "https://pub.dev" source: hosted - version: "1.0.3+3" + version: "1.0.5" digit_scanner: dependency: "direct main" description: name: digit_scanner - sha256: "9862c4885465bb1942e36dc9b42596c201648db9b0f5ffb8ad768e2409fc2742" + sha256: c33af61ed9ab3d7740fc3c8948af4b763d946cba5e902f8bfb00948d4d69d60a url: "https://pub.dev" source: hosted - version: "1.0.3+1" + version: "1.0.4" digit_showcase: dependency: "direct main" description: @@ -450,8 +426,16 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.0" + digit_ui_components: + dependency: "direct main" + description: + name: digit_ui_components + sha256: "57c4da5237be6025783e7357a02b6b492f02e38f711d674bf46f5f8c8a93ad76" + url: "https://pub.dev" + source: hosted + version: "0.0.2-dev.4" dio: - dependency: transitive + dependency: "direct main" description: name: dio sha256: "5598aa796bbf4699afd5c67c0f5f6e2ed542afc956884b9cd58c306966efc260" @@ -466,14 +450,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.1" + dotted_border: + dependency: transitive + description: + name: dotted_border + sha256: "108837e11848ca776c53b30bc870086f84b62ed6e01c503ed976e8f8c7df9c04" + url: "https://pub.dev" + source: hosted + version: "2.1.0" drift: dependency: "direct main" description: name: drift - sha256: b50a8342c6ddf05be53bda1d246404cbad101b64dc73e8d6d1ac1090d119b4e2 + sha256: "6acedc562ffeed308049f78fb1906abad3d65714580b6745441ee6d50ec564cd" url: "https://pub.dev" source: hosted - version: "2.15.0" + version: "2.18.0" drift_db_viewer: dependency: "direct main" description: @@ -486,18 +478,10 @@ packages: dependency: "direct dev" description: name: drift_dev - sha256: c037d9431b6f8dc633652b1469e5f53aaec6e4eb405ed29dd232fa888ef10d88 - url: "https://pub.dev" - source: hosted - version: "2.15.0" - easy_stepper: - dependency: transitive - description: - name: easy_stepper - sha256: "77f3ab4ee3c867b5a2236bf712abb08fed2b1c533cf24cf3fcd46c2821072ffd" + sha256: d9b020736ea85fff1568699ce18b89fabb3f0f042e8a7a05e84a3ec20d39acde url: "https://pub.dev" source: hosted - version: "0.5.2+1" + version: "2.18.0" fake_async: dependency: transitive description: @@ -522,6 +506,46 @@ packages: url: "https://pub.dev" source: hosted version: "6.1.4" + file_picker: + dependency: transitive + description: + name: file_picker + sha256: d1d0ac3966b36dc3e66eeefb40280c17feb87fa2099c6e22e6a1fc959327bd03 + url: "https://pub.dev" + source: hosted + version: "8.0.0+1" + file_selector_linux: + dependency: transitive + description: + name: file_selector_linux + sha256: "045d372bf19b02aeb69cacf8b4009555fb5f6f0b7ad8016e5f46dd1387ddd492" + url: "https://pub.dev" + source: hosted + version: "0.9.2+1" + file_selector_macos: + dependency: transitive + description: + name: file_selector_macos + sha256: f42eacb83b318e183b1ae24eead1373ab1334084404c8c16e0354f9a3e55d385 + url: "https://pub.dev" + source: hosted + version: "0.9.4" + file_selector_platform_interface: + dependency: transitive + description: + name: file_selector_platform_interface + sha256: a3994c26f10378a039faa11de174d7b78eb8f79e4dd0af2a451410c1a5c3f66b + url: "https://pub.dev" + source: hosted + version: "2.6.2" + file_selector_windows: + dependency: transitive + description: + name: file_selector_windows + sha256: "2ad726953f6e8affbc4df8dc78b77c3b4a060967a291e528ef72ae846c60fb69" + url: "https://pub.dev" + source: hosted + version: "0.9.3+2" fixnum: dependency: transitive description: @@ -543,14 +567,30 @@ packages: url: "https://pub.dev" source: hosted version: "8.1.6" - flutter_focus_watcher: + flutter_dropzone: dependency: transitive description: - name: flutter_focus_watcher - sha256: a72ee539ae0237961308a25839887ca93a0b1cb6f87b0d492b139c8fccff8e79 + name: flutter_dropzone + sha256: b399c60411f9bf9c4c2f97933c6a3a185859e75aade8897831e76cee4346c8e1 url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "3.0.7" + flutter_dropzone_platform_interface: + dependency: transitive + description: + name: flutter_dropzone_platform_interface + sha256: "96d2c51c86063ba150551c3b40fd26c5a18785bee071c0c751502d28a545df3b" + url: "https://pub.dev" + source: hosted + version: "2.2.0" + flutter_dropzone_web: + dependency: transitive + description: + name: flutter_dropzone_web + sha256: c5a0fdb63b7216352a01761ec1b6eba1982e49541e60675735e2d3d95e207b19 + url: "https://pub.dev" + source: hosted + version: "3.0.13" flutter_keyboard_visibility: dependency: "direct main" description: @@ -603,10 +643,15 @@ packages: dependency: "direct dev" description: name: flutter_lints - sha256: "9e8c3858111da373efc5aa341de011d9bd23e2c5c5e0c62bccf32438e192d7b1" + sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c" url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "4.0.0" + flutter_localizations: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" flutter_plugin_android_lifecycle: dependency: transitive description: @@ -623,27 +668,27 @@ packages: url: "https://pub.dev" source: hosted version: "5.2.1" + flutter_styled_toast: + dependency: transitive + description: + name: flutter_styled_toast + sha256: e667f13a665820eb0fa8506547e47eacbcddf1948d6d3036cfd3b089bd4b0516 + url: "https://pub.dev" + source: hosted + version: "2.2.1" flutter_svg: dependency: "direct main" description: name: flutter_svg - sha256: d39e7f95621fc84376bc0f7d504f05c3a41488c562f4a8ad410569127507402c + sha256: "7b4ca6cf3304575fe9c8ec64813c8d02ee41d2afe60bcfe0678bcb5375d596a2" url: "https://pub.dev" source: hosted - version: "2.0.9" + version: "2.0.10+1" flutter_test: dependency: "direct dev" description: flutter source: sdk version: "0.0.0" - flutter_typeahead: - dependency: transitive - description: - name: flutter_typeahead - sha256: b9942bd5b7611a6ec3f0730c477146cffa4cd4b051077983ba67ddfc9e7ee818 - url: "https://pub.dev" - source: hosted - version: "4.8.0" flutter_web_plugins: dependency: transitive description: flutter @@ -653,10 +698,10 @@ packages: dependency: "direct main" description: name: fluttertoast - sha256: "81b68579e23fcbcada2db3d50302813d2371664afe6165bc78148050ab94bf66" + sha256: "95f349437aeebe524ef7d6c9bde3e6b4772717cf46a0eb6a3ceaddc740b297cc" url: "https://pub.dev" source: hosted - version: "8.2.5" + version: "8.2.8" formula_parser: dependency: "direct main" description: @@ -689,6 +734,54 @@ packages: url: "https://pub.dev" source: hosted version: "3.2.0" + geolocator: + dependency: transitive + description: + name: geolocator + sha256: f4efb8d3c4cdcad2e226af9661eb1a0dd38c71a9494b22526f9da80ab79520e5 + url: "https://pub.dev" + source: hosted + version: "10.1.1" + geolocator_android: + dependency: transitive + description: + name: geolocator_android + sha256: "7aefc530db47d90d0580b552df3242440a10fe60814496a979aa67aa98b1fd47" + url: "https://pub.dev" + source: hosted + version: "4.6.1" + geolocator_apple: + dependency: transitive + description: + name: geolocator_apple + sha256: "6154ea2682563f69fc0125762ed7e91e7ed85d0b9776595653be33918e064807" + url: "https://pub.dev" + source: hosted + version: "2.3.8+1" + geolocator_platform_interface: + dependency: transitive + description: + name: geolocator_platform_interface + sha256: "386ce3d9cce47838355000070b1d0b13efb5bc430f8ecda7e9238c8409ace012" + url: "https://pub.dev" + source: hosted + version: "4.2.4" + geolocator_web: + dependency: transitive + description: + name: geolocator_web + sha256: "102e7da05b48ca6bf0a5bda0010f886b171d1a08059f01bfe02addd0175ebece" + url: "https://pub.dev" + source: hosted + version: "2.2.1" + geolocator_windows: + dependency: transitive + description: + name: geolocator_windows + sha256: "53da08937d07c24b0d9952eb57a3b474e29aae2abf9dd717f7e1230995f13f0e" + url: "https://pub.dev" + source: hosted + version: "0.2.3" glob: dependency: transitive description: @@ -701,26 +794,26 @@ packages: dependency: transitive description: name: google_fonts - sha256: "6b6f10f0ce3c42f6552d1c70d2c28d764cf22bb487f50f66cca31dcd5194f4d6" + sha256: b1ac0fe2832c9cc95e5e88b57d627c5e68c223b9657f4b96e1487aa9098c7b82 url: "https://pub.dev" source: hosted - version: "4.0.4" + version: "6.2.1" google_mlkit_barcode_scanning: dependency: transitive description: name: google_mlkit_barcode_scanning - sha256: "965183a8cd5cef8477ceea5dbdf29c34a739cf0cfbf1bdad54cd3f9f1807afe5" + sha256: f1a2a39cf1730b9a5e2784a07efa1ca5bfdfdde6aa00b193b3f8cd1953c638ec url: "https://pub.dev" source: hosted - version: "0.10.0" + version: "0.12.0" google_mlkit_commons: dependency: transitive description: name: google_mlkit_commons - sha256: "046586b381cdd139f7f6a05ad6998f7e339d061bd70158249907358394b5f496" + sha256: "27d626c66a181351a953eba5b6ff1ff123aadb891b4dab085b292118f039d6ac" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.1" graphs: dependency: transitive description: @@ -729,6 +822,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.3.1" + group_radio_button: + dependency: transitive + description: + name: group_radio_button + sha256: "204de8d16b224be7fc72dade0c3afd410ff5a34417d89f74f0fd8be7a8c2b4d6" + url: "https://pub.dev" + source: hosted + version: "1.3.0" gs1_barcode_parser: dependency: "direct main" description: @@ -757,10 +858,10 @@ packages: dependency: transitive description: name: http - sha256: "5895291c13fa8a3bd82e76d5627f69e0d85ca6a30dcac95c4ea19a5d555879c2" + sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 url: "https://pub.dev" source: hosted - version: "0.13.6" + version: "1.2.2" http_multi_server: dependency: transitive description: @@ -777,14 +878,78 @@ packages: url: "https://pub.dev" source: hosted version: "4.0.2" + image_picker: + dependency: transitive + description: + name: image_picker + sha256: "1f498d086203360cca099d20ffea2963f48c39ce91bdd8a3b6d4a045786b02c8" + url: "https://pub.dev" + source: hosted + version: "1.0.8" + image_picker_android: + dependency: transitive + description: + name: image_picker_android + sha256: "844c6da4e4f2829dffdab97816bca09d0e0977e8dcef7450864aba4e07967a58" + url: "https://pub.dev" + source: hosted + version: "0.8.9+6" + image_picker_for_web: + dependency: transitive + description: + name: image_picker_for_web + sha256: e2423c53a68b579a7c37a1eda967b8ae536c3d98518e5db95ca1fe5719a730a3 + url: "https://pub.dev" + source: hosted + version: "3.0.2" + image_picker_ios: + dependency: transitive + description: + name: image_picker_ios + sha256: fadafce49e8569257a0cad56d24438a6fa1f0cbd7ee0af9b631f7492818a4ca3 + url: "https://pub.dev" + source: hosted + version: "0.8.9+1" + image_picker_linux: + dependency: transitive + description: + name: image_picker_linux + sha256: "4ed1d9bb36f7cd60aa6e6cd479779cc56a4cb4e4de8f49d487b1aaad831300fa" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + image_picker_macos: + dependency: transitive + description: + name: image_picker_macos + sha256: "3f5ad1e8112a9a6111c46d0b57a7be2286a9a07fc6e1976fdf5be2bd31d4ff62" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + image_picker_platform_interface: + dependency: transitive + description: + name: image_picker_platform_interface + sha256: fa4e815e6fcada50e35718727d83ba1c92f1edf95c0b4436554cec301b56233b + url: "https://pub.dev" + source: hosted + version: "2.9.3" + image_picker_windows: + dependency: transitive + description: + name: image_picker_windows + sha256: "6ad07afc4eb1bc25f3a01084d28520496c4a3bb0cb13685435838167c9dcedeb" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" intl: dependency: "direct main" description: name: intl - sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" + sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf url: "https://pub.dev" source: hosted - version: "0.18.1" + version: "0.19.0" io: dependency: transitive description: @@ -833,38 +998,62 @@ packages: url: "https://pub.dev" source: hosted version: "6.8.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + url: "https://pub.dev" + source: hosted + version: "10.0.4" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + url: "https://pub.dev" + source: hosted + version: "3.0.3" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" lints: dependency: transitive description: name: lints - sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290 + sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235" url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "4.0.0" location: - dependency: transitive + dependency: "direct main" description: name: location - sha256: "06be54f682c9073cbfec3899eb9bc8ed90faa0e17735c9d9fa7fe426f5be1dd1" + sha256: "37ffdadcd4b1498b769824f45ebb4de8ed46663a4a67ac27b33a590ee486579f" url: "https://pub.dev" source: hosted - version: "5.0.3" + version: "6.0.2" location_platform_interface: dependency: transitive description: name: location_platform_interface - sha256: "8aa1d34eeecc979d7c9fe372931d84f6d2ebbd52226a54fe1620de6fdc0753b1" + sha256: "2ecde6bb0f88032b0bbbde37e18975b4468711dd92619c2235cc0c0ee93b4b8e" url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "4.0.0" location_web: dependency: transitive description: name: location_web - sha256: ec484c66e8a4ff1ee5d044c203f4b6b71e3a0556a97b739a5bc9616de672412b + sha256: "49dda13d415c4603c5775a33fb22f575e0aa3f0ec2916644ddcd722db31ee884" url: "https://pub.dev" source: hosted - version: "4.2.0" + version: "5.0.2" logging: dependency: transitive description: @@ -877,34 +1066,34 @@ packages: dependency: transitive description: name: lottie - sha256: a93542cc2d60a7057255405f62252533f8e8956e7e06754955669fd32fb4b216 + sha256: "7afc60865a2429d994144f7d66ced2ae4305fe35d82890b8766e3359872d872c" url: "https://pub.dev" source: hosted - version: "2.7.0" + version: "3.1.3" matcher: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.12.0" mime: dependency: transitive description: @@ -957,26 +1146,34 @@ packages: dependency: "direct main" description: name: package_info_plus - sha256: "88bc797f44a94814f2213db1c9bd5badebafdfb8290ca9f78d4b9ee2a3db4d79" + sha256: a75164ade98cb7d24cfd0a13c6408927c6b217fa60dee5a7ff5c116a58f28918 url: "https://pub.dev" source: hosted - version: "5.0.1" + version: "8.0.2" package_info_plus_platform_interface: dependency: transitive description: name: package_info_plus_platform_interface - sha256: "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6" + sha256: ac1f4a4847f1ade8e6a87d1f39f5d7c67490738642e2542f559ec38c37489a66 url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.1" path: dependency: "direct main" description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.9.0" + path_drawing: + dependency: transitive + description: + name: path_drawing + sha256: bbb1934c0cbb03091af082a6389ca2080345291ef07a5fa6d6e078ba8682f977 + url: "https://pub.dev" + source: hosted + version: "1.0.1" path_parsing: dependency: transitive description: @@ -1061,18 +1258,10 @@ packages: dependency: "direct main" description: name: pluto_grid - sha256: e77c34a33dd9d74abbe20ba1df96474dded150dd042c7f7495be1bc2c26bd37f + sha256: "1d4cd9d2652742b556aa9b3230cc64672a3f63c34a9acc80fef794ab36ad903b" url: "https://pub.dev" source: hosted - version: "7.0.2" - pointer_interceptor: - dependency: transitive - description: - name: pointer_interceptor - sha256: adf7a637f97c077041d36801b43be08559fd4322d2127b3f20bb7be1b9eebc22 - url: "https://pub.dev" - source: hosted - version: "0.9.3+7" + version: "8.0.0" pool: dependency: transitive description: @@ -1081,14 +1270,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.5.1" - process: - dependency: transitive - description: - name: process - sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09" - url: "https://pub.dev" - source: hosted - version: "4.2.4" provider: dependency: transitive description: @@ -1105,14 +1286,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" - pub_updater: - dependency: transitive - description: - name: pub_updater - sha256: "05ae70703e06f7fdeb05f7f02dd680b8aad810e87c756a618f33e1794635115c" - url: "https://pub.dev" - source: hosted - version: "0.3.0" pubspec_parse: dependency: transitive description: @@ -1121,22 +1294,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.0" - reactive_flutter_typeahead: - dependency: transitive - description: - name: reactive_flutter_typeahead - sha256: ef91627df8cef70e603e8a6458749d8a99a385b78854332602fd08ad905cdab8 - url: "https://pub.dev" - source: hosted - version: "0.8.1" reactive_forms: dependency: "direct main" description: name: reactive_forms - sha256: "5aa9c48a0626c20d00a005e597cb10efbdebbfeecb9c4227b03a5945fbb91ec4" + sha256: "9b1fb18e0aae9c50cfa0aaabaaa38bc4d78eefc9b7b95fa9c947b051f6524b8e" url: "https://pub.dev" source: hosted - version: "14.3.0" + version: "17.0.1" recase: dependency: "direct main" description: @@ -1145,14 +1310,6 @@ packages: url: "https://pub.dev" source: hosted version: "4.1.0" - remove_emoji_input_formatter: - dependency: transitive - description: - name: remove_emoji_input_formatter - sha256: "82d195984f890de7a8fea936c698848e78c1a67ccefe18db3baf9f7a3bc0177f" - url: "https://pub.dev" - source: hosted - version: "0.0.1+1" rxdart: dependency: transitive description: @@ -1238,6 +1395,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.10.0" + sprintf: + dependency: transitive + description: + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" + url: "https://pub.dev" + source: hosted + version: "7.0.0" sqlite3: dependency: transitive description: @@ -1258,10 +1423,10 @@ packages: dependency: transitive description: name: sqlparser - sha256: "7b20045d1ccfb7bc1df7e8f9fee5ae58673fce6ff62cefbb0e0fd7214e90e5a0" + sha256: ade9a67fd70d0369329ed3373208de7ebd8662470e8c396fc8d0d60f9acdfc9f url: "https://pub.dev" source: hosted - version: "0.34.1" + version: "0.36.0" stack_trace: dependency: transitive description: @@ -1294,6 +1459,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.0" + survey_form: + dependency: "direct main" + description: + name: survey_form + sha256: "5e3a08570fe8c97d7dfd0bc6f28b2ae829e2fe66ce987504920c20d091c47c19" + url: "https://pub.dev" + source: hosted + version: "1.0.0" synchronized: dependency: transitive description: @@ -1314,26 +1487,26 @@ packages: dependency: transitive description: name: test - sha256: a1f7595805820fcc05e5c52e3a231aedd0b72972cb333e8c738a8b1239448b6f + sha256: "7ee446762c2c50b3bd4ea96fe13ffac69919352bd3b4b17bac3f3465edc58073" url: "https://pub.dev" source: hosted - version: "1.24.9" + version: "1.25.2" test_api: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.0" test_core: dependency: transitive description: name: test_core - sha256: a757b14fc47507060a162cc2530d9a4a2f92f5100a952c7443b5cad5ef5b106a + sha256: "2bc4b4ecddd75309300d8096f781c0e3280ca1ef85beda558d33fcbedc2eead4" url: "https://pub.dev" source: hosted - version: "0.5.9" + version: "0.6.0" timing: dependency: transitive description: @@ -1358,38 +1531,118 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.2" + universal_html: + dependency: transitive + description: + name: universal_html + sha256: "56536254004e24d9d8cfdb7dbbf09b74cf8df96729f38a2f5c238163e3d58971" + url: "https://pub.dev" + source: hosted + version: "2.2.4" + universal_io: + dependency: transitive + description: + name: universal_io + sha256: "1722b2dcc462b4b2f3ee7d188dad008b6eb4c40bbd03a3de451d82c78bba9aad" + url: "https://pub.dev" + source: hosted + version: "2.2.2" + url_launcher: + dependency: transitive + description: + name: url_launcher + sha256: "21b704ce5fa560ea9f3b525b43601c678728ba46725bab9b01187b4831377ed3" + url: "https://pub.dev" + source: hosted + version: "6.3.0" + url_launcher_android: + dependency: transitive + description: + name: url_launcher_android + sha256: "17cd5e205ea615e2c6ea7a77323a11712dffa0720a8a90540db57a01347f9ad9" + url: "https://pub.dev" + source: hosted + version: "6.3.2" + url_launcher_ios: + dependency: transitive + description: + name: url_launcher_ios + sha256: "75bb6fe3f60070407704282a2d295630cab232991eb52542b18347a8a941df03" + url: "https://pub.dev" + source: hosted + version: "6.2.4" + url_launcher_linux: + dependency: transitive + description: + name: url_launcher_linux + sha256: ab360eb661f8879369acac07b6bb3ff09d9471155357da8443fd5d3cf7363811 + url: "https://pub.dev" + source: hosted + version: "3.1.1" + url_launcher_macos: + dependency: transitive + description: + name: url_launcher_macos + sha256: "9a1a42d5d2d95400c795b2914c36fdcb525870c752569438e4ebb09a2b5d90de" + url: "https://pub.dev" + source: hosted + version: "3.2.0" + url_launcher_platform_interface: + dependency: transitive + description: + name: url_launcher_platform_interface + sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + url_launcher_web: + dependency: transitive + description: + name: url_launcher_web + sha256: "772638d3b34c779ede05ba3d38af34657a05ac55b06279ea6edd409e323dca8e" + url: "https://pub.dev" + source: hosted + version: "2.3.3" + url_launcher_windows: + dependency: transitive + description: + name: url_launcher_windows + sha256: "49c10f879746271804767cb45551ec5592cdab00ee105c06dddde1a98f73b185" + url: "https://pub.dev" + source: hosted + version: "3.1.2" uuid: dependency: "direct main" description: name: uuid - sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" + sha256: a5be9ef6618a7ac1e964353ef476418026db906c4facdedaa299b7a2e71690ff url: "https://pub.dev" source: hosted - version: "3.0.7" + version: "4.5.1" vector_graphics: dependency: transitive description: name: vector_graphics - sha256: "4ac59808bbfca6da38c99f415ff2d3a5d7ca0a6b4809c71d9cf30fba5daf9752" + sha256: "32c3c684e02f9bc0afb0ae0aa653337a2fe022e8ab064bcd7ffda27a74e288e3" url: "https://pub.dev" source: hosted - version: "1.1.10+1" + version: "1.1.11+1" vector_graphics_codec: dependency: transitive description: name: vector_graphics_codec - sha256: f3247e7ab0ec77dc759263e68394990edc608fb2b480b80db8aa86ed09279e33 + sha256: c86987475f162fadff579e7320c7ddda04cd2fdeffbe1129227a85d9ac9e03da url: "https://pub.dev" source: hosted - version: "1.1.10+1" + version: "1.1.11+1" vector_graphics_compiler: dependency: transitive description: name: vector_graphics_compiler - sha256: "18489bdd8850de3dd7ca8a34e0c446f719ec63e2bab2e7a8cc66a9028dd76c5a" + sha256: "12faff3f73b1741a36ca7e31b292ddeb629af819ca9efe9953b70bd63fc8cd81" url: "https://pub.dev" source: hosted - version: "1.1.10+1" + version: "1.1.11+1" vector_math: dependency: transitive description: @@ -1398,14 +1651,22 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" + visibility_detector: + dependency: transitive + description: + name: visibility_detector + sha256: dd5cc11e13494f432d15939c3aa8ae76844c42b723398643ce9addb88a5ed420 + url: "https://pub.dev" + source: hosted + version: "0.4.0+2" vm_service: dependency: transitive description: name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" url: "https://pub.dev" source: hosted - version: "13.0.0" + version: "14.2.1" watcher: dependency: transitive description: @@ -1418,10 +1679,10 @@ packages: dependency: transitive description: name: web - sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "0.5.1" web_socket_channel: dependency: transitive description: @@ -1471,5 +1732,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.2.0 <3.9.0" - flutter: ">=3.16.0" + dart: ">=3.4.0 <3.9.0" + flutter: ">=3.22.0" diff --git a/packages/registration_delivery/pubspec.yaml b/packages/registration_delivery/pubspec.yaml index ae206f227..e69849bfa 100644 --- a/packages/registration_delivery/pubspec.yaml +++ b/packages/registration_delivery/pubspec.yaml @@ -1,6 +1,6 @@ name: registration_delivery description: This package enables health facility workers to register a household and individual members and deliver the resources. -version: 1.0.3+3 +version: 1.0.5+2 homepage: https://github.com/egovernments/health-campaign-field-worker-app/tree/master/packages/registration_delivery repository: https://github.com/egovernments/health-campaign-field-worker-app @@ -11,52 +11,54 @@ environment: dependencies: flutter: sdk: flutter - digit_components: ^1.0.2+1 - flutter_bloc: ^8.1.1 - freezed_annotation: ^2.1.0 - build_runner: ^2.2.1 - reactive_forms: ^14.1.0 + digit_ui_components: ^0.0.2-dev.4 + flutter_bloc: ^8.1.5 + freezed_annotation: ^2.4.1 + reactive_forms: ^17.0.0 + intl: ^0.19.0 + flutter_svg: ^2.0.10+1 + dart_mappable: ^4.2.2 + drift: ^2.18.0 + auto_route: ^8.1.3 + digit_data_model: ^1.0.5 + collection: ^1.18.0 + dio: ^5.4.3+1 + location: ^6.0.2 + gs1_barcode_parser: ^1.0.5 + uuid: ^4.4.0 + recase: ^4.1.0 + pluto_grid: ^8.0.0 + digit_scanner: ^1.0.4 fluttertoast: ^8.1.2 overlay_builder: ^1.1.0 - intl: ^0.18.0 - flutter_svg: ^2.0.8 - dart_mappable: ^4.2.0 - drift: ^2.0.0 sqlite3_flutter_libs: ^0.5.10 path_provider: ^2.0.11 - path: ^1.8.2 + path: ^1.9.0 drift_db_viewer: ^2.0.0 - uuid: ^3.0.6 - recase: ^4.1.0 - pluto_grid: ^7.0.1 - digit_scanner: ^1.0.3+1 - gs1_barcode_parser: ^1.0.5 - auto_route: ^7.8.4 - digit_data_model: ^1.0.3+3 - package_info_plus: ^5.0.1 + package_info_plus: ^8.0.0 digit_showcase: ^1.0.0 - collection: ^1.16.0 - flutter_keyboard_visibility: ^5.4.0 stream_transform: ^2.1.0 async: ^2.11.0 formula_parser: ^2.0.1 + flutter_keyboard_visibility: ^5.4.1 + survey_form: ^1.0.0 dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^3.0.1 - dart_code_metrics: ^5.7.6 + flutter_lints: ^4.0.0 freezed: ^2.1.0+1 json_serializable: ^6.4.0 drift_dev: ^2.14.1 bloc_test: ^9.1.0 mocktail: ^1.0.2 + build_runner: ^2.4.11 dart_mappable_builder: git: url: https://github.com/egovernments/health-campaign-field-worker-app/ - ref: master + ref: 1.6-final-dev path: ./packages/dart_mappable_builder - auto_route_generator: ^7.3.2 + auto_route_generator: ^8.0.0 flutter: assets: diff --git a/packages/survey_form/.gitignore b/packages/survey_form/.gitignore new file mode 100644 index 000000000..a68ac422a --- /dev/null +++ b/packages/survey_form/.gitignore @@ -0,0 +1,28 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. +**/doc/api/ +.dart_tool/ +build/ diff --git a/packages/survey_form/.metadata b/packages/survey_form/.metadata new file mode 100644 index 000000000..88ae5644c --- /dev/null +++ b/packages/survey_form/.metadata @@ -0,0 +1,10 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "b0850beeb25f6d5b10426284f506557f66181b36" + channel: "stable" + +project_type: package diff --git a/packages/survey_form/CHANGELOG.md b/packages/survey_form/CHANGELOG.md new file mode 100644 index 000000000..2b8b823e2 --- /dev/null +++ b/packages/survey_form/CHANGELOG.md @@ -0,0 +1,14 @@ +## 1.0.0 + +* Upgrade to Flutter 3.22 +* Updated digit_data_model to latest version + +## 0.0.1-dev.2 + +* Migrated to digit_ui_components +* Updated digit_data_model to latest version + +## 0.0.1-dev.1 + +* Removed survey_form models, blocs and repositories from digit_data_model +* Added imports for survey_form package in registration_delivery and referral_reconciliation diff --git a/packages/survey_form/LICENSE b/packages/survey_form/LICENSE new file mode 100644 index 000000000..f7d7ac958 --- /dev/null +++ b/packages/survey_form/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 eGovernments Foundation + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/packages/survey_form/README.md b/packages/survey_form/README.md new file mode 100644 index 000000000..80275d629 --- /dev/null +++ b/packages/survey_form/README.md @@ -0,0 +1,52 @@ +# survey_form Package + +The `survey_form` package is a comprehensive solution for creating survey forms. + +## Features + +- **Survey form Pages**: The package includes several pages like `survey_form.dart`, `survey_form_boundary_view.dart`, and `survey_form_view.dart` that provide the user interface for creating survey forms. + + + + + + +- **SurveyForm Blocs**: It provides various BLoCs for state management using the BLoC pattern. These BLoCs handle the business logic for the SurveyForm. +- **SurveyForm Models**: It defines various data models like `ServiceModel`, `ServiceDefinitionModel`, etc. used in the SurveyForm creation process. +- **SurveyForm Repositories**: The package provides abstract classes for data repositories, `ServiceDefinitionLocalRepository`, `ServiceLocalRepository`, `ServiceDefinitionRemoteRepository`, and `ServiceRemoteRepository` which can be extended to create repositories for different Service models. It also includes error handling with `InvalidApiResponseException`. + +## Getting Started + +To use this package, add the following dependency to your `pubspec.yaml` file: + +```yaml +dependencies: + survey_form: ^any +``` + +## Usage + +To Navigate to any screens of the package: + +First add survey_form_router to your main app router + +Navigate to the required screen using the below code: + +```dart +context.router.push(SurveyFormWrapperRoute()); +``` + +SurveyForm package requires below data to be passed from main app: + +```dart + String _projectId = ''; + String _projectName=''; + String _loggedInIndividualId = ''; + String _loggedInUserUuid = ''; + String _appVersion = ''; + String _tenantId = ''; + Object _roles; + bool _isHealthFacilityWorker; + BoundaryModel? _boundaryModel; + PersistenceConfiguration _persistenceConfiguration; +``` \ No newline at end of file diff --git a/packages/survey_form/analysis_options.yaml b/packages/survey_form/analysis_options.yaml new file mode 100644 index 000000000..a5744c1cf --- /dev/null +++ b/packages/survey_form/analysis_options.yaml @@ -0,0 +1,4 @@ +include: package:flutter_lints/flutter.yaml + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/packages/survey_form/example/.gitignore b/packages/survey_form/example/.gitignore new file mode 100644 index 000000000..29a3a5017 --- /dev/null +++ b/packages/survey_form/example/.gitignore @@ -0,0 +1,43 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.pub-cache/ +.pub/ +/build/ + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release diff --git a/packages/survey_form/example/.metadata b/packages/survey_form/example/.metadata new file mode 100644 index 000000000..d22992edb --- /dev/null +++ b/packages/survey_form/example/.metadata @@ -0,0 +1,45 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "db7ef5bf9f59442b0e200a90587e8fa5e0c6336a" + channel: "stable" + +project_type: app + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a + base_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a + - platform: android + create_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a + base_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a + - platform: ios + create_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a + base_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a + - platform: linux + create_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a + base_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a + - platform: macos + create_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a + base_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a + - platform: web + create_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a + base_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a + - platform: windows + create_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a + base_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/packages/survey_form/example/README.md b/packages/survey_form/example/README.md new file mode 100644 index 000000000..2b3fce4c8 --- /dev/null +++ b/packages/survey_form/example/README.md @@ -0,0 +1,16 @@ +# example + +A new Flutter project. + +## Getting Started + +This project is a starting point for a Flutter application. + +A few resources to get you started if this is your first Flutter project: + +- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) +- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) + +For help getting started with Flutter development, view the +[online documentation](https://docs.flutter.dev/), which offers tutorials, +samples, guidance on mobile development, and a full API reference. diff --git a/packages/survey_form/example/analysis_options.yaml b/packages/survey_form/example/analysis_options.yaml new file mode 100644 index 000000000..0d2902135 --- /dev/null +++ b/packages/survey_form/example/analysis_options.yaml @@ -0,0 +1,28 @@ +# This file configures the analyzer, which statically analyzes Dart code to +# check for errors, warnings, and lints. +# +# The issues identified by the analyzer are surfaced in the UI of Dart-enabled +# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be +# invoked from the command line by running `flutter analyze`. + +# The following line activates a set of recommended lints for Flutter apps, +# packages, and plugins designed to encourage good coding practices. +include: package:flutter_lints/flutter.yaml + +linter: + # The lint rules applied to this project can be customized in the + # section below to disable rules from the `package:flutter_lints/flutter.yaml` + # included above or to enable additional rules. A list of all available lints + # and their documentation is published at https://dart.dev/lints. + # + # Instead of disabling a lint rule for the entire project in the + # section below, it can also be suppressed for a single line of code + # or a specific dart file by using the `// ignore: name_of_lint` and + # `// ignore_for_file: name_of_lint` syntax on the line or in the file + # producing the lint. + rules: + # avoid_print: false # Uncomment to disable the `avoid_print` rule + # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/packages/survey_form/example/android/.gitignore b/packages/survey_form/example/android/.gitignore new file mode 100644 index 000000000..6f568019d --- /dev/null +++ b/packages/survey_form/example/android/.gitignore @@ -0,0 +1,13 @@ +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat +/local.properties +GeneratedPluginRegistrant.java + +# Remember to never publicly share your keystore. +# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +key.properties +**/*.keystore +**/*.jks diff --git a/packages/survey_form/example/android/app/build.gradle b/packages/survey_form/example/android/app/build.gradle new file mode 100644 index 000000000..118ee1d92 --- /dev/null +++ b/packages/survey_form/example/android/app/build.gradle @@ -0,0 +1,67 @@ +plugins { + id "com.android.application" + id "kotlin-android" + id "dev.flutter.flutter-gradle-plugin" +} + +def localProperties = new Properties() +def localPropertiesFile = rootProject.file('local.properties') +if (localPropertiesFile.exists()) { + localPropertiesFile.withReader('UTF-8') { reader -> + localProperties.load(reader) + } +} + +def flutterVersionCode = localProperties.getProperty('flutter.versionCode') +if (flutterVersionCode == null) { + flutterVersionCode = '1' +} + +def flutterVersionName = localProperties.getProperty('flutter.versionName') +if (flutterVersionName == null) { + flutterVersionName = '1.0' +} + +android { + namespace "com.example.example" + compileSdkVersion flutter.compileSdkVersion + ndkVersion flutter.ndkVersion + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + kotlinOptions { + jvmTarget = '1.8' + } + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId "com.example.example" + // You can update the following values to match your application needs. + // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. + minSdkVersion flutter.minSdkVersion + targetSdkVersion flutter.targetSdkVersion + versionCode flutterVersionCode.toInteger() + versionName flutterVersionName + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig signingConfigs.debug + } + } +} + +flutter { + source '../..' +} + +dependencies {} diff --git a/packages/survey_form/example/android/app/src/debug/AndroidManifest.xml b/packages/survey_form/example/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 000000000..399f6981d --- /dev/null +++ b/packages/survey_form/example/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/packages/survey_form/example/android/app/src/main/AndroidManifest.xml b/packages/survey_form/example/android/app/src/main/AndroidManifest.xml new file mode 100644 index 000000000..19b862ec8 --- /dev/null +++ b/packages/survey_form/example/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + diff --git a/packages/survey_form/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt b/packages/survey_form/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt new file mode 100644 index 000000000..e793a000d --- /dev/null +++ b/packages/survey_form/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt @@ -0,0 +1,6 @@ +package com.example.example + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() { +} diff --git a/packages/survey_form/example/android/app/src/main/res/drawable-v21/launch_background.xml b/packages/survey_form/example/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 000000000..f74085f3f --- /dev/null +++ b/packages/survey_form/example/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/packages/survey_form/example/android/app/src/main/res/drawable/launch_background.xml b/packages/survey_form/example/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 000000000..304732f88 --- /dev/null +++ b/packages/survey_form/example/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/packages/survey_form/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/packages/survey_form/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..7eb65cb8d Binary files /dev/null and b/packages/survey_form/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/packages/survey_form/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/packages/survey_form/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..7021b6ace Binary files /dev/null and b/packages/survey_form/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/packages/survey_form/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/packages/survey_form/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..f55918dc1 Binary files /dev/null and b/packages/survey_form/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/packages/survey_form/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/packages/survey_form/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..910eafa1d Binary files /dev/null and b/packages/survey_form/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/packages/survey_form/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/packages/survey_form/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..67b1e5f25 Binary files /dev/null and b/packages/survey_form/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/packages/survey_form/example/android/app/src/main/res/values-night/styles.xml b/packages/survey_form/example/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 000000000..06952be74 --- /dev/null +++ b/packages/survey_form/example/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/packages/survey_form/example/android/app/src/main/res/values/styles.xml b/packages/survey_form/example/android/app/src/main/res/values/styles.xml new file mode 100644 index 000000000..cb1ef8805 --- /dev/null +++ b/packages/survey_form/example/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/packages/survey_form/example/android/app/src/profile/AndroidManifest.xml b/packages/survey_form/example/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 000000000..399f6981d --- /dev/null +++ b/packages/survey_form/example/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/packages/survey_form/example/android/build.gradle b/packages/survey_form/example/android/build.gradle new file mode 100644 index 000000000..6c103613c --- /dev/null +++ b/packages/survey_form/example/android/build.gradle @@ -0,0 +1,30 @@ +buildscript { + ext.kotlin_version = '1.8.22' + repositories { + google() + mavenCentral() + } + + dependencies { + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + } +} + +allprojects { + repositories { + google() + mavenCentral() + } +} + +rootProject.buildDir = '../build' +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" +} +subprojects { + project.evaluationDependsOn(':app') +} + +tasks.register("clean", Delete) { + delete rootProject.buildDir +} diff --git a/packages/survey_form/example/android/settings.gradle b/packages/survey_form/example/android/settings.gradle new file mode 100644 index 000000000..7cd712855 --- /dev/null +++ b/packages/survey_form/example/android/settings.gradle @@ -0,0 +1,29 @@ +pluginManagement { + def flutterSdkPath = { + def properties = new Properties() + file("local.properties").withInputStream { properties.load(it) } + def flutterSdkPath = properties.getProperty("flutter.sdk") + assert flutterSdkPath != null, "flutter.sdk not set in local.properties" + return flutterSdkPath + } + settings.ext.flutterSdkPath = flutterSdkPath() + + includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle") + + repositories { + google() + mavenCentral() + gradlePluginPortal() + } + + plugins { + id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false + } +} + +plugins { + id "dev.flutter.flutter-plugin-loader" version "1.0.0" + id "com.android.application" version "7.3.0" apply false +} + +include ":app" diff --git a/packages/survey_form/example/ios/.gitignore b/packages/survey_form/example/ios/.gitignore new file mode 100644 index 000000000..7a7f9873a --- /dev/null +++ b/packages/survey_form/example/ios/.gitignore @@ -0,0 +1,34 @@ +**/dgph +*.mode1v3 +*.mode2v3 +*.moved-aside +*.pbxuser +*.perspectivev3 +**/*sync/ +.sconsign.dblite +.tags* +**/.vagrant/ +**/DerivedData/ +Icon? +**/Pods/ +**/.symlinks/ +profile +xcuserdata +**/.generated/ +Flutter/App.framework +Flutter/Flutter.framework +Flutter/Flutter.podspec +Flutter/Generated.xcconfig +Flutter/ephemeral/ +Flutter/app.flx +Flutter/app.zip +Flutter/flutter_assets/ +Flutter/flutter_export_environment.sh +ServiceDefinitions.json +Runner/GeneratedPluginRegistrant.* + +# Exceptions to above rules. +!default.mode1v3 +!default.mode2v3 +!default.pbxuser +!default.perspectivev3 diff --git a/packages/survey_form/example/ios/Flutter/AppFrameworkInfo.plist b/packages/survey_form/example/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 000000000..9625e105d --- /dev/null +++ b/packages/survey_form/example/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 11.0 + + diff --git a/packages/survey_form/example/ios/Flutter/Debug.xcconfig b/packages/survey_form/example/ios/Flutter/Debug.xcconfig new file mode 100644 index 000000000..592ceee85 --- /dev/null +++ b/packages/survey_form/example/ios/Flutter/Debug.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/packages/survey_form/example/ios/Flutter/Release.xcconfig b/packages/survey_form/example/ios/Flutter/Release.xcconfig new file mode 100644 index 000000000..592ceee85 --- /dev/null +++ b/packages/survey_form/example/ios/Flutter/Release.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/packages/survey_form/example/ios/Podfile b/packages/survey_form/example/ios/Podfile new file mode 100644 index 000000000..fdcc671eb --- /dev/null +++ b/packages/survey_form/example/ios/Podfile @@ -0,0 +1,44 @@ +# Uncomment this line to define a global platform for your project +# platform :ios, '11.0' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_ios_podfile_setup + +target 'Runner' do + use_frameworks! + use_modular_headers! + + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) + target 'RunnerTests' do + inherit! :search_paths + end +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_ios_build_settings(target) + end +end diff --git a/packages/survey_form/example/ios/Runner.xcodeproj/project.pbxproj b/packages/survey_form/example/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 000000000..75c0e507d --- /dev/null +++ b/packages/survey_form/example/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,614 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXBuildFile section */ + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 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 */; }; + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 97C146E61CF9000F007C117D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 97C146ED1CF9000F007C117D; + remoteInfo = Runner; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* 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 = ""; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; 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 = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/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; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 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 = ""; }; + 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; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 331C8082294A63A400263BE5 /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 331C807B294A618700263BE5 /* RunnerTests.swift */, + ); + path = RunnerTests; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + 331C8082294A63A400263BE5 /* RunnerTests */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + 331C8081294A63A400263BE5 /* RunnerTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, + ); + path = Runner; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 331C8080294A63A400263BE5 /* RunnerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; + buildPhases = ( + 331C807D294A63A400263BE5 /* Sources */, + 331C807E294A63A400263BE5 /* Frameworks */, + 331C807F294A63A400263BE5 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 331C8086294A63A400263BE5 /* PBXTargetDependency */, + ); + name = RunnerTests; + productName = RunnerTests; + productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = YES; + LastUpgradeCheck = 1430; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 331C8080294A63A400263BE5 = { + CreatedOnToolsVersion = 14.0; + TestTargetID = 97C146ED1CF9000F007C117D; + }; + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1100; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + 331C8080294A63A400263BE5 /* RunnerTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 331C807F294A63A400263BE5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 331C807D294A63A400263BE5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 331C8086294A63A400263BE5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 97C146ED1CF9000F007C117D /* Runner */; + targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.example; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; + 331C8088294A63A400263BE5 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = AE0B7B92F70575B8D7E0D07E /* Pods-RunnerTests.debug.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.example.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Debug; + }; + 331C8089294A63A400263BE5 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 89B67EB44CE7B6631473024E /* Pods-RunnerTests.release.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.example.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Release; + }; + 331C808A294A63A400263BE5 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 640959BDD8F10B91D80A66BE /* Pods-RunnerTests.profile.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.example.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Profile; + }; + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.example; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.example; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 331C8088294A63A400263BE5 /* Debug */, + 331C8089294A63A400263BE5 /* Release */, + 331C808A294A63A400263BE5 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug */, + 97C147041CF9000F007C117D /* Release */, + 249021D3217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + 249021D4217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/packages/survey_form/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/survey_form/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..919434a62 --- /dev/null +++ b/packages/survey_form/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/packages/survey_form/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/survey_form/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 000000000..18d981003 --- /dev/null +++ b/packages/survey_form/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/packages/survey_form/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/survey_form/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 000000000..f9b0d7c5e --- /dev/null +++ b/packages/survey_form/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/packages/survey_form/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/survey_form/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 000000000..87131a09b --- /dev/null +++ b/packages/survey_form/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/survey_form/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/packages/survey_form/example/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..1d526a16e --- /dev/null +++ b/packages/survey_form/example/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/packages/survey_form/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/survey_form/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 000000000..18d981003 --- /dev/null +++ b/packages/survey_form/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/packages/survey_form/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/survey_form/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 000000000..f9b0d7c5e --- /dev/null +++ b/packages/survey_form/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/packages/survey_form/example/ios/Runner/AppDelegate.swift b/packages/survey_form/example/ios/Runner/AppDelegate.swift new file mode 100644 index 000000000..70693e4a8 --- /dev/null +++ b/packages/survey_form/example/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import UIKit +import Flutter + +@UIApplicationMain +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} diff --git a/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000..d36b1fab2 --- /dev/null +++ b/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "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" + } +} diff --git a/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 000000000..4def64261 Binary files /dev/null and b/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 000000000..56e650ace Binary files /dev/null and b/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 000000000..37eca2b4b Binary files /dev/null and b/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 000000000..0b29a04f1 Binary files /dev/null and b/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 000000000..0bd0125e0 Binary files /dev/null and b/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 000000000..eaf2dee37 Binary files /dev/null and b/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 000000000..3fd69bf85 Binary files /dev/null and b/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 000000000..37eca2b4b Binary files /dev/null and b/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 000000000..b7649c3e2 Binary files /dev/null and b/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 000000000..44d138309 Binary files /dev/null and b/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png b/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png new file mode 100644 index 000000000..9a22b7fc3 Binary files /dev/null and b/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png differ diff --git a/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png b/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png new file mode 100644 index 000000000..f64ce7730 Binary files /dev/null and b/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png differ diff --git a/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png b/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png new file mode 100644 index 000000000..72baec5a1 Binary files /dev/null and b/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png differ diff --git a/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png b/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png new file mode 100644 index 000000000..fd77b7e7a Binary files /dev/null and b/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png differ diff --git a/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 000000000..44d138309 Binary files /dev/null and b/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 000000000..41b217a5b Binary files /dev/null and b/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png b/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png new file mode 100644 index 000000000..7eb65cb8d Binary files /dev/null and b/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png differ diff --git a/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png b/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png new file mode 100644 index 000000000..910eafa1d Binary files /dev/null and b/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png differ diff --git a/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 000000000..b9811544e Binary files /dev/null and b/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 000000000..5047fef8e Binary files /dev/null and b/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 000000000..9fee6d1eb Binary files /dev/null and b/packages/survey_form/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/packages/survey_form/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/packages/survey_form/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 000000000..0bedcf2fd --- /dev/null +++ b/packages/survey_form/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchImage.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/packages/survey_form/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/packages/survey_form/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/packages/survey_form/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/packages/survey_form/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/packages/survey_form/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/packages/survey_form/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/packages/survey_form/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/packages/survey_form/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/packages/survey_form/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/packages/survey_form/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/packages/survey_form/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 000000000..89c2725b7 --- /dev/null +++ b/packages/survey_form/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# Launch Screen Assets + +You can customize the launch screen with your own desired assets by replacing the image files in this directory. + +You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. \ No newline at end of file diff --git a/packages/survey_form/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/packages/survey_form/example/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 000000000..f2e259c7c --- /dev/null +++ b/packages/survey_form/example/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/survey_form/example/ios/Runner/Base.lproj/Main.storyboard b/packages/survey_form/example/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 000000000..f3c28516f --- /dev/null +++ b/packages/survey_form/example/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/survey_form/example/ios/Runner/Info.plist b/packages/survey_form/example/ios/Runner/Info.plist new file mode 100644 index 000000000..5458fc418 --- /dev/null +++ b/packages/survey_form/example/ios/Runner/Info.plist @@ -0,0 +1,49 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Example + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + example + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + CADisableMinimumFrameDurationOnPhone + + UIApplicationSupportsIndirectInputEvents + + + diff --git a/packages/survey_form/example/ios/Runner/Runner-Bridging-Header.h b/packages/survey_form/example/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 000000000..308a2a560 --- /dev/null +++ b/packages/survey_form/example/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/packages/survey_form/example/ios/RunnerTests/RunnerTests.swift b/packages/survey_form/example/ios/RunnerTests/RunnerTests.swift new file mode 100644 index 000000000..86a7c3b1b --- /dev/null +++ b/packages/survey_form/example/ios/RunnerTests/RunnerTests.swift @@ -0,0 +1,12 @@ +import Flutter +import UIKit +import XCTest + +class RunnerTests: XCTestCase { + + func testExample() { + // If you add code to the Runner application, consider adding tests here. + // See https://developer.apple.com/documentation/xctest for more information about using XCTest. + } + +} diff --git a/packages/survey_form/example/lib/data.json b/packages/survey_form/example/lib/data.json new file mode 100644 index 000000000..caff05901 --- /dev/null +++ b/packages/survey_form/example/lib/data.json @@ -0,0 +1,20 @@ +[ + { + "code": "ACKNOWLEDGEMENT_SUCCESS_ACTION_LABEL_TEXT", + "locale": "en_MZ", + "message": "Go Back", + "module": "hcm-acknowledgement" + }, + { + "code": "ACKNOWLEDGEMENT_SUCCESS_DESCRIPTION_TEXT", + "locale": "en_MZ", + "message": "The data has been recorded successfully.", + "module": "hcm-acknowledgement" + }, + { + "code": "ACKNOWLEDGEMENT_SUCCESS_LABEL_TEXT", + "locale": "en_MZ", + "message": "Data recorded successfully", + "module": "hcm-acknowledgement" + } +] \ No newline at end of file diff --git a/packages/survey_form/example/lib/localizedString.dart b/packages/survey_form/example/lib/localizedString.dart new file mode 100644 index 000000000..e573a6ae6 --- /dev/null +++ b/packages/survey_form/example/lib/localizedString.dart @@ -0,0 +1,34 @@ +class LocalizedString { + final String code; + final String locale; + final String message; + final String module; + + // Constructor + LocalizedString({ + required this.code, + required this.locale, + required this.message, + required this.module, + }); + + // Factory constructor to create an instance from JSON + factory LocalizedString.fromJson(Map json) { + return LocalizedString( + code: json['code'] as String, + locale: json['locale'] as String, + message: json['message'] as String, + module: json['module'] as String, + ); + } + + // Optional: Method to convert an instance back to JSON + Map toJson() { + return { + 'code': code, + 'locale': locale, + 'message': message, + 'module': module, + }; + } +} diff --git a/packages/survey_form/example/lib/main.dart b/packages/survey_form/example/lib/main.dart new file mode 100644 index 000000000..e07157450 --- /dev/null +++ b/packages/survey_form/example/lib/main.dart @@ -0,0 +1,100 @@ +import 'dart:convert'; + +import 'package:digit_ui_components/digit_components.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:survey_form/blocs/app_localization.dart'; +import 'package:survey_form/blocs/survey_form_localization_delegate.dart'; +import 'package:survey_form/pages/acknowledgement.dart'; + +import 'localizedString.dart'; + +void main() { + runApp(const MyApp()); +} + +class MyApp extends StatelessWidget { + const MyApp({super.key}); + + // This widget is the root of your application. + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'Flutter Demo', + theme: ThemeData( + colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), + useMaterial3: true, + ), + home: const MyHomePage(title: 'Survey Form Package Example'), + ); + } +} + +Future loadLocalizedStrings() async { + String jsonString = await rootBundle.loadString('lib/data.json'); + // Decode the JSON string + List jsonList = jsonDecode(jsonString); + + // Convert the dynamic list to a list of LocalizedString objects + return jsonList + .map((jsonItem) => LocalizedString.fromJson(jsonItem)) + .toList(); +} + +class MyHomePage extends StatefulWidget { + const MyHomePage({super.key, required this.title}); + + final String title; + + @override + State createState() => _MyHomePageState(); +} + +class _MyHomePageState extends State { + late Future localizedStrings; + final languages = [ + {"label": "PORTUGUÊS", "value": "pt_MZ"}, + {"label": "FRENCH", "value": "fr_MZ"}, + {"label": "ENGLISH", "value": "en_MZ"} + ]; + + @override + void initState() { + super.initState(); + localizedStrings = loadLocalizedStrings(); + + SurveyFormLocalizationDelegate delegate = + SurveyFormLocalizationDelegate(localizedStrings, languages); + delegate.load(const Locale("en", "MZ")); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + backgroundColor: Theme.of(context).colorScheme.inversePrimary, + title: Text(widget.title), + ), + body: Center( + child: SizedBox( + width: 300, + child: DigitButton( + label: "Acknowledgement Page", + size: DigitButtonSize.large, + onPressed: () { + Navigator.of(context).push(MaterialPageRoute( + builder: (BuildContext context) => + SurveyFormAcknowledgementPage( + appLocalizations: SurveyFormLocalization( + const Locale("en", "MZ"), + localizedStrings, + languages), + ))); + }, + type: DigitButtonType.primary, + ), + ), + ), + ); + } +} diff --git a/packages/survey_form/example/pubspec.lock b/packages/survey_form/example/pubspec.lock new file mode 100644 index 000000000..b71a66a16 --- /dev/null +++ b/packages/survey_form/example/pubspec.lock @@ -0,0 +1,1350 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + sha256: eb376e9acf6938204f90eb3b1f00b578640d3188b4c8a8ec054f9f479af8d051 + url: "https://pub.dev" + source: hosted + version: "64.0.0" + analyzer: + dependency: transitive + description: + name: analyzer + sha256: "69f54f967773f6c26c7dcb13e93d7ccee8b17a641689da39e878d5cf13b06893" + url: "https://pub.dev" + source: hosted + version: "6.2.0" + archive: + dependency: transitive + description: + name: archive + sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d + url: "https://pub.dev" + source: hosted + version: "3.6.1" + args: + dependency: transitive + description: + name: args + sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" + url: "https://pub.dev" + source: hosted + version: "2.5.0" + async: + dependency: transitive + description: + name: async + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" + source: hosted + version: "2.11.0" + auto_route: + dependency: transitive + description: + name: auto_route + sha256: "8de4a280ce7861ef24a6baa14c2b02b77a8c31b4a4c4f12d7b608678cc657c7f" + url: "https://pub.dev" + source: hosted + version: "8.1.4" + bloc: + dependency: transitive + description: + name: bloc + sha256: "106842ad6569f0b60297619e9e0b1885c2fb9bf84812935490e6c5275777804e" + url: "https://pub.dev" + source: hosted + version: "8.1.4" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + build: + dependency: transitive + description: + name: build + sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" + url: "https://pub.dev" + source: hosted + version: "2.4.1" + build_config: + dependency: transitive + description: + name: build_config + sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1 + url: "https://pub.dev" + source: hosted + version: "1.1.1" + build_daemon: + dependency: transitive + description: + name: build_daemon + sha256: "0343061a33da9c5810b2d6cee51945127d8f4c060b7fbdd9d54917f0a3feaaa1" + url: "https://pub.dev" + source: hosted + version: "4.0.1" + build_resolvers: + dependency: transitive + description: + name: build_resolvers + sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a" + url: "https://pub.dev" + source: hosted + version: "2.4.2" + build_runner: + dependency: transitive + description: + name: build_runner + sha256: "3ac61a79bfb6f6cc11f693591063a7f19a7af628dc52f141743edac5c16e8c22" + url: "https://pub.dev" + source: hosted + version: "2.4.9" + build_runner_core: + dependency: transitive + description: + name: build_runner_core + sha256: "4ae8ffe5ac758da294ecf1802f2aff01558d8b1b00616aa7538ea9a8a5d50799" + url: "https://pub.dev" + source: hosted + version: "7.3.0" + built_collection: + dependency: transitive + description: + name: built_collection + sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" + url: "https://pub.dev" + source: hosted + version: "5.1.1" + built_value: + dependency: transitive + description: + name: built_value + sha256: c7913a9737ee4007efedaffc968c049fd0f3d0e49109e778edc10de9426005cb + url: "https://pub.dev" + source: hosted + version: "8.9.2" + camera: + dependency: transitive + description: + name: camera + sha256: "26ff41045772153f222ffffecba711a206f670f5834d40ebf5eed3811692f167" + url: "https://pub.dev" + source: hosted + version: "0.11.0+2" + camera_android_camerax: + dependency: transitive + description: + name: camera_android_camerax + sha256: "011be2ab0e5b3e3aa8094413fa890f8c5c5afd7cfdaef353a992047d4dab5780" + url: "https://pub.dev" + source: hosted + version: "0.6.8+2" + camera_avfoundation: + dependency: transitive + description: + name: camera_avfoundation + sha256: "2e4c568f70e406ccb87376bc06b53d2f5bebaab71e2fbcc1a950e31449381bcf" + url: "https://pub.dev" + source: hosted + version: "0.9.17+5" + camera_platform_interface: + dependency: transitive + description: + name: camera_platform_interface + sha256: b3ede1f171532e0d83111fe0980b46d17f1aa9788a07a2fbed07366bbdbb9061 + url: "https://pub.dev" + source: hosted + version: "2.8.0" + camera_web: + dependency: transitive + description: + name: camera_web + sha256: b9235ec0a2ce949daec546f1f3d86f05c3921ed31c7d9ab6b7c03214d152fc2d + url: "https://pub.dev" + source: hosted + version: "0.3.4" + characters: + dependency: transitive + description: + name: characters + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" + source: hosted + version: "1.3.0" + charcode: + dependency: transitive + description: + name: charcode + sha256: fb98c0f6d12c920a02ee2d998da788bca066ca5f148492b7085ee23372b12306 + url: "https://pub.dev" + source: hosted + version: "1.3.1" + checked_yaml: + dependency: transitive + description: + name: checked_yaml + sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff + url: "https://pub.dev" + source: hosted + version: "2.0.3" + clock: + dependency: transitive + description: + name: clock + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" + source: hosted + version: "1.1.1" + code_builder: + dependency: transitive + description: + name: code_builder + sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37 + url: "https://pub.dev" + source: hosted + version: "4.10.0" + collection: + dependency: transitive + description: + name: collection + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + url: "https://pub.dev" + source: hosted + version: "1.18.0" + convert: + dependency: transitive + description: + name: convert + sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + url: "https://pub.dev" + source: hosted + version: "3.1.1" + cross_file: + dependency: transitive + description: + name: cross_file + sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670" + url: "https://pub.dev" + source: hosted + version: "0.3.4+2" + crypto: + dependency: transitive + description: + name: crypto + sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + url: "https://pub.dev" + source: hosted + version: "3.0.3" + csslib: + dependency: transitive + description: + name: csslib + sha256: "09bad715f418841f976c77db72d5398dc1253c21fb9c0c7f0b0b985860b2d58e" + url: "https://pub.dev" + source: hosted + version: "1.0.2" + cupertino_icons: + dependency: "direct main" + description: + name: cupertino_icons + sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 + url: "https://pub.dev" + source: hosted + version: "1.0.8" + dart_mappable: + dependency: transitive + description: + name: dart_mappable + sha256: f69a961ae8589724ebb542e588f228ae844c5f78028899cbe2cc718977c1b382 + url: "https://pub.dev" + source: hosted + version: "4.3.0" + dart_style: + dependency: transitive + description: + name: dart_style + sha256: "99e066ce75c89d6b29903d788a7bb9369cf754f7b24bf70bf4b6d6d6b26853b9" + url: "https://pub.dev" + source: hosted + version: "2.3.6" + digit_data_model: + dependency: transitive + description: + name: digit_data_model + sha256: c3bc7299a7d927ebb83d8e91c1d7a8a51f6a1d1295dafeacb642012b72b99a2f + url: "https://pub.dev" + source: hosted + version: "1.0.5" + digit_ui_components: + dependency: "direct main" + description: + name: digit_ui_components + sha256: "57c4da5237be6025783e7357a02b6b492f02e38f711d674bf46f5f8c8a93ad76" + url: "https://pub.dev" + source: hosted + version: "0.0.2-dev.4" + dio: + dependency: transitive + description: + name: dio + sha256: "5598aa796bbf4699afd5c67c0f5f6e2ed542afc956884b9cd58c306966efc260" + url: "https://pub.dev" + source: hosted + version: "5.7.0" + dio_web_adapter: + dependency: transitive + description: + name: dio_web_adapter + sha256: "36c5b2d79eb17cdae41e974b7a8284fec631651d2a6f39a8a2ff22327e90aeac" + url: "https://pub.dev" + source: hosted + version: "1.0.1" + dotted_border: + dependency: transitive + description: + name: dotted_border + sha256: "108837e11848ca776c53b30bc870086f84b62ed6e01c503ed976e8f8c7df9c04" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + drift: + dependency: transitive + description: + name: drift + sha256: c2d073d35ad441730812f4ea05b5dd031fb81c5f9786a4f5fb77ecd6307b6f74 + url: "https://pub.dev" + source: hosted + version: "2.22.1" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" + source: hosted + version: "1.3.1" + ffi: + dependency: transitive + description: + name: ffi + sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + file: + dependency: transitive + description: + name: file + sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 + url: "https://pub.dev" + source: hosted + version: "7.0.1" + file_picker: + dependency: transitive + description: + name: file_picker + sha256: d1d0ac3966b36dc3e66eeefb40280c17feb87fa2099c6e22e6a1fc959327bd03 + url: "https://pub.dev" + source: hosted + version: "8.0.0+1" + file_selector_linux: + dependency: transitive + description: + name: file_selector_linux + sha256: "045d372bf19b02aeb69cacf8b4009555fb5f6f0b7ad8016e5f46dd1387ddd492" + url: "https://pub.dev" + source: hosted + version: "0.9.2+1" + file_selector_macos: + dependency: transitive + description: + name: file_selector_macos + sha256: f42eacb83b318e183b1ae24eead1373ab1334084404c8c16e0354f9a3e55d385 + url: "https://pub.dev" + source: hosted + version: "0.9.4" + file_selector_platform_interface: + dependency: transitive + description: + name: file_selector_platform_interface + sha256: a3994c26f10378a039faa11de174d7b78eb8f79e4dd0af2a451410c1a5c3f66b + url: "https://pub.dev" + source: hosted + version: "2.6.2" + file_selector_windows: + dependency: transitive + description: + name: file_selector_windows + sha256: "2ad726953f6e8affbc4df8dc78b77c3b4a060967a291e528ef72ae846c60fb69" + url: "https://pub.dev" + source: hosted + version: "0.9.3+2" + fixnum: + dependency: transitive + description: + name: fixnum + sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be + url: "https://pub.dev" + source: hosted + version: "1.1.1" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_bloc: + dependency: transitive + description: + name: flutter_bloc + sha256: b594505eac31a0518bdcb4b5b79573b8d9117b193cc80cc12e17d639b10aa27a + url: "https://pub.dev" + source: hosted + version: "8.1.6" + flutter_dropzone: + dependency: transitive + description: + name: flutter_dropzone + sha256: b399c60411f9bf9c4c2f97933c6a3a185859e75aade8897831e76cee4346c8e1 + url: "https://pub.dev" + source: hosted + version: "3.0.7" + flutter_dropzone_platform_interface: + dependency: transitive + description: + name: flutter_dropzone_platform_interface + sha256: "96d2c51c86063ba150551c3b40fd26c5a18785bee071c0c751502d28a545df3b" + url: "https://pub.dev" + source: hosted + version: "2.2.0" + flutter_dropzone_web: + dependency: transitive + description: + name: flutter_dropzone_web + sha256: c5a0fdb63b7216352a01761ec1b6eba1982e49541e60675735e2d3d95e207b19 + url: "https://pub.dev" + source: hosted + version: "3.0.13" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04 + url: "https://pub.dev" + source: hosted + version: "2.0.3" + flutter_localizations: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + flutter_plugin_android_lifecycle: + dependency: transitive + description: + name: flutter_plugin_android_lifecycle + sha256: "8cf40eebf5dec866a6d1956ad7b4f7016e6c0cc69847ab946833b7d43743809f" + url: "https://pub.dev" + source: hosted + version: "2.0.19" + flutter_spinkit: + dependency: transitive + description: + name: flutter_spinkit + sha256: d2696eed13732831414595b98863260e33e8882fc069ee80ec35d4ac9ddb0472 + url: "https://pub.dev" + source: hosted + version: "5.2.1" + flutter_styled_toast: + dependency: transitive + description: + name: flutter_styled_toast + sha256: e667f13a665820eb0fa8506547e47eacbcddf1948d6d3036cfd3b089bd4b0516 + url: "https://pub.dev" + source: hosted + version: "2.2.1" + flutter_svg: + dependency: transitive + description: + name: flutter_svg + sha256: "7b4ca6cf3304575fe9c8ec64813c8d02ee41d2afe60bcfe0678bcb5375d596a2" + url: "https://pub.dev" + source: hosted + version: "2.0.10+1" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + fluttertoast: + dependency: transitive + description: + name: fluttertoast + sha256: "81b68579e23fcbcada2db3d50302813d2371664afe6165bc78148050ab94bf66" + url: "https://pub.dev" + source: hosted + version: "8.2.5" + freezed_annotation: + dependency: transitive + description: + name: freezed_annotation + sha256: c2e2d632dd9b8a2b7751117abcfc2b4888ecfe181bd9fca7170d9ef02e595fe2 + url: "https://pub.dev" + source: hosted + version: "2.4.4" + frontend_server_client: + dependency: transitive + description: + name: frontend_server_client + sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 + url: "https://pub.dev" + source: hosted + version: "4.0.0" + geolocator: + dependency: transitive + description: + name: geolocator + sha256: f4efb8d3c4cdcad2e226af9661eb1a0dd38c71a9494b22526f9da80ab79520e5 + url: "https://pub.dev" + source: hosted + version: "10.1.1" + geolocator_android: + dependency: transitive + description: + name: geolocator_android + sha256: "7aefc530db47d90d0580b552df3242440a10fe60814496a979aa67aa98b1fd47" + url: "https://pub.dev" + source: hosted + version: "4.6.1" + geolocator_apple: + dependency: transitive + description: + name: geolocator_apple + sha256: "6154ea2682563f69fc0125762ed7e91e7ed85d0b9776595653be33918e064807" + url: "https://pub.dev" + source: hosted + version: "2.3.8+1" + geolocator_platform_interface: + dependency: transitive + description: + name: geolocator_platform_interface + sha256: "386ce3d9cce47838355000070b1d0b13efb5bc430f8ecda7e9238c8409ace012" + url: "https://pub.dev" + source: hosted + version: "4.2.4" + geolocator_web: + dependency: transitive + description: + name: geolocator_web + sha256: "102e7da05b48ca6bf0a5bda0010f886b171d1a08059f01bfe02addd0175ebece" + url: "https://pub.dev" + source: hosted + version: "2.2.1" + geolocator_windows: + dependency: transitive + description: + name: geolocator_windows + sha256: "53da08937d07c24b0d9952eb57a3b474e29aae2abf9dd717f7e1230995f13f0e" + url: "https://pub.dev" + source: hosted + version: "0.2.3" + glob: + dependency: transitive + description: + name: glob + sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + google_fonts: + dependency: transitive + description: + name: google_fonts + sha256: b1ac0fe2832c9cc95e5e88b57d627c5e68c223b9657f4b96e1487aa9098c7b82 + url: "https://pub.dev" + source: hosted + version: "6.2.1" + graphs: + dependency: transitive + description: + name: graphs + sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19 + url: "https://pub.dev" + source: hosted + version: "2.3.1" + group_radio_button: + dependency: transitive + description: + name: group_radio_button + sha256: "204de8d16b224be7fc72dade0c3afd410ff5a34417d89f74f0fd8be7a8c2b4d6" + url: "https://pub.dev" + source: hosted + version: "1.3.0" + horizontal_data_table: + dependency: transitive + description: + name: horizontal_data_table + sha256: c8ab5256bbced698a729f3e0ff2cb0e8e97416cdbb082860370eaf883badf722 + url: "https://pub.dev" + source: hosted + version: "4.3.1" + html: + dependency: transitive + description: + name: html + sha256: "1fc58edeaec4307368c60d59b7e15b9d658b57d7f3125098b6294153c75337ec" + url: "https://pub.dev" + source: hosted + version: "0.15.5" + http: + dependency: transitive + description: + name: http + sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 + url: "https://pub.dev" + source: hosted + version: "1.2.2" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" + url: "https://pub.dev" + source: hosted + version: "3.2.1" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" + source: hosted + version: "4.0.2" + image_picker: + dependency: transitive + description: + name: image_picker + sha256: "1f498d086203360cca099d20ffea2963f48c39ce91bdd8a3b6d4a045786b02c8" + url: "https://pub.dev" + source: hosted + version: "1.0.8" + image_picker_android: + dependency: transitive + description: + name: image_picker_android + sha256: "844c6da4e4f2829dffdab97816bca09d0e0977e8dcef7450864aba4e07967a58" + url: "https://pub.dev" + source: hosted + version: "0.8.9+6" + image_picker_for_web: + dependency: transitive + description: + name: image_picker_for_web + sha256: e2423c53a68b579a7c37a1eda967b8ae536c3d98518e5db95ca1fe5719a730a3 + url: "https://pub.dev" + source: hosted + version: "3.0.2" + image_picker_ios: + dependency: transitive + description: + name: image_picker_ios + sha256: fadafce49e8569257a0cad56d24438a6fa1f0cbd7ee0af9b631f7492818a4ca3 + url: "https://pub.dev" + source: hosted + version: "0.8.9+1" + image_picker_linux: + dependency: transitive + description: + name: image_picker_linux + sha256: "4ed1d9bb36f7cd60aa6e6cd479779cc56a4cb4e4de8f49d487b1aaad831300fa" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + image_picker_macos: + dependency: transitive + description: + name: image_picker_macos + sha256: "3f5ad1e8112a9a6111c46d0b57a7be2286a9a07fc6e1976fdf5be2bd31d4ff62" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + image_picker_platform_interface: + dependency: transitive + description: + name: image_picker_platform_interface + sha256: fa4e815e6fcada50e35718727d83ba1c92f1edf95c0b4436554cec301b56233b + url: "https://pub.dev" + source: hosted + version: "2.9.3" + image_picker_windows: + dependency: transitive + description: + name: image_picker_windows + sha256: "6ad07afc4eb1bc25f3a01084d28520496c4a3bb0cb13685435838167c9dcedeb" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + intl: + dependency: transitive + description: + name: intl + sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf + url: "https://pub.dev" + source: hosted + version: "0.19.0" + io: + dependency: transitive + description: + name: io + sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" + url: "https://pub.dev" + source: hosted + version: "1.0.4" + isar: + dependency: transitive + description: + name: isar + sha256: "99165dadb2cf2329d3140198363a7e7bff9bbd441871898a87e26914d25cf1ea" + url: "https://pub.dev" + source: hosted + version: "3.1.0+1" + isar_flutter_libs: + dependency: transitive + description: + name: isar_flutter_libs + sha256: bc6768cc4b9c61aabff77152e7f33b4b17d2fc93134f7af1c3dd51500fe8d5e8 + url: "https://pub.dev" + source: hosted + version: "3.1.0+1" + js: + dependency: transitive + description: + name: js + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 + url: "https://pub.dev" + source: hosted + version: "0.6.7" + 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: + name: leak_tracker + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + url: "https://pub.dev" + source: hosted + version: "10.0.4" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + url: "https://pub.dev" + source: hosted + version: "3.0.3" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" + lints: + dependency: transitive + description: + name: lints + sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + location: + dependency: transitive + description: + name: location + sha256: "37ffdadcd4b1498b769824f45ebb4de8ed46663a4a67ac27b33a590ee486579f" + url: "https://pub.dev" + source: hosted + version: "6.0.2" + location_platform_interface: + dependency: transitive + description: + name: location_platform_interface + sha256: "2ecde6bb0f88032b0bbbde37e18975b4468711dd92619c2235cc0c0ee93b4b8e" + url: "https://pub.dev" + source: hosted + version: "4.0.0" + location_web: + dependency: transitive + description: + name: location_web + sha256: "15ad7b4c8a9f55abee513373755e093a40c04d7e24fc1b4f89676fe99523d034" + url: "https://pub.dev" + source: hosted + version: "5.0.1" + logging: + dependency: transitive + description: + name: logging + sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + lottie: + dependency: transitive + description: + name: lottie + sha256: "7afc60865a2429d994144f7d66ced2ae4305fe35d82890b8766e3359872d872c" + url: "https://pub.dev" + source: hosted + version: "3.1.3" + matcher: + dependency: transitive + description: + name: matcher + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + url: "https://pub.dev" + source: hosted + version: "0.12.16+1" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + url: "https://pub.dev" + source: hosted + version: "0.8.0" + meta: + dependency: transitive + description: + name: meta + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" + url: "https://pub.dev" + source: hosted + version: "1.12.0" + mime: + dependency: transitive + description: + name: mime + sha256: "801fd0b26f14a4a58ccb09d5892c3fbdeff209594300a542492cf13fba9d247a" + url: "https://pub.dev" + source: hosted + version: "1.0.6" + mocktail: + dependency: transitive + description: + name: mocktail + sha256: "890df3f9688106f25755f26b1c60589a92b3ab91a22b8b224947ad041bf172d8" + url: "https://pub.dev" + source: hosted + version: "1.0.4" + nested: + dependency: transitive + description: + name: nested + sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20" + url: "https://pub.dev" + source: hosted + version: "1.0.0" + overlay_builder: + dependency: transitive + description: + name: overlay_builder + sha256: "58b97bc5f67a2e2bb7006dd88e697ac757dfffc9dbd1e7dfc1917fb510a4b5c8" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + package_config: + dependency: transitive + description: + name: package_config + sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + path: + dependency: transitive + description: + name: path + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + url: "https://pub.dev" + source: hosted + version: "1.9.0" + path_drawing: + dependency: transitive + description: + name: path_drawing + sha256: bbb1934c0cbb03091af082a6389ca2080345291ef07a5fa6d6e078ba8682f977 + url: "https://pub.dev" + source: hosted + version: "1.0.1" + path_parsing: + dependency: transitive + description: + name: path_parsing + sha256: e3e67b1629e6f7e8100b367d3db6ba6af4b1f0bb80f64db18ef1fbabd2fa9ccf + url: "https://pub.dev" + source: hosted + version: "1.0.1" + path_provider: + dependency: transitive + description: + name: path_provider + sha256: fec0d61223fba3154d87759e3cc27fe2c8dc498f6386c6d6fc80d1afdd1bf378 + url: "https://pub.dev" + source: hosted + version: "2.1.4" + path_provider_android: + dependency: transitive + description: + name: path_provider_android + sha256: a248d8146ee5983446bf03ed5ea8f6533129a12b11f12057ad1b4a67a2b3b41d + url: "https://pub.dev" + source: hosted + version: "2.2.4" + path_provider_foundation: + dependency: transitive + description: + name: path_provider_foundation + sha256: "5a7999be66e000916500be4f15a3633ebceb8302719b47b9cc49ce924125350f" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + path_provider_linux: + dependency: transitive + description: + name: path_provider_linux + sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 + url: "https://pub.dev" + source: hosted + version: "2.2.1" + path_provider_platform_interface: + dependency: transitive + description: + name: path_provider_platform_interface + sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + path_provider_windows: + dependency: transitive + description: + name: path_provider_windows + sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 + url: "https://pub.dev" + source: hosted + version: "2.3.0" + petitparser: + dependency: transitive + description: + name: petitparser + sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27 + url: "https://pub.dev" + source: hosted + version: "6.0.2" + platform: + dependency: transitive + description: + name: platform + sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984" + url: "https://pub.dev" + source: hosted + version: "3.1.6" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" + url: "https://pub.dev" + source: hosted + version: "2.1.8" + pool: + dependency: transitive + description: + name: pool + sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" + url: "https://pub.dev" + source: hosted + version: "1.5.1" + provider: + dependency: transitive + description: + name: provider + sha256: c8a055ee5ce3fd98d6fc872478b03823ffdb448699c6ebdbbc71d59b596fd48c + url: "https://pub.dev" + source: hosted + version: "6.1.2" + pub_semver: + dependency: transitive + description: + name: pub_semver + sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + pubspec_parse: + dependency: transitive + description: + name: pubspec_parse + sha256: c799b721d79eb6ee6fa56f00c04b472dcd44a30d258fac2174a6ec57302678f8 + url: "https://pub.dev" + source: hosted + version: "1.3.0" + reactive_forms: + dependency: transitive + description: + name: reactive_forms + sha256: "9b1fb18e0aae9c50cfa0aaabaaa38bc4d78eefc9b7b95fa9c947b051f6524b8e" + url: "https://pub.dev" + source: hosted + version: "17.0.1" + recase: + dependency: transitive + description: + name: recase + sha256: e4eb4ec2dcdee52dcf99cb4ceabaffc631d7424ee55e56f280bc039737f89213 + url: "https://pub.dev" + source: hosted + version: "4.1.0" + shelf: + dependency: transitive + description: + name: shelf + sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 + url: "https://pub.dev" + source: hosted + version: "1.4.1" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" + url: "https://pub.dev" + source: hosted + version: "1.0.4" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.99" + source_span: + dependency: transitive + description: + name: source_span + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" + source: hosted + version: "1.10.0" + sprintf: + dependency: transitive + description: + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" + url: "https://pub.dev" + source: hosted + version: "7.0.0" + sqlite3: + dependency: transitive + description: + name: sqlite3 + sha256: bb174b3ec2527f9c5f680f73a89af8149dd99782fbb56ea88ad0807c5638f2ed + url: "https://pub.dev" + source: hosted + version: "2.4.7" + sqlite3_flutter_libs: + dependency: transitive + description: + name: sqlite3_flutter_libs + sha256: "7ae52b23366e5295005022e62fa093f64bfe190810223ea0ebf733a4cd140bce" + url: "https://pub.dev" + source: hosted + version: "0.5.26" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + url: "https://pub.dev" + source: hosted + version: "1.11.1" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + url: "https://pub.dev" + source: hosted + version: "2.1.2" + stream_transform: + dependency: transitive + description: + name: stream_transform + sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + survey_form: + dependency: "direct main" + description: + path: ".." + relative: true + source: path + version: "1.0.0" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" + source: hosted + version: "1.2.1" + test_api: + dependency: transitive + description: + name: test_api + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" + url: "https://pub.dev" + source: hosted + version: "0.7.0" + timing: + dependency: transitive + description: + name: timing + sha256: "70a3b636575d4163c477e6de42f247a23b315ae20e86442bebe32d3cabf61c32" + url: "https://pub.dev" + source: hosted + version: "1.0.1" + type_plus: + dependency: transitive + description: + name: type_plus + sha256: d5d1019471f0d38b91603adb9b5fd4ce7ab903c879d2fbf1a3f80a630a03fcc9 + url: "https://pub.dev" + source: hosted + version: "2.1.1" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + url: "https://pub.dev" + source: hosted + version: "1.3.2" + universal_html: + dependency: transitive + description: + name: universal_html + sha256: "56536254004e24d9d8cfdb7dbbf09b74cf8df96729f38a2f5c238163e3d58971" + url: "https://pub.dev" + source: hosted + version: "2.2.4" + universal_io: + dependency: transitive + description: + name: universal_io + sha256: "1722b2dcc462b4b2f3ee7d188dad008b6eb4c40bbd03a3de451d82c78bba9aad" + url: "https://pub.dev" + source: hosted + version: "2.2.2" + url_launcher: + dependency: transitive + description: + name: url_launcher + sha256: "21b704ce5fa560ea9f3b525b43601c678728ba46725bab9b01187b4831377ed3" + url: "https://pub.dev" + source: hosted + version: "6.3.0" + url_launcher_android: + dependency: transitive + description: + name: url_launcher_android + sha256: "17cd5e205ea615e2c6ea7a77323a11712dffa0720a8a90540db57a01347f9ad9" + url: "https://pub.dev" + source: hosted + version: "6.3.2" + url_launcher_ios: + dependency: transitive + description: + name: url_launcher_ios + sha256: "75bb6fe3f60070407704282a2d295630cab232991eb52542b18347a8a941df03" + url: "https://pub.dev" + source: hosted + version: "6.2.4" + url_launcher_linux: + dependency: transitive + description: + name: url_launcher_linux + sha256: ab360eb661f8879369acac07b6bb3ff09d9471155357da8443fd5d3cf7363811 + url: "https://pub.dev" + source: hosted + version: "3.1.1" + url_launcher_macos: + dependency: transitive + description: + name: url_launcher_macos + sha256: "9a1a42d5d2d95400c795b2914c36fdcb525870c752569438e4ebb09a2b5d90de" + url: "https://pub.dev" + source: hosted + version: "3.2.0" + url_launcher_platform_interface: + dependency: transitive + description: + name: url_launcher_platform_interface + sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + url_launcher_web: + dependency: transitive + description: + name: url_launcher_web + sha256: "772638d3b34c779ede05ba3d38af34657a05ac55b06279ea6edd409e323dca8e" + url: "https://pub.dev" + source: hosted + version: "2.3.3" + url_launcher_windows: + dependency: transitive + description: + name: url_launcher_windows + sha256: "49c10f879746271804767cb45551ec5592cdab00ee105c06dddde1a98f73b185" + url: "https://pub.dev" + source: hosted + version: "3.1.2" + uuid: + dependency: transitive + description: + name: uuid + sha256: a5be9ef6618a7ac1e964353ef476418026db906c4facdedaa299b7a2e71690ff + url: "https://pub.dev" + source: hosted + version: "4.5.1" + vector_graphics: + dependency: transitive + description: + name: vector_graphics + sha256: "32c3c684e02f9bc0afb0ae0aa653337a2fe022e8ab064bcd7ffda27a74e288e3" + url: "https://pub.dev" + source: hosted + version: "1.1.11+1" + vector_graphics_codec: + dependency: transitive + description: + name: vector_graphics_codec + sha256: c86987475f162fadff579e7320c7ddda04cd2fdeffbe1129227a85d9ac9e03da + url: "https://pub.dev" + source: hosted + version: "1.1.11+1" + vector_graphics_compiler: + dependency: transitive + description: + name: vector_graphics_compiler + sha256: "12faff3f73b1741a36ca7e31b292ddeb629af819ca9efe9953b70bd63fc8cd81" + url: "https://pub.dev" + source: hosted + version: "1.1.11+1" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + visibility_detector: + dependency: transitive + description: + name: visibility_detector + sha256: dd5cc11e13494f432d15939c3aa8ae76844c42b723398643ce9addb88a5ed420 + url: "https://pub.dev" + source: hosted + version: "0.4.0+2" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" + url: "https://pub.dev" + source: hosted + version: "14.2.1" + watcher: + dependency: transitive + description: + name: watcher + sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + web: + dependency: transitive + description: + name: web + sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb + url: "https://pub.dev" + source: hosted + version: "1.1.0" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b + url: "https://pub.dev" + source: hosted + version: "2.4.0" + win32: + dependency: transitive + description: + name: win32 + sha256: "464f5674532865248444b4c3daca12bd9bf2d7c47f759ce2617986e7229494a8" + url: "https://pub.dev" + source: hosted + version: "5.2.0" + xdg_directories: + dependency: transitive + description: + name: xdg_directories + sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d + url: "https://pub.dev" + source: hosted + version: "1.0.4" + 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: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" + url: "https://pub.dev" + source: hosted + version: "3.1.2" +sdks: + dart: ">=3.4.0 <4.0.0" + flutter: ">=3.22.0" diff --git a/packages/survey_form/example/pubspec.yaml b/packages/survey_form/example/pubspec.yaml new file mode 100644 index 000000000..efb21d3b9 --- /dev/null +++ b/packages/survey_form/example/pubspec.yaml @@ -0,0 +1,93 @@ +name: example +description: "A new Flutter project." +# The following line prevents the package from being accidentally published to +# pub.dev using `flutter pub publish`. This is preferred for private packages. +publish_to: 'none' # Remove this line if you wish to publish to pub.dev + +# The following defines the version and build number for your application. +# A version number is three numbers separated by dots, like 1.2.43 +# followed by an optional build number separated by a +. +# Both the version and the builder number may be overridden in flutter +# build by specifying --build-name and --build-number, respectively. +# In Android, build-name is used as versionName while build-number used as versionCode. +# Read more about Android versioning at https://developer.android.com/studio/publish/versioning +# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion. +# Read more about iOS versioning at +# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html +# In Windows, build-name is used as the major, minor, and patch parts +# of the product and file versions while build-number is used as the build suffix. +version: 1.0.0+1 + +environment: + sdk: '>=3.2.0 <4.0.0' + +# Dependencies specify other packages that your package needs in order to work. +# To automatically upgrade your package dependencies to the latest versions +# consider running `flutter pub upgrade --major-versions`. Alternatively, +# dependencies can be manually updated by changing the version numbers below to +# the latest version available on pub.dev. To see which dependencies have newer +# versions available, run `flutter pub outdated`. +dependencies: + digit_ui_components: ^0.0.2-dev.4 + survey_form: + path: ../ + + flutter: + sdk: flutter + + + # The following adds the Cupertino Icons font to your application. + # Use with the CupertinoIcons class for iOS style icons. + cupertino_icons: ^1.0.2 + +dev_dependencies: + flutter_test: + sdk: flutter + + # The "flutter_lints" package below contains a set of recommended lints to + # encourage good coding practices. The lint set provided by the package is + # activated in the `analysis_options.yaml` file located at the root of your + # package. See that file for information about deactivating specific lint + # rules and activating additional ones. + flutter_lints: ^2.0.0 + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter packages. +flutter: + + # The following line ensures that the Material Icons font is + # included with your application, so that you can use the icons in + # the material Icons class. + uses-material-design: true + + # To add assets to your application, add an assets section, like this: + assets: + - lib/data.json + + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/assets-and-images/#resolution-aware + + # For details regarding adding assets from package dependencies, see + # https://flutter.dev/assets-and-images/#from-packages + + # To add custom fonts to your application, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts from package dependencies, + # see https://flutter.dev/custom-fonts/#from-packages diff --git a/packages/survey_form/lib/blocs/app_localization.dart b/packages/survey_form/lib/blocs/app_localization.dart new file mode 100644 index 000000000..5cbb3c195 --- /dev/null +++ b/packages/survey_form/lib/blocs/app_localization.dart @@ -0,0 +1,51 @@ +import 'package:flutter/material.dart'; + +import 'survey_form_localization_delegate.dart'; + +// Class responsible for handling survey_form localization +class SurveyFormLocalization { + final Locale locale; + final Future localizedStrings; + final List languages; + + SurveyFormLocalization(this.locale, this.localizedStrings, this.languages); + + // Method to get the current localization instance from context + static SurveyFormLocalization of(BuildContext context) { + return Localizations.of(context, SurveyFormLocalization)!; + } + + static final List _localizedStrings = []; + + // Method to get the delegate for localization + static LocalizationsDelegate getDelegate( + Future localizedStrings, List languages) { + return SurveyFormLocalizationDelegate(localizedStrings, languages); + } + + // Method to load localized strings + Future load() async { + _localizedStrings.clear(); + // Iterate over localized strings and filter based on locale + for (var element in await localizedStrings) { + if (element.locale == '${locale.languageCode}_${locale.countryCode}') { + _localizedStrings.add(element); + } + } + + return true; + } + + // Method to translate a given localized value + String translate(String localizedValues) { + if (_localizedStrings.isEmpty) { + return localizedValues; + } else { + final index = _localizedStrings.indexWhere( + (medium) => medium.code == localizedValues, + ); + + return index != -1 ? _localizedStrings[index].message : localizedValues; + } + } +} diff --git a/packages/digit_data_model/lib/blocs/service/service.dart b/packages/survey_form/lib/blocs/service.dart similarity index 70% rename from packages/digit_data_model/lib/blocs/service/service.dart rename to packages/survey_form/lib/blocs/service.dart index 367872d28..a0fe9e36f 100644 --- a/packages/digit_data_model/lib/blocs/service/service.dart +++ b/packages/survey_form/lib/blocs/service.dart @@ -2,7 +2,7 @@ import 'dart:async'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; -import 'package:digit_data_model/data_model.dart'; +import 'package:survey_form/survey_form.dart'; import '../../utils/typedefs.dart'; @@ -14,56 +14,58 @@ class ServiceBloc extends Bloc { final ServiceDataRepository serviceDataRepository; ServiceBloc( - super.initialState, { - required this.serviceDataRepository, - }) { + super.initialState, { + required this.serviceDataRepository, + }) { on(_handleCreate); - on(_multichecklistChanged); + on(_multiSurveyFormChanged); on(_handleSearch); on(_handlereset); on(_handleSelect); } - FutureOr _multichecklistChanged( - ServiceChecklistEvent event, - ServiceEmitter emit, - ) async { - emit(ServiceState.multichecklistChanged( + FutureOr _multiSurveyFormChanged( + ServiceSurveyFormEvent event, + ServiceEmitter emit, + ) async { + emit(ServiceState.multiSurveyFormChanged( value: event.value, submitTriggered: event.submitTriggered, )); } FutureOr _handleCreate( - ServiceCreateEvent event, - ServiceEmitter emit, - ) async { + ServiceCreateEvent event, + ServiceEmitter emit, + ) async { await serviceDataRepository.create(event.serviceModel); } FutureOr _handlereset( - ServiceResetEvent event, - ServiceEmitter emit, - ) async { + ServiceResetEvent event, + ServiceEmitter emit, + ) async { emit(ServiceSearchState( selectedService: null, serviceList: event.serviceList, )); } + //Handles the service search calls from local DB FutureOr _handleSearch( - ServiceSearchEvent event, - ServiceEmitter emit, - ) async { + ServiceSearchEvent event, + ServiceEmitter emit, + ) async { final results = - await serviceDataRepository.search(event.serviceSearchModel); + await serviceDataRepository.search(event.serviceSearchModel); emit(ServiceSearchState(serviceList: results)); } + // FutureOr _handleSelect( - ServiceSelectionEvent event, - ServiceEmitter emit, - ) async { + ServiceSelectionEvent event, + ServiceEmitter emit, + ) async { state.mapOrNull( serviceSearch: (value) => emit(value.copyWith( selectedService: event.service, @@ -75,16 +77,16 @@ class ServiceBloc extends Bloc { @freezed class ServiceEvent with _$ServiceEvent { const factory ServiceEvent.create({required ServiceModel serviceModel}) = - ServiceCreateEvent; + ServiceCreateEvent; const factory ServiceEvent.search({ required ServiceSearchModel serviceSearchModel, }) = ServiceSearchEvent; - const factory ServiceEvent.multichecklistChanged({ + const factory ServiceEvent.multiSurveyFormChanged({ required String value, required bool submitTriggered, - }) = ServiceChecklistEvent; + }) = ServiceSurveyFormEvent; const factory ServiceEvent.selectService({ required ServiceModel service, }) = ServiceSelectionEvent; @@ -100,10 +102,10 @@ class ServiceState with _$ServiceState { const factory ServiceState.isloading() = ServiceIsloadingState; - const factory ServiceState.multichecklistChanged({ + const factory ServiceState.multiSurveyFormChanged({ @Default('') String value, @Default(false) bool submitTriggered, - }) = ServiceMultichecklistChangedState; + }) = ServiceMultiSurveyFormChangedState; const factory ServiceState.serviceCreate({ required ServiceModel serviceList, diff --git a/packages/digit_data_model/lib/blocs/service/service.freezed.dart b/packages/survey_form/lib/blocs/service.freezed.dart similarity index 86% rename from packages/digit_data_model/lib/blocs/service/service.freezed.dart rename to packages/survey_form/lib/blocs/service.freezed.dart index 4dfeff427..8d099d19d 100644 --- a/packages/digit_data_model/lib/blocs/service/service.freezed.dart +++ b/packages/survey_form/lib/blocs/service.freezed.dart @@ -21,7 +21,7 @@ mixin _$ServiceEvent { required TResult Function(ServiceModel serviceModel) create, required TResult Function(ServiceSearchModel serviceSearchModel) search, required TResult Function(String value, bool submitTriggered) - multichecklistChanged, + multiSurveyFormChanged, required TResult Function(ServiceModel service) selectService, required TResult Function(List serviceList) resetSelected, }) => @@ -31,7 +31,7 @@ mixin _$ServiceEvent { TResult? Function(ServiceModel serviceModel)? create, TResult? Function(ServiceSearchModel serviceSearchModel)? search, TResult? Function(String value, bool submitTriggered)? - multichecklistChanged, + multiSurveyFormChanged, TResult? Function(ServiceModel service)? selectService, TResult? Function(List serviceList)? resetSelected, }) => @@ -40,7 +40,8 @@ mixin _$ServiceEvent { TResult maybeWhen({ TResult Function(ServiceModel serviceModel)? create, TResult Function(ServiceSearchModel serviceSearchModel)? search, - TResult Function(String value, bool submitTriggered)? multichecklistChanged, + TResult Function(String value, bool submitTriggered)? + multiSurveyFormChanged, TResult Function(ServiceModel service)? selectService, TResult Function(List serviceList)? resetSelected, required TResult orElse(), @@ -50,8 +51,8 @@ mixin _$ServiceEvent { TResult map({ required TResult Function(ServiceCreateEvent value) create, required TResult Function(ServiceSearchEvent value) search, - required TResult Function(ServiceChecklistEvent value) - multichecklistChanged, + required TResult Function(ServiceSurveyFormEvent value) + multiSurveyFormChanged, required TResult Function(ServiceSelectionEvent value) selectService, required TResult Function(ServiceResetEvent value) resetSelected, }) => @@ -60,7 +61,7 @@ mixin _$ServiceEvent { TResult? mapOrNull({ TResult? Function(ServiceCreateEvent value)? create, TResult? Function(ServiceSearchEvent value)? search, - TResult? Function(ServiceChecklistEvent value)? multichecklistChanged, + TResult? Function(ServiceSurveyFormEvent value)? multiSurveyFormChanged, TResult? Function(ServiceSelectionEvent value)? selectService, TResult? Function(ServiceResetEvent value)? resetSelected, }) => @@ -69,7 +70,7 @@ mixin _$ServiceEvent { TResult maybeMap({ TResult Function(ServiceCreateEvent value)? create, TResult Function(ServiceSearchEvent value)? search, - TResult Function(ServiceChecklistEvent value)? multichecklistChanged, + TResult Function(ServiceSurveyFormEvent value)? multiSurveyFormChanged, TResult Function(ServiceSelectionEvent value)? selectService, TResult Function(ServiceResetEvent value)? resetSelected, required TResult orElse(), @@ -164,7 +165,7 @@ class _$ServiceCreateEventImpl implements ServiceCreateEvent { required TResult Function(ServiceModel serviceModel) create, required TResult Function(ServiceSearchModel serviceSearchModel) search, required TResult Function(String value, bool submitTriggered) - multichecklistChanged, + multiSurveyFormChanged, required TResult Function(ServiceModel service) selectService, required TResult Function(List serviceList) resetSelected, }) { @@ -177,7 +178,7 @@ class _$ServiceCreateEventImpl implements ServiceCreateEvent { TResult? Function(ServiceModel serviceModel)? create, TResult? Function(ServiceSearchModel serviceSearchModel)? search, TResult? Function(String value, bool submitTriggered)? - multichecklistChanged, + multiSurveyFormChanged, TResult? Function(ServiceModel service)? selectService, TResult? Function(List serviceList)? resetSelected, }) { @@ -189,7 +190,8 @@ class _$ServiceCreateEventImpl implements ServiceCreateEvent { TResult maybeWhen({ TResult Function(ServiceModel serviceModel)? create, TResult Function(ServiceSearchModel serviceSearchModel)? search, - TResult Function(String value, bool submitTriggered)? multichecklistChanged, + TResult Function(String value, bool submitTriggered)? + multiSurveyFormChanged, TResult Function(ServiceModel service)? selectService, TResult Function(List serviceList)? resetSelected, required TResult orElse(), @@ -205,8 +207,8 @@ class _$ServiceCreateEventImpl implements ServiceCreateEvent { TResult map({ required TResult Function(ServiceCreateEvent value) create, required TResult Function(ServiceSearchEvent value) search, - required TResult Function(ServiceChecklistEvent value) - multichecklistChanged, + required TResult Function(ServiceSurveyFormEvent value) + multiSurveyFormChanged, required TResult Function(ServiceSelectionEvent value) selectService, required TResult Function(ServiceResetEvent value) resetSelected, }) { @@ -218,7 +220,7 @@ class _$ServiceCreateEventImpl implements ServiceCreateEvent { TResult? mapOrNull({ TResult? Function(ServiceCreateEvent value)? create, TResult? Function(ServiceSearchEvent value)? search, - TResult? Function(ServiceChecklistEvent value)? multichecklistChanged, + TResult? Function(ServiceSurveyFormEvent value)? multiSurveyFormChanged, TResult? Function(ServiceSelectionEvent value)? selectService, TResult? Function(ServiceResetEvent value)? resetSelected, }) { @@ -230,7 +232,7 @@ class _$ServiceCreateEventImpl implements ServiceCreateEvent { TResult maybeMap({ TResult Function(ServiceCreateEvent value)? create, TResult Function(ServiceSearchEvent value)? search, - TResult Function(ServiceChecklistEvent value)? multichecklistChanged, + TResult Function(ServiceSurveyFormEvent value)? multiSurveyFormChanged, TResult Function(ServiceSelectionEvent value)? selectService, TResult Function(ServiceResetEvent value)? resetSelected, required TResult orElse(), @@ -321,7 +323,7 @@ class _$ServiceSearchEventImpl implements ServiceSearchEvent { required TResult Function(ServiceModel serviceModel) create, required TResult Function(ServiceSearchModel serviceSearchModel) search, required TResult Function(String value, bool submitTriggered) - multichecklistChanged, + multiSurveyFormChanged, required TResult Function(ServiceModel service) selectService, required TResult Function(List serviceList) resetSelected, }) { @@ -334,7 +336,7 @@ class _$ServiceSearchEventImpl implements ServiceSearchEvent { TResult? Function(ServiceModel serviceModel)? create, TResult? Function(ServiceSearchModel serviceSearchModel)? search, TResult? Function(String value, bool submitTriggered)? - multichecklistChanged, + multiSurveyFormChanged, TResult? Function(ServiceModel service)? selectService, TResult? Function(List serviceList)? resetSelected, }) { @@ -346,7 +348,8 @@ class _$ServiceSearchEventImpl implements ServiceSearchEvent { TResult maybeWhen({ TResult Function(ServiceModel serviceModel)? create, TResult Function(ServiceSearchModel serviceSearchModel)? search, - TResult Function(String value, bool submitTriggered)? multichecklistChanged, + TResult Function(String value, bool submitTriggered)? + multiSurveyFormChanged, TResult Function(ServiceModel service)? selectService, TResult Function(List serviceList)? resetSelected, required TResult orElse(), @@ -362,8 +365,8 @@ class _$ServiceSearchEventImpl implements ServiceSearchEvent { TResult map({ required TResult Function(ServiceCreateEvent value) create, required TResult Function(ServiceSearchEvent value) search, - required TResult Function(ServiceChecklistEvent value) - multichecklistChanged, + required TResult Function(ServiceSurveyFormEvent value) + multiSurveyFormChanged, required TResult Function(ServiceSelectionEvent value) selectService, required TResult Function(ServiceResetEvent value) resetSelected, }) { @@ -375,7 +378,7 @@ class _$ServiceSearchEventImpl implements ServiceSearchEvent { TResult? mapOrNull({ TResult? Function(ServiceCreateEvent value)? create, TResult? Function(ServiceSearchEvent value)? search, - TResult? Function(ServiceChecklistEvent value)? multichecklistChanged, + TResult? Function(ServiceSurveyFormEvent value)? multiSurveyFormChanged, TResult? Function(ServiceSelectionEvent value)? selectService, TResult? Function(ServiceResetEvent value)? resetSelected, }) { @@ -387,7 +390,7 @@ class _$ServiceSearchEventImpl implements ServiceSearchEvent { TResult maybeMap({ TResult Function(ServiceCreateEvent value)? create, TResult Function(ServiceSearchEvent value)? search, - TResult Function(ServiceChecklistEvent value)? multichecklistChanged, + TResult Function(ServiceSurveyFormEvent value)? multiSurveyFormChanged, TResult Function(ServiceSelectionEvent value)? selectService, TResult Function(ServiceResetEvent value)? resetSelected, required TResult orElse(), @@ -411,21 +414,22 @@ abstract class ServiceSearchEvent implements ServiceEvent { } /// @nodoc -abstract class _$$ServiceChecklistEventImplCopyWith<$Res> { - factory _$$ServiceChecklistEventImplCopyWith( - _$ServiceChecklistEventImpl value, - $Res Function(_$ServiceChecklistEventImpl) then) = - __$$ServiceChecklistEventImplCopyWithImpl<$Res>; +abstract class _$$ServiceSurveyFormEventImplCopyWith<$Res> { + factory _$$ServiceSurveyFormEventImplCopyWith( + _$ServiceSurveyFormEventImpl value, + $Res Function(_$ServiceSurveyFormEventImpl) then) = + __$$ServiceSurveyFormEventImplCopyWithImpl<$Res>; @useResult $Res call({String value, bool submitTriggered}); } /// @nodoc -class __$$ServiceChecklistEventImplCopyWithImpl<$Res> - extends _$ServiceEventCopyWithImpl<$Res, _$ServiceChecklistEventImpl> - implements _$$ServiceChecklistEventImplCopyWith<$Res> { - __$$ServiceChecklistEventImplCopyWithImpl(_$ServiceChecklistEventImpl _value, - $Res Function(_$ServiceChecklistEventImpl) _then) +class __$$ServiceSurveyFormEventImplCopyWithImpl<$Res> + extends _$ServiceEventCopyWithImpl<$Res, _$ServiceSurveyFormEventImpl> + implements _$$ServiceSurveyFormEventImplCopyWith<$Res> { + __$$ServiceSurveyFormEventImplCopyWithImpl( + _$ServiceSurveyFormEventImpl _value, + $Res Function(_$ServiceSurveyFormEventImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -434,7 +438,7 @@ class __$$ServiceChecklistEventImplCopyWithImpl<$Res> Object? value = null, Object? submitTriggered = null, }) { - return _then(_$ServiceChecklistEventImpl( + return _then(_$ServiceSurveyFormEventImpl( value: null == value ? _value.value : value // ignore: cast_nullable_to_non_nullable @@ -449,8 +453,8 @@ class __$$ServiceChecklistEventImplCopyWithImpl<$Res> /// @nodoc -class _$ServiceChecklistEventImpl implements ServiceChecklistEvent { - const _$ServiceChecklistEventImpl( +class _$ServiceSurveyFormEventImpl implements ServiceSurveyFormEvent { + const _$ServiceSurveyFormEventImpl( {required this.value, required this.submitTriggered}); @override @@ -460,14 +464,14 @@ class _$ServiceChecklistEventImpl implements ServiceChecklistEvent { @override String toString() { - return 'ServiceEvent.multichecklistChanged(value: $value, submitTriggered: $submitTriggered)'; + return 'ServiceEvent.multiSurveyFormChanged(value: $value, submitTriggered: $submitTriggered)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$ServiceChecklistEventImpl && + other is _$ServiceSurveyFormEventImpl && (identical(other.value, value) || other.value == value) && (identical(other.submitTriggered, submitTriggered) || other.submitTriggered == submitTriggered)); @@ -479,9 +483,9 @@ class _$ServiceChecklistEventImpl implements ServiceChecklistEvent { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$ServiceChecklistEventImplCopyWith<_$ServiceChecklistEventImpl> - get copyWith => __$$ServiceChecklistEventImplCopyWithImpl< - _$ServiceChecklistEventImpl>(this, _$identity); + _$$ServiceSurveyFormEventImplCopyWith<_$ServiceSurveyFormEventImpl> + get copyWith => __$$ServiceSurveyFormEventImplCopyWithImpl< + _$ServiceSurveyFormEventImpl>(this, _$identity); @override @optionalTypeArgs @@ -489,11 +493,11 @@ class _$ServiceChecklistEventImpl implements ServiceChecklistEvent { required TResult Function(ServiceModel serviceModel) create, required TResult Function(ServiceSearchModel serviceSearchModel) search, required TResult Function(String value, bool submitTriggered) - multichecklistChanged, + multiSurveyFormChanged, required TResult Function(ServiceModel service) selectService, required TResult Function(List serviceList) resetSelected, }) { - return multichecklistChanged(value, submitTriggered); + return multiSurveyFormChanged(value, submitTriggered); } @override @@ -502,11 +506,11 @@ class _$ServiceChecklistEventImpl implements ServiceChecklistEvent { TResult? Function(ServiceModel serviceModel)? create, TResult? Function(ServiceSearchModel serviceSearchModel)? search, TResult? Function(String value, bool submitTriggered)? - multichecklistChanged, + multiSurveyFormChanged, TResult? Function(ServiceModel service)? selectService, TResult? Function(List serviceList)? resetSelected, }) { - return multichecklistChanged?.call(value, submitTriggered); + return multiSurveyFormChanged?.call(value, submitTriggered); } @override @@ -514,13 +518,14 @@ class _$ServiceChecklistEventImpl implements ServiceChecklistEvent { TResult maybeWhen({ TResult Function(ServiceModel serviceModel)? create, TResult Function(ServiceSearchModel serviceSearchModel)? search, - TResult Function(String value, bool submitTriggered)? multichecklistChanged, + TResult Function(String value, bool submitTriggered)? + multiSurveyFormChanged, TResult Function(ServiceModel service)? selectService, TResult Function(List serviceList)? resetSelected, required TResult orElse(), }) { - if (multichecklistChanged != null) { - return multichecklistChanged(value, submitTriggered); + if (multiSurveyFormChanged != null) { + return multiSurveyFormChanged(value, submitTriggered); } return orElse(); } @@ -530,12 +535,12 @@ class _$ServiceChecklistEventImpl implements ServiceChecklistEvent { TResult map({ required TResult Function(ServiceCreateEvent value) create, required TResult Function(ServiceSearchEvent value) search, - required TResult Function(ServiceChecklistEvent value) - multichecklistChanged, + required TResult Function(ServiceSurveyFormEvent value) + multiSurveyFormChanged, required TResult Function(ServiceSelectionEvent value) selectService, required TResult Function(ServiceResetEvent value) resetSelected, }) { - return multichecklistChanged(this); + return multiSurveyFormChanged(this); } @override @@ -543,11 +548,11 @@ class _$ServiceChecklistEventImpl implements ServiceChecklistEvent { TResult? mapOrNull({ TResult? Function(ServiceCreateEvent value)? create, TResult? Function(ServiceSearchEvent value)? search, - TResult? Function(ServiceChecklistEvent value)? multichecklistChanged, + TResult? Function(ServiceSurveyFormEvent value)? multiSurveyFormChanged, TResult? Function(ServiceSelectionEvent value)? selectService, TResult? Function(ServiceResetEvent value)? resetSelected, }) { - return multichecklistChanged?.call(this); + return multiSurveyFormChanged?.call(this); } @override @@ -555,27 +560,27 @@ class _$ServiceChecklistEventImpl implements ServiceChecklistEvent { TResult maybeMap({ TResult Function(ServiceCreateEvent value)? create, TResult Function(ServiceSearchEvent value)? search, - TResult Function(ServiceChecklistEvent value)? multichecklistChanged, + TResult Function(ServiceSurveyFormEvent value)? multiSurveyFormChanged, TResult Function(ServiceSelectionEvent value)? selectService, TResult Function(ServiceResetEvent value)? resetSelected, required TResult orElse(), }) { - if (multichecklistChanged != null) { - return multichecklistChanged(this); + if (multiSurveyFormChanged != null) { + return multiSurveyFormChanged(this); } return orElse(); } } -abstract class ServiceChecklistEvent implements ServiceEvent { - const factory ServiceChecklistEvent( +abstract class ServiceSurveyFormEvent implements ServiceEvent { + const factory ServiceSurveyFormEvent( {required final String value, - required final bool submitTriggered}) = _$ServiceChecklistEventImpl; + required final bool submitTriggered}) = _$ServiceSurveyFormEventImpl; String get value; bool get submitTriggered; @JsonKey(ignore: true) - _$$ServiceChecklistEventImplCopyWith<_$ServiceChecklistEventImpl> + _$$ServiceSurveyFormEventImplCopyWith<_$ServiceSurveyFormEventImpl> get copyWith => throw _privateConstructorUsedError; } @@ -648,7 +653,7 @@ class _$ServiceSelectionEventImpl implements ServiceSelectionEvent { required TResult Function(ServiceModel serviceModel) create, required TResult Function(ServiceSearchModel serviceSearchModel) search, required TResult Function(String value, bool submitTriggered) - multichecklistChanged, + multiSurveyFormChanged, required TResult Function(ServiceModel service) selectService, required TResult Function(List serviceList) resetSelected, }) { @@ -661,7 +666,7 @@ class _$ServiceSelectionEventImpl implements ServiceSelectionEvent { TResult? Function(ServiceModel serviceModel)? create, TResult? Function(ServiceSearchModel serviceSearchModel)? search, TResult? Function(String value, bool submitTriggered)? - multichecklistChanged, + multiSurveyFormChanged, TResult? Function(ServiceModel service)? selectService, TResult? Function(List serviceList)? resetSelected, }) { @@ -673,7 +678,8 @@ class _$ServiceSelectionEventImpl implements ServiceSelectionEvent { TResult maybeWhen({ TResult Function(ServiceModel serviceModel)? create, TResult Function(ServiceSearchModel serviceSearchModel)? search, - TResult Function(String value, bool submitTriggered)? multichecklistChanged, + TResult Function(String value, bool submitTriggered)? + multiSurveyFormChanged, TResult Function(ServiceModel service)? selectService, TResult Function(List serviceList)? resetSelected, required TResult orElse(), @@ -689,8 +695,8 @@ class _$ServiceSelectionEventImpl implements ServiceSelectionEvent { TResult map({ required TResult Function(ServiceCreateEvent value) create, required TResult Function(ServiceSearchEvent value) search, - required TResult Function(ServiceChecklistEvent value) - multichecklistChanged, + required TResult Function(ServiceSurveyFormEvent value) + multiSurveyFormChanged, required TResult Function(ServiceSelectionEvent value) selectService, required TResult Function(ServiceResetEvent value) resetSelected, }) { @@ -702,7 +708,7 @@ class _$ServiceSelectionEventImpl implements ServiceSelectionEvent { TResult? mapOrNull({ TResult? Function(ServiceCreateEvent value)? create, TResult? Function(ServiceSearchEvent value)? search, - TResult? Function(ServiceChecklistEvent value)? multichecklistChanged, + TResult? Function(ServiceSurveyFormEvent value)? multiSurveyFormChanged, TResult? Function(ServiceSelectionEvent value)? selectService, TResult? Function(ServiceResetEvent value)? resetSelected, }) { @@ -714,7 +720,7 @@ class _$ServiceSelectionEventImpl implements ServiceSelectionEvent { TResult maybeMap({ TResult Function(ServiceCreateEvent value)? create, TResult Function(ServiceSearchEvent value)? search, - TResult Function(ServiceChecklistEvent value)? multichecklistChanged, + TResult Function(ServiceSurveyFormEvent value)? multiSurveyFormChanged, TResult Function(ServiceSelectionEvent value)? selectService, TResult Function(ServiceResetEvent value)? resetSelected, required TResult orElse(), @@ -812,7 +818,7 @@ class _$ServiceResetEventImpl implements ServiceResetEvent { required TResult Function(ServiceModel serviceModel) create, required TResult Function(ServiceSearchModel serviceSearchModel) search, required TResult Function(String value, bool submitTriggered) - multichecklistChanged, + multiSurveyFormChanged, required TResult Function(ServiceModel service) selectService, required TResult Function(List serviceList) resetSelected, }) { @@ -825,7 +831,7 @@ class _$ServiceResetEventImpl implements ServiceResetEvent { TResult? Function(ServiceModel serviceModel)? create, TResult? Function(ServiceSearchModel serviceSearchModel)? search, TResult? Function(String value, bool submitTriggered)? - multichecklistChanged, + multiSurveyFormChanged, TResult? Function(ServiceModel service)? selectService, TResult? Function(List serviceList)? resetSelected, }) { @@ -837,7 +843,8 @@ class _$ServiceResetEventImpl implements ServiceResetEvent { TResult maybeWhen({ TResult Function(ServiceModel serviceModel)? create, TResult Function(ServiceSearchModel serviceSearchModel)? search, - TResult Function(String value, bool submitTriggered)? multichecklistChanged, + TResult Function(String value, bool submitTriggered)? + multiSurveyFormChanged, TResult Function(ServiceModel service)? selectService, TResult Function(List serviceList)? resetSelected, required TResult orElse(), @@ -853,8 +860,8 @@ class _$ServiceResetEventImpl implements ServiceResetEvent { TResult map({ required TResult Function(ServiceCreateEvent value) create, required TResult Function(ServiceSearchEvent value) search, - required TResult Function(ServiceChecklistEvent value) - multichecklistChanged, + required TResult Function(ServiceSurveyFormEvent value) + multiSurveyFormChanged, required TResult Function(ServiceSelectionEvent value) selectService, required TResult Function(ServiceResetEvent value) resetSelected, }) { @@ -866,7 +873,7 @@ class _$ServiceResetEventImpl implements ServiceResetEvent { TResult? mapOrNull({ TResult? Function(ServiceCreateEvent value)? create, TResult? Function(ServiceSearchEvent value)? search, - TResult? Function(ServiceChecklistEvent value)? multichecklistChanged, + TResult? Function(ServiceSurveyFormEvent value)? multiSurveyFormChanged, TResult? Function(ServiceSelectionEvent value)? selectService, TResult? Function(ServiceResetEvent value)? resetSelected, }) { @@ -878,7 +885,7 @@ class _$ServiceResetEventImpl implements ServiceResetEvent { TResult maybeMap({ TResult Function(ServiceCreateEvent value)? create, TResult Function(ServiceSearchEvent value)? search, - TResult Function(ServiceChecklistEvent value)? multichecklistChanged, + TResult Function(ServiceSurveyFormEvent value)? multiSurveyFormChanged, TResult Function(ServiceSelectionEvent value)? selectService, TResult Function(ServiceResetEvent value)? resetSelected, required TResult orElse(), @@ -908,7 +915,7 @@ mixin _$ServiceState { required TResult Function() empty, required TResult Function() isloading, required TResult Function(String value, bool submitTriggered) - multichecklistChanged, + multiSurveyFormChanged, required TResult Function(ServiceModel serviceList, ServiceModel? selectedService, bool loading, bool isEditing) serviceCreate, @@ -922,7 +929,7 @@ mixin _$ServiceState { TResult? Function()? empty, TResult? Function()? isloading, TResult? Function(String value, bool submitTriggered)? - multichecklistChanged, + multiSurveyFormChanged, TResult? Function(ServiceModel serviceList, ServiceModel? selectedService, bool loading, bool isEditing)? serviceCreate, @@ -935,7 +942,8 @@ mixin _$ServiceState { TResult maybeWhen({ TResult Function()? empty, TResult Function()? isloading, - TResult Function(String value, bool submitTriggered)? multichecklistChanged, + TResult Function(String value, bool submitTriggered)? + multiSurveyFormChanged, TResult Function(ServiceModel serviceList, ServiceModel? selectedService, bool loading, bool isEditing)? serviceCreate, @@ -949,8 +957,8 @@ mixin _$ServiceState { TResult map({ required TResult Function(ServiceEmptyState value) empty, required TResult Function(ServiceIsloadingState value) isloading, - required TResult Function(ServiceMultichecklistChangedState value) - multichecklistChanged, + required TResult Function(ServiceMultiSurveyFormChangedState value) + multiSurveyFormChanged, required TResult Function(ServiceCreateState value) serviceCreate, required TResult Function(ServiceSearchState value) serviceSearch, }) => @@ -959,8 +967,8 @@ mixin _$ServiceState { TResult? mapOrNull({ TResult? Function(ServiceEmptyState value)? empty, TResult? Function(ServiceIsloadingState value)? isloading, - TResult? Function(ServiceMultichecklistChangedState value)? - multichecklistChanged, + TResult? Function(ServiceMultiSurveyFormChangedState value)? + multiSurveyFormChanged, TResult? Function(ServiceCreateState value)? serviceCreate, TResult? Function(ServiceSearchState value)? serviceSearch, }) => @@ -969,8 +977,8 @@ mixin _$ServiceState { TResult maybeMap({ TResult Function(ServiceEmptyState value)? empty, TResult Function(ServiceIsloadingState value)? isloading, - TResult Function(ServiceMultichecklistChangedState value)? - multichecklistChanged, + TResult Function(ServiceMultiSurveyFormChangedState value)? + multiSurveyFormChanged, TResult Function(ServiceCreateState value)? serviceCreate, TResult Function(ServiceSearchState value)? serviceSearch, required TResult orElse(), @@ -1037,7 +1045,7 @@ class _$ServiceEmptyStateImpl implements ServiceEmptyState { required TResult Function() empty, required TResult Function() isloading, required TResult Function(String value, bool submitTriggered) - multichecklistChanged, + multiSurveyFormChanged, required TResult Function(ServiceModel serviceList, ServiceModel? selectedService, bool loading, bool isEditing) serviceCreate, @@ -1054,7 +1062,7 @@ class _$ServiceEmptyStateImpl implements ServiceEmptyState { TResult? Function()? empty, TResult? Function()? isloading, TResult? Function(String value, bool submitTriggered)? - multichecklistChanged, + multiSurveyFormChanged, TResult? Function(ServiceModel serviceList, ServiceModel? selectedService, bool loading, bool isEditing)? serviceCreate, @@ -1070,7 +1078,8 @@ class _$ServiceEmptyStateImpl implements ServiceEmptyState { TResult maybeWhen({ TResult Function()? empty, TResult Function()? isloading, - TResult Function(String value, bool submitTriggered)? multichecklistChanged, + TResult Function(String value, bool submitTriggered)? + multiSurveyFormChanged, TResult Function(ServiceModel serviceList, ServiceModel? selectedService, bool loading, bool isEditing)? serviceCreate, @@ -1090,8 +1099,8 @@ class _$ServiceEmptyStateImpl implements ServiceEmptyState { TResult map({ required TResult Function(ServiceEmptyState value) empty, required TResult Function(ServiceIsloadingState value) isloading, - required TResult Function(ServiceMultichecklistChangedState value) - multichecklistChanged, + required TResult Function(ServiceMultiSurveyFormChangedState value) + multiSurveyFormChanged, required TResult Function(ServiceCreateState value) serviceCreate, required TResult Function(ServiceSearchState value) serviceSearch, }) { @@ -1103,8 +1112,8 @@ class _$ServiceEmptyStateImpl implements ServiceEmptyState { TResult? mapOrNull({ TResult? Function(ServiceEmptyState value)? empty, TResult? Function(ServiceIsloadingState value)? isloading, - TResult? Function(ServiceMultichecklistChangedState value)? - multichecklistChanged, + TResult? Function(ServiceMultiSurveyFormChangedState value)? + multiSurveyFormChanged, TResult? Function(ServiceCreateState value)? serviceCreate, TResult? Function(ServiceSearchState value)? serviceSearch, }) { @@ -1116,8 +1125,8 @@ class _$ServiceEmptyStateImpl implements ServiceEmptyState { TResult maybeMap({ TResult Function(ServiceEmptyState value)? empty, TResult Function(ServiceIsloadingState value)? isloading, - TResult Function(ServiceMultichecklistChangedState value)? - multichecklistChanged, + TResult Function(ServiceMultiSurveyFormChangedState value)? + multiSurveyFormChanged, TResult Function(ServiceCreateState value)? serviceCreate, TResult Function(ServiceSearchState value)? serviceSearch, required TResult orElse(), @@ -1176,7 +1185,7 @@ class _$ServiceIsloadingStateImpl implements ServiceIsloadingState { required TResult Function() empty, required TResult Function() isloading, required TResult Function(String value, bool submitTriggered) - multichecklistChanged, + multiSurveyFormChanged, required TResult Function(ServiceModel serviceList, ServiceModel? selectedService, bool loading, bool isEditing) serviceCreate, @@ -1193,7 +1202,7 @@ class _$ServiceIsloadingStateImpl implements ServiceIsloadingState { TResult? Function()? empty, TResult? Function()? isloading, TResult? Function(String value, bool submitTriggered)? - multichecklistChanged, + multiSurveyFormChanged, TResult? Function(ServiceModel serviceList, ServiceModel? selectedService, bool loading, bool isEditing)? serviceCreate, @@ -1209,7 +1218,8 @@ class _$ServiceIsloadingStateImpl implements ServiceIsloadingState { TResult maybeWhen({ TResult Function()? empty, TResult Function()? isloading, - TResult Function(String value, bool submitTriggered)? multichecklistChanged, + TResult Function(String value, bool submitTriggered)? + multiSurveyFormChanged, TResult Function(ServiceModel serviceList, ServiceModel? selectedService, bool loading, bool isEditing)? serviceCreate, @@ -1229,8 +1239,8 @@ class _$ServiceIsloadingStateImpl implements ServiceIsloadingState { TResult map({ required TResult Function(ServiceEmptyState value) empty, required TResult Function(ServiceIsloadingState value) isloading, - required TResult Function(ServiceMultichecklistChangedState value) - multichecklistChanged, + required TResult Function(ServiceMultiSurveyFormChangedState value) + multiSurveyFormChanged, required TResult Function(ServiceCreateState value) serviceCreate, required TResult Function(ServiceSearchState value) serviceSearch, }) { @@ -1242,8 +1252,8 @@ class _$ServiceIsloadingStateImpl implements ServiceIsloadingState { TResult? mapOrNull({ TResult? Function(ServiceEmptyState value)? empty, TResult? Function(ServiceIsloadingState value)? isloading, - TResult? Function(ServiceMultichecklistChangedState value)? - multichecklistChanged, + TResult? Function(ServiceMultiSurveyFormChangedState value)? + multiSurveyFormChanged, TResult? Function(ServiceCreateState value)? serviceCreate, TResult? Function(ServiceSearchState value)? serviceSearch, }) { @@ -1255,8 +1265,8 @@ class _$ServiceIsloadingStateImpl implements ServiceIsloadingState { TResult maybeMap({ TResult Function(ServiceEmptyState value)? empty, TResult Function(ServiceIsloadingState value)? isloading, - TResult Function(ServiceMultichecklistChangedState value)? - multichecklistChanged, + TResult Function(ServiceMultiSurveyFormChangedState value)? + multiSurveyFormChanged, TResult Function(ServiceCreateState value)? serviceCreate, TResult Function(ServiceSearchState value)? serviceSearch, required TResult orElse(), @@ -1273,23 +1283,23 @@ abstract class ServiceIsloadingState implements ServiceState { } /// @nodoc -abstract class _$$ServiceMultichecklistChangedStateImplCopyWith<$Res> { - factory _$$ServiceMultichecklistChangedStateImplCopyWith( - _$ServiceMultichecklistChangedStateImpl value, - $Res Function(_$ServiceMultichecklistChangedStateImpl) then) = - __$$ServiceMultichecklistChangedStateImplCopyWithImpl<$Res>; +abstract class _$$ServiceMultiSurveyFormChangedStateImplCopyWith<$Res> { + factory _$$ServiceMultiSurveyFormChangedStateImplCopyWith( + _$ServiceMultiSurveyFormChangedStateImpl value, + $Res Function(_$ServiceMultiSurveyFormChangedStateImpl) then) = + __$$ServiceMultiSurveyFormChangedStateImplCopyWithImpl<$Res>; @useResult $Res call({String value, bool submitTriggered}); } /// @nodoc -class __$$ServiceMultichecklistChangedStateImplCopyWithImpl<$Res> +class __$$ServiceMultiSurveyFormChangedStateImplCopyWithImpl<$Res> extends _$ServiceStateCopyWithImpl<$Res, - _$ServiceMultichecklistChangedStateImpl> - implements _$$ServiceMultichecklistChangedStateImplCopyWith<$Res> { - __$$ServiceMultichecklistChangedStateImplCopyWithImpl( - _$ServiceMultichecklistChangedStateImpl _value, - $Res Function(_$ServiceMultichecklistChangedStateImpl) _then) + _$ServiceMultiSurveyFormChangedStateImpl> + implements _$$ServiceMultiSurveyFormChangedStateImplCopyWith<$Res> { + __$$ServiceMultiSurveyFormChangedStateImplCopyWithImpl( + _$ServiceMultiSurveyFormChangedStateImpl _value, + $Res Function(_$ServiceMultiSurveyFormChangedStateImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -1298,7 +1308,7 @@ class __$$ServiceMultichecklistChangedStateImplCopyWithImpl<$Res> Object? value = null, Object? submitTriggered = null, }) { - return _then(_$ServiceMultichecklistChangedStateImpl( + return _then(_$ServiceMultiSurveyFormChangedStateImpl( value: null == value ? _value.value : value // ignore: cast_nullable_to_non_nullable @@ -1313,9 +1323,9 @@ class __$$ServiceMultichecklistChangedStateImplCopyWithImpl<$Res> /// @nodoc -class _$ServiceMultichecklistChangedStateImpl - implements ServiceMultichecklistChangedState { - const _$ServiceMultichecklistChangedStateImpl( +class _$ServiceMultiSurveyFormChangedStateImpl + implements ServiceMultiSurveyFormChangedState { + const _$ServiceMultiSurveyFormChangedStateImpl( {this.value = '', this.submitTriggered = false}); @override @@ -1327,14 +1337,14 @@ class _$ServiceMultichecklistChangedStateImpl @override String toString() { - return 'ServiceState.multichecklistChanged(value: $value, submitTriggered: $submitTriggered)'; + return 'ServiceState.multiSurveyFormChanged(value: $value, submitTriggered: $submitTriggered)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$ServiceMultichecklistChangedStateImpl && + other is _$ServiceMultiSurveyFormChangedStateImpl && (identical(other.value, value) || other.value == value) && (identical(other.submitTriggered, submitTriggered) || other.submitTriggered == submitTriggered)); @@ -1346,10 +1356,10 @@ class _$ServiceMultichecklistChangedStateImpl @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$ServiceMultichecklistChangedStateImplCopyWith< - _$ServiceMultichecklistChangedStateImpl> - get copyWith => __$$ServiceMultichecklistChangedStateImplCopyWithImpl< - _$ServiceMultichecklistChangedStateImpl>(this, _$identity); + _$$ServiceMultiSurveyFormChangedStateImplCopyWith< + _$ServiceMultiSurveyFormChangedStateImpl> + get copyWith => __$$ServiceMultiSurveyFormChangedStateImplCopyWithImpl< + _$ServiceMultiSurveyFormChangedStateImpl>(this, _$identity); @override @optionalTypeArgs @@ -1357,7 +1367,7 @@ class _$ServiceMultichecklistChangedStateImpl required TResult Function() empty, required TResult Function() isloading, required TResult Function(String value, bool submitTriggered) - multichecklistChanged, + multiSurveyFormChanged, required TResult Function(ServiceModel serviceList, ServiceModel? selectedService, bool loading, bool isEditing) serviceCreate, @@ -1365,7 +1375,7 @@ class _$ServiceMultichecklistChangedStateImpl ServiceModel? selectedService, bool loading) serviceSearch, }) { - return multichecklistChanged(value, submitTriggered); + return multiSurveyFormChanged(value, submitTriggered); } @override @@ -1374,7 +1384,7 @@ class _$ServiceMultichecklistChangedStateImpl TResult? Function()? empty, TResult? Function()? isloading, TResult? Function(String value, bool submitTriggered)? - multichecklistChanged, + multiSurveyFormChanged, TResult? Function(ServiceModel serviceList, ServiceModel? selectedService, bool loading, bool isEditing)? serviceCreate, @@ -1382,7 +1392,7 @@ class _$ServiceMultichecklistChangedStateImpl ServiceModel? selectedService, bool loading)? serviceSearch, }) { - return multichecklistChanged?.call(value, submitTriggered); + return multiSurveyFormChanged?.call(value, submitTriggered); } @override @@ -1390,7 +1400,8 @@ class _$ServiceMultichecklistChangedStateImpl TResult maybeWhen({ TResult Function()? empty, TResult Function()? isloading, - TResult Function(String value, bool submitTriggered)? multichecklistChanged, + TResult Function(String value, bool submitTriggered)? + multiSurveyFormChanged, TResult Function(ServiceModel serviceList, ServiceModel? selectedService, bool loading, bool isEditing)? serviceCreate, @@ -1399,8 +1410,8 @@ class _$ServiceMultichecklistChangedStateImpl serviceSearch, required TResult orElse(), }) { - if (multichecklistChanged != null) { - return multichecklistChanged(value, submitTriggered); + if (multiSurveyFormChanged != null) { + return multiSurveyFormChanged(value, submitTriggered); } return orElse(); } @@ -1410,12 +1421,12 @@ class _$ServiceMultichecklistChangedStateImpl TResult map({ required TResult Function(ServiceEmptyState value) empty, required TResult Function(ServiceIsloadingState value) isloading, - required TResult Function(ServiceMultichecklistChangedState value) - multichecklistChanged, + required TResult Function(ServiceMultiSurveyFormChangedState value) + multiSurveyFormChanged, required TResult Function(ServiceCreateState value) serviceCreate, required TResult Function(ServiceSearchState value) serviceSearch, }) { - return multichecklistChanged(this); + return multiSurveyFormChanged(this); } @override @@ -1423,12 +1434,12 @@ class _$ServiceMultichecklistChangedStateImpl TResult? mapOrNull({ TResult? Function(ServiceEmptyState value)? empty, TResult? Function(ServiceIsloadingState value)? isloading, - TResult? Function(ServiceMultichecklistChangedState value)? - multichecklistChanged, + TResult? Function(ServiceMultiSurveyFormChangedState value)? + multiSurveyFormChanged, TResult? Function(ServiceCreateState value)? serviceCreate, TResult? Function(ServiceSearchState value)? serviceSearch, }) { - return multichecklistChanged?.call(this); + return multiSurveyFormChanged?.call(this); } @override @@ -1436,29 +1447,29 @@ class _$ServiceMultichecklistChangedStateImpl TResult maybeMap({ TResult Function(ServiceEmptyState value)? empty, TResult Function(ServiceIsloadingState value)? isloading, - TResult Function(ServiceMultichecklistChangedState value)? - multichecklistChanged, + TResult Function(ServiceMultiSurveyFormChangedState value)? + multiSurveyFormChanged, TResult Function(ServiceCreateState value)? serviceCreate, TResult Function(ServiceSearchState value)? serviceSearch, required TResult orElse(), }) { - if (multichecklistChanged != null) { - return multichecklistChanged(this); + if (multiSurveyFormChanged != null) { + return multiSurveyFormChanged(this); } return orElse(); } } -abstract class ServiceMultichecklistChangedState implements ServiceState { - const factory ServiceMultichecklistChangedState( +abstract class ServiceMultiSurveyFormChangedState implements ServiceState { + const factory ServiceMultiSurveyFormChangedState( {final String value, - final bool submitTriggered}) = _$ServiceMultichecklistChangedStateImpl; + final bool submitTriggered}) = _$ServiceMultiSurveyFormChangedStateImpl; String get value; bool get submitTriggered; @JsonKey(ignore: true) - _$$ServiceMultichecklistChangedStateImplCopyWith< - _$ServiceMultichecklistChangedStateImpl> + _$$ServiceMultiSurveyFormChangedStateImplCopyWith< + _$ServiceMultiSurveyFormChangedStateImpl> get copyWith => throw _privateConstructorUsedError; } @@ -1568,7 +1579,7 @@ class _$ServiceCreateStateImpl implements ServiceCreateState { required TResult Function() empty, required TResult Function() isloading, required TResult Function(String value, bool submitTriggered) - multichecklistChanged, + multiSurveyFormChanged, required TResult Function(ServiceModel serviceList, ServiceModel? selectedService, bool loading, bool isEditing) serviceCreate, @@ -1585,7 +1596,7 @@ class _$ServiceCreateStateImpl implements ServiceCreateState { TResult? Function()? empty, TResult? Function()? isloading, TResult? Function(String value, bool submitTriggered)? - multichecklistChanged, + multiSurveyFormChanged, TResult? Function(ServiceModel serviceList, ServiceModel? selectedService, bool loading, bool isEditing)? serviceCreate, @@ -1602,7 +1613,8 @@ class _$ServiceCreateStateImpl implements ServiceCreateState { TResult maybeWhen({ TResult Function()? empty, TResult Function()? isloading, - TResult Function(String value, bool submitTriggered)? multichecklistChanged, + TResult Function(String value, bool submitTriggered)? + multiSurveyFormChanged, TResult Function(ServiceModel serviceList, ServiceModel? selectedService, bool loading, bool isEditing)? serviceCreate, @@ -1622,8 +1634,8 @@ class _$ServiceCreateStateImpl implements ServiceCreateState { TResult map({ required TResult Function(ServiceEmptyState value) empty, required TResult Function(ServiceIsloadingState value) isloading, - required TResult Function(ServiceMultichecklistChangedState value) - multichecklistChanged, + required TResult Function(ServiceMultiSurveyFormChangedState value) + multiSurveyFormChanged, required TResult Function(ServiceCreateState value) serviceCreate, required TResult Function(ServiceSearchState value) serviceSearch, }) { @@ -1635,8 +1647,8 @@ class _$ServiceCreateStateImpl implements ServiceCreateState { TResult? mapOrNull({ TResult? Function(ServiceEmptyState value)? empty, TResult? Function(ServiceIsloadingState value)? isloading, - TResult? Function(ServiceMultichecklistChangedState value)? - multichecklistChanged, + TResult? Function(ServiceMultiSurveyFormChangedState value)? + multiSurveyFormChanged, TResult? Function(ServiceCreateState value)? serviceCreate, TResult? Function(ServiceSearchState value)? serviceSearch, }) { @@ -1648,8 +1660,8 @@ class _$ServiceCreateStateImpl implements ServiceCreateState { TResult maybeMap({ TResult Function(ServiceEmptyState value)? empty, TResult Function(ServiceIsloadingState value)? isloading, - TResult Function(ServiceMultichecklistChangedState value)? - multichecklistChanged, + TResult Function(ServiceMultiSurveyFormChangedState value)? + multiSurveyFormChanged, TResult Function(ServiceCreateState value)? serviceCreate, TResult Function(ServiceSearchState value)? serviceSearch, required TResult orElse(), @@ -1781,7 +1793,7 @@ class _$ServiceSearchStateImpl implements ServiceSearchState { required TResult Function() empty, required TResult Function() isloading, required TResult Function(String value, bool submitTriggered) - multichecklistChanged, + multiSurveyFormChanged, required TResult Function(ServiceModel serviceList, ServiceModel? selectedService, bool loading, bool isEditing) serviceCreate, @@ -1798,7 +1810,7 @@ class _$ServiceSearchStateImpl implements ServiceSearchState { TResult? Function()? empty, TResult? Function()? isloading, TResult? Function(String value, bool submitTriggered)? - multichecklistChanged, + multiSurveyFormChanged, TResult? Function(ServiceModel serviceList, ServiceModel? selectedService, bool loading, bool isEditing)? serviceCreate, @@ -1814,7 +1826,8 @@ class _$ServiceSearchStateImpl implements ServiceSearchState { TResult maybeWhen({ TResult Function()? empty, TResult Function()? isloading, - TResult Function(String value, bool submitTriggered)? multichecklistChanged, + TResult Function(String value, bool submitTriggered)? + multiSurveyFormChanged, TResult Function(ServiceModel serviceList, ServiceModel? selectedService, bool loading, bool isEditing)? serviceCreate, @@ -1834,8 +1847,8 @@ class _$ServiceSearchStateImpl implements ServiceSearchState { TResult map({ required TResult Function(ServiceEmptyState value) empty, required TResult Function(ServiceIsloadingState value) isloading, - required TResult Function(ServiceMultichecklistChangedState value) - multichecklistChanged, + required TResult Function(ServiceMultiSurveyFormChangedState value) + multiSurveyFormChanged, required TResult Function(ServiceCreateState value) serviceCreate, required TResult Function(ServiceSearchState value) serviceSearch, }) { @@ -1847,8 +1860,8 @@ class _$ServiceSearchStateImpl implements ServiceSearchState { TResult? mapOrNull({ TResult? Function(ServiceEmptyState value)? empty, TResult? Function(ServiceIsloadingState value)? isloading, - TResult? Function(ServiceMultichecklistChangedState value)? - multichecklistChanged, + TResult? Function(ServiceMultiSurveyFormChangedState value)? + multiSurveyFormChanged, TResult? Function(ServiceCreateState value)? serviceCreate, TResult? Function(ServiceSearchState value)? serviceSearch, }) { @@ -1860,8 +1873,8 @@ class _$ServiceSearchStateImpl implements ServiceSearchState { TResult maybeMap({ TResult Function(ServiceEmptyState value)? empty, TResult Function(ServiceIsloadingState value)? isloading, - TResult Function(ServiceMultichecklistChangedState value)? - multichecklistChanged, + TResult Function(ServiceMultiSurveyFormChangedState value)? + multiSurveyFormChanged, TResult Function(ServiceCreateState value)? serviceCreate, TResult Function(ServiceSearchState value)? serviceSearch, required TResult orElse(), diff --git a/packages/digit_data_model/lib/blocs/service_definition/service_definition.dart b/packages/survey_form/lib/blocs/service_definition.dart similarity index 73% rename from packages/digit_data_model/lib/blocs/service_definition/service_definition.dart rename to packages/survey_form/lib/blocs/service_definition.dart index 357eba268..18c6a475d 100644 --- a/packages/digit_data_model/lib/blocs/service_definition/service_definition.dart +++ b/packages/survey_form/lib/blocs/service_definition.dart @@ -2,7 +2,7 @@ import 'dart:async'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; -import 'package:digit_data_model/data_model.dart'; +import 'package:survey_form/survey_form.dart'; import '../../utils/typedefs.dart'; @@ -14,32 +14,33 @@ class ServiceDefinitionBloc extends Bloc { final ServiceDefinitionDataRepository serviceDefinitionDataRepository; ServiceDefinitionBloc( - super.initialState, { - required this.serviceDefinitionDataRepository, - }) { + super.initialState, { + required this.serviceDefinitionDataRepository, + }) { on(_handleFetch); on(_handleSelect); } + // This function is called to fetch all the service definitions from the table for the selected project FutureOr _handleFetch( - ServiceDefinitionFetchEvent event, - ServiceDefinitionEmitter emit, - ) async { + ServiceDefinitionFetchEvent event, + ServiceDefinitionEmitter emit, + ) async { final results = await serviceDefinitionDataRepository.search( ServiceDefinitionSearchModel( - tenantId: DigitDataModelSingleton().tenantId, + tenantId: SurveyFormSingleton().tenantId, ), ); - emit(ServiceDefinitionServiceFetchedState( serviceDefinitionList: results, )); } + // Called when we select a service definition from the displayed list of service definition FutureOr _handleSelect( - ServiceDefinitionSelectionEvent event, - ServiceDefinitionEmitter emit, - ) async { + ServiceDefinitionSelectionEvent event, + ServiceDefinitionEmitter emit, + ) async { state.mapOrNull( serviceDefinitionFetch: (value) => emit(value.copyWith( selectedServiceDefinition: event.serviceDefinition, @@ -60,9 +61,13 @@ class ServiceDefinitionEvent with _$ServiceDefinitionEvent { class ServiceDefinitionState with _$ServiceDefinitionState { const factory ServiceDefinitionState.empty() = ServiceDefinitionEmptyState; const factory ServiceDefinitionState.isloading() = - ServiceDefinitionIsloadingState; + ServiceDefinitionIsloadingState; const factory ServiceDefinitionState.serviceDefinitionFetch({ required List serviceDefinitionList, ServiceDefinitionModel? selectedServiceDefinition, }) = ServiceDefinitionServiceFetchedState; } + + + + diff --git a/packages/digit_data_model/lib/blocs/service_definition/service_definition.freezed.dart b/packages/survey_form/lib/blocs/service_definition.freezed.dart similarity index 100% rename from packages/digit_data_model/lib/blocs/service_definition/service_definition.freezed.dart rename to packages/survey_form/lib/blocs/service_definition.freezed.dart diff --git a/packages/survey_form/lib/blocs/survey_form_localization_delegate.dart b/packages/survey_form/lib/blocs/survey_form_localization_delegate.dart new file mode 100644 index 000000000..544c0fc76 --- /dev/null +++ b/packages/survey_form/lib/blocs/survey_form_localization_delegate.dart @@ -0,0 +1,34 @@ +import 'package:flutter/material.dart'; + +import 'app_localization.dart'; + +class SurveyFormLocalizationDelegate + extends LocalizationsDelegate { + final Future localizedStrings; + final List languages; + + const SurveyFormLocalizationDelegate(this.localizedStrings, this.languages); + + @override + bool isSupported(Locale locale) { + return languages.map((e) { + final results = e.value.split('_'); + if (results.isNotEmpty) return results.first; + }).contains(locale.languageCode); + } + + @override + Future load(Locale locale) async { + SurveyFormLocalization localization = + SurveyFormLocalization(locale, localizedStrings, languages); + await localization.load(); + + return localization; + } + + @override + bool shouldReload( + covariant LocalizationsDelegate old) { + return true; + } +} diff --git a/packages/digit_data_model/lib/data/repositories/local/service.dart b/packages/survey_form/lib/data/repositories/local/service.dart similarity index 81% rename from packages/digit_data_model/lib/data/repositories/local/service.dart rename to packages/survey_form/lib/data/repositories/local/service.dart index 785c1d7e9..693d1bbac 100644 --- a/packages/digit_data_model/lib/data/repositories/local/service.dart +++ b/packages/survey_form/lib/data/repositories/local/service.dart @@ -2,12 +2,15 @@ import 'dart:async'; import 'package:collection/collection.dart'; import 'package:digit_data_model/data_model.dart'; + import 'package:drift/drift.dart'; +import 'package:survey_form/survey_form.dart'; class ServiceLocalRepository extends LocalRepository { ServiceLocalRepository(super.sql, super.opLogManager); + // function to create a Service entity in the local database @override FutureOr create( ServiceModel entity, { @@ -42,23 +45,10 @@ class ServiceLocalRepository serviceDefId: entity.serviceDefId, isActive: entity.isActive, accountId: entity.accountId, - additionalDetails: entity.additionalDetails, tenantId: entity.tenantId, isDeleted: entity.isDeleted, rowVersion: entity.rowVersion, - additionalFields: ServiceAdditionalFields( - version: 1, - fields: [ - AdditionalField( - 'clientCreatedTime', - DateTime.now().millisecondsSinceEpoch.toString(), - ), - AdditionalField( - 'clientCreatedBy', - entity.auditDetails?.createdBy, - ), - ], - ), + additionalFields: entity.additionalFields, auditDetails: entity.auditDetails, clientAuditDetails: entity.clientAuditDetails, attributes: entity.attributes?.map((e) { @@ -89,6 +79,7 @@ class ServiceLocalRepository }); } + //function to search Service entities corresponding to selected service definition from local database @override FutureOr> search( ServiceSearchModel query, @@ -124,16 +115,19 @@ class ServiceLocalRepository final attribute = e.readTableOrNull(sql.serviceAttributes); if (attribute != null) { return ServiceAttributesModel( - clientReferenceId: attribute.clientReferenceId, - attributeCode: attribute.attributeCode, - value: attribute.value, - referenceId: attribute.referenceId, - dataType: attribute.dataType, - additionalDetails: attribute.additionalDetails, - tenantId: attribute.tenantId, - isDeleted: attribute.isDeleted, - rowVersion: attribute.rowVersion, - ); + clientReferenceId: attribute.clientReferenceId, + attributeCode: attribute.attributeCode, + value: attribute.value, + referenceId: attribute.referenceId, + dataType: attribute.dataType, + additionalDetails: attribute.additionalDetails, + tenantId: attribute.tenantId, + isDeleted: attribute.isDeleted, + rowVersion: attribute.rowVersion, + additionalFields: attribute.additionalFields != null + ? ServiceAttributesAdditionalFieldsMapper.fromJson( + attribute.additionalFields!) + : null); } }).toList(); diff --git a/packages/digit_data_model/lib/data/repositories/local/service_definition.dart b/packages/survey_form/lib/data/repositories/local/service_definition.dart similarity index 75% rename from packages/digit_data_model/lib/data/repositories/local/service_definition.dart rename to packages/survey_form/lib/data/repositories/local/service_definition.dart index 600e06750..30e3cbc49 100644 --- a/packages/digit_data_model/lib/data/repositories/local/service_definition.dart +++ b/packages/survey_form/lib/data/repositories/local/service_definition.dart @@ -2,6 +2,7 @@ import 'dart:async'; import 'package:collection/collection.dart'; import 'package:digit_data_model/data_model.dart'; +import 'package:survey_form/survey_form.dart'; import 'package:drift/drift.dart'; class ServiceDefinitionLocalRepository extends LocalRepository< @@ -10,10 +11,10 @@ class ServiceDefinitionLocalRepository extends LocalRepository< @override FutureOr create( - ServiceDefinitionModel entity, { - bool createOpLog = false, - DataOperation dataOperation = DataOperation.create, - }) async { + ServiceDefinitionModel entity, { + bool createOpLog = false, + DataOperation dataOperation = DataOperation.create, + }) async { return retryLocalCallOperation(() async { final serviceDefinitionCompanion = entity.companion; final attributes = entity.attributes; @@ -42,24 +43,25 @@ class ServiceDefinitionLocalRepository extends LocalRepository< @override FutureOr> search( - ServiceDefinitionSearchModel query, { - bool createOpLog = false, - }) async { + ServiceDefinitionSearchModel query, { + bool createOpLog = false, + }) async { return retryLocalCallOperation(() async { final selectQuery = sql.select(sql.serviceDefinition).join([]); final results = await (selectQuery - ..where(buildAnd([ - if (query.id != null) - sql.serviceDefinition.id.equals( - query.id!, - ), - // To fetch service definition of a single checklist with the code - if (query.code != null) - sql.serviceDefinition.code.isIn( - query.code!, - ), - ]))) + ..where(buildAnd([ + // To fetch service definition with the id + if (query.id != null) + sql.serviceDefinition.id.equals( + query.id!, + ), + // To fetch service definition of a single survey_form with the code + if (query.code != null) + sql.serviceDefinition.code.isIn( + query.code!, + ), + ]))) .get(); final List serviceDefinitionList = []; @@ -68,11 +70,11 @@ class ServiceDefinitionLocalRepository extends LocalRepository< final selectattributeQuery = sql.select(sql.attributes).join([]); final val = await (selectattributeQuery - ..where(buildAnd([ - sql.attributes.referenceId.equals( - data.id!, - ), - ]))) + ..where(buildAnd([ + sql.attributes.referenceId.equals( + data.id!, + ), + ]))) .get(); final res = val.map((e) { @@ -80,10 +82,10 @@ class ServiceDefinitionLocalRepository extends LocalRepository< if (resull != null) { List list = resull.values != null ? resull.values! - .replaceFirst('[', '') - .replaceFirst(']', '') - .replaceAll(" ", '') - .split(',') + .replaceFirst('[', '') + .replaceFirst(']', '') + .replaceAll(" ", '') + .split(',') : []; if (list.isEmpty) list.removeRange(0, list.length); diff --git a/packages/survey_form/lib/data/repositories/oplog/oplog.dart b/packages/survey_form/lib/data/repositories/oplog/oplog.dart new file mode 100644 index 000000000..d7b1e9cda --- /dev/null +++ b/packages/survey_form/lib/data/repositories/oplog/oplog.dart @@ -0,0 +1,58 @@ +import 'package:digit_data_model/data/repositories/oplog/oplog.dart'; +import 'package:survey_form/survey_form.dart'; + + +//Oplog for managing Service definition +class ServiceDefinitionOpLogManager + extends OpLogManager { + ServiceDefinitionOpLogManager(super.isar); + + @override + ServiceDefinitionModel applyServerGeneratedIdToEntity( + ServiceDefinitionModel entity, + String serverGeneratedId, + int rowVersion, + ) => + entity.copyWith(id: serverGeneratedId, rowVersion: rowVersion); + + @override + String getClientReferenceId(ServiceDefinitionModel entity) { + throw UnimplementedError(); + } + + @override + String? getServerGeneratedId(ServiceDefinitionModel entity) => entity.id; + + @override + int? getRowVersion(ServiceDefinitionModel entity) => entity.rowVersion; + + @override + bool? getNonRecoverableError(ServiceDefinitionModel entity) => + entity.nonRecoverableError; +} + +//Oplog for managing Service +class ServiceOpLogManager extends OpLogManager { + ServiceOpLogManager(super.isar); + + @override + ServiceModel applyServerGeneratedIdToEntity( + ServiceModel entity, + String serverGeneratedId, + int rowVersion, + ) => + entity.copyWith(id: serverGeneratedId, rowVersion: rowVersion); + + @override + String getClientReferenceId(ServiceModel entity) => entity.clientId; + + @override + String? getServerGeneratedId(ServiceModel entity) => entity.id; + + @override + int? getRowVersion(ServiceModel entity) => entity.rowVersion; + + @override + bool? getNonRecoverableError(ServiceModel entity) => + entity.nonRecoverableError; +} \ No newline at end of file diff --git a/packages/digit_data_model/lib/data/repositories/remote/service.dart b/packages/survey_form/lib/data/repositories/remote/service.dart similarity index 77% rename from packages/digit_data_model/lib/data/repositories/remote/service.dart rename to packages/survey_form/lib/data/repositories/remote/service.dart index dc2a937cb..4a2eb2db2 100644 --- a/packages/digit_data_model/lib/data/repositories/remote/service.dart +++ b/packages/survey_form/lib/data/repositories/remote/service.dart @@ -1,9 +1,11 @@ // Generated using mason. Do not modify by hand import 'package:digit_data_model/data_model.dart'; + import '../../../models/entities/service.dart'; -class ServiceRemoteRepository extends RemoteRepository { +class ServiceRemoteRepository + extends RemoteRepository { ServiceRemoteRepository( super.dio, { required super.actionMap, diff --git a/packages/digit_data_model/lib/data/repositories/remote/service_attributes.dart b/packages/survey_form/lib/data/repositories/remote/service_attributes.dart similarity index 87% rename from packages/digit_data_model/lib/data/repositories/remote/service_attributes.dart rename to packages/survey_form/lib/data/repositories/remote/service_attributes.dart index b3ec8a608..6df1f26a5 100644 --- a/packages/digit_data_model/lib/data/repositories/remote/service_attributes.dart +++ b/packages/survey_form/lib/data/repositories/remote/service_attributes.dart @@ -1,9 +1,11 @@ // Generated using mason. Do not modify by hand import 'package:digit_data_model/data_model.dart'; + import '../../../models/entities/service_attributes.dart'; -class ServiceAttributesRemoteRepository extends RemoteRepository { +class ServiceAttributesRemoteRepository extends RemoteRepository< + ServiceAttributesModel, ServiceAttributesSearchModel> { ServiceAttributesRemoteRepository( super.dio, { required super.actionMap, diff --git a/packages/digit_data_model/lib/data/repositories/remote/service_definition.dart b/packages/survey_form/lib/data/repositories/remote/service_definition.dart similarity index 87% rename from packages/digit_data_model/lib/data/repositories/remote/service_definition.dart rename to packages/survey_form/lib/data/repositories/remote/service_definition.dart index 24d69707b..04aded005 100644 --- a/packages/digit_data_model/lib/data/repositories/remote/service_definition.dart +++ b/packages/survey_form/lib/data/repositories/remote/service_definition.dart @@ -1,9 +1,11 @@ // Generated using mason. Do not modify by hand import 'package:digit_data_model/data_model.dart'; + import '../../../models/entities/service_definition.dart'; -class ServiceDefinitionRemoteRepository extends RemoteRepository { +class ServiceDefinitionRemoteRepository extends RemoteRepository< + ServiceDefinitionModel, ServiceDefinitionSearchModel> { ServiceDefinitionRemoteRepository( super.dio, { required super.actionMap, diff --git a/packages/digit_data_model/lib/models/entities/service.dart b/packages/survey_form/lib/models/entities/service.dart similarity index 96% rename from packages/digit_data_model/lib/models/entities/service.dart rename to packages/survey_form/lib/models/entities/service.dart index c8e4c20a1..7d2c668d2 100644 --- a/packages/digit_data_model/lib/models/entities/service.dart +++ b/packages/survey_form/lib/models/entities/service.dart @@ -5,6 +5,8 @@ import 'package:dart_mappable/dart_mappable.dart'; import 'package:digit_data_model/data_model.dart'; import 'package:drift/drift.dart'; +import '../entities/service_attributes.dart'; + part 'service.mapper.dart'; @MappableClass(ignoreNull: true, discriminatorValue: MappableClass.useAsDefault) @@ -75,6 +77,7 @@ class ServiceModel extends EntityModel with ServiceModelMappable { super.isDeleted = false, }) : super(); + //Helper object to represents the data you want to insert or update in a table ServiceCompanion get companion { return ServiceCompanion( auditCreatedBy: Value(auditDetails?.createdBy), diff --git a/packages/digit_data_model/lib/models/entities/service.mapper.dart b/packages/survey_form/lib/models/entities/service.mapper.dart similarity index 97% rename from packages/digit_data_model/lib/models/entities/service.mapper.dart rename to packages/survey_form/lib/models/entities/service.mapper.dart index 2f6f47d4c..ccb102c08 100644 --- a/packages/digit_data_model/lib/models/entities/service.mapper.dart +++ b/packages/survey_form/lib/models/entities/service.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'service.dart'; @@ -118,10 +118,8 @@ mixin ServiceSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ServiceSearchModelMapper.ensureInitialized() - .isValueEqual(this as ServiceSearchModel, other)); + return ServiceSearchModelMapper.ensureInitialized() + .equalsValue(this as ServiceSearchModel, other); } @override @@ -342,10 +340,8 @@ mixin ServiceModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ServiceModelMapper.ensureInitialized() - .isValueEqual(this as ServiceModel, other)); + return ServiceModelMapper.ensureInitialized() + .equalsValue(this as ServiceModel, other); } @override @@ -583,10 +579,8 @@ mixin ServiceAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ServiceAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as ServiceAdditionalFields, other)); + return ServiceAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as ServiceAdditionalFields, other); } @override diff --git a/packages/digit_data_model/lib/models/entities/service_attributes.dart b/packages/survey_form/lib/models/entities/service_attributes.dart similarity index 83% rename from packages/digit_data_model/lib/models/entities/service_attributes.dart rename to packages/survey_form/lib/models/entities/service_attributes.dart index 4cec2d732..38f36cc12 100644 --- a/packages/digit_data_model/lib/models/entities/service_attributes.dart +++ b/packages/survey_form/lib/models/entities/service_attributes.dart @@ -1,43 +1,41 @@ // Generated using mason. Do not modify by hand import 'package:dart_mappable/dart_mappable.dart'; -import 'package:drift/drift.dart'; - import 'package:digit_data_model/data_model.dart'; - -import '../../data/local_store/sql_store/sql_store.dart'; +import 'package:drift/drift.dart'; part 'service_attributes.mapper.dart'; @MappableClass(ignoreNull: true, discriminatorValue: MappableClass.useAsDefault) -class ServiceAttributesSearchModel extends EntitySearchModel with ServiceAttributesSearchModelMappable { +class ServiceAttributesSearchModel extends EntitySearchModel + with ServiceAttributesSearchModelMappable { final List? clientReferenceId; final String? tenantId; - + ServiceAttributesSearchModel({ this.clientReferenceId, this.tenantId, super.boundaryCode, super.isDeleted, - }): super(); + }) : super(); @MappableConstructor() ServiceAttributesSearchModel.ignoreDeleted({ this.clientReferenceId, this.tenantId, super.boundaryCode, - }): super(isDeleted: false); + }) : super(isDeleted: false); } @MappableClass(ignoreNull: true, discriminatorValue: MappableClass.useAsDefault) -class ServiceAttributesModel extends EntityModel with ServiceAttributesModelMappable { - +class ServiceAttributesModel extends EntityModel + with ServiceAttributesModelMappable { static const schemaName = 'ServiceAttributes'; final String? attributeCode; - final dynamic? value; + final dynamic value; final String? dataType; final String? referenceId; - final dynamic? additionalDetails; + final dynamic additionalDetails; final bool? nonRecoverableError; final String clientReferenceId; final String? tenantId; @@ -55,10 +53,12 @@ class ServiceAttributesModel extends EntityModel with ServiceAttributesModelMapp required this.clientReferenceId, this.tenantId, this.rowVersion, - super.auditDetails,super.clientAuditDetails, + super.auditDetails, + super.clientAuditDetails, super.isDeleted = false, - }): super(); + }) : super(); + //Helper object to represents the data you want to insert or update in a table ServiceAttributesCompanion get companion { return ServiceAttributesCompanion( auditCreatedBy: Value(auditDetails?.createdBy), @@ -80,16 +80,16 @@ class ServiceAttributesModel extends EntityModel with ServiceAttributesModelMapp clientReferenceId: Value(clientReferenceId), tenantId: Value(tenantId), rowVersion: Value(rowVersion), - ); + ); } } @MappableClass(ignoreNull: true, discriminatorValue: MappableClass.useAsDefault) -class ServiceAttributesAdditionalFields extends AdditionalFields with ServiceAttributesAdditionalFieldsMappable { +class ServiceAttributesAdditionalFields extends AdditionalFields + with ServiceAttributesAdditionalFieldsMappable { ServiceAttributesAdditionalFields({ super.schema = 'ServiceAttributes', required super.version, super.fields, }); } - diff --git a/packages/digit_data_model/lib/models/entities/service_attributes.mapper.dart b/packages/survey_form/lib/models/entities/service_attributes.mapper.dart similarity index 96% rename from packages/digit_data_model/lib/models/entities/service_attributes.mapper.dart rename to packages/survey_form/lib/models/entities/service_attributes.mapper.dart index f06beaea4..43b2d3d24 100644 --- a/packages/digit_data_model/lib/models/entities/service_attributes.mapper.dart +++ b/packages/survey_form/lib/models/entities/service_attributes.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'service_attributes.dart'; @@ -108,10 +108,8 @@ mixin ServiceAttributesSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ServiceAttributesSearchModelMapper.ensureInitialized() - .isValueEqual(this as ServiceAttributesSearchModel, other)); + return ServiceAttributesSearchModelMapper.ensureInitialized() + .equalsValue(this as ServiceAttributesSearchModel, other); } @override @@ -330,10 +328,8 @@ mixin ServiceAttributesModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ServiceAttributesModelMapper.ensureInitialized() - .isValueEqual(this as ServiceAttributesModel, other)); + return ServiceAttributesModelMapper.ensureInitialized() + .equalsValue(this as ServiceAttributesModel, other); } @override @@ -552,11 +548,8 @@ mixin ServiceAttributesAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ServiceAttributesAdditionalFieldsMapper.ensureInitialized() - .isValueEqual( - this as ServiceAttributesAdditionalFields, other)); + return ServiceAttributesAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as ServiceAttributesAdditionalFields, other); } @override diff --git a/packages/digit_data_model/lib/models/entities/service_definition.dart b/packages/survey_form/lib/models/entities/service_definition.dart similarity index 97% rename from packages/digit_data_model/lib/models/entities/service_definition.dart rename to packages/survey_form/lib/models/entities/service_definition.dart index 238c4304d..67812c616 100644 --- a/packages/digit_data_model/lib/models/entities/service_definition.dart +++ b/packages/survey_form/lib/models/entities/service_definition.dart @@ -1,12 +1,8 @@ // Generated using mason. Do not modify by hand import 'package:dart_mappable/dart_mappable.dart'; import 'package:drift/drift.dart'; - import 'package:digit_data_model/data_model.dart'; -import '../../data/local_store/sql_store/sql_store.dart'; -import 'attributes.dart'; - part 'service_definition.mapper.dart'; @MappableClass(ignoreNull: true, discriminatorValue: MappableClass.useAsDefault) @@ -64,6 +60,7 @@ class ServiceDefinitionModel extends EntityModel super.isDeleted = false, }) : super(); + //Helper object to represents the data you want to insert or update in a table ServiceDefinitionCompanion get companion { return ServiceDefinitionCompanion( auditCreatedBy: Value(auditDetails?.createdBy), diff --git a/packages/digit_data_model/lib/models/entities/service_definition.mapper.dart b/packages/survey_form/lib/models/entities/service_definition.mapper.dart similarity index 96% rename from packages/digit_data_model/lib/models/entities/service_definition.mapper.dart rename to packages/survey_form/lib/models/entities/service_definition.mapper.dart index 29a8d7c7c..100fc5329 100644 --- a/packages/digit_data_model/lib/models/entities/service_definition.mapper.dart +++ b/packages/survey_form/lib/models/entities/service_definition.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'service_definition.dart'; @@ -116,10 +116,8 @@ mixin ServiceDefinitionSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ServiceDefinitionSearchModelMapper.ensureInitialized() - .isValueEqual(this as ServiceDefinitionSearchModel, other)); + return ServiceDefinitionSearchModelMapper.ensureInitialized() + .equalsValue(this as ServiceDefinitionSearchModel, other); } @override @@ -331,10 +329,8 @@ mixin ServiceDefinitionModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ServiceDefinitionModelMapper.ensureInitialized() - .isValueEqual(this as ServiceDefinitionModel, other)); + return ServiceDefinitionModelMapper.ensureInitialized() + .equalsValue(this as ServiceDefinitionModel, other); } @override @@ -553,11 +549,8 @@ mixin ServiceDefinitionAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ServiceDefinitionAdditionalFieldsMapper.ensureInitialized() - .isValueEqual( - this as ServiceDefinitionAdditionalFields, other)); + return ServiceDefinitionAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as ServiceDefinitionAdditionalFields, other); } @override diff --git a/packages/survey_form/lib/pages/acknowledgement.dart b/packages/survey_form/lib/pages/acknowledgement.dart new file mode 100644 index 000000000..27b053a49 --- /dev/null +++ b/packages/survey_form/lib/pages/acknowledgement.dart @@ -0,0 +1,81 @@ +import 'package:auto_route/auto_route.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; +import 'package:digit_ui_components/widgets/molecules/panel_cards.dart'; +import 'package:flutter/material.dart'; + +import '../utils/i18_key_constants.dart' as i18; +import '../widgets/localized.dart'; + +@RoutePage() +class SurveyFormAcknowledgementPage extends LocalizedStatefulWidget { + final bool isDataRecordSuccess; + final String? label; + final String? description; + final Map? descriptionTableData; + const SurveyFormAcknowledgementPage({ + super.key, + super.appLocalizations, + this.isDataRecordSuccess = false, + this.label, + this.description, + this.descriptionTableData, + }); + + @override + State createState() => + AcknowledgementPageState(); +} + +class AcknowledgementPageState + extends LocalizedState { + @override + Widget build(BuildContext context) { + return Scaffold( + body: PanelCard( + type: PanelType.success, + title: localizations.translate( + i18.acknowledgementSuccess.acknowledgementLabelText, + ), + description: localizations.translate( + i18.acknowledgementSuccess.acknowledgementDescriptionText, + ), + actions: [ + DigitButton( + label: localizations + .translate(i18.acknowledgementSuccess.actionLabelText), + onPressed: () => context.router.popUntilRoot(), + type: DigitButtonType.primary, + size: DigitButtonSize.large, + ) + ], + ), + bottomNavigationBar: Offstage( + offstage: !widget.isDataRecordSuccess, + // Show the bottom navigation bar if `isDataRecordSuccess` is true + child: SizedBox( + height: 150, + child: DigitCard( + cardType: CardType.primary, + margin: const EdgeInsets.only(top: spacer2), + padding: const EdgeInsets.all(spacer2), + children: [ + Column( + children: [ + DigitButton( + label: localizations + .translate(i18.acknowledgementSuccess.goToHome), + type: DigitButtonType.primary, + size: DigitButtonSize.large, + onPressed: () { + context.router.maybePop(); + }, + ), + ], + ), + ]), + ), + ), + ); + } +} diff --git a/packages/survey_form/lib/pages/survey_form.dart b/packages/survey_form/lib/pages/survey_form.dart new file mode 100644 index 000000000..62cd17fb3 --- /dev/null +++ b/packages/survey_form/lib/pages/survey_form.dart @@ -0,0 +1,160 @@ +import 'package:auto_route/auto_route.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/widgets/atoms/digit_action_card.dart'; +import 'package:digit_ui_components/widgets/atoms/menu_card.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:survey_form/survey_form.dart'; + +import '../router/survey_form_router.gm.dart'; +import '../utils/constants.dart'; +import '../utils/i18_key_constants.dart' as i18; +import '../widgets/back_navigation_help_header.dart'; +import '../widgets/localized.dart'; +import '../widgets/no_result_card.dart'; + +@RoutePage() +class SurveyformPage extends LocalizedStatefulWidget { + const SurveyformPage({ + Key? key, + super.appLocalizations, + }) : super(key: key); + + @override + State createState() => SurveyFormPageState(); +} + +class SurveyFormPageState extends State { + ServiceDefinitionModel? selectedServiceDefinition; + + @override + Widget build(BuildContext context) { + final localizations = SurveyFormLocalization.of(context); + + return Scaffold( + body: ScrollableContent( + header: const Column(children: [ + BackNavigationHelpHeaderWidget(), + ]), + children: [ + BlocBuilder( + builder: (context, state) { + return state.map( + empty: (value) => Text( + localizations.translate( + i18.surveyForm.noSurveyFormFound, + ), + ), + isloading: (value) => const Center( + child: CircularProgressIndicator(), + ), + serviceDefinitionFetch: + (ServiceDefinitionServiceFetchedState value) { + final values = value.serviceDefinitionList.where((item) => + !SurveyFormSingleton() + .roles + .indexOf( + item.code!.split('.').lastOrNull!, + ) + .isNegative && + !item.code! + .contains(Constants.healthFacilitySurveyFormPrefix) && + (item.code ?? '') + .contains(SurveyFormSingleton().projectName)); + + if (values.isEmpty) { + return Column( + children: [ + NoResultCard( + align: Alignment.center, + label: localizations.translate( + i18.common.noResultsFound, + ), + ), + ], + ); + } + return Column( + children: values + .map((e) => Padding( + padding: const EdgeInsets.only( + left: spacer4, right: spacer4, top: spacer4), + child: MenuCard( + icon: Icons.article, + heading: localizations.translate('${e.code}'), + onTap: () { + context + .read() + .add(ServiceDefinitionSelectionEvent( + serviceDefinition: e, + )); + + showDialog( + context: context, + builder: (ctx) => DigitActionCard( + onOutsideTap: () { + Navigator.of( + context, + rootNavigator: true, + ).pop(); + }, + actions: [ + DigitButton( + label: localizations.translate(i18 + .surveyForm + .surveyFormCreateActionLabel), + onPressed: () { + context.router.push( + SurveyFormBoundaryViewRoute(), + ); + Navigator.of( + context, + rootNavigator: true, + ).pop(); + }, + type: DigitButtonType.secondary, + size: DigitButtonSize.large, + prefixIcon: Icons.edit_calendar, + ), + DigitButton( + label: localizations.translate(i18 + .surveyForm + .surveyFormViewActionLabel), + onPressed: () { + context.read().add( + ServiceSearchEvent( + serviceSearchModel: + ServiceSearchModel( + id: e.id, + ), + ), + ); + context.router.push( + SurveyFormPreviewRoute(), + ); + Navigator.of( + context, + rootNavigator: true, + ).pop(); + }, + type: DigitButtonType.secondary, + size: DigitButtonSize.large, + prefixIcon: Icons.visibility, + ) + ], + ), + ); + }, + ), + )) + .toList(), + ); + }, + ); + }, + ), + ], + ), + ); + } +} diff --git a/packages/survey_form/lib/pages/survey_form_boundary_view.dart b/packages/survey_form/lib/pages/survey_form_boundary_view.dart new file mode 100644 index 000000000..2e6c911ba --- /dev/null +++ b/packages/survey_form/lib/pages/survey_form_boundary_view.dart @@ -0,0 +1,95 @@ +import 'package:auto_route/auto_route.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; +import 'package:flutter/material.dart'; +import 'package:intl/intl.dart'; +import 'package:survey_form/survey_form.dart'; + +import '../router/survey_form_router.gm.dart'; +import '../utils/i18_key_constants.dart' as i18; +import '../widgets/back_navigation_help_header.dart'; +import '../widgets/localized.dart'; + +@RoutePage() +class SurveyFormBoundaryViewPage extends LocalizedStatefulWidget { + const SurveyFormBoundaryViewPage({ + Key? key, + super.appLocalizations, + }) : super(key: key); + + @override + State createState() => + SurveyFormBoundaryViewPageState(); +} + +class SurveyFormBoundaryViewPageState + extends State { + @override + Widget build(BuildContext context) { + final localizations = SurveyFormLocalization.of(context); + final theme = Theme.of(context); + final textTheme = theme.digitTextTheme(context); + + return Scaffold( + body: ScrollableContent( + header: const Column(children: [ + BackNavigationHelpHeaderWidget(), + ]), + footer: DigitCard( + cardType: CardType.primary, + margin: const EdgeInsets.only(top: spacer2), + children: [ + DigitButton( + type: DigitButtonType.primary, + label: localizations.translate( + i18.common.coreCommonContinue, + ), + size: DigitButtonSize.large, + mainAxisSize: MainAxisSize.max, + onPressed: () => context.router.push(SurveyFormViewRoute()), + ), + ]), + children: [ + DigitCard( + margin: const EdgeInsets.all(spacer2), + cardType: CardType.primary, children: [ + Text( + localizations.translate( + i18.surveyForm.surveyFormDetailLabel, + ), + style: textTheme.headingXl, + ), + LabeledField( + label: localizations.translate( + i18.surveyForm.surveyFormdate, + ), + child: DigitDateFormInput( + readOnly: true, + editable: false, + initialValue: DateFormat('dd MMMM yyyy').format(DateTime.now()), + controller: TextEditingController( + text: DateFormat('dd MMMM yyyy').format(DateTime.now()), + ), + ), + ), + LabeledField( + label: localizations.translate( + i18.householdLocation.administrationAreaFormLabel, + ), + child: DigitTextFormInput( + readOnly: true, + initialValue: localizations + .translate(SurveyFormSingleton().boundary!.code.toString()), + controller: TextEditingController( + text: localizations.translate( + SurveyFormSingleton().boundary!.code.toString()), + ), + ), + ), + ]), + ], + ), + ); + } +} diff --git a/packages/survey_form/lib/pages/survey_form_preview.dart b/packages/survey_form/lib/pages/survey_form_preview.dart new file mode 100644 index 000000000..ce67a8fb2 --- /dev/null +++ b/packages/survey_form/lib/pages/survey_form_preview.dart @@ -0,0 +1,244 @@ +import 'package:auto_route/annotations.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/atoms/label_value_list.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; +import 'package:digit_ui_components/widgets/molecules/label_value_summary.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:intl/intl.dart'; +import 'package:survey_form/survey_form.dart'; + +import '../utils/constants.dart'; +import '../utils/i18_key_constants.dart' as i18; +import '../widgets/back_navigation_help_header.dart'; +import '../widgets/localized.dart'; +import '../widgets/no_result_card.dart'; + +@RoutePage() +class SurveyFormPreviewPage extends LocalizedStatefulWidget { + const SurveyFormPreviewPage({ + Key? key, + super.appLocalizations, + }) : super(key: key); + + @override + State createState() => SurveyFormPreviewPageState(); +} + +class SurveyFormPreviewPageState extends LocalizedState { + @override + Widget build(BuildContext context) { + final theme = Theme.of(context); + final textTheme = theme.digitTextTheme(context); + + return Scaffold( + body: ScrollableContent( + header: const Column(children: [ + BackNavigationHelpHeaderWidget(), + ]), + enableFixedDigitButton: true, + footer: BlocBuilder( + builder: (context, state) { + return state.maybeWhen( + orElse: () => const Offstage(), + serviceSearch: (value1, value2, value3) { + return value2 != null + ? DigitCard( + cardType: CardType.primary, + margin: const EdgeInsets.only(top: spacer2), + children: [ + DigitButton( + mainAxisSize: MainAxisSize.max, + label: localizations + .translate(i18.common.corecommonclose), + type: DigitButtonType.primary, + size: DigitButtonSize.large, + onPressed: () { + context.read().add( + ServiceResetEvent(serviceList: value1), + ); + }, + ), + ]) + : const Offstage(); + }, + ); + }, + ), + children: [ + BlocBuilder(builder: (context, state) { + return state.maybeWhen( + orElse: () => const Offstage(), + serviceSearch: (serviceList, selectedService, loading) { + return selectedService == null + ? serviceList.isNotEmpty + ? Column( + children: [ + ...serviceList + .map((e) => e.serviceDefId != null + ? Padding( + padding: + const EdgeInsets.all(spacer2), + child: DigitCard( + cardType: CardType.primary, + children: [ + Align( + alignment: + Alignment.centerLeft, + child: Text( + DateFormat(Constants + .SurveyFormPreviewDateFormat) + .format( + DateFormat(Constants + .defaultDateFormat) + .parse( + e.createdAt.toString(), + ), + ), + style: textTheme.headingXl, + ), + ), + Row( + mainAxisAlignment: + MainAxisAlignment + .spaceBetween, + children: [ + SizedBox( + child: Text( + localizations.translate( + '${e.tenantId}', + ), + ), + ), + DigitButton( + label: localizations + .translate( + i18.searchBeneficiary + .iconLabel, + ), + type: DigitButtonType + .secondary, + size: DigitButtonSize + .medium, + onPressed: () { + context + .read() + .add( + ServiceSelectionEvent( + service: e, + ), + ); + }, + ), + ], + ), + ]), + ) + : const Offstage()) + .toList(), + ], + ) + : Expanded( + child: Center( + child: Padding( + padding: const EdgeInsets.all(10), + child: NoResultCard( + align: Alignment.center, + label: localizations.translate( + i18.surveyForm.noSurveyFormFound), + ), + ), + ), + ) + : BlocBuilder(builder: (context, state) { + return state.maybeWhen( + serviceDefinitionFetch: ( + item1, + item2, + ) { + return DigitCard( + cardType: CardType.primary, + children: [ + Column( + children: [ + Align( + alignment: Alignment.topLeft, + child: Padding( + padding: + const EdgeInsets.all(spacer2), + child: Text( + localizations.translate( + item2?.code ?? '', + ), + style: textTheme.headingXl, + ), + ), + ), + ...(selectedService.attributes ?? []) + .where((a) => + a.value != + i18.surveyForm + .notSelectedKey && + a.value != '') + .map( + (e) => Padding( + padding: + const EdgeInsets.all(spacer2), + child: Align( + alignment: AlignmentDirectional + .topStart, + child: + LabelValueSummary(items: [ + LabelValueItem( + label: + localizations.translate( + "${item2?.code ?? ''}.${e.attributeCode!}", + ), + value: e.dataType == + 'SingleValueList' + ? localizations + .translate( + '${item2?.code ?? ''}.${e.value.toString().toUpperCase()}', + ) + : e.value ?? "", + isInline: false, + ), + if (e.additionalDetails != + '' && + e.additionalDetails != + null) ...[ + LabelValueItem( + label: localizations + .translate( + "${item2?.code ?? ''}.${e.attributeCode!}.ADDITIONAL_FIELD", + ), + value: localizations + .translate( + e.additionalDetails, + ), + isInline: false, + labelTextStyle: + textTheme.bodyL, + ) + ] + ]), + ), + ), + ) + ].toList(), + ), + ]); + }, + orElse: () => const Offstage(), + ); + }); + }, + ); + }), + ], + ), + ); + } +} diff --git a/packages/survey_form/lib/pages/survey_form_view.dart b/packages/survey_form/lib/pages/survey_form_view.dart new file mode 100644 index 000000000..6e1b87183 --- /dev/null +++ b/packages/survey_form/lib/pages/survey_form_view.dart @@ -0,0 +1,1193 @@ +import 'dart:math'; + +import 'package:auto_route/auto_route.dart'; +import 'package:digit_data_model/data_model.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/models/RadioButtonModel.dart'; +import 'package:digit_ui_components/services/location_bloc.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/utils/date_utils.dart'; +import 'package:digit_ui_components/widgets/atoms/pop_up_card.dart'; +import 'package:digit_ui_components/widgets/atoms/selection_card.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; +import 'package:digit_ui_components/widgets/molecules/show_pop_up.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:survey_form/survey_form.dart'; +import 'package:survey_form/utils/extensions/context_utility.dart'; + +import '../router/survey_form_router.gm.dart'; +import '../utils/constants.dart'; +import '../utils/i18_key_constants.dart' as i18; +import '../widgets/back_navigation_help_header.dart'; +import '../widgets/localized.dart'; + +@RoutePage() +class SurveyFormViewPage extends LocalizedStatefulWidget { + final String? referralClientRefId; + + const SurveyFormViewPage({ + Key? key, + this.referralClientRefId, + super.appLocalizations, + }) : super(key: key); + + @override + State createState() => SurveyFormViewPageState(); +} + +class SurveyFormViewPageState extends LocalizedState { + String isStateChanged = ''; + var submitTriggered = false; + bool triggerLocalization = false; + List controller = []; + List additionalController = []; + List? initialAttributes; + ServiceDefinitionModel? selectedServiceDefinition; + bool isControllersInitialized = false; + List visibleSurveyFormIndexes = []; + GlobalKey surveyFormKey = GlobalKey(); + + @override + void initState() { + context.read().add( + ServiceSurveyFormEvent( + value: Random().nextInt(100).toString(), + submitTriggered: true, + ), + ); + super.initState(); + } + + @override + Widget build(BuildContext context) { + final theme = Theme.of(context); + final textTheme = theme.digitTextTheme(context); + + bool isHealthFacilityWorker = SurveyFormSingleton().isHealthFacilityWorker; + + return WillPopScope( + onWillPop: isHealthFacilityWorker && widget.referralClientRefId != null + ? () async => false + : () async => _onBackPressed(context), + child: Scaffold( + body: BlocBuilder( + builder: (context, state) { + state.mapOrNull( + serviceDefinitionFetch: (value) { + selectedServiceDefinition = value.selectedServiceDefinition; + initialAttributes = value.selectedServiceDefinition?.attributes; + if (!isControllersInitialized) { + initialAttributes?.forEach((e) { + controller.add(TextEditingController()); + if (!(isHealthFacilityWorker && + widget.referralClientRefId != null)) { + additionalController.add(TextEditingController()); + } + }); + + // Set the flag to true after initializing controllers + isControllersInitialized = true; + } + }, + ); + return state.maybeMap( + orElse: () => Text(state.runtimeType.toString()), + serviceDefinitionFetch: (value) { + return ScrollableContent( + header: Column(children: [ + if (!(isHealthFacilityWorker && + widget.referralClientRefId != null)) + const BackNavigationHelpHeaderWidget(), + ]), + enableFixedDigitButton: true, + footer: DigitCard( + cardType: CardType.primary, + margin: const EdgeInsets.only(top: spacer2), + children: [ + DigitButton( + label: localizations + .translate(i18.common.coreCommonSubmit), + type: DigitButtonType.primary, + size: DigitButtonSize.large, + mainAxisSize: MainAxisSize.max, + onPressed: () async { + final router = context.router; + submitTriggered = true; + + context.read().add( + const ServiceSurveyFormEvent( + value: '', + submitTriggered: true, + ), + ); + final isValid = + surveyFormKey.currentState?.validate(); + if (!isValid!) { + return; + } + + final itemsAttributes = initialAttributes; + + for (int i = 0; i < controller.length; i++) { + if (itemsAttributes?[i].required == true && + ((itemsAttributes?[i].dataType == + 'SingleValueList' && + visibleSurveyFormIndexes + .any((e) => e == i) && + (controller[i].text == '')) || + (itemsAttributes?[i].dataType != + 'SingleValueList' && + (controller[i].text == '' && + !(isHealthFacilityWorker && + widget.referralClientRefId != + null))))) { + return; + } + } + + // Request location from LocationBloc + context + .read() + .add(const LocationEvent.load()); + + // Wait for the location to be obtained + final locationState = + context.read().state; + double? latitude = locationState.latitude; + double? longitude = locationState.longitude; + + showCustomPopup( + context: context, + builder: (popUpContext) => Popup( + type: PopUpType.simple, + title: localizations.translate( + i18.surveyForm.surveyFormDialogLabel, + ), + description: localizations.translate( + i18.surveyForm.surveyFormDialogDescription, + ), + actions: [ + DigitButton( + label: localizations.translate( + i18.surveyForm + .surveyFormDialogPrimaryAction, + ), + onPressed: () { + final referenceId = + IdGen.i.identifier; + List + attributes = []; + for (int i = 0; + i < controller.length; + i++) { + final attribute = initialAttributes; + attributes + .add(ServiceAttributesModel( + auditDetails: AuditDetails( + createdBy: SurveyFormSingleton() + .loggedInUserUuid, + createdTime: context + .millisecondsSinceEpoch(), + ), + attributeCode: + '${attribute?[i].code}', + dataType: attribute?[i].dataType, + clientReferenceId: + IdGen.i.identifier, + referenceId: isHealthFacilityWorker && + widget.referralClientRefId != + null + ? widget.referralClientRefId + : referenceId, + value: attribute?[i].dataType != + 'SingleValueList' + ? controller[i] + .text + .toString() + .trim() + .isNotEmpty + ? controller[i] + .text + .toString() + : '' + : visibleSurveyFormIndexes + .contains(i) + ? controller[i] + .text + .toString() + : i18.surveyForm + .notSelectedKey, + rowVersion: 1, + tenantId: attribute?[i].tenantId, + additionalDetails: isHealthFacilityWorker && + widget.referralClientRefId != + null + ? null + : ((attribute?[i] + .values + ?.length == + 2 || + attribute?[i] + .values + ?.length == + 3) && + controller[i].text == + attribute?[i] + .values?[1] + .trim()) + ? additionalController[i] + .text + .toString() + .isEmpty + ? null + : additionalController[ + i] + .text + .toString() + : null, + additionalFields: + ServiceAttributesAdditionalFields( + version: 1, + fields: [ + AdditionalField( + 'latitude', + latitude, + ), + AdditionalField( + 'longitude', + longitude, + ), + AdditionalField( + 'boundaryCode', + SurveyFormSingleton() + .boundary + ?.code) + ], + ), + )); + } + + context.read().add( + ServiceCreateEvent( + serviceModel: ServiceModel( + createdAt: DigitDateUtils + .getDateFromTimestamp( + DateTime.now() + .toLocal() + .millisecondsSinceEpoch, + dateFormat: Constants + .SurveyFormViewDateFormat, + ), + tenantId: value + .selectedServiceDefinition! + .tenantId, + clientId: isHealthFacilityWorker && + widget.referralClientRefId != + null + ? widget + .referralClientRefId + .toString() + : referenceId, + serviceDefId: value + .selectedServiceDefinition + ?.id, + attributes: attributes, + rowVersion: 1, + accountId: + SurveyFormSingleton() + .projectId, + auditDetails: + AuditDetails( + createdBy: + SurveyFormSingleton() + .loggedInUserUuid, + createdTime: DateTime + .now() + .millisecondsSinceEpoch, + ), + clientAuditDetails: + ClientAuditDetails( + createdBy: + SurveyFormSingleton() + .loggedInUserUuid, + createdTime: context + .millisecondsSinceEpoch(), + lastModifiedBy: + SurveyFormSingleton() + .loggedInUserUuid, + lastModifiedTime: context + .millisecondsSinceEpoch(), + ), + additionalFields: + ServiceAdditionalFields( + version: 1, + fields: [ + AdditionalField( + 'lng', + longitude), + AdditionalField( + 'lat', + latitude), + AdditionalField( + 'boundaryCode', + SurveyFormSingleton() + .boundary + ?.code) + ])), + ), + ); + Navigator.of( + context, + rootNavigator: true, + ).pop(true); + router.push( + SurveyFormAcknowledgementRoute()); + }, + type: DigitButtonType.primary, + size: DigitButtonSize.large), + DigitButton( + label: localizations.translate( + i18.surveyForm + .surveyFormDialogSecondaryAction, + ), + onPressed: () { + Navigator.of( + context, + rootNavigator: true, + ).pop(false); + }, + type: DigitButtonType.secondary, + size: DigitButtonSize.large) + ]), + ); + }, + ), + ]), + children: [ + Form( + key: surveyFormKey, //assigning key to form + child: DigitCard(cardType: CardType.primary, children: [ + Padding( + padding: const EdgeInsets.only(bottom: spacer2), + child: Text( + '${localizations.translate( + value.selectedServiceDefinition!.code.toString(), + )} ${localizations.translate(i18.surveyForm.surveyForm)}', + style: textTheme.headingXl, + ), + ), + ...initialAttributes! + .where((att) => att.isActive == true) + .map(( + e, + ) { + String? description = e.additionalFields?.fields + .where((a) => a.key == 'helpText') + .firstOrNull + ?.value; + int index = (initialAttributes ?? []).indexOf(e); + return Column(children: [ + if (e.dataType == 'String' && + !(e.code ?? '').contains('.')) ...[ + FormField( + autovalidateMode: + AutovalidateMode.onUserInteraction, + validator: (value) { + if (((controller[index].text == null || + controller[index].text == '') && + e.required == true)) { + return localizations + .translate("${e.code}_REQUIRED"); + } + if (e.regex != null) { + return (RegExp(e.regex!).hasMatch( + controller[index].text!)) + ? null + : localizations + .translate("${e.code}_REGEX"); + } + + return null; + }, + builder: (field) { + return LabeledField( + label: localizations.translate( + '${value.selectedServiceDefinition?.code}.${e.code}', + ), + description: description != null + ? localizations.translate( + '${value.selectedServiceDefinition?.code}.$description', + ) + : null, + isRequired: e.required ?? false, + child: DigitTextFormInput( + onChange: (value) { + field.didChange(value); + controller[index].text = value; + surveyFormKey.currentState + ?.validate(); + }, + errorMessage: field.errorText, + controller: controller[index], + inputFormatters: [ + FilteringTextInputFormatter.allow( + RegExp( + "[a-zA-Z0-9]", + )), + ], + )); + }), + ] else if (e.dataType == 'Number' && + !(e.code ?? '').contains('.')) ...[ + FormField( + autovalidateMode: + AutovalidateMode.onUserInteraction, + validator: (value) { + if (((controller[index].text == null || + controller[index].text == '') && + e.required == true)) { + return localizations.translate( + i18.common.corecommonRequired, + ); + } + if (e.regex != null) { + return (RegExp(e.regex!).hasMatch( + controller[index].text!)) + ? null + : localizations + .translate("${e.code}_REGEX"); + } + + return null; + }, + builder: (field) { + return LabeledField( + label: localizations + .translate( + '${value.selectedServiceDefinition?.code}.${e.code}', + ) + .trim(), + description: description != null + ? localizations.translate( + '${value.selectedServiceDefinition?.code}.$description', + ) + : null, + isRequired: e.required ?? false, + child: DigitTextFormInput( + onChange: (value) { + field.didChange(value); + controller[index].text = value; + surveyFormKey.currentState + ?.validate(); + }, + errorMessage: field.errorText, + keyboardType: TextInputType.number, + inputFormatters: [ + FilteringTextInputFormatter.allow( + RegExp( + "[0-9]", + )), + ], + controller: controller[index], + ), + ); + }), + ] else if (e.dataType == 'MultiValueList' && + !(e.code ?? '').contains('.')) ...[ + Align( + alignment: Alignment.topLeft, + child: Padding( + padding: const EdgeInsets.all(spacer2), + child: LabeledField( + label: localizations.translate( + '${value.selectedServiceDefinition?.code}.${e.code}', + ), + description: description != null + ? localizations.translate( + '${value.selectedServiceDefinition?.code}.$description', + ) + : null, + isRequired: e.required ?? false, + child: + BlocBuilder( + builder: (context, state) { + return Column( + children: e.values! + .map((item) => DigitCheckbox( + label: localizations.translate( + '${selectedServiceDefinition?.code}.${item}'), + value: controller[index] + .text + .split('.') + .contains(e), + onChanged: (value) { + context + .read() + .add( + ServiceSurveyFormEvent( + value: + e.toString(), + submitTriggered: + submitTriggered, + ), + ); + final String ele; + var val = + controller[index] + .text + .split('.'); + if (val.contains(e)) { + val.remove(e); + ele = val.join("."); + } else { + ele = + "${controller[index].text}.$e"; + } + controller[index].value = + TextEditingController + .fromValue( + TextEditingValue( + text: ele, + ), + ).value; + + // If the field is required and no option is selected, trigger validation + if (e.required == true && + val.isEmpty) { + submitTriggered = true; + } + }, + )) + .toList(), + ); + }, + ), + ), + ), + ), + ] else if (e.dataType == 'SingleValueList') ...[ + if (!(e.code ?? '').contains('.')) + DigitCard( + cardType: CardType.secondary, + children: [ + _buildSurveyForm( + e, + index, + value.selectedServiceDefinition, + context, + ), + ]), + ] else if (e.dataType == 'Boolean') ...[ + if (!(e.code ?? '').contains('.')) + DigitCard( + cardType: CardType.primary, + children: [ + Align( + alignment: Alignment.topLeft, + child: Padding( + padding: + const EdgeInsets.all(spacer2), + child: LabeledField( + label: localizations.translate( + '${selectedServiceDefinition?.code}.${e.code}', + ), + isRequired: e.required ?? false, + child: BlocBuilder( + builder: (context, state) { + return FormField( + autovalidateMode: + AutovalidateMode + .onUserInteraction, + validator: (value) { + if (e.required == true && + (controller[index] + .text == + null || + controller[index] + .text == + '')) { + return localizations + .translate( + i18.common + .coreCommonReasonRequired, + ); + } + + return null; + }, + builder: (field) => + SelectionCard( + errorMessage: + field.errorText, + allowMultipleSelection: + false, + valueMapper: (value) { + return value + ? localizations + .translate( + i18.common + .coreCommonYes, + ) + : localizations + .translate( + i18.common + .coreCommonNo, + ); + }, + initialSelection: + controller[index] + .text == + 'true' + ? [true] + : controller[index] + .text == + 'false' + ? [false] + : [], + options: const [ + true, + false + ], + onSelectionChanged: + (curValue) { + field.didChange( + curValue.first); + if (curValue.isNotEmpty) { + context + .read() + .add( + ServiceSurveyFormEvent( + value: curValue + .toString(), + submitTriggered: + submitTriggered, + ), + ); + controller[index] + .value = + TextEditingValue( + text: curValue.first + .toString(), + ); + } + }, + ), + ); + }, + ), + ), + ), + ), + ]), + ], + ]); + }), + const SizedBox( + height: 15, + ), + ]), + ), + ], + ); + }, + ); + }, + ), + ), + ); + } + + Widget _buildSurveyForm( + AttributesModel item, + int index, + ServiceDefinitionModel? selectedServiceDefinition, + BuildContext context, + ) { + bool isHealthFacilityWorker = SurveyFormSingleton().isHealthFacilityWorker; + + final theme = Theme.of(context); + final textTheme = theme.digitTextTheme(context); + /* Check the data type of the attribute*/ + if (item.dataType == 'SingleValueList') { + final childItems = getNextQuestions( + item.code.toString(), + initialAttributes ?? [], + ); + List excludedIndexes = []; + + // Ensure the current index is added to visible indexes and not excluded + if (!visibleSurveyFormIndexes.contains(index) && + !excludedIndexes.contains(index)) { + visibleSurveyFormIndexes.add(index); + } + + // Determine excluded indexes + for (int i = 0; i < (initialAttributes ?? []).length; i++) { + if (!visibleSurveyFormIndexes.contains(i)) { + excludedIndexes.add(i); + } + } + + return Align( + alignment: Alignment.topLeft, + child: LabeledField( + charCondition: true, + label: localizations.translate( + '${selectedServiceDefinition?.code}.${item.code}', + ), + isRequired: item.required ?? false, + child: Column(children: [ + BlocBuilder( + builder: (context, state) { + return Align( + alignment: Alignment.topLeft, + child: FormField( + autovalidateMode: AutovalidateMode.onUserInteraction, + validator: (value1) { + if (item.required == true && + (controller[index].text == null || + controller[index].text == '')) { + return localizations.translate( + i18.common.coreCommonReasonRequired, + ); + } + + return null; + }, + builder: (field) => RadioList( + radioDigitButtons: item.values != null + ? item.values! + .where((e) => + e != i18.surveyForm.notSelectedKey) + .toList() + .map((item) => RadioButtonModel( + code: item, + name: localizations.translate( + '${selectedServiceDefinition?.code}.${item.trim()}', + ), + )) + .toList() + : [], + errorMessage: field.errorText, + groupValue: controller[index].text.trim(), + onChanged: (value) { + field.didChange(value); + context.read().add( + ServiceSurveyFormEvent( + value: + Random().nextInt(100).toString(), + submitTriggered: submitTriggered, + ), + ); + setState(() { + // Clear child controllers and update visibility + for (final matchingChildItem + in childItems) { + final childIndex = initialAttributes + ?.indexOf(matchingChildItem); + if (childIndex != null) { + // controller[childIndex].clear(); + visibleSurveyFormIndexes.removeWhere( + (v) => v == childIndex); + } + } + + // Update the current controller's value + controller[index].value = + TextEditingController.fromValue( + TextEditingValue( + text: value!.code, + ), + ).value; + + if (excludedIndexes.isNotEmpty) { + for (int i = 0; + i < excludedIndexes.length; + i++) { + // Clear excluded child controllers + if (item.dataType != + 'SingleValueList') { + // controller[excludedIndexes[i]].value = + // TextEditingController.fromValue( + // const TextEditingValue( + // text: '', + // ), + // ).value; + } + } + } + + // Remove corresponding controllers based on the removed attributes + }); + }, + ))); + }, + ), + BlocBuilder( + builder: (context, state) { + return (controller[index].text == item.values?[1].trim() && + !(isHealthFacilityWorker && + widget.referralClientRefId != null) && + item.dataType != 'SingleValueList') + ? Padding( + padding: const EdgeInsets.only( + left: spacer1, + right: spacer1, + bottom: spacer4, + ), + child: FormField( + autovalidateMode: + AutovalidateMode.onUserInteraction, + validator: (value1) { + if (item.required == true && + (additionalController[index].text == null || + additionalController[index].text == '')) { + return localizations.translate( + i18.common.coreCommonReasonRequired, + ); + } + + return null; + }, + builder: (field) { + return LabeledField( + label: localizations.translate( + '${selectedServiceDefinition?.code}.${item.code}.ADDITIONAL_FIELD', + ), + isRequired: item.required ?? false, + child: DigitTextFormInput( + onChange: (value) { + field.didChange(value); + additionalController[index].text = value; + }, + errorMessage: field.errorText, + maxLength: 1000, + charCount: true, + controller: additionalController[index], + )); + }, + ), + ) + : const SizedBox(); + }, + ), + if (childItems.isNotEmpty && + controller[index].text.trim().isNotEmpty) ...[ + _buildNestedSurveyForm( + item.code.toString(), + index, + controller[index].text.trim(), + context, + ), + ], + ])), + ); + } else if (item.dataType == 'String') { + return FormField( + autovalidateMode: AutovalidateMode.onUserInteraction, + validator: (value) { + if (((controller[index].text == null || + controller[index].text == '') && + item.required == true)) { + return localizations.translate("${item.code}_REQUIRED"); + } + if (item.regex != null) { + return (RegExp(item.regex!).hasMatch(controller[index].text!)) + ? null + : localizations.translate("${item.code}_REGEX"); + } + + return null; + }, + builder: (field) { + return LabeledField( + label: localizations.translate( + '${selectedServiceDefinition?.code}.${item.code}', + ), + isRequired: item.required ?? false, + child: DigitTextFormInput( + maxLength: 1000, + charCount: true, + onChange: (value) { + field.didChange(value); + controller[index].text = value; + }, + errorMessage: field.errorText, + controller: controller[index], + inputFormatters: [ + FilteringTextInputFormatter.allow(RegExp( + "[a-zA-Z0-9 ]", + )), + ], + ), + ); + }); + } else if (item.dataType == 'Number') { + return FormField( + autovalidateMode: AutovalidateMode.onUserInteraction, + validator: (value) { + if (((controller[index].text == null || + controller[index].text == '') && + item.required == true)) { + return localizations.translate( + i18.common.corecommonRequired, + ); + } + if (item.regex != null) { + return (RegExp(item.regex!).hasMatch(controller[index].text!)) + ? null + : localizations.translate("${item.code}_REGEX"); + } + + return null; + }, + builder: (field) { + return LabeledField( + label: localizations + .translate( + '${selectedServiceDefinition?.code}.${item.code}', + ) + .trim(), + isRequired: item.required ?? false, + child: DigitTextFormInput( + onChange: (value) { + field.didChange(value); + controller[index].text = value; + }, + keyboardType: TextInputType.number, + inputFormatters: [ + FilteringTextInputFormatter.allow(RegExp( + "[0-9]", + )), + ], + errorMessage: field.errorText, + controller: controller[index], + ), + ); + }); + } else if (item.dataType == 'MultiValueList') { + return Align( + alignment: Alignment.topLeft, + child: Padding( + padding: const EdgeInsets.all(spacer2), + child: LabeledField( + label: localizations.translate( + '${selectedServiceDefinition?.code}.${item.code}', + ), + isRequired: item.required ?? false, + child: BlocBuilder( + builder: (context, state) { + return Column( + children: item.values! + .map((e) => DigitCheckbox( + label: localizations.translate( + '${selectedServiceDefinition?.code}.${e}'), + value: + controller[index].text.split('.').contains(e), + onChanged: (value) { + context.read().add( + ServiceSurveyFormEvent( + value: e.toString(), + submitTriggered: submitTriggered, + ), + ); + final String ele; + var val = controller[index].text.split('.'); + if (val.contains(e)) { + val.remove(e); + ele = val.join("."); + } else { + ele = "${controller[index].text}.$e"; + } + controller[index].value = + TextEditingController.fromValue( + TextEditingValue( + text: ele, + ), + ).value; + }, + )) + .toList(), + ); + }, + ), + ), + ), + ); + } else if (item.dataType == 'Boolean') { + return Align( + alignment: Alignment.topLeft, + child: Padding( + padding: const EdgeInsets.all(spacer2), + child: LabeledField( + label: localizations.translate( + '${selectedServiceDefinition?.code}.${item.code}', + ), + isRequired: item.required ?? false, + child: BlocBuilder( + builder: (context, state) { + return FormField( + autovalidateMode: AutovalidateMode.onUserInteraction, + validator: (value) { + if (item.required == true && + (controller[index].text == null || + controller[index].text == '')) { + return localizations.translate( + i18.common.coreCommonReasonRequired, + ); + } + + return null; + }, + builder: (field) => SelectionCard( + errorMessage: field.errorText, + allowMultipleSelection: false, + valueMapper: (value) { + return value + ? localizations.translate( + i18.common.coreCommonYes, + ) + : localizations.translate( + i18.common.coreCommonNo, + ); + }, + initialSelection: const [false], + options: const [true, false], + onSelectionChanged: (value) { + field.didChange(value.first); + context.read().add( + ServiceSurveyFormEvent( + value: value.toString(), + submitTriggered: submitTriggered, + ), + ); + final String ele; + var val = controller[index].text.split('.'); + if (val.contains(e)) { + val.remove(e); + ele = val.join("."); + } else { + ele = "${controller[index].text}.$e"; + } + controller[index].value = TextEditingController.fromValue( + TextEditingValue( + text: ele, + ), + ).value; + }, + ), + ); + }, + ), + ), + ), + ); + } else { + return const SizedBox.shrink(); + } + } + + // Function to build nested SurveyForm for child attributes + Widget _buildNestedSurveyForm( + String parentCode, + int parentIndex, + String parentControllerValue, + BuildContext context, + ) { + // Retrieve child items for the given parent code + final childItems = getNextQuestions( + parentCode, + initialAttributes ?? [], + ); + + return Column( + children: [ + // Build cards for each matching child attribute + for (final matchingChildItem in childItems.where((childItem) => + childItem.code!.startsWith('$parentCode.$parentControllerValue.'))) + DigitCard( + cardType: CardType.primary, + margin: const EdgeInsets.only( + bottom: spacer2, left: spacer1, right: spacer1), + children: [ + _buildSurveyForm( + matchingChildItem, + initialAttributes?.indexOf(matchingChildItem) ?? parentIndex, + // Pass parentIndex here as we're building at the same level + selectedServiceDefinition, + context, + ), + ]), + ], + ); + } + + // Function to get the next questions (child attributes) based on a parent code + List getNextQuestions( + String parentCode, + List surveyFormItems, + ) { + final childCodePrefix = '$parentCode.'; + final nextSurveyForm = surveyFormItems.where((item) { + return item.code!.startsWith(childCodePrefix) && + item.code?.split('.').length == parentCode.split('.').length + 2; + }).toList(); + + return nextSurveyForm; + } + + int countDots(String inputString) { + int dotCount = 0; + for (int i = 0; i < inputString.length; i++) { + if (inputString[i] == '.') { + dotCount++; + } + } + + return dotCount; + } + + Future _onBackPressed(BuildContext context) async { + bool? shouldNavigateBack = await showDialog( + context: context, + builder: (context) => Popup( + title: localizations.translate( + i18.surveyForm.surveyFormBackDialogLabel, + ), + type: PopUpType.simple, + description: localizations.translate( + i18.surveyForm.surveyFormBackDialogDescription, + ), + actions: [ + DigitButton( + label: localizations + .translate(i18.surveyForm.surveyFormBackDialogPrimaryAction), + onPressed: () { + Navigator.of( + context, + rootNavigator: true, + ).pop(true); + }, + type: DigitButtonType.primary, + size: DigitButtonSize.large), + DigitButton( + label: localizations.translate( + i18.surveyForm.surveyFormBackDialogSecondaryAction), + onPressed: () { + Navigator.of( + context, + rootNavigator: true, + ).pop(false); + }, + type: DigitButtonType.secondary, + size: DigitButtonSize.large) + ], + ), + ); + + return shouldNavigateBack ?? false; + } +} diff --git a/apps/health_campaign_field_worker_app/lib/pages/checklist/checklist_wrapper.dart b/packages/survey_form/lib/pages/survey_form_wrapper.dart similarity index 54% rename from apps/health_campaign_field_worker_app/lib/pages/checklist/checklist_wrapper.dart rename to packages/survey_form/lib/pages/survey_form_wrapper.dart index f3627037c..a69995919 100644 --- a/apps/health_campaign_field_worker_app/lib/pages/checklist/checklist_wrapper.dart +++ b/packages/survey_form/lib/pages/survey_form_wrapper.dart @@ -1,33 +1,27 @@ import 'package:auto_route/auto_route.dart'; +import 'package:digit_ui_components/services/location_bloc.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:digit_data_model/data_model.dart'; - -import '../../utils/extensions/extensions.dart'; -import '../../widgets/boundary_selection_wrapper.dart'; +import 'package:location/location.dart'; +import 'package:survey_form/survey_form.dart'; +import 'package:survey_form/utils/extensions/context_utility.dart'; @RoutePage() -class ChecklistWrapperPage extends StatelessWidget implements AutoRouteWrapper { +class SurveyFormWrapperPage extends StatelessWidget { final bool isEditing; - const ChecklistWrapperPage({ + const SurveyFormWrapperPage({ super.key, this.isEditing = false, }); @override Widget build(BuildContext context) { - return const BoundarySelectionWrapper( - child: AutoRouter(), - ); - } - - @override - Widget wrappedRoute(BuildContext context) { - final serviceDefinition = context - .repository(); + final serviceDefinition = context.repository(context); - final service = context.repository(); + final service = + context.repository(context); return MultiBlocProvider( providers: [ @@ -36,6 +30,7 @@ class ChecklistWrapperPage extends StatelessWidget implements AutoRouteWrapper { const ServiceDefinitionEmptyState(), serviceDefinitionDataRepository: serviceDefinition, )..add(const ServiceDefinitionFetchEvent()), + lazy: false, ), BlocProvider( create: (_) => ServiceBloc( @@ -43,8 +38,9 @@ class ChecklistWrapperPage extends StatelessWidget implements AutoRouteWrapper { serviceDataRepository: service, ), ), + BlocProvider(create: (_) => LocationBloc(location: Location())) ], - child: this, + child: const AutoRouter(), ); } } diff --git a/packages/survey_form/lib/router/survey_form_router.dart b/packages/survey_form/lib/router/survey_form_router.dart new file mode 100644 index 000000000..70186e87a --- /dev/null +++ b/packages/survey_form/lib/router/survey_form_router.dart @@ -0,0 +1,29 @@ +import 'package:auto_route/auto_route.dart'; +import 'package:survey_form/router/survey_form_router.gm.dart'; + + +//Used auto_route package to navigate to different pages in survey_form package + +@AutoRouterConfig.module() +class SurveyFormRoute extends $SurveyFormRoute { + + RouteType get defaultRouteType => const RouteType.material(); + + List routes = [ + AutoRoute( + page: SurveyFormWrapperRoute.page, + path: 'surveyForm', + children: [ + AutoRoute( + page: SurveyformRoute.page, + path: '', + ), + ], + ), + AutoRoute( + page: SurveyFormBoundaryViewRoute.page, path: 'view-boundary'), + AutoRoute(page: SurveyFormViewRoute.page, path: 'view'), + AutoRoute(page: SurveyFormPreviewRoute.page, path: 'preview'), + AutoRoute(page: SurveyFormAcknowledgementRoute.page, path: 'surveyForm-acknowledgement'), + ]; +} \ No newline at end of file diff --git a/packages/survey_form/lib/router/survey_form_router.gm.dart b/packages/survey_form/lib/router/survey_form_router.gm.dart new file mode 100644 index 000000000..50e3f4d55 --- /dev/null +++ b/packages/survey_form/lib/router/survey_form_router.gm.dart @@ -0,0 +1,354 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +// ************************************************************************** +// AutoRouterGenerator +// ************************************************************************** + +// ignore_for_file: type=lint +// coverage:ignore-file + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'package:auto_route/auto_route.dart' as _i7; +import 'package:flutter/material.dart' as _i8; +import 'package:survey_form/blocs/app_localization.dart' as _i9; +import 'package:survey_form/pages/acknowledgement.dart' as _i1; +import 'package:survey_form/pages/survey_form.dart' as _i6; +import 'package:survey_form/pages/survey_form_boundary_view.dart' as _i2; +import 'package:survey_form/pages/survey_form_preview.dart' as _i3; +import 'package:survey_form/pages/survey_form_view.dart' as _i4; +import 'package:survey_form/pages/survey_form_wrapper.dart' as _i5; +import 'package:survey_form/survey_form.dart' as _i10; + +abstract class $SurveyFormRoute extends _i7.AutoRouterModule { + @override + final Map pagesMap = { + SurveyFormAcknowledgementRoute.name: (routeData) { + final args = routeData.argsAs( + orElse: () => const SurveyFormAcknowledgementRouteArgs()); + return _i7.AutoRoutePage( + routeData: routeData, + child: _i1.SurveyFormAcknowledgementPage( + key: args.key, + appLocalizations: args.appLocalizations, + isDataRecordSuccess: args.isDataRecordSuccess, + label: args.label, + description: args.description, + descriptionTableData: args.descriptionTableData, + ), + ); + }, + SurveyFormBoundaryViewRoute.name: (routeData) { + final args = routeData.argsAs( + orElse: () => const SurveyFormBoundaryViewRouteArgs()); + return _i7.AutoRoutePage( + routeData: routeData, + child: _i2.SurveyFormBoundaryViewPage( + key: args.key, + appLocalizations: args.appLocalizations, + ), + ); + }, + SurveyFormPreviewRoute.name: (routeData) { + final args = routeData.argsAs( + orElse: () => const SurveyFormPreviewRouteArgs()); + return _i7.AutoRoutePage( + routeData: routeData, + child: _i3.SurveyFormPreviewPage( + key: args.key, + appLocalizations: args.appLocalizations, + ), + ); + }, + SurveyFormViewRoute.name: (routeData) { + final args = routeData.argsAs( + orElse: () => const SurveyFormViewRouteArgs()); + return _i7.AutoRoutePage( + routeData: routeData, + child: _i4.SurveyFormViewPage( + key: args.key, + referralClientRefId: args.referralClientRefId, + appLocalizations: args.appLocalizations, + ), + ); + }, + SurveyFormWrapperRoute.name: (routeData) { + final args = routeData.argsAs( + orElse: () => const SurveyFormWrapperRouteArgs()); + return _i7.AutoRoutePage( + routeData: routeData, + child: _i5.SurveyFormWrapperPage( + key: args.key, + isEditing: args.isEditing, + ), + ); + }, + SurveyformRoute.name: (routeData) { + final args = routeData.argsAs( + orElse: () => const SurveyformRouteArgs()); + return _i7.AutoRoutePage( + routeData: routeData, + child: _i6.SurveyformPage( + key: args.key, + appLocalizations: args.appLocalizations, + ), + ); + }, + }; +} + +/// generated route for +/// [_i1.SurveyFormAcknowledgementPage] +class SurveyFormAcknowledgementRoute + extends _i7.PageRouteInfo { + SurveyFormAcknowledgementRoute({ + _i8.Key? key, + _i9.SurveyFormLocalization? appLocalizations, + bool isDataRecordSuccess = false, + String? label, + String? description, + Map? descriptionTableData, + List<_i7.PageRouteInfo>? children, + }) : super( + SurveyFormAcknowledgementRoute.name, + args: SurveyFormAcknowledgementRouteArgs( + key: key, + appLocalizations: appLocalizations, + isDataRecordSuccess: isDataRecordSuccess, + label: label, + description: description, + descriptionTableData: descriptionTableData, + ), + initialChildren: children, + ); + + static const String name = 'SurveyFormAcknowledgementRoute'; + + static const _i7.PageInfo page = + _i7.PageInfo(name); +} + +class SurveyFormAcknowledgementRouteArgs { + const SurveyFormAcknowledgementRouteArgs({ + this.key, + this.appLocalizations, + this.isDataRecordSuccess = false, + this.label, + this.description, + this.descriptionTableData, + }); + + final _i8.Key? key; + + final _i9.SurveyFormLocalization? appLocalizations; + + final bool isDataRecordSuccess; + + final String? label; + + final String? description; + + final Map? descriptionTableData; + + @override + String toString() { + return 'SurveyFormAcknowledgementRouteArgs{key: $key, appLocalizations: $appLocalizations, isDataRecordSuccess: $isDataRecordSuccess, label: $label, description: $description, descriptionTableData: $descriptionTableData}'; + } +} + +/// generated route for +/// [_i2.SurveyFormBoundaryViewPage] +class SurveyFormBoundaryViewRoute + extends _i7.PageRouteInfo { + SurveyFormBoundaryViewRoute({ + _i8.Key? key, + _i10.SurveyFormLocalization? appLocalizations, + List<_i7.PageRouteInfo>? children, + }) : super( + SurveyFormBoundaryViewRoute.name, + args: SurveyFormBoundaryViewRouteArgs( + key: key, + appLocalizations: appLocalizations, + ), + initialChildren: children, + ); + + static const String name = 'SurveyFormBoundaryViewRoute'; + + static const _i7.PageInfo page = + _i7.PageInfo(name); +} + +class SurveyFormBoundaryViewRouteArgs { + const SurveyFormBoundaryViewRouteArgs({ + this.key, + this.appLocalizations, + }); + + final _i8.Key? key; + + final _i10.SurveyFormLocalization? appLocalizations; + + @override + String toString() { + return 'SurveyFormBoundaryViewRouteArgs{key: $key, appLocalizations: $appLocalizations}'; + } +} + +/// generated route for +/// [_i3.SurveyFormPreviewPage] +class SurveyFormPreviewRoute + extends _i7.PageRouteInfo { + SurveyFormPreviewRoute({ + _i8.Key? key, + _i10.SurveyFormLocalization? appLocalizations, + List<_i7.PageRouteInfo>? children, + }) : super( + SurveyFormPreviewRoute.name, + args: SurveyFormPreviewRouteArgs( + key: key, + appLocalizations: appLocalizations, + ), + initialChildren: children, + ); + + static const String name = 'SurveyFormPreviewRoute'; + + static const _i7.PageInfo page = + _i7.PageInfo(name); +} + +class SurveyFormPreviewRouteArgs { + const SurveyFormPreviewRouteArgs({ + this.key, + this.appLocalizations, + }); + + final _i8.Key? key; + + final _i10.SurveyFormLocalization? appLocalizations; + + @override + String toString() { + return 'SurveyFormPreviewRouteArgs{key: $key, appLocalizations: $appLocalizations}'; + } +} + +/// generated route for +/// [_i4.SurveyFormViewPage] +class SurveyFormViewRoute extends _i7.PageRouteInfo { + SurveyFormViewRoute({ + _i8.Key? key, + String? referralClientRefId, + _i10.SurveyFormLocalization? appLocalizations, + List<_i7.PageRouteInfo>? children, + }) : super( + SurveyFormViewRoute.name, + args: SurveyFormViewRouteArgs( + key: key, + referralClientRefId: referralClientRefId, + appLocalizations: appLocalizations, + ), + initialChildren: children, + ); + + static const String name = 'SurveyFormViewRoute'; + + static const _i7.PageInfo page = + _i7.PageInfo(name); +} + +class SurveyFormViewRouteArgs { + const SurveyFormViewRouteArgs({ + this.key, + this.referralClientRefId, + this.appLocalizations, + }); + + final _i8.Key? key; + + final String? referralClientRefId; + + final _i10.SurveyFormLocalization? appLocalizations; + + @override + String toString() { + return 'SurveyFormViewRouteArgs{key: $key, referralClientRefId: $referralClientRefId, appLocalizations: $appLocalizations}'; + } +} + +/// generated route for +/// [_i5.SurveyFormWrapperPage] +class SurveyFormWrapperRoute + extends _i7.PageRouteInfo { + SurveyFormWrapperRoute({ + _i8.Key? key, + bool isEditing = false, + List<_i7.PageRouteInfo>? children, + }) : super( + SurveyFormWrapperRoute.name, + args: SurveyFormWrapperRouteArgs( + key: key, + isEditing: isEditing, + ), + initialChildren: children, + ); + + static const String name = 'SurveyFormWrapperRoute'; + + static const _i7.PageInfo page = + _i7.PageInfo(name); +} + +class SurveyFormWrapperRouteArgs { + const SurveyFormWrapperRouteArgs({ + this.key, + this.isEditing = false, + }); + + final _i8.Key? key; + + final bool isEditing; + + @override + String toString() { + return 'SurveyFormWrapperRouteArgs{key: $key, isEditing: $isEditing}'; + } +} + +/// generated route for +/// [_i6.SurveyformPage] +class SurveyformRoute extends _i7.PageRouteInfo { + SurveyformRoute({ + _i8.Key? key, + _i10.SurveyFormLocalization? appLocalizations, + List<_i7.PageRouteInfo>? children, + }) : super( + SurveyformRoute.name, + args: SurveyformRouteArgs( + key: key, + appLocalizations: appLocalizations, + ), + initialChildren: children, + ); + + static const String name = 'SurveyformRoute'; + + static const _i7.PageInfo page = + _i7.PageInfo(name); +} + +class SurveyformRouteArgs { + const SurveyformRouteArgs({ + this.key, + this.appLocalizations, + }); + + final _i8.Key? key; + + final _i10.SurveyFormLocalization? appLocalizations; + + @override + String toString() { + return 'SurveyformRouteArgs{key: $key, appLocalizations: $appLocalizations}'; + } +} diff --git a/packages/survey_form/lib/survey_form.dart b/packages/survey_form/lib/survey_form.dart new file mode 100644 index 000000000..e74936cdb --- /dev/null +++ b/packages/survey_form/lib/survey_form.dart @@ -0,0 +1,24 @@ +@MappableLib( + generateInitializerForScope: InitializerScope.package, +) +library survey_form; + +import 'package:dart_mappable/dart_mappable.dart'; + +//exporting all the files from survey_form package +export 'survey_form.init.dart'; +export 'models/entities/service.dart'; +export 'models/entities/service_attributes.dart'; +export 'models/entities/service_definition.dart'; +export 'data/repositories/oplog/oplog.dart'; +export 'data/repositories/local/service.dart'; +export 'data/repositories/local/service_definition.dart'; +export 'data/repositories/remote/service.dart'; +export 'data/repositories/remote/service_definition.dart'; +export 'data/repositories/remote/service_attributes.dart'; +export 'utils/utils.dart'; +export 'blocs/service.dart'; +export 'blocs/service_definition.dart'; +export 'blocs/app_localization.dart'; + + diff --git a/packages/survey_form/lib/survey_form.init.dart b/packages/survey_form/lib/survey_form.init.dart new file mode 100644 index 000000000..b9bd11a14 --- /dev/null +++ b/packages/survey_form/lib/survey_form.init.dart @@ -0,0 +1,20 @@ +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element + +import 'models/entities/service.dart' as p0; +import 'models/entities/service_attributes.dart' as p1; +import 'models/entities/service_definition.dart' as p2; + +void initializeMappers() { + p0.ServiceSearchModelMapper.ensureInitialized(); + p0.ServiceModelMapper.ensureInitialized(); + p0.ServiceAdditionalFieldsMapper.ensureInitialized(); + p1.ServiceAttributesSearchModelMapper.ensureInitialized(); + p1.ServiceAttributesModelMapper.ensureInitialized(); + p1.ServiceAttributesAdditionalFieldsMapper.ensureInitialized(); + p2.ServiceDefinitionSearchModelMapper.ensureInitialized(); + p2.ServiceDefinitionModelMapper.ensureInitialized(); + p2.ServiceDefinitionAdditionalFieldsMapper.ensureInitialized(); +} diff --git a/packages/survey_form/lib/utils/constants.dart b/packages/survey_form/lib/utils/constants.dart new file mode 100644 index 000000000..2b8733375 --- /dev/null +++ b/packages/survey_form/lib/utils/constants.dart @@ -0,0 +1,10 @@ +class Constants { + static const String SurveyFormPreviewDateFormat = 'dd MMMM yyyy'; + static const String defaultDateFormat = 'dd/MM/yyyy'; + static const String defaultDateTimeFormat = 'dd/MM/yyyy hh:mm a'; + static const String SurveyFormViewDateFormat = 'dd/MM/yyyy hh:mm a'; + static const String healthFacilitySurveyFormPrefix = 'HF_RF'; +} + +const String noResultSvg = 'assets/icons/svg/no_result.svg'; +const String mySurveyFormSvg = 'assets/icons/svg/mychecklist.svg'; \ No newline at end of file diff --git a/packages/survey_form/lib/utils/extensions/context_utility.dart b/packages/survey_form/lib/utils/extensions/context_utility.dart new file mode 100644 index 000000000..58d7fd4b0 --- /dev/null +++ b/packages/survey_form/lib/utils/extensions/context_utility.dart @@ -0,0 +1,25 @@ +import 'package:digit_data_model/data_model.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; +import '../utils.dart'; + +extension ContextUtilityExtensions on BuildContext { + int millisecondsSinceEpoch([DateTime? dateTime]) { + return (dateTime ?? DateTime.now()).millisecondsSinceEpoch; + } + + // Provides survey_form repository based on the persistence configuration + DataRepository + repository( + BuildContext context, + ) { + switch (SurveyFormSingleton().persistenceConfiguration) { + case PersistenceConfiguration.offlineFirst: + return context.read>(); + case PersistenceConfiguration.onlineOnly: + return context.read>(); + default: + return context.read>(); + } + } +} diff --git a/packages/survey_form/lib/utils/i18_key_constants.dart b/packages/survey_form/lib/utils/i18_key_constants.dart new file mode 100644 index 000000000..492b7f91c --- /dev/null +++ b/packages/survey_form/lib/utils/i18_key_constants.dart @@ -0,0 +1,247 @@ +library i18; + +const common = Common(); +const surveyForm = SurveyForm(); +const selectSurveyFormShowcase = SelectSurveyFormShowcase(); +const surveyFormDataShowcase = SurveyFormDataShowcase(); +const surveyFormListShowcase = SurveyFormListShowcase(); +const searchBeneficiary = SearchBeneficiary(); +const householdLocation = HouseholdLocation(); +const acknowledgementSuccess = AcknowledgementSuccess(); + +class Common { + const Common(); + + String get coreCommonContinue => 'CORE_COMMON_CONTINUE'; + + String get coreCommonAge => 'CORE_COMMON_AGE'; + + String get coreCommonName => 'CORE_COMMON_NAME'; + + String get coreCommonEmailId => 'CORE_COMMON_EMAIL_ID'; + + String get coreCommonGender => 'CORE_COMMON_GENDER'; + + String get coreCommonMobileNumber => 'CORE_COMMON_MOBILE_NUMBER'; + + String get coreCommonSubmit => 'CORE_COMMON_SUBMIT'; + + String get coreCommonSave => 'CORE_COMMON_SAVE'; + + String get coreCommonCancel => 'CORE_COMMON_CANCEL'; + + String get corecommonRequired => 'CORE_COMMON_REQUIRED'; + + String get coreCommonReasonRequired => 'CORE_COMMON_REASON_REQUIRED'; + + String get corecommonclose => 'CORE_COMMON_CLOSE'; + + String get coreCommonOk => 'CORE_COMMON_OK'; + + String get coreCommonNA => 'CORE_COMMON_NA'; + + String get coreCommonProfile => 'CORE_COMMON_PROFILE'; + + String get coreCommonLogout => 'CORE_COMMON_LOGOUT'; + + String get coreCommonBack => 'CORE_COMMON_BACK'; + + String get coreCommonHelp => 'CORE_COMMON_HELP'; + + String get coreCommonHome => 'CORE_COMMON_HOME'; + + String get coreCommonViewDownloadedData => 'CORE_COMMON_VIEW_DOWNLOADED_DATA'; + + String get coreCommonlanguage => 'CORE_COMMON_LANGUAGE'; + + String get coreCommonSyncProgress => 'CORE_COMMON_SYNC_PROGRESS'; + + String get coreCommonDataSynced => 'CORE_COMMON_DATA_SYNCED'; + + String get coreCommonDataSyncFailed => 'CORE_COMMON_DATA_SYNC_FAILED'; + + String get coreCommonDataSyncRetry => 'CORE_COMMON_DATA_SYNC_RETRY'; + + String get connectionLabel => 'CORE_COMMON_CONNECTION_LABEL'; + + String get connectionContent => 'CORE_COMMON_CONNECTION_CONTENT'; + + String get coreCommonSkip => 'CORE_COMMON_SKIP'; + + String get coreCommonNext => 'CORE_COMMON_NEXT'; + + String get coreCommonYes => 'CORE_COMMON_YES'; + + String get coreCommonNo => 'CORE_COMMON_NO'; + String get coreCommonGoback => 'CORE_COMMON_GO_BACK'; + + String get coreCommonRequiredItems => 'CORE_COMMON_REQUIRED_ITEMS'; + + String get min2CharsRequired => 'MIN_2_CHARS_REQUIRED'; + + String get maxCharsRequired => 'MAX_CHARS_ALLOWED'; + + String get maxValue => 'MAX_VALUE_ALLOWED'; + String get minValue => 'MIN_VALUE_ALLOWED'; + + String get noResultsFound => 'NO_RESULTS_FOUND'; + + String get coreCommonSyncInProgress => 'CORE_COMMON_SYNC_IN_PROGRESS'; + + String get facilitySearchHeaderLabel => 'FACILITY_SEARCH_HEADER_LABEL'; + String get projectFacilitySearchHeaderLabel => + 'PROJECT_FACILITY_SEARCH_HEADER_LABEL'; + + String get coreCommonDownload => 'CORE_COMMON_DOWNLOAD'; + + String get coreCommonDownloadFailed => 'CORE_COMMON_DOWNLOAD_FAILED'; + + String get locationCapturing => 'CAPTURING_LOCATION'; + + String get noMatchFound => 'CORE_COMMON_NO_MATCH_FOUND'; + + String get scanBales => 'CORE_COMMON_SCAN_BALES'; + String get ageInMonths => 'AGE_IN_MONTHS_LABEL'; + + String get profileUpdateSuccess => 'PROFILE_UPDATE_SUCCESS'; +} + +class SelectSurveyFormShowcase { + const SelectSurveyFormShowcase(); + + String get selectSurveyForm { + return 'SELECT_CHECKLIST_SHOWCASE_SELECT_CHECKLIST'; + } +} + +class SurveyFormDataShowcase { + const SurveyFormDataShowcase(); + + String get date { + return 'CHECKLIST_DATA_SHOWCASE_DATE'; + } + + String get administrativeUnit { + return 'CHECKLIST_DATA_SHOWCASE_ADMINISTRATIVE_UNIT'; + } +} + +class SurveyFormListShowcase { + const SurveyFormListShowcase(); + + String get open { + return 'CHECKLIST_LIST_SHOWCASE_OPEN'; + } +} + +class SurveyForm { + const SurveyForm(); + + String get surveyForm => 'CHECKLIST'; + + String get surveyFormlabel => 'CHECKLIST_LABEL'; + + String get surveyFormCreateActionLabel => 'CHECKLIST_CREATE_ACTION_LABEL'; + + String get surveyFormViewActionLabel => 'CHECKLIST_VIEW_ACTION_LABEL'; + + String get surveyFormDetailLabel => 'CHECKLIST_DETAILS_LABEL'; + + String get surveyFormDialogLabel => 'CHECKLIST_DIALOG_LABEL'; + + String get surveyFormDialogDescription => 'CHECKLIST_DIALOG_DESCRITPTION'; + + String get surveyFormDialogPrimaryAction => 'CHECKLIST_DIALOG_PRIMARY_ACTION'; + + String get surveyFormDialogSecondaryAction => + 'CHECKLIST_DIALOG_SECONDARY_ACTION'; + + String get surveyFormdate => 'CHECKLIST_DATE'; + + String get surveyFormReasonRequiredError => 'CHECKLIST_REASON_REQUIRED_ERROR'; + + String get notSelectedKey => 'NOT_SELECTED'; + + String get surveyFormBackDialogLabel => 'CHECKLIST_BACK_DIALOG_LABEL'; + + String get surveyFormBackDialogDescription => + 'CHECKLIST_BACK_DIALOG_DESCRITPTION'; + + String get surveyFormBackDialogPrimaryAction => + 'CHECKLIST_BACK_DIALOG_PRIMARY_ACTION'; + + String get surveyFormBackDialogSecondaryAction => + 'CHECKLIST_BACK_DIALOG_SECONDARY_ACTION'; + + String get noSurveyFormFound => 'NO_CHECKLIST_FOUND'; +} + +class SearchBeneficiary { + const SearchBeneficiary(); + + String get statisticsLabelText => 'BENEFICIARY_STATISTICS_LABEL_TEXT'; + + String get searchIndividualLabelText => + 'BENEFICIARY_STATISTICS_SEARCH_INDIVIDUAL_LABEL'; + + String get noOfHouseholdsRegistered => 'NO_OF_HOUSEHOLDS_REGISTERED'; + + String get noOfResourcesDelivered => 'NO_OF_RESOURCES_DELIVERED'; + + String get beneficiarySearchHintText => 'BENEFICIARY_SEARCH_HINT_TEXT'; + + String get beneficiaryIndividualSearchHintText => + 'BENEFICIARY_INDIVIDUAL_SEARCH_HINT_TEXT'; + + String get beneficiaryInfoDescription => 'BENEFICIARY_INFO_DESCRIPTION'; + + String get beneficiaryInfoTitle => 'BENEFICIARY_INFO_TITLE'; + + String get beneficiaryAddActionLabel => 'BENEFICIARY_ADD_ACTION_LABEL'; + + String get iconLabel => 'ICON_LABEL'; + + String get yearsAbbr => 'YEARS_ABBR'; + + String get monthsAbbr => 'MONTHS_ABBR'; + + String get proximityLabel => 'PROXIMITY_LABEL'; +} + +class HouseholdLocation { + const HouseholdLocation(); + + String get householdLocationLabelText => 'HOUSEHOLD_LOCATION_LABEL_TEXT'; + + String get administrationAreaFormLabel => 'ADMINISTRATION_AREA_FORM_LABEL'; + + String get administrationAreaRequiredValidation => + 'HOUSEHOLD_LOCATION_ADMINISTRATION_AREA_REQUIRED_VALIDATION'; + + String get householdAddressLine1LabelText => + 'HOUSEHOLD_ADDRESS_LINE_1_FORM_LABEL'; + + String get landmarkFormLabel => 'LANDMARK_FORM_LABEL'; + + String get householdAddressLine2LabelText => + 'HOUSEHOLD_ADDRESS_LINE_2_FORM_LABEL'; + + String get postalCodeFormLabel => 'POSTAL_CODE_FORM_LABEL'; + + String get actionLabel => 'HOUSEHOLD_LOCATION_ACTION_LABEL'; +} + +class AcknowledgementSuccess { + const AcknowledgementSuccess(); + + String get actionLabelText => 'ACKNOWLEDGEMENT_SUCCESS_ACTION_LABEL_TEXT'; + + String get acknowledgementDescriptionText => + 'ACKNOWLEDGEMENT_SUCCESS_DESCRIPTION_TEXT'; + + String get acknowledgementLabelText => 'ACKNOWLEDGEMENT_SUCCESS_LABEL_TEXT'; + + String get goToHome => 'GO_TO_HOME_SCREEN'; + String get downloadmoredata => 'DOWNLOAD_MORE_DATA'; + String get dataDownloadedSuccessLabel => 'DATA_DOWNLOADED_SUCCESS_LABEL'; +} diff --git a/packages/survey_form/lib/utils/typedefs.dart b/packages/survey_form/lib/utils/typedefs.dart new file mode 100644 index 000000000..151f8f549 --- /dev/null +++ b/packages/survey_form/lib/utils/typedefs.dart @@ -0,0 +1,7 @@ +import 'package:digit_data_model/data/data_repository.dart'; +import 'package:survey_form/survey_form.dart'; + +typedef ServiceDataRepository += DataRepository; +typedef ServiceDefinitionDataRepository += DataRepository; \ No newline at end of file diff --git a/packages/survey_form/lib/utils/utils.dart b/packages/survey_form/lib/utils/utils.dart new file mode 100644 index 000000000..8f706e679 --- /dev/null +++ b/packages/survey_form/lib/utils/utils.dart @@ -0,0 +1,65 @@ +import 'package:digit_data_model/data_model.dart'; + +// Singleton class for managing survey_form operations +class SurveyFormSingleton { + static final SurveyFormSingleton _singleton = SurveyFormSingleton._internal(); + + factory SurveyFormSingleton() { + return _singleton; + } + + SurveyFormSingleton._internal(); + + String _projectId = ''; + String _projectName=''; + String _loggedInIndividualId = ''; + String _loggedInUserUuid = ''; + String _appVersion = ''; + String _tenantId = ''; + Object _roles=[]; + bool _isHealthFacilityWorker = false; + BoundaryModel? _boundaryModel; + PersistenceConfiguration _persistenceConfiguration = PersistenceConfiguration + .offlineFirst; // Default to offline first persistence configuration + + void setBoundary({required BoundaryModel boundary}) { + _boundaryModel = boundary; + } + // Method to set survey_form listeners and other information + void setInitialData( + {required String projectId, + required String projectName, + required String loggedInIndividualId, + required String loggedInUserUuid, + required String appVersion, + required bool isHealthFacilityWorker, + required Object roles}) { + + _projectId = projectId; + _projectName=projectName; + _loggedInIndividualId = loggedInIndividualId; + _loggedInUserUuid = loggedInUserUuid; + _appVersion = appVersion; + _roles=roles; + _isHealthFacilityWorker=isHealthFacilityWorker; + } + + get projectId => _projectId; + get projectName => _projectName; + get loggedInIndividualId => _loggedInIndividualId; + get loggedInUserUuid => _loggedInUserUuid; + get appVersion => _appVersion; + get tenantId => _tenantId; + get persistenceConfiguration => _persistenceConfiguration; + get roles => _roles; + get isHealthFacilityWorker => _isHealthFacilityWorker; + BoundaryModel? get boundary => _boundaryModel; + + void setTenantId(String tenantId) { + _tenantId = tenantId; + } + + void setPersistenceConfiguration(PersistenceConfiguration configuration) { + _persistenceConfiguration = configuration; + } +} diff --git a/packages/survey_form/lib/widgets/back_navigation_help_header.dart b/packages/survey_form/lib/widgets/back_navigation_help_header.dart new file mode 100644 index 000000000..6e0a74f12 --- /dev/null +++ b/packages/survey_form/lib/widgets/back_navigation_help_header.dart @@ -0,0 +1,87 @@ +import 'package:auto_route/auto_route.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/theme/ComponentTheme/back_button_theme.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/atoms/digit_back_button.dart'; +import 'package:flutter/material.dart'; + +import '../../utils/i18_key_constants.dart' as i18; +import '../blocs/app_localization.dart'; + +class BackNavigationHelpHeaderWidget extends StatelessWidget { + final bool showHelp; + final bool showBackNavigation; + final bool showLogoutCTA; + final VoidCallback? helpClicked; + final VoidCallback? handleBack; + + const BackNavigationHelpHeaderWidget({ + super.key, + this.showHelp = false, //hiding help + this.showBackNavigation = true, + this.showLogoutCTA = false, + this.helpClicked, + this.handleBack, + }); + + @override + Widget build(BuildContext context) { + final theme = Theme.of(context); + + return Padding( + padding: const EdgeInsets.all(4.0), + child: Row( + children: [ + Expanded( + child: Row( + children: [ + if (showBackNavigation) + Align( + alignment: Alignment.topLeft, + child: Padding( + padding: const EdgeInsets.all(spacer2), + child: DigitBackButton( + label: SurveyFormLocalization.of(context) + .translate(i18.common.coreCommonBack), + digitBackButtonThemeData: + const DigitBackButtonThemeData().copyWith( + context: context, + backDigitButtonIcon: Icon( + Icons.arrow_left, + size: Theme.of(context).spacerTheme.spacer5, + color: Theme.of(context).colorTheme.primary.primary2, + ), + ), + handleBack: () { + context.router.maybePop(); + handleBack != null ? handleBack!() : null; + }, + ), + ), + ), + ], + ), + ), + SizedBox(width: showHelp ? 16 : 0), + if (showHelp) + TextButton( + style: TextButton.styleFrom(padding: EdgeInsets.zero), + onPressed: helpClicked, + child: Row( + children: [ + Text( + SurveyFormLocalization.of(context) + .translate(i18.common.coreCommonHelp), + overflow: TextOverflow.ellipsis, + ), + const Icon( + Icons.help_outline_outlined, + ), // Add the icon to the right + ], + ), + ), + ], + ), + ); + } +} diff --git a/packages/survey_form/lib/widgets/localized.dart b/packages/survey_form/lib/widgets/localized.dart new file mode 100644 index 000000000..206a64dc4 --- /dev/null +++ b/packages/survey_form/lib/widgets/localized.dart @@ -0,0 +1,35 @@ +import 'package:flutter/material.dart'; + +import '../blocs/app_localization.dart'; + + +abstract class LocalizedStatefulWidget extends StatefulWidget { + final SurveyFormLocalization? appLocalizations; + + const LocalizedStatefulWidget({ + super.key, + this.appLocalizations, + }); +} + +abstract class LocalizedState + extends State { + late SurveyFormLocalization _localizations; + + SurveyFormLocalization get localizations => _localizations; + + set localizations(SurveyFormLocalization localizations) { + if (mounted) { + setState(() { + _localizations = localizations; + }); + } + } + + @override + @mustCallSuper + void didChangeDependencies() { + _localizations = widget.appLocalizations ?? SurveyFormLocalization.of(context); + super.didChangeDependencies(); + } +} diff --git a/packages/survey_form/lib/widgets/no_result_card.dart b/packages/survey_form/lib/widgets/no_result_card.dart new file mode 100644 index 000000000..270f75fa0 --- /dev/null +++ b/packages/survey_form/lib/widgets/no_result_card.dart @@ -0,0 +1,40 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_svg/svg.dart'; + +import '../utils/constants.dart'; + +class NoResultCard extends StatelessWidget { + final AlignmentGeometry align; + final String? label; + const NoResultCard({ + super.key, + this.align = Alignment.centerLeft, + this.label, + }); + + @override + Widget build(BuildContext context) { + final theme = Theme.of(context); + + return Align( + alignment: align, + child: Padding( + padding: const EdgeInsets.only(top: 100, bottom: 10, right: 8), + child: Column( + children: [ + SvgPicture.asset( + noResultSvg, + width: 340, + height: 200, + ), + const SizedBox(height: 20), + Text( + label ?? '', + style: theme.textTheme.bodyMedium, + ), + ], + ), + ), + ); + } +} diff --git a/packages/survey_form/pubspec.lock b/packages/survey_form/pubspec.lock new file mode 100644 index 000000000..076ded7c8 --- /dev/null +++ b/packages/survey_form/pubspec.lock @@ -0,0 +1,1512 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + sha256: "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7" + url: "https://pub.dev" + source: hosted + version: "67.0.0" + analyzer: + dependency: transitive + description: + name: analyzer + sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d" + url: "https://pub.dev" + source: hosted + version: "6.4.1" + analyzer_plugin: + dependency: transitive + description: + name: analyzer_plugin + sha256: "9661b30b13a685efaee9f02e5d01ed9f2b423bd889d28a304d02d704aee69161" + url: "https://pub.dev" + source: hosted + version: "0.11.3" + ansicolor: + dependency: transitive + description: + name: ansicolor + sha256: "50e982d500bc863e1d703448afdbf9e5a72eb48840a4f766fa361ffd6877055f" + url: "https://pub.dev" + source: hosted + version: "2.0.3" + archive: + dependency: transitive + description: + name: archive + sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d + url: "https://pub.dev" + source: hosted + version: "3.6.1" + args: + dependency: transitive + description: + name: args + sha256: bf9f5caeea8d8fe6721a9c358dd8a5c1947b27f1cfaa18b39c301273594919e6 + url: "https://pub.dev" + source: hosted + version: "2.6.0" + async: + dependency: transitive + description: + name: async + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" + source: hosted + version: "2.11.0" + auto_route: + dependency: "direct main" + description: + name: auto_route + sha256: a9001a90539ca3effc168f7e1029a5885c7326b9032c09ac895e303c1d137704 + url: "https://pub.dev" + source: hosted + version: "8.3.0" + auto_route_generator: + dependency: "direct dev" + description: + name: auto_route_generator + sha256: a21d7a936c917488653c972f62d884d8adcf8c5d37acc7cd24da33cf784546c0 + url: "https://pub.dev" + source: hosted + version: "8.1.0" + bloc: + dependency: transitive + description: + name: bloc + sha256: "106842ad6569f0b60297619e9e0b1885c2fb9bf84812935490e6c5275777804e" + url: "https://pub.dev" + source: hosted + version: "8.1.4" + bloc_test: + dependency: "direct dev" + description: + name: bloc_test + sha256: "165a6ec950d9252ebe36dc5335f2e6eb13055f33d56db0eeb7642768849b43d2" + url: "https://pub.dev" + source: hosted + version: "9.1.7" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + build: + dependency: transitive + description: + name: build + sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" + url: "https://pub.dev" + source: hosted + version: "2.4.1" + build_config: + dependency: transitive + description: + name: build_config + sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1 + url: "https://pub.dev" + source: hosted + version: "1.1.1" + build_daemon: + dependency: transitive + description: + name: build_daemon + sha256: "79b2aef6ac2ed00046867ed354c88778c9c0f029df8a20fe10b5436826721ef9" + url: "https://pub.dev" + source: hosted + version: "4.0.2" + build_resolvers: + dependency: transitive + description: + name: build_resolvers + sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a" + url: "https://pub.dev" + source: hosted + version: "2.4.2" + build_runner: + dependency: transitive + description: + name: build_runner + sha256: "644dc98a0f179b872f612d3eb627924b578897c629788e858157fa5e704ca0c7" + url: "https://pub.dev" + source: hosted + version: "2.4.11" + build_runner_core: + dependency: transitive + description: + name: build_runner_core + sha256: e3c79f69a64bdfcd8a776a3c28db4eb6e3fb5356d013ae5eb2e52007706d5dbe + url: "https://pub.dev" + source: hosted + version: "7.3.1" + built_collection: + dependency: transitive + description: + name: built_collection + sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" + url: "https://pub.dev" + source: hosted + version: "5.1.1" + built_value: + dependency: transitive + description: + name: built_value + sha256: c7913a9737ee4007efedaffc968c049fd0f3d0e49109e778edc10de9426005cb + url: "https://pub.dev" + source: hosted + version: "8.9.2" + camera: + dependency: transitive + description: + name: camera + sha256: "26ff41045772153f222ffffecba711a206f670f5834d40ebf5eed3811692f167" + url: "https://pub.dev" + source: hosted + version: "0.11.0+2" + camera_android_camerax: + dependency: transitive + description: + name: camera_android_camerax + sha256: "011be2ab0e5b3e3aa8094413fa890f8c5c5afd7cfdaef353a992047d4dab5780" + url: "https://pub.dev" + source: hosted + version: "0.6.8+2" + camera_avfoundation: + dependency: transitive + description: + name: camera_avfoundation + sha256: "2e4c568f70e406ccb87376bc06b53d2f5bebaab71e2fbcc1a950e31449381bcf" + url: "https://pub.dev" + source: hosted + version: "0.9.17+5" + camera_platform_interface: + dependency: transitive + description: + name: camera_platform_interface + sha256: b3ede1f171532e0d83111fe0980b46d17f1aa9788a07a2fbed07366bbdbb9061 + url: "https://pub.dev" + source: hosted + version: "2.8.0" + camera_web: + dependency: transitive + description: + name: camera_web + sha256: "595f28c89d1fb62d77c73c633193755b781c6d2e0ebcd8dc25b763b514e6ba8f" + url: "https://pub.dev" + source: hosted + version: "0.3.5" + characters: + dependency: transitive + description: + name: characters + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" + source: hosted + version: "1.3.0" + charcode: + dependency: transitive + description: + name: charcode + sha256: fb0f1107cac15a5ea6ef0a6ef71a807b9e4267c713bb93e00e92d737cc8dbd8a + url: "https://pub.dev" + source: hosted + version: "1.4.0" + checked_yaml: + dependency: transitive + description: + name: checked_yaml + sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff + url: "https://pub.dev" + source: hosted + version: "2.0.3" + cli_util: + dependency: transitive + description: + name: cli_util + sha256: ff6785f7e9e3c38ac98b2fb035701789de90154024a75b6cb926445e83197d1c + url: "https://pub.dev" + source: hosted + version: "0.4.2" + clock: + dependency: transitive + description: + name: clock + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" + source: hosted + version: "1.1.1" + code_builder: + dependency: transitive + description: + name: code_builder + sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37 + url: "https://pub.dev" + source: hosted + version: "4.10.0" + collection: + dependency: "direct main" + description: + name: collection + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + url: "https://pub.dev" + source: hosted + version: "1.18.0" + convert: + dependency: transitive + description: + name: convert + sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68 + url: "https://pub.dev" + source: hosted + version: "3.1.2" + coverage: + dependency: transitive + description: + name: coverage + sha256: e3493833ea012784c740e341952298f1cc77f1f01b1bbc3eb4eecf6984fb7f43 + url: "https://pub.dev" + source: hosted + version: "1.11.1" + cross_file: + dependency: transitive + description: + name: cross_file + sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670" + url: "https://pub.dev" + source: hosted + version: "0.3.4+2" + crypto: + dependency: transitive + description: + name: crypto + sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855" + url: "https://pub.dev" + source: hosted + version: "3.0.6" + csslib: + dependency: transitive + description: + name: csslib + sha256: "09bad715f418841f976c77db72d5398dc1253c21fb9c0c7f0b0b985860b2d58e" + url: "https://pub.dev" + source: hosted + version: "1.0.2" + dart_mappable: + dependency: "direct main" + description: + name: dart_mappable + sha256: f69a961ae8589724ebb542e588f228ae844c5f78028899cbe2cc718977c1b382 + url: "https://pub.dev" + source: hosted + version: "4.3.0" + dart_mappable_builder: + dependency: "direct dev" + description: + path: "packages/dart_mappable_builder" + ref: "1.6-final-dev" + resolved-ref: "1e7467577a9701d396f7e23afbf00065e54c5469" + url: "https://github.com/egovernments/health-campaign-field-worker-app/" + source: git + version: "4.2.3" + dart_style: + dependency: transitive + description: + name: dart_style + sha256: "99e066ce75c89d6b29903d788a7bb9369cf754f7b24bf70bf4b6d6d6b26853b9" + url: "https://pub.dev" + source: hosted + version: "2.3.6" + diff_match_patch: + dependency: transitive + description: + name: diff_match_patch + sha256: "2efc9e6e8f449d0abe15be240e2c2a3bcd977c8d126cfd70598aee60af35c0a4" + url: "https://pub.dev" + source: hosted + version: "0.4.1" + digit_data_model: + dependency: "direct main" + description: + name: digit_data_model + sha256: c3bc7299a7d927ebb83d8e91c1d7a8a51f6a1d1295dafeacb642012b72b99a2f + url: "https://pub.dev" + source: hosted + version: "1.0.5" + digit_ui_components: + dependency: "direct main" + description: + name: digit_ui_components + sha256: "57c4da5237be6025783e7357a02b6b492f02e38f711d674bf46f5f8c8a93ad76" + url: "https://pub.dev" + source: hosted + version: "0.0.2-dev.4" + dio: + dependency: "direct main" + description: + name: dio + sha256: "5598aa796bbf4699afd5c67c0f5f6e2ed542afc956884b9cd58c306966efc260" + url: "https://pub.dev" + source: hosted + version: "5.7.0" + dio_web_adapter: + dependency: transitive + description: + name: dio_web_adapter + sha256: "33259a9276d6cea88774a0000cfae0d861003497755969c92faa223108620dc8" + url: "https://pub.dev" + source: hosted + version: "2.0.0" + dotted_border: + dependency: transitive + description: + name: dotted_border + sha256: "108837e11848ca776c53b30bc870086f84b62ed6e01c503ed976e8f8c7df9c04" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + drift: + dependency: "direct main" + description: + name: drift + sha256: "4e0ffee40d23f0b809e6cff1ad202886f51d629649073ed42d9cd1d194ea943e" + url: "https://pub.dev" + source: hosted + version: "2.19.1+1" + drift_dev: + dependency: "direct dev" + description: + name: drift_dev + sha256: ac7647c6cedca99724ca300cff9181f6dd799428f8ed71f94159ed0528eaec26 + url: "https://pub.dev" + source: hosted + version: "2.19.1" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" + source: hosted + version: "1.3.1" + ffi: + dependency: transitive + description: + name: ffi + sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" + url: "https://pub.dev" + source: hosted + version: "2.1.3" + file: + dependency: transitive + description: + name: file + sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 + url: "https://pub.dev" + source: hosted + version: "7.0.1" + file_picker: + dependency: transitive + description: + name: file_picker + sha256: "825aec673606875c33cd8d3c4083f1a3c3999015a84178b317b7ef396b7384f3" + url: "https://pub.dev" + source: hosted + version: "8.0.7" + file_selector_linux: + dependency: transitive + description: + name: file_selector_linux + sha256: "54cbbd957e1156d29548c7d9b9ec0c0ebb6de0a90452198683a7d23aed617a33" + url: "https://pub.dev" + source: hosted + version: "0.9.3+2" + file_selector_macos: + dependency: transitive + description: + name: file_selector_macos + sha256: "271ab9986df0c135d45c3cdb6bd0faa5db6f4976d3e4b437cf7d0f258d941bfc" + url: "https://pub.dev" + source: hosted + version: "0.9.4+2" + file_selector_platform_interface: + dependency: transitive + description: + name: file_selector_platform_interface + sha256: a3994c26f10378a039faa11de174d7b78eb8f79e4dd0af2a451410c1a5c3f66b + url: "https://pub.dev" + source: hosted + version: "2.6.2" + file_selector_windows: + dependency: transitive + description: + name: file_selector_windows + sha256: "8f5d2f6590d51ecd9179ba39c64f722edc15226cc93dcc8698466ad36a4a85a4" + url: "https://pub.dev" + source: hosted + version: "0.9.3+3" + fixnum: + dependency: transitive + description: + name: fixnum + sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be + url: "https://pub.dev" + source: hosted + version: "1.1.1" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_bloc: + dependency: "direct main" + description: + name: flutter_bloc + sha256: b594505eac31a0518bdcb4b5b79573b8d9117b193cc80cc12e17d639b10aa27a + url: "https://pub.dev" + source: hosted + version: "8.1.6" + flutter_dropzone: + dependency: transitive + description: + name: flutter_dropzone + sha256: b399c60411f9bf9c4c2f97933c6a3a185859e75aade8897831e76cee4346c8e1 + url: "https://pub.dev" + source: hosted + version: "3.0.7" + flutter_dropzone_platform_interface: + dependency: transitive + description: + name: flutter_dropzone_platform_interface + sha256: "96d2c51c86063ba150551c3b40fd26c5a18785bee071c0c751502d28a545df3b" + url: "https://pub.dev" + source: hosted + version: "2.2.0" + flutter_dropzone_web: + dependency: transitive + description: + name: flutter_dropzone_web + sha256: c5a0fdb63b7216352a01761ec1b6eba1982e49541e60675735e2d3d95e207b19 + url: "https://pub.dev" + source: hosted + version: "3.0.13" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04 + url: "https://pub.dev" + source: hosted + version: "2.0.3" + flutter_localizations: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + flutter_plugin_android_lifecycle: + dependency: transitive + description: + name: flutter_plugin_android_lifecycle + sha256: "9ee02950848f61c4129af3d6ec84a1cfc0e47931abc746b03e7a3bc3e8ff6eda" + url: "https://pub.dev" + source: hosted + version: "2.0.22" + flutter_spinkit: + dependency: transitive + description: + name: flutter_spinkit + sha256: d2696eed13732831414595b98863260e33e8882fc069ee80ec35d4ac9ddb0472 + url: "https://pub.dev" + source: hosted + version: "5.2.1" + flutter_styled_toast: + dependency: transitive + description: + name: flutter_styled_toast + sha256: e667f13a665820eb0fa8506547e47eacbcddf1948d6d3036cfd3b089bd4b0516 + url: "https://pub.dev" + source: hosted + version: "2.2.1" + flutter_svg: + dependency: "direct main" + description: + name: flutter_svg + sha256: "54900a1a1243f3c4a5506d853a2b5c2dbc38d5f27e52a52618a8054401431123" + url: "https://pub.dev" + source: hosted + version: "2.0.16" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + fluttertoast: + dependency: "direct main" + description: + name: fluttertoast + sha256: "95f349437aeebe524ef7d6c9bde3e6b4772717cf46a0eb6a3ceaddc740b297cc" + url: "https://pub.dev" + source: hosted + version: "8.2.8" + freezed: + dependency: "direct dev" + description: + name: freezed + sha256: a434911f643466d78462625df76fd9eb13e57348ff43fe1f77bbe909522c67a1 + url: "https://pub.dev" + source: hosted + version: "2.5.2" + freezed_annotation: + dependency: "direct main" + description: + name: freezed_annotation + sha256: c2e2d632dd9b8a2b7751117abcfc2b4888ecfe181bd9fca7170d9ef02e595fe2 + url: "https://pub.dev" + source: hosted + version: "2.4.4" + frontend_server_client: + dependency: transitive + description: + name: frontend_server_client + sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 + url: "https://pub.dev" + source: hosted + version: "4.0.0" + geolocator: + dependency: transitive + description: + name: geolocator + sha256: f4efb8d3c4cdcad2e226af9661eb1a0dd38c71a9494b22526f9da80ab79520e5 + url: "https://pub.dev" + source: hosted + version: "10.1.1" + geolocator_android: + dependency: transitive + description: + name: geolocator_android + sha256: "7aefc530db47d90d0580b552df3242440a10fe60814496a979aa67aa98b1fd47" + url: "https://pub.dev" + source: hosted + version: "4.6.1" + geolocator_apple: + dependency: transitive + description: + name: geolocator_apple + sha256: "6154ea2682563f69fc0125762ed7e91e7ed85d0b9776595653be33918e064807" + url: "https://pub.dev" + source: hosted + version: "2.3.8+1" + geolocator_platform_interface: + dependency: transitive + description: + name: geolocator_platform_interface + sha256: "386ce3d9cce47838355000070b1d0b13efb5bc430f8ecda7e9238c8409ace012" + url: "https://pub.dev" + source: hosted + version: "4.2.4" + geolocator_web: + dependency: transitive + description: + name: geolocator_web + sha256: "102e7da05b48ca6bf0a5bda0010f886b171d1a08059f01bfe02addd0175ebece" + url: "https://pub.dev" + source: hosted + version: "2.2.1" + geolocator_windows: + dependency: transitive + description: + name: geolocator_windows + sha256: "53da08937d07c24b0d9952eb57a3b474e29aae2abf9dd717f7e1230995f13f0e" + url: "https://pub.dev" + source: hosted + version: "0.2.3" + glob: + dependency: transitive + description: + name: glob + sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + google_fonts: + dependency: transitive + description: + name: google_fonts + sha256: b1ac0fe2832c9cc95e5e88b57d627c5e68c223b9657f4b96e1487aa9098c7b82 + url: "https://pub.dev" + source: hosted + version: "6.2.1" + graphs: + dependency: transitive + description: + name: graphs + sha256: "741bbf84165310a68ff28fe9e727332eef1407342fca52759cb21ad8177bb8d0" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + group_radio_button: + dependency: "direct main" + description: + name: group_radio_button + sha256: "204de8d16b224be7fc72dade0c3afd410ff5a34417d89f74f0fd8be7a8c2b4d6" + url: "https://pub.dev" + source: hosted + version: "1.3.0" + horizontal_data_table: + dependency: transitive + description: + name: horizontal_data_table + sha256: c8ab5256bbced698a729f3e0ff2cb0e8e97416cdbb082860370eaf883badf722 + url: "https://pub.dev" + source: hosted + version: "4.3.1" + html: + dependency: transitive + description: + name: html + sha256: "1fc58edeaec4307368c60d59b7e15b9d658b57d7f3125098b6294153c75337ec" + url: "https://pub.dev" + source: hosted + version: "0.15.5" + http: + dependency: transitive + description: + name: http + sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 + url: "https://pub.dev" + source: hosted + version: "1.2.2" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" + url: "https://pub.dev" + source: hosted + version: "3.2.1" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" + source: hosted + version: "4.0.2" + image_picker: + dependency: transitive + description: + name: image_picker + sha256: "021834d9c0c3de46bf0fe40341fa07168407f694d9b2bb18d532dc1261867f7a" + url: "https://pub.dev" + source: hosted + version: "1.1.2" + image_picker_android: + dependency: transitive + description: + name: image_picker_android + sha256: "8c5abf0dcc24fe6e8e0b4a5c0b51a5cf30cefdf6407a3213dae61edc75a70f56" + url: "https://pub.dev" + source: hosted + version: "0.8.12+12" + image_picker_for_web: + dependency: transitive + description: + name: image_picker_for_web + sha256: "717eb042ab08c40767684327be06a5d8dbb341fe791d514e4b92c7bbe1b7bb83" + url: "https://pub.dev" + source: hosted + version: "3.0.6" + image_picker_ios: + dependency: transitive + description: + name: image_picker_ios + sha256: "4f0568120c6fcc0aaa04511cb9f9f4d29fc3d0139884b1d06be88dcec7641d6b" + url: "https://pub.dev" + source: hosted + version: "0.8.12+1" + image_picker_linux: + dependency: transitive + description: + name: image_picker_linux + sha256: "4ed1d9bb36f7cd60aa6e6cd479779cc56a4cb4e4de8f49d487b1aaad831300fa" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + image_picker_macos: + dependency: transitive + description: + name: image_picker_macos + sha256: "3f5ad1e8112a9a6111c46d0b57a7be2286a9a07fc6e1976fdf5be2bd31d4ff62" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + image_picker_platform_interface: + dependency: transitive + description: + name: image_picker_platform_interface + sha256: "9ec26d410ff46f483c5519c29c02ef0e02e13a543f882b152d4bfd2f06802f80" + url: "https://pub.dev" + source: hosted + version: "2.10.0" + image_picker_windows: + dependency: transitive + description: + name: image_picker_windows + sha256: "6ad07afc4eb1bc25f3a01084d28520496c4a3bb0cb13685435838167c9dcedeb" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + intl: + dependency: "direct main" + description: + name: intl + sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf + url: "https://pub.dev" + source: hosted + version: "0.19.0" + io: + dependency: transitive + description: + name: io + sha256: dfd5a80599cf0165756e3181807ed3e77daf6dd4137caaad72d0b7931597650b + url: "https://pub.dev" + source: hosted + version: "1.0.5" + isar: + dependency: transitive + description: + name: isar + sha256: "99165dadb2cf2329d3140198363a7e7bff9bbd441871898a87e26914d25cf1ea" + url: "https://pub.dev" + source: hosted + version: "3.1.0+1" + isar_flutter_libs: + dependency: transitive + description: + name: isar_flutter_libs + sha256: bc6768cc4b9c61aabff77152e7f33b4b17d2fc93134f7af1c3dd51500fe8d5e8 + url: "https://pub.dev" + source: hosted + version: "3.1.0+1" + js: + dependency: transitive + description: + name: js + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 + url: "https://pub.dev" + source: hosted + version: "0.6.7" + json_annotation: + dependency: transitive + description: + name: json_annotation + sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" + url: "https://pub.dev" + source: hosted + version: "4.9.0" + json_serializable: + dependency: "direct dev" + description: + name: json_serializable + sha256: ea1432d167339ea9b5bb153f0571d0039607a873d6e04e0117af043f14a1fd4b + url: "https://pub.dev" + source: hosted + version: "6.8.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + url: "https://pub.dev" + source: hosted + version: "10.0.4" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + url: "https://pub.dev" + source: hosted + version: "3.0.3" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" + lints: + dependency: transitive + description: + name: lints + sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + location: + dependency: "direct main" + description: + name: location + sha256: "37ffdadcd4b1498b769824f45ebb4de8ed46663a4a67ac27b33a590ee486579f" + url: "https://pub.dev" + source: hosted + version: "6.0.2" + location_platform_interface: + dependency: transitive + description: + name: location_platform_interface + sha256: "2ecde6bb0f88032b0bbbde37e18975b4468711dd92619c2235cc0c0ee93b4b8e" + url: "https://pub.dev" + source: hosted + version: "4.0.0" + location_web: + dependency: transitive + description: + name: location_web + sha256: "49dda13d415c4603c5775a33fb22f575e0aa3f0ec2916644ddcd722db31ee884" + url: "https://pub.dev" + source: hosted + version: "5.0.2" + logging: + dependency: transitive + description: + name: logging + sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61 + url: "https://pub.dev" + source: hosted + version: "1.3.0" + lottie: + dependency: transitive + description: + name: lottie + sha256: "7afc60865a2429d994144f7d66ced2ae4305fe35d82890b8766e3359872d872c" + url: "https://pub.dev" + source: hosted + version: "3.1.3" + matcher: + dependency: transitive + description: + name: matcher + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + url: "https://pub.dev" + source: hosted + version: "0.12.16+1" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + url: "https://pub.dev" + source: hosted + version: "0.8.0" + meta: + dependency: transitive + description: + name: meta + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" + url: "https://pub.dev" + source: hosted + version: "1.12.0" + mime: + dependency: transitive + description: + name: mime + sha256: "801fd0b26f14a4a58ccb09d5892c3fbdeff209594300a542492cf13fba9d247a" + url: "https://pub.dev" + source: hosted + version: "1.0.6" + mocktail: + dependency: "direct dev" + description: + name: mocktail + sha256: "890df3f9688106f25755f26b1c60589a92b3ab91a22b8b224947ad041bf172d8" + url: "https://pub.dev" + source: hosted + version: "1.0.4" + nested: + dependency: transitive + description: + name: nested + sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20" + url: "https://pub.dev" + source: hosted + version: "1.0.0" + node_preamble: + dependency: transitive + description: + name: node_preamble + sha256: "6e7eac89047ab8a8d26cf16127b5ed26de65209847630400f9aefd7cd5c730db" + url: "https://pub.dev" + source: hosted + version: "2.0.2" + overlay_builder: + dependency: "direct main" + description: + name: overlay_builder + sha256: "58b97bc5f67a2e2bb7006dd88e697ac757dfffc9dbd1e7dfc1917fb510a4b5c8" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + package_config: + dependency: transitive + description: + name: package_config + sha256: "92d4488434b520a62570293fbd33bb556c7d49230791c1b4bbd973baf6d2dc67" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + path: + dependency: transitive + description: + name: path + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + url: "https://pub.dev" + source: hosted + version: "1.9.0" + path_drawing: + dependency: transitive + description: + name: path_drawing + sha256: bbb1934c0cbb03091af082a6389ca2080345291ef07a5fa6d6e078ba8682f977 + url: "https://pub.dev" + source: hosted + version: "1.0.1" + path_parsing: + dependency: transitive + description: + name: path_parsing + sha256: "883402936929eac138ee0a45da5b0f2c80f89913e6dc3bf77eb65b84b409c6ca" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + path_provider: + dependency: transitive + description: + name: path_provider + sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd" + url: "https://pub.dev" + source: hosted + version: "2.1.5" + path_provider_android: + dependency: transitive + description: + name: path_provider_android + sha256: "6f01f8e37ec30b07bc424b4deabac37cacb1bc7e2e515ad74486039918a37eb7" + url: "https://pub.dev" + source: hosted + version: "2.2.10" + path_provider_foundation: + dependency: transitive + description: + name: path_provider_foundation + sha256: "4843174df4d288f5e29185bd6e72a6fbdf5a4a4602717eed565497429f179942" + url: "https://pub.dev" + source: hosted + version: "2.4.1" + path_provider_linux: + dependency: transitive + description: + name: path_provider_linux + sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 + url: "https://pub.dev" + source: hosted + version: "2.2.1" + path_provider_platform_interface: + dependency: transitive + description: + name: path_provider_platform_interface + sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + path_provider_windows: + dependency: transitive + description: + name: path_provider_windows + sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 + url: "https://pub.dev" + source: hosted + version: "2.3.0" + petitparser: + dependency: transitive + description: + name: petitparser + sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27 + url: "https://pub.dev" + source: hosted + version: "6.0.2" + platform: + dependency: transitive + description: + name: platform + sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984" + url: "https://pub.dev" + source: hosted + version: "3.1.6" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" + url: "https://pub.dev" + source: hosted + version: "2.1.8" + pool: + dependency: transitive + description: + name: pool + sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" + url: "https://pub.dev" + source: hosted + version: "1.5.1" + provider: + dependency: transitive + description: + name: provider + sha256: c8a055ee5ce3fd98d6fc872478b03823ffdb448699c6ebdbbc71d59b596fd48c + url: "https://pub.dev" + source: hosted + version: "6.1.2" + pub_semver: + dependency: transitive + description: + name: pub_semver + sha256: "7b3cfbf654f3edd0c6298ecd5be782ce997ddf0e00531b9464b55245185bbbbd" + url: "https://pub.dev" + source: hosted + version: "2.1.5" + pubspec_parse: + dependency: transitive + description: + name: pubspec_parse + sha256: c799b721d79eb6ee6fa56f00c04b472dcd44a30d258fac2174a6ec57302678f8 + url: "https://pub.dev" + source: hosted + version: "1.3.0" + reactive_forms: + dependency: "direct main" + description: + name: reactive_forms + sha256: "9b1fb18e0aae9c50cfa0aaabaaa38bc4d78eefc9b7b95fa9c947b051f6524b8e" + url: "https://pub.dev" + source: hosted + version: "17.0.1" + recase: + dependency: transitive + description: + name: recase + sha256: e4eb4ec2dcdee52dcf99cb4ceabaffc631d7424ee55e56f280bc039737f89213 + url: "https://pub.dev" + source: hosted + version: "4.1.0" + shelf: + dependency: transitive + description: + name: shelf + sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 + url: "https://pub.dev" + source: hosted + version: "1.4.1" + shelf_packages_handler: + dependency: transitive + description: + name: shelf_packages_handler + sha256: "89f967eca29607c933ba9571d838be31d67f53f6e4ee15147d5dc2934fee1b1e" + url: "https://pub.dev" + source: hosted + version: "3.0.2" + shelf_static: + dependency: transitive + description: + name: shelf_static + sha256: c87c3875f91262785dade62d135760c2c69cb217ac759485334c5857ad89f6e3 + url: "https://pub.dev" + source: hosted + version: "1.1.3" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" + url: "https://pub.dev" + source: hosted + version: "1.0.4" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.99" + source_gen: + dependency: transitive + description: + name: source_gen + sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832" + url: "https://pub.dev" + source: hosted + version: "1.5.0" + source_helper: + dependency: transitive + description: + name: source_helper + sha256: "6adebc0006c37dd63fe05bca0a929b99f06402fc95aa35bf36d67f5c06de01fd" + url: "https://pub.dev" + source: hosted + version: "1.3.4" + source_map_stack_trace: + dependency: transitive + description: + name: source_map_stack_trace + sha256: c0713a43e323c3302c2abe2a1cc89aa057a387101ebd280371d6a6c9fa68516b + url: "https://pub.dev" + source: hosted + version: "2.1.2" + source_maps: + dependency: transitive + description: + name: source_maps + sha256: "190222579a448b03896e0ca6eca5998fa810fda630c1d65e2f78b3f638f54812" + url: "https://pub.dev" + source: hosted + version: "0.10.13" + source_span: + dependency: transitive + description: + name: source_span + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" + source: hosted + version: "1.10.0" + sprintf: + dependency: transitive + description: + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" + url: "https://pub.dev" + source: hosted + version: "7.0.0" + sqlite3: + dependency: transitive + description: + name: sqlite3 + sha256: fde692580bee3379374af1f624eb3e113ab2865ecb161dbe2d8ac2de9735dbdb + url: "https://pub.dev" + source: hosted + version: "2.4.5" + sqlite3_flutter_libs: + dependency: transitive + description: + name: sqlite3_flutter_libs + sha256: "636b0fe8a2de894e5455572f6cbbc458f4ffecfe9f860b79439e27041ea4f0b9" + url: "https://pub.dev" + source: hosted + version: "0.5.27" + sqlparser: + dependency: transitive + description: + name: sqlparser + sha256: "3be52b4968fc2f098ba735863404756d2fe3ea0729cf006a5b5612618f74ca04" + url: "https://pub.dev" + source: hosted + version: "0.37.1" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + url: "https://pub.dev" + source: hosted + version: "1.11.1" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + url: "https://pub.dev" + source: hosted + version: "2.1.2" + stream_transform: + dependency: transitive + description: + name: stream_transform + sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" + source: hosted + version: "1.2.1" + test: + dependency: transitive + description: + name: test + sha256: "7ee446762c2c50b3bd4ea96fe13ffac69919352bd3b4b17bac3f3465edc58073" + url: "https://pub.dev" + source: hosted + version: "1.25.2" + test_api: + dependency: transitive + description: + name: test_api + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" + url: "https://pub.dev" + source: hosted + version: "0.7.0" + test_core: + dependency: transitive + description: + name: test_core + sha256: "2bc4b4ecddd75309300d8096f781c0e3280ca1ef85beda558d33fcbedc2eead4" + url: "https://pub.dev" + source: hosted + version: "0.6.0" + timing: + dependency: transitive + description: + name: timing + sha256: "62ee18aca144e4a9f29d212f5a4c6a053be252b895ab14b5821996cff4ed90fe" + url: "https://pub.dev" + source: hosted + version: "1.0.2" + type_plus: + dependency: transitive + description: + name: type_plus + sha256: d5d1019471f0d38b91603adb9b5fd4ce7ab903c879d2fbf1a3f80a630a03fcc9 + url: "https://pub.dev" + source: hosted + version: "2.1.1" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + url: "https://pub.dev" + source: hosted + version: "1.3.2" + universal_html: + dependency: transitive + description: + name: universal_html + sha256: "56536254004e24d9d8cfdb7dbbf09b74cf8df96729f38a2f5c238163e3d58971" + url: "https://pub.dev" + source: hosted + version: "2.2.4" + universal_io: + dependency: transitive + description: + name: universal_io + sha256: "1722b2dcc462b4b2f3ee7d188dad008b6eb4c40bbd03a3de451d82c78bba9aad" + url: "https://pub.dev" + source: hosted + version: "2.2.2" + url_launcher: + dependency: transitive + description: + name: url_launcher + sha256: "9d06212b1362abc2f0f0d78e6f09f726608c74e3b9462e8368bb03314aa8d603" + url: "https://pub.dev" + source: hosted + version: "6.3.1" + url_launcher_android: + dependency: transitive + description: + name: url_launcher_android + sha256: f0c73347dfcfa5b3db8bc06e1502668265d39c08f310c29bff4e28eea9699f79 + url: "https://pub.dev" + source: hosted + version: "6.3.9" + url_launcher_ios: + dependency: transitive + description: + name: url_launcher_ios + sha256: "16a513b6c12bb419304e72ea0ae2ab4fed569920d1c7cb850263fe3acc824626" + url: "https://pub.dev" + source: hosted + version: "6.3.2" + url_launcher_linux: + dependency: transitive + description: + name: url_launcher_linux + sha256: "4e9ba368772369e3e08f231d2301b4ef72b9ff87c31192ef471b380ef29a4935" + url: "https://pub.dev" + source: hosted + version: "3.2.1" + url_launcher_macos: + dependency: transitive + description: + name: url_launcher_macos + sha256: "17ba2000b847f334f16626a574c702b196723af2a289e7a93ffcb79acff855c2" + url: "https://pub.dev" + source: hosted + version: "3.2.2" + url_launcher_platform_interface: + dependency: transitive + description: + name: url_launcher_platform_interface + sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + url_launcher_web: + dependency: transitive + description: + name: url_launcher_web + sha256: "772638d3b34c779ede05ba3d38af34657a05ac55b06279ea6edd409e323dca8e" + url: "https://pub.dev" + source: hosted + version: "2.3.3" + url_launcher_windows: + dependency: transitive + description: + name: url_launcher_windows + sha256: "44cf3aabcedde30f2dba119a9dea3b0f2672fbe6fa96e85536251d678216b3c4" + url: "https://pub.dev" + source: hosted + version: "3.1.3" + uuid: + dependency: transitive + description: + name: uuid + sha256: a5be9ef6618a7ac1e964353ef476418026db906c4facdedaa299b7a2e71690ff + url: "https://pub.dev" + source: hosted + version: "4.5.1" + vector_graphics: + dependency: transitive + description: + name: vector_graphics + sha256: "27d5fefe86fb9aace4a9f8375b56b3c292b64d8c04510df230f849850d912cb7" + url: "https://pub.dev" + source: hosted + version: "1.1.15" + vector_graphics_codec: + dependency: transitive + description: + name: vector_graphics_codec + sha256: "2430b973a4ca3c4dbc9999b62b8c719a160100dcbae5c819bae0cacce32c9cdb" + url: "https://pub.dev" + source: hosted + version: "1.1.12" + vector_graphics_compiler: + dependency: transitive + description: + name: vector_graphics_compiler + sha256: "1b4b9e706a10294258727674a340ae0d6e64a7231980f9f9a3d12e4b42407aad" + url: "https://pub.dev" + source: hosted + version: "1.1.16" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + visibility_detector: + dependency: transitive + description: + name: visibility_detector + sha256: dd5cc11e13494f432d15939c3aa8ae76844c42b723398643ce9addb88a5ed420 + url: "https://pub.dev" + source: hosted + version: "0.4.0+2" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" + url: "https://pub.dev" + source: hosted + version: "14.2.1" + watcher: + dependency: transitive + description: + name: watcher + sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + web: + dependency: transitive + description: + name: web + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" + url: "https://pub.dev" + source: hosted + version: "0.5.1" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + sha256: "58c6666b342a38816b2e7e50ed0f1e261959630becd4c879c4f26bfa14aa5a42" + url: "https://pub.dev" + source: hosted + version: "2.4.5" + webkit_inspection_protocol: + dependency: transitive + description: + name: webkit_inspection_protocol + sha256: "87d3f2333bb240704cd3f1c6b5b7acd8a10e7f0bc28c28dcf14e782014f4a572" + url: "https://pub.dev" + source: hosted + version: "1.2.1" + win32: + dependency: transitive + description: + name: win32 + sha256: "68d1e89a91ed61ad9c370f9f8b6effed9ae5e0ede22a270bdfa6daf79fc2290a" + url: "https://pub.dev" + source: hosted + version: "5.5.4" + xdg_directories: + dependency: transitive + description: + name: xdg_directories + sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15" + 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: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" + url: "https://pub.dev" + source: hosted + version: "3.1.2" +sdks: + dart: ">=3.4.0 <4.0.0" + flutter: ">=3.22.0" diff --git a/packages/survey_form/pubspec.yaml b/packages/survey_form/pubspec.yaml new file mode 100644 index 000000000..8b5705529 --- /dev/null +++ b/packages/survey_form/pubspec.yaml @@ -0,0 +1,82 @@ +name: survey_form +description: "This package enables supervisors to monitor certain activities and record observations according to defined set of questions." +version: 1.0.0 +homepage: https://github.com/egovernments/health-campaign-field-worker-app/tree/master/packages/survey_form +repository: https://github.com/egovernments/health-campaign-field-worker-app + +environment: + sdk: '>=3.0.0 <4.0.0' + flutter: ">=1.17.0" + +dependencies: + flutter: + sdk: flutter + digit_ui_components: ^0.0.2-dev.4 + flutter_bloc: ^8.1.5 + freezed_annotation: ^2.4.1 + reactive_forms: ^17.0.0 + fluttertoast: ^8.1.2 + overlay_builder: ^1.1.0 + intl: ^0.19.0 + flutter_svg: ^2.0.8 + dart_mappable: ^4.2.0 + drift: ^2.0.0 + auto_route: ^8.1.3 + digit_data_model: ^1.0.5 + collection: ^1.16.0 + location: ^6.0.2 + dio: ^5.1.2 + group_radio_button: ^1.3.0 + +dev_dependencies: + flutter_test: + sdk: flutter + flutter_lints: ^2.0.0 + json_serializable: ^6.4.0 + freezed: ^2.2.0 + bloc_test: ^9.1.0 + mocktail: ^1.0.2 + dart_mappable_builder: + git: + url: https://github.com/egovernments/health-campaign-field-worker-app/ + ref: 1.6-final-dev + path: ./packages/dart_mappable_builder + drift_dev: ^2.14.1 + auto_route_generator: ^8.0.0 + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter packages. +flutter: + +# To add assets to your package, add an assets section, like this: +# assets: +# - images/a_dot_burr.jpeg +# - images/a_dot_ham.jpeg +# +# For details regarding assets in packages, see +# https://flutter.dev/assets-and-images/#from-packages +# +# An image asset can refer to one or more resolution-specific "variants", see +# https://flutter.dev/assets-and-images/#resolution-aware + +# To add custom fonts to your package, add a fonts section here, +# in this "flutter" section. Each entry in this list should have a +# "family" key with the font family name, and a "fonts" key with a +# list giving the asset and other descriptors for the font. For +# example: +# fonts: +# - family: Schyler +# fonts: +# - asset: fonts/Schyler-Regular.ttf +# - asset: fonts/Schyler-Italic.ttf +# style: italic +# - family: Trajan Pro +# fonts: +# - asset: fonts/TrajanPro.ttf +# - asset: fonts/TrajanPro_Bold.ttf +# weight: 700 +# +# For details regarding fonts in packages, see +# https://flutter.dev/custom-fonts/#from-packages diff --git a/packages/survey_form/test/constants/test_constants.dart b/packages/survey_form/test/constants/test_constants.dart new file mode 100644 index 000000000..1e51fd3f1 --- /dev/null +++ b/packages/survey_form/test/constants/test_constants.dart @@ -0,0 +1,83 @@ +import 'package:digit_data_model/data_model.dart'; +import 'package:survey_form/models/entities/service.dart'; +import 'package:survey_form/models/entities/service_attributes.dart'; +import 'package:survey_form/models/entities/service_definition.dart'; + +class ServiceTestConstants { + static const testTenantId = 'mz'; + static const testClientId = '170c46f0-5b95-11ef-8647-5ba267817823'; + static const testAccountId = 'a8e257fb-fa45-4488-b76c-7c2d2b70452c'; + static const testServiceDefId = '10a5342f-fe6b-4369-9197-7c871185d67d'; + static const testDataType = 'SingleValueList'; + + static final mockServiceAttributesModel1 = ServiceAttributesModel( + clientReferenceId: '170c46f1-5b95-11ef-8647-5ba267817823', + referenceId: testClientId, + tenantId: testTenantId, + attributeCode: 'ATTR1', + value: 'YES', + dataType: testDataType, + ); + + static final mockServiceAttributesModel2 = ServiceAttributesModel( + clientReferenceId: '170c46f2-5b95-11ef-8647-5ba267817823', + referenceId: testClientId, + tenantId: testTenantId, + attributeCode: 'ATTR2', + value: 'NO', + dataType: testDataType, + additionalDetails: {"value": "kmlkml"}, + ); + + static final mockServiceModel = ServiceModel( + clientId: testClientId, + serviceDefId: testServiceDefId, + isActive: true, + accountId: testAccountId, + additionalDetails: {'locality': 'ADMIN_MO_06_05_03_01_04_SHERRIKEN'}, + createdAt: DateTime.utc(2024, 8, 16).toString(), + tenantId: testTenantId, + attributes: [mockServiceAttributesModel1, mockServiceAttributesModel2], + ); + + static final mockAttributesModel1 = AttributesModel( + tenantId: testTenantId, + code: "ATTR1", + dataType: testDataType, + values: null, + required: true, + isActive: true, + regex: null, + order: 1, + ); + + static final mockAttributesModel2 = AttributesModel( + tenantId: testTenantId, + code: "ATTR2", + dataType: testDataType, + values: null, + required: true, + isActive: true, + regex: null, + order: 1, + ); + + static final mockServiceDefinitionModel = ServiceDefinitionModel( + id: testServiceDefId, + tenantId: testTenantId, + code: 'HEALTH', + isActive: true, + attributes: [mockAttributesModel1, mockAttributesModel2], + ); + + static final mockServiceSearchModel = ServiceSearchModel( + clientId: testClientId, + tenantId: testTenantId, + ); + + static final mockServiceDefinitionSearchModel = ServiceDefinitionSearchModel( + id: testServiceDefId, + tenantId: testTenantId, + code: ['HEALTH'], + ); +} diff --git a/packages/survey_form/test/unit/localization_methods_test.dart b/packages/survey_form/test/unit/localization_methods_test.dart new file mode 100644 index 000000000..6a913daaa --- /dev/null +++ b/packages/survey_form/test/unit/localization_methods_test.dart @@ -0,0 +1,57 @@ +import 'package:flutter/material.dart'; // Import necessary packages for testing. +import 'package:flutter_test/flutter_test.dart'; +import 'package:survey_form/survey_form.dart'; // Import your package for testing. + +void main() { + // Test for SurveyFormLocalization translation. + test('SurveyFormLocalization translation test', () async { + // Define mock localized strings for testing. + final mockLocalizedStrings = [ + Localization(locale: 'en_MZ', code: 'CORE_COMMON_NAME', message: 'Name'), + Localization(locale: 'fr_FR', code: 'CORE_COMMON_NAME', message: 'Nom'), + ]; + + // Define mock languages for testing. + final mockLanguages = [ + SurveyFormLanguages() + ..label = 'English' + ..value = 'en_MZ', + SurveyFormLanguages() + ..label = 'French' + ..value = 'fr_FR', + ]; + + // Define the test locale. + const testLocale = Locale('en', 'MZ'); + + // Initialize SurveyFormLocalization with mock data. + final surveyFormLocalization = SurveyFormLocalization( + testLocale, + Future.value(mockLocalizedStrings), + mockLanguages, + ); + + await surveyFormLocalization.load(); // Load the localization data. + + // Test if the translate function is working well, given the mock strings and languages. + expect(surveyFormLocalization.translate('CORE_COMMON_NAME'), 'Name'); + }); +} + +// Define a class for localization data. +class Localization { + late String code; + late String message; + late String module; + late String locale; + + // Constructor for localization data. + Localization( + {required this.locale, required this.code, required this.message}); +} + +// Class representing supported languages for surveyForm localization +class SurveyFormLanguages { + late String label; + late String value; +} diff --git a/packages/survey_form/test/unit/service_bloc_test.dart b/packages/survey_form/test/unit/service_bloc_test.dart new file mode 100644 index 000000000..090dcd514 --- /dev/null +++ b/packages/survey_form/test/unit/service_bloc_test.dart @@ -0,0 +1,82 @@ +import 'package:bloc_test/bloc_test.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:mocktail/mocktail.dart'; //used for mocking dependencies and repositories in bloc test +import 'package:survey_form/survey_form.dart'; +import 'package:survey_form/utils/typedefs.dart'; + +import '../constants/test_constants.dart'; + +class MockServiceDataRepository extends Mock implements ServiceDataRepository {} + +void main() { + group('ServiceBloc', () { + late ServiceBloc serviceBloc; + final serviceDataRepository = MockServiceDataRepository(); + + setUp(() { + serviceBloc = ServiceBloc( + const ServiceState.empty(), + serviceDataRepository: serviceDataRepository, + ); + }); + + setUpAll(() { + registerFallbackValue(ServiceModel(clientId: '')); + registerFallbackValue(ServiceSearchModel(clientId: '')); + }); + + test('Initial state is correct', () { + expect(serviceBloc.state, equals(const ServiceState.empty())); + }); + + // Test for the ServiceSearchEvent + blocTest( + 'emits ServiceSearchState when search event is added', + build: () { + when(() => serviceDataRepository.search(any())) + .thenAnswer((_) async => [ServiceTestConstants.mockServiceModel]); + return serviceBloc; + }, + act: (bloc) => bloc.add(ServiceEvent.search( + serviceSearchModel: ServiceTestConstants.mockServiceSearchModel, + )), + expect: () => [ + ServiceSearchState(serviceList: [ServiceTestConstants.mockServiceModel]), + ], + verify: (_) { + // Verify that the search method was called + verify(() => serviceDataRepository.search(any())).called(1); + }, + ); + + // Test for the ServiceCreateEvent + blocTest( + 'creates a ServiceModel when create event is added', + build: () { + when(() => serviceDataRepository.create(any())) + .thenAnswer((_) async => ServiceTestConstants.mockServiceModel); + return serviceBloc; + }, + act: (bloc) => bloc.add(ServiceEvent.create( + serviceModel: ServiceTestConstants.mockServiceModel, + )), + expect: () => [], + verify: (_) { + // Verify that the create method was called + verify(() => serviceDataRepository.create(any())).called(1); + }, + ); + + // Test for the ServiceResetEvent + blocTest( + 'emits a ServiceSearchState when reset event is added', + build: () => ServiceBloc( + ServiceState.serviceSearch(serviceList: [ServiceTestConstants.mockServiceModel]), + serviceDataRepository: serviceDataRepository), + act: (bloc) => bloc.add(ServiceEvent.resetSelected( + serviceList: [ServiceTestConstants.mockServiceModel], + )), + expect: () => [ServiceState.serviceSearch(serviceList: [ServiceTestConstants.mockServiceModel])], + ); + }); +} diff --git a/packages/survey_form/test/unit/service_definition_bloc_test.dart b/packages/survey_form/test/unit/service_definition_bloc_test.dart new file mode 100644 index 000000000..0be5485b7 --- /dev/null +++ b/packages/survey_form/test/unit/service_definition_bloc_test.dart @@ -0,0 +1,54 @@ +import 'package:bloc_test/bloc_test.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:mocktail/mocktail.dart'; //used for mocking dependencies and repositories in bloc test +import 'package:survey_form/survey_form.dart'; +import 'package:survey_form/utils/typedefs.dart'; + +import '../constants/test_constants.dart'; + +class MockServiceDefinitionDataRepository extends Mock implements ServiceDefinitionDataRepository {} + +void main() { + group('ServiceDefinitionBloc', () { + late ServiceDefinitionBloc serviceDefinitionBloc; + final serviceDefinitionDataRepository = MockServiceDefinitionDataRepository(); + + setUp(() { + serviceDefinitionBloc = ServiceDefinitionBloc( + const ServiceDefinitionState.empty(), + serviceDefinitionDataRepository: serviceDefinitionDataRepository + ); + }); + + setUpAll(() { + registerFallbackValue(ServiceDefinitionModel(tenantId : '')); + registerFallbackValue(ServiceDefinitionSearchModel(tenantId: '')); + }); + + test('Initial state is correct', () { + expect(serviceDefinitionBloc.state, equals(const ServiceDefinitionState.empty())); + }); + + // Test for the ServiceDefinitionFetchEvent + blocTest( + 'emits ServiceDefinitionServiceFetchedState when ServiceDefinitionFetchEvent is added', + build: () { + // Mocking the search method to return a list of ServiceDefinitionModel + when(() => serviceDefinitionDataRepository.search(any())) + .thenAnswer((_) async => [ServiceTestConstants.mockServiceDefinitionModel]); + + return serviceDefinitionBloc; + }, + act: (bloc) => bloc.add(const ServiceDefinitionEvent.fetch()), + expect: () => [ + ServiceDefinitionState.serviceDefinitionFetch( + serviceDefinitionList: [ServiceTestConstants.mockServiceDefinitionModel], + ), // State should be the fetched service definitions + ], + verify: (_) { + // Verify that the search method was called + verify(() => serviceDefinitionDataRepository.search(any())).called(1); + }, + ); + }); +} diff --git a/packages/sync_service/.gitignore b/packages/sync_service/.gitignore new file mode 100644 index 000000000..ac5aa9893 --- /dev/null +++ b/packages/sync_service/.gitignore @@ -0,0 +1,29 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. +/pubspec.lock +**/doc/api/ +.dart_tool/ +build/ diff --git a/packages/sync_service/.metadata b/packages/sync_service/.metadata new file mode 100644 index 000000000..d36dfbcc1 --- /dev/null +++ b/packages/sync_service/.metadata @@ -0,0 +1,10 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "a14f74ff3a1cbd521163c5f03d68113d50af93d3" + channel: "stable" + +project_type: package diff --git a/packages/sync_service/CHANGELOG.md b/packages/sync_service/CHANGELOG.md new file mode 100644 index 000000000..6fe28a462 --- /dev/null +++ b/packages/sync_service/CHANGELOG.md @@ -0,0 +1,3 @@ +## 0.0.1-dev.1 + +* Init release diff --git a/packages/sync_service/LICENSE b/packages/sync_service/LICENSE new file mode 100644 index 000000000..f7d7ac958 --- /dev/null +++ b/packages/sync_service/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 eGovernments Foundation + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/packages/sync_service/README.md b/packages/sync_service/README.md new file mode 100644 index 000000000..4186a82f4 --- /dev/null +++ b/packages/sync_service/README.md @@ -0,0 +1,53 @@ +# Sync Service Package + +The `sync_service` provides access to sync service related configurations and listeners - +SyncEntityMapperListener, syncDownRetryCount, persistenceConfiguration + +## Features + +SyncBloc: Handles refresh and syncup + +Data: +The `SyncEntityMapperListener` is an abstract class that defines methods for handling sync entity +mapping. This class provides methods for writing to the entity database, getting the sync count, +handling entity responses, and updating entities. +The `SyncService` class provides methods to perform sync operations - performSync, writeToEntityDB, +getPendingSyncRecordsCount, filterEntityByBandwidth, filterOpLogByBandwidth, SyncError class + +Repositories - +RepositoryType - provides methods to get the remote and local repositories for a given data model +type - getRemoteForType, getLocalForType +PerformSyncDown - provides a method to perform a sync down operation. +PerformSyncUp - provides a method to perform a sync up operation. + +Models: Bandwidth Model + +## Getting Started + +To use this package, add the following dependency to your `pubspec.yaml` file: + +```yaml +dependencies: + sync_service: ^latest +``` + +## Usage + +Here are some examples of how to use the DataModel package in your project: + +Extend the `SyncUpOperation` implement the required methods. + +```dart + class CustomSyncRegistry implements SyncUpOperation { + CustomSyncRegistry({ + this.remote + }); +} +``` + +Extend the `SyncEntityMapperListener` class and implement the required methods. + +```dart + class SyncServiceMapper extends SyncEntityMapperListener { +} +``` \ No newline at end of file diff --git a/packages/sync_service/analysis_options.yaml b/packages/sync_service/analysis_options.yaml new file mode 100644 index 000000000..a5744c1cf --- /dev/null +++ b/packages/sync_service/analysis_options.yaml @@ -0,0 +1,4 @@ +include: package:flutter_lints/flutter.yaml + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/packages/sync_service/build.yaml b/packages/sync_service/build.yaml new file mode 100644 index 000000000..05310222d --- /dev/null +++ b/packages/sync_service/build.yaml @@ -0,0 +1,5 @@ +targets: + $default: + builders: + dart_mappable_builder: + generate_for: \ No newline at end of file diff --git a/apps/health_campaign_field_worker_app/lib/blocs/sync/sync.dart b/packages/sync_service/lib/blocs/sync/sync.dart similarity index 62% rename from apps/health_campaign_field_worker_app/lib/blocs/sync/sync.dart rename to packages/sync_service/lib/blocs/sync/sync.dart index 8cdff67a4..695b40926 100644 --- a/apps/health_campaign_field_worker_app/lib/blocs/sync/sync.dart +++ b/packages/sync_service/lib/blocs/sync/sync.dart @@ -5,27 +5,37 @@ import 'package:digit_data_model/data_model.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:isar/isar.dart'; +import 'package:sync_service/utils/utils.dart'; -import '../../data/network_manager.dart'; +import '../../data/sync_service.dart'; import '../../models/bandwidth/bandwidth_model.dart'; -import '../../utils/utils.dart'; part 'sync.freezed.dart'; typedef SyncEmitter = Emitter; +// This is the `SyncBloc` class which extends `Bloc`. +// +// It handles the state management for sync operations. class SyncBloc extends Bloc { + // The `Isar` instance used for database operations. final Isar isar; - final NetworkManager networkManager; + // The `SyncService` instance used for sync operations. + final SyncService syncService; + // The constructor for `SyncBloc`. + // It requires an `Isar` instance and a `SyncService` instance. SyncBloc({ required this.isar, - required this.networkManager, + required this.syncService, }) : super(const SyncPendingState()) { + // Registering event handlers. on(_handleRefresh); on(_handleSyncUp); } + // This method handles the `SyncRefreshEvent`. + // It emits a new state based on the result of the refresh operation. FutureOr _handleRefresh( SyncRefreshEvent event, SyncEmitter emit, @@ -38,17 +48,17 @@ class SyncBloc extends Bloc { int? length = event.count; emit(const SyncState.loading()); try { - length ??= getSyncCount(isar.opLogs + length ??= (SyncServiceSingleton().entityMapper!.getSyncCount(isar.opLogs .filter() .createdByEqualTo(event.createdBy) .syncedUpEqualTo(false) .findAllSync()) + - getSyncCount(isar.opLogs + SyncServiceSingleton().entityMapper!.getSyncCount(isar.opLogs .filter() .createdByEqualTo(event.createdBy) .syncedUpEqualTo(true) .syncedDownEqualTo(false) - .findAllSync()); + .findAllSync())); } catch (_) { rethrow; } finally { @@ -56,6 +66,8 @@ class SyncBloc extends Bloc { } } + // This method handles the `SyncSyncUpEvent`. + // It emits a new state based on the result of the sync up operation. FutureOr _handleSyncUp( SyncSyncUpEvent event, SyncEmitter emit, @@ -66,8 +78,7 @@ class SyncBloc extends Bloc { 'batchSize': 5, }); emit(const SyncInProgressState()); - - await networkManager.performSync( + await syncService.performSync( localRepositories: event.localRepositories, remoteRepositories: event.remoteRepositories, bandwidthModel: bandwidthModel, @@ -90,11 +101,14 @@ class SyncBloc extends Bloc { } } +// This is the `SyncEvent` class which is a freezed union of different types of sync events. @freezed class SyncEvent with _$SyncEvent { + // The `SyncRefreshEvent` represents a refresh event. const factory SyncEvent.refresh(String createdBy, [int? count]) = SyncRefreshEvent; + // The `SyncSyncUpEvent` represents a sync up event. const factory SyncEvent.syncUp({ required String userId, required List localRepositories, @@ -102,20 +116,28 @@ class SyncEvent with _$SyncEvent { }) = SyncSyncUpEvent; } +// This is the `SyncState` class which is a freezed union of different types of sync states. @freezed class SyncState with _$SyncState { + // The `SyncLoadingState` represents a loading state. const factory SyncState.loading() = SyncLoadingState; + // The `SyncInProgressState` represents a sync in progress state. const factory SyncState.syncInProgress() = SyncInProgressState; + // The `SyncPendingState` represents a pending sync state. const factory SyncState.pendingSync({@Default(0) int count}) = SyncPendingState; + // The `SyncCompletedState` represents a completed sync state. const factory SyncState.completedSync() = SyncCompletedState; + // The `SyncFailedState` represents a failed sync state. const factory SyncState.failedSync() = SyncFailedState; + // The `DownSyncFailedState` represents a failed down sync state. const factory SyncState.failedDownSync() = DownSyncFailedState; + // The `UpSyncFailedState` represents a failed up sync state. const factory SyncState.failedUpSync() = UpSyncFailedState; } diff --git a/apps/health_campaign_field_worker_app/lib/blocs/sync/sync.freezed.dart b/packages/sync_service/lib/blocs/sync/sync.freezed.dart similarity index 100% rename from apps/health_campaign_field_worker_app/lib/blocs/sync/sync.freezed.dart rename to packages/sync_service/lib/blocs/sync/sync.freezed.dart diff --git a/packages/sync_service/lib/data/repositories/sync/remote_type.dart b/packages/sync_service/lib/data/repositories/sync/remote_type.dart new file mode 100644 index 000000000..9faf15d7a --- /dev/null +++ b/packages/sync_service/lib/data/repositories/sync/remote_type.dart @@ -0,0 +1,49 @@ +// Importing necessary packages +import 'package:collection/collection.dart'; +import 'package:digit_data_model/data_model.dart'; + +/// The `RepositoryType` class provides methods to get the remote and local repositories for a given data model type. +class RepositoryType { + /// Returns the remote repository for the given data model type. + /// + /// This method accepts a `DataModelType` and a list of `RemoteRepository` objects as parameters. + /// It returns the first `RemoteRepository` object in the list that matches the given data model type. + /// If no matching repository is found, it throws an exception. + static RemoteRepository getRemoteForType( + DataModelType type, + List remoteRepositories, + ) { + final repository = remoteRepositories.firstWhereOrNull( + (e) => e.type == type, + ); + if (repository == null) { + throw Exception( + 'Remote repository is not passed to sync service', + ); + } + + return repository; + } + + /// Returns the local repository for the given data model type. + /// + /// This method accepts a `DataModelType` and a list of `LocalRepository` objects as parameters. + /// It returns the first `LocalRepository` object in the list that matches the given data model type. + /// If no matching repository is found, it throws an exception. + static LocalRepository getLocalForType( + DataModelType type, + List localRepositories, + ) { + final repository = localRepositories.firstWhereOrNull( + (e) => e.type == type, + ); + + if (repository == null) { + throw Exception( + 'Local repository is not passed to sync service', + ); + } + + return repository; + } +} diff --git a/packages/sync_service/lib/data/repositories/sync/sync_down.dart b/packages/sync_service/lib/data/repositories/sync/sync_down.dart new file mode 100644 index 000000000..ac36c8525 --- /dev/null +++ b/packages/sync_service/lib/data/repositories/sync/sync_down.dart @@ -0,0 +1,86 @@ +import 'dart:async'; + +import 'package:collection/collection.dart'; +import 'package:digit_data_model/data_model.dart'; +import 'package:sync_service/utils/utils.dart'; + +import '../../../models/bandwidth/bandwidth_model.dart'; +import 'remote_type.dart'; + +/// The `PerformSyncDown` class provides a method to perform a sync down operation. +class PerformSyncDown { + /// Performs a sync down operation. + /// + /// This method accepts a `BandwidthModel`, a list of `LocalRepository` objects, a list of `RemoteRepository` objects, and a `PersistenceConfiguration` as parameters. + /// It throws an exception if the persistence configuration is `onlineOnly`. + /// It gets the items to be synced down from each local repository and groups them by type and operation. + /// It then gets the remote and local repositories for each type and applies the server generated ID to each entity. + /// Finally, it updates each entity in the local repository. + static FutureOr syncDown({ + required BandwidthModel bandwidthModel, + required List localRepositories, + required List remoteRepositories, + required PersistenceConfiguration configuration, + }) async { + if (configuration == PersistenceConfiguration.onlineOnly) { + throw Exception('Sync down is not valid for online only configuration'); + } + final futures = await Future.wait( + localRepositories + .map((e) => e.getItemsToBeSyncedDown(bandwidthModel.userId)), + ); + + final pendingSyncEntries = futures.expand((e) => e).toList(); + pendingSyncEntries.sort((a, b) => a.createdAt.compareTo(b.createdAt)); + + final groupedEntries = pendingSyncEntries + .where((element) => element.type != DataModelType.service) + .toList() + .groupListsBy( + (element) => element.type, + ); + + for (final typeGroupedEntity in groupedEntries.entries) { + final groupedOperations = typeGroupedEntity.value.groupListsBy( + (element) => element.operation, + ); + + final remote = RepositoryType.getRemoteForType( + typeGroupedEntity.key, + remoteRepositories, + ); + + final local = RepositoryType.getLocalForType( + typeGroupedEntity.key, + localRepositories, + ); + + for (final operationGroupedEntity in groupedOperations.entries) { + final entities = operationGroupedEntity.value.map((e) { + final serverGeneratedId = e.serverGeneratedId; + final rowVersion = e.rowVersion; + if (serverGeneratedId != null && !e.nonRecoverableError) { + return local.opLogManager.applyServerGeneratedIdToEntity( + e.entity, + serverGeneratedId, + rowVersion, + ); + } + + return e.entity; + }).toList(); + + List? responseEntities = []; + + responseEntities = await SyncServiceSingleton() + .entityMapper + ?.syncDownEntityResponse(typeGroupedEntity, operationGroupedEntity, + entities, remote, local); + + for (var element in responseEntities!) { + await local.update(element, createOpLog: false); + } + } + } + } +} diff --git a/packages/sync_service/lib/data/repositories/sync/sync_up.dart b/packages/sync_service/lib/data/repositories/sync/sync_up.dart new file mode 100644 index 000000000..3342dcba4 --- /dev/null +++ b/packages/sync_service/lib/data/repositories/sync/sync_up.dart @@ -0,0 +1,302 @@ +import 'dart:async'; + +import 'package:collection/collection.dart'; +import 'package:digit_data_model/data_model.dart'; +import 'package:flutter/foundation.dart'; +import 'package:sync_service/utils/utils.dart'; + +import '../../../models/bandwidth/bandwidth_model.dart'; +import 'remote_type.dart'; + +/// The `PerformSyncUp` class provides a method to perform a sync up operation. +class PerformSyncUp { + /// Performs a sync up operation. + /// + /// This method accepts a `BandwidthModel`, a list of `LocalRepository` objects, and a list of `RemoteRepository` objects as parameters. + /// It gets the items to be synced up from each local repository and groups them by type and operation. + /// It then gets the remote and local repositories for each type and applies the server generated ID to each entity. + /// Finally, it updates each entity in the local repository. + static FutureOr syncUp({ + required BandwidthModel bandwidthModel, + required List localRepositories, + required List remoteRepositories, + }) async { + // Helper function to get the entity model from a list of operation log entries + List getEntityModel( + List> opLogList, + LocalRepository local, + ) { + return opLogList + .map((e) { + final oplogEntryEntity = e.entity; + + final serverGeneratedId = e.serverGeneratedId; + final rowVersion = e.rowVersion; + if (serverGeneratedId != null) { + EntityModel? updatedEntity = + local.opLogManager.applyServerGeneratedIdToEntity( + oplogEntryEntity, + serverGeneratedId, + rowVersion, + ); + + updatedEntity = SyncServiceSingleton() + .entityMapper + ?.updatedEntity(updatedEntity, e, serverGeneratedId); + + return updatedEntity; + } + + return oplogEntryEntity; + }) + .whereNotNull() + .toList(); + } + + // Get the items to be synced up from each local repository + final futures = await Future.wait( + localRepositories + .map((e) => e.getItemsToBeSyncedUp(bandwidthModel.userId)), + ); + + // Group the items by type and operation + final pendingSyncEntries = futures.expand((e) => e).toList(); + pendingSyncEntries.sort((a, b) => a.createdAt.compareTo(b.createdAt)); + final groupedEntries = pendingSyncEntries.groupListsBy( + (element) => element.type, + ); + + // Sort the entries by DataModelType enum + final entries = groupedEntries.entries.toList(); + entries.sort((a, b) => DataModelType.values + .indexOf(a.key) + .compareTo(DataModelType.values.indexOf(b.key))); + + // For each type and operation, get the remote and local repositories and apply the server generated ID to each entity + for (final typeGroupedEntity in entries) { + final groupedOperations = typeGroupedEntity.value.groupListsBy( + (element) => element.operation, + ); + + final remote = RepositoryType.getRemoteForType( + typeGroupedEntity.key, + remoteRepositories, + ); + + final local = RepositoryType.getLocalForType( + typeGroupedEntity.key, + localRepositories, + ); + + // For each operation, update each entity in the local repository + for (final operationGroupedEntity in groupedOperations.entries) { + // [returns list of oplogs whose nonRecoverableError is false and syncedup is false] + final opLogList = operationGroupedEntity.value + .where( + (element) => !element.nonRecoverableError && !element.syncedUp, + ) + .toList(); + // [returns list of oplogs whose nonRecoverableError is true] + final opLogErrorList = operationGroupedEntity.value + .where((element) => element.nonRecoverableError) + .toList(); + + // [returns list of opLogs whose nonRecoverableError is false and retry count is equal to configured value] + final nonRecoverableErrorList = operationGroupedEntity.value + .where((element) => + !element.nonRecoverableError && + element.syncDownRetryCount >= + SyncServiceSingleton().syncDownRetryCount) + .toList(); + + final List>> listOfBatchedOpLogList = + opLogList.slices(bandwidthModel.batchSize).toList(); + + final List>> listOfBatchedOpLogErrorList = + opLogErrorList.slices(bandwidthModel.batchSize).toList(); + + final List>> + listOfBatchedNonRecoverableErrorList = + nonRecoverableErrorList.slices(bandwidthModel.batchSize).toList(); + + final registry = SyncServiceSingleton() + .registries + ?.getSyncRegistries(typeGroupedEntity.key, remote); + if (registry == null) { + if (kDebugMode) { + print('no custom sync registry found for ${typeGroupedEntity.key}'); + } + } + + // Handle non-recoverable errors + if (listOfBatchedNonRecoverableErrorList.isNotEmpty) { + for (final sublist in listOfBatchedNonRecoverableErrorList) { + final nonRecoverableErrorEntities = getEntityModel(sublist, local); + await remote.dumpError( + nonRecoverableErrorEntities, + operationGroupedEntity.key, + ); + if (registry != null) { + await registry.localMarkSyncUp(sublist, local); + } else { + for (final syncedEntity in sublist) { + await local.markSyncedUp( + entry: syncedEntity, + nonRecoverableError: syncedEntity.nonRecoverableError, + clientReferenceId: syncedEntity.clientReferenceId, + id: syncedEntity.id, + ); + } + } + } + } + + // Handle errors + if (listOfBatchedOpLogErrorList.isNotEmpty) { + for (final sublist in listOfBatchedOpLogErrorList) { + final errorEntities = getEntityModel(sublist, local); + await remote.dumpError( + errorEntities, + operationGroupedEntity.key, + ); + for (final syncedEntity in sublist) { + await local.markSyncedUp( + entry: syncedEntity, + nonRecoverableError: syncedEntity.nonRecoverableError, + clientReferenceId: syncedEntity.clientReferenceId, + id: syncedEntity.id, + ); + } + } + } + + // Handle successful operations + if (listOfBatchedOpLogList.isNotEmpty) { + final registry = SyncServiceSingleton() + .registries + ?.getSyncRegistries(typeGroupedEntity.key, remote); + if (registry == null) { + if (kDebugMode) { + print( + 'no custom sync registry found for ${typeGroupedEntity.key}'); + } + } + for (final sublist in listOfBatchedOpLogList) { + final entities = getEntityModel(sublist, local); + if (operationGroupedEntity.key == DataOperation.create) { + if (registry != null) { + await registry.create( + entities: entities, + entry: sublist, + local: local, + operationGroupedEntity: operationGroupedEntity, + typeGroupedEntity: typeGroupedEntity); + } else { + remote.bulkCreate(entities); + } + } else if (operationGroupedEntity.key == DataOperation.update) { + await Future.delayed(const Duration(seconds: 1)); + if (registry != null) { + await registry.update(entities, local); + } else { + remote.bulkUpdate(entities); + } + } else if (operationGroupedEntity.key == DataOperation.delete) { + await Future.delayed(const Duration(seconds: 1)); + if (registry != null) { + await registry.delete(entities, local); + } else { + remote.bulkDelete(entities); + } + } + if (operationGroupedEntity.key == DataOperation.singleCreate) { + for (var element in entities) { + if (registry != null) { + await registry.singleCreate(element, local); + } else { + remote.singleCreate(element); + } + } + } + if (registry != null) { + registry.localMarkSyncUp(sublist, local); + } else { + for (final syncedEntity in sublist) { + await local.markSyncedUp( + entry: syncedEntity, + id: syncedEntity.id, + nonRecoverableError: syncedEntity.nonRecoverableError, + clientReferenceId: syncedEntity.clientReferenceId, + ); + } + } + } + } + } + } + } +} + +abstract class SyncUpOperation { + Future create( + {required List> entry, + required List entities, + required LocalRepository local, + required MapEntry>> + operationGroupedEntity, + required MapEntry>> + typeGroupedEntity}); + Future update(List entities, LocalRepository local); + Future delete(List entities, LocalRepository local); + Future singleCreate(EntityModel entity, LocalRepository local); + Future localMarkSyncUp( + List> entity, LocalRepository local); +} + +class SyncServiceRegistry { + // Singleton instance + static final SyncServiceRegistry _instance = SyncServiceRegistry._internal(); + + // Private constructor for singleton pattern + SyncServiceRegistry._internal(); + + // Factory constructor to return the singleton instance + factory SyncServiceRegistry() { + return _instance; + } + + // Private map to store registries + static final Map + _registries = {}; + + /// Registers a sync registry for a given [DataModelType]. + void registerSyncRegistries( + Map registries, + ) { + registries.forEach((type, strategyList) { + _registries[type] = strategyList; // Create a new list + }); + } + + /// Retrieves a sync registry for the given [DataModelType]. + SyncUpOperation? getSyncRegistries( + DataModelType type, RemoteRepository remote) { + final strategyFunction = _registries[type]; + return strategyFunction != null ? strategyFunction(remote) : null; + } + + /// Getter to access the _registries map + Map + get registries { + return _registries; + } + + /// Setter to update the _registries map + set registries( + Map + newStrategies) { + newStrategies.forEach((type, strategyList) { + _registries[type] = strategyList; // Create a new list + }); + } +} diff --git a/packages/sync_service/lib/data/sync_entity_mapper_listener.dart b/packages/sync_service/lib/data/sync_entity_mapper_listener.dart new file mode 100644 index 000000000..63cfb63c5 --- /dev/null +++ b/packages/sync_service/lib/data/sync_entity_mapper_listener.dart @@ -0,0 +1,44 @@ +import 'dart:async'; + +import 'package:digit_data_model/data_model.dart'; + +/// The `SyncEntityMapperListener` is an abstract class that defines methods for handling sync entity mapping. +/// +/// This class provides methods for writing to the entity database, getting the sync count, handling entity responses, and updating entities. +abstract class SyncEntityMapperListener { + /// Writes the given response to the entity database. + /// + /// This method accepts a `Map` response and a list of `LocalRepository` objects as parameters. + /// It is expected to be overridden in a concrete implementation of `SyncEntityMapperListener`. + FutureOr writeToEntityDB( + Map response, + List localRepositories, + ); + + /// Returns the sync count for the given list of `OpLog` objects. + /// + /// This method accepts a list of `OpLog` objects as a parameter. + /// It is expected to be overridden in a concrete implementation of `SyncEntityMapperListener`. + int getSyncCount(List opLogs); + + /// Handles the entity response. + /// + /// This method accepts a `MapEntry` of `DataModelType` and a list of `OpLogEntry` objects, another `MapEntry` of `DataOperation` and a list of `OpLogEntry` objects, a list of `EntityModel` objects, a `RemoteRepository` object, and a `LocalRepository` object as parameters. + /// It returns a `Future` that resolves to a list of `EntityModel` objects. + /// It is expected to be overridden in a concrete implementation of `SyncEntityMapperListener`. + Future> syncDownEntityResponse( + MapEntry>> typeGroupedEntity, + MapEntry>> + operationGroupedEntity, + List entities, + RemoteRepository remote, + LocalRepository local); + + /// Updates the given entity. + /// + /// This method accepts an `EntityModel` object, an `OpLogEntry` object, and a `String` server generated ID as parameters. + /// It returns an updated `EntityModel` object. + /// It is expected to be overridden in a concrete implementation of `SyncEntityMapperListener`. + EntityModel updatedEntity( + EntityModel entity, OpLogEntry entry, String? serverGeneratedId); +} diff --git a/packages/sync_service/lib/data/sync_service.dart b/packages/sync_service/lib/data/sync_service.dart new file mode 100644 index 000000000..43ba120df --- /dev/null +++ b/packages/sync_service/lib/data/sync_service.dart @@ -0,0 +1,180 @@ +import 'dart:async'; + +import 'package:digit_data_model/data_model.dart'; +import 'package:flutter_background_service/flutter_background_service.dart'; +import 'package:flutter_secure_storage/flutter_secure_storage.dart'; +import 'package:sync_service/data/repositories/sync/sync_down.dart'; +import 'package:sync_service/data/repositories/sync/sync_up.dart'; +import 'package:sync_service/utils/utils.dart'; + +import '../models/bandwidth/bandwidth_model.dart'; + +/// The `SyncService` class provides methods to perform sync operations. +class SyncService { + /// This function reads the params and gets the records which are not synced + /// and pushes to the sync-up and sync-down methods. + /// + /// It accepts a list of `LocalRepository` objects, a list of `RemoteRepository` objects, + /// a `BandwidthModel`, and an optional `ServiceInstance` as parameters. + /// It returns a `Future` that resolves to a `bool` indicating whether the sync operation is completed. + FutureOr performSync({ + required List localRepositories, + required List remoteRepositories, + required BandwidthModel bandwidthModel, + ServiceInstance? service, + }) async { + final configuration = SyncServiceSingleton().persistenceConfiguration; + + if (configuration == PersistenceConfiguration.onlineOnly) { + throw Exception('Sync up is not valid for online only configuration'); + } + bool isSyncCompleted = false; + + final futuresSyncDown = await Future.wait( + localRepositories + .map((e) => e.getItemsToBeSyncedDown(bandwidthModel.userId)), + ); + final pendingSyncDownEntries = futuresSyncDown.expand((e) => e).toList(); + + final futuresSyncUp = await Future.wait( + localRepositories + .map((e) => e.getItemsToBeSyncedUp(bandwidthModel.userId)), + ); + final pendingSyncUpEntries = futuresSyncUp.expand((e) => e).toList(); + + SyncError? syncError; + +// Perform the sync Down Operation + + try { + await PerformSyncDown.syncDown( + bandwidthModel: bandwidthModel, + localRepositories: localRepositories.toSet().toList(), + remoteRepositories: remoteRepositories.toSet().toList(), + configuration: configuration!, + ); + } catch (e) { + syncError = SyncDownError(e); + service?.stopSelf(); + } + +// Perform the sync up Operation + + try { + await PerformSyncUp.syncUp( + bandwidthModel: bandwidthModel, + localRepositories: localRepositories.toSet().toList(), + remoteRepositories: remoteRepositories.toSet().toList(), + ); + } catch (e) { + syncError ??= SyncUpError(e); + service?.stopSelf(); + } + + if (syncError != null) throw 'SyncUp Error: ${syncError.error}'; + + // Recursive function which will call the Perform Sync + + if (pendingSyncUpEntries.isNotEmpty || pendingSyncDownEntries.isNotEmpty) { + await Future.delayed(const Duration(seconds: 3)); + isSyncCompleted = await performSync( + bandwidthModel: bandwidthModel, + localRepositories: localRepositories, + remoteRepositories: remoteRepositories, + ); + } else if (pendingSyncUpEntries.isEmpty && pendingSyncDownEntries.isEmpty) { + await const FlutterSecureStorage() + .write(key: 'manualSyncKey', value: false.toString()); + isSyncCompleted = true; + } + + return isSyncCompleted; + } + + /// Writes the given response to the entity database. + /// + /// This method accepts a `Map` response and a list of `LocalRepository` objects as parameters. + /// It is a `FutureOr` function. + FutureOr writeToEntityDB( + Map response, + List localRepositories, + ) async { + SyncServiceSingleton().entityMapper?.writeToEntityDB( + response, + localRepositories, + ); + } + + /// Returns the count of pending sync records for the given user. + /// + /// This method accepts a list of `LocalRepository` objects and a `String` user ID as parameters. + /// It returns a `FutureOr` that resolves to the count of pending sync records. + FutureOr getPendingSyncRecordsCount( + List localRepositories, + String userId, + ) async => + (await Future.wait(localRepositories.map((e) { + return e.getItemsToBeSyncedUp(userId); + }))) + .expand((element) => element) + .length; +} + +/// This function filters the entities by the given bandwidth. +/// +/// It accepts an integer `batchSize` and a list of `EntityModel` objects as parameters. +/// It returns a `FutureOr>` that resolves to a list of filtered `EntityModel` objects. +FutureOr> filterEntityByBandwidth( + int batchSize, + List entities, +) async { + final List items = []; + final int size = batchSize < entities.length ? batchSize : entities.length; + + for (var i = 0; i < size; i++) { + items.add(entities[i]); + } + + return items; +} + +/// This function filters the operation log entries by the given bandwidth. +/// +/// It accepts an integer `batchSize` and a list of `OpLogEntry` objects as parameters. +/// It returns a `Future>>` that resolves to a list of filtered `OpLogEntry` objects. +Future>> filterOpLogByBandwidth( + int batchSize, + List> entities, +) async { + final List> items = []; + final int size = batchSize < entities.length ? batchSize : entities.length; + + for (var i = 0; i < size; i++) { + items.add(entities[i]); + } + + return items; +} + +/// The `SyncError` class is an abstract class that represents a sync error. +/// +/// It extends the `Exception` class and includes a dynamic `error` property. +abstract class SyncError implements Exception { + final dynamic error; + + const SyncError([this.error]); +} + +/// The `SyncUpError` class represents a sync up error. +/// +/// It extends the `SyncError` class. +class SyncUpError extends SyncError { + const SyncUpError([super.error]); +} + +/// The `SyncDownError` class represents a sync down error. +/// +/// It extends the `SyncError` class. +class SyncDownError extends SyncError { + const SyncDownError([super.error]); +} diff --git a/packages/sync_service/lib/models/bandwidth/bandwidth_model.dart b/packages/sync_service/lib/models/bandwidth/bandwidth_model.dart new file mode 100644 index 000000000..7e8d724f3 --- /dev/null +++ b/packages/sync_service/lib/models/bandwidth/bandwidth_model.dart @@ -0,0 +1,22 @@ +// Importing the necessary packages +import 'package:freezed_annotation/freezed_annotation.dart'; + +// Part statements are used in Dart to create libraries that can spread over several files +part 'bandwidth_model.freezed.dart'; +part 'bandwidth_model.g.dart'; + +// The @freezed annotation marks this class as immutable and generates the necessary code +@freezed +// BandwidthModel class with a mixin of _$BandwidthModel +class BandwidthModel with _$BandwidthModel { + // Factory constructor for creating a new BandwidthModel instance + // The required keyword means that the parameter is mandatory + const factory BandwidthModel({ + required String userId, + required int batchSize, + }) = _BandwidthModel; + + // Factory constructor for creating a new BandwidthModel instance from a JSON map + factory BandwidthModel.fromJson(Map json) => + _$BandwidthModelFromJson(json); +} diff --git a/apps/health_campaign_field_worker_app/lib/models/bandwidth/bandwidth_model.freezed.dart b/packages/sync_service/lib/models/bandwidth/bandwidth_model.freezed.dart similarity index 100% rename from apps/health_campaign_field_worker_app/lib/models/bandwidth/bandwidth_model.freezed.dart rename to packages/sync_service/lib/models/bandwidth/bandwidth_model.freezed.dart diff --git a/apps/health_campaign_field_worker_app/lib/models/bandwidth/bandwidth_model.g.dart b/packages/sync_service/lib/models/bandwidth/bandwidth_model.g.dart similarity index 100% rename from apps/health_campaign_field_worker_app/lib/models/bandwidth/bandwidth_model.g.dart rename to packages/sync_service/lib/models/bandwidth/bandwidth_model.g.dart diff --git a/packages/sync_service/lib/sync_service_lib.dart b/packages/sync_service/lib/sync_service_lib.dart new file mode 100644 index 000000000..5d94e9324 --- /dev/null +++ b/packages/sync_service/lib/sync_service_lib.dart @@ -0,0 +1,10 @@ +library sync_service; + +export 'blocs/sync/sync.dart'; +export 'data/repositories/sync/remote_type.dart'; +export 'data/repositories/sync/sync_down.dart'; +export 'data/repositories/sync/sync_up.dart'; +export 'data/sync_entity_mapper_listener.dart'; +export 'data/sync_service.dart'; +export 'models/bandwidth/bandwidth_model.dart'; +export 'utils/utils.dart'; diff --git a/packages/sync_service/lib/utils/utils.dart b/packages/sync_service/lib/utils/utils.dart new file mode 100644 index 000000000..b87946c83 --- /dev/null +++ b/packages/sync_service/lib/utils/utils.dart @@ -0,0 +1,84 @@ +import 'package:digit_data_model/data_model.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:provider/provider.dart'; +import 'package:sync_service/sync_service_lib.dart'; + +/// The `SyncServiceSingleton` class is a singleton that provides access to sync service related configurations and listeners. +/// +/// This class provides methods to set and get sync service related data such as `syncDownRetryCount`, `persistenceConfiguration`, and `entityMapper`. +class SyncServiceSingleton { + // Singleton instance + static final SyncServiceSingleton _instance = + SyncServiceSingleton._internal(); + + // Factory constructor that returns the singleton instance + factory SyncServiceSingleton() => _instance; + + // Private named constructor + SyncServiceSingleton._internal(); + + // Getter for the singleton instance + static SyncServiceSingleton get instance => _instance; + + // Listener for sync entity mapper events + SyncEntityMapperListener? _entityListener; + + SyncServiceRegistry? _registries; + + // Number of times to retry sync down operation + late int _syncDownRetryCount = 0; + + // Configuration for persistence of data + PersistenceConfiguration? _persistenceConfiguration = PersistenceConfiguration + .offlineFirst; // Default to offline first persistence configuration + + /// Sets the sync service related data. + /// + /// This method accepts `syncDownRetryCount`, `persistenceConfiguration`, and `entityMapper` as parameters and sets the corresponding properties. + void setData({ + required int syncDownRetryCount, + required PersistenceConfiguration persistenceConfiguration, + required SyncEntityMapperListener entityMapper, + }) { + _syncDownRetryCount = syncDownRetryCount; + _persistenceConfiguration = persistenceConfiguration; + _entityListener = entityMapper; + } + + void setRegistries(SyncServiceRegistry? registries) { + _registries = registries; + } + + // Getter for the sync entity mapper listener + SyncEntityMapperListener? get entityMapper => _entityListener; + + SyncServiceRegistry? get registries => _registries; + + // Getter for the sync down retry count + int get syncDownRetryCount => _syncDownRetryCount; + + // Getter for the persistence configuration + PersistenceConfiguration? get persistenceConfiguration => + _persistenceConfiguration; +} + +class SyncUtils { + // sync refresh + void syncRefresh(BuildContext context, String loggedInUserUuid) { + final syncBloc = context.read(); + syncBloc.add(SyncRefreshEvent(loggedInUserUuid)); + } + +// insert sync count + SyncState? syncCount( + BuildContext context, + ) { + SyncState? state; + final syncBloc = context.read(); + syncBloc.stream.listen((state) { + state = state; + }); + + return state; + } +} diff --git a/packages/sync_service/pubspec.yaml b/packages/sync_service/pubspec.yaml new file mode 100644 index 000000000..418269925 --- /dev/null +++ b/packages/sync_service/pubspec.yaml @@ -0,0 +1,83 @@ +name: sync_service +description: "Sync Service package provides access to sync to offline applications" +version: 0.0.1-dev.1 +homepage: https://github.com/egovernments/health-campaign-field-worker-app/tree/master/packages/sync_service +repository: https://github.com/egovernments/health-campaign-field-worker-app + +environment: + sdk: '>=3.4.1 <4.0.0' + flutter: ">=1.17.0" + +dependencies: + flutter: + sdk: flutter + flutter_bloc: ^8.1.5 + freezed_annotation: ^2.4.1 + dart_mappable: ^4.2.2 + drift: ^2.18.0 + sqlite3_flutter_libs: ^0.5.11+1 + path_provider: ^2.1.3 + path: ^1.9.0 + uuid: ^4.4.0 + recase: ^4.1.0 + isar: ^3.1.0+1 + isar_flutter_libs: ^3.1.0+1 + dio: ^5.4.3+1 + collection: ^1.18.0 + flutter_background_service: ^5.0.5 + provider: ^6.1.2 + flutter_secure_storage: ^9.2.2 + digit_data_model: ^1.0.5 + +dev_dependencies: + flutter_test: + sdk: flutter + mocktail: ^1.0.3 + flutter_lints: ^4.0.0 + freezed: ^2.1.0+1 + build_runner: ^2.4.11 + json_serializable: ^6.8.0 + drift_dev: ^2.18.0 + bloc_test: ^9.1.0 + dart_mappable_builder: + git: + url: https://github.com/egovernments/health-campaign-field-worker-app/ + ref: 1.6-final-dev + path: ./packages/dart_mappable_builder + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter packages. +flutter: + +# To add assets to your package, add an assets section, like this: +# assets: +# - images/a_dot_burr.jpeg +# - images/a_dot_ham.jpeg +# +# For details regarding assets in packages, see +# https://flutter.dev/assets-and-images/#from-packages +# +# An image asset can refer to one or more resolution-specific "variants", see +# https://flutter.dev/assets-and-images/#resolution-aware + +# To add custom fonts to your package, add a fonts section here, +# in this "flutter" section. Each entry in this list should have a +# "family" key with the font family name, and a "fonts" key with a +# list giving the asset and other descriptors for the font. For +# example: +# fonts: +# - family: Schyler +# fonts: +# - asset: fonts/Schyler-Regular.ttf +# - asset: fonts/Schyler-Italic.ttf +# style: italic +# - family: Trajan Pro +# fonts: +# - asset: fonts/TrajanPro.ttf +# - asset: fonts/TrajanPro_Bold.ttf +# weight: 700 +# +# For details regarding fonts in packages, see +# https://flutter.dev/custom-fonts/#from-packages diff --git a/packages/sync_service/test/sync_service_test.dart b/packages/sync_service/test/sync_service_test.dart new file mode 100644 index 000000000..153f05566 --- /dev/null +++ b/packages/sync_service/test/sync_service_test.dart @@ -0,0 +1,3 @@ +void main() { + +} diff --git a/pubspec.lock b/pubspec.lock index ca5589ec2..722109da3 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -317,18 +317,18 @@ packages: dependency: transitive description: name: meta - sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 + sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c url: "https://pub.dev" source: hosted - version: "1.15.0" + version: "1.16.0" mime: dependency: transitive description: name: mime - sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2" + sha256: "801fd0b26f14a4a58ccb09d5892c3fbdeff209594300a542492cf13fba9d247a" url: "https://pub.dev" source: hosted - version: "1.0.5" + version: "1.0.6" mustache_template: dependency: transitive description: @@ -357,10 +357,10 @@ packages: dependency: transitive description: name: platform - sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec" + sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" url: "https://pub.dev" source: hosted - version: "3.1.4" + version: "3.1.5" pool: dependency: transitive description: @@ -413,18 +413,18 @@ packages: dependency: transitive description: name: pubspec_parse - sha256: c63b2876e58e194e4b0828fcb080ad0e06d051cb607a6be51a9e084f47cb9367 + sha256: c799b721d79eb6ee6fa56f00c04b472dcd44a30d258fac2174a6ec57302678f8 url: "https://pub.dev" source: hosted - version: "1.2.3" + version: "1.3.0" quiver: dependency: transitive description: name: quiver - sha256: b1c1ac5ce6688d77f65f3375a9abb9319b3cb32486bdc7a1e0fdf004d7ba4e47 + sha256: ea0b925899e64ecdfbf9c7becb60d5b50e706ade44a85b2363be2a22d88117d2 url: "https://pub.dev" source: hosted - version: "3.2.1" + version: "3.2.2" shelf: dependency: transitive description: @@ -477,10 +477,10 @@ packages: dependency: transitive description: name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.3.0" term_glyph: dependency: transitive description: @@ -493,10 +493,10 @@ packages: dependency: transitive description: name: test_api - sha256: "2419f20b0c8677b2d67c8ac4d1ac7372d862dc6c460cdbb052b40155408cd794" + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" url: "https://pub.dev" source: hosted - version: "0.7.1" + version: "0.7.2" timing: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index be90b4ee5..6c653d317 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -9,3 +9,5 @@ dev_dependencies: dependencies: dart_mappable: ^4.2.0 + + diff --git a/tools/complaints_package.dart b/tools/complaints_package.dart new file mode 100644 index 000000000..1d230323b --- /dev/null +++ b/tools/complaints_package.dart @@ -0,0 +1,889 @@ +// Import the required Dart I/O package +import 'dart:io'; + +String createCaseCondition(String key, String value) { + return 'case "$key":\n $value'; +} + +void insertCaseCondition(List lines, String caseCondition) { + final defaultIndex = lines.indexWhere((line) => line.contains('default:')); + if (defaultIndex != -1 && + !lines.any((line) => line.contains(caseCondition.split('\n')[0]))) { + lines.insert(defaultIndex, caseCondition); + } +} + +// Define the main function +void main() { + // Get the current directory path + var appDir = Directory.current.path; + + // Define the paths for the application root and the files to be modified + var appRoot = appDir + '/apps/health_campaign_field_worker_app/lib'; + var localizationDelegatesFilePath = + appRoot + '/utils/localization_delegates.dart'; + var networkManagerProviderWrapperFilePath = + appRoot + '/widgets/network_manager_provider_wrapper.dart'; + var constantsFilePath = appRoot + '/utils/constants.dart'; + var utilsFilePath = appRoot + '/utils/utils.dart'; + var routerFilePath = appRoot + '/router/app_router.dart'; + var entityMapperFilePath = + appRoot + '/data/local_store/no_sql/schema/entity_mapper.dart'; + var syncUpFilePath = appRoot + '/data/repositories/sync/sync_up.dart'; + var homeFilePath = appRoot + '/pages/home.dart'; + var extensionsFilePath = appRoot + '/utils/extensions/extensions.dart'; + var contextUtilityFilePath = + appRoot + '/utils/extensions/context_utility.dart'; + + // Set boundary in the context utility file + _setBoundaryInContextUtilityFile(extensionsFilePath, contextUtilityFilePath); + + // Add complaints to home file + _updateHome(homeFilePath); + + // Update the sync_up.dart file + _updateSyncUpFile(syncUpFilePath); + + // Add complaints routes and import to the router file + _addComplaintsRoutesAndImportToRouterFile(routerFilePath); + + // Add new case statements to the entity_mapper.dart file + _updateEntityMapperFile(entityMapperFilePath); + + _createLocalizationDelegatesFile(localizationDelegatesFilePath); + + _addRepoToNetworkManagerProviderWrapper( + networkManagerProviderWrapperFilePath: + networkManagerProviderWrapperFilePath); + + _addComplaintsConstantsToConstantsFile(constantsFilePath: constantsFilePath); + + _addComplaintsMapperToUtilsFile(utilsFilePath: utilsFilePath); + + _formatFiles([ + homeFilePath, + syncUpFilePath, + entityMapperFilePath, + routerFilePath, + constantsFilePath, + utilsFilePath, + networkManagerProviderWrapperFilePath, + localizationDelegatesFilePath, + extensionsFilePath, + contextUtilityFilePath + ]); +} + +void _formatFiles(List filePaths) { + for (var filePath in filePaths) { + Process.runSync('dart', ['format', filePath]); + print('Formatted $filePath'); + } +} + +void _updateHome(String homeFilePath) { + var importStatement = ''' + import 'package:complaints/complaints.dart'; + import 'package:complaints/router/complaints_router.gm.dart'; + '''; + + var homeItemsData = ''' + i18.home.fileComplaint: + homeShowcaseData.distributorFileComplaint.buildWith( + child: HomeItemCard( + icon: Icons.announcement, + label: i18.home.fileComplaint, + onPressed: () => + context.router.push(const ComplaintsInboxWrapperRoute()), + ), + ), +'''; + + var showCaseData = ''' + i18.home.fileComplaint: + homeShowcaseData.distributorFileComplaint.showcaseKey, +'''; + + var itemsLabel = ''' + i18.home.fileComplaint, +'''; + + // Define the data to be added + var singletonData = ''' + ComplaintsSingleton().setInitialData( + tenantId: envConfig.variables.tenantId, + loggedInUserUuid: context.loggedInUserUuid, + userMobileNumber: context.loggedInUser.mobileNumber, + loggedInUserName: context.loggedInUser.name, + complaintTypes: + appConfiguration.complaintTypes!.map((e) => e.code).toList(), + userName: context.loggedInUser.name ?? '', + ); +'''; + + var localRepoData = ''' + context.read>(), +'''; + + var remoteRepoData = ''' + context.read>(), +'''; + + // Check if the home.dart file exists + var homeFile = File(homeFilePath); + if (!homeFile.existsSync()) { + print('Error: Home file does not exist at path: $homeFilePath'); + return; + } + + // Read the home.dart file + var homeFileContent = homeFile.readAsStringSync(); + + // Check if the import statement already exists and add it if not + if (!homeFileContent + .contains(importStatement.replaceAll(RegExp(r'\s'), ''))) { + homeFileContent = importStatement + '\n' + homeFileContent; + print('The import statement was added.'); + } else { + print('The import statement already exists.'); + } + + // Insert the data to be added + homeFileContent = insertData(homeFileContent, + '// INFO : Need to add singleton of package Here', singletonData); + homeFileContent = insertData(homeFileContent, + '// INFO : Need to add local repo of package Here', localRepoData); + homeFileContent = insertData(homeFileContent, + '// INFO : Need to add repo repo of package Here', remoteRepoData); + homeFileContent = insertData(homeFileContent, + '// INFO : Need to add home items of package Here', homeItemsData); + homeFileContent = insertData(homeFileContent, + '// INFO : Need to add showcase keys of package Here', showCaseData); + homeFileContent = insertData(homeFileContent, + '// INFO: Need to add items label of package Here', itemsLabel); + + // Write the updated content back to the home.dart file + homeFile.writeAsStringSync(homeFileContent); +} + +String insertData(String fileContent, String marker, String data) { + var markerIndex = fileContent.indexOf(marker); + if (markerIndex != -1) { + var endOfMarker = markerIndex + marker.length; + if (!fileContent.substring(endOfMarker).contains(data.trim())) { + fileContent = fileContent.substring(0, endOfMarker) + + '\n' + + data + + fileContent.substring(endOfMarker); + print('Data was added after marker: $marker'); + } else { + print('Data already exists after marker: $marker'); + } + } else { + print('Error: Could not find the marker: $marker'); + } + return fileContent; +} + +//script working +void _updateSyncUpFile(String syncUpFilePath) { + // Define the import statement and the new case statements + var importStatement = "import 'package:complaints/complaints.dart';"; + var newCases = ''' + case DataModelType.complaints: + for (final entity in entities) { + if (remote is PgrServiceRemoteRepository && + entity is PgrServiceModel) { + final response = await remote.create(entity); + final responseData = response.data; + if (responseData is! Map) { + AppLogger.instance.error( + title: 'NetworkManager : PgrServiceRemoteRepository', + message: responseData, + stackTrace: StackTrace.current, + ); + continue; + } + + + + + PgrServiceCreateResponseModel + pgrServiceCreateResponseModel; + PgrComplaintResponseModel pgrComplaintModel; + try { + pgrServiceCreateResponseModel = + PgrServiceCreateResponseModelMapper.fromMap( + responseData, + ); + pgrComplaintModel = + pgrServiceCreateResponseModel.serviceWrappers.first; + } catch (e) { + rethrow; + } + + + + + final service = pgrComplaintModel.service; + final serviceRequestId = service.serviceRequestId; + + + + + if (serviceRequestId == null || + serviceRequestId.isEmpty) { + AppLogger.instance.error( + title: 'NetworkManager : PgrServiceRemoteRepository', + message: 'Service Request ID is null', + stackTrace: StackTrace.current, + ); + continue; + } + + + + + await local.markSyncedUp( + entry: sublist.firstWhere((element) => + element.clientReferenceId == + entity.clientReferenceId), + clientReferenceId: entity.clientReferenceId, + nonRecoverableError: entity.nonRecoverableError, + ); + + + + + await local.opLogManager.updateServerGeneratedIds( + model: UpdateServerGeneratedIdModel( + clientReferenceId: entity.clientReferenceId, + serverGeneratedId: serviceRequestId, + dataOperation: operationGroupedEntity.key, + rowVersion: entity.rowVersion, + ), + ); + + + + + await local.update( + entity.copyWith( + serviceRequestId: serviceRequestId, + id: service.id, + applicationStatus: service.applicationStatus, + accountId: service.accountId, + ), + createOpLog: false, + ); + } + } + break; +'''; + + // Check if the sync_up file exists + var syncUpFile = File(syncUpFilePath); + + if (!syncUpFile.existsSync()) { + print('Error: Sync Up file does not exist at path: $syncUpFilePath'); + return; + } + + // Read the sync_up file + var syncUpFileContent = syncUpFile.readAsStringSync(); + print(syncUpFileContent); + // Check if the import statement already exists and add it if not + if (!syncUpFileContent + .contains(importStatement.replaceAll(RegExp(r'\s'), ''))) { + syncUpFileContent = importStatement + '\n' + syncUpFileContent; + print('The import statement was added to sync_up.dart.'); + } else { + print('The import statement already exists in sync_up.dart.'); + } + + // Insert the new case statements + if (!syncUpFileContent.contains( + 'case DataModelType.complaints:'.replaceAll(RegExp(r'\s'), ''))) { + // Find the position to insert the new cases within the switch statement + var switchIndex = + syncUpFileContent.indexOf('switch (typeGroupedEntity.key) {'); + if (switchIndex != -1) { + var caseInsertionIndex = + syncUpFileContent.indexOf('default:', switchIndex); + if (caseInsertionIndex != -1) { + syncUpFileContent = syncUpFileContent.substring(0, caseInsertionIndex) + + newCases + + '\n' + + syncUpFileContent.substring(caseInsertionIndex); + print('The new cases were added to sync_up.dart.'); + + // Write the updated content back to the file + syncUpFile.writeAsStringSync(syncUpFileContent); + } else { + print( + 'Error: Could not find the default case in the switch statement in sync_up.dart.'); + return; + } + } else { + print('Error: Could not find the switch statement in sync_up.dart.'); + return; + } + } else { + print('The new cases already exist in sync_up.dart.'); + } +} + +void _updateEntityMapperFile(String entityMapperFilePath) { + // Define the import statement and new case statements + var importStatement = "import 'package:complaints/complaints.dart';"; + var newCases = ''' + case "complaints": + final entity = PgrServiceModelMapper.fromJson(entityString); + return entity; +'''; + + // Check if the entity_mapper file exists + var entityMapperFile = File(entityMapperFilePath); + + if (!entityMapperFile.existsSync()) { + print( + 'Error: Entity Mapper file does not exist at path: $entityMapperFilePath'); + return; + } + + // Read the entity_mapper file + var entityMapperFileContent = entityMapperFile.readAsStringSync(); + + // Check if the import statement already exists and add it if not + if (!entityMapperFileContent + .contains(importStatement.replaceAll(RegExp(r'\s'), ''))) { + entityMapperFileContent = importStatement + '\n' + entityMapperFileContent; + print('The import statement was added.'); + } else { + print('The import statement already exists.'); + } + + // Check if the new cases already exist in the file + if (!entityMapperFileContent + .contains('case "complaints":'.replaceAll(RegExp(r'\s'), ''))) { + // Find the position to insert the new cases (before the default case) + var caseInsertionIndex = entityMapperFileContent.indexOf('default:'); + if (caseInsertionIndex != -1) { + entityMapperFileContent = + entityMapperFileContent.substring(0, caseInsertionIndex) + + newCases + + '\n' + + entityMapperFileContent.substring(caseInsertionIndex); + print('The new cases were added.'); + + // Write the updated content back to the file + entityMapperFile.writeAsStringSync(entityMapperFileContent); + } else { + print('Error: Could not find the insertion point.'); + return; + } + } else { + print('The new cases already exist.'); + } +} + +//script working +void _addComplaintsRoutesAndImportToRouterFile(String routerFilePath) { + // Define the complaints route lines + var complaintsRoutes = ''' + AutoRoute( + page: ComplaintsInboxWrapperRoute.page, + path: 'complaints-inbox', + children: [ + AutoRoute( + page: ComplaintsInboxRoute.page, + path: 'complaints-inbox-items', + initial: true, + ), + AutoRoute( + page: ComplaintsInboxFilterRoute.page, + path: 'complaints-inbox-filter', + ), + AutoRoute( + page: ComplaintsInboxSearchRoute.page, + path: 'complaints-inbox-search', + ), + AutoRoute( + page: ComplaintsInboxSortRoute.page, + path: 'complaints-inbox-sort', + ), + AutoRoute( + page: ComplaintsDetailsViewRoute.page, + path: 'complaints-inbox-view-details', + ), + ], + ), + + + + + /// Complaints registration + AutoRoute( + page: ComplaintsRegistrationWrapperRoute.page, + path: 'complaints-registration', + children: [ + AutoRoute( + page: ComplaintTypeRoute.page, + path: 'complaints-type', + initial: true, + ), + AutoRoute( + page: ComplaintsLocationRoute.page, + path: 'complaints-location', + ), + AutoRoute( + page: ComplaintsDetailsRoute.page, + path: 'complaints-details', + ), + ], + ), + + + + + /// Complaints Acknowledgemnet + AutoRoute( + page: ComplaintsAcknowledgementRoute.page, + path: 'complaints-acknowledgement', + ), +'''; + + // Define the import statement + var importStatement1 = + "import 'package:complaints/router/complaints_router.gm.dart';"; + // Define the import statement + var importStatement2 = + "import 'package:complaints/router/complaints_router.dart';"; + + // Check if the router file exists + var routerFile = File(routerFilePath); + + if (!routerFile.existsSync()) { + print('Error: Router file does not exist at path: $routerFilePath'); + return; + } + + // Read the router file + var routerFileContent = routerFile.readAsStringSync(); + + // Normalize the whitespace in the file content + var normalizedFileContent = routerFileContent.replaceAll(RegExp(r'\s'), ''); + + // Check if the import statement already exists + if (!normalizedFileContent + .contains(importStatement1.replaceAll(RegExp(r'\s'), ''))) { + // Add the import statement at the beginning of the file + routerFileContent = importStatement1 + '\n' + routerFileContent; + print('The import statement was added.'); + } else { + print('The import statement already exists.'); + } + + // Check if the import statement already exists + if (!normalizedFileContent + .contains(importStatement2.replaceAll(RegExp(r'\s'), ''))) { + // Add the import statement at the beginning of the file + routerFileContent = importStatement2 + '\n' + routerFileContent; + print('The import statement was added.'); + } else { + print('The import statement already exists.'); + } + + // Check if the complaintsRoute module already exists + if (!routerFileContent + .contains('ComplaintsRoute'.replaceAll(RegExp(r'\s'), ''))) { + // Find the position to insert the module + var moduleInsertionIndex = routerFileContent.indexOf('@AutoRouterConfig('); + if (moduleInsertionIndex != -1) { + var endOfModulesIndex = + routerFileContent.indexOf(']', moduleInsertionIndex); + if (endOfModulesIndex != -1) { + var modulesEndIndex = + routerFileContent.lastIndexOf(']', endOfModulesIndex); + routerFileContent = routerFileContent.substring(0, modulesEndIndex) + + ' ComplaintsRoute,' + + routerFileContent.substring(modulesEndIndex); + + print('The ComplaintsRoute module was added.'); + } else { + print('Error: Could not find the end of the modules list.'); + return; + } + } else { + print('Error: Could not find @AutoRouterConfig annotation.'); + return; + } + } else { + print('The ComplaintsRoute module already exists.'); + } + + // Check if the complaints routes already exist in the file + if (!normalizedFileContent + .contains(complaintsRoutes.replaceAll(RegExp(r'\s'), ''))) { + // Find the position to insert the routes + var insertionIndex = routerFileContent + .indexOf('// INFO : Need to add Router of package Here'); + if (insertionIndex != -1) { + routerFileContent = routerFileContent.substring(0, insertionIndex) + + '// INFO : Need to add Router of package Here\n' + + complaintsRoutes + + routerFileContent.substring(insertionIndex + + '// INFO : Need to add Router of package Here'.length); + + print('The complaint routes were added.'); + // Write the updated content back to the file + routerFile.writeAsStringSync(routerFileContent); + } else { + print('Error: Could not find the insertion point.'); + return; + } + } else { + print('The complaint routes already exist.'); + } +} + +//initialise mappers +void _addComplaintsMapperToUtilsFile({required String utilsFilePath}) { + // Define the complaints related lines + var complaintsImportStatement = [ + "import 'package:complaints/complaints.init.dart' as complaints_mappers;" + ]; + var complaintsInitializationStatement = + "Future(() => complaints_mappers.initializeMappers()),"; + + // Check if the utils.dart file exists + var utilsFile = File(utilsFilePath); + + // Read the utils.dart file + var utilsFileContent = utilsFile.readAsStringSync(); + + // Normalize the whitespace in the file content + var normalizedFileContent = utilsFileContent.replaceAll(RegExp(r'\s'), ''); + + var getSyncCountStatement = "case DataModelType.complaints:"; + + // Check if the import statement and delegate already exist in the file + // If not, add them to the file + if (!normalizedFileContent + .contains(complaintsImportStatement[0].replaceAll(RegExp(r'\s'), ''))) { + var libraryIndex = utilsFileContent.indexOf('library app_utils;'); + if (libraryIndex != -1) { + var endOfLibrary = libraryIndex + + utilsFileContent.substring(libraryIndex).indexOf(';') + + 1; + utilsFileContent = utilsFileContent.substring(0, endOfLibrary + 1) + + '\n' + + complaintsImportStatement[0] + + utilsFileContent.substring(endOfLibrary + 1); + print('The import statement was added.'); + } + } else { + print('The import statement already exists.'); + } + + if (!utilsFileContent.contains(complaintsInitializationStatement)) { + // Add the complaints related initialization statement to the file + var initializeAllMappersIndex = + utilsFileContent.indexOf('initializeAllMappers() async {'); + if (initializeAllMappersIndex == -1) { + print( + 'Error: Could not find a place to insert the complaint initialization statement.'); + return; + } + var endOfInitializeAllMappers = initializeAllMappersIndex + + utilsFileContent.substring(initializeAllMappersIndex).indexOf(']') + + 1; + utilsFileContent = + utilsFileContent.substring(0, endOfInitializeAllMappers - 1) + + '\n ' + + complaintsInitializationStatement + + utilsFileContent.substring(endOfInitializeAllMappers - 1); + print('complaint initialization statement added to utils.dart'); + } else { + print('The complaint initialization statement already exists.'); + } + + if (!utilsFileContent.contains(getSyncCountStatement)) { + var getSyncCountStatementIndex = + utilsFileContent.indexOf('add SyncCount case for package'); + if (getSyncCountStatementIndex == -1) { + print( + 'Error: Could not find a place to insert the complaint DataModelType statement.'); + return; + } + + var endOfgetSyncCountStatementIndex = getSyncCountStatementIndex + + utilsFileContent.substring(getSyncCountStatementIndex).indexOf('}') + + 1; + utilsFileContent = + utilsFileContent.substring(0, getSyncCountStatementIndex + 30) + + '\n ' + + getSyncCountStatement + + utilsFileContent.substring(getSyncCountStatementIndex + 30); + print('complaint DataModelType statement added to utils.dart'); + } else { + print('The complaint DataModelType statement already exists.'); + } + + // Write the updated content back to the utils.dart file + utilsFile.writeAsStringSync(utilsFileContent); +} + +void _addComplaintsConstantsToConstantsFile( + {required String constantsFilePath}) { + // Define the import statements + var importStatements = [ + "import 'package:complaints/complaints.dart';", + ]; + + // Define the local and remote repositories + var localRepository = [ + ''' +PgrServiceLocalRepository( + sql, + PgrServiceOpLogManager(isar), + ), +''' + ]; + + var remoteRepository = [ + ''' +if (value == DataModelType.complaints) + PgrServiceRemoteRepository(dio, actionMap: actions), +''' + ]; + + // Check if the constants.dart file exists + var constantsFile = File(constantsFilePath); + if (!constantsFile.existsSync()) { + print('Error: The constants.dart file does not exist.'); + return; + } + + // Read the constants.dart file + var constantsFileContent = constantsFile.readAsStringSync(); + + // Normalize the whitespace in the file content and the complaints configuration + var normalizedFileContent = + constantsFileContent.replaceAll(RegExp(r'\s'), ''); + + // Check if the import statements already exist in the file + for (var importStatement in importStatements) { + if (!normalizedFileContent + .contains(importStatement.replaceAll(RegExp(r'\s'), ''))) { + // Add the import statement at the top of the file + constantsFileContent = importStatement + '\n' + constantsFileContent; + print('The import statement was added: $importStatement'); + } + } + + // Add the local and remote repositories to the getLocalRepositories and getRemoteRepositories methods + var getLocalRepositoriesIndex = + constantsFileContent.indexOf('getLocalRepositories('); + if (getLocalRepositoriesIndex != -1) { + var endOfGetLocalRepositories = getLocalRepositoriesIndex + + constantsFileContent.substring(getLocalRepositoriesIndex).indexOf(']') + + 1; + constantsFileContent = + constantsFileContent.substring(0, endOfGetLocalRepositories - 1) + + '\n' + + localRepository.join('\n') + + constantsFileContent.substring(endOfGetLocalRepositories - 1); + print('The local repositories were added.'); + } + + var getRemoteRepositoriesIndex = + constantsFileContent.indexOf('getRemoteRepositories('); + if (getRemoteRepositoriesIndex != -1) { + var endOfGetRemoteRepositories = getRemoteRepositoriesIndex + + constantsFileContent + .substring(getRemoteRepositoriesIndex) + .indexOf('addAll(') + + 'addAll('.length; + var endOfAddAll = constantsFileContent + .substring(endOfGetRemoteRepositories) + .indexOf(']') + + endOfGetRemoteRepositories; + constantsFileContent = constantsFileContent.substring(0, endOfAddAll) + + remoteRepository.join('\n') + + constantsFileContent.substring(endOfAddAll); + print('The remote repositories were added.'); + } + + // Write the updated content back to the constants.dart file + constantsFile.writeAsStringSync(constantsFileContent); +} + +void _addRepoToNetworkManagerProviderWrapper( + {required String networkManagerProviderWrapperFilePath}) { + // Define the import statements and repository providers + var importStatements = [ + "import 'package:complaints/complaints.dart';", + ]; + var localRepositories = [ + "RepositoryProvider<\n LocalRepository>(\n create: (_) => PgrServiceLocalRepository(\n sql,\n PgrServiceOpLogManager(isar),\n ),\n )," + ]; + +// Define the remote repositories of complaints + var remoteRepositoriesOfRegistrationDelivery = [ + "if (value == DataModelType.complaints)\n RepositoryProvider<\n RemoteRepository>(\n create: (_) => PgrServiceRemoteRepository(\n dio,\n actionMap: actions,\n ),\n)" + ]; + +// Read the network_manager_provider_wrapper.dart file + var networkManagerProviderWrapperFile = + File(networkManagerProviderWrapperFilePath); + var networkManagerProviderWrapperFileContent = + networkManagerProviderWrapperFile.readAsStringSync(); + +// Find the last import statement in the file + var lastImportIndex = networkManagerProviderWrapperFileContent + .lastIndexOf(RegExp(r'import .+;')); + + if (lastImportIndex != -1) { + var endOfLastImport = lastImportIndex + + networkManagerProviderWrapperFileContent + .substring(lastImportIndex) + .indexOf(';') + + 1; + + // Check if the import statements already exist in the file + for (var importStatement in importStatements) { + if (!networkManagerProviderWrapperFileContent + .contains(importStatement.replaceAll(RegExp(r'\s'), ''))) { + // Add the import statement after the last import + networkManagerProviderWrapperFileContent = + networkManagerProviderWrapperFileContent.substring( + 0, endOfLastImport) + + '\n' + + importStatement + + networkManagerProviderWrapperFileContent + .substring(endOfLastImport); + endOfLastImport += importStatement.length + 1; + print('The import statement was added: $importStatement'); + } else { + print('The import statement already exists.'); + } + } + + // Normalize the whitespace in the file content and the remote repository of complaints + var normalizedFileContent = + networkManagerProviderWrapperFileContent.replaceAll(RegExp(r'\s'), ''); + +// Check if the local repository providers already exist in the file + for (var repositoryProvider in localRepositories) { + var normalizedLocalRepositoryOfComplaints = + repositoryProvider.replaceAll(RegExp(r'\s'), ''); + + if (!normalizedFileContent + .contains(normalizedLocalRepositoryOfComplaints)) { + // Add the local repository provider to the file + networkManagerProviderWrapperFileContent = + networkManagerProviderWrapperFileContent.replaceFirst( + '];', ' $repositoryProvider\n];'); + print('The local repository provider was added: $repositoryProvider'); + } else { + print('The local repository provider already exists.'); + } + } + +// Check if the remote repository of complaints already exists in the file + for (var remoteRepositoryOfRegistrationDelivery + in remoteRepositoriesOfRegistrationDelivery) { + var normalizedRemoteRepositoryOfRegistrationDelivery = + remoteRepositoryOfRegistrationDelivery.replaceAll(RegExp(r'\s'), ''); + + if (!normalizedFileContent + .contains(normalizedRemoteRepositoryOfRegistrationDelivery)) { + // Add the remote repository of complaints to the _getRemoteRepositories method + var replacementString = + networkManagerProviderWrapperFileContent.contains(']);') + ? ' $remoteRepositoryOfRegistrationDelivery,\n]);' + : ' $remoteRepositoryOfRegistrationDelivery\n]);'; + networkManagerProviderWrapperFileContent = + networkManagerProviderWrapperFileContent.replaceFirst( + ']);', replacementString); + print( + 'The remote repository of complaints was added: $remoteRepositoryOfRegistrationDelivery'); + } else { + print('The remote repository of complaints already exists.'); + } + } + + // Write the updated content back to the file + networkManagerProviderWrapperFile + .writeAsStringSync(networkManagerProviderWrapperFileContent); + } +} + +void _createLocalizationDelegatesFile(String localizationDelegatesFilePath) { + // Define the import statement and delegate for localization + var importStatement = + "import 'package:complaints/blocs/localization/app_localization.dart' as complaints_localization;"; + var delegate = + " complaints_localization.ComplaintsLocalization.getDelegate( LocalizationLocalRepository().returnLocalizationFromSQL(sql) as Future,appConfig.languages!,),"; + + // Read the localization delegates file + var localizationDelegatesFile = File(localizationDelegatesFilePath); + var localizationDelegatesFileContent = + localizationDelegatesFile.readAsStringSync(); + + var normalizedFileContent = + localizationDelegatesFileContent.replaceAll(RegExp(r'\s'), ''); + + // Check if the import statement and delegate already exist in the file + // If not, add them to the file + if (!normalizedFileContent + .contains(importStatement.replaceAll(RegExp(r'\s'), ''))) { + localizationDelegatesFileContent = + '$importStatement\n$localizationDelegatesFileContent'; + print('The import statement was added.'); + } + + if (!normalizedFileContent.contains(delegate.replaceAll(RegExp(r'\s'), ''))) { + var lastDelegateIndex = + localizationDelegatesFileContent.lastIndexOf(RegExp(r',')); + if (lastDelegateIndex != -1) { + localizationDelegatesFileContent = + localizationDelegatesFileContent.substring(0, lastDelegateIndex + 1) + + '\n $delegate' + + localizationDelegatesFileContent.substring(lastDelegateIndex + 1); + print('The delegate was added.'); + } + } + + // Write the updated content back to the file + localizationDelegatesFile.writeAsStringSync(localizationDelegatesFileContent); +} + +void _setBoundaryInContextUtilityFile( + String extensionsFilePath, String contextUtilityFilePath) { + // Define the lines to be added + var importStatement = "import 'package:complaints/utils/utils.dart';"; + var boundaryStatement = + 'ComplaintsSingleton().setBoundary(boundary: selectedBoundary);'; + + // Update the extensions.dart file + var extensionsFile = File(extensionsFilePath); + var extensionsFileContent = extensionsFile.readAsStringSync(); + if (!extensionsFileContent.contains(importStatement)) { + extensionsFileContent = importStatement + '\n' + extensionsFileContent; + extensionsFile.writeAsStringSync(extensionsFileContent); + print('Updated the extensions.dart file.'); + } + + // Update the context_utility.dart file + var contextUtilityFile = File(contextUtilityFilePath); + var contextUtilityFileContent = contextUtilityFile.readAsStringSync(); + + // Use the insertData method to insert the boundaryStatement + contextUtilityFileContent = insertData(contextUtilityFileContent, + '// INFO: Set Boundary for packages', boundaryStatement); + + // Write the updated content back to the context_utility.dart file + contextUtilityFile.writeAsStringSync(contextUtilityFileContent); +} diff --git a/tools/generate-apk.sh b/tools/generate-apk.sh index 8b3225c82..163380112 100755 --- a/tools/generate-apk.sh +++ b/tools/generate-apk.sh @@ -14,46 +14,48 @@ build_apk() { fi } -# Ask user for environment to build for -echo "Please select an environment to build for (UAT, DEV, QA or ALL):" -read env -env="${env:-ALL}" +# # Ask user for environment to build for +# echo "Please select an environment to build for (UAT, DEV, QA or ALL):" +# read env +# env="${env:-ALL}" # Ask user for build config echo "Please select a build config (release or profile):" read build_config build_config="${build_config:-release}" -# Build APK for specified environment(s) and build config -if [ "$env" == "ALL" ]; then - env_list=("UAT" "DEV" "QA") -else - env_list=("$env") -fi - -./tools/install_bricks.sh - -for env_option in "${env_list[@]}"; do - cd "$APP_DIR" || exit - - case $env_option in - "UAT") - cp ".env.uat" ".env" - ;; - "QA") - cp ".env.qa" ".env" - ;; - "DEV") - cp ".env.dev" ".env" - ;; - esac +cd "$APP_DIR" || exit + +# # Build APK for specified environment(s) and build config +# if [ "$env" == "ALL" ]; then +# env_list=("UAT" "DEV" "QA") +# else +# env_list=("$env") +# fi + +# ./tools/install_bricks.sh + +# for env_option in "${env_list[@]}"; do +# cd "$APP_DIR" || exit + +# case $env_option in +# "UAT") +# cp ".env.uat" ".env" +# ;; +# "QA") +# cp ".env.qa" ".env" +# ;; +# "DEV") +# cp ".env.dev" ".env" +# ;; +# esac build_apk cd ../../ || exit mkdir -p outputs mv "$APP_DIR/build/app/outputs/flutter-apk/app-$build_config.apk" "outputs/app-$env_option-$build_config.apk" -done +# done -open outputs +# open outputs echo "APK generation complete." diff --git a/tools/survey_form_package_imports.dart b/tools/survey_form_package_imports.dart new file mode 100644 index 000000000..337bdc6b5 --- /dev/null +++ b/tools/survey_form_package_imports.dart @@ -0,0 +1,1054 @@ +// Import the required Dart I/O package +import 'dart:io'; + +String createCaseCondition(String key, String value) { + return 'case "$key":\n $value'; +} + +void insertCaseCondition(List lines, String caseCondition) { + final defaultIndex = lines.indexWhere((line) => line.contains('default:')); + if (defaultIndex != -1 && + !lines.any((line) => line.contains(caseCondition.split('\n')[0]))) { + lines.insert(defaultIndex, caseCondition); + } +} + +// Define the main function +void main() { + // Get the current directory path + var appDir = Directory.current.parent.path; + + // Define the paths for the application root and the files to be modified + var appRoot = appDir + '/apps/health_campaign_field_worker_app/lib'; + var localizationDelegatesFilePath = + appRoot + '/utils/localization_delegates.dart'; + var networkManagerProviderWrapperFilePath = + appRoot + '/widgets/network_manager_provider_wrapper.dart'; + var constantsFilePath = appRoot + '/utils/constants.dart'; + var utilsFilePath = appRoot + '/utils/utils.dart'; + var routerFilePath = appRoot + '/router/app_router.dart'; + var entityMapperFilePath = + appRoot + '/data/local_store/no_sql/schema/entity_mapper.dart'; + var syncDownFilePath = appRoot + '/data/repositories/sync/sync_down.dart'; + var homeFilePath = appRoot + '/pages/home.dart'; + var projectFilePath = appRoot + '/blocs/project/project.dart'; + var authenticatedFilePath = appRoot + '/pages/authenticated.dart'; + var contextUtilityFilePath = appRoot + '/utils/extensions/context_utility.dart'; + var appFilePath = appRoot + '/app.dart'; + var extensionFilePath = appRoot + '/utils/extensions/extensions.dart'; + + _updateExtensionFilePath(extensionFilePath); + + _updateAppFile(appFilePath); + + // Initialise Boundarycode in surveyFormSingleton class + _updateContextUtilityFile(contextUtilityFilePath); + + // Add Imports and service definition repo + _addprojectFilePath(projectFilePath); + + _addauthenticatedFilePath(authenticatedFilePath); + + + // Add surveyForm to home file + _updateHome(homeFilePath); + + // Add surveyForm routes and import to the router file + _addSurveyFormRoutesAndImportToRouterFile(routerFilePath); + + // Add new case statements to the entity_mapper.dart file + _updateEntityMapperFile(entityMapperFilePath); + + _createLocalizationDelegatesFile(localizationDelegatesFilePath); + + _addRepoToNetworkManagerProviderWrapper( + networkManagerProviderWrapperFilePath: + networkManagerProviderWrapperFilePath); + + _addSurveyFormConstantsToConstantsFile(constantsFilePath: constantsFilePath); + + _addSurveyFormMapperToUtilsFile(utilsFilePath: utilsFilePath); + + _formatFiles([ + homeFilePath, + syncDownFilePath, + entityMapperFilePath, + routerFilePath, + constantsFilePath, + utilsFilePath, + networkManagerProviderWrapperFilePath, + localizationDelegatesFilePath, + projectFilePath, + authenticatedFilePath, + contextUtilityFilePath, + appFilePath, + extensionFilePath + ]); +} + +void _formatFiles(List filePaths) { + for (var filePath in filePaths) { + Process.runSync('dart', ['format', filePath]); + print('Formatted $filePath'); + } +} + +void _updateExtensionFilePath(extensionFilePath){ + var importStatement = ''' + import 'package:survey_form/utils/utils.dart';'''; + + // Check if the extension.dart file exists + var extensionFile = File(extensionFilePath); + if (!extensionFile.existsSync()) { + print('Error: project file does not exist at path: $extensionFilePath'); + return; + } + + // Read the authenticated.dart file + var extensionFileContent = extensionFile.readAsStringSync(); + + // Check if the import statement already exists and add it if not + if (!extensionFileContent + .contains(importStatement.replaceAll(RegExp(r'\s'), ''))) { + extensionFileContent = importStatement + '\n' + extensionFileContent; + print('The import statement was added.'); + } else { + print('The import statement already exists.'); + } + + extensionFile.writeAsStringSync(extensionFileContent); +} + +void _updateAppFile(appFilePath) { + var importStatement = ''' + import 'package:survey_form/survey_form.dart';'''; + + var ServiceDefinitionRepository = '''serviceDefinitionRemoteRepository: ctx.read< + RemoteRepository>(), + serviceDefinitionLocalRepository: ctx.read< + LocalRepository>(),'''; + + // Check if the app.dart file exists + var appFile = File(appFilePath); + if (!appFile.existsSync()) { + print('Error: project file does not exist at path: $appFilePath'); + return; + } + + // Read the app.dart file + var appFileContent = appFile.readAsStringSync(); + + // Check if the import statement already exists and add it if not + if (!appFileContent + .contains(importStatement.replaceAll(RegExp(r'\s'), ''))) { + appFileContent = importStatement + '\n' + appFileContent; + print('The import statement was added.'); + } else { + print('The import statement already exists.'); + } + + // Check if the new cases already exist in the file + if (!appFileContent + .contains(ServiceDefinitionRepository.replaceAll(RegExp(r'\s'), ''))) { + // Find the position to insert the new cases (before the default case) + var caseInsertionIndex = appFileContent.indexOf('ProjectBloc('); + caseInsertionIndex += 'ProjectBloc('.length; + if (caseInsertionIndex != -1) { + appFileContent = + appFileContent.substring(0, caseInsertionIndex) + + ServiceDefinitionRepository + + '\n' + + appFileContent.substring(caseInsertionIndex); + print('The new cases were added.'); + + } else { + print('Error: Could not find the insertion point.'); + return; + } + } else { + print('The new cases already exist.'); + } + + appFile.writeAsStringSync(appFileContent); +} + +void _updateContextUtilityFile(String contextUtilityFilepath) { + var surveyFormBoundary = '''SurveyFormSingleton().setBoundary(boundary: selectedBoundary);'''; + + // Check if the context_utility.dart file exists + var contextUtilityFile = File(contextUtilityFilepath); + if (!contextUtilityFile.existsSync()) { + print('Error: Context Utility file does not exist at path: $contextUtilityFilepath'); + return; + } + + // Read the context_utility.dart file + var contextUtilityFileContent = contextUtilityFile.readAsStringSync(); + + // Insert the data to be added + contextUtilityFileContent = insertData(contextUtilityFileContent, + '// INFO: Set Boundary for packages', surveyFormBoundary); + + // Write the updated content back to the context_utility.dart file + contextUtilityFile.writeAsStringSync(contextUtilityFileContent); +} + +void _addauthenticatedFilePath(String authenticatedFilePath) { + var importStatement = ''' + import 'package:survey_form/survey_form.dart';'''; + + var providers = '''BlocProvider( + create: (_) => ServiceBloc( + const ServiceEmptyState(), + serviceDataRepository: context + .repository(), + ), + ),'''; + + // Check if the authenticated.dart file exists + var authenticatedFile = File(authenticatedFilePath); + if (!authenticatedFile.existsSync()) { + print('Error: project file does not exist at path: $authenticatedFilePath'); + return; + } + + // Read the authenticated.dart file + var authenticatedFileContent = authenticatedFile.readAsStringSync(); + + // Check if the import statement already exists and add it if not + if (!authenticatedFileContent + .contains(importStatement.replaceAll(RegExp(r'\s'), ''))) { + authenticatedFileContent = importStatement + '\n' + authenticatedFileContent; + print('The import statement was added.'); + } else { + print('The import statement already exists.'); + } + + // Check if the new cases already exist in the file + if (!authenticatedFileContent + .contains(providers.replaceAll(RegExp(r'\s'), ''))) { + // Find the position to insert the new cases (before the default case) + var caseInsertionIndex = authenticatedFileContent.indexOf('providers: ['); + caseInsertionIndex += 'providers: ['.length; + if (caseInsertionIndex != -1) { + authenticatedFileContent = + authenticatedFileContent.substring(0, caseInsertionIndex) + + providers + + '\n' + + authenticatedFileContent.substring(caseInsertionIndex); + print('The new cases were added.'); + + } else { + print('Error: Could not find the insertion point.'); + return; + } + } else { + print('The new cases already exist.'); + } + + authenticatedFile.writeAsStringSync(authenticatedFileContent); +} + +void _addprojectFilePath(String projectFilePath) { + var importStatement = ''' + import 'package:survey_form/survey_form.dart';'''; + + var ServicedefinitionRepo = '''/// Service Definition Repositories + final RemoteRepository + serviceDefinitionRemoteRepository; + final LocalRepository + serviceDefinitionLocalRepository;'''; + + var projectBloc = '''required this.serviceDefinitionRemoteRepository, + required this.serviceDefinitionLocalRepository,'''; + + var loadServicedefinition = '''FutureOr _loadServiceDefinition(List projects) async { + final configs = await isar.appConfigurations.where().findAll(); + final userObject = await localSecureStore.userRequestModel; + List codes = []; + for (UserRoleModel elements in userObject!.roles) { + configs.first.checklistTypes?.map((e) => e.code).forEach((element) { + for (final project in projects) { + codes.add( + '\${project.name}.\$element.\${elements.code.snakeCase.toUpperCase()}', + ); + } + }); + } + + final serviceDefinition = await serviceDefinitionRemoteRepository + .search(ServiceDefinitionSearchModel( + tenantId: envConfig.variables.tenantId, + code: codes, + )); + + for (var element in serviceDefinition) { + await serviceDefinitionLocalRepository.create( + element, + createOpLog: false, + ); + } + }'''; + + var loadfunctions = '''try { + await _loadServiceDefinition(projects); + } catch (_) { + emit( + state.copyWith( + loading: false, + syncError: ProjectSyncErrorType.serviceDefinitions, + ), + ); + } + try { + await _loadServiceDefinition(projects); + } catch (_) { + emit( + state.copyWith( + loading: false, + syncError: ProjectSyncErrorType.serviceDefinitions, + ), + ); + }'''; + + // Check if the project.dart file exists + var projectFile = File(projectFilePath); + if (!projectFile.existsSync()) { + print('Error: project file does not exist at path: $projectFilePath'); + return; + } + + // Read the project.dart file + var projectFileContent = projectFile.readAsStringSync(); + + // Check if the import statement already exists and add it if not + if (!projectFileContent + .contains(importStatement.replaceAll(RegExp(r'\s'), ''))) { + projectFileContent = importStatement + '\n' + projectFileContent; + print('The import statement was added.'); + } else { + print('The import statement already exists.'); + } + + // Check if the Service Definition repo already exist in the file + if (!projectFileContent + .contains(ServicedefinitionRepo.replaceAll(RegExp(r'\s'), ''))) { + // Find the position to insert the Service Definition Repo + var caseInsertionIndex = projectFileContent.indexOf('class ProjectBloc extends Bloc {'); + caseInsertionIndex += 'class ProjectBloc extends Bloc {'.length; + if (caseInsertionIndex != -1) { + projectFileContent = + projectFileContent.substring(0, caseInsertionIndex) + '\n' + + ServicedefinitionRepo + + '\n' + + projectFileContent.substring(caseInsertionIndex); + print('The Service Definition repo were added.'); + } else { + print('Error: Could not find the insertion point.'); + return; + } + } else { + print('The Service Definition Repo already exist.'); + } + + // Check if the Project Bloc already exist in the file + if (!projectFileContent + .contains(projectBloc.replaceAll(RegExp(r'\s'), ''))) { + // Find the position to insert the Project Bloc + var caseInsertionIndex = projectFileContent.indexOf('ProjectBloc({'); + caseInsertionIndex += 'ProjectBloc({'.length; + if (caseInsertionIndex != -1) { + projectFileContent = + projectFileContent.substring(0, caseInsertionIndex) + '\n' + + projectBloc + + '\n' + + projectFileContent.substring(caseInsertionIndex); + print('The Project Bloc were added.'); + } else { + print('Error: Could not find the insertion point.'); + return; + } + } else { + print('The Project Bloc already exist.'); + } + + // Check if the load service definition function already exist in the file + if (!projectFileContent + .contains(loadServicedefinition.replaceAll(RegExp(r'\s'), ''))) { + // Find the position to insert the load service definition function + var caseInsertionIndex = projectFileContent.indexOf('class ProjectBloc extends Bloc {'); + caseInsertionIndex += 'class ProjectBloc extends Bloc {'.length; + if (caseInsertionIndex != -1) { + projectFileContent = + projectFileContent.substring(0, caseInsertionIndex) + '\n' + + loadServicedefinition + + '\n' + + projectFileContent.substring(caseInsertionIndex); + print('The load service definition function were added.'); + } else { + print('Error: Could not find the insertion point.'); + return; + } + } else { + print('The load service definition function already exist.'); + } + + // Check if the load functions calling already exist in the file + if (!projectFileContent + .contains(loadfunctions.replaceAll(RegExp(r'\s'), ''))) { + // Find the position to insert the load function calling + var caseInsertionIndex = projectFileContent.indexOf('// INFO : Need to add project load functions'); + caseInsertionIndex += '// INFO : Need to add project load functions'.length; + if (caseInsertionIndex != -1) { + projectFileContent = + projectFileContent.substring(0, caseInsertionIndex) + '\n' + + loadfunctions + + '\n' + + projectFileContent.substring(caseInsertionIndex); + print('The load function calling were added.'); + } else { + print('Error: Could not find the insertion point.'); + return; + } + } else { + print('The load function calling already exist.'); + } + + // Write the updated content back to the project.dart file + projectFile.writeAsStringSync(projectFileContent); +} + +void _updateHome(String homeFilePath) { + var importStatement = ''' + import 'package:survey_form/survey_form.dart'; + import 'package:survey_form/router/survey_form_router.gm.dart'; + '''; + + var homeItemsData = ''' + i18.home.mySurveyForm: homeShowcaseData.supervisorMySurveyForm.buildWith( + child: HomeItemCard( + enableCustomIcon: true, + customIcon: mySurveyFormSvg, + icon: Icons.checklist, + label: i18.home.mySurveyForm, + onPressed: () => context.router.push(SurveyFormWrapperRoute()), + ), + ), + '''; + + var showCaseData = ''' + i18.home.mySurveyForm: homeShowcaseData.supervisorMySurveyForm.showcaseKey, + '''; + + var itemsLabel = ''' + i18.home.mySurveyForm, + '''; + + // Define the data to be added + var singletonData = ''' + SurveyFormSingleton().setInitialData( + projectId: context.projectId, + projectName: context.selectedProject.name, + loggedInIndividualId: context.loggedInIndividualId ?? '', + loggedInUserUuid: context.loggedInUserUuid, + appVersion: Constants().version, + isHealthFacilityWorker: context.loggedInUserRoles.where((role) => role.code == RolesType.healthFacilityWorker.toValue()).toList().isNotEmpty, + roles: context.read().state.maybeMap( + orElse: () => const Offstage(), + authenticated: (res) { + return res.userModel.roles + .map((e) => e.code.snakeCase.toUpperCase()) + .toList(); + }), + ); + '''; + + var localRepoData = ''' + context.read>(), + '''; + + var remoteRepoData = ''' + context.read>(), + '''; + + // Check if the home.dart file exists + var homeFile = File(homeFilePath); + if (!homeFile.existsSync()) { + print('Error: Home file does not exist at path: $homeFilePath'); + return; + } + + // Read the home.dart file + var homeFileContent = homeFile.readAsStringSync(); + + // Check if the import statement already exists and add it if not + if (!homeFileContent + .contains(importStatement.replaceAll(RegExp(r'\s'), ''))) { + homeFileContent = importStatement + '\n' + homeFileContent; + print('The import statement was added.'); + } else { + print('The import statement already exists.'); + } + + // Insert the data to be added + homeFileContent = insertData(homeFileContent, + '// INFO : Need to add singleton of package Here', singletonData); + homeFileContent = insertData(homeFileContent, + '// INFO : Need to add local repo of package Here', localRepoData); + homeFileContent = insertData(homeFileContent, + '// INFO : Need to add repo repo of package Here', remoteRepoData); + homeFileContent = insertData(homeFileContent, + '// INFO : Need to add home items of package Here', homeItemsData); + homeFileContent = insertData(homeFileContent, + '// INFO : Need to add showcase keys of package Here', showCaseData); + homeFileContent = insertData(homeFileContent, + '// INFO: Need to add items label of package Here', itemsLabel); + + // Write the updated content back to the home.dart file + homeFile.writeAsStringSync(homeFileContent); +} + +String insertData(String fileContent, String marker, String data) { + var markerIndex = fileContent.indexOf(marker); + if (markerIndex != -1) { + var endOfMarker = markerIndex + marker.length; + if (!fileContent.substring(endOfMarker).contains(data.trim())) { + fileContent = fileContent.substring(0, endOfMarker) + + '\n' + + data + + fileContent.substring(endOfMarker); + print('Data was added after marker: $marker'); + } else { + print('Data already exists after marker: $marker'); + } + } else { + print('Error: Could not find the marker: $marker'); + } + return fileContent; +} + +void _updateEntityMapperFile(String entityMapperFilePath) { + // Define the import statement and new case statements + var importStatement = + "import 'package:survey_form/survey_form.dart';"; + var newCases = ''' + case "service": + final entity = ServiceModelMapper.fromJson(entityString); + return entity; +'''; + + // Check if the entity_mapper file exists + var entityMapperFile = File(entityMapperFilePath); + + if (!entityMapperFile.existsSync()) { + print( + 'Error: Entity Mapper file does not exist at path: $entityMapperFilePath'); + return; + } + + // Read the entity_mapper file + var entityMapperFileContent = entityMapperFile.readAsStringSync(); + + // Check if the import statement already exists and add it if not + if (!entityMapperFileContent + .contains(importStatement.replaceAll(RegExp(r'\s'), ''))) { + entityMapperFileContent = importStatement + '\n' + entityMapperFileContent; + print('The import statement was added.'); + } else { + print('The import statement already exists.'); + } + + // Check if the new cases already exist in the file + if (!entityMapperFileContent + .contains('case "service":'.replaceAll(RegExp(r'\s'), ''))) { + // Find the position to insert the new cases (before the default case) + var caseInsertionIndex = entityMapperFileContent.indexOf('default:'); + if (caseInsertionIndex != -1) { + entityMapperFileContent = + entityMapperFileContent.substring(0, caseInsertionIndex) + + newCases + + '\n' + + entityMapperFileContent.substring(caseInsertionIndex); + print('The new cases were added.'); + + // Write the updated content back to the file + entityMapperFile.writeAsStringSync(entityMapperFileContent); + } else { + print('Error: Could not find the insertion point.'); + return; + } + } else { + print('The new cases already exist.'); + } +} + +void _addSurveyFormRoutesAndImportToRouterFile(String routerFilePath) { + // Define the SurveyForm route lines + var surveyFormRoutes = ''' + // SurveyForm Route + AutoRoute( + page: SurveyFormWrapperRoute.page, + path: 'surveyForm', + children: [ + AutoRoute( + page: SurveyformRoute.page, + path: '', + ), + AutoRoute( + page: SurveyFormBoundaryViewRoute.page, path: 'view-boundary'), + AutoRoute(page: SurveyFormViewRoute.page, path: 'view'), + AutoRoute(page: SurveyFormPreviewRoute.page, path: 'preview'), + AutoRoute(page: SurveyFormAcknowledgementRoute.page, path: 'surveyForm-acknowledgement'), + ]), + '''; + + // Define the import statement + var importStatement1 = + "import 'package:survey_form/router/survey_form_router.dart';"; + // Define the import statement + var importStatement2 = + "import 'package:survey_form/router/survey_form_router.gm.dart';"; + + // Check if the router file exists + var routerFile = File(routerFilePath); + + if (!routerFile.existsSync()) { + print('Error: Router file does not exist at path: $routerFilePath'); + return; + } + + // Read the router file + var routerFileContent = routerFile.readAsStringSync(); + + // Check if the import statement already exists + if (!routerFileContent + .contains(importStatement1.replaceAll(RegExp(r'\s'), ''))) { + // Add the import statement at the beginning of the file + routerFileContent = importStatement1 + '\n' + routerFileContent; + print('The import statement was added.'); + } else { + print('The import statement already exists.'); + } + + // Check if the import statement already exists + if (!routerFileContent + .contains(importStatement2.replaceAll(RegExp(r'\s'), ''))) { + // Add the import statement at the beginning of the file + routerFileContent = importStatement2 + '\n' + routerFileContent; + print('The import statement was added.'); + } else { + print('The import statement already exists.'); + } + // Check if the surveyFormRoute module already exists + if (!routerFileContent + .contains('SurveyFormRoute'.replaceAll(RegExp(r'\s'), ''))) { + // Find the position to insert the module + var moduleInsertionIndex = routerFileContent.indexOf('@AutoRouterConfig('); + if (moduleInsertionIndex != -1) { + var endOfModulesIndex = + routerFileContent.indexOf(']', moduleInsertionIndex); + if (endOfModulesIndex != -1) { + var modulesEndIndex = + routerFileContent.lastIndexOf(']', endOfModulesIndex); + routerFileContent = routerFileContent.substring(0, modulesEndIndex) + + 'SurveyFormRoute,' + + routerFileContent.substring(modulesEndIndex); + + // Write the updated content back to the project.dart file + routerFile.writeAsStringSync(routerFileContent); + print('The SurveyFormRoute module was added.'); + } else { + print('Error: Could not find the end of the modules list.'); + return; + } + } else { + print('Error: Could not find @AutoRouterConfig annotation.'); + return; + } + } else { + print('The SurveyFormRoute module already exists.'); + } + + // Check if the SurveyForm routes already exist in the file + if (!routerFileContent + .contains(surveyFormRoutes.replaceAll(RegExp(r'\s'), ''))) { + // Find the position to insert the routes + var insertionIndex = routerFileContent + .indexOf('// INFO : Need to add Router of package Here'); + if (insertionIndex != -1) { + routerFileContent = routerFileContent.substring(0, insertionIndex) + + '// INFO : Need to add Router of package Here\n' + + surveyFormRoutes + + routerFileContent.substring(insertionIndex + + '// INFO : Need to add Router of package Here'.length); + print('The surveyForm routes were added.'); + + } else { + print('Error: Could not find the insertion point.'); + return; + } + } else { + print('The surveyForm routes already exist.'); + } + // Write the updated content back to the file + routerFile.writeAsStringSync(routerFileContent); +} + +void _addSurveyFormMapperToUtilsFile({required String utilsFilePath}) { + // Define the surveyForm related lines + var surveyFormImportStatement = [ + '''import 'package:survey_form/survey_form.init.dart' + as surveyForm_mappers;''' + ]; + var surveyFormInitializationStatement = + "Future(() => surveyForm_mappers.initializeMappers()),"; + + // Check if the utils.dart file exists + var utilsFile = File(utilsFilePath); + + // Read the utils.dart file + var utilsFileContent = utilsFile.readAsStringSync(); + + // Normalize the whitespace in the file content + var normalizedFileContent = utilsFileContent.replaceAll(RegExp(r'\s'), ''); + + // Check if the import statement and delegate already exist in the file + // If not, add them to the file + if (!normalizedFileContent + .contains(surveyFormImportStatement[0].replaceAll(RegExp(r'\s'), ''))) { + var libraryIndex = utilsFileContent.indexOf('library app_utils;'); + if (libraryIndex != -1) { + var endOfLibrary = libraryIndex + + utilsFileContent.substring(libraryIndex).indexOf(';') + + 1; + utilsFileContent = utilsFileContent.substring(0, endOfLibrary + 1) + + '\n' + + surveyFormImportStatement[0] + + utilsFileContent.substring(endOfLibrary + 1); + print('The import statement was added.'); + } + } else { + print('The import statement already exists.'); + } + + if (!utilsFileContent.contains(surveyFormInitializationStatement)) { + // Add the surveyForm related initialization statement to the file + var initializeAllMappersIndex = + utilsFileContent.indexOf('initializeAllMappers() async {'); + if (initializeAllMappersIndex == -1) { + print( + 'Error: Could not find a place to insert the survey form initialization statement.'); + return; + } + var endOfInitializeAllMappers = initializeAllMappersIndex + + utilsFileContent.substring(initializeAllMappersIndex).indexOf(']') + + 1; + utilsFileContent = + utilsFileContent.substring(0, endOfInitializeAllMappers - 1) + + '\n ' + + surveyFormInitializationStatement + + utilsFileContent.substring(endOfInitializeAllMappers - 1); + + print('Survey Form initialization statement added to utils.dart'); + } else { + print('The Survey Form initialization statement already exists.'); + } + + // Write the updated content back to the utils.dart file + utilsFile.writeAsStringSync(utilsFileContent); +} + +void _addSurveyFormConstantsToConstantsFile( + {required String constantsFilePath}) { + // Define the import statements + var importStatements = [ + "import 'package:survey_form/survey_form.dart';", + ]; + + // Define the Survey Form configuration + var SurveyFormConfiguration = ''' +SurveyFormSingleton().setTenantId(envConfig.variables.tenantId); + '''; + + // Define the local and remote repositories + var localRepository = [ + ''' +ServiceDefinitionLocalRepository( + sql, + ServiceDefinitionOpLogManager(isar), + ), + ServiceLocalRepository( + sql, + ServiceOpLogManager(isar), + ), + ''' + ]; + + var remoteRepository = [ + ''' +if (value == DataModelType.serviceDefinition) + ServiceDefinitionRemoteRepository(dio, actionMap: actions), +if (value == DataModelType.service) + ServiceRemoteRepository(dio, actionMap: actions), + ''' + ]; + + // Check if the constants.dart file exists + var constantsFile = File(constantsFilePath); + if (!constantsFile.existsSync()) { + print('Error: The constants.dart file does not exist.'); + return; + } + + // Read the constants.dart file + var constantsFileContent = constantsFile.readAsStringSync(); + + // Normalize the whitespace in the file content and the Survey Form configuration + var normalizedFileContent = + constantsFileContent.replaceAll(RegExp(r'\s'), ''); + var normalizedSurveyFormConfiguration = + SurveyFormConfiguration.replaceAll(RegExp(r'\s'), ''); + + // Check if the import statements already exist in the file + for (var importStatement in importStatements) { + if (!normalizedFileContent + .contains(importStatement.replaceAll(RegExp(r'\s'), ''))) { + // Add the import statement at the top of the file + constantsFileContent = importStatement + '\n' + constantsFileContent; + print('The import statement was added: $importStatement'); + } + } + + // Check if the Survey Form configuration already exists in the file + // If not, add it to the file + if (!normalizedFileContent.contains(normalizedSurveyFormConfiguration)) { + // Find the setInitialDataOfPackages method and add the Survey Form configuration inside it + var setInitialDataOfPackagesIndex = + constantsFileContent.indexOf('void setInitialDataOfPackages() {'); + if (setInitialDataOfPackagesIndex != -1) { + var endOfSetInitialDataOfPackages = setInitialDataOfPackagesIndex + + constantsFileContent + .substring(setInitialDataOfPackagesIndex) + .indexOf('}') + + 1; + constantsFileContent = + constantsFileContent.substring(0, endOfSetInitialDataOfPackages - 1) + + '\n $SurveyFormConfiguration' + + constantsFileContent.substring(endOfSetInitialDataOfPackages - 1); + print('The Survey Form configuration was added.'); + } + } + + // Add the local and remote repositories to the getLocalRepositories and getRemoteRepositories methods + var getLocalRepositoriesIndex = + constantsFileContent.indexOf('getLocalRepositories('); + if (getLocalRepositoriesIndex != -1) { + var endOfGetLocalRepositories = getLocalRepositoriesIndex + + constantsFileContent.substring(getLocalRepositoriesIndex).indexOf(']') + + 1; + constantsFileContent = + constantsFileContent.substring(0, endOfGetLocalRepositories - 1) + + '\n' + + localRepository.join('\n') + + constantsFileContent.substring(endOfGetLocalRepositories - 1); + print('The local repositories were added.'); + } + + var getRemoteRepositoriesIndex = + constantsFileContent.indexOf('getRemoteRepositories('); + if (getRemoteRepositoriesIndex != -1) { + var endOfGetRemoteRepositories = getRemoteRepositoriesIndex + + constantsFileContent + .substring(getRemoteRepositoriesIndex) + .indexOf('addAll(') + + 'addAll('.length; + var endOfAddAll = constantsFileContent + .substring(endOfGetRemoteRepositories) + .indexOf(']') + + endOfGetRemoteRepositories; + constantsFileContent = constantsFileContent.substring(0, endOfAddAll) + + remoteRepository.join('\n') + + constantsFileContent.substring(endOfAddAll); + print('The remote repositories were added.'); + } + + // Write the updated content back to the constants.dart file + constantsFile.writeAsStringSync(constantsFileContent); +} + +void _addRepoToNetworkManagerProviderWrapper( + {required String networkManagerProviderWrapperFilePath}) { + // Define the import statements and repository providers + var importStatements = [ + "import 'package:survey_form/survey_form.dart';", + ]; + var localRepositories = [ + '''RepositoryProvider< + LocalRepository>( + create: (_) => ServiceDefinitionLocalRepository( + sql, + ServiceDefinitionOpLogManager( + isar, + ), + ), + ), + RepositoryProvider>( + create: (_) => ServiceLocalRepository( + sql, + ServiceOpLogManager(isar), + ), + )''' + ]; + +// Define the remote repositories of Survey Form + var remoteRepositoriesOfSurveyForm = [ + '''if (value == DataModelType.service) + RepositoryProvider< + RemoteRepository>( + create: (_) => ServiceRemoteRepository( + dio, + actionMap: actions, + ), + ), + if (value == DataModelType.serviceDefinition) + RepositoryProvider< + RemoteRepository>( + create: (_) => ServiceDefinitionRemoteRepository( + dio, + actionMap: actions, + ), + )''' + ]; + +// Read the network_manager_provider_wrapper.dart file + var networkManagerProviderWrapperFile = + File(networkManagerProviderWrapperFilePath); + var networkManagerProviderWrapperFileContent = + networkManagerProviderWrapperFile.readAsStringSync(); + +// Find the last import statement in the file + var lastImportIndex = networkManagerProviderWrapperFileContent + .lastIndexOf(RegExp(r'import .+;')); + + if (lastImportIndex != -1) { + var endOfLastImport = lastImportIndex + + networkManagerProviderWrapperFileContent + .substring(lastImportIndex) + .indexOf(';') + + 1; + + // Check if the import statements already exist in the file + for (var importStatement in importStatements) { + if (!networkManagerProviderWrapperFileContent + .contains(importStatement.replaceAll(RegExp(r'\s'), ''))) { + // Add the import statement after the last import + networkManagerProviderWrapperFileContent = + networkManagerProviderWrapperFileContent.substring( + 0, endOfLastImport) + + '\n' + + importStatement + + networkManagerProviderWrapperFileContent + .substring(endOfLastImport); + endOfLastImport += importStatement.length + 1; + print('The import statement was added: $importStatement'); + } else { + print('The import statement already exists.'); + } + } + + // Normalize the whitespace in the file content and the remote repository of Survey Form + var normalizedFileContent = + networkManagerProviderWrapperFileContent.replaceAll(RegExp(r'\s'), ''); + +// Check if the local repository providers already exist in the file + for (var repositoryProvider in localRepositories) { + var normalizedLocalRepositoryOfSurveyForm = + repositoryProvider.replaceAll(RegExp(r'\s'), ''); + + if (!normalizedFileContent + .contains(normalizedLocalRepositoryOfSurveyForm)) { + // Add the local repository provider to the file + networkManagerProviderWrapperFileContent = + networkManagerProviderWrapperFileContent.replaceFirst( + '];', ' $repositoryProvider\n];'); + print('The local repository provider was added: $repositoryProvider'); + } else { + print('The local repository provider already exists.'); + } + } + +// Check if the remote repository of Survey Form already exists in the file + for (var remoteRepositoryOfSurveyForm + in remoteRepositoriesOfSurveyForm) { + var normalizedRemoteRepositoryOfSurveyForm = + remoteRepositoryOfSurveyForm.replaceAll(RegExp(r'\s'), ''); + + if (!normalizedFileContent + .contains(normalizedRemoteRepositoryOfSurveyForm)) { + // Add the remote repository of Survey Form to the _getRemoteRepositories method + var replacementString = + networkManagerProviderWrapperFileContent.contains(']);') + ? ' $remoteRepositoryOfSurveyForm,\n]);' + : ' $remoteRepositoryOfSurveyForm\n]);'; + networkManagerProviderWrapperFileContent = + networkManagerProviderWrapperFileContent.replaceFirst( + ']);', replacementString); + print( + 'The remote repository of Survey Form was added: $remoteRepositoryOfSurveyForm'); + } else { + print('The remote repository of Survey Form already exists.'); + } + } + + // Write the updated content back to the file + networkManagerProviderWrapperFile + .writeAsStringSync(networkManagerProviderWrapperFileContent); + } +} + +void _createLocalizationDelegatesFile(String localizationDelegatesFilePath) { + // Define the import statement and delegate for localization + var importStatement = + "import 'package:survey_form/blocs/app_localization.dart' as surveyForm_localization;"; + var delegate = + '''surveyForm_localization.SurveyFormLocalization.getDelegate( + LocalizationLocalRepository().returnLocalizationFromSQL(sql) as Future, + appConfig.languages!, + ),'''; + + // Read the localization delegates file + var localizationDelegatesFile = File(localizationDelegatesFilePath); + var localizationDelegatesFileContent = + localizationDelegatesFile.readAsStringSync(); + + var normalizedFileContent = + localizationDelegatesFileContent.replaceAll(RegExp(r'\s'), ''); + + // Check if the import statement and delegate already exist in the file + // If not, add them to the file + if (!normalizedFileContent + .contains(importStatement.replaceAll(RegExp(r'\s'), ''))) { + localizationDelegatesFileContent = + '$importStatement\n$localizationDelegatesFileContent'; + print('The import statement was added.'); + } + + if (!normalizedFileContent.contains(delegate.replaceAll(RegExp(r'\s'), ''))) { + var lastDelegateIndex = + localizationDelegatesFileContent.lastIndexOf(RegExp(r',')); + if (lastDelegateIndex != -1) { + localizationDelegatesFileContent = + localizationDelegatesFileContent.substring(0, lastDelegateIndex + 1) + + '\n $delegate' + + localizationDelegatesFileContent.substring(lastDelegateIndex + 1); + print('The delegate was added.'); + } + } + + // Write the updated content back to the file + localizationDelegatesFile.writeAsStringSync(localizationDelegatesFileContent); +}