mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
connecting apis and changes the table design to match figma
This commit is contained in:
@ -38,4 +38,10 @@ abstract class ApiEndpoints {
|
||||
static const String getDeviceLogs = '/device/report-logs/{uuid}?code={code}';
|
||||
static const String getDeviceLogsByDate =
|
||||
'/device/report-logs/{uuid}?code={code}&startTime={startTime}&endTime={endTime}';
|
||||
|
||||
static const String scheduleByDeviceId = '/schedule/{deviceUuid}';
|
||||
static const String deleteScheduleByDeviceId =
|
||||
'/schedule/{deviceUuid}/{scheduleUuid}';
|
||||
static const String updateScheduleByDeviceId =
|
||||
'/schedule/enable/{deviceUuid}';
|
||||
}
|
||||
|
@ -154,4 +154,7 @@ class Assets {
|
||||
static const String mainDoorReports = 'assets/icons/main_door_reports.svg';
|
||||
//assets/icons/main_door.svg
|
||||
static const String mainDoor = 'assets/icons/main_door.svg';
|
||||
|
||||
//assets/icons/empty_records.svg
|
||||
static const String emptyRecords = 'assets/icons/empty_records.svg';
|
||||
}
|
||||
|
@ -1,3 +1,4 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
String formatDateTime(DateTime? dateTime) {
|
||||
@ -9,3 +10,17 @@ String formatDateTime(DateTime? dateTime) {
|
||||
|
||||
return '${dateFormatter.format(dateTime)} ${timeFormatter.format(dateTime)}';
|
||||
}
|
||||
|
||||
String formatTimeOfDayToISO(TimeOfDay time, {DateTime? currentDate}) {
|
||||
final now = currentDate ?? DateTime.now();
|
||||
|
||||
final dateTime = DateTime(
|
||||
now.year,
|
||||
now.month,
|
||||
now.day,
|
||||
time.hour,
|
||||
time.minute,
|
||||
);
|
||||
|
||||
return dateTime.toUtc().toIso8601String();
|
||||
}
|
Reference in New Issue
Block a user