fixed some issues and added label and, or capability
This commit is contained in:
@@ -534,6 +534,7 @@ class PbSyncService {
|
||||
},
|
||||
'budgetAverageMonths': r.getIntValue('budget_average_months', 3),
|
||||
'labelIds': _jsonStringList(r.get<dynamic>('label_ids')),
|
||||
'labelMatch': r.getStringValue('label_match'),
|
||||
'flow': r.getStringValue('flow'),
|
||||
'amountRange': rangeRaw is Map
|
||||
? Map<String, dynamic>.from(rangeRaw)
|
||||
@@ -1259,6 +1260,7 @@ class PbSyncService {
|
||||
'budget_fixed_amount': w.budgetFixedAmount,
|
||||
'budget_average_months': w.budgetAverageMonths,
|
||||
'label_ids': w.labelIds,
|
||||
'label_match': w.labelMatch.name,
|
||||
'flow': w.flow.name,
|
||||
'amount_range': {
|
||||
if (w.amountRange.exact != null) 'exact': w.amountRange.exact,
|
||||
@@ -1402,6 +1404,10 @@ class PbSyncService {
|
||||
remote.getIntValue('budget_average_months', 3) ==
|
||||
w.budgetAverageMonths &&
|
||||
_sameIdList(remoteIds, w.labelIds) &&
|
||||
(remote.getStringValue('label_match').isEmpty
|
||||
? 'and'
|
||||
: remote.getStringValue('label_match')) ==
|
||||
w.labelMatch.name &&
|
||||
remote.getStringValue('flow') == w.flow.name &&
|
||||
asDouble(rangeMap['exact']) == w.amountRange.exact &&
|
||||
asDouble(rangeMap['min']) == w.amountRange.min &&
|
||||
|
||||
Reference in New Issue
Block a user