connecting apis and changes the table design to match figma

This commit is contained in:
ashrafzarkanisala
2024-09-22 14:17:52 +03:00
parent 66f45721e5
commit f99744338c
11 changed files with 674 additions and 304 deletions

View File

@ -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}';
}

View File

@ -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';
}

View File

@ -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();
}