11
BLOCKERS.md
11
BLOCKERS.md
@@ -36,3 +36,14 @@
|
|||||||
- https://github.com/Oloodi/krow-workforce/issues/240
|
- https://github.com/Oloodi/krow-workforce/issues/240
|
||||||
### Deveations:
|
### Deveations:
|
||||||
- In the web prototype, when creating an order, position role rates are displayed based on the selected vendor. This behavior was missing in the mobile prototype. Therefore, we added a dropdown to select the vendor and display the corresponding role rates based on that selection.
|
- In the web prototype, when creating an order, position role rates are displayed based on the selected vendor. This behavior was missing in the mobile prototype. Therefore, we added a dropdown to select the vendor and display the corresponding role rates based on that selection.
|
||||||
|
|
||||||
|
# Points to considerate in the future
|
||||||
|
- client APP:
|
||||||
|
- Billing need to download a pdf of their invoice.
|
||||||
|
- On app launch, check whether there is an active session. If a valid session exists, skip the auth flow and navigate directly to Home, loading business account.
|
||||||
|
- Add an expiration time (TTL) to the session (store expiresAt / expiryTimestamp) and invalidate/clear the session when it has expired.
|
||||||
|
- Rapid order need IA to work, I think we need also to add a form as the webpage.
|
||||||
|
- Staff APP:
|
||||||
|
- On app launch, check whether there is an active session. If a valid session exists, skip the auth flow and navigate directly to Home, loading Staff account.
|
||||||
|
- Add an expiration time (TTL) to the session (store expiresAt / expiryTimestamp) and invalidate/clear the session when it has expired.
|
||||||
|
- For staffs Skills = Roles? thinking in the future for the smart assigned that need to know the roles of staff to assign.
|
||||||
@@ -1,11 +1,13 @@
|
|||||||
// This is a generated file; do not edit or check into version control.
|
// This is a generated file; do not edit or check into version control.
|
||||||
FLUTTER_ROOT=/Users/achinthaisuru/Documents/flutter
|
FLUTTER_ROOT=/Users/josesalazar/flutter
|
||||||
FLUTTER_APPLICATION_PATH=/Users/achinthaisuru/Documents/Github/krow-workforce/apps/mobile/apps/client
|
FLUTTER_APPLICATION_PATH=/Users/josesalazar/Documents/DEV/krow-workforce/apps/mobile/apps/client
|
||||||
COCOAPODS_PARALLEL_CODE_SIGN=true
|
COCOAPODS_PARALLEL_CODE_SIGN=true
|
||||||
|
FLUTTER_TARGET=/Users/josesalazar/Documents/DEV/krow-workforce/apps/mobile/apps/client/lib/main.dart
|
||||||
FLUTTER_BUILD_DIR=build
|
FLUTTER_BUILD_DIR=build
|
||||||
FLUTTER_BUILD_NAME=1.0.0
|
FLUTTER_BUILD_NAME=1.0.0
|
||||||
FLUTTER_BUILD_NUMBER=1
|
FLUTTER_BUILD_NUMBER=1
|
||||||
|
DART_DEFINES=RkxVVFRFUl9WRVJTSU9OPTMuMzguNw==,RkxVVFRFUl9DSEFOTkVMPXN0YWJsZQ==,RkxVVFRFUl9HSVRfVVJMPWh0dHBzOi8vZ2l0aHViLmNvbS9mbHV0dGVyL2ZsdXR0ZXIuZ2l0,RkxVVFRFUl9GUkFNRVdPUktfUkVWSVNJT049M2I2MmVmYzJhMw==,RkxVVFRFUl9FTkdJTkVfUkVWSVNJT049NzhmYzMwMTJlNA==,RkxVVFRFUl9EQVJUX1ZFUlNJT049My4xMC43
|
||||||
DART_OBFUSCATION=false
|
DART_OBFUSCATION=false
|
||||||
TRACK_WIDGET_CREATION=true
|
TRACK_WIDGET_CREATION=true
|
||||||
TREE_SHAKE_ICONS=false
|
TREE_SHAKE_ICONS=false
|
||||||
PACKAGE_CONFIG=.dart_tool/package_config.json
|
PACKAGE_CONFIG=/Users/josesalazar/Documents/DEV/krow-workforce/apps/mobile/.dart_tool/package_config.json
|
||||||
|
|||||||
@@ -1,12 +1,14 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# This is a generated file; do not edit or check into version control.
|
# This is a generated file; do not edit or check into version control.
|
||||||
export "FLUTTER_ROOT=/Users/achinthaisuru/Documents/flutter"
|
export "FLUTTER_ROOT=/Users/josesalazar/flutter"
|
||||||
export "FLUTTER_APPLICATION_PATH=/Users/achinthaisuru/Documents/Github/krow-workforce/apps/mobile/apps/client"
|
export "FLUTTER_APPLICATION_PATH=/Users/josesalazar/Documents/DEV/krow-workforce/apps/mobile/apps/client"
|
||||||
export "COCOAPODS_PARALLEL_CODE_SIGN=true"
|
export "COCOAPODS_PARALLEL_CODE_SIGN=true"
|
||||||
|
export "FLUTTER_TARGET=/Users/josesalazar/Documents/DEV/krow-workforce/apps/mobile/apps/client/lib/main.dart"
|
||||||
export "FLUTTER_BUILD_DIR=build"
|
export "FLUTTER_BUILD_DIR=build"
|
||||||
export "FLUTTER_BUILD_NAME=1.0.0"
|
export "FLUTTER_BUILD_NAME=1.0.0"
|
||||||
export "FLUTTER_BUILD_NUMBER=1"
|
export "FLUTTER_BUILD_NUMBER=1"
|
||||||
|
export "DART_DEFINES=RkxVVFRFUl9WRVJTSU9OPTMuMzguNw==,RkxVVFRFUl9DSEFOTkVMPXN0YWJsZQ==,RkxVVFRFUl9HSVRfVVJMPWh0dHBzOi8vZ2l0aHViLmNvbS9mbHV0dGVyL2ZsdXR0ZXIuZ2l0,RkxVVFRFUl9GUkFNRVdPUktfUkVWSVNJT049M2I2MmVmYzJhMw==,RkxVVFRFUl9FTkdJTkVfUkVWSVNJT049NzhmYzMwMTJlNA==,RkxVVFRFUl9EQVJUX1ZFUlNJT049My4xMC43"
|
||||||
export "DART_OBFUSCATION=false"
|
export "DART_OBFUSCATION=false"
|
||||||
export "TRACK_WIDGET_CREATION=true"
|
export "TRACK_WIDGET_CREATION=true"
|
||||||
export "TREE_SHAKE_ICONS=false"
|
export "TREE_SHAKE_ICONS=false"
|
||||||
export "PACKAGE_CONFIG=.dart_tool/package_config.json"
|
export "PACKAGE_CONFIG=/Users/josesalazar/Documents/DEV/krow-workforce/apps/mobile/.dart_tool/package_config.json"
|
||||||
|
|||||||
144
apps/mobile/apps/client/macos/Podfile.lock
Normal file
144
apps/mobile/apps/client/macos/Podfile.lock
Normal file
@@ -0,0 +1,144 @@
|
|||||||
|
PODS:
|
||||||
|
- AppCheckCore (11.2.0):
|
||||||
|
- GoogleUtilities/Environment (~> 8.0)
|
||||||
|
- GoogleUtilities/UserDefaults (~> 8.0)
|
||||||
|
- PromisesObjC (~> 2.4)
|
||||||
|
- Firebase/AppCheck (12.8.0):
|
||||||
|
- Firebase/CoreOnly
|
||||||
|
- FirebaseAppCheck (~> 12.8.0)
|
||||||
|
- Firebase/Auth (12.8.0):
|
||||||
|
- Firebase/CoreOnly
|
||||||
|
- FirebaseAuth (~> 12.8.0)
|
||||||
|
- Firebase/CoreOnly (12.8.0):
|
||||||
|
- FirebaseCore (~> 12.8.0)
|
||||||
|
- firebase_app_check (0.4.1-4):
|
||||||
|
- Firebase/AppCheck (~> 12.8.0)
|
||||||
|
- Firebase/CoreOnly (~> 12.8.0)
|
||||||
|
- firebase_core
|
||||||
|
- FlutterMacOS
|
||||||
|
- firebase_auth (6.1.4):
|
||||||
|
- Firebase/Auth (~> 12.8.0)
|
||||||
|
- Firebase/CoreOnly (~> 12.8.0)
|
||||||
|
- firebase_core
|
||||||
|
- FlutterMacOS
|
||||||
|
- firebase_core (4.4.0):
|
||||||
|
- Firebase/CoreOnly (~> 12.8.0)
|
||||||
|
- FlutterMacOS
|
||||||
|
- FirebaseAppCheck (12.8.0):
|
||||||
|
- AppCheckCore (~> 11.0)
|
||||||
|
- FirebaseAppCheckInterop (~> 12.8.0)
|
||||||
|
- FirebaseCore (~> 12.8.0)
|
||||||
|
- GoogleUtilities/Environment (~> 8.1)
|
||||||
|
- GoogleUtilities/UserDefaults (~> 8.1)
|
||||||
|
- FirebaseAppCheckInterop (12.8.0)
|
||||||
|
- FirebaseAuth (12.8.0):
|
||||||
|
- FirebaseAppCheckInterop (~> 12.8.0)
|
||||||
|
- FirebaseAuthInterop (~> 12.8.0)
|
||||||
|
- FirebaseCore (~> 12.8.0)
|
||||||
|
- FirebaseCoreExtension (~> 12.8.0)
|
||||||
|
- GoogleUtilities/AppDelegateSwizzler (~> 8.1)
|
||||||
|
- GoogleUtilities/Environment (~> 8.1)
|
||||||
|
- GTMSessionFetcher/Core (< 6.0, >= 3.4)
|
||||||
|
- RecaptchaInterop (~> 101.0)
|
||||||
|
- FirebaseAuthInterop (12.8.0)
|
||||||
|
- FirebaseCore (12.8.0):
|
||||||
|
- FirebaseCoreInternal (~> 12.8.0)
|
||||||
|
- GoogleUtilities/Environment (~> 8.1)
|
||||||
|
- GoogleUtilities/Logger (~> 8.1)
|
||||||
|
- FirebaseCoreExtension (12.8.0):
|
||||||
|
- FirebaseCore (~> 12.8.0)
|
||||||
|
- FirebaseCoreInternal (12.8.0):
|
||||||
|
- "GoogleUtilities/NSData+zlib (~> 8.1)"
|
||||||
|
- FlutterMacOS (1.0.0)
|
||||||
|
- GoogleUtilities/AppDelegateSwizzler (8.1.0):
|
||||||
|
- GoogleUtilities/Environment
|
||||||
|
- GoogleUtilities/Logger
|
||||||
|
- GoogleUtilities/Network
|
||||||
|
- GoogleUtilities/Privacy
|
||||||
|
- GoogleUtilities/Environment (8.1.0):
|
||||||
|
- GoogleUtilities/Privacy
|
||||||
|
- GoogleUtilities/Logger (8.1.0):
|
||||||
|
- GoogleUtilities/Environment
|
||||||
|
- GoogleUtilities/Privacy
|
||||||
|
- GoogleUtilities/Network (8.1.0):
|
||||||
|
- GoogleUtilities/Logger
|
||||||
|
- "GoogleUtilities/NSData+zlib"
|
||||||
|
- GoogleUtilities/Privacy
|
||||||
|
- GoogleUtilities/Reachability
|
||||||
|
- "GoogleUtilities/NSData+zlib (8.1.0)":
|
||||||
|
- GoogleUtilities/Privacy
|
||||||
|
- GoogleUtilities/Privacy (8.1.0)
|
||||||
|
- GoogleUtilities/Reachability (8.1.0):
|
||||||
|
- GoogleUtilities/Logger
|
||||||
|
- GoogleUtilities/Privacy
|
||||||
|
- GoogleUtilities/UserDefaults (8.1.0):
|
||||||
|
- GoogleUtilities/Logger
|
||||||
|
- GoogleUtilities/Privacy
|
||||||
|
- GTMSessionFetcher/Core (5.0.0)
|
||||||
|
- PromisesObjC (2.4.0)
|
||||||
|
- shared_preferences_foundation (0.0.1):
|
||||||
|
- Flutter
|
||||||
|
- FlutterMacOS
|
||||||
|
- url_launcher_macos (0.0.1):
|
||||||
|
- FlutterMacOS
|
||||||
|
|
||||||
|
DEPENDENCIES:
|
||||||
|
- firebase_app_check (from `Flutter/ephemeral/.symlinks/plugins/firebase_app_check/macos`)
|
||||||
|
- firebase_auth (from `Flutter/ephemeral/.symlinks/plugins/firebase_auth/macos`)
|
||||||
|
- firebase_core (from `Flutter/ephemeral/.symlinks/plugins/firebase_core/macos`)
|
||||||
|
- FlutterMacOS (from `Flutter/ephemeral`)
|
||||||
|
- shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin`)
|
||||||
|
- url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`)
|
||||||
|
|
||||||
|
SPEC REPOS:
|
||||||
|
trunk:
|
||||||
|
- AppCheckCore
|
||||||
|
- Firebase
|
||||||
|
- FirebaseAppCheck
|
||||||
|
- FirebaseAppCheckInterop
|
||||||
|
- FirebaseAuth
|
||||||
|
- FirebaseAuthInterop
|
||||||
|
- FirebaseCore
|
||||||
|
- FirebaseCoreExtension
|
||||||
|
- FirebaseCoreInternal
|
||||||
|
- GoogleUtilities
|
||||||
|
- GTMSessionFetcher
|
||||||
|
- PromisesObjC
|
||||||
|
|
||||||
|
EXTERNAL SOURCES:
|
||||||
|
firebase_app_check:
|
||||||
|
:path: Flutter/ephemeral/.symlinks/plugins/firebase_app_check/macos
|
||||||
|
firebase_auth:
|
||||||
|
:path: Flutter/ephemeral/.symlinks/plugins/firebase_auth/macos
|
||||||
|
firebase_core:
|
||||||
|
:path: Flutter/ephemeral/.symlinks/plugins/firebase_core/macos
|
||||||
|
FlutterMacOS:
|
||||||
|
:path: Flutter/ephemeral
|
||||||
|
shared_preferences_foundation:
|
||||||
|
:path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin
|
||||||
|
url_launcher_macos:
|
||||||
|
:path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos
|
||||||
|
|
||||||
|
SPEC CHECKSUMS:
|
||||||
|
AppCheckCore: cc8fd0a3a230ddd401f326489c99990b013f0c4f
|
||||||
|
Firebase: 9a58fdbc9d8655ed7b79a19cf9690bb007d3d46d
|
||||||
|
firebase_app_check: daf97f2d7044e28b68d23bc90e16751acee09732
|
||||||
|
firebase_auth: 2c2438e41f061c03bd67dcb045dfd7bc843b5f52
|
||||||
|
firebase_core: b1697fb64ff2b9ca16baaa821205f8b0c058e5d2
|
||||||
|
FirebaseAppCheck: 11da425929a45c677d537adfff3520ccd57c1690
|
||||||
|
FirebaseAppCheckInterop: ba3dc604a89815379e61ec2365101608d365cf7d
|
||||||
|
FirebaseAuth: 4c289b1a43f5955283244a55cf6bd616de344be5
|
||||||
|
FirebaseAuthInterop: 95363fe96493cb4f106656666a0768b420cba090
|
||||||
|
FirebaseCore: 0dbad74bda10b8fb9ca34ad8f375fb9dd3ebef7c
|
||||||
|
FirebaseCoreExtension: 6605938d51f765d8b18bfcafd2085276a252bee2
|
||||||
|
FirebaseCoreInternal: fe5fa466aeb314787093a7dce9f0beeaad5a2a21
|
||||||
|
FlutterMacOS: d0db08ddef1a9af05a5ec4b724367152bb0500b1
|
||||||
|
GoogleUtilities: 00c88b9a86066ef77f0da2fab05f65d7768ed8e1
|
||||||
|
GTMSessionFetcher: 02d6e866e90bc236f48a703a041dfe43e6221a29
|
||||||
|
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
|
||||||
|
shared_preferences_foundation: 7036424c3d8ec98dfe75ff1667cb0cd531ec82bb
|
||||||
|
url_launcher_macos: f87a979182d112f911de6820aefddaf56ee9fbfd
|
||||||
|
|
||||||
|
PODFILE CHECKSUM: 54d867c82ac51cbd61b565781b9fada492027009
|
||||||
|
|
||||||
|
COCOAPODS: 1.16.2
|
||||||
@@ -21,12 +21,14 @@
|
|||||||
/* End PBXAggregateTarget section */
|
/* End PBXAggregateTarget section */
|
||||||
|
|
||||||
/* Begin PBXBuildFile section */
|
/* Begin PBXBuildFile section */
|
||||||
|
0F4B527ECDE4F2B2C670C976 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E7312AB7BD5F6DDA3D35C363 /* Pods_RunnerTests.framework */; };
|
||||||
331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C80D7294CF71000263BE5 /* RunnerTests.swift */; };
|
331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C80D7294CF71000263BE5 /* RunnerTests.swift */; };
|
||||||
335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; };
|
335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; };
|
||||||
33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; };
|
33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; };
|
||||||
33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; };
|
33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; };
|
||||||
33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; };
|
33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; };
|
||||||
33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; };
|
33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; };
|
||||||
|
9DB7E3A540BFA4257A1E28F2 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 37067E162A87D9CF2CE23CE4 /* Pods_Runner.framework */; };
|
||||||
/* End PBXBuildFile section */
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
/* Begin PBXContainerItemProxy section */
|
/* Begin PBXContainerItemProxy section */
|
||||||
@@ -60,11 +62,12 @@
|
|||||||
/* End PBXCopyFilesBuildPhase section */
|
/* End PBXCopyFilesBuildPhase section */
|
||||||
|
|
||||||
/* Begin PBXFileReference section */
|
/* Begin PBXFileReference section */
|
||||||
|
3235450CFBBC51513BBB882F /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
|
||||||
331C80D5294CF71000263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
331C80D5294CF71000263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };
|
331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };
|
||||||
333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = "<group>"; };
|
333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = "<group>"; };
|
||||||
335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = "<group>"; };
|
335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = "<group>"; };
|
||||||
33CC10ED2044A3C60003C045 /* krow_client.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "krow_client.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
33CC10ED2044A3C60003C045 /* krow_client.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = krow_client.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||||
33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = "<group>"; };
|
33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = "<group>"; };
|
||||||
33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; };
|
33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; };
|
||||||
@@ -76,8 +79,15 @@
|
|||||||
33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = "<group>"; };
|
33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = "<group>"; };
|
||||||
33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = "<group>"; };
|
33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = "<group>"; };
|
||||||
33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = "<group>"; };
|
33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = "<group>"; };
|
||||||
|
37067E162A87D9CF2CE23CE4 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
|
52BFCC2D82C3A8048E275DF3 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = "<group>"; };
|
||||||
|
54AD243DC5A5AF26694848AC /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = "<group>"; };
|
||||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = "<group>"; };
|
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = "<group>"; };
|
||||||
|
8E21FE29E642AD2A9B5E46C9 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
|
||||||
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = "<group>"; };
|
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = "<group>"; };
|
||||||
|
E0E474066D036677DFE3795B /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
|
||||||
|
E7312AB7BD5F6DDA3D35C363 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
|
FF54856CCC3D0D2B521DE3D2 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = "<group>"; };
|
||||||
/* End PBXFileReference section */
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
/* Begin PBXFrameworksBuildPhase section */
|
/* Begin PBXFrameworksBuildPhase section */
|
||||||
@@ -85,6 +95,7 @@
|
|||||||
isa = PBXFrameworksBuildPhase;
|
isa = PBXFrameworksBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
|
0F4B527ECDE4F2B2C670C976 /* Pods_RunnerTests.framework in Frameworks */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
@@ -92,6 +103,7 @@
|
|||||||
isa = PBXFrameworksBuildPhase;
|
isa = PBXFrameworksBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
|
9DB7E3A540BFA4257A1E28F2 /* Pods_Runner.framework in Frameworks */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
@@ -125,6 +137,7 @@
|
|||||||
331C80D6294CF71000263BE5 /* RunnerTests */,
|
331C80D6294CF71000263BE5 /* RunnerTests */,
|
||||||
33CC10EE2044A3C60003C045 /* Products */,
|
33CC10EE2044A3C60003C045 /* Products */,
|
||||||
D73912EC22F37F3D000D13A0 /* Frameworks */,
|
D73912EC22F37F3D000D13A0 /* Frameworks */,
|
||||||
|
F114226C38150965DB02851D /* Pods */,
|
||||||
);
|
);
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
@@ -175,10 +188,26 @@
|
|||||||
D73912EC22F37F3D000D13A0 /* Frameworks */ = {
|
D73912EC22F37F3D000D13A0 /* Frameworks */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
37067E162A87D9CF2CE23CE4 /* Pods_Runner.framework */,
|
||||||
|
E7312AB7BD5F6DDA3D35C363 /* Pods_RunnerTests.framework */,
|
||||||
);
|
);
|
||||||
name = Frameworks;
|
name = Frameworks;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
|
F114226C38150965DB02851D /* Pods */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
8E21FE29E642AD2A9B5E46C9 /* Pods-Runner.debug.xcconfig */,
|
||||||
|
E0E474066D036677DFE3795B /* Pods-Runner.release.xcconfig */,
|
||||||
|
3235450CFBBC51513BBB882F /* Pods-Runner.profile.xcconfig */,
|
||||||
|
FF54856CCC3D0D2B521DE3D2 /* Pods-RunnerTests.debug.xcconfig */,
|
||||||
|
54AD243DC5A5AF26694848AC /* Pods-RunnerTests.release.xcconfig */,
|
||||||
|
52BFCC2D82C3A8048E275DF3 /* Pods-RunnerTests.profile.xcconfig */,
|
||||||
|
);
|
||||||
|
name = Pods;
|
||||||
|
path = Pods;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
/* End PBXGroup section */
|
/* End PBXGroup section */
|
||||||
|
|
||||||
/* Begin PBXNativeTarget section */
|
/* Begin PBXNativeTarget section */
|
||||||
@@ -186,6 +215,7 @@
|
|||||||
isa = PBXNativeTarget;
|
isa = PBXNativeTarget;
|
||||||
buildConfigurationList = 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
|
buildConfigurationList = 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
|
||||||
buildPhases = (
|
buildPhases = (
|
||||||
|
1F1C8C8AD94BD1FFF3970EA2 /* [CP] Check Pods Manifest.lock */,
|
||||||
331C80D1294CF70F00263BE5 /* Sources */,
|
331C80D1294CF70F00263BE5 /* Sources */,
|
||||||
331C80D2294CF70F00263BE5 /* Frameworks */,
|
331C80D2294CF70F00263BE5 /* Frameworks */,
|
||||||
331C80D3294CF70F00263BE5 /* Resources */,
|
331C80D3294CF70F00263BE5 /* Resources */,
|
||||||
@@ -204,11 +234,13 @@
|
|||||||
isa = PBXNativeTarget;
|
isa = PBXNativeTarget;
|
||||||
buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */;
|
buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */;
|
||||||
buildPhases = (
|
buildPhases = (
|
||||||
|
13A75D879CCA17A67E27F169 /* [CP] Check Pods Manifest.lock */,
|
||||||
33CC10E92044A3C60003C045 /* Sources */,
|
33CC10E92044A3C60003C045 /* Sources */,
|
||||||
33CC10EA2044A3C60003C045 /* Frameworks */,
|
33CC10EA2044A3C60003C045 /* Frameworks */,
|
||||||
33CC10EB2044A3C60003C045 /* Resources */,
|
33CC10EB2044A3C60003C045 /* Resources */,
|
||||||
33CC110E2044A8840003C045 /* Bundle Framework */,
|
33CC110E2044A8840003C045 /* Bundle Framework */,
|
||||||
3399D490228B24CF009A79C7 /* ShellScript */,
|
3399D490228B24CF009A79C7 /* ShellScript */,
|
||||||
|
D0A48B88512859849D0E92D6 /* [CP] Embed Pods Frameworks */,
|
||||||
);
|
);
|
||||||
buildRules = (
|
buildRules = (
|
||||||
);
|
);
|
||||||
@@ -291,6 +323,50 @@
|
|||||||
/* End PBXResourcesBuildPhase section */
|
/* End PBXResourcesBuildPhase section */
|
||||||
|
|
||||||
/* Begin PBXShellScriptBuildPhase section */
|
/* Begin PBXShellScriptBuildPhase section */
|
||||||
|
13A75D879CCA17A67E27F169 /* [CP] Check Pods Manifest.lock */ = {
|
||||||
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
inputFileListPaths = (
|
||||||
|
);
|
||||||
|
inputPaths = (
|
||||||
|
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||||
|
"${PODS_ROOT}/Manifest.lock",
|
||||||
|
);
|
||||||
|
name = "[CP] Check Pods Manifest.lock";
|
||||||
|
outputFileListPaths = (
|
||||||
|
);
|
||||||
|
outputPaths = (
|
||||||
|
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
shellPath = /bin/sh;
|
||||||
|
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||||
|
showEnvVarsInLog = 0;
|
||||||
|
};
|
||||||
|
1F1C8C8AD94BD1FFF3970EA2 /* [CP] Check Pods Manifest.lock */ = {
|
||||||
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
inputFileListPaths = (
|
||||||
|
);
|
||||||
|
inputPaths = (
|
||||||
|
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||||
|
"${PODS_ROOT}/Manifest.lock",
|
||||||
|
);
|
||||||
|
name = "[CP] Check Pods Manifest.lock";
|
||||||
|
outputFileListPaths = (
|
||||||
|
);
|
||||||
|
outputPaths = (
|
||||||
|
"$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt",
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
shellPath = /bin/sh;
|
||||||
|
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||||
|
showEnvVarsInLog = 0;
|
||||||
|
};
|
||||||
3399D490228B24CF009A79C7 /* ShellScript */ = {
|
3399D490228B24CF009A79C7 /* ShellScript */ = {
|
||||||
isa = PBXShellScriptBuildPhase;
|
isa = PBXShellScriptBuildPhase;
|
||||||
alwaysOutOfDate = 1;
|
alwaysOutOfDate = 1;
|
||||||
@@ -329,6 +405,23 @@
|
|||||||
shellPath = /bin/sh;
|
shellPath = /bin/sh;
|
||||||
shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire";
|
shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire";
|
||||||
};
|
};
|
||||||
|
D0A48B88512859849D0E92D6 /* [CP] Embed Pods Frameworks */ = {
|
||||||
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
inputFileListPaths = (
|
||||||
|
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
|
||||||
|
);
|
||||||
|
name = "[CP] Embed Pods Frameworks";
|
||||||
|
outputFileListPaths = (
|
||||||
|
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
shellPath = /bin/sh;
|
||||||
|
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
|
||||||
|
showEnvVarsInLog = 0;
|
||||||
|
};
|
||||||
/* End PBXShellScriptBuildPhase section */
|
/* End PBXShellScriptBuildPhase section */
|
||||||
|
|
||||||
/* Begin PBXSourcesBuildPhase section */
|
/* Begin PBXSourcesBuildPhase section */
|
||||||
@@ -380,6 +473,7 @@
|
|||||||
/* Begin XCBuildConfiguration section */
|
/* Begin XCBuildConfiguration section */
|
||||||
331C80DB294CF71000263BE5 /* Debug */ = {
|
331C80DB294CF71000263BE5 /* Debug */ = {
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = FF54856CCC3D0D2B521DE3D2 /* Pods-RunnerTests.debug.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||||
CURRENT_PROJECT_VERSION = 1;
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
@@ -394,6 +488,7 @@
|
|||||||
};
|
};
|
||||||
331C80DC294CF71000263BE5 /* Release */ = {
|
331C80DC294CF71000263BE5 /* Release */ = {
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = 54AD243DC5A5AF26694848AC /* Pods-RunnerTests.release.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||||
CURRENT_PROJECT_VERSION = 1;
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
@@ -408,6 +503,7 @@
|
|||||||
};
|
};
|
||||||
331C80DD294CF71000263BE5 /* Profile */ = {
|
331C80DD294CF71000263BE5 /* Profile */ = {
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = 52BFCC2D82C3A8048E275DF3 /* Pods-RunnerTests.profile.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||||
CURRENT_PROJECT_VERSION = 1;
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
|
|||||||
@@ -4,4 +4,7 @@
|
|||||||
<FileRef
|
<FileRef
|
||||||
location = "group:Runner.xcodeproj">
|
location = "group:Runner.xcodeproj">
|
||||||
</FileRef>
|
</FileRef>
|
||||||
|
<FileRef
|
||||||
|
location = "group:Pods/Pods.xcodeproj">
|
||||||
|
</FileRef>
|
||||||
</Workspace>
|
</Workspace>
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
# Basic Usage
|
# Basic Usage
|
||||||
|
|
||||||
```dart
|
```dart
|
||||||
ExampleConnector.instance.createWorkforce(createWorkforceVariables).execute();
|
ExampleConnector.instance.createBusiness(createBusinessVariables).execute();
|
||||||
ExampleConnector.instance.updateWorkforce(updateWorkforceVariables).execute();
|
ExampleConnector.instance.updateBusiness(updateBusinessVariables).execute();
|
||||||
ExampleConnector.instance.deactivateWorkforce(deactivateWorkforceVariables).execute();
|
ExampleConnector.instance.deleteBusiness(deleteBusinessVariables).execute();
|
||||||
ExampleConnector.instance.listInvoices(listInvoicesVariables).execute();
|
ExampleConnector.instance.listCustomRateCards().execute();
|
||||||
ExampleConnector.instance.getInvoiceById(getInvoiceByIdVariables).execute();
|
ExampleConnector.instance.getCustomRateCardById(getCustomRateCardByIdVariables).execute();
|
||||||
ExampleConnector.instance.listInvoicesByVendorId(listInvoicesByVendorIdVariables).execute();
|
ExampleConnector.instance.listClientFeedbacks(listClientFeedbacksVariables).execute();
|
||||||
ExampleConnector.instance.listInvoicesByBusinessId(listInvoicesByBusinessIdVariables).execute();
|
ExampleConnector.instance.getClientFeedbackById(getClientFeedbackByIdVariables).execute();
|
||||||
ExampleConnector.instance.listInvoicesByOrderId(listInvoicesByOrderIdVariables).execute();
|
ExampleConnector.instance.listClientFeedbacksByBusinessId(listClientFeedbacksByBusinessIdVariables).execute();
|
||||||
ExampleConnector.instance.listInvoicesByStatus(listInvoicesByStatusVariables).execute();
|
ExampleConnector.instance.listClientFeedbacksByVendorId(listClientFeedbacksByVendorIdVariables).execute();
|
||||||
ExampleConnector.instance.filterInvoices(filterInvoicesVariables).execute();
|
ExampleConnector.instance.listClientFeedbacksByBusinessAndVendor(listClientFeedbacksByBusinessAndVendorVariables).execute();
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -23,8 +23,8 @@ Optional fields can be discovered based on classes that have `Optional` object t
|
|||||||
This is an example of a mutation with an optional field:
|
This is an example of a mutation with an optional field:
|
||||||
|
|
||||||
```dart
|
```dart
|
||||||
await ExampleConnector.instance.updateVendor({ ... })
|
await ExampleConnector.instance.updateActivityLog({ ... })
|
||||||
.companyName(...)
|
.userId(...)
|
||||||
.execute();
|
.execute();
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -8,6 +8,7 @@ class CreateAccountVariablesBuilder {
|
|||||||
String ownerId;
|
String ownerId;
|
||||||
Optional<String> _accountNumber = Optional.optional(nativeFromJson, nativeToJson);
|
Optional<String> _accountNumber = Optional.optional(nativeFromJson, nativeToJson);
|
||||||
Optional<String> _routeNumber = Optional.optional(nativeFromJson, nativeToJson);
|
Optional<String> _routeNumber = Optional.optional(nativeFromJson, nativeToJson);
|
||||||
|
Optional<Timestamp> _expiryTime = Optional.optional((json) => json['expiryTime'] = Timestamp.fromJson(json['expiryTime']), defaultSerializer);
|
||||||
|
|
||||||
final FirebaseDataConnect _dataConnect; CreateAccountVariablesBuilder isPrimary(bool? t) {
|
final FirebaseDataConnect _dataConnect; CreateAccountVariablesBuilder isPrimary(bool? t) {
|
||||||
_isPrimary.value = t;
|
_isPrimary.value = t;
|
||||||
@@ -21,6 +22,10 @@ class CreateAccountVariablesBuilder {
|
|||||||
_routeNumber.value = t;
|
_routeNumber.value = t;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
CreateAccountVariablesBuilder expiryTime(Timestamp? t) {
|
||||||
|
_expiryTime.value = t;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
CreateAccountVariablesBuilder(this._dataConnect, {required this.bank,required this.type,required this.last4,required this.ownerId,});
|
CreateAccountVariablesBuilder(this._dataConnect, {required this.bank,required this.type,required this.last4,required this.ownerId,});
|
||||||
Deserializer<CreateAccountData> dataDeserializer = (dynamic json) => CreateAccountData.fromJson(jsonDecode(json));
|
Deserializer<CreateAccountData> dataDeserializer = (dynamic json) => CreateAccountData.fromJson(jsonDecode(json));
|
||||||
@@ -30,7 +35,7 @@ class CreateAccountVariablesBuilder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
MutationRef<CreateAccountData, CreateAccountVariables> ref() {
|
MutationRef<CreateAccountData, CreateAccountVariables> ref() {
|
||||||
CreateAccountVariables vars= CreateAccountVariables(bank: bank,type: type,last4: last4,isPrimary: _isPrimary,ownerId: ownerId,accountNumber: _accountNumber,routeNumber: _routeNumber,);
|
CreateAccountVariables vars= CreateAccountVariables(bank: bank,type: type,last4: last4,isPrimary: _isPrimary,ownerId: ownerId,accountNumber: _accountNumber,routeNumber: _routeNumber,expiryTime: _expiryTime,);
|
||||||
return _dataConnect.mutation("createAccount", dataDeserializer, varsSerializer, vars);
|
return _dataConnect.mutation("createAccount", dataDeserializer, varsSerializer, vars);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -112,6 +117,7 @@ class CreateAccountVariables {
|
|||||||
final String ownerId;
|
final String ownerId;
|
||||||
late final Optional<String>accountNumber;
|
late final Optional<String>accountNumber;
|
||||||
late final Optional<String>routeNumber;
|
late final Optional<String>routeNumber;
|
||||||
|
late final Optional<Timestamp>expiryTime;
|
||||||
@Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.')
|
@Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.')
|
||||||
CreateAccountVariables.fromJson(Map<String, dynamic> json):
|
CreateAccountVariables.fromJson(Map<String, dynamic> json):
|
||||||
|
|
||||||
@@ -136,6 +142,10 @@ class CreateAccountVariables {
|
|||||||
routeNumber = Optional.optional(nativeFromJson, nativeToJson);
|
routeNumber = Optional.optional(nativeFromJson, nativeToJson);
|
||||||
routeNumber.value = json['routeNumber'] == null ? null : nativeFromJson<String>(json['routeNumber']);
|
routeNumber.value = json['routeNumber'] == null ? null : nativeFromJson<String>(json['routeNumber']);
|
||||||
|
|
||||||
|
|
||||||
|
expiryTime = Optional.optional((json) => json['expiryTime'] = Timestamp.fromJson(json['expiryTime']), defaultSerializer);
|
||||||
|
expiryTime.value = json['expiryTime'] == null ? null : Timestamp.fromJson(json['expiryTime']);
|
||||||
|
|
||||||
}
|
}
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
@@ -153,11 +163,12 @@ class CreateAccountVariables {
|
|||||||
isPrimary == otherTyped.isPrimary &&
|
isPrimary == otherTyped.isPrimary &&
|
||||||
ownerId == otherTyped.ownerId &&
|
ownerId == otherTyped.ownerId &&
|
||||||
accountNumber == otherTyped.accountNumber &&
|
accountNumber == otherTyped.accountNumber &&
|
||||||
routeNumber == otherTyped.routeNumber;
|
routeNumber == otherTyped.routeNumber &&
|
||||||
|
expiryTime == otherTyped.expiryTime;
|
||||||
|
|
||||||
}
|
}
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hashAll([bank.hashCode, type.hashCode, last4.hashCode, isPrimary.hashCode, ownerId.hashCode, accountNumber.hashCode, routeNumber.hashCode]);
|
int get hashCode => Object.hashAll([bank.hashCode, type.hashCode, last4.hashCode, isPrimary.hashCode, ownerId.hashCode, accountNumber.hashCode, routeNumber.hashCode, expiryTime.hashCode]);
|
||||||
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
@@ -177,6 +188,9 @@ class CreateAccountVariables {
|
|||||||
if(routeNumber.state == OptionalState.set) {
|
if(routeNumber.state == OptionalState.set) {
|
||||||
json['routeNumber'] = routeNumber.toJson();
|
json['routeNumber'] = routeNumber.toJson();
|
||||||
}
|
}
|
||||||
|
if(expiryTime.state == OptionalState.set) {
|
||||||
|
json['expiryTime'] = expiryTime.toJson();
|
||||||
|
}
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -188,6 +202,7 @@ class CreateAccountVariables {
|
|||||||
required this.ownerId,
|
required this.ownerId,
|
||||||
required this.accountNumber,
|
required this.accountNumber,
|
||||||
required this.routeNumber,
|
required this.routeNumber,
|
||||||
|
required this.expiryTime,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ class FilterAccountsAccounts {
|
|||||||
final bool? isPrimary;
|
final bool? isPrimary;
|
||||||
final String ownerId;
|
final String ownerId;
|
||||||
final String? accountNumber;
|
final String? accountNumber;
|
||||||
|
final Timestamp? expiryTime;
|
||||||
final String? routeNumber;
|
final String? routeNumber;
|
||||||
FilterAccountsAccounts.fromJson(dynamic json):
|
FilterAccountsAccounts.fromJson(dynamic json):
|
||||||
|
|
||||||
@@ -56,6 +57,7 @@ class FilterAccountsAccounts {
|
|||||||
isPrimary = json['isPrimary'] == null ? null : nativeFromJson<bool>(json['isPrimary']),
|
isPrimary = json['isPrimary'] == null ? null : nativeFromJson<bool>(json['isPrimary']),
|
||||||
ownerId = nativeFromJson<String>(json['ownerId']),
|
ownerId = nativeFromJson<String>(json['ownerId']),
|
||||||
accountNumber = json['accountNumber'] == null ? null : nativeFromJson<String>(json['accountNumber']),
|
accountNumber = json['accountNumber'] == null ? null : nativeFromJson<String>(json['accountNumber']),
|
||||||
|
expiryTime = json['expiryTime'] == null ? null : Timestamp.fromJson(json['expiryTime']),
|
||||||
routeNumber = json['routeNumber'] == null ? null : nativeFromJson<String>(json['routeNumber']);
|
routeNumber = json['routeNumber'] == null ? null : nativeFromJson<String>(json['routeNumber']);
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
@@ -74,11 +76,12 @@ class FilterAccountsAccounts {
|
|||||||
isPrimary == otherTyped.isPrimary &&
|
isPrimary == otherTyped.isPrimary &&
|
||||||
ownerId == otherTyped.ownerId &&
|
ownerId == otherTyped.ownerId &&
|
||||||
accountNumber == otherTyped.accountNumber &&
|
accountNumber == otherTyped.accountNumber &&
|
||||||
|
expiryTime == otherTyped.expiryTime &&
|
||||||
routeNumber == otherTyped.routeNumber;
|
routeNumber == otherTyped.routeNumber;
|
||||||
|
|
||||||
}
|
}
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hashAll([id.hashCode, bank.hashCode, type.hashCode, last4.hashCode, isPrimary.hashCode, ownerId.hashCode, accountNumber.hashCode, routeNumber.hashCode]);
|
int get hashCode => Object.hashAll([id.hashCode, bank.hashCode, type.hashCode, last4.hashCode, isPrimary.hashCode, ownerId.hashCode, accountNumber.hashCode, expiryTime.hashCode, routeNumber.hashCode]);
|
||||||
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
@@ -96,6 +99,9 @@ class FilterAccountsAccounts {
|
|||||||
if (accountNumber != null) {
|
if (accountNumber != null) {
|
||||||
json['accountNumber'] = nativeToJson<String?>(accountNumber);
|
json['accountNumber'] = nativeToJson<String?>(accountNumber);
|
||||||
}
|
}
|
||||||
|
if (expiryTime != null) {
|
||||||
|
json['expiryTime'] = expiryTime!.toJson();
|
||||||
|
}
|
||||||
if (routeNumber != null) {
|
if (routeNumber != null) {
|
||||||
json['routeNumber'] = nativeToJson<String?>(routeNumber);
|
json['routeNumber'] = nativeToJson<String?>(routeNumber);
|
||||||
}
|
}
|
||||||
@@ -110,6 +116,7 @@ class FilterAccountsAccounts {
|
|||||||
this.isPrimary,
|
this.isPrimary,
|
||||||
required this.ownerId,
|
required this.ownerId,
|
||||||
this.accountNumber,
|
this.accountNumber,
|
||||||
|
this.expiryTime,
|
||||||
this.routeNumber,
|
this.routeNumber,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -27,6 +27,7 @@ class GetAccountByIdAccount {
|
|||||||
final String ownerId;
|
final String ownerId;
|
||||||
final String? accountNumber;
|
final String? accountNumber;
|
||||||
final String? routeNumber;
|
final String? routeNumber;
|
||||||
|
final Timestamp? expiryTime;
|
||||||
final Timestamp? createdAt;
|
final Timestamp? createdAt;
|
||||||
GetAccountByIdAccount.fromJson(dynamic json):
|
GetAccountByIdAccount.fromJson(dynamic json):
|
||||||
|
|
||||||
@@ -38,6 +39,7 @@ class GetAccountByIdAccount {
|
|||||||
ownerId = nativeFromJson<String>(json['ownerId']),
|
ownerId = nativeFromJson<String>(json['ownerId']),
|
||||||
accountNumber = json['accountNumber'] == null ? null : nativeFromJson<String>(json['accountNumber']),
|
accountNumber = json['accountNumber'] == null ? null : nativeFromJson<String>(json['accountNumber']),
|
||||||
routeNumber = json['routeNumber'] == null ? null : nativeFromJson<String>(json['routeNumber']),
|
routeNumber = json['routeNumber'] == null ? null : nativeFromJson<String>(json['routeNumber']),
|
||||||
|
expiryTime = json['expiryTime'] == null ? null : Timestamp.fromJson(json['expiryTime']),
|
||||||
createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']);
|
createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']);
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
@@ -57,11 +59,12 @@ class GetAccountByIdAccount {
|
|||||||
ownerId == otherTyped.ownerId &&
|
ownerId == otherTyped.ownerId &&
|
||||||
accountNumber == otherTyped.accountNumber &&
|
accountNumber == otherTyped.accountNumber &&
|
||||||
routeNumber == otherTyped.routeNumber &&
|
routeNumber == otherTyped.routeNumber &&
|
||||||
|
expiryTime == otherTyped.expiryTime &&
|
||||||
createdAt == otherTyped.createdAt;
|
createdAt == otherTyped.createdAt;
|
||||||
|
|
||||||
}
|
}
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hashAll([id.hashCode, bank.hashCode, type.hashCode, last4.hashCode, isPrimary.hashCode, ownerId.hashCode, accountNumber.hashCode, routeNumber.hashCode, createdAt.hashCode]);
|
int get hashCode => Object.hashAll([id.hashCode, bank.hashCode, type.hashCode, last4.hashCode, isPrimary.hashCode, ownerId.hashCode, accountNumber.hashCode, routeNumber.hashCode, expiryTime.hashCode, createdAt.hashCode]);
|
||||||
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
@@ -82,6 +85,9 @@ class GetAccountByIdAccount {
|
|||||||
if (routeNumber != null) {
|
if (routeNumber != null) {
|
||||||
json['routeNumber'] = nativeToJson<String?>(routeNumber);
|
json['routeNumber'] = nativeToJson<String?>(routeNumber);
|
||||||
}
|
}
|
||||||
|
if (expiryTime != null) {
|
||||||
|
json['expiryTime'] = expiryTime!.toJson();
|
||||||
|
}
|
||||||
if (createdAt != null) {
|
if (createdAt != null) {
|
||||||
json['createdAt'] = createdAt!.toJson();
|
json['createdAt'] = createdAt!.toJson();
|
||||||
}
|
}
|
||||||
@@ -97,6 +103,7 @@ class GetAccountByIdAccount {
|
|||||||
required this.ownerId,
|
required this.ownerId,
|
||||||
this.accountNumber,
|
this.accountNumber,
|
||||||
this.routeNumber,
|
this.routeNumber,
|
||||||
|
this.expiryTime,
|
||||||
this.createdAt,
|
this.createdAt,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ class GetAccountsByOwnerIdAccounts {
|
|||||||
final String ownerId;
|
final String ownerId;
|
||||||
final String? accountNumber;
|
final String? accountNumber;
|
||||||
final String? routeNumber;
|
final String? routeNumber;
|
||||||
|
final Timestamp? expiryTime;
|
||||||
final Timestamp? createdAt;
|
final Timestamp? createdAt;
|
||||||
GetAccountsByOwnerIdAccounts.fromJson(dynamic json):
|
GetAccountsByOwnerIdAccounts.fromJson(dynamic json):
|
||||||
|
|
||||||
@@ -38,6 +39,7 @@ class GetAccountsByOwnerIdAccounts {
|
|||||||
ownerId = nativeFromJson<String>(json['ownerId']),
|
ownerId = nativeFromJson<String>(json['ownerId']),
|
||||||
accountNumber = json['accountNumber'] == null ? null : nativeFromJson<String>(json['accountNumber']),
|
accountNumber = json['accountNumber'] == null ? null : nativeFromJson<String>(json['accountNumber']),
|
||||||
routeNumber = json['routeNumber'] == null ? null : nativeFromJson<String>(json['routeNumber']),
|
routeNumber = json['routeNumber'] == null ? null : nativeFromJson<String>(json['routeNumber']),
|
||||||
|
expiryTime = json['expiryTime'] == null ? null : Timestamp.fromJson(json['expiryTime']),
|
||||||
createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']);
|
createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']);
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
@@ -57,11 +59,12 @@ class GetAccountsByOwnerIdAccounts {
|
|||||||
ownerId == otherTyped.ownerId &&
|
ownerId == otherTyped.ownerId &&
|
||||||
accountNumber == otherTyped.accountNumber &&
|
accountNumber == otherTyped.accountNumber &&
|
||||||
routeNumber == otherTyped.routeNumber &&
|
routeNumber == otherTyped.routeNumber &&
|
||||||
|
expiryTime == otherTyped.expiryTime &&
|
||||||
createdAt == otherTyped.createdAt;
|
createdAt == otherTyped.createdAt;
|
||||||
|
|
||||||
}
|
}
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hashAll([id.hashCode, bank.hashCode, type.hashCode, last4.hashCode, isPrimary.hashCode, ownerId.hashCode, accountNumber.hashCode, routeNumber.hashCode, createdAt.hashCode]);
|
int get hashCode => Object.hashAll([id.hashCode, bank.hashCode, type.hashCode, last4.hashCode, isPrimary.hashCode, ownerId.hashCode, accountNumber.hashCode, routeNumber.hashCode, expiryTime.hashCode, createdAt.hashCode]);
|
||||||
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
@@ -82,6 +85,9 @@ class GetAccountsByOwnerIdAccounts {
|
|||||||
if (routeNumber != null) {
|
if (routeNumber != null) {
|
||||||
json['routeNumber'] = nativeToJson<String?>(routeNumber);
|
json['routeNumber'] = nativeToJson<String?>(routeNumber);
|
||||||
}
|
}
|
||||||
|
if (expiryTime != null) {
|
||||||
|
json['expiryTime'] = expiryTime!.toJson();
|
||||||
|
}
|
||||||
if (createdAt != null) {
|
if (createdAt != null) {
|
||||||
json['createdAt'] = createdAt!.toJson();
|
json['createdAt'] = createdAt!.toJson();
|
||||||
}
|
}
|
||||||
@@ -97,6 +103,7 @@ class GetAccountsByOwnerIdAccounts {
|
|||||||
required this.ownerId,
|
required this.ownerId,
|
||||||
this.accountNumber,
|
this.accountNumber,
|
||||||
this.routeNumber,
|
this.routeNumber,
|
||||||
|
this.expiryTime,
|
||||||
this.createdAt,
|
this.createdAt,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ class ListAccountsAccounts {
|
|||||||
final String ownerId;
|
final String ownerId;
|
||||||
final String? accountNumber;
|
final String? accountNumber;
|
||||||
final String? routeNumber;
|
final String? routeNumber;
|
||||||
|
final Timestamp? expiryTime;
|
||||||
final Timestamp? createdAt;
|
final Timestamp? createdAt;
|
||||||
ListAccountsAccounts.fromJson(dynamic json):
|
ListAccountsAccounts.fromJson(dynamic json):
|
||||||
|
|
||||||
@@ -37,6 +38,7 @@ class ListAccountsAccounts {
|
|||||||
ownerId = nativeFromJson<String>(json['ownerId']),
|
ownerId = nativeFromJson<String>(json['ownerId']),
|
||||||
accountNumber = json['accountNumber'] == null ? null : nativeFromJson<String>(json['accountNumber']),
|
accountNumber = json['accountNumber'] == null ? null : nativeFromJson<String>(json['accountNumber']),
|
||||||
routeNumber = json['routeNumber'] == null ? null : nativeFromJson<String>(json['routeNumber']),
|
routeNumber = json['routeNumber'] == null ? null : nativeFromJson<String>(json['routeNumber']),
|
||||||
|
expiryTime = json['expiryTime'] == null ? null : Timestamp.fromJson(json['expiryTime']),
|
||||||
createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']);
|
createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']);
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
@@ -56,11 +58,12 @@ class ListAccountsAccounts {
|
|||||||
ownerId == otherTyped.ownerId &&
|
ownerId == otherTyped.ownerId &&
|
||||||
accountNumber == otherTyped.accountNumber &&
|
accountNumber == otherTyped.accountNumber &&
|
||||||
routeNumber == otherTyped.routeNumber &&
|
routeNumber == otherTyped.routeNumber &&
|
||||||
|
expiryTime == otherTyped.expiryTime &&
|
||||||
createdAt == otherTyped.createdAt;
|
createdAt == otherTyped.createdAt;
|
||||||
|
|
||||||
}
|
}
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hashAll([id.hashCode, bank.hashCode, type.hashCode, last4.hashCode, isPrimary.hashCode, ownerId.hashCode, accountNumber.hashCode, routeNumber.hashCode, createdAt.hashCode]);
|
int get hashCode => Object.hashAll([id.hashCode, bank.hashCode, type.hashCode, last4.hashCode, isPrimary.hashCode, ownerId.hashCode, accountNumber.hashCode, routeNumber.hashCode, expiryTime.hashCode, createdAt.hashCode]);
|
||||||
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
@@ -81,6 +84,9 @@ class ListAccountsAccounts {
|
|||||||
if (routeNumber != null) {
|
if (routeNumber != null) {
|
||||||
json['routeNumber'] = nativeToJson<String?>(routeNumber);
|
json['routeNumber'] = nativeToJson<String?>(routeNumber);
|
||||||
}
|
}
|
||||||
|
if (expiryTime != null) {
|
||||||
|
json['expiryTime'] = expiryTime!.toJson();
|
||||||
|
}
|
||||||
if (createdAt != null) {
|
if (createdAt != null) {
|
||||||
json['createdAt'] = createdAt!.toJson();
|
json['createdAt'] = createdAt!.toJson();
|
||||||
}
|
}
|
||||||
@@ -96,6 +102,7 @@ class ListAccountsAccounts {
|
|||||||
required this.ownerId,
|
required this.ownerId,
|
||||||
this.accountNumber,
|
this.accountNumber,
|
||||||
this.routeNumber,
|
this.routeNumber,
|
||||||
|
this.expiryTime,
|
||||||
this.createdAt,
|
this.createdAt,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,229 @@
|
|||||||
|
part of 'generated.dart';
|
||||||
|
|
||||||
|
class ListShiftRolesByBusinessAndDatesSummaryVariablesBuilder {
|
||||||
|
String businessId;
|
||||||
|
Timestamp start;
|
||||||
|
Timestamp end;
|
||||||
|
Optional<int> _offset = Optional.optional(nativeFromJson, nativeToJson);
|
||||||
|
Optional<int> _limit = Optional.optional(nativeFromJson, nativeToJson);
|
||||||
|
|
||||||
|
final FirebaseDataConnect _dataConnect; ListShiftRolesByBusinessAndDatesSummaryVariablesBuilder offset(int? t) {
|
||||||
|
_offset.value = t;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
ListShiftRolesByBusinessAndDatesSummaryVariablesBuilder limit(int? t) {
|
||||||
|
_limit.value = t;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
ListShiftRolesByBusinessAndDatesSummaryVariablesBuilder(this._dataConnect, {required this.businessId,required this.start,required this.end,});
|
||||||
|
Deserializer<ListShiftRolesByBusinessAndDatesSummaryData> dataDeserializer = (dynamic json) => ListShiftRolesByBusinessAndDatesSummaryData.fromJson(jsonDecode(json));
|
||||||
|
Serializer<ListShiftRolesByBusinessAndDatesSummaryVariables> varsSerializer = (ListShiftRolesByBusinessAndDatesSummaryVariables vars) => jsonEncode(vars.toJson());
|
||||||
|
Future<QueryResult<ListShiftRolesByBusinessAndDatesSummaryData, ListShiftRolesByBusinessAndDatesSummaryVariables>> execute() {
|
||||||
|
return ref().execute();
|
||||||
|
}
|
||||||
|
|
||||||
|
QueryRef<ListShiftRolesByBusinessAndDatesSummaryData, ListShiftRolesByBusinessAndDatesSummaryVariables> ref() {
|
||||||
|
ListShiftRolesByBusinessAndDatesSummaryVariables vars= ListShiftRolesByBusinessAndDatesSummaryVariables(businessId: businessId,start: start,end: end,offset: _offset,limit: _limit,);
|
||||||
|
return _dataConnect.query("listShiftRolesByBusinessAndDatesSummary", dataDeserializer, varsSerializer, vars);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@immutable
|
||||||
|
class ListShiftRolesByBusinessAndDatesSummaryShiftRoles {
|
||||||
|
final String roleId;
|
||||||
|
final double? hours;
|
||||||
|
final double? totalValue;
|
||||||
|
final ListShiftRolesByBusinessAndDatesSummaryShiftRolesRole role;
|
||||||
|
ListShiftRolesByBusinessAndDatesSummaryShiftRoles.fromJson(dynamic json):
|
||||||
|
|
||||||
|
roleId = nativeFromJson<String>(json['roleId']),
|
||||||
|
hours = json['hours'] == null ? null : nativeFromJson<double>(json['hours']),
|
||||||
|
totalValue = json['totalValue'] == null ? null : nativeFromJson<double>(json['totalValue']),
|
||||||
|
role = ListShiftRolesByBusinessAndDatesSummaryShiftRolesRole.fromJson(json['role']);
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
if(identical(this, other)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if(other.runtimeType != runtimeType) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
final ListShiftRolesByBusinessAndDatesSummaryShiftRoles otherTyped = other as ListShiftRolesByBusinessAndDatesSummaryShiftRoles;
|
||||||
|
return roleId == otherTyped.roleId &&
|
||||||
|
hours == otherTyped.hours &&
|
||||||
|
totalValue == otherTyped.totalValue &&
|
||||||
|
role == otherTyped.role;
|
||||||
|
|
||||||
|
}
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hashAll([roleId.hashCode, hours.hashCode, totalValue.hashCode, role.hashCode]);
|
||||||
|
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
Map<String, dynamic> json = {};
|
||||||
|
json['roleId'] = nativeToJson<String>(roleId);
|
||||||
|
if (hours != null) {
|
||||||
|
json['hours'] = nativeToJson<double?>(hours);
|
||||||
|
}
|
||||||
|
if (totalValue != null) {
|
||||||
|
json['totalValue'] = nativeToJson<double?>(totalValue);
|
||||||
|
}
|
||||||
|
json['role'] = role.toJson();
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
ListShiftRolesByBusinessAndDatesSummaryShiftRoles({
|
||||||
|
required this.roleId,
|
||||||
|
this.hours,
|
||||||
|
this.totalValue,
|
||||||
|
required this.role,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@immutable
|
||||||
|
class ListShiftRolesByBusinessAndDatesSummaryShiftRolesRole {
|
||||||
|
final String id;
|
||||||
|
final String name;
|
||||||
|
ListShiftRolesByBusinessAndDatesSummaryShiftRolesRole.fromJson(dynamic json):
|
||||||
|
|
||||||
|
id = nativeFromJson<String>(json['id']),
|
||||||
|
name = nativeFromJson<String>(json['name']);
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
if(identical(this, other)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if(other.runtimeType != runtimeType) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
final ListShiftRolesByBusinessAndDatesSummaryShiftRolesRole otherTyped = other as ListShiftRolesByBusinessAndDatesSummaryShiftRolesRole;
|
||||||
|
return id == otherTyped.id &&
|
||||||
|
name == otherTyped.name;
|
||||||
|
|
||||||
|
}
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hashAll([id.hashCode, name.hashCode]);
|
||||||
|
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
Map<String, dynamic> json = {};
|
||||||
|
json['id'] = nativeToJson<String>(id);
|
||||||
|
json['name'] = nativeToJson<String>(name);
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
ListShiftRolesByBusinessAndDatesSummaryShiftRolesRole({
|
||||||
|
required this.id,
|
||||||
|
required this.name,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@immutable
|
||||||
|
class ListShiftRolesByBusinessAndDatesSummaryData {
|
||||||
|
final List<ListShiftRolesByBusinessAndDatesSummaryShiftRoles> shiftRoles;
|
||||||
|
ListShiftRolesByBusinessAndDatesSummaryData.fromJson(dynamic json):
|
||||||
|
|
||||||
|
shiftRoles = (json['shiftRoles'] as List<dynamic>)
|
||||||
|
.map((e) => ListShiftRolesByBusinessAndDatesSummaryShiftRoles.fromJson(e))
|
||||||
|
.toList();
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
if(identical(this, other)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if(other.runtimeType != runtimeType) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
final ListShiftRolesByBusinessAndDatesSummaryData otherTyped = other as ListShiftRolesByBusinessAndDatesSummaryData;
|
||||||
|
return shiftRoles == otherTyped.shiftRoles;
|
||||||
|
|
||||||
|
}
|
||||||
|
@override
|
||||||
|
int get hashCode => shiftRoles.hashCode;
|
||||||
|
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
Map<String, dynamic> json = {};
|
||||||
|
json['shiftRoles'] = shiftRoles.map((e) => e.toJson()).toList();
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
ListShiftRolesByBusinessAndDatesSummaryData({
|
||||||
|
required this.shiftRoles,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@immutable
|
||||||
|
class ListShiftRolesByBusinessAndDatesSummaryVariables {
|
||||||
|
final String businessId;
|
||||||
|
final Timestamp start;
|
||||||
|
final Timestamp end;
|
||||||
|
late final Optional<int>offset;
|
||||||
|
late final Optional<int>limit;
|
||||||
|
@Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.')
|
||||||
|
ListShiftRolesByBusinessAndDatesSummaryVariables.fromJson(Map<String, dynamic> json):
|
||||||
|
|
||||||
|
businessId = nativeFromJson<String>(json['businessId']),
|
||||||
|
start = Timestamp.fromJson(json['start']),
|
||||||
|
end = Timestamp.fromJson(json['end']) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
offset = Optional.optional(nativeFromJson, nativeToJson);
|
||||||
|
offset.value = json['offset'] == null ? null : nativeFromJson<int>(json['offset']);
|
||||||
|
|
||||||
|
|
||||||
|
limit = Optional.optional(nativeFromJson, nativeToJson);
|
||||||
|
limit.value = json['limit'] == null ? null : nativeFromJson<int>(json['limit']);
|
||||||
|
|
||||||
|
}
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
if(identical(this, other)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if(other.runtimeType != runtimeType) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
final ListShiftRolesByBusinessAndDatesSummaryVariables otherTyped = other as ListShiftRolesByBusinessAndDatesSummaryVariables;
|
||||||
|
return businessId == otherTyped.businessId &&
|
||||||
|
start == otherTyped.start &&
|
||||||
|
end == otherTyped.end &&
|
||||||
|
offset == otherTyped.offset &&
|
||||||
|
limit == otherTyped.limit;
|
||||||
|
|
||||||
|
}
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hashAll([businessId.hashCode, start.hashCode, end.hashCode, offset.hashCode, limit.hashCode]);
|
||||||
|
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
Map<String, dynamic> json = {};
|
||||||
|
json['businessId'] = nativeToJson<String>(businessId);
|
||||||
|
json['start'] = start.toJson();
|
||||||
|
json['end'] = end.toJson();
|
||||||
|
if(offset.state == OptionalState.set) {
|
||||||
|
json['offset'] = offset.toJson();
|
||||||
|
}
|
||||||
|
if(limit.state == OptionalState.set) {
|
||||||
|
json['limit'] = limit.toJson();
|
||||||
|
}
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
ListShiftRolesByBusinessAndDatesSummaryVariables({
|
||||||
|
required this.businessId,
|
||||||
|
required this.start,
|
||||||
|
required this.end,
|
||||||
|
required this.offset,
|
||||||
|
required this.limit,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
@@ -8,6 +8,7 @@ class UpdateAccountVariablesBuilder {
|
|||||||
Optional<bool> _isPrimary = Optional.optional(nativeFromJson, nativeToJson);
|
Optional<bool> _isPrimary = Optional.optional(nativeFromJson, nativeToJson);
|
||||||
Optional<String> _accountNumber = Optional.optional(nativeFromJson, nativeToJson);
|
Optional<String> _accountNumber = Optional.optional(nativeFromJson, nativeToJson);
|
||||||
Optional<String> _routeNumber = Optional.optional(nativeFromJson, nativeToJson);
|
Optional<String> _routeNumber = Optional.optional(nativeFromJson, nativeToJson);
|
||||||
|
Optional<Timestamp> _expiryTime = Optional.optional((json) => json['expiryTime'] = Timestamp.fromJson(json['expiryTime']), defaultSerializer);
|
||||||
|
|
||||||
final FirebaseDataConnect _dataConnect; UpdateAccountVariablesBuilder bank(String? t) {
|
final FirebaseDataConnect _dataConnect; UpdateAccountVariablesBuilder bank(String? t) {
|
||||||
_bank.value = t;
|
_bank.value = t;
|
||||||
@@ -33,6 +34,10 @@ class UpdateAccountVariablesBuilder {
|
|||||||
_routeNumber.value = t;
|
_routeNumber.value = t;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
UpdateAccountVariablesBuilder expiryTime(Timestamp? t) {
|
||||||
|
_expiryTime.value = t;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
UpdateAccountVariablesBuilder(this._dataConnect, {required this.id,});
|
UpdateAccountVariablesBuilder(this._dataConnect, {required this.id,});
|
||||||
Deserializer<UpdateAccountData> dataDeserializer = (dynamic json) => UpdateAccountData.fromJson(jsonDecode(json));
|
Deserializer<UpdateAccountData> dataDeserializer = (dynamic json) => UpdateAccountData.fromJson(jsonDecode(json));
|
||||||
@@ -42,7 +47,7 @@ class UpdateAccountVariablesBuilder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
MutationRef<UpdateAccountData, UpdateAccountVariables> ref() {
|
MutationRef<UpdateAccountData, UpdateAccountVariables> ref() {
|
||||||
UpdateAccountVariables vars= UpdateAccountVariables(id: id,bank: _bank,type: _type,last4: _last4,isPrimary: _isPrimary,accountNumber: _accountNumber,routeNumber: _routeNumber,);
|
UpdateAccountVariables vars= UpdateAccountVariables(id: id,bank: _bank,type: _type,last4: _last4,isPrimary: _isPrimary,accountNumber: _accountNumber,routeNumber: _routeNumber,expiryTime: _expiryTime,);
|
||||||
return _dataConnect.mutation("updateAccount", dataDeserializer, varsSerializer, vars);
|
return _dataConnect.mutation("updateAccount", dataDeserializer, varsSerializer, vars);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -126,6 +131,7 @@ class UpdateAccountVariables {
|
|||||||
late final Optional<bool>isPrimary;
|
late final Optional<bool>isPrimary;
|
||||||
late final Optional<String>accountNumber;
|
late final Optional<String>accountNumber;
|
||||||
late final Optional<String>routeNumber;
|
late final Optional<String>routeNumber;
|
||||||
|
late final Optional<Timestamp>expiryTime;
|
||||||
@Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.')
|
@Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.')
|
||||||
UpdateAccountVariables.fromJson(Map<String, dynamic> json):
|
UpdateAccountVariables.fromJson(Map<String, dynamic> json):
|
||||||
|
|
||||||
@@ -156,6 +162,10 @@ class UpdateAccountVariables {
|
|||||||
routeNumber = Optional.optional(nativeFromJson, nativeToJson);
|
routeNumber = Optional.optional(nativeFromJson, nativeToJson);
|
||||||
routeNumber.value = json['routeNumber'] == null ? null : nativeFromJson<String>(json['routeNumber']);
|
routeNumber.value = json['routeNumber'] == null ? null : nativeFromJson<String>(json['routeNumber']);
|
||||||
|
|
||||||
|
|
||||||
|
expiryTime = Optional.optional((json) => json['expiryTime'] = Timestamp.fromJson(json['expiryTime']), defaultSerializer);
|
||||||
|
expiryTime.value = json['expiryTime'] == null ? null : Timestamp.fromJson(json['expiryTime']);
|
||||||
|
|
||||||
}
|
}
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
@@ -173,11 +183,12 @@ class UpdateAccountVariables {
|
|||||||
last4 == otherTyped.last4 &&
|
last4 == otherTyped.last4 &&
|
||||||
isPrimary == otherTyped.isPrimary &&
|
isPrimary == otherTyped.isPrimary &&
|
||||||
accountNumber == otherTyped.accountNumber &&
|
accountNumber == otherTyped.accountNumber &&
|
||||||
routeNumber == otherTyped.routeNumber;
|
routeNumber == otherTyped.routeNumber &&
|
||||||
|
expiryTime == otherTyped.expiryTime;
|
||||||
|
|
||||||
}
|
}
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hashAll([id.hashCode, bank.hashCode, type.hashCode, last4.hashCode, isPrimary.hashCode, accountNumber.hashCode, routeNumber.hashCode]);
|
int get hashCode => Object.hashAll([id.hashCode, bank.hashCode, type.hashCode, last4.hashCode, isPrimary.hashCode, accountNumber.hashCode, routeNumber.hashCode, expiryTime.hashCode]);
|
||||||
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
@@ -201,6 +212,9 @@ class UpdateAccountVariables {
|
|||||||
if(routeNumber.state == OptionalState.set) {
|
if(routeNumber.state == OptionalState.set) {
|
||||||
json['routeNumber'] = routeNumber.toJson();
|
json['routeNumber'] = routeNumber.toJson();
|
||||||
}
|
}
|
||||||
|
if(expiryTime.state == OptionalState.set) {
|
||||||
|
json['expiryTime'] = expiryTime.toJson();
|
||||||
|
}
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -212,6 +226,7 @@ class UpdateAccountVariables {
|
|||||||
required this.isPrimary,
|
required this.isPrimary,
|
||||||
required this.accountNumber,
|
required this.accountNumber,
|
||||||
required this.routeNumber,
|
required this.routeNumber,
|
||||||
|
required this.expiryTime,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ class FinancialRepositoryMock {
|
|||||||
totalAmount: 1500.0,
|
totalAmount: 1500.0,
|
||||||
workAmount: 1400.0,
|
workAmount: 1400.0,
|
||||||
addonsAmount: 100.0,
|
addonsAmount: 100.0,
|
||||||
|
invoiceNumber: 'INV-1',
|
||||||
|
issueDate: null,
|
||||||
),
|
),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ class Invoice extends Equatable {
|
|||||||
required this.totalAmount,
|
required this.totalAmount,
|
||||||
required this.workAmount,
|
required this.workAmount,
|
||||||
required this.addonsAmount,
|
required this.addonsAmount,
|
||||||
|
this.invoiceNumber,
|
||||||
|
this.issueDate,
|
||||||
});
|
});
|
||||||
/// Unique identifier.
|
/// Unique identifier.
|
||||||
final String id;
|
final String id;
|
||||||
@@ -57,6 +59,12 @@ class Invoice extends Equatable {
|
|||||||
/// Total amount for addons/extras.
|
/// Total amount for addons/extras.
|
||||||
final double addonsAmount;
|
final double addonsAmount;
|
||||||
|
|
||||||
|
/// Human-readable invoice number.
|
||||||
|
final String? invoiceNumber;
|
||||||
|
|
||||||
|
/// Date when the invoice was issued.
|
||||||
|
final DateTime? issueDate;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
List<Object?> get props => <Object?>[
|
List<Object?> get props => <Object?>[
|
||||||
id,
|
id,
|
||||||
@@ -66,5 +74,7 @@ class Invoice extends Equatable {
|
|||||||
totalAmount,
|
totalAmount,
|
||||||
workAmount,
|
workAmount,
|
||||||
addonsAmount,
|
addonsAmount,
|
||||||
|
invoiceNumber,
|
||||||
|
issueDate,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ class BillingModule extends Module {
|
|||||||
i.addSingleton<BillingRepository>(
|
i.addSingleton<BillingRepository>(
|
||||||
() => BillingRepositoryImpl(
|
() => BillingRepositoryImpl(
|
||||||
financialRepository: i.get<FinancialRepositoryMock>(),
|
financialRepository: i.get<FinancialRepositoryMock>(),
|
||||||
|
dataConnect: ExampleConnector.instance,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
|
import 'package:firebase_data_connect/firebase_data_connect.dart' as fdc;
|
||||||
import 'package:krow_data_connect/krow_data_connect.dart' as data_connect;
|
import 'package:krow_data_connect/krow_data_connect.dart' as data_connect;
|
||||||
import 'package:krow_domain/krow_domain.dart';
|
import 'package:krow_domain/krow_domain.dart';
|
||||||
|
import '../../domain/models/billing_period.dart';
|
||||||
import '../../domain/repositories/billing_repository.dart';
|
import '../../domain/repositories/billing_repository.dart';
|
||||||
|
|
||||||
/// Implementation of [BillingRepository] in the Data layer.
|
/// Implementation of [BillingRepository] in the Data layer.
|
||||||
@@ -16,9 +18,12 @@ class BillingRepositoryImpl implements BillingRepository {
|
|||||||
/// Requires the [financialRepository] to fetch financial data.
|
/// Requires the [financialRepository] to fetch financial data.
|
||||||
BillingRepositoryImpl({
|
BillingRepositoryImpl({
|
||||||
required data_connect.FinancialRepositoryMock financialRepository,
|
required data_connect.FinancialRepositoryMock financialRepository,
|
||||||
}) : _financialRepository = financialRepository;
|
required data_connect.ExampleConnector dataConnect,
|
||||||
|
}) : _financialRepository = financialRepository,
|
||||||
|
_dataConnect = dataConnect;
|
||||||
|
|
||||||
final data_connect.FinancialRepositoryMock _financialRepository;
|
final data_connect.FinancialRepositoryMock _financialRepository;
|
||||||
|
final data_connect.ExampleConnector _dataConnect;
|
||||||
|
|
||||||
/// Fetches the current bill amount by aggregating open invoices.
|
/// Fetches the current bill amount by aggregating open invoices.
|
||||||
@override
|
@override
|
||||||
@@ -39,12 +44,22 @@ class BillingRepositoryImpl implements BillingRepository {
|
|||||||
/// Fetches the history of paid invoices.
|
/// Fetches the history of paid invoices.
|
||||||
@override
|
@override
|
||||||
Future<List<Invoice>> getInvoiceHistory() async {
|
Future<List<Invoice>> getInvoiceHistory() async {
|
||||||
final List<Invoice> invoices = await _financialRepository.getInvoices(
|
final String? businessId =
|
||||||
'current_business',
|
data_connect.ClientSessionStore.instance.session?.business?.id;
|
||||||
);
|
if (businessId == null || businessId.isEmpty) {
|
||||||
return invoices
|
return <Invoice>[];
|
||||||
.where((Invoice i) => i.status == InvoiceStatus.paid)
|
}
|
||||||
.toList();
|
|
||||||
|
final fdc.QueryResult<data_connect.ListInvoicesByBusinessIdData,
|
||||||
|
data_connect.ListInvoicesByBusinessIdVariables> result =
|
||||||
|
await _dataConnect
|
||||||
|
.listInvoicesByBusinessId(
|
||||||
|
businessId: businessId,
|
||||||
|
)
|
||||||
|
.limit(10)
|
||||||
|
.execute();
|
||||||
|
|
||||||
|
return result.data.invoices.map(_mapInvoice).toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Fetches pending invoices (Open or Disputed).
|
/// Fetches pending invoices (Open or Disputed).
|
||||||
@@ -66,15 +81,156 @@ class BillingRepositoryImpl implements BillingRepository {
|
|||||||
@override
|
@override
|
||||||
Future<double> getSavingsAmount() async {
|
Future<double> getSavingsAmount() async {
|
||||||
// Simulating savings calculation (e.g., comparing to market rates).
|
// Simulating savings calculation (e.g., comparing to market rates).
|
||||||
await Future<void>.delayed(const Duration(milliseconds: 500));
|
await Future<void>.delayed(const Duration(milliseconds: 0));
|
||||||
return 320.00;
|
return 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Fetches the breakdown of spending.
|
/// Fetches the breakdown of spending.
|
||||||
@override
|
@override
|
||||||
Future<List<InvoiceItem>> getSpendingBreakdown() async {
|
Future<List<InvoiceItem>> getSpendingBreakdown(BillingPeriod period) async {
|
||||||
// Assuming breakdown is based on the current period's invoice items.
|
final String? businessId =
|
||||||
// We fetch items for a dummy invoice ID representing the current period.
|
data_connect.ClientSessionStore.instance.session?.business?.id;
|
||||||
return _financialRepository.getInvoiceItems('current_period_invoice');
|
if (businessId == null || businessId.isEmpty) {
|
||||||
|
return <InvoiceItem>[];
|
||||||
|
}
|
||||||
|
|
||||||
|
final DateTime now = DateTime.now();
|
||||||
|
final DateTime start;
|
||||||
|
final DateTime end;
|
||||||
|
if (period == BillingPeriod.week) {
|
||||||
|
final int daysFromMonday = now.weekday - DateTime.monday;
|
||||||
|
final DateTime monday = DateTime(
|
||||||
|
now.year,
|
||||||
|
now.month,
|
||||||
|
now.day,
|
||||||
|
).subtract(Duration(days: daysFromMonday));
|
||||||
|
start = DateTime(monday.year, monday.month, monday.day);
|
||||||
|
end = DateTime(monday.year, monday.month, monday.day + 6, 23, 59, 59, 999);
|
||||||
|
} else {
|
||||||
|
start = DateTime(now.year, now.month, 1);
|
||||||
|
end = DateTime(now.year, now.month + 1, 0, 23, 59, 59, 999);
|
||||||
|
}
|
||||||
|
|
||||||
|
final fdc.QueryResult<
|
||||||
|
data_connect.ListShiftRolesByBusinessAndDatesSummaryData,
|
||||||
|
data_connect.ListShiftRolesByBusinessAndDatesSummaryVariables> result =
|
||||||
|
await _dataConnect
|
||||||
|
.listShiftRolesByBusinessAndDatesSummary(
|
||||||
|
businessId: businessId,
|
||||||
|
start: _toTimestamp(start),
|
||||||
|
end: _toTimestamp(end),
|
||||||
|
)
|
||||||
|
.execute();
|
||||||
|
|
||||||
|
final List<data_connect.ListShiftRolesByBusinessAndDatesSummaryShiftRoles>
|
||||||
|
shiftRoles = result.data.shiftRoles;
|
||||||
|
if (shiftRoles.isEmpty) {
|
||||||
|
return <InvoiceItem>[];
|
||||||
|
}
|
||||||
|
|
||||||
|
final Map<String, _RoleSummary> summary = <String, _RoleSummary>{};
|
||||||
|
for (final data_connect.ListShiftRolesByBusinessAndDatesSummaryShiftRoles role
|
||||||
|
in shiftRoles) {
|
||||||
|
final String roleId = role.roleId;
|
||||||
|
final String roleName = role.role.name;
|
||||||
|
final double hours = role.hours ?? 0.0;
|
||||||
|
final double totalValue = role.totalValue ?? 0.0;
|
||||||
|
final _RoleSummary? existing = summary[roleId];
|
||||||
|
if (existing == null) {
|
||||||
|
summary[roleId] = _RoleSummary(
|
||||||
|
roleId: roleId,
|
||||||
|
roleName: roleName,
|
||||||
|
totalHours: hours,
|
||||||
|
totalValue: totalValue,
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
summary[roleId] = existing.copyWith(
|
||||||
|
totalHours: existing.totalHours + hours,
|
||||||
|
totalValue: existing.totalValue + totalValue,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return summary.values
|
||||||
|
.map(
|
||||||
|
(_RoleSummary item) => InvoiceItem(
|
||||||
|
id: item.roleId,
|
||||||
|
invoiceId: item.roleId,
|
||||||
|
staffId: item.roleName,
|
||||||
|
workHours: item.totalHours,
|
||||||
|
rate: item.totalHours > 0 ? item.totalValue / item.totalHours : 0,
|
||||||
|
amount: item.totalValue,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
.toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
fdc.Timestamp _toTimestamp(DateTime dateTime) {
|
||||||
|
final int seconds = dateTime.millisecondsSinceEpoch ~/ 1000;
|
||||||
|
final int nanoseconds =
|
||||||
|
(dateTime.millisecondsSinceEpoch % 1000) * 1000000;
|
||||||
|
return fdc.Timestamp(nanoseconds, seconds);
|
||||||
|
}
|
||||||
|
|
||||||
|
Invoice _mapInvoice(data_connect.ListInvoicesByBusinessIdInvoices invoice) {
|
||||||
|
return Invoice(
|
||||||
|
id: invoice.id,
|
||||||
|
eventId: invoice.orderId,
|
||||||
|
businessId: invoice.businessId,
|
||||||
|
status: _mapInvoiceStatus(invoice.status),
|
||||||
|
totalAmount: invoice.amount,
|
||||||
|
workAmount: invoice.amount,
|
||||||
|
addonsAmount: invoice.otherCharges ?? 0,
|
||||||
|
invoiceNumber: invoice.invoiceNumber,
|
||||||
|
issueDate: invoice.issueDate.toDateTime(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
InvoiceStatus _mapInvoiceStatus(
|
||||||
|
data_connect.EnumValue<data_connect.InvoiceStatus> status,
|
||||||
|
) {
|
||||||
|
if (status is data_connect.Known<data_connect.InvoiceStatus>) {
|
||||||
|
switch (status.value) {
|
||||||
|
case data_connect.InvoiceStatus.PAID:
|
||||||
|
return InvoiceStatus.paid;
|
||||||
|
case data_connect.InvoiceStatus.OVERDUE:
|
||||||
|
return InvoiceStatus.overdue;
|
||||||
|
case data_connect.InvoiceStatus.DISPUTED:
|
||||||
|
return InvoiceStatus.disputed;
|
||||||
|
case data_connect.InvoiceStatus.APPROVED:
|
||||||
|
return InvoiceStatus.verified;
|
||||||
|
case data_connect.InvoiceStatus.PENDING_REVIEW:
|
||||||
|
case data_connect.InvoiceStatus.PENDING:
|
||||||
|
case data_connect.InvoiceStatus.DRAFT:
|
||||||
|
return InvoiceStatus.open;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return InvoiceStatus.open;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class _RoleSummary {
|
||||||
|
const _RoleSummary({
|
||||||
|
required this.roleId,
|
||||||
|
required this.roleName,
|
||||||
|
required this.totalHours,
|
||||||
|
required this.totalValue,
|
||||||
|
});
|
||||||
|
|
||||||
|
final String roleId;
|
||||||
|
final String roleName;
|
||||||
|
final double totalHours;
|
||||||
|
final double totalValue;
|
||||||
|
|
||||||
|
_RoleSummary copyWith({
|
||||||
|
double? totalHours,
|
||||||
|
double? totalValue,
|
||||||
|
}) {
|
||||||
|
return _RoleSummary(
|
||||||
|
roleId: roleId,
|
||||||
|
roleName: roleName,
|
||||||
|
totalHours: totalHours ?? this.totalHours,
|
||||||
|
totalValue: totalValue ?? this.totalValue,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
enum BillingPeriod {
|
||||||
|
week,
|
||||||
|
month,
|
||||||
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
import 'package:krow_domain/krow_domain.dart';
|
import 'package:krow_domain/krow_domain.dart';
|
||||||
|
import '../models/billing_period.dart';
|
||||||
|
|
||||||
/// Repository interface for billing related operations.
|
/// Repository interface for billing related operations.
|
||||||
///
|
///
|
||||||
@@ -19,5 +20,5 @@ abstract class BillingRepository {
|
|||||||
Future<double> getSavingsAmount();
|
Future<double> getSavingsAmount();
|
||||||
|
|
||||||
/// Fetches invoice items for spending breakdown analysis.
|
/// Fetches invoice items for spending breakdown analysis.
|
||||||
Future<List<InvoiceItem>> getSpendingBreakdown();
|
Future<List<InvoiceItem>> getSpendingBreakdown(BillingPeriod period);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,17 +1,20 @@
|
|||||||
import 'package:krow_core/core.dart';
|
import 'package:krow_core/core.dart';
|
||||||
import 'package:krow_domain/krow_domain.dart';
|
import 'package:krow_domain/krow_domain.dart';
|
||||||
|
import '../models/billing_period.dart';
|
||||||
import '../repositories/billing_repository.dart';
|
import '../repositories/billing_repository.dart';
|
||||||
|
|
||||||
/// Use case for fetching the spending breakdown items.
|
/// Use case for fetching the spending breakdown items.
|
||||||
///
|
///
|
||||||
/// This use case encapsulates the logic for retrieving the spending breakdown by category or item.
|
/// This use case encapsulates the logic for retrieving the spending breakdown by category or item.
|
||||||
/// It delegates the data retrieval to the [BillingRepository].
|
/// It delegates the data retrieval to the [BillingRepository].
|
||||||
class GetSpendingBreakdownUseCase extends NoInputUseCase<List<InvoiceItem>> {
|
class GetSpendingBreakdownUseCase
|
||||||
|
extends UseCase<BillingPeriod, List<InvoiceItem>> {
|
||||||
/// Creates a [GetSpendingBreakdownUseCase].
|
/// Creates a [GetSpendingBreakdownUseCase].
|
||||||
GetSpendingBreakdownUseCase(this._repository);
|
GetSpendingBreakdownUseCase(this._repository);
|
||||||
|
|
||||||
final BillingRepository _repository;
|
final BillingRepository _repository;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<List<InvoiceItem>> call() => _repository.getSpendingBreakdown();
|
Future<List<InvoiceItem>> call(BillingPeriod period) =>
|
||||||
|
_repository.getSpendingBreakdown(period);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:krow_domain/krow_domain.dart';
|
import 'package:krow_domain/krow_domain.dart';
|
||||||
|
import '../../domain/models/billing_period.dart';
|
||||||
import '../../domain/usecases/get_current_bill_amount.dart';
|
import '../../domain/usecases/get_current_bill_amount.dart';
|
||||||
import '../../domain/usecases/get_invoice_history.dart';
|
import '../../domain/usecases/get_invoice_history.dart';
|
||||||
import '../../domain/usecases/get_pending_invoices.dart';
|
import '../../domain/usecases/get_pending_invoices.dart';
|
||||||
@@ -26,6 +27,7 @@ class BillingBloc extends Bloc<BillingEvent, BillingState> {
|
|||||||
_getSpendingBreakdown = getSpendingBreakdown,
|
_getSpendingBreakdown = getSpendingBreakdown,
|
||||||
super(const BillingState()) {
|
super(const BillingState()) {
|
||||||
on<BillingLoadStarted>(_onLoadStarted);
|
on<BillingLoadStarted>(_onLoadStarted);
|
||||||
|
on<BillingPeriodChanged>(_onPeriodChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
final GetCurrentBillAmountUseCase _getCurrentBillAmount;
|
final GetCurrentBillAmountUseCase _getCurrentBillAmount;
|
||||||
@@ -45,7 +47,7 @@ class BillingBloc extends Bloc<BillingEvent, BillingState> {
|
|||||||
_getSavingsAmount.call(),
|
_getSavingsAmount.call(),
|
||||||
_getPendingInvoices.call(),
|
_getPendingInvoices.call(),
|
||||||
_getInvoiceHistory.call(),
|
_getInvoiceHistory.call(),
|
||||||
_getSpendingBreakdown.call(),
|
_getSpendingBreakdown.call(state.period),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
final double currentBill = results[0] as double;
|
final double currentBill = results[0] as double;
|
||||||
@@ -62,11 +64,15 @@ class BillingBloc extends Bloc<BillingEvent, BillingState> {
|
|||||||
.map(_mapInvoiceToUiModel)
|
.map(_mapInvoiceToUiModel)
|
||||||
.toList();
|
.toList();
|
||||||
final List<SpendingBreakdownItem> uiSpendingBreakdown = _mapSpendingItemsToUiModel(spendingItems);
|
final List<SpendingBreakdownItem> uiSpendingBreakdown = _mapSpendingItemsToUiModel(spendingItems);
|
||||||
|
final double periodTotal = uiSpendingBreakdown.fold(
|
||||||
|
0.0,
|
||||||
|
(double sum, SpendingBreakdownItem item) => sum + item.amount,
|
||||||
|
);
|
||||||
|
|
||||||
emit(
|
emit(
|
||||||
state.copyWith(
|
state.copyWith(
|
||||||
status: BillingStatus.success,
|
status: BillingStatus.success,
|
||||||
currentBill: currentBill,
|
currentBill: periodTotal,
|
||||||
savings: savings,
|
savings: savings,
|
||||||
pendingInvoices: uiPendingInvoices,
|
pendingInvoices: uiPendingInvoices,
|
||||||
invoiceHistory: uiInvoiceHistory,
|
invoiceHistory: uiInvoiceHistory,
|
||||||
@@ -83,37 +89,66 @@ class BillingBloc extends Bloc<BillingEvent, BillingState> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<void> _onPeriodChanged(
|
||||||
|
BillingPeriodChanged event,
|
||||||
|
Emitter<BillingState> emit,
|
||||||
|
) async {
|
||||||
|
try {
|
||||||
|
final List<InvoiceItem> spendingItems =
|
||||||
|
await _getSpendingBreakdown.call(event.period);
|
||||||
|
final List<SpendingBreakdownItem> uiSpendingBreakdown =
|
||||||
|
_mapSpendingItemsToUiModel(spendingItems);
|
||||||
|
final double periodTotal = uiSpendingBreakdown.fold(
|
||||||
|
0.0,
|
||||||
|
(double sum, SpendingBreakdownItem item) => sum + item.amount,
|
||||||
|
);
|
||||||
|
emit(
|
||||||
|
state.copyWith(
|
||||||
|
period: event.period,
|
||||||
|
spendingBreakdown: uiSpendingBreakdown,
|
||||||
|
currentBill: periodTotal,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
} catch (e) {
|
||||||
|
emit(
|
||||||
|
state.copyWith(
|
||||||
|
status: BillingStatus.failure,
|
||||||
|
errorMessage: e.toString(),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
BillingInvoice _mapInvoiceToUiModel(Invoice invoice) {
|
BillingInvoice _mapInvoiceToUiModel(Invoice invoice) {
|
||||||
// In a real app, fetches related Event/Business names via ID.
|
// In a real app, fetches related Event/Business names via ID.
|
||||||
// For now, mapping available fields and hardcoding missing UI placeholders.
|
// For now, mapping available fields and hardcoding missing UI placeholders.
|
||||||
// Preserving "Existing Behavior" means we show something.
|
// Preserving "Existing Behavior" means we show something.
|
||||||
|
final String dateLabel = invoice.issueDate == null
|
||||||
|
? '2024-01-24'
|
||||||
|
: invoice.issueDate!.toIso8601String().split('T').first;
|
||||||
|
final String titleLabel = invoice.invoiceNumber ?? invoice.id;
|
||||||
return BillingInvoice(
|
return BillingInvoice(
|
||||||
id: invoice.id,
|
id: titleLabel,
|
||||||
title: 'Invoice #${invoice.id}', // Placeholder as Invoice lacks title
|
title: 'Invoice #${invoice.id}', // Placeholder as Invoice lacks title
|
||||||
locationAddress:
|
locationAddress:
|
||||||
'Location for ${invoice.eventId}', // Placeholder for address
|
'Location for ${invoice.eventId}', // Placeholder for address
|
||||||
clientName: 'Client ${invoice.businessId}', // Placeholder for client name
|
clientName: 'Client ${invoice.businessId}', // Placeholder for client name
|
||||||
date: '2024-01-24', // Placeholder date
|
date: dateLabel,
|
||||||
totalAmount: invoice.totalAmount,
|
totalAmount: invoice.totalAmount,
|
||||||
workersCount: 5, // Placeholder count
|
workersCount: 5, // Placeholder count
|
||||||
totalHours: invoice.workAmount / 25.0, // Estimating hours from amount
|
totalHours: invoice.workAmount / 25.0, // Estimating hours from amount
|
||||||
status: invoice.status.name,
|
status: invoice.status.name.toUpperCase(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<SpendingBreakdownItem> _mapSpendingItemsToUiModel(
|
List<SpendingBreakdownItem> _mapSpendingItemsToUiModel(
|
||||||
List<InvoiceItem> items,
|
List<InvoiceItem> items,
|
||||||
) {
|
) {
|
||||||
// Aggregating items by some logic.
|
final Map<String, SpendingBreakdownItem> aggregation =
|
||||||
// Since InvoiceItem doesn't have category, we mock it based on staffId or similar.
|
<String, SpendingBreakdownItem>{};
|
||||||
final Map<String, SpendingBreakdownItem> aggregation = <String, SpendingBreakdownItem>{};
|
|
||||||
|
|
||||||
for (final InvoiceItem item in items) {
|
for (final InvoiceItem item in items) {
|
||||||
// Mocking category derivation
|
final String category = item.staffId;
|
||||||
final String category = item.staffId.hashCode % 2 == 0
|
|
||||||
? 'Server Staff'
|
|
||||||
: 'Bar Staff';
|
|
||||||
|
|
||||||
final SpendingBreakdownItem? existing = aggregation[category];
|
final SpendingBreakdownItem? existing = aggregation[category];
|
||||||
if (existing != null) {
|
if (existing != null) {
|
||||||
aggregation[category] = SpendingBreakdownItem(
|
aggregation[category] = SpendingBreakdownItem(
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import 'package:equatable/equatable.dart';
|
import 'package:equatable/equatable.dart';
|
||||||
|
import '../../domain/models/billing_period.dart';
|
||||||
|
|
||||||
/// Base class for all billing events.
|
/// Base class for all billing events.
|
||||||
abstract class BillingEvent extends Equatable {
|
abstract class BillingEvent extends Equatable {
|
||||||
@@ -14,3 +15,12 @@ class BillingLoadStarted extends BillingEvent {
|
|||||||
/// Creates a [BillingLoadStarted] event.
|
/// Creates a [BillingLoadStarted] event.
|
||||||
const BillingLoadStarted();
|
const BillingLoadStarted();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class BillingPeriodChanged extends BillingEvent {
|
||||||
|
const BillingPeriodChanged(this.period);
|
||||||
|
|
||||||
|
final BillingPeriod period;
|
||||||
|
|
||||||
|
@override
|
||||||
|
List<Object?> get props => <Object?>[period];
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import 'package:equatable/equatable.dart';
|
import 'package:equatable/equatable.dart';
|
||||||
|
import '../../domain/models/billing_period.dart';
|
||||||
import '../models/billing_invoice_model.dart';
|
import '../models/billing_invoice_model.dart';
|
||||||
import '../models/spending_breakdown_model.dart';
|
import '../models/spending_breakdown_model.dart';
|
||||||
|
|
||||||
@@ -27,6 +28,7 @@ class BillingState extends Equatable {
|
|||||||
this.pendingInvoices = const <BillingInvoice>[],
|
this.pendingInvoices = const <BillingInvoice>[],
|
||||||
this.invoiceHistory = const <BillingInvoice>[],
|
this.invoiceHistory = const <BillingInvoice>[],
|
||||||
this.spendingBreakdown = const <SpendingBreakdownItem>[],
|
this.spendingBreakdown = const <SpendingBreakdownItem>[],
|
||||||
|
this.period = BillingPeriod.week,
|
||||||
this.errorMessage,
|
this.errorMessage,
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -48,6 +50,9 @@ class BillingState extends Equatable {
|
|||||||
/// Breakdown of spending by category.
|
/// Breakdown of spending by category.
|
||||||
final List<SpendingBreakdownItem> spendingBreakdown;
|
final List<SpendingBreakdownItem> spendingBreakdown;
|
||||||
|
|
||||||
|
/// Selected period for the breakdown.
|
||||||
|
final BillingPeriod period;
|
||||||
|
|
||||||
/// Error message if loading failed.
|
/// Error message if loading failed.
|
||||||
final String? errorMessage;
|
final String? errorMessage;
|
||||||
|
|
||||||
@@ -59,6 +64,7 @@ class BillingState extends Equatable {
|
|||||||
List<BillingInvoice>? pendingInvoices,
|
List<BillingInvoice>? pendingInvoices,
|
||||||
List<BillingInvoice>? invoiceHistory,
|
List<BillingInvoice>? invoiceHistory,
|
||||||
List<SpendingBreakdownItem>? spendingBreakdown,
|
List<SpendingBreakdownItem>? spendingBreakdown,
|
||||||
|
BillingPeriod? period,
|
||||||
String? errorMessage,
|
String? errorMessage,
|
||||||
}) {
|
}) {
|
||||||
return BillingState(
|
return BillingState(
|
||||||
@@ -68,6 +74,7 @@ class BillingState extends Equatable {
|
|||||||
pendingInvoices: pendingInvoices ?? this.pendingInvoices,
|
pendingInvoices: pendingInvoices ?? this.pendingInvoices,
|
||||||
invoiceHistory: invoiceHistory ?? this.invoiceHistory,
|
invoiceHistory: invoiceHistory ?? this.invoiceHistory,
|
||||||
spendingBreakdown: spendingBreakdown ?? this.spendingBreakdown,
|
spendingBreakdown: spendingBreakdown ?? this.spendingBreakdown,
|
||||||
|
period: period ?? this.period,
|
||||||
errorMessage: errorMessage ?? this.errorMessage,
|
errorMessage: errorMessage ?? this.errorMessage,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -80,6 +87,7 @@ class BillingState extends Equatable {
|
|||||||
pendingInvoices,
|
pendingInvoices,
|
||||||
invoiceHistory,
|
invoiceHistory,
|
||||||
spendingBreakdown,
|
spendingBreakdown,
|
||||||
|
period,
|
||||||
errorMessage,
|
errorMessage,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ class _InvoiceItem extends StatelessWidget {
|
|||||||
'\$${invoice.totalAmount.toStringAsFixed(2)}',
|
'\$${invoice.totalAmount.toStringAsFixed(2)}',
|
||||||
style: UiTypography.body2b.textPrimary,
|
style: UiTypography.body2b.textPrimary,
|
||||||
),
|
),
|
||||||
const _PaidBadge(),
|
_StatusBadge(status: invoice.status),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
const SizedBox(width: UiConstants.space2),
|
const SizedBox(width: UiConstants.space2),
|
||||||
@@ -125,21 +125,24 @@ class _InvoiceItem extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class _PaidBadge extends StatelessWidget {
|
class _StatusBadge extends StatelessWidget {
|
||||||
const _PaidBadge();
|
const _StatusBadge({required this.status});
|
||||||
|
|
||||||
|
final String status;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
final bool isPaid = status.toUpperCase() == 'PAID';
|
||||||
return Container(
|
return Container(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 6, vertical: 2),
|
padding: const EdgeInsets.symmetric(horizontal: 6, vertical: 2),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: UiColors.tagSuccess,
|
color: isPaid ? UiColors.tagSuccess : UiColors.tagPending,
|
||||||
borderRadius: BorderRadius.circular(4),
|
borderRadius: BorderRadius.circular(4),
|
||||||
),
|
),
|
||||||
child: Text(
|
child: Text(
|
||||||
t.client_billing.paid_badge,
|
isPaid ? t.client_billing.paid_badge : t.client_billing.pending_badge,
|
||||||
style: UiTypography.titleUppercase4b.copyWith(
|
style: UiTypography.titleUppercase4b.copyWith(
|
||||||
color: UiColors.iconSuccess,
|
color: isPaid ? UiColors.iconSuccess : UiColors.textWarning,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,111 +1,176 @@
|
|||||||
import 'package:core_localization/core_localization.dart';
|
import 'package:core_localization/core_localization.dart';
|
||||||
import 'package:design_system/design_system.dart';
|
import 'package:design_system/design_system.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:firebase_data_connect/firebase_data_connect.dart' as fdc;
|
||||||
|
import 'package:krow_data_connect/krow_data_connect.dart' as dc;
|
||||||
|
|
||||||
/// Card showing the current payment method.
|
/// Card showing the current payment method.
|
||||||
class PaymentMethodCard extends StatelessWidget {
|
class PaymentMethodCard extends StatefulWidget {
|
||||||
/// Creates a [PaymentMethodCard].
|
/// Creates a [PaymentMethodCard].
|
||||||
const PaymentMethodCard({super.key});
|
const PaymentMethodCard({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<PaymentMethodCard> createState() => _PaymentMethodCardState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _PaymentMethodCardState extends State<PaymentMethodCard> {
|
||||||
|
late final Future<dc.GetAccountsByOwnerIdData?> _accountsFuture =
|
||||||
|
_loadAccounts();
|
||||||
|
|
||||||
|
Future<dc.GetAccountsByOwnerIdData?> _loadAccounts() async {
|
||||||
|
final String? businessId =
|
||||||
|
dc.ClientSessionStore.instance.session?.business?.id;
|
||||||
|
if (businessId == null || businessId.isEmpty) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
final fdc.QueryResult<dc.GetAccountsByOwnerIdData,
|
||||||
|
dc.GetAccountsByOwnerIdVariables> result =
|
||||||
|
await dc.ExampleConnector.instance
|
||||||
|
.getAccountsByOwnerId(ownerId: businessId)
|
||||||
|
.execute();
|
||||||
|
return result.data;
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Container(
|
return FutureBuilder<dc.GetAccountsByOwnerIdData?>(
|
||||||
padding: const EdgeInsets.all(UiConstants.space4),
|
future: _accountsFuture,
|
||||||
decoration: BoxDecoration(
|
builder: (BuildContext context,
|
||||||
color: UiColors.white,
|
AsyncSnapshot<dc.GetAccountsByOwnerIdData?> snapshot) {
|
||||||
borderRadius: UiConstants.radiusLg,
|
final List<dc.GetAccountsByOwnerIdAccounts> accounts =
|
||||||
border: Border.all(color: UiColors.border),
|
snapshot.data?.accounts ??
|
||||||
boxShadow: <BoxShadow>[
|
<dc.GetAccountsByOwnerIdAccounts>[];
|
||||||
BoxShadow(
|
final dc.GetAccountsByOwnerIdAccounts? account =
|
||||||
color: UiColors.black.withValues(alpha: 0.04),
|
accounts.isNotEmpty ? accounts.first : null;
|
||||||
blurRadius: 8,
|
final String bankLabel =
|
||||||
offset: const Offset(0, 2),
|
account?.bank.isNotEmpty == true ? account!.bank : '----';
|
||||||
),
|
final String last4 =
|
||||||
],
|
account?.last4.isNotEmpty == true ? account!.last4 : '----';
|
||||||
),
|
final bool isPrimary = account?.isPrimary ?? false;
|
||||||
child: Column(
|
final String expiryLabel = _formatExpiry(account?.expiryTime);
|
||||||
children: <Widget>[
|
|
||||||
Row(
|
return Container(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
padding: const EdgeInsets.all(UiConstants.space4),
|
||||||
children: <Widget>[
|
decoration: BoxDecoration(
|
||||||
Text(
|
color: UiColors.white,
|
||||||
t.client_billing.payment_method,
|
borderRadius: UiConstants.radiusLg,
|
||||||
style: UiTypography.title2b.textPrimary,
|
border: Border.all(color: UiColors.border),
|
||||||
),
|
boxShadow: <BoxShadow>[
|
||||||
GestureDetector(
|
BoxShadow(
|
||||||
onTap: () {},
|
color: UiColors.black.withValues(alpha: 0.04),
|
||||||
child: Row(
|
blurRadius: 8,
|
||||||
children: <Widget>[
|
offset: const Offset(0, 2),
|
||||||
const Icon(UiIcons.add, size: 14, color: UiColors.primary),
|
|
||||||
const SizedBox(width: 4),
|
|
||||||
Text(
|
|
||||||
t.client_billing.add_payment,
|
|
||||||
style: UiTypography.footnote2b.textPrimary,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
const SizedBox(height: UiConstants.space3),
|
child: Column(
|
||||||
Container(
|
children: <Widget>[
|
||||||
padding: const EdgeInsets.all(UiConstants.space3),
|
Row(
|
||||||
decoration: BoxDecoration(
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
color: UiColors.bgSecondary,
|
children: <Widget>[
|
||||||
borderRadius: UiConstants.radiusMd,
|
Text(
|
||||||
),
|
t.client_billing.payment_method,
|
||||||
child: Row(
|
style: UiTypography.title2b.textPrimary,
|
||||||
children: <Widget>[
|
|
||||||
Container(
|
|
||||||
width: 40,
|
|
||||||
height: 28,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: UiColors.primary,
|
|
||||||
borderRadius: BorderRadius.circular(4),
|
|
||||||
),
|
),
|
||||||
child: const Center(
|
GestureDetector(
|
||||||
child: Text(
|
onTap: () {},
|
||||||
'VISA',
|
child: Row(
|
||||||
style: TextStyle(
|
children: <Widget>[
|
||||||
color: UiColors.white,
|
const Icon(
|
||||||
fontSize: 10,
|
UiIcons.add,
|
||||||
fontWeight: FontWeight.bold,
|
size: 14,
|
||||||
),
|
color: UiColors.primary,
|
||||||
|
),
|
||||||
|
const SizedBox(width: 4),
|
||||||
|
Text(
|
||||||
|
t.client_billing.add_payment,
|
||||||
|
style: UiTypography.footnote2b.textPrimary,
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
const SizedBox(width: UiConstants.space3),
|
),
|
||||||
Expanded(
|
if (account != null) ...<Widget>[
|
||||||
child: Column(
|
const SizedBox(height: UiConstants.space3),
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
Container(
|
||||||
|
padding: const EdgeInsets.all(UiConstants.space3),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: UiColors.bgSecondary,
|
||||||
|
borderRadius: UiConstants.radiusMd,
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Text('•••• 4242', style: UiTypography.body2b.textPrimary),
|
Container(
|
||||||
Text(
|
width: 40,
|
||||||
t.client_billing.expires(date: '12/25'),
|
height: 28,
|
||||||
style: UiTypography.footnote2r.textSecondary,
|
decoration: BoxDecoration(
|
||||||
|
color: UiColors.primary,
|
||||||
|
borderRadius: BorderRadius.circular(4),
|
||||||
|
),
|
||||||
|
child: Center(
|
||||||
|
child: Text(
|
||||||
|
bankLabel,
|
||||||
|
style: const TextStyle(
|
||||||
|
color: UiColors.white,
|
||||||
|
fontSize: 10,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
maxLines: 1,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
|
const SizedBox(width: UiConstants.space3),
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
Text(
|
||||||
|
'•••• $last4',
|
||||||
|
style: UiTypography.body2b.textPrimary,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
t.client_billing.expires(date: expiryLabel),
|
||||||
|
style: UiTypography.footnote2r.textSecondary,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
if (isPrimary)
|
||||||
|
Container(
|
||||||
|
padding: const EdgeInsets.symmetric(
|
||||||
|
horizontal: 6,
|
||||||
|
vertical: 2,
|
||||||
|
),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: UiColors.accent,
|
||||||
|
borderRadius: BorderRadius.circular(4),
|
||||||
|
),
|
||||||
|
child: Text(
|
||||||
|
t.client_billing.default_badge,
|
||||||
|
style: UiTypography.titleUppercase4b.textPrimary,
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Container(
|
|
||||||
padding: const EdgeInsets.symmetric(
|
|
||||||
horizontal: 6,
|
|
||||||
vertical: 2,
|
|
||||||
),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: UiColors.accent,
|
|
||||||
borderRadius: BorderRadius.circular(4),
|
|
||||||
),
|
|
||||||
child: Text(
|
|
||||||
t.client_billing.default_badge,
|
|
||||||
style: UiTypography.titleUppercase4b.textPrimary,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
],
|
||||||
),
|
),
|
||||||
],
|
);
|
||||||
),
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String _formatExpiry(fdc.Timestamp? expiryTime) {
|
||||||
|
if (expiryTime == null) {
|
||||||
|
return 'N/A';
|
||||||
|
}
|
||||||
|
final DateTime date = expiryTime.toDateTime();
|
||||||
|
final String month = date.month.toString().padLeft(2, '0');
|
||||||
|
final String year = (date.year % 100).toString().padLeft(2, '0');
|
||||||
|
return '$month/$year';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,10 @@ import 'package:core_localization/core_localization.dart';
|
|||||||
import 'package:design_system/design_system.dart';
|
import 'package:design_system/design_system.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
|
import '../../domain/models/billing_period.dart';
|
||||||
import '../blocs/billing_bloc.dart';
|
import '../blocs/billing_bloc.dart';
|
||||||
import '../blocs/billing_state.dart';
|
import '../blocs/billing_state.dart';
|
||||||
|
import '../blocs/billing_event.dart';
|
||||||
import '../models/spending_breakdown_model.dart';
|
import '../models/spending_breakdown_model.dart';
|
||||||
|
|
||||||
/// Card showing the spending breakdown for the current period.
|
/// Card showing the spending breakdown for the current period.
|
||||||
@@ -92,6 +94,13 @@ class _SpendingBreakdownCardState extends State<SpendingBreakdownCard>
|
|||||||
indicatorSize: TabBarIndicatorSize.tab,
|
indicatorSize: TabBarIndicatorSize.tab,
|
||||||
labelPadding: const EdgeInsets.symmetric(horizontal: 12),
|
labelPadding: const EdgeInsets.symmetric(horizontal: 12),
|
||||||
dividerColor: Colors.transparent,
|
dividerColor: Colors.transparent,
|
||||||
|
onTap: (int index) {
|
||||||
|
final BillingPeriod period =
|
||||||
|
index == 0 ? BillingPeriod.week : BillingPeriod.month;
|
||||||
|
context.read<BillingBloc>().add(
|
||||||
|
BillingPeriodChanged(period),
|
||||||
|
);
|
||||||
|
},
|
||||||
tabs: <Widget>[
|
tabs: <Widget>[
|
||||||
Tab(text: t.client_billing.week),
|
Tab(text: t.client_billing.week),
|
||||||
Tab(text: t.client_billing.month),
|
Tab(text: t.client_billing.month),
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ mutation createAccount(
|
|||||||
$ownerId: UUID!
|
$ownerId: UUID!
|
||||||
$accountNumber: String
|
$accountNumber: String
|
||||||
$routeNumber: String
|
$routeNumber: String
|
||||||
|
$expiryTime: Timestamp
|
||||||
) @auth(level: USER) {
|
) @auth(level: USER) {
|
||||||
account_insert(
|
account_insert(
|
||||||
data: {
|
data: {
|
||||||
@@ -16,6 +17,7 @@ mutation createAccount(
|
|||||||
ownerId: $ownerId
|
ownerId: $ownerId
|
||||||
accountNumber: $accountNumber
|
accountNumber: $accountNumber
|
||||||
routeNumber: $routeNumber
|
routeNumber: $routeNumber
|
||||||
|
expiryTime: $expiryTime
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -28,6 +30,7 @@ mutation updateAccount(
|
|||||||
$isPrimary: Boolean
|
$isPrimary: Boolean
|
||||||
$accountNumber: String
|
$accountNumber: String
|
||||||
$routeNumber: String
|
$routeNumber: String
|
||||||
|
$expiryTime: Timestamp
|
||||||
) @auth(level: USER) {
|
) @auth(level: USER) {
|
||||||
account_update(
|
account_update(
|
||||||
id: $id
|
id: $id
|
||||||
@@ -38,6 +41,7 @@ mutation updateAccount(
|
|||||||
isPrimary: $isPrimary
|
isPrimary: $isPrimary
|
||||||
accountNumber: $accountNumber
|
accountNumber: $accountNumber
|
||||||
routeNumber: $routeNumber
|
routeNumber: $routeNumber
|
||||||
|
expiryTime: $expiryTime
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ query listAccounts @auth(level: USER) {
|
|||||||
ownerId
|
ownerId
|
||||||
accountNumber
|
accountNumber
|
||||||
routeNumber
|
routeNumber
|
||||||
|
expiryTime
|
||||||
createdAt
|
createdAt
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -22,6 +23,7 @@ query getAccountById($id: UUID!) @auth(level: USER) {
|
|||||||
ownerId
|
ownerId
|
||||||
accountNumber
|
accountNumber
|
||||||
routeNumber
|
routeNumber
|
||||||
|
expiryTime
|
||||||
createdAt
|
createdAt
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -36,6 +38,7 @@ query getAccountsByOwnerId($ownerId: UUID!) @auth(level: USER) {
|
|||||||
ownerId
|
ownerId
|
||||||
accountNumber
|
accountNumber
|
||||||
routeNumber
|
routeNumber
|
||||||
|
expiryTime
|
||||||
createdAt
|
createdAt
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -61,6 +64,7 @@ query filterAccounts(
|
|||||||
isPrimary
|
isPrimary
|
||||||
ownerId
|
ownerId
|
||||||
accountNumber
|
accountNumber
|
||||||
|
expiryTime
|
||||||
routeNumber
|
routeNumber
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -435,3 +435,30 @@ query listShiftRolesByBusinessDateRangeCompletedOrders(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#view for billing period
|
||||||
|
query listShiftRolesByBusinessAndDatesSummary(
|
||||||
|
$businessId: UUID!
|
||||||
|
$start: Timestamp!
|
||||||
|
$end: Timestamp!
|
||||||
|
$offset: Int
|
||||||
|
$limit: Int
|
||||||
|
) @auth(level: USER) {
|
||||||
|
shiftRoles(
|
||||||
|
where: {
|
||||||
|
shift: {
|
||||||
|
date: { ge: $start, le: $end }
|
||||||
|
status: { eq: COMPLETED }
|
||||||
|
order: { businessId: { eq: $businessId } }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
offset: $offset
|
||||||
|
limit: $limit
|
||||||
|
orderBy: { createdAt: DESC }
|
||||||
|
) {
|
||||||
|
roleId
|
||||||
|
hours
|
||||||
|
totalValue
|
||||||
|
role { id name }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ type Account @table(name: "accounts") {
|
|||||||
accountNumber: String
|
accountNumber: String
|
||||||
routeNumber: String
|
routeNumber: String
|
||||||
ownerId: UUID! #staff/business
|
ownerId: UUID! #staff/business
|
||||||
|
expiryTime: Timestamp
|
||||||
createdAt: Timestamp @default(expr: "request.time")
|
createdAt: Timestamp @default(expr: "request.time")
|
||||||
updatedAt: Timestamp @default(expr: "request.time")
|
updatedAt: Timestamp @default(expr: "request.time")
|
||||||
createdBy: String
|
createdBy: String
|
||||||
|
|||||||
Reference in New Issue
Block a user