mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 15:17:31 +00:00
password expired.
This commit is contained in:
@ -133,7 +133,7 @@ class AccessBloc extends Bloc<AccessEvent, AccessState> {
|
|||||||
// Check if the password name should be used for filtering
|
// Check if the password name should be used for filtering
|
||||||
if (event.passwordName != null && event.passwordName!.isNotEmpty) {
|
if (event.passwordName != null && event.passwordName!.isNotEmpty) {
|
||||||
final bool matchesName = item.passwodName != null &&
|
final bool matchesName = item.passwodName != null &&
|
||||||
item.passwodName.contains(event.passwordName!);
|
item.passwodName.contains(event.passwordName);
|
||||||
if (!matchesName) {
|
if (!matchesName) {
|
||||||
matchesCriteria = false;
|
matchesCriteria = false;
|
||||||
}
|
}
|
||||||
|
@ -151,7 +151,7 @@ class AccessManagementPage extends StatelessWidget {
|
|||||||
child: DefaultButton(
|
child: DefaultButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
accessBloc.add(FilterDataEvent(
|
accessBloc.add(FilterDataEvent(
|
||||||
passwordName: accessBloc.passwordName.text,
|
passwordName: accessBloc.passwordName.text.toLowerCase(),
|
||||||
startTime: accessBloc.effectiveTimeTimeStamp,
|
startTime: accessBloc.effectiveTimeTimeStamp,
|
||||||
endTime: accessBloc.expirationTimeTimeStamp
|
endTime: accessBloc.expirationTimeTimeStamp
|
||||||
));
|
));
|
||||||
|
@ -85,6 +85,9 @@ class AuthBloc extends Bloc<AuthEvent, AuthState> {
|
|||||||
} else if (response == "You entered wrong otp") {
|
} else if (response == "You entered wrong otp") {
|
||||||
forgetValidate = 'Wrong one time password.';
|
forgetValidate = 'Wrong one time password.';
|
||||||
emit(AuthInitialState());
|
emit(AuthInitialState());
|
||||||
|
}else if (response == "OTP expired") {
|
||||||
|
forgetValidate = 'One time password has been expired.';
|
||||||
|
emit(AuthInitialState());
|
||||||
}
|
}
|
||||||
} catch (failure) {
|
} catch (failure) {
|
||||||
// forgetValidate='Invalid Credentials!';
|
// forgetValidate='Invalid Credentials!';
|
||||||
@ -92,7 +95,7 @@ class AuthBloc extends Bloc<AuthEvent, AuthState> {
|
|||||||
// emit(FailureForgetState(error: failure.toString()));
|
// emit(FailureForgetState(error: failure.toString()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//925207
|
||||||
String? validateCode(String? value) {
|
String? validateCode(String? value) {
|
||||||
if (value == null || value.isEmpty) {
|
if (value == null || value.isEmpty) {
|
||||||
return 'Code is required';
|
return 'Code is required';
|
||||||
|
@ -25,7 +25,11 @@ class AddDeviceDialog extends StatelessWidget {
|
|||||||
final visitorBloc = BlocProvider.of<VisitorPasswordBloc>(context);
|
final visitorBloc = BlocProvider.of<VisitorPasswordBloc>(context);
|
||||||
return AlertDialog(
|
return AlertDialog(
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.white,
|
||||||
title: const Text('Add Accessible Device'),
|
title: Text('Add Accessible Device',
|
||||||
|
style: Theme.of(context).textTheme.headlineLarge!.copyWith(
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
fontSize: 24,
|
||||||
|
color: Colors.black),),
|
||||||
content: Container(
|
content: Container(
|
||||||
height: MediaQuery.of(context).size.height/1.7,
|
height: MediaQuery.of(context).size.height/1.7,
|
||||||
width: MediaQuery.of(context).size.width/2,
|
width: MediaQuery.of(context).size.width/2,
|
||||||
|
@ -17,7 +17,7 @@ class RepeatWidget extends StatelessWidget {
|
|||||||
|
|
||||||
return BlocBuilder<VisitorPasswordBloc, VisitorPasswordState>(
|
return BlocBuilder<VisitorPasswordBloc, VisitorPasswordState>(
|
||||||
builder: (context, state) {
|
builder: (context, state) {
|
||||||
final smartDoorBloc = BlocProvider.of<VisitorPasswordBloc>(context);
|
final visitorBloc = BlocProvider.of<VisitorPasswordBloc>(context);
|
||||||
return Column(
|
return Column(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Container(
|
Container(
|
||||||
@ -25,7 +25,7 @@ class RepeatWidget extends StatelessWidget {
|
|||||||
height: size.height * 0.06, // Adjust height as needed
|
height: size.height * 0.06, // Adjust height as needed
|
||||||
child: ListView(
|
child: ListView(
|
||||||
scrollDirection: Axis.horizontal,
|
scrollDirection: Axis.horizontal,
|
||||||
children: smartDoorBloc.days.map((day) {
|
children: visitorBloc.days.map((day) {
|
||||||
return Container(
|
return Container(
|
||||||
width: size.width* 0.09,
|
width: size.width* 0.09,
|
||||||
child: CheckboxListTile(
|
child: CheckboxListTile(
|
||||||
@ -33,15 +33,15 @@ class RepeatWidget extends StatelessWidget {
|
|||||||
day['day']!,
|
day['day']!,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
color: smartDoorBloc.selectedDays.contains(day['key'])
|
color: visitorBloc.selectedDays.contains(day['key'])
|
||||||
? Colors.black
|
? Colors.black
|
||||||
: ColorsManager.grayColor,
|
: ColorsManager.grayColor,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
value: smartDoorBloc.selectedDays.contains(day['key']),
|
value: visitorBloc.selectedDays.contains(day['key']),
|
||||||
onChanged: (bool? value) {
|
onChanged: (bool? value) {
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
smartDoorBloc.add(ToggleDaySelectionEvent(key: day['key']!));
|
visitorBloc.add(ToggleDaySelectionEvent(key: day['key']!));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
@ -56,19 +56,19 @@ class RepeatWidget extends StatelessWidget {
|
|||||||
title: '',
|
title: '',
|
||||||
size: size,
|
size: size,
|
||||||
endTime: () {
|
endTime: () {
|
||||||
smartDoorBloc.add(SelectTimeVisitorPassword(
|
visitorBloc.add(SelectTimeVisitorPassword(
|
||||||
isRepeat: true,
|
isRepeat: true,
|
||||||
context: context, isStart: false
|
context: context, isStart: false
|
||||||
));
|
));
|
||||||
},
|
},
|
||||||
startTime: () {
|
startTime: () {
|
||||||
smartDoorBloc.add(SelectTimeVisitorPassword(
|
visitorBloc.add(SelectTimeVisitorPassword(
|
||||||
isRepeat: true,
|
isRepeat: true,
|
||||||
context: context, isStart: true
|
context: context, isStart: true
|
||||||
));
|
));
|
||||||
},
|
},
|
||||||
firstString: smartDoorBloc.repeatStartTime.toString(),
|
firstString: visitorBloc.repeatStartTime.toString(),
|
||||||
secondString: smartDoorBloc.repeatEndTime.toString(),
|
secondString: visitorBloc.repeatEndTime.toString(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
|
@ -26,7 +26,11 @@ class VisitorPasswordDialog extends StatelessWidget {
|
|||||||
bool isRepeat = state is IsRepeatState ? state.repeat : visitorBloc.repeat;
|
bool isRepeat = state is IsRepeatState ? state.repeat : visitorBloc.repeat;
|
||||||
return AlertDialog(
|
return AlertDialog(
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.white,
|
||||||
title: const Text('Create visitor password'),
|
title: Text('Create visitor password',
|
||||||
|
style: Theme.of(context).textTheme.headlineLarge!.copyWith(
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
fontSize: 24,
|
||||||
|
color: Colors.black),),
|
||||||
content: SingleChildScrollView(
|
content: SingleChildScrollView(
|
||||||
child: Form(
|
child: Form(
|
||||||
key: visitorBloc.forgetFormKey,
|
key: visitorBloc.forgetFormKey,
|
||||||
|
@ -25,7 +25,7 @@ abstract class ColorsManager {
|
|||||||
static const Color blackColor = Color(0xFF000000);
|
static const Color blackColor = Color(0xFF000000);
|
||||||
static const Color lightGreen = Color(0xFF00FF0A);
|
static const Color lightGreen = Color(0xFF00FF0A);
|
||||||
static const Color grayColor = Color(0xFF999999);
|
static const Color grayColor = Color(0xFF999999);
|
||||||
static const Color red = Colors.red;
|
static const Color red = Color(0xFFFF0000);
|
||||||
static const Color graysColor = Color(0xffEBEBEB);
|
static const Color graysColor = Color(0xffEBEBEB);
|
||||||
static const Color textGray = Color(0xffD5D5D5);
|
static const Color textGray = Color(0xffD5D5D5);
|
||||||
static const Color btnColor = Color(0xFF00008B);
|
static const Color btnColor = Color(0xFF00008B);
|
||||||
|
Reference in New Issue
Block a user