mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-08-25 11:39:39 +00:00
enhance week navigation layout for improved UI (#363)
<!-- 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 --> enhance week navigation layout for improved UI ## 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
This commit is contained in:
@ -1,4 +1,3 @@
|
|||||||
// booking_page.dart
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:calendar_view/calendar_view.dart';
|
import 'package:calendar_view/calendar_view.dart';
|
||||||
@ -90,8 +89,7 @@ class _BookingPageContentState extends State<_BookingPageContent> {
|
|||||||
return BlocListener<SelectedBookableSpaceBloc, SelectedBookableSpaceState>(
|
return BlocListener<SelectedBookableSpaceBloc, SelectedBookableSpaceState>(
|
||||||
listener: (context, state) {
|
listener: (context, state) {
|
||||||
if (state.selectedBookableSpace != null) {
|
if (state.selectedBookableSpace != null) {
|
||||||
// Reset events and clear cache when room changes
|
context.read<CalendarEventsBloc>().add(const ResetEvents());
|
||||||
context.read<CalendarEventsBloc>().add(ResetEvents());
|
|
||||||
_loadEvents(context);
|
_loadEvents(context);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -237,7 +235,6 @@ class _BookingPageContentState extends State<_BookingPageContent> {
|
|||||||
.watch<DateSelectionBloc>()
|
.watch<DateSelectionBloc>()
|
||||||
.state
|
.state
|
||||||
.selectedDateFromSideBarCalender,
|
.selectedDateFromSideBarCalender,
|
||||||
// isLoading: eventState is EventsLoading,
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
@ -19,6 +19,7 @@ class WeekNavigation extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Container(
|
return Container(
|
||||||
|
width: 250,
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 5),
|
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 5),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: ColorsManager.circleRolesBackground,
|
color: ColorsManager.circleRolesBackground,
|
||||||
@ -32,6 +33,8 @@ class WeekNavigation extends StatelessWidget {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
IconButton(
|
IconButton(
|
||||||
iconSize: 15,
|
iconSize: 15,
|
||||||
@ -40,12 +43,16 @@ class WeekNavigation extends StatelessWidget {
|
|||||||
onPressed: onPreviousWeek,
|
onPressed: onPreviousWeek,
|
||||||
),
|
),
|
||||||
const SizedBox(width: 10),
|
const SizedBox(width: 10),
|
||||||
Text(
|
SizedBox(
|
||||||
_getMonthYearText(weekStart, weekEnd),
|
width: 120,
|
||||||
style: const TextStyle(
|
child: Text(
|
||||||
color: ColorsManager.lightGrayColor,
|
_getMonthYearText(weekStart, weekEnd),
|
||||||
fontSize: 14,
|
style: const TextStyle(
|
||||||
fontWeight: FontWeight.w400,
|
color: ColorsManager.lightGrayColor,
|
||||||
|
fontSize: 14,
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
),
|
||||||
|
textAlign: TextAlign.center,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 10),
|
const SizedBox(width: 10),
|
||||||
|
Reference in New Issue
Block a user