feat: add payment card grouping and analysis

This commit is contained in:
JiWoong Sul
2025-11-14 16:53:41 +09:00
parent cba7d082bd
commit 132ae758de
40 changed files with 2846 additions and 522 deletions

View File

@@ -34,6 +34,7 @@ class DetailScreenController extends ChangeNotifier {
late String _billingCycle;
late DateTime _nextBillingDate;
String? _selectedCategoryId;
String? _selectedPaymentCardId;
late String _currency;
bool _isLoading = false;
@@ -46,6 +47,7 @@ class DetailScreenController extends ChangeNotifier {
String get billingCycle => _billingCycle;
DateTime get nextBillingDate => _nextBillingDate;
String? get selectedCategoryId => _selectedCategoryId;
String? get selectedPaymentCardId => _selectedPaymentCardId;
String get currency => _currency;
bool get isLoading => _isLoading;
bool get isEventActive => _isEventActive;
@@ -74,6 +76,13 @@ class DetailScreenController extends ChangeNotifier {
}
}
set selectedPaymentCardId(String? value) {
if (_selectedPaymentCardId != value) {
_selectedPaymentCardId = value;
notifyListeners();
}
}
set currency(String value) {
if (_currency != value) {
_currency = value;
@@ -153,6 +162,7 @@ class DetailScreenController extends ChangeNotifier {
_billingCycle = subscription.billingCycle;
_nextBillingDate = subscription.nextBillingDate;
_selectedCategoryId = subscription.categoryId;
_selectedPaymentCardId = subscription.paymentCardId;
_currency = subscription.currency;
// Event State 초기화
@@ -415,6 +425,7 @@ class DetailScreenController extends ChangeNotifier {
BillingDateUtil.ensureFutureDate(originalDateOnly, _billingCycle);
subscription.nextBillingDate = adjustedNext;
subscription.categoryId = _selectedCategoryId;
subscription.paymentCardId = _selectedPaymentCardId;
subscription.currency = _currency;
// 이벤트 정보 업데이트