mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 15:17:31 +00:00
connect reports to main door
This commit is contained in:
@ -10,14 +10,18 @@ class ReportsTable extends StatelessWidget {
|
||||
final String? thirdColumnDescription;
|
||||
final Function(int index) onRowTap;
|
||||
final VoidCallback onClose;
|
||||
bool? hideValueShowDescription;
|
||||
bool? mainDoorSensor;
|
||||
|
||||
const ReportsTable({
|
||||
ReportsTable({
|
||||
super.key,
|
||||
required this.report,
|
||||
required this.onRowTap,
|
||||
required this.onClose,
|
||||
this.thirdColumnTitle,
|
||||
this.thirdColumnDescription,
|
||||
this.hideValueShowDescription,
|
||||
this.mainDoorSensor,
|
||||
});
|
||||
|
||||
@override
|
||||
@ -57,10 +61,20 @@ class ReportsTable extends StatelessWidget {
|
||||
children: [
|
||||
TableCellWidget(value: date),
|
||||
TableCellWidget(value: time),
|
||||
TableCellWidget(
|
||||
value: '${data.value!} ${thirdColumnDescription ?? ''}',
|
||||
onTap: () => onRowTap(index),
|
||||
),
|
||||
hideValueShowDescription == true
|
||||
? TableCellWidget(
|
||||
value: mainDoorSensor == true
|
||||
? data.value == 'true'
|
||||
? 'Open'
|
||||
: 'Close'
|
||||
: thirdColumnDescription ?? '',
|
||||
onTap: () => onRowTap(index),
|
||||
)
|
||||
: TableCellWidget(
|
||||
value:
|
||||
'${data.value!} ${thirdColumnDescription ?? ''}',
|
||||
onTap: () => onRowTap(index),
|
||||
),
|
||||
],
|
||||
);
|
||||
}),
|
||||
|
Reference in New Issue
Block a user