sign in with pocketbase working

This commit is contained in:
davmar
2026-09-09 19:59:38 +02:00
parent ae464ff304
commit c6d1fdb19e
27 changed files with 1267 additions and 312 deletions
+17 -2
View File
@@ -217,12 +217,16 @@ class TxMeta {
const TxMeta({
this.labelIds = const [],
this.recurring = false,
this.internalTransfer = false,
this.notes = '',
});
/// Zero or more label ids on this transaction.
final List<String> labelIds;
final bool recurring;
/// Move between own accounts — excluded from income/expense cashflow.
final bool internalTransfer;
final String notes;
static const empty = TxMeta();
@@ -239,11 +243,13 @@ class TxMeta {
List<String>? labelIds,
bool clearLabels = false,
bool? recurring,
bool? internalTransfer,
String? notes,
}) {
return TxMeta(
labelIds: clearLabels ? const [] : (labelIds ?? this.labelIds),
recurring: recurring ?? this.recurring,
internalTransfer: internalTransfer ?? this.internalTransfer,
notes: notes ?? this.notes,
);
}
@@ -254,6 +260,7 @@ class TxMeta {
'labelId': primaryLabelId,
'category': primaryLabelId,
'recurring': recurring,
'internalTransfer': internalTransfer,
'notes': notes,
};
@@ -261,6 +268,7 @@ class TxMeta {
return TxMeta(
labelIds: _parseLabelIds(json),
recurring: json['recurring'] as bool? ?? false,
internalTransfer: json['internalTransfer'] as bool? ?? false,
notes: json['notes'] as String? ?? '',
);
}
@@ -290,22 +298,29 @@ String? _migrateLegacyCategory(String? name) {
return name;
}
/// Notes / recurring template keyed by exact merchant+amount match.
/// Notes / recurring / transfer template keyed by exact merchant+amount match.
class TxExactTemplate {
const TxExactTemplate({this.notes = '', this.recurring = false});
const TxExactTemplate({
this.notes = '',
this.recurring = false,
this.internalTransfer = false,
});
final String notes;
final bool recurring;
final bool internalTransfer;
Map<String, dynamic> toJson() => {
'notes': notes,
'recurring': recurring,
'internalTransfer': internalTransfer,
};
factory TxExactTemplate.fromJson(Map<String, dynamic> json) {
return TxExactTemplate(
notes: json['notes'] as String? ?? '',
recurring: json['recurring'] as bool? ?? false,
internalTransfer: json['internalTransfer'] as bool? ?? false,
);
}
}