Compare commits

...

4 Commits

Author SHA1 Message Date
3bc20a48c9 Merge pull request #117 from SyncrowIOT/Add-Booking-to-bottom-navigation-bar
[FE] Add Booking to bottom navigation bar
2025-07-23 14:30:01 +03:00
bae6a09a87 fix imports 2025-07-23 14:09:23 +03:00
6f0e83b95b fix UI depend on the new design 2025-07-23 14:08:57 +03:00
15b6d642ff add the icon to nave bar and remove from menu 2025-07-23 14:08:38 +03:00
7 changed files with 57 additions and 52 deletions

View File

@ -0,0 +1,10 @@
<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_11681_2046)">
<path d="M20.615 14.4212L18.9717 5.10949C18.62 3.11866 16.89 1.66699 14.8684 1.66699H6.46502C3.58336 1.66699 2.57836 3.87949 2.36169 5.10949L0.726691 14.3703C0.625024 14.9487 0.646691 15.5512 0.848357 16.102C1.35502 17.4895 2.62252 18.3337 4.00086 18.3337C4.00086 18.3337 4.93586 18.3287 4.98752 18.3187C5.35502 18.2495 5.60836 17.9462 5.64919 17.5928C5.14919 16.9095 4.77586 16.122 4.61086 15.2453L3.61836 9.97616C3.47252 9.20199 3.47586 8.40866 3.62752 7.63532C3.86252 6.43866 4.20669 4.74033 4.29836 4.58199L6.24752 14.937C6.61836 16.9062 8.33836 18.3328 10.3425 18.3328H17.2109C17.9684 18.3328 18.7284 18.1287 19.3317 17.6695C20.3575 16.8895 20.83 15.6403 20.615 14.4212ZM8.16669 6.66699C8.16669 6.20699 8.54002 5.83366 9.00002 5.83366H14.8334C15.2934 5.83366 15.6667 6.20699 15.6667 6.66699C15.6667 7.12699 15.2934 7.50033 14.8334 7.50033H9.00002C8.54002 7.50033 8.16669 7.12699 8.16669 6.66699ZM8.77586 10.0003C8.77586 9.54033 9.14919 9.16699 9.60919 9.16699H15.4425C15.9025 9.16699 16.2759 9.54033 16.2759 10.0003C16.2759 10.4603 15.9025 10.8337 15.4425 10.8337H9.60919C9.14919 10.8337 8.77586 10.4603 8.77586 10.0003ZM16.0834 14.167H10.25C9.79002 14.167 9.41669 13.7945 9.41669 13.3337C9.41669 12.8728 9.79002 12.5003 10.25 12.5003H16.0834C16.5434 12.5003 16.9167 12.8728 16.9167 13.3337C16.9167 13.7945 16.5434 14.167 16.0834 14.167Z" fill="#999999"/>
</g>
<defs>
<clipPath id="clip0_11681_2046">
<rect width="20" height="20" fill="white" transform="translate(0.666687)"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -12,6 +12,7 @@ import 'package:syncrow_app/features/app_layout/model/space_model.dart';
import 'package:syncrow_app/features/app_layout/view/widgets/app_bar_home_dropdown.dart'; import 'package:syncrow_app/features/app_layout/view/widgets/app_bar_home_dropdown.dart';
import 'package:syncrow_app/features/auth/model/project_model.dart'; import 'package:syncrow_app/features/auth/model/project_model.dart';
import 'package:syncrow_app/features/auth/model/user_model.dart'; import 'package:syncrow_app/features/auth/model/user_model.dart';
import 'package:syncrow_app/features/booking_system/presentation/screens/booking_system_page.dart';
import 'package:syncrow_app/features/devices/bloc/devices_cubit.dart'; import 'package:syncrow_app/features/devices/bloc/devices_cubit.dart';
import 'package:syncrow_app/features/devices/model/subspace_model.dart'; import 'package:syncrow_app/features/devices/model/subspace_model.dart';
import 'package:syncrow_app/features/devices/view/widgets/devices_view_body.dart'; import 'package:syncrow_app/features/devices/view/widgets/devices_view_body.dart';
@ -32,6 +33,7 @@ import 'package:syncrow_app/services/api/spaces_api.dart';
import 'package:syncrow_app/utils/constants/temp_const.dart'; import 'package:syncrow_app/utils/constants/temp_const.dart';
import 'package:syncrow_app/utils/helpers/snack_bar.dart'; import 'package:syncrow_app/utils/helpers/snack_bar.dart';
import 'package:syncrow_app/utils/resource_manager/color_manager.dart'; import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
import 'package:syncrow_app/utils/resource_manager/font_manager.dart';
part 'home_state.dart'; part 'home_state.dart';
class HomeCubit extends Cubit<HomeState> { class HomeCubit extends Cubit<HomeState> {
@ -538,6 +540,7 @@ class HomeCubit extends Cubit<HomeState> {
// onPressed: () {}, // onPressed: () {},
// ), // ),
], ],
'Booking': [],
'Menu': [ 'Menu': [
// IconButton( // IconButton(
// icon: SvgPicture.asset( // icon: SvgPicture.asset(
@ -554,6 +557,18 @@ class HomeCubit extends Cubit<HomeState> {
// 'Dashboard': const AppBarHomeDropdown(), // 'Dashboard': const AppBarHomeDropdown(),
'Devices': const AppBarHomeDropdown(), 'Devices': const AppBarHomeDropdown(),
'Automation': const AppBarHomeDropdown(), 'Automation': const AppBarHomeDropdown(),
'Booking': Padding(
padding: const EdgeInsets.only(left: 15),
child: Text(
'Booking',
style: TextStyle(
color: ColorsManager.textPrimaryColor,
fontSize: 26,
fontFamily: FontsManager.fontFamily,
fontWeight: FontWeight.w700,
),
),
),
'Menu': Padding( 'Menu': Padding(
padding: const EdgeInsets.only(left: 15), padding: const EdgeInsets.only(left: 15),
child: Image.asset( child: Image.asset(
@ -571,6 +586,7 @@ class HomeCubit extends Cubit<HomeState> {
defaultBottomNavBarItem(icon: Assets.assetsIconsDevices, label: 'Devices'), defaultBottomNavBarItem(icon: Assets.assetsIconsDevices, label: 'Devices'),
defaultBottomNavBarItem( defaultBottomNavBarItem(
icon: Assets.assetsIconsRoutines, label: 'Automation'), icon: Assets.assetsIconsRoutines, label: 'Automation'),
defaultBottomNavBarItem(icon: Assets.bookingIcon, label: 'Booking'),
defaultBottomNavBarItem(icon: Assets.assetsIconsMenu, label: 'Menu'), defaultBottomNavBarItem(icon: Assets.assetsIconsMenu, label: 'Menu'),
]; ];
@ -582,6 +598,7 @@ class HomeCubit extends Cubit<HomeState> {
child: const DevicesViewBody(), child: const DevicesViewBody(),
), ),
const RoutinesView(), const RoutinesView(),
const BookingSystemPage(),
const MenuView(), const MenuView(),
]; ];

View File

@ -3,9 +3,7 @@ import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:syncrow_app/features/app_layout/bloc/home_cubit.dart'; import 'package:syncrow_app/features/app_layout/bloc/home_cubit.dart';
import 'package:syncrow_app/features/booking_system/data/booking_dummy_source.dart'; import 'package:syncrow_app/features/booking_system/data/booking_dummy_source.dart';
import 'package:syncrow_app/features/booking_system/presentation/blocs/upcoming_bookings_bloc/upcoming_bookings_bloc.dart'; import 'package:syncrow_app/features/booking_system/presentation/blocs/upcoming_bookings_bloc/upcoming_bookings_bloc.dart';
import 'package:syncrow_app/features/shared_widgets/default_scaffold.dart';
import '../blocs/past_bookings_bloc/past_bookings_bloc.dart'; import '../blocs/past_bookings_bloc/past_bookings_bloc.dart';
import '../widgets/booking_appbar_widget.dart';
import '../widgets/current_balance_widget.dart'; import '../widgets/current_balance_widget.dart';
import '../widgets/past_booking_widget.dart'; import '../widgets/past_booking_widget.dart';
import '../widgets/upcoming_bookings_widget.dart'; import '../widgets/upcoming_bookings_widget.dart';
@ -26,16 +24,11 @@ class BookingSystemPage extends StatelessWidget {
..add(GetPastBookingsEvent()), ..add(GetPastBookingsEvent()),
) )
], ],
child: DefaultScaffold(
appBar: BookingAppBar(),
child: Padding( child: Padding(
padding: EdgeInsets.symmetric(horizontal: 10), padding: EdgeInsets.symmetric(horizontal: 10),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
SizedBox(
height: 20,
),
Expanded( Expanded(
flex: 2, flex: 2,
child: CurrentBalanceWidget( child: CurrentBalanceWidget(
@ -61,7 +54,6 @@ class BookingSystemPage extends StatelessWidget {
) )
], ],
), ),
),
)); ));
} }
} }

View File

@ -10,10 +10,7 @@ class BookingAppBar extends StatelessWidget implements PreferredSizeWidget {
return AppBar( return AppBar(
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
centerTitle: true, centerTitle: true,
leading: IconButton( leading: Text(
onPressed: () => Navigator.pop(context),
icon: Icon(Icons.arrow_back_ios_new)),
title: Text(
'Booking', 'Booking',
style: TextStyle( style: TextStyle(
color: ColorsManager.blueColor1, color: ColorsManager.blueColor1,

View File

@ -39,7 +39,7 @@ class PastBookingsWidget extends StatelessWidget {
); );
} else if (state is PastBookingLoadedState) { } else if (state is PastBookingLoadedState) {
return SizedBox( return SizedBox(
height: deviceHeight(context) * 0.3, height: deviceHeight(context) * 0.22,
child: state.pastBookings.isEmpty child: state.pastBookings.isEmpty
? Text('You Dont Have past Bookings') ? Text('You Dont Have past Bookings')
: ListView.separated( : ListView.separated(

View File

@ -45,18 +45,6 @@ class MenuCubit extends Cubit<MenuState> {
} }
List<Map<String, Object>> menuSections = [ List<Map<String, Object>> menuSections = [
//Booking System
{
'title': 'Booking System',
'color': const Color(0xFF8AB9FF),
'buttons': [
{
'title': 'Booking',
'Icon': Assets.assetsIconsMenuBookingSystem,
'page': BookingSystemPage()
},
],
},
//Home Management //Home Management
{ {
'title': 'Home Management', 'title': 'Home Management',

View File

@ -1129,6 +1129,7 @@ class Assets {
static const String verificationIcon = "assets/icons/verification_icon.svg"; static const String verificationIcon = "assets/icons/verification_icon.svg";
static const String deleteAccountIcon='assets/icons/delete_account_icon.svg'; static const String deleteAccountIcon='assets/icons/delete_account_icon.svg';
static const String bookingIcon='assets/icons/booking_icon.svg';
static const String passwordUnvisibility = static const String passwordUnvisibility =
"assets/icons/password_unvisibility.svg"; "assets/icons/password_unvisibility.svg";
static const String passwordVisibility = static const String passwordVisibility =