completed migrating data scope from user to workspace

This commit is contained in:
2026-06-22 22:10:38 +02:00
parent 62c7f53de0
commit ae2705363a
37 changed files with 918 additions and 221 deletions

View File

@@ -99,6 +99,7 @@ class PayController extends ChangeNotifier {
paymentProcessorImage: model.selectedPaymentProcessor?.image ?? '',
providerImage: model.selectedProvider?.image ?? '',
providerLabel: model.selectedProvider?.label ?? '',
workspaceId: prefs.getString("workspaceId") ?? '',
userId: prefs.getString("userId") ?? '',
creditName: transactionController.model.formData.creditName,
creditEmail: transactionController.model.formData.creditEmail,

View File

@@ -13,7 +13,7 @@ part of 'pay_controller.dart';
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$PaymentProcessor {
mixin _$PaymentProcessor implements DiagnosticableTreeMixin {
String get name; String get description; String get image; String get accountFieldName; String get accountFieldLabel; String get label; String get authType;
/// Create a copy of PaymentProcessor
@@ -25,6 +25,12 @@ $PaymentProcessorCopyWith<PaymentProcessor> get copyWith => _$PaymentProcessorCo
/// Serializes this PaymentProcessor to a JSON map.
Map<String, dynamic> toJson();
@override
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
properties
..add(DiagnosticsProperty('type', 'PaymentProcessor'))
..add(DiagnosticsProperty('name', name))..add(DiagnosticsProperty('description', description))..add(DiagnosticsProperty('image', image))..add(DiagnosticsProperty('accountFieldName', accountFieldName))..add(DiagnosticsProperty('accountFieldLabel', accountFieldLabel))..add(DiagnosticsProperty('label', label))..add(DiagnosticsProperty('authType', authType));
}
@override
bool operator ==(Object other) {
@@ -36,7 +42,7 @@ bool operator ==(Object other) {
int get hashCode => Object.hash(runtimeType,name,description,image,accountFieldName,accountFieldLabel,label,authType);
@override
String toString() {
String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) {
return 'PaymentProcessor(name: $name, description: $description, image: $image, accountFieldName: $accountFieldName, accountFieldLabel: $accountFieldLabel, label: $label, authType: $authType)';
}
@@ -214,7 +220,7 @@ return $default(_that.name,_that.description,_that.image,_that.accountFieldName,
/// @nodoc
@JsonSerializable()
class _PaymentProcessor implements PaymentProcessor {
class _PaymentProcessor with DiagnosticableTreeMixin implements PaymentProcessor {
const _PaymentProcessor({required this.name, required this.description, required this.image, required this.accountFieldName, required this.accountFieldLabel, required this.label, required this.authType});
factory _PaymentProcessor.fromJson(Map<String, dynamic> json) => _$PaymentProcessorFromJson(json);
@@ -236,6 +242,12 @@ _$PaymentProcessorCopyWith<_PaymentProcessor> get copyWith => __$PaymentProcesso
Map<String, dynamic> toJson() {
return _$PaymentProcessorToJson(this, );
}
@override
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
properties
..add(DiagnosticsProperty('type', 'PaymentProcessor'))
..add(DiagnosticsProperty('name', name))..add(DiagnosticsProperty('description', description))..add(DiagnosticsProperty('image', image))..add(DiagnosticsProperty('accountFieldName', accountFieldName))..add(DiagnosticsProperty('accountFieldLabel', accountFieldLabel))..add(DiagnosticsProperty('label', label))..add(DiagnosticsProperty('authType', authType));
}
@override
bool operator ==(Object other) {
@@ -247,7 +259,7 @@ bool operator ==(Object other) {
int get hashCode => Object.hash(runtimeType,name,description,image,accountFieldName,accountFieldLabel,label,authType);
@override
String toString() {
String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) {
return 'PaymentProcessor(name: $name, description: $description, image: $image, accountFieldName: $accountFieldName, accountFieldLabel: $accountFieldLabel, label: $label, authType: $authType)';
}
@@ -294,7 +306,7 @@ as String,
/// @nodoc
mixin _$BillProduct {
mixin _$BillProduct implements DiagnosticableTreeMixin {
String get uid; String get name; String get description; String get displayName; double get defaultAmount; bool get requiresAmount;
/// Create a copy of BillProduct
@@ -306,6 +318,12 @@ $BillProductCopyWith<BillProduct> get copyWith => _$BillProductCopyWithImpl<Bill
/// Serializes this BillProduct to a JSON map.
Map<String, dynamic> toJson();
@override
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
properties
..add(DiagnosticsProperty('type', 'BillProduct'))
..add(DiagnosticsProperty('uid', uid))..add(DiagnosticsProperty('name', name))..add(DiagnosticsProperty('description', description))..add(DiagnosticsProperty('displayName', displayName))..add(DiagnosticsProperty('defaultAmount', defaultAmount))..add(DiagnosticsProperty('requiresAmount', requiresAmount));
}
@override
bool operator ==(Object other) {
@@ -317,7 +335,7 @@ bool operator ==(Object other) {
int get hashCode => Object.hash(runtimeType,uid,name,description,displayName,defaultAmount,requiresAmount);
@override
String toString() {
String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) {
return 'BillProduct(uid: $uid, name: $name, description: $description, displayName: $displayName, defaultAmount: $defaultAmount, requiresAmount: $requiresAmount)';
}
@@ -494,7 +512,7 @@ return $default(_that.uid,_that.name,_that.description,_that.displayName,_that.d
/// @nodoc
@JsonSerializable()
class _BillProduct implements BillProduct {
class _BillProduct with DiagnosticableTreeMixin implements BillProduct {
const _BillProduct({required this.uid, required this.name, required this.description, required this.displayName, required this.defaultAmount, required this.requiresAmount});
factory _BillProduct.fromJson(Map<String, dynamic> json) => _$BillProductFromJson(json);
@@ -515,6 +533,12 @@ _$BillProductCopyWith<_BillProduct> get copyWith => __$BillProductCopyWithImpl<_
Map<String, dynamic> toJson() {
return _$BillProductToJson(this, );
}
@override
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
properties
..add(DiagnosticsProperty('type', 'BillProduct'))
..add(DiagnosticsProperty('uid', uid))..add(DiagnosticsProperty('name', name))..add(DiagnosticsProperty('description', description))..add(DiagnosticsProperty('displayName', displayName))..add(DiagnosticsProperty('defaultAmount', defaultAmount))..add(DiagnosticsProperty('requiresAmount', requiresAmount));
}
@override
bool operator ==(Object other) {
@@ -526,7 +550,7 @@ bool operator ==(Object other) {
int get hashCode => Object.hash(runtimeType,uid,name,description,displayName,defaultAmount,requiresAmount);
@override
String toString() {
String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) {
return 'BillProduct(uid: $uid, name: $name, description: $description, displayName: $displayName, defaultAmount: $defaultAmount, requiresAmount: $requiresAmount)';
}