File tree Expand file tree Collapse file tree 3 files changed +13
-3
lines changed
lib/app/modules/chat/presentation/widgets Expand file tree Collapse file tree 3 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 360360 "account_info_not_set" : " Account information is not set" ,
361361 "cost_cannot_be_negative" : " Cost cannot be negative" ,
362362 "cost_per_user_mismatch" : " Cost per user mismatch" ,
363- "before_departure" : " You cannot request accounting before confirming the departure time" ,
363+ "before_departure" : " You can request accounting 10 minutes after the departure time" ,
364364 "not_a_participant" : " You are not a participant" ,
365365 "pot_not_exist" : " Pot does not exist" ,
366366 "pot_already_closed" : " Pot has already been closed" ,
Original file line number Diff line number Diff line change 357357 "account_info_not_set" : " 계좌 정보가 설정되지 않았습니다" ,
358358 "cost_cannot_be_negative" : " 정산 금액은 0원 이상이어야 합니다" ,
359359 "cost_per_user_mismatch" : " 정산 금액이 동승자 수와 일치하지 않습니다" ,
360- "before_departure" : " 출발 시간을 확정하지 않아 정산을 요청할 수 없습니다 " ,
360+ "before_departure" : " 출발 시각 10분 후부터 정산이 가능합니다 " ,
361361 "not_a_participant" : " 동승자가 아닙니다" ,
362362 "pot_not_exist" : " 팟이 존재하지 않습니다" ,
363363 "pot_already_closed" : " 팟이 이미 해산되었습니다" ,
Original file line number Diff line number Diff line change @@ -17,10 +17,20 @@ class AccountingButton extends StatelessWidget {
1717 BuildContext context,
1818 PotInfoEntity pot,
1919 ) async {
20- if (pot.departureTime == null ) {
20+ final departureTime = pot.departureTime;
21+ if (departureTime == null ) {
2122 context.showToast (context.t.chat_room.accounting.before_confirm);
2223 return ;
2324 }
25+ final tenMinutesAfterDeparture = departureTime.add (
26+ const Duration (minutes: 10 ),
27+ );
28+ if (DateTime .now ().isBefore (tenMinutesAfterDeparture)) {
29+ context.showToast (
30+ context.t.chat_room.accounting.dutch.errors.before_departure,
31+ );
32+ return ;
33+ }
2434 await AccountingRoute (pot: pot).push (context);
2535 }
2636
You can’t perform that action at this time.
0 commit comments