Compare commits

...

5 Commits

Author SHA1 Message Date
9bfc0cea10 add some horizontal padding 2025-07-16 09:19:55 +03:00
75b9f4a4e6 changed the title from Routine to Workflow Automation (#354)
<!--
  Thanks for contributing!

Provide a description of your changes below and a general summary in the
title

Please look at the following checklist to ensure that your PR can be
accepted quickly:
-->

## Jira Ticket
[SP-1851](https://syncrow.atlassian.net/browse/SP-1851)

## Description

change the Title to Work Flow 

## Type of Change

<!--- Put an `x` in all the boxes that apply: -->

- [ ]  New feature (non-breaking change which adds functionality)
- [x] 🛠️ Bug fix (non-breaking change which fixes an issue)
- [ ]  Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] 🧹 Code refactor
- [ ]  Build configuration change
- [ ] 📝 Documentation
- [ ] 🗑️ Chore 


[SP-1851]:
https://syncrow.atlassian.net/browse/SP-1851?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
2025-07-15 11:54:29 +03:00
fe4063ef8f changed the title from Routine to Workflow Automation 2025-07-15 11:20:13 +03:00
029b5d32e0 Adjust table scroll behavior and modify height for improved layout (#353)
<!--
  Thanks for contributing!

Provide a description of your changes below and a general summary in the
title

Please look at the following checklist to ensure that your PR can be
accepted quickly:
-->

## Description

<!--- Describe your changes in detail -->
Adjust table scroll behavior and modify height for improved layout

## Type of Change

<!--- Put an `x` in all the boxes that apply: -->

- [ ]  New feature (non-breaking change which adds functionality)
- [x] 🛠️ Bug fix (non-breaking change which fixes an issue)
- [ ]  Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] 🧹 Code refactor
- [ ]  Build configuration change
- [ ] 📝 Documentation
- [ ] 🗑️ Chore
2025-07-15 10:43:22 +03:00
428c81efff Adjust table scroll behavior and modify height for improved layout 2025-07-15 10:05:07 +03:00
3 changed files with 76 additions and 44 deletions

View File

@ -132,6 +132,8 @@ class _DynamicTableState extends State<DynamicTable> {
child: SingleChildScrollView( child: SingleChildScrollView(
controller: _horizontalScrollController, controller: _horizontalScrollController,
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
physics:
widget.isEmpty ? const NeverScrollableScrollPhysics() : null,
child: SizedBox( child: SizedBox(
width: _totalTableWidth, width: _totalTableWidth,
child: Column( child: Column(
@ -164,7 +166,6 @@ class _DynamicTableState extends State<DynamicTable> {
], ],
), ),
), ),
Expanded( Expanded(
child: widget.isEmpty child: widget.isEmpty
? _buildEmptyState() ? _buildEmptyState()
@ -265,7 +266,7 @@ class _DynamicTableState extends State<DynamicTable> {
), ),
], ],
), ),
SizedBox(height: widget.size.height * 0.5), SizedBox(height: widget.size.height * 0.2),
], ],
), ),
); );

View File

@ -24,12 +24,12 @@ class DeviceManagementPage extends StatefulWidget with HelperResponsiveLayout {
} }
class _DeviceManagementPageState extends State<DeviceManagementPage> { class _DeviceManagementPageState extends State<DeviceManagementPage> {
@override
@override
void initState() { void initState() {
context.read<SpaceTreeBloc>().add(InitialEvent()); context.read<SpaceTreeBloc>().add(InitialEvent());
super.initState(); super.initState();
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return MultiBlocProvider( return MultiBlocProvider(
@ -90,7 +90,7 @@ class _DeviceManagementPageState extends State<DeviceManagementPage> {
const TriggerSwitchTabsEvent(isRoutineTab: true)); const TriggerSwitchTabsEvent(isRoutineTab: true));
}, },
child: Text( child: Text(
'Routines', 'Workflow Automation',
style: context.textTheme.titleMedium?.copyWith( style: context.textTheme.titleMedium?.copyWith(
color: state.routineTab color: state.routineTab
? ColorsManager.whiteColors ? ColorsManager.whiteColors

View File

@ -39,7 +39,8 @@ class VisitorPasswordDialog extends StatelessWidget {
title: 'Sent Successfully', title: 'Sent Successfully',
widgeta: Column( widgeta: Column(
children: [ children: [
if (visitorBloc.passwordStatus!.failedOperations.isNotEmpty) if (visitorBloc
.passwordStatus!.failedOperations.isNotEmpty)
Column( Column(
children: [ children: [
const Text('Failed Devices'), const Text('Failed Devices'),
@ -54,18 +55,23 @@ class VisitorPasswordDialog extends StatelessWidget {
itemBuilder: (context, index) { itemBuilder: (context, index) {
return Container( return Container(
margin: const EdgeInsets.all(5), margin: const EdgeInsets.all(5),
padding: const EdgeInsets.symmetric(
horizontal: 10),
decoration: containerDecoration, decoration: containerDecoration,
height: 45, height: 45,
child: Center( child: Center(
child: Text(visitorBloc.passwordStatus! child: Text(visitorBloc
.failedOperations[index].deviceName)), .passwordStatus!
.failedOperations[index]
.deviceName)),
); );
}, },
), ),
), ),
], ],
), ),
if (visitorBloc.passwordStatus!.successOperations.isNotEmpty) if (visitorBloc
.passwordStatus!.successOperations.isNotEmpty)
Column( Column(
children: [ children: [
const Text('Success Devices'), const Text('Success Devices'),
@ -80,11 +86,15 @@ class VisitorPasswordDialog extends StatelessWidget {
itemBuilder: (context, index) { itemBuilder: (context, index) {
return Container( return Container(
margin: const EdgeInsets.all(5), margin: const EdgeInsets.all(5),
padding: const EdgeInsets.symmetric(
horizontal: 10),
decoration: containerDecoration, decoration: containerDecoration,
height: 45, height: 45,
child: Center( child: Center(
child: Text(visitorBloc.passwordStatus! child: Text(visitorBloc
.successOperations[index].deviceName)), .passwordStatus!
.successOperations[index]
.deviceName)),
); );
}, },
), ),
@ -114,7 +124,9 @@ class VisitorPasswordDialog extends StatelessWidget {
title: Text( title: Text(
'Create visitor password', 'Create visitor password',
style: Theme.of(context).textTheme.headlineLarge!.copyWith( style: Theme.of(context).textTheme.headlineLarge!.copyWith(
fontWeight: FontWeight.w400, fontSize: 24, color: Colors.black), fontWeight: FontWeight.w400,
fontSize: 24,
color: Colors.black),
), ),
content: state is LoadingInitialState content: state is LoadingInitialState
? const Center(child: CircularProgressIndicator()) ? const Center(child: CircularProgressIndicator())
@ -300,12 +312,14 @@ class VisitorPasswordDialog extends StatelessWidget {
visitorBloc.accessTypeSelected == visitorBloc.accessTypeSelected ==
'Offline Password') { 'Offline Password') {
visitorBloc.add(SelectTimeEvent( visitorBloc.add(SelectTimeEvent(
context: context, isEffective: false));
} else {
visitorBloc.add(SelectTimeVisitorPassword(
context: context, context: context,
isStart: false, isEffective: false));
isRepeat: false)); } else {
visitorBloc.add(
SelectTimeVisitorPassword(
context: context,
isStart: false,
isRepeat: false));
} }
}, },
startTime: () { startTime: () {
@ -314,21 +328,23 @@ class VisitorPasswordDialog extends StatelessWidget {
visitorBloc.accessTypeSelected == visitorBloc.accessTypeSelected ==
'Offline Password') { 'Offline Password') {
visitorBloc.add(SelectTimeEvent( visitorBloc.add(SelectTimeEvent(
context: context, isEffective: true));
} else {
visitorBloc.add(SelectTimeVisitorPassword(
context: context, context: context,
isStart: true, isEffective: true));
isRepeat: false)); } else {
visitorBloc.add(
SelectTimeVisitorPassword(
context: context,
isStart: true,
isRepeat: false));
} }
}, },
firstString: firstString: (visitorBloc
(visitorBloc.usageFrequencySelected == .usageFrequencySelected ==
'Periodic' && 'Periodic' &&
visitorBloc.accessTypeSelected == visitorBloc.accessTypeSelected ==
'Offline Password') 'Offline Password')
? visitorBloc.effectiveTime ? visitorBloc.effectiveTime
: visitorBloc.startTimeAccess, : visitorBloc.startTimeAccess,
secondString: (visitorBloc secondString: (visitorBloc
.usageFrequencySelected == .usageFrequencySelected ==
'Periodic' && 'Periodic' &&
@ -395,7 +411,8 @@ class VisitorPasswordDialog extends StatelessWidget {
child: CupertinoSwitch( child: CupertinoSwitch(
value: visitorBloc.repeat, value: visitorBloc.repeat,
onChanged: (value) { onChanged: (value) {
visitorBloc.add(ToggleRepeatEvent()); visitorBloc
.add(ToggleRepeatEvent());
}, },
applyTheme: true, applyTheme: true,
), ),
@ -426,7 +443,8 @@ class VisitorPasswordDialog extends StatelessWidget {
}, },
).then((listDevice) { ).then((listDevice) {
if (listDevice != null) { if (listDevice != null) {
visitorBloc.selectedDevices = listDevice; visitorBloc.selectedDevices =
listDevice;
} }
}); });
}, },
@ -438,7 +456,8 @@ class VisitorPasswordDialog extends StatelessWidget {
.bodySmall! .bodySmall!
.copyWith( .copyWith(
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
color: ColorsManager.whiteColors, color:
ColorsManager.whiteColors,
fontSize: 12), fontSize: 12),
), ),
), ),
@ -477,19 +496,23 @@ class VisitorPasswordDialog extends StatelessWidget {
onPressed: () { onPressed: () {
if (visitorBloc.forgetFormKey.currentState!.validate()) { if (visitorBloc.forgetFormKey.currentState!.validate()) {
if (visitorBloc.selectedDevices.isNotEmpty) { if (visitorBloc.selectedDevices.isNotEmpty) {
if (visitorBloc.usageFrequencySelected == 'One-Time' && if (visitorBloc.usageFrequencySelected ==
visitorBloc.accessTypeSelected == 'Offline Password') { 'One-Time' &&
visitorBloc.accessTypeSelected ==
'Offline Password') {
setPasswordFunction(context, size, visitorBloc); setPasswordFunction(context, size, visitorBloc);
} else if (visitorBloc.usageFrequencySelected == } else if (visitorBloc.usageFrequencySelected ==
'Periodic' && 'Periodic' &&
visitorBloc.accessTypeSelected == 'Offline Password') { visitorBloc.accessTypeSelected ==
'Offline Password') {
if (visitorBloc.expirationTime != 'End Time' && if (visitorBloc.expirationTime != 'End Time' &&
visitorBloc.effectiveTime != 'Start Time') { visitorBloc.effectiveTime != 'Start Time') {
setPasswordFunction(context, size, visitorBloc); setPasswordFunction(context, size, visitorBloc);
} else { } else {
visitorBloc.stateDialog( visitorBloc.stateDialog(
context: context, context: context,
message: 'Please select Access Period to continue', message:
'Please select Access Period to continue',
title: 'Access Period'); title: 'Access Period');
} }
} else if (visitorBloc.endTimeAccess != 'End Time' && } else if (visitorBloc.endTimeAccess != 'End Time' &&
@ -500,7 +523,8 @@ class VisitorPasswordDialog extends StatelessWidget {
if (visitorBloc.expirationTime != 'End Time' && if (visitorBloc.expirationTime != 'End Time' &&
visitorBloc.effectiveTime != 'Start Time' && visitorBloc.effectiveTime != 'Start Time' &&
visitorBloc.selectedDays.isNotEmpty) { visitorBloc.selectedDays.isNotEmpty) {
setPasswordFunction(context, size, visitorBloc); setPasswordFunction(
context, size, visitorBloc);
} else { } else {
visitorBloc.stateDialog( visitorBloc.stateDialog(
context: context, context: context,
@ -514,13 +538,15 @@ class VisitorPasswordDialog extends StatelessWidget {
} else { } else {
visitorBloc.stateDialog( visitorBloc.stateDialog(
context: context, context: context,
message: 'Please select Access Period to continue', message:
'Please select Access Period to continue',
title: 'Access Period'); title: 'Access Period');
} }
} else { } else {
visitorBloc.stateDialog( visitorBloc.stateDialog(
context: context, context: context,
message: 'Please select Access Period to continue', message:
'Please select Access Period to continue',
title: 'Access Period'); title: 'Access Period');
} }
} else { } else {
@ -567,7 +593,8 @@ class VisitorPasswordDialog extends StatelessWidget {
content: SizedBox( content: SizedBox(
height: size.height * 0.25, height: size.height * 0.25,
child: const Center( child: const Center(
child: CircularProgressIndicator(), // Display a loading spinner child:
CircularProgressIndicator(), // Display a loading spinner
), ),
), ),
); );
@ -640,7 +667,8 @@ class VisitorPasswordDialog extends StatelessWidget {
onPressed: () { onPressed: () {
Navigator.pop(context); Navigator.pop(context);
if (visitorBloc.usageFrequencySelected == 'One-Time' && if (visitorBloc.usageFrequencySelected == 'One-Time' &&
visitorBloc.accessTypeSelected == 'Online Password') { visitorBloc.accessTypeSelected ==
'Online Password') {
visitorBloc.add(OnlineOneTimePasswordEvent( visitorBloc.add(OnlineOneTimePasswordEvent(
context: context, context: context,
passwordName: visitorBloc.userNameController.text, passwordName: visitorBloc.userNameController.text,
@ -648,7 +676,8 @@ class VisitorPasswordDialog extends StatelessWidget {
)); ));
} else if (visitorBloc.usageFrequencySelected == } else if (visitorBloc.usageFrequencySelected ==
'Periodic' && 'Periodic' &&
visitorBloc.accessTypeSelected == 'Online Password') { visitorBloc.accessTypeSelected ==
'Online Password') {
visitorBloc.add(OnlineMultipleTimePasswordEvent( visitorBloc.add(OnlineMultipleTimePasswordEvent(
passwordName: visitorBloc.userNameController.text, passwordName: visitorBloc.userNameController.text,
email: visitorBloc.emailController.text, email: visitorBloc.emailController.text,
@ -659,7 +688,8 @@ class VisitorPasswordDialog extends StatelessWidget {
)); ));
} else if (visitorBloc.usageFrequencySelected == } else if (visitorBloc.usageFrequencySelected ==
'One-Time' && 'One-Time' &&
visitorBloc.accessTypeSelected == 'Offline Password') { visitorBloc.accessTypeSelected ==
'Offline Password') {
visitorBloc.add(OfflineOneTimePasswordEvent( visitorBloc.add(OfflineOneTimePasswordEvent(
context: context, context: context,
passwordName: visitorBloc.userNameController.text, passwordName: visitorBloc.userNameController.text,
@ -667,7 +697,8 @@ class VisitorPasswordDialog extends StatelessWidget {
)); ));
} else if (visitorBloc.usageFrequencySelected == } else if (visitorBloc.usageFrequencySelected ==
'Periodic' && 'Periodic' &&
visitorBloc.accessTypeSelected == 'Offline Password') { visitorBloc.accessTypeSelected ==
'Offline Password') {
visitorBloc.add(OfflineMultipleTimePasswordEvent( visitorBloc.add(OfflineMultipleTimePasswordEvent(
passwordName: visitorBloc.userNameController.text, passwordName: visitorBloc.userNameController.text,
email: visitorBloc.emailController.text, email: visitorBloc.emailController.text,