mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-08-25 17:59:40 +00:00
delete dummy files
This commit is contained in:
@ -1,73 +0,0 @@
|
|||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:syncrow_web/pages/access_management/manage_bookable_spaces/domain/models/bookable_space_model.dart';
|
|
||||||
import 'package:syncrow_web/pages/access_management/manage_bookable_spaces/domain/models/bookable_space_config.dart';
|
|
||||||
import 'package:syncrow_web/pages/access_management/manage_bookable_spaces/domain/params/non_bookable_spaces_params.dart';
|
|
||||||
import 'package:syncrow_web/pages/access_management/manage_bookable_spaces/domain/service/non_bookable_spaces_service.dart';
|
|
||||||
import 'package:syncrow_web/pages/access_management/manage_bookable_spaces/domain/service/send_bookable_spaces_to_api_params.dart';
|
|
||||||
import 'package:syncrow_web/pages/space_management_v2/main_module/shared/models/paginated_data_model.dart';
|
|
||||||
|
|
||||||
class DummyNonNookableSpaces implements NonBookableSpacesService {
|
|
||||||
@override
|
|
||||||
Future<PaginatedDataModel<BookableSpacemodel>> load(
|
|
||||||
NonBookableSpacesParams params) {
|
|
||||||
return Future.value(PaginatedDataModel<BookableSpacemodel>(
|
|
||||||
data: [
|
|
||||||
BookableSpacemodel(
|
|
||||||
spaceName: 'space3',
|
|
||||||
spaceConfig: BookableSpaceConfig(
|
|
||||||
configUuid: 'uuid',
|
|
||||||
bookableDays: ['wed', 'saturday'],
|
|
||||||
availability: true,
|
|
||||||
bookingEndTime: const TimeOfDay(hour: 13, minute: 20),
|
|
||||||
bookingStartTime: const TimeOfDay(hour: 6, minute: 20),
|
|
||||||
cost: 6,
|
|
||||||
),
|
|
||||||
spaceUuid: 'uuiiddd',
|
|
||||||
spaceVirtualAddress: 'idvirtual1',
|
|
||||||
),
|
|
||||||
BookableSpacemodel(
|
|
||||||
spaceName: 'space3',
|
|
||||||
spaceConfig: BookableSpaceConfig(
|
|
||||||
configUuid: 'uuid',
|
|
||||||
bookableDays: ['wed', 'saturday', 'thuresday'],
|
|
||||||
availability: true,
|
|
||||||
bookingEndTime: const TimeOfDay(hour: 13, minute: 20),
|
|
||||||
bookingStartTime: const TimeOfDay(hour: 5, minute: 20),
|
|
||||||
cost: 5,
|
|
||||||
),
|
|
||||||
spaceUuid: 'uuiiddd',
|
|
||||||
spaceVirtualAddress: 'idvirtual2',
|
|
||||||
),
|
|
||||||
BookableSpacemodel(
|
|
||||||
spaceName: 'space3',
|
|
||||||
spaceConfig: BookableSpaceConfig(
|
|
||||||
configUuid: 'uuid',
|
|
||||||
bookableDays: [
|
|
||||||
'saturday',
|
|
||||||
'sunday',
|
|
||||||
'Monday',
|
|
||||||
'tuesday',
|
|
||||||
'wed',
|
|
||||||
'thuresday'
|
|
||||||
],
|
|
||||||
availability: true,
|
|
||||||
bookingEndTime: const TimeOfDay(hour: 13, minute: 20),
|
|
||||||
bookingStartTime: const TimeOfDay(hour: 15, minute: 20),
|
|
||||||
cost: 2,
|
|
||||||
),
|
|
||||||
spaceUuid: 'uuiiddd',
|
|
||||||
spaceVirtualAddress: 'idvirtual3',
|
|
||||||
)
|
|
||||||
],
|
|
||||||
page: 1,
|
|
||||||
size: 1,
|
|
||||||
hasNext: false,
|
|
||||||
totalPages: 0,
|
|
||||||
totalItems: 0,
|
|
||||||
));
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Future<void> sendBookableSpacesToApi(
|
|
||||||
SendBookableSpacesToApiParams params) async {}
|
|
||||||
}
|
|
@ -1,41 +0,0 @@
|
|||||||
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;
|
|
||||||
List<String> daysAvailable;
|
|
||||||
String startTime;
|
|
||||||
String endTime;
|
|
||||||
int points;
|
|
||||||
SendBookableSpacesToApiParams({
|
|
||||||
required this.spaceUuids,
|
|
||||||
required this.daysAvailable,
|
|
||||||
required this.startTime,
|
|
||||||
required this.endTime,
|
|
||||||
required this.points,
|
|
||||||
});
|
|
||||||
|
|
||||||
static SendBookableSpacesToApiParams fromBookableSpacesModel(
|
|
||||||
List<BookableSpacemodel> bookableSpaces) {
|
|
||||||
return SendBookableSpacesToApiParams(
|
|
||||||
spaceUuids: bookableSpaces.map((space) => space.spaceUuid).toList(),
|
|
||||||
daysAvailable: bookableSpaces
|
|
||||||
.expand((space) => space.spaceConfig!.bookableDays)
|
|
||||||
.toSet()
|
|
||||||
.toList(),
|
|
||||||
startTime: formatTimeOfDayTo24HourString(
|
|
||||||
bookableSpaces.first.spaceConfig!.bookingStartTime!),
|
|
||||||
endTime: formatTimeOfDayTo24HourString(
|
|
||||||
bookableSpaces.first.spaceConfig!.bookingEndTime!),
|
|
||||||
points: bookableSpaces.first.spaceConfig!.cost,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => {
|
|
||||||
'spaceUuids': spaceUuids,
|
|
||||||
'daysAvailable': daysAvailable,
|
|
||||||
'startTime': startTime,
|
|
||||||
'endTime': endTime,
|
|
||||||
'points': points
|
|
||||||
};
|
|
||||||
}
|
|
Reference in New Issue
Block a user