connect reports to main door

This commit is contained in:
ashrafzarkanisala
2024-09-18 02:23:42 +03:00
parent 9876ff2e03
commit 7c28012d79
7 changed files with 98 additions and 28 deletions

View File

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