feat: add payment method
This commit is contained in:
@@ -115,18 +115,18 @@ class BarScreenViewModel extends ChangeNotifier {
|
||||
await _reloadTabs();
|
||||
}
|
||||
|
||||
Future<void> closeSelectedTab() async {
|
||||
Future<void> closeSelectedTab({String paymentMethod = 'cash'}) async {
|
||||
final tab = selectedTab;
|
||||
|
||||
if (tab == null) return;
|
||||
|
||||
await barTabService.closeTab(tab.id);
|
||||
await barTabService.closeTab(tab.id, paymentMethod: paymentMethod);
|
||||
|
||||
await _reloadTabs();
|
||||
}
|
||||
|
||||
Future<void> closeTab(String tabId) async {
|
||||
await barTabService.closeTab(tabId);
|
||||
Future<void> closeTab(String tabId, {String paymentMethod = 'cash'}) async {
|
||||
await barTabService.closeTab(tabId, paymentMethod: paymentMethod);
|
||||
|
||||
await _reloadTabs();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user