From deb227034a9021c8b8ffe4e59562ddd5657dbb77 Mon Sep 17 00:00:00 2001 From: Rafeek-Khoudare Date: Fri, 11 Jul 2025 11:44:16 +0300 Subject: [PATCH 1/7] fix Rework notes --- .../routines/create_new_routines/dropdown_menu_content.dart | 6 ++++++ lib/pages/routines/create_new_routines/space_dropdown.dart | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/pages/routines/create_new_routines/dropdown_menu_content.dart b/lib/pages/routines/create_new_routines/dropdown_menu_content.dart index 65243f53..949ee9fe 100644 --- a/lib/pages/routines/create_new_routines/dropdown_menu_content.dart +++ b/lib/pages/routines/create_new_routines/dropdown_menu_content.dart @@ -84,6 +84,12 @@ class _DropdownMenuContentState extends State { border: OutlineInputBorder( borderRadius: BorderRadius.circular(8), ), + focusedBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(8), + borderSide: const BorderSide( + color: Colors.blue, + ), + ), isDense: true, ), ), diff --git a/lib/pages/routines/create_new_routines/space_dropdown.dart b/lib/pages/routines/create_new_routines/space_dropdown.dart index 0605b7fc..b4e98bd5 100644 --- a/lib/pages/routines/create_new_routines/space_dropdown.dart +++ b/lib/pages/routines/create_new_routines/space_dropdown.dart @@ -52,7 +52,7 @@ class SpaceDropdown extends StatelessWidget { fontSize: 16, fontWeight: FontWeight.bold, color: selectedValue == space.uuid - ? ColorsManager.dialogBlueTitle + ? Colors.blue : ColorsManager.blackColor, ), ), @@ -61,7 +61,7 @@ class SpaceDropdown extends StatelessWidget { style: Theme.of(context).textTheme.bodyMedium!.copyWith( fontSize: 12, color: selectedValue == space.uuid - ? ColorsManager.dialogBlueTitle + ? Colors.blue : ColorsManager.blackColor, ), ), From 9f71bbff632fb8533d54d5e8a81e6e7dd77c302d Mon Sep 17 00:00:00 2001 From: Rafeek-Khoudare Date: Tue, 15 Jul 2025 08:26:40 +0300 Subject: [PATCH 2/7] fix color uses --- lib/pages/routines/create_new_routines/space_dropdown.dart | 4 ++-- lib/utils/color_manager.dart | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/pages/routines/create_new_routines/space_dropdown.dart b/lib/pages/routines/create_new_routines/space_dropdown.dart index b4e98bd5..ed445c61 100644 --- a/lib/pages/routines/create_new_routines/space_dropdown.dart +++ b/lib/pages/routines/create_new_routines/space_dropdown.dart @@ -52,7 +52,7 @@ class SpaceDropdown extends StatelessWidget { fontSize: 16, fontWeight: FontWeight.bold, color: selectedValue == space.uuid - ? Colors.blue + ? ColorsManager.drpoDownSelectBlue : ColorsManager.blackColor, ), ), @@ -61,7 +61,7 @@ class SpaceDropdown extends StatelessWidget { style: Theme.of(context).textTheme.bodyMedium!.copyWith( fontSize: 12, color: selectedValue == space.uuid - ? Colors.blue + ? ColorsManager.drpoDownSelectBlue : ColorsManager.blackColor, ), ), diff --git a/lib/utils/color_manager.dart b/lib/utils/color_manager.dart index 40fca1fa..9cf3482b 100644 --- a/lib/utils/color_manager.dart +++ b/lib/utils/color_manager.dart @@ -84,4 +84,5 @@ abstract class ColorsManager { static const Color minBlue = Color(0xFF93AAFD); static const Color minBlueDot = Color(0xFF023DFE); static const Color grey25 = Color(0xFFF9F9F9); + static const Color drpoDownSelectBlue = Color(0xFF2196F3); } From fe090175e3209f4078b3fd0c1d2806f5e5705ef8 Mon Sep 17 00:00:00 2001 From: Rafeek-Khoudare Date: Tue, 15 Jul 2025 11:52:57 +0300 Subject: [PATCH 3/7] fix Typo --- lib/pages/routines/create_new_routines/space_dropdown.dart | 4 ++-- lib/utils/color_manager.dart | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/pages/routines/create_new_routines/space_dropdown.dart b/lib/pages/routines/create_new_routines/space_dropdown.dart index ed445c61..012b2ae7 100644 --- a/lib/pages/routines/create_new_routines/space_dropdown.dart +++ b/lib/pages/routines/create_new_routines/space_dropdown.dart @@ -52,7 +52,7 @@ class SpaceDropdown extends StatelessWidget { fontSize: 16, fontWeight: FontWeight.bold, color: selectedValue == space.uuid - ? ColorsManager.drpoDownSelectBlue + ? ColorsManager.dropDownSelectBlue : ColorsManager.blackColor, ), ), @@ -61,7 +61,7 @@ class SpaceDropdown extends StatelessWidget { style: Theme.of(context).textTheme.bodyMedium!.copyWith( fontSize: 12, color: selectedValue == space.uuid - ? ColorsManager.drpoDownSelectBlue + ? ColorsManager.dropDownSelectBlue : ColorsManager.blackColor, ), ), diff --git a/lib/utils/color_manager.dart b/lib/utils/color_manager.dart index 9cf3482b..d6571065 100644 --- a/lib/utils/color_manager.dart +++ b/lib/utils/color_manager.dart @@ -84,5 +84,5 @@ abstract class ColorsManager { static const Color minBlue = Color(0xFF93AAFD); static const Color minBlueDot = Color(0xFF023DFE); static const Color grey25 = Color(0xFFF9F9F9); - static const Color drpoDownSelectBlue = Color(0xFF2196F3); + static const Color dropDownSelectBlue = Color(0xFF2196F3); } From 995ce480cbb6a0ac60fad73f660e01d7ba15e20b Mon Sep 17 00:00:00 2001 From: Rafeek-Khoudare Date: Thu, 17 Jul 2025 17:44:30 +0300 Subject: [PATCH 4/7] requested note --- .../routines/create_new_routines/dropdown_menu_content.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/pages/routines/create_new_routines/dropdown_menu_content.dart b/lib/pages/routines/create_new_routines/dropdown_menu_content.dart index 949ee9fe..67c19600 100644 --- a/lib/pages/routines/create_new_routines/dropdown_menu_content.dart +++ b/lib/pages/routines/create_new_routines/dropdown_menu_content.dart @@ -1,6 +1,7 @@ import 'dart:async'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:syncrow_web/utils/color_manager.dart'; import 'space_tree_dropdown_bloc.dart'; class DropdownMenuContent extends StatefulWidget { @@ -87,7 +88,7 @@ class _DropdownMenuContentState extends State { focusedBorder: OutlineInputBorder( borderRadius: BorderRadius.circular(8), borderSide: const BorderSide( - color: Colors.blue, + color: ColorsManager.dropDownSelectBlue, ), ), isDense: true, From b738596b504a1c2d69a71e2089b4989d5161ca67 Mon Sep 17 00:00:00 2001 From: Rafeek-Khoudare Date: Mon, 21 Jul 2025 09:14:59 +0300 Subject: [PATCH 5/7] no need for colors instead use ColorsManager --- .../create_new_routines/dropdown_menu_content.dart | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/pages/routines/create_new_routines/dropdown_menu_content.dart b/lib/pages/routines/create_new_routines/dropdown_menu_content.dart index 67c19600..4b2206ba 100644 --- a/lib/pages/routines/create_new_routines/dropdown_menu_content.dart +++ b/lib/pages/routines/create_new_routines/dropdown_menu_content.dart @@ -76,7 +76,8 @@ class _DropdownMenuContentState extends State { child: TextFormField( controller: _searchController, onChanged: _handleSearch, - style: const TextStyle(fontSize: 14, color: Colors.black), + style: const TextStyle( + fontSize: 14, color: ColorsManager.blackColor), decoration: InputDecoration( hintText: 'Search for space...', prefixIcon: const Icon(Icons.search, size: 20), @@ -124,7 +125,9 @@ class _DropdownMenuContentState extends State { title: Text( community.name, style: TextStyle( - color: isSelected ? Colors.blue : Colors.black, + color: isSelected + ? ColorsManager.dropDownSelectBlue + : ColorsManager.blackColor, fontWeight: isSelected ? FontWeight.bold : FontWeight.normal, ), From 59058cf2d223eec3507da6fbfd188ccb533c5861 Mon Sep 17 00:00:00 2001 From: mohammad Date: Tue, 22 Jul 2025 14:40:50 +0300 Subject: [PATCH 6/7] enhance week navigation layout for improved UI --- .../presentation/view/booking_page.dart | 5 +---- .../view/widgets/week_navigation.dart | 19 +++++++++++++------ 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/lib/pages/access_management/booking_system/presentation/view/booking_page.dart b/lib/pages/access_management/booking_system/presentation/view/booking_page.dart index 68934ddc..6ff7643d 100644 --- a/lib/pages/access_management/booking_system/presentation/view/booking_page.dart +++ b/lib/pages/access_management/booking_system/presentation/view/booking_page.dart @@ -1,4 +1,3 @@ -// booking_page.dart import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:calendar_view/calendar_view.dart'; @@ -90,8 +89,7 @@ class _BookingPageContentState extends State<_BookingPageContent> { return BlocListener( listener: (context, state) { if (state.selectedBookableSpace != null) { - // Reset events and clear cache when room changes - context.read().add(ResetEvents()); + context.read().add(const ResetEvents()); _loadEvents(context); } }, @@ -237,7 +235,6 @@ class _BookingPageContentState extends State<_BookingPageContent> { .watch() .state .selectedDateFromSideBarCalender, - // isLoading: eventState is EventsLoading, ); }, ); diff --git a/lib/pages/access_management/booking_system/presentation/view/widgets/week_navigation.dart b/lib/pages/access_management/booking_system/presentation/view/widgets/week_navigation.dart index bdc65b8e..819e4068 100644 --- a/lib/pages/access_management/booking_system/presentation/view/widgets/week_navigation.dart +++ b/lib/pages/access_management/booking_system/presentation/view/widgets/week_navigation.dart @@ -19,6 +19,7 @@ class WeekNavigation extends StatelessWidget { @override Widget build(BuildContext context) { return Container( + width: 250, padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 5), decoration: BoxDecoration( color: ColorsManager.circleRolesBackground, @@ -32,6 +33,8 @@ class WeekNavigation extends StatelessWidget { ], ), child: Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, children: [ IconButton( iconSize: 15, @@ -40,12 +43,16 @@ class WeekNavigation extends StatelessWidget { onPressed: onPreviousWeek, ), const SizedBox(width: 10), - Text( - _getMonthYearText(weekStart, weekEnd), - style: const TextStyle( - color: ColorsManager.lightGrayColor, - fontSize: 14, - fontWeight: FontWeight.w400, + SizedBox( + width: 120, + child: Text( + _getMonthYearText(weekStart, weekEnd), + style: const TextStyle( + color: ColorsManager.lightGrayColor, + fontSize: 14, + fontWeight: FontWeight.w400, + ), + textAlign: TextAlign.center, ), ), const SizedBox(width: 10), From e4c41bab90d772a01ec6bb77f6706cd1018382aa Mon Sep 17 00:00:00 2001 From: Faris Armoush Date: Wed, 23 Jul 2025 09:37:11 +0300 Subject: [PATCH 7/7] bugfix/assign_tag_to_devices_table_overflow. --- .../widgets/assign_tags_table.dart | 317 +++++++++--------- 1 file changed, 161 insertions(+), 156 deletions(-) diff --git a/lib/pages/space_management_v2/modules/tags/presentation/widgets/assign_tags_table.dart b/lib/pages/space_management_v2/modules/tags/presentation/widgets/assign_tags_table.dart index 1711e019..e37de217 100644 --- a/lib/pages/space_management_v2/modules/tags/presentation/widgets/assign_tags_table.dart +++ b/lib/pages/space_management_v2/modules/tags/presentation/widgets/assign_tags_table.dart @@ -31,173 +31,178 @@ class AssignTagsTable extends StatelessWidget { DataColumn _buildDataColumn(BuildContext context, String label) { return DataColumn( - label: SelectableText(label, style: context.textTheme.bodyMedium), + label: Expanded( + child: FittedBox( + alignment: AlignmentDirectional.centerStart, + fit: BoxFit.scaleDown, + child: SelectableText(label, style: context.textTheme.bodyMedium), + ), + ), ); } @override Widget build(BuildContext context) { return BlocProvider( - create: (BuildContext context) => TagsBloc( + create: (context) => TagsBloc( RemoteTagsService(HTTPService()), )..add(const LoadTags()), child: BlocBuilder( - builder: (context, state) { - return switch (state) { - TagsLoading() || TagsInitial() => const Center( - child: CircularProgressIndicator(), - ), - TagsFailure(:final message) => Center( - child: Text(message), - ), - TagsLoaded(:final tags) => ClipRRect( - borderRadius: BorderRadius.circular(20), - child: DataTable( - headingRowColor: WidgetStateProperty.all( - ColorsManager.dataHeaderGrey, - ), - key: ValueKey(productAllocations.length), - border: TableBorder.all( - color: ColorsManager.dataHeaderGrey, - width: 1, - borderRadius: BorderRadius.circular(20), - ), - columns: [ - _buildDataColumn(context, '#'), - _buildDataColumn(context, 'Device'), - _buildDataColumn(context, 'Tag'), - _buildDataColumn(context, 'Location'), - ], - rows: productAllocations.isEmpty - ? [ - DataRow( - cells: [ - DataCell( - Center( - child: SelectableText( - 'No Devices Available', - style: context.textTheme.bodyMedium?.copyWith( - color: ColorsManager.lightGrayColor, - ), - ), - ), - ), - DataCell.empty, - DataCell.empty, - DataCell.empty, - ], - ), - ] - : List.generate(productAllocations.length, (index) { - final productAllocation = productAllocations[index]; - final allocationUuid = productAllocation.uuid; - - final availableTags = tags - .where( - (tag) => - !productAllocations - .where((p) => - p.product.productType == - productAllocation.product.productType) - .map((p) => p.tag.name.toLowerCase()) - .contains(tag.name.toLowerCase()) || - tag.uuid == productAllocation.tag.uuid, - ) - .toList(); - - final currentLocationUuid = - productLocations[allocationUuid]; - final currentLocationName = currentLocationUuid == null - ? 'Main Space' - : subspaces - .firstWhere((s) => s.uuid == currentLocationUuid) - .name; - - return DataRow( - key: ValueKey(allocationUuid), - cells: [ - DataCell(Text((index + 1).toString())), - DataCell( - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Expanded( - child: Text( - productAllocation.product.name, - overflow: TextOverflow.ellipsis, - )), - const SizedBox(width: 10), - Container( - width: 20, - height: 20, - decoration: BoxDecoration( - shape: BoxShape.circle, - border: Border.all( - color: ColorsManager.lightGrayColor, - width: 1, - ), - ), - child: IconButton( - icon: const Icon( - Icons.close, - color: ColorsManager.lightGreyColor, - size: 16, - ), - onPressed: () { - onProductDeleted(allocationUuid); - }, - tooltip: 'Delete Tag', - padding: EdgeInsets.zero, - constraints: const BoxConstraints(), - ), - ), - ], - ), - ), - DataCell( - Container( - alignment: Alignment.centerLeft, - width: double.infinity, - child: ProductTagField( - key: ValueKey('dropdown_$allocationUuid'), - productName: productAllocation.product.uuid, - initialValue: productAllocation.tag, - onSelected: (newTag) { - onTagSelected(allocationUuid, newTag); - }, - items: availableTags, - ), - ), - ), - DataCell( - SizedBox( - width: double.infinity, - child: DialogDropdown( - items: [ - 'Main Space', - ...subspaces.map((s) => s.name) - ], - selectedValue: currentLocationName, - onSelected: (newLocationName) { - final newSubspaceUuid = newLocationName == - 'Main Space' - ? null - : subspaces - .firstWhere( - (s) => s.name == newLocationName) - .uuid; - onLocationSelected( - allocationUuid, newSubspaceUuid); - }, - )), - ), - ], - ); - }), + builder: (context, state) => switch (state) { + TagsLoading() || TagsInitial() => const Center( + child: CircularProgressIndicator(), + ), + TagsFailure(:final message) => Center( + child: Text(message), + ), + TagsLoaded(:final tags) => ClipRRect( + borderRadius: BorderRadius.circular(20), + child: DataTable( + headingRowColor: WidgetStateProperty.all( + ColorsManager.dataHeaderGrey, ), + key: ValueKey(productAllocations.length), + border: TableBorder.all( + color: ColorsManager.dataHeaderGrey, + width: 1, + borderRadius: BorderRadius.circular(20), + ), + columns: [ + _buildDataColumn(context, '#'), + _buildDataColumn(context, 'Device'), + _buildDataColumn(context, 'Tag'), + _buildDataColumn(context, 'Location'), + ], + rows: productAllocations.isEmpty + ? [ + DataRow( + cells: [ + DataCell( + FittedBox( + alignment: AlignmentDirectional.centerStart, + fit: BoxFit.scaleDown, + child: SelectableText( + 'No Devices Available', + style: context.textTheme.bodyMedium?.copyWith( + color: ColorsManager.lightGrayColor, + ), + ), + ), + ), + DataCell.empty, + DataCell.empty, + DataCell.empty, + ], + ), + ] + : List.generate(productAllocations.length, (index) { + final productAllocation = productAllocations[index]; + final allocationUuid = productAllocation.uuid; + + final availableTags = tags + .where( + (tag) => + !productAllocations + .where((p) => + p.product.productType == + productAllocation.product.productType) + .map((p) => p.tag.name.toLowerCase()) + .contains(tag.name.toLowerCase()) || + tag.uuid == productAllocation.tag.uuid, + ) + .toList(); + + final currentLocationUuid = productLocations[allocationUuid]; + final currentLocationName = currentLocationUuid == null + ? 'Main Space' + : subspaces + .firstWhere((s) => s.uuid == currentLocationUuid) + .name; + + return DataRow( + key: ValueKey(allocationUuid), + cells: [ + DataCell(Text((index + 1).toString())), + DataCell( + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: Text( + productAllocation.product.name, + overflow: TextOverflow.ellipsis, + )), + const SizedBox(width: 10), + Container( + width: 20, + height: 20, + decoration: BoxDecoration( + shape: BoxShape.circle, + border: Border.all( + color: ColorsManager.lightGrayColor, + width: 1, + ), + ), + child: IconButton( + icon: const Icon( + Icons.close, + color: ColorsManager.lightGreyColor, + size: 16, + ), + onPressed: () { + onProductDeleted(allocationUuid); + }, + tooltip: 'Delete Tag', + padding: EdgeInsets.zero, + constraints: const BoxConstraints(), + ), + ), + ], + ), + ), + DataCell( + Container( + alignment: Alignment.centerLeft, + width: double.infinity, + child: ProductTagField( + key: ValueKey('dropdown_$allocationUuid'), + productName: productAllocation.product.uuid, + initialValue: productAllocation.tag, + onSelected: (newTag) { + onTagSelected(allocationUuid, newTag); + }, + items: availableTags, + ), + ), + ), + DataCell( + SizedBox( + width: double.infinity, + child: DialogDropdown( + items: [ + 'Main Space', + ...subspaces.map((s) => s.name) + ], + selectedValue: currentLocationName, + onSelected: (newLocationName) { + final newSubspaceUuid = newLocationName == + 'Main Space' + ? null + : subspaces + .firstWhere( + (s) => s.name == newLocationName) + .uuid; + onLocationSelected( + allocationUuid, newSubspaceUuid); + }, + )), + ), + ], + ); + }), ), - _ => const SizedBox.shrink(), - }; + ), + _ => const SizedBox.shrink(), }, ), );