mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-08-26 07:59:40 +00:00
use TimeOfDay instead of String
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
import 'package:syncrow_web/pages/access_management/manage_bookable_spaces/domain/models/bookable_space_model.dart';
|
||||
import 'package:syncrow_web/utils/string_utils.dart';
|
||||
|
||||
class SendBookableSpacesToApiParams {
|
||||
List<String> spaceUuids;
|
||||
@ -14,7 +15,7 @@ class SendBookableSpacesToApiParams {
|
||||
required this.points,
|
||||
});
|
||||
|
||||
static SendBookableSpacesToApiParams fromBookableSpacesModel(
|
||||
static SendBookableSpacesToApiParams fromBookableSpacesModel(
|
||||
List<BookableSpacemodel> bookableSpaces) {
|
||||
return SendBookableSpacesToApiParams(
|
||||
spaceUuids: bookableSpaces.map((space) => space.spaceUuid).toList(),
|
||||
@ -22,8 +23,10 @@ class SendBookableSpacesToApiParams {
|
||||
.expand((space) => space.spaceConfig.bookableDays)
|
||||
.toSet()
|
||||
.toList(),
|
||||
startTime: bookableSpaces.first.spaceConfig.bookingStartTime,
|
||||
endTime: bookableSpaces.first.spaceConfig.bookingEndTime,
|
||||
startTime: formatTimeOfDayTo24HourString(
|
||||
bookableSpaces.first.spaceConfig.bookingStartTime),
|
||||
endTime: formatTimeOfDayTo24HourString(
|
||||
bookableSpaces.first.spaceConfig.bookingEndTime),
|
||||
points: bookableSpaces.first.spaceConfig.cost,
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user