Skip to content

Commit

Permalink
fix: 장비/차량 예약 내 선택 일시 버그 처리
Browse files Browse the repository at this point in the history
  • Loading branch information
ryr0121 committed Dec 3, 2023
1 parent c329e35 commit a7a7cb6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 27 deletions.
19 changes: 3 additions & 16 deletions lib/View/booking/screen/booking_car_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -338,28 +338,15 @@ class _BookingCarScreenState extends State<BookingCarScreen> {
});

} else {

setState(() {
startDate = (start == null) ? null : DateTime(start.year, start.month, start.day);
startDate = (start == null) ? null : DateTime(start.year, start.month, start.day, (startTime == -1) ? 0 : startTime);
endDate = (end == null)
? DateTime(start!.year, start!.month, start!.day)
: DateTime(end.year, end.month, end.day);
? DateTime(start!.year, start!.month, start!.day, (startTime == -1) ? 0 : startTime)
: DateTime(end.year, end.month, end.day, (endTime == -1) ? 0 : endTime);
});
}
}

void changedStartDate(DateTime? time) {
setState(() {
startDate = (time == null) ? null : DateTime(time.year, time.month, time.day);
});
}

void changedEndDate(DateTime? time) {
setState(() {
endDate = (time == null) ? null : DateTime(time.year, time.month, time.day);
});
}

void didTapResetTimeGridButton() {
setState(() {
startTime = -1;
Expand Down
14 changes: 3 additions & 11 deletions lib/View/booking/screen/booking_resource_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -340,22 +340,14 @@ class _BookingResourceScreenState extends State<BookingResourceScreen> {

} else {
setState(() {
startDate = (start == null) ? null : DateTime(start.year, start.month, start.day);
startDate = (start == null) ? null : DateTime(start.year, start.month, start.day, (startTime == -1) ? 0 : startTime);
endDate = (end == null)
? DateTime(start!.year, start!.month, start!.day)
: DateTime(end.year, end.month, end.day);
? DateTime(start!.year, start!.month, start!.day, (startTime == -1) ? 0 : startTime)
: DateTime(end.year, end.month, end.day, (endTime == -1) ? 0 : endTime);
});
}
}

void changedStartDate(DateTime? time) {
setState(() { startDate = (time == null) ? null : DateTime(time.year, time.month, time.day); });
}

void changedEndDate(DateTime? time) {
setState(() { endDate = (time == null) ? null : DateTime(time.year, time.month, time.day); });
}

void didTapResetTimeGridButton() {
setState(() {
startTime = -1;
Expand Down

0 comments on commit a7a7cb6

Please sign in to comment.