mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
refactor schedule view and cleaning
This commit is contained in:
@ -40,6 +40,8 @@ abstract class ApiEndpoints {
|
||||
'/device/report-logs/{uuid}?code={code}&startTime={startTime}&endTime={endTime}';
|
||||
|
||||
static const String scheduleByDeviceId = '/schedule/{deviceUuid}';
|
||||
static const String getScheduleByDeviceId =
|
||||
'/schedule/{deviceUuid}?category={category}';
|
||||
static const String deleteScheduleByDeviceId =
|
||||
'/schedule/{deviceUuid}/{scheduleUuid}';
|
||||
static const String updateScheduleByDeviceId =
|
||||
|
@ -23,4 +23,9 @@ String formatTimeOfDayToISO(TimeOfDay time, {DateTime? currentDate}) {
|
||||
);
|
||||
|
||||
return dateTime.toUtc().toIso8601String();
|
||||
}
|
||||
}
|
||||
|
||||
String formatIsoStringToTime(String isoString) {
|
||||
final dateTime = DateTime.parse(isoString);
|
||||
return DateFormat('hh:mm a').format(dateTime);
|
||||
}
|
||||
|
Reference in New Issue
Block a user