mirror of
https://github.com/SyncrowIOT/web.git
synced 2026-10-23 09:47:55 +00:00
forget password changes & bugs number 10 & 15-18
This commit is contained in:
@@ -40,7 +40,7 @@ class AddDeviceDialog extends StatelessWidget {
|
||||
fontSize: 24,
|
||||
color: Colors.black),
|
||||
),
|
||||
content: Container(
|
||||
content: SizedBox(
|
||||
height: MediaQuery.of(context).size.height / 1.7,
|
||||
width: MediaQuery.of(context).size.width / 2,
|
||||
child: Padding(
|
||||
@@ -78,7 +78,7 @@ class AddDeviceDialog extends StatelessWidget {
|
||||
),
|
||||
],
|
||||
)),
|
||||
SizedBox(
|
||||
const SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
const SizedBox(
|
||||
@@ -93,7 +93,7 @@ class AddDeviceDialog extends StatelessWidget {
|
||||
flex: 4,
|
||||
child: CustomWebTextField(
|
||||
controller: visitorBloc.deviceNameController,
|
||||
isRequired: true,
|
||||
isRequired: false,
|
||||
textFieldName: 'Device Name',
|
||||
description: '',
|
||||
),
|
||||
@@ -103,7 +103,7 @@ class AddDeviceDialog extends StatelessWidget {
|
||||
flex: 4,
|
||||
child: CustomWebTextField(
|
||||
controller: visitorBloc.deviceIdController,
|
||||
isRequired: true,
|
||||
isRequired: false,
|
||||
textFieldName: 'Device ID',
|
||||
description: '',
|
||||
),
|
||||
@@ -113,7 +113,7 @@ class AddDeviceDialog extends StatelessWidget {
|
||||
flex: 4,
|
||||
child: CustomWebTextField(
|
||||
controller: visitorBloc.unitNameController,
|
||||
isRequired: true,
|
||||
isRequired: false,
|
||||
textFieldName: 'Unit Name',
|
||||
description: '',
|
||||
),
|
||||
@@ -168,40 +168,40 @@ class AddDeviceDialog extends StatelessWidget {
|
||||
flex: 3,
|
||||
child: state is TableLoaded
|
||||
? DynamicTable(
|
||||
initialSelectedIds: selectedDeviceIds,
|
||||
cellDecoration: containerDecoration,
|
||||
isEmpty: visitorBloc.data.isEmpty,
|
||||
selectAll: (p0) {
|
||||
visitorBloc.selectedDeviceIds.clear();
|
||||
for (var item in state.data) {
|
||||
visitorBloc
|
||||
.add(SelectDeviceEvent(item.uuid));
|
||||
}
|
||||
},
|
||||
onRowSelected: (index, isSelected, row) {
|
||||
final deviceId = state.data[index].uuid;
|
||||
visitorBloc.add(SelectDeviceEvent(deviceId));
|
||||
},
|
||||
withCheckBox: true,
|
||||
size: size * 0.5,
|
||||
headers: const [
|
||||
'Device Name',
|
||||
'Device ID',
|
||||
'Access Type',
|
||||
'Unit Name',
|
||||
'Status'
|
||||
],
|
||||
data: state.data.map((item) {
|
||||
return [
|
||||
item.name.toString(),
|
||||
item.uuid.toString(),
|
||||
item.productType.toString(),
|
||||
'',
|
||||
item.online.value.toString(),
|
||||
];
|
||||
}).toList(),
|
||||
)
|
||||
: const Center(child: CircularProgressIndicator()))
|
||||
withSelectAll: true,
|
||||
|
||||
initialSelectedIds: selectedDeviceIds,
|
||||
cellDecoration: containerDecoration,
|
||||
isEmpty: visitorBloc.data.isEmpty,
|
||||
selectAll: (p0) {
|
||||
visitorBloc.selectedDeviceIds.clear();
|
||||
for (var item in state.data) {
|
||||
visitorBloc.add(SelectDeviceEvent(item.uuid));
|
||||
}
|
||||
},
|
||||
onRowSelected: (index, isSelected, row) {
|
||||
final deviceId = state.data[index].uuid;
|
||||
visitorBloc.add(SelectDeviceEvent(deviceId));
|
||||
},
|
||||
withCheckBox: true,
|
||||
size: size * 0.5,
|
||||
headers: const [
|
||||
'Device Name',
|
||||
'Device ID',
|
||||
'Access Type',
|
||||
'Unit Name',
|
||||
'Status'
|
||||
],
|
||||
data: state.data.map((item) {
|
||||
return [
|
||||
item.name.toString(),
|
||||
item.uuid.toString(),
|
||||
item.productType.toString(),
|
||||
'',
|
||||
item.online.value.toString(),
|
||||
];
|
||||
}).toList(),
|
||||
) : const Center(child: CircularProgressIndicator()))
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -323,8 +323,7 @@ class VisitorPasswordDialog extends StatelessWidget {
|
||||
: visitorBloc.usageFrequencySelected,
|
||||
onChanged: (String? value) {
|
||||
if (value != null) {
|
||||
context
|
||||
.read<VisitorPasswordBloc>()
|
||||
context.read<VisitorPasswordBloc>()
|
||||
.add(SelectUsageFrequency(value));
|
||||
}
|
||||
},
|
||||
@@ -344,7 +343,7 @@ class VisitorPasswordDialog extends StatelessWidget {
|
||||
if (visitorBloc.usageFrequencySelected == 'One-Time' &&
|
||||
visitorBloc.accessTypeSelected == 'Offline Password')
|
||||
Text(
|
||||
'Within the validity period, there is no limit to the number of times each device can be unlocked.',
|
||||
'Within the validity period, each device can be unlocked only once, and the maximum validity period is 6 hours',
|
||||
style: Theme.of(context).textTheme.bodySmall!.copyWith(
|
||||
color: ColorsManager.grayColor, fontSize: 9),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user