diff --git a/assets/Rules.pdf b/assets/Rules.pdf new file mode 100644 index 00000000..a3b6195f Binary files /dev/null and b/assets/Rules.pdf differ diff --git a/lib/Components/appBar.dart b/lib/Components/appBar.dart index 9f4cb686..6ba282ad 100644 --- a/lib/Components/appBar.dart +++ b/lib/Components/appBar.dart @@ -8,7 +8,8 @@ class DefaultAppBar { backgroundColor: kPrimaryColor, title: Text( "Dashboard", - style: TextStyle(color: Colors.white, fontSize: 18, fontWeight: FontWeight.bold), + style: TextStyle( + color: Colors.white, fontSize: 18, fontWeight: FontWeight.bold), ), actions: [ Padding( @@ -26,4 +27,32 @@ class DefaultAppBar { ], ); } + + AppBar visitorHostelAppBar() { + return AppBar( + iconTheme: IconThemeData(color: Colors.white), + title: Text( + "Visitor Hostel", + style: TextStyle( + color: Colors.white, fontSize: 18, fontWeight: FontWeight.bold), + ), + backgroundColor: Color.fromARGB(255, 243, 108, 53), + // ignore: prefer_const_literals_to_create_immutables + actions: [ + Padding( + padding: EdgeInsets.all(8.0), + child: Icon(Icons.search), + ), + Padding( + padding: EdgeInsets.all(8.0), + child: Icon(Icons.notifications), + ), + Padding( + padding: EdgeInsets.all(8.0), + child: Icon(Icons.more_vert), + ), + ], + elevation: 0, + ); + } } diff --git a/lib/Components/side_drawer.dart b/lib/Components/side_drawer.dart index be08db0e..da171ae3 100644 --- a/lib/Components/side_drawer.dart +++ b/lib/Components/side_drawer.dart @@ -141,7 +141,11 @@ class _SideDrawerState extends State { ), ModulesPadding(line: 'Leave Module'), ModulesPadding(line: 'Placement Module'), - ModulesPadding(line: 'Visitors Hostel Module'), + ModulesPadding( + line: 'Visitors Hostel Module', + pageMover: '/visitor_hostel', + isActive: true, + ), ModulesPadding(line: 'File Tracking Module'), ], ), diff --git a/lib/main.dart b/lib/main.dart index 9ca81ff8..80ab9b6e 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -35,6 +35,7 @@ import 'package:fusion/screens/Programme_Curriculum/Discipline/discipline.dart'; import 'package:fusion/screens/Programme_Curriculum/Programme/programme_home_page.dart'; import 'package:fusion/screens/Programme_Curriculum/Programme_Info/programme_info.dart'; import 'package:fusion/screens/Programme_Curriculum/programme_curriculum_home.dart'; +import 'package:fusion/screens/Visitors_Hostel/visitors_hostel_home.dart'; import 'package:fusion/screens/landing_page.dart'; import 'package:fusion/screens/Healthcenter/healthcentermodule.dart'; import 'package:fusion/screens/Healthcenter/feedback.dart'; @@ -127,6 +128,7 @@ class MyApp extends StatelessWidget { '/health_center/feedback': (context) => FeedBack(), '/health_center/viewschedule': (context) => ViewSchedule(), '/health_center/history': (context) => History(), + '/visitor_hostel' : (context) => VisitorHostel(), }, ), ); diff --git a/lib/screens/Visitors_Hostel/Components/Card.dart b/lib/screens/Visitors_Hostel/Components/Card.dart new file mode 100644 index 00000000..30192c94 --- /dev/null +++ b/lib/screens/Visitors_Hostel/Components/Card.dart @@ -0,0 +1,27 @@ +import 'package:flutter/material.dart'; +import 'package:fusion/screens/Visitors_Hostel/Components/list_tile.dart'; + +class BookingInfoCard extends StatelessWidget { + final List bookingInfoTiles; + + const BookingInfoCard({required this.bookingInfoTiles}); + + @override + Widget build(BuildContext context) { + return Container( + width: MediaQuery.of(context).size.width * 0.8, + child: Card( + shape: RoundedRectangleBorder( + side: BorderSide( + color: Colors.black, + ), + borderRadius: BorderRadius.circular(20.0), + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.end, + children: bookingInfoTiles, + ), + ), + ); + } +} \ No newline at end of file diff --git a/lib/screens/Visitors_Hostel/Components/RulesAndRegulation.dart b/lib/screens/Visitors_Hostel/Components/RulesAndRegulation.dart new file mode 100644 index 00000000..faecbcaf --- /dev/null +++ b/lib/screens/Visitors_Hostel/Components/RulesAndRegulation.dart @@ -0,0 +1,16 @@ +import 'package:flutter/material.dart'; +import 'package:syncfusion_flutter_pdfviewer/pdfviewer.dart'; + +class MyPdfViewer extends StatelessWidget { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text('PDF Viewer'), + ), + body: SfPdfViewer.asset( + 'assets/Rules.pdf', + ), + ); + } +} \ No newline at end of file diff --git a/lib/screens/Visitors_Hostel/Components/list_tile.dart b/lib/screens/Visitors_Hostel/Components/list_tile.dart new file mode 100644 index 00000000..a2a1a811 --- /dev/null +++ b/lib/screens/Visitors_Hostel/Components/list_tile.dart @@ -0,0 +1,36 @@ +import 'package:flutter/material.dart'; + + +class CardListTile extends StatelessWidget { + final IconData iconData; + final String label; + final String value; + final Color color; + const CardListTile({ + required this.iconData, + required this.label, + required this.value, + required this.color, + }); + + @override + Widget build(BuildContext context) { + return ListTile( + leading: Icon(iconData), + title: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text(label), + Expanded( + child: Align( + alignment: Alignment.centerRight, + child: Text(value), + ), + ), + ], + ), + tileColor: color, + ); + } +} + \ No newline at end of file diff --git a/lib/screens/Visitors_Hostel/accounts.dart b/lib/screens/Visitors_Hostel/accounts.dart new file mode 100644 index 00000000..9e77ab93 --- /dev/null +++ b/lib/screens/Visitors_Hostel/accounts.dart @@ -0,0 +1,99 @@ +import 'package:flutter/material.dart'; +import 'package:fusion/Components/appBar.dart'; +import 'package:fusion/screens/Visitors_Hostel/Components/Card.dart'; +import 'package:fusion/screens/Visitors_Hostel/Components/list_tile.dart'; + +class Accounts extends StatefulWidget { + @override + State createState() => _AccountsState(); +} + +class _AccountsState extends State { + List> bookingData = [ + { + 'Intender': 'Bob', + 'BookingFrom': '21st Jan', + 'BookingTo': '28th Jan', + 'Category': 'B', + 'Status': 'Active' + }, + ]; + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: DefaultAppBar().visitorHostelAppBar(), + body: Column( + children: [ + Expanded( + child: Container( + height: double.infinity, + width: double.infinity, + decoration: BoxDecoration( + color: Color.fromARGB(255, 248, 247, 247), + ), + child: SingleChildScrollView( + child: Column( + children: [ + SizedBox(height: 24.0), + Text( + "Accounts", + style: + TextStyle(fontSize: 24, fontWeight: FontWeight.w700), + ), + SizedBox(height: 12.0), + Text("Income", + style: TextStyle( + fontSize: 16, fontWeight: FontWeight.bold)), + Column( + children: List.generate(bookingData.length, (index) { + return Column( + children: [ + SizedBox(height: 20.0), + BookingInfoCard( + bookingInfoTiles: [ + CardListTile( + iconData: Icons.person, + label: 'Intender', + value: bookingData[index]['Intender'], + color: Colors.white, + ), + CardListTile( + iconData: Icons.today, + label: "BookingFrom", + value: bookingData[index]['BookingFrom'], + color: Color.fromARGB(255, 206, 205, 205), + ), + CardListTile( + iconData: Icons.event, + label: "BookingTo", + value: bookingData[index]['BookingTo'], + color: Colors.white, + ), + CardListTile( + iconData: Icons.category, + label: "Category", + value: bookingData[index]['Category'], + color: Color.fromARGB(255, 206, 205, 205), + ), + CardListTile( + iconData: Icons.info, + label: "Status", + value: bookingData[index]['Status'], + color: Colors.white, + ) + ], + ), + ], + ); + }), + ) + ], + ), + ), + ), + ), + ], + ), + ); + } +} diff --git a/lib/screens/Visitors_Hostel/activeBookings.dart b/lib/screens/Visitors_Hostel/activeBookings.dart new file mode 100644 index 00000000..ad1d9d8f --- /dev/null +++ b/lib/screens/Visitors_Hostel/activeBookings.dart @@ -0,0 +1,117 @@ +import 'package:flutter/material.dart'; +import 'package:fusion/Components/appBar.dart'; +import 'package:fusion/Components/side_drawer.dart'; +import 'package:fusion/screens/Visitors_Hostel/Components/Card.dart'; +import 'package:fusion/screens/Visitors_Hostel/Components/list_tile.dart'; + +class ActiveBookings extends StatefulWidget { + @override + _ActiveBookingsState createState() => _ActiveBookingsState(); +} + +class _ActiveBookingsState extends State { + List> bookingData = [ + { + 'Intender': 'Bob', + 'BookingFrom': '21st Jan', + 'BookingTo': '28th Jan', + 'Category': 'B', + 'Status': 'Active' + }, + { + 'Intender': 'Jane', + 'BookingFrom': '22nd Jan', + 'BookingTo': '29th Jan', + 'Category': 'A', + 'Status': 'Active' + }, + { + 'Intender': 'Bob', + 'BookingFrom': '21st Jan', + 'BookingTo': '28th Jan', + 'Category': 'B', + 'Status': 'Active' + }, + { + 'Intender': 'Jane', + 'BookingFrom': '22nd Jan', + 'BookingTo': '29th Jan', + 'Category': 'A', + 'Status': 'Active' + }, + ]; + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: DefaultAppBar().visitorHostelAppBar(), + drawer: SideDrawer(), + body: Column( + children: [ + Expanded( + child: Container( + height: double.infinity, + width: double.infinity, + child: SingleChildScrollView( + child: Column(children: [ + SizedBox(height: 24.0), + Text( + 'Active Bookings', + style: TextStyle( + fontSize: 20, + fontWeight: FontWeight.bold, + ), + ), + SizedBox(height: 20.0), + Column( + children: List.generate(bookingData.length, (index) { + return Column( + children: [ + SizedBox(height: 20.0), + BookingInfoCard( + bookingInfoTiles: [ + CardListTile( + iconData: Icons.person, + label: 'Intender', + value: bookingData[index]['Intender'], + color: Colors.white, + ), + CardListTile( + iconData: Icons.today, + label: "BookingFrom", + value: bookingData[index]['BookingFrom'], + color: Color.fromARGB(255, 206, 205, 205), + ), + CardListTile( + iconData: Icons.event, + label: "BookingTo", + value: bookingData[index]['BookingTo'], + color: Colors.white, + ), + CardListTile( + iconData: Icons.category, + label: "Category", + value: bookingData[index]['Category'], + color: Color.fromARGB(255, 206, 205, 205), + ), + CardListTile( + iconData: Icons.info, + label: "Status", + value: bookingData[index]['Status'], + color: Colors.white, + ) + ], + ), + ], + ); + }), + ) + ]), + ), + ), + ), + ], + ), + ); + } +} diff --git a/lib/screens/Visitors_Hostel/billDetails.dart b/lib/screens/Visitors_Hostel/billDetails.dart new file mode 100644 index 00000000..39cb9203 --- /dev/null +++ b/lib/screens/Visitors_Hostel/billDetails.dart @@ -0,0 +1,146 @@ +import 'package:flutter/material.dart'; +import 'package:fusion/Components/appBar.dart'; + +class BillDetails extends StatefulWidget { + @override + _PlaceRequestState createState() => _PlaceRequestState(); +} + +class _PlaceRequestState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: DefaultAppBar().visitorHostelAppBar(), + body: Column( + children: [ + Expanded( + child: Container( + height: double.infinity, + width: double.infinity, + decoration: BoxDecoration( + color: Color.fromARGB(255, 248, 247, 247), + ), + child: Column( + children: [ + SizedBox(height: 20), + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Column( + children: [ + Text('From'), + SizedBox(height: 10), + GestureDetector( + onTap: () { + showDatePicker( + context: context, + initialDate: DateTime.now(), + firstDate: DateTime.now(), + lastDate: DateTime(2100), + ).then((selectedDate) { + // handle selected arrival date + }); + }, + child: Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Colors.white, + border: Border.all( + color: Color.fromARGB(255, 243, 108, 53), + width: 1, + ), + ), + padding: EdgeInsets.symmetric( + horizontal: 15, + vertical: 10, + ), + child: Row( + children: [ + Icon( + Icons.calendar_today, + color: Color.fromARGB(255, 243, 108, 53), + ), + SizedBox(width: 10), + Text('Select Date'), + ], + ), + ), + ), + ], + ), + Column( + children: [ + Text('To'), + SizedBox(height: 10), + GestureDetector( + onTap: () { + showDatePicker( + context: context, + initialDate: DateTime.now(), + firstDate: DateTime.now(), + lastDate: DateTime(2100), + ).then((selectedDate) { + // handle selected arrival date + }); + }, + child: Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Colors.white, + border: Border.all( + color: Color.fromARGB(255, 243, 108, 53), + width: 1, + ), + ), + padding: EdgeInsets.symmetric( + horizontal: 15, + vertical: 10, + ), + child: Row( + children: [ + Icon( + Icons.calendar_today, + color: Color.fromARGB(255, 243, 108, 53), + ), + SizedBox(width: 10), + Text('Select Date'), + ], + ), + ), + ), + ], + ), + ], + ), + SizedBox(height: 20), + Column( + children: [ + Container( + width: MediaQuery.of(context).size.width * 0.3, + child: MaterialButton( + height: 40.0, + onPressed: () {}, + color: Color.fromARGB(255, 243, 108, 53), + textColor: Colors.white, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(5.0), + topRight: Radius.circular(5.0), + bottomLeft: Radius.circular(5.0), + bottomRight: Radius.circular(5.0), + ), + ), + child: Text('Submit', + style: TextStyle(fontSize: 18.0))), + ), + ], + ), + ], + ), + ), + ), + ], + ), + ); + } +} diff --git a/lib/screens/Visitors_Hostel/cancelRequest.dart b/lib/screens/Visitors_Hostel/cancelRequest.dart new file mode 100644 index 00000000..117b486a --- /dev/null +++ b/lib/screens/Visitors_Hostel/cancelRequest.dart @@ -0,0 +1,117 @@ +import 'package:flutter/material.dart'; +import 'package:fusion/Components/appBar.dart'; +import 'package:fusion/Components/side_drawer.dart'; +import 'package:fusion/screens/Visitors_Hostel/Components/Card.dart'; +import 'package:fusion/screens/Visitors_Hostel/Components/list_tile.dart'; + +class CancelledBookings extends StatefulWidget { + @override + _CancelledBookingsState createState() => _CancelledBookingsState(); +} + +class _CancelledBookingsState extends State { + List> bookingData = [ + { + 'Intender': 'Bob', + 'BookingFrom': '21st Jan', + 'BookingTo': '28th Jan', + 'Category': 'B', + 'Status': 'Cancelled' + }, + { + 'Intender': 'Jane', + 'BookingFrom': '22nd Jan', + 'BookingTo': '29th Jan', + 'Category': 'A', + 'Status': 'InCancelled' + }, + { + 'Intender': 'Bob', + 'BookingFrom': '21st Jan', + 'BookingTo': '28th Jan', + 'Category': 'B', + 'Status': 'Cancelled' + }, + { + 'Intender': 'Jane', + 'BookingFrom': '22nd Jan', + 'BookingTo': '29th Jan', + 'Category': 'A', + 'Status': 'InCancelled' + }, + ]; + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: DefaultAppBar().visitorHostelAppBar(), + drawer: SideDrawer(), + body: Column( + children: [ + Expanded( + child: Container( + height: double.infinity, + width: double.infinity, + child: SingleChildScrollView( + child: Column(children: [ + SizedBox(height: 24.0), + Text( + 'Cancelled Bookings', + style: TextStyle( + fontSize: 20, + fontWeight: FontWeight.bold, + ), + ), + SizedBox(height: 20.0), + Column( + children: List.generate(bookingData.length, (index) { + return Column( + children: [ + SizedBox(height: 20.0), + BookingInfoCard( + bookingInfoTiles: [ + CardListTile( + iconData: Icons.person, + label: 'Intender', + value: bookingData[index]['Intender'], + color: Colors.white, + ), + CardListTile( + iconData: Icons.today, + label: "BookingFrom", + value: bookingData[index]['BookingFrom'], + color: Color.fromARGB(255, 206, 205, 205), + ), + CardListTile( + iconData: Icons.event, + label: "BookingTo", + value: bookingData[index]['BookingTo'], + color: Colors.white, + ), + CardListTile( + iconData: Icons.category, + label: "Category", + value: bookingData[index]['Category'], + color: Color.fromARGB(255, 206, 205, 205), + ), + CardListTile( + iconData: Icons.info, + label: "Status", + value: bookingData[index]['Status'], + color: Colors.white, + ) + ], + ), + ], + ); + }), + ) + ]), + ), + ), + ), + ], + ), + ); + } +} diff --git a/lib/screens/Visitors_Hostel/completedBookings.dart b/lib/screens/Visitors_Hostel/completedBookings.dart new file mode 100644 index 00000000..8ba1387b --- /dev/null +++ b/lib/screens/Visitors_Hostel/completedBookings.dart @@ -0,0 +1,117 @@ +import 'package:flutter/material.dart'; +import 'package:fusion/Components/appBar.dart'; +import 'package:fusion/Components/side_drawer.dart'; +import 'package:fusion/screens/Visitors_Hostel/Components/Card.dart'; +import 'package:fusion/screens/Visitors_Hostel/Components/list_tile.dart'; + +class CompletedBookings extends StatefulWidget { + @override + _CompletedBookingsState createState() => _CompletedBookingsState(); +} + +class _CompletedBookingsState extends State { + List> bookingData = [ + { + 'Intender': 'Bob', + 'BookingFrom': '21st Jan', + 'BookingTo': '28th Jan', + 'Category': 'B', + 'Status': 'Completed' + }, + { + 'Intender': 'Jane', + 'BookingFrom': '22nd Jan', + 'BookingTo': '29th Jan', + 'Category': 'A', + 'Status': 'InComplete' + }, + { + 'Intender': 'Bob', + 'BookingFrom': '21st Jan', + 'BookingTo': '28th Jan', + 'Category': 'B', + 'Status': 'Completed' + }, + { + 'Intender': 'Jane', + 'BookingFrom': '22nd Jan', + 'BookingTo': '29th Jan', + 'Category': 'A', + 'Status': 'InComplete' + }, + ]; + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: DefaultAppBar().visitorHostelAppBar(), + drawer: SideDrawer(), + body: Column( + children: [ + Expanded( + child: Container( + height: double.infinity, + width: double.infinity, + child: SingleChildScrollView( + child: Column(children: [ + SizedBox(height: 24.0), + Text( + 'Completed Bookings', + style: TextStyle( + fontSize: 20, + fontWeight: FontWeight.bold, + ), + ), + SizedBox(height: 20.0), + Column( + children: List.generate(bookingData.length, (index) { + return Column( + children: [ + SizedBox(height: 20.0), + BookingInfoCard( + bookingInfoTiles: [ + CardListTile( + iconData: Icons.person, + label: 'Intender', + value: bookingData[index]['Intender'], + color: Colors.white, + ), + CardListTile( + iconData: Icons.today, + label: "BookingFrom", + value: bookingData[index]['BookingFrom'], + color: Color.fromARGB(255, 206, 205, 205), + ), + CardListTile( + iconData: Icons.event, + label: "BookingTo", + value: bookingData[index]['BookingTo'], + color: Colors.white, + ), + CardListTile( + iconData: Icons.category, + label: "Category", + value: bookingData[index]['Category'], + color: Color.fromARGB(255, 206, 205, 205), + ), + CardListTile( + iconData: Icons.info, + label: "Status", + value: bookingData[index]['Status'], + color: Colors.white, + ) + ], + ), + ], + ); + }), + ) + ]), + ), + ), + ), + ], + ), + ); + } +} diff --git a/lib/screens/Visitors_Hostel/getDetails.dart b/lib/screens/Visitors_Hostel/getDetails.dart new file mode 100644 index 00000000..386d4709 --- /dev/null +++ b/lib/screens/Visitors_Hostel/getDetails.dart @@ -0,0 +1,146 @@ +import 'package:flutter/material.dart'; +import 'package:fusion/Components/appBar.dart'; + +class GetDetails extends StatefulWidget { + @override + _PlaceRequestState createState() => _PlaceRequestState(); +} + +class _PlaceRequestState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: DefaultAppBar().visitorHostelAppBar(), + body: Column( + children: [ + Expanded( + child: Container( + height: double.infinity, + width: double.infinity, + decoration: BoxDecoration( + color: Color.fromARGB(255, 248, 247, 247), + ), + child: Column( + children: [ + SizedBox(height: 20), + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Column( + children: [ + Text('From'), + SizedBox(height: 10), + GestureDetector( + onTap: () { + showDatePicker( + context: context, + initialDate: DateTime.now(), + firstDate: DateTime.now(), + lastDate: DateTime(2100), + ).then((selectedDate) { + // handle selected arrival date + }); + }, + child: Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Colors.white, + border: Border.all( + color: Color.fromARGB(255, 243, 108, 53), + width: 1, + ), + ), + padding: EdgeInsets.symmetric( + horizontal: 15, + vertical: 10, + ), + child: Row( + children: [ + Icon( + Icons.calendar_today, + color: Color.fromARGB(255, 243, 108, 53), + ), + SizedBox(width: 10), + Text('Select Date'), + ], + ), + ), + ), + ], + ), + Column( + children: [ + Text('To'), + SizedBox(height: 10), + GestureDetector( + onTap: () { + showDatePicker( + context: context, + initialDate: DateTime.now(), + firstDate: DateTime.now(), + lastDate: DateTime(2100), + ).then((selectedDate) { + // handle selected arrival date + }); + }, + child: Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Colors.white, + border: Border.all( + color: Color.fromARGB(255, 243, 108, 53), + width: 1, + ), + ), + padding: EdgeInsets.symmetric( + horizontal: 15, + vertical: 10, + ), + child: Row( + children: [ + Icon( + Icons.calendar_today, + color: Color.fromARGB(255, 243, 108, 53), + ), + SizedBox(width: 10), + Text('Select Date'), + ], + ), + ), + ), + ], + ), + ], + ), + SizedBox(height: 20), + Column( + children: [ + Container( + width: MediaQuery.of(context).size.width * 0.3, + child: MaterialButton( + height: 40.0, + onPressed: () {}, + color: Color.fromARGB(255, 243, 108, 53), + textColor: Colors.white, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(5.0), + topRight: Radius.circular(5.0), + bottomLeft: Radius.circular(5.0), + bottomRight: Radius.circular(5.0), + ), + ), + child: Text('Submit', + style: TextStyle(fontSize: 18.0))), + ), + ], + ), + ], + ), + ), + ), + ], + ), + ); + } +} diff --git a/lib/screens/Visitors_Hostel/inventory.dart b/lib/screens/Visitors_Hostel/inventory.dart new file mode 100644 index 00000000..f748e551 --- /dev/null +++ b/lib/screens/Visitors_Hostel/inventory.dart @@ -0,0 +1,59 @@ +import 'package:flutter/material.dart'; +import 'package:fusion/Components/appBar.dart'; + +class Inventory extends StatefulWidget { + @override + State createState() => _InventoryState(); +} + +class _InventoryState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: DefaultAppBar().visitorHostelAppBar(), + body: Column( + children: [ + Expanded( + child: Container( + height: double.infinity, + width: double.infinity, + decoration: BoxDecoration( + color: Color.fromARGB(255, 248, 247, 247), + ), + child: Column( + children: [ + SizedBox(height: 24.0), + Text( + "Inventory", + style: TextStyle(fontSize: 24, fontWeight: FontWeight.w700), + ), + SizedBox(height: 16.0), + Container( + width: MediaQuery.of(context).size.width * 0.3, + child: MaterialButton( + height: 40.0, + onPressed: () {}, + color: Color.fromARGB(255, 243, 108, 53), + textColor: Colors.white, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(5.0), + topRight: Radius.circular(5.0), + bottomLeft: Radius.circular(5.0), + bottomRight: Radius.circular(5.0), + ), + ), + child: Text( + 'Add Item', + style: TextStyle(fontSize: 18.0), + )), + ), + ], + ), + ), + ), + ], + ), + ); + } +} diff --git a/lib/screens/Visitors_Hostel/mealRecord.dart b/lib/screens/Visitors_Hostel/mealRecord.dart new file mode 100644 index 00000000..e1fb82e6 --- /dev/null +++ b/lib/screens/Visitors_Hostel/mealRecord.dart @@ -0,0 +1,38 @@ +import 'package:flutter/material.dart'; +import 'package:fusion/Components/appBar.dart'; + +class MealRecord extends StatefulWidget { + @override + State createState() => _MealRecordState(); +} + +class _MealRecordState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: DefaultAppBar().visitorHostelAppBar(), + body: Column( + children: [ + Expanded( + child: Container( + height: double.infinity, + width: double.infinity, + decoration: BoxDecoration( + color: Color.fromARGB(255, 248, 247, 247), + ), + child: Column( + children: [ + SizedBox(height: 24.0), + Text( + "Meals Record", + style: TextStyle(fontSize: 24, fontWeight: FontWeight.w700), + ), + ], + ), + ), + ), + ], + ), + ); + } +} diff --git a/lib/screens/Visitors_Hostel/place_request.dart b/lib/screens/Visitors_Hostel/place_request.dart new file mode 100644 index 00000000..21e16447 --- /dev/null +++ b/lib/screens/Visitors_Hostel/place_request.dart @@ -0,0 +1,475 @@ +import 'package:flutter/material.dart'; +import 'package:fusion/Components/appBar.dart'; +import 'package:fusion/Components/side_drawer.dart'; +import 'package:fusion/screens/Visitors_Hostel/visitorsDetails.dart'; + +class PlaceRequest extends StatefulWidget { + @override + _PlaceRequestState createState() => _PlaceRequestState(); +} + +class _PlaceRequestState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: DefaultAppBar().visitorHostelAppBar(), + drawer: SideDrawer(), + body: Column( + children: [ + Expanded( + child: Container( + height: double.infinity, + width: double.infinity, + decoration: BoxDecoration( + color: Color.fromARGB(255, 248, 247, 247), + ), + child: Column( + children: [ + SizedBox(height: 24.0), + Text( + "Place a request", + style: TextStyle(fontSize: 24, fontWeight: FontWeight.w700), + ), + SizedBox(height: 12.0), + Text("Booking Details", + style: + TextStyle(fontSize: 16, fontWeight: FontWeight.bold)), + SizedBox(height: 20), + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Column( + children: [ + Text('Arrival Date'), + SizedBox(height: 10), + GestureDetector( + onTap: () { + showDatePicker( + context: context, + initialDate: DateTime.now(), + firstDate: DateTime.now(), + lastDate: DateTime(2100), + ).then((selectedDate) { + // handle selected arrival date + }); + }, + child: Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Colors.white, + border: Border.all( + color: Color.fromARGB(255, 243, 108, 53), + width: 1, + ), + ), + padding: EdgeInsets.symmetric( + horizontal: 15, + vertical: 10, + ), + child: Row( + children: [ + Icon( + Icons.calendar_today, + color: Color.fromARGB(255, 243, 108, 53), + ), + SizedBox(width: 10), + Text('Select Date'), + ], + ), + ), + ), + ], + ), + Column( + children: [ + Text('Arrival Time'), + SizedBox(height: 10), + GestureDetector( + onTap: () { + showTimePicker( + context: context, + initialTime: TimeOfDay.now(), + ).then((selectedTime) { + // handle selected arrival time + }); + }, + child: Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Colors.white, + border: Border.all( + color: Color.fromARGB(255, 243, 108, 53), + width: 1, + ), + ), + padding: EdgeInsets.symmetric( + horizontal: 15, + vertical: 10, + ), + child: Row( + children: [ + Icon( + Icons.access_time, + color: Color.fromARGB(255, 243, 108, 53), + ), + SizedBox(width: 10), + Text('Select Time'), + ], + ), + ), + ), + ], + ), + ], + ), + SizedBox(height: 20), + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Column( + children: [ + Text('Departure Date'), + SizedBox(height: 10), + GestureDetector( + onTap: () { + showDatePicker( + context: context, + initialDate: DateTime.now(), + firstDate: DateTime.now(), + lastDate: DateTime(2100), + ).then((selectedDate) { + // handle selected departure date + }); + }, + child: Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Colors.white, + border: Border.all( + color: Color.fromARGB(255, 243, 108, 53), + width: 1, + ), + ), + padding: EdgeInsets.symmetric( + horizontal: 15, + vertical: 10, + ), + child: Row( + children: [ + Icon( + Icons.calendar_today, + color: Color.fromARGB(255, 243, 108, 53), + ), + SizedBox(width: 10), + Text('Select Date'), + ], + ), + ), + ), + ], + ), + Column( + children: [ + Text('Departure Time'), + SizedBox(height: 10), + GestureDetector( + onTap: () { + showTimePicker( + context: context, + initialTime: TimeOfDay.now(), + ).then((selectedTime) { + // handle selected departure time + }); + }, + child: Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Colors.white, + border: Border.all( + color: Color.fromARGB(255, 243, 108, 53), + width: 1, + ), + ), + padding: EdgeInsets.symmetric( + horizontal: 15, + vertical: 10, + ), + child: Row( + children: [ + Icon( + Icons.access_time, + color: Color.fromARGB(255, 243, 108, 53), + ), + SizedBox(width: 10), + Text('Select Time'), + ], + ), + ), + ), + ], + ), + ], + ), + SizedBox(height: 20), + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Column( + children: [ + Text('Number of People'), + SizedBox(height: 10), + Row( + children: [ + GestureDetector( + onTap: () { + // handle decreasing number of people + }, + child: Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Colors.white, + border: Border.all( + color: Color.fromARGB(255, 243, 108, 53), + width: 1, + ), + ), + padding: EdgeInsets.all(10), + child: Icon( + Icons.remove, + color: Color.fromARGB(255, 243, 108, 53), + ), + ), + ), + SizedBox(width: 10), + Text('0'), + SizedBox(width: 10), + GestureDetector( + onTap: () { + // handle increasing number of people + }, + child: Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Colors.white, + border: Border.all( + color: Color.fromARGB(255, 243, 108, 53), + width: 1, + ), + ), + padding: EdgeInsets.all(10), + child: Icon( + Icons.add, + color: Color.fromARGB(255, 243, 108, 53), + ), + ), + ), + ], + ), + ], + ), + Column( + children: [ + Text('Number of Rooms'), + SizedBox(height: 10), + Row( + children: [ + GestureDetector( + onTap: () { + // handle decreasing number of rooms + }, + child: Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Colors.white, + border: Border.all( + color: Color.fromARGB(255, 243, 108, 53), + width: 1, + ), + ), + padding: EdgeInsets.all(10), + child: Icon( + Icons.remove, + color: Color.fromARGB(255, 243, 108, 53), + ), + ), + ), + SizedBox(width: 10), + Text('0'), + SizedBox(width: 10), + GestureDetector( + onTap: () { + // handle increasing number of rooms + }, + child: Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Colors.white, + border: Border.all( + color: Color.fromARGB(255, 243, 108, 53), + width: 1, + ), + ), + padding: EdgeInsets.all(10), + child: Icon( + Icons.add, + color: Color.fromARGB(255, 243, 108, 53), + ), + ), + ), + ], + ), + ], + ), + ], + ), + SizedBox(height: 20), + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Column( + children: [ + Text('Category'), + SizedBox(height: 10), + Row( + children: [ + Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Colors.white, + border: Border.all( + color: Color.fromARGB(255, 243, 108, 53), + width: 1, + ), + ), + width: 120, + height: 50, + padding: EdgeInsets.symmetric( + horizontal: 15, + vertical: 5, + ), + child: DropdownButton( + value: 'A', + isExpanded: true, + icon: Icon( + Icons.arrow_drop_down, + color: Color.fromARGB(255, 243, 108, 53), + ), + underline: SizedBox(), + onChanged: (String? newValue) { + setState(() { + // handle updating category + }); + }, + items: ['A', 'B', 'C', 'D'] + .map>( + (String value) { + return DropdownMenuItem( + value: value, + child: Text(value), + ); + }).toList(), + ), + ), + ], + ), + ], + ), + Column( + children: [ + Text('Purpose of Visit'), + SizedBox(height: 10), + Row( + children: [ + Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Colors.white, + border: Border.all( + color: Color.fromARGB(255, 243, 108, 53), + width: 1, + ), + ), + width: 120, + height: 50, + padding: EdgeInsets.symmetric(horizontal: 10), + child: TextField( + decoration: InputDecoration( + border: InputBorder.none, + ), + onChanged: (String value) { + setState(() { + // handle updating purpose of visit + }); + }, + ), + ), + ], + ), + ], + ), + ], + ), + SizedBox(height: 20), + Column( + children: [ + Text('Remarks'), + SizedBox(height: 10), + Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Colors.white, + border: Border.all( + color: Color.fromARGB(255, 243, 108, 53), + width: 1, + ), + ), + padding: EdgeInsets.symmetric(horizontal: 10), + width: 300, + child: TextField( + maxLines: 3, + decoration: InputDecoration( + border: InputBorder.none, + ), + onChanged: (String value) { + setState(() { + // handle updating remarks + }); + }, + ), + ), + SizedBox(height: 16.0), + Container( + width: MediaQuery.of(context).size.width * 0.3, + child: MaterialButton( + height: 40.0, + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => VisitorsDetails()), + ); + }, + color: Color.fromARGB(255, 243, 108, 53), + textColor: Colors.white, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(5.0), + topRight: Radius.circular(5.0), + bottomLeft: Radius.circular(5.0), + bottomRight: Radius.circular(5.0), + ), + ), + child: + Text('Next', style: TextStyle(fontSize: 18.0))), + ), + ], + ), + ], + ), + ), + ), + ], + ), + ); + } +} diff --git a/lib/screens/Visitors_Hostel/viewBookings.dart b/lib/screens/Visitors_Hostel/viewBookings.dart new file mode 100644 index 00000000..3418366f --- /dev/null +++ b/lib/screens/Visitors_Hostel/viewBookings.dart @@ -0,0 +1,117 @@ +import 'package:flutter/material.dart'; +import 'package:fusion/Components/appBar.dart'; +import 'package:fusion/Components/side_drawer.dart'; +import 'package:fusion/screens/Visitors_Hostel/Components/Card.dart'; +import 'package:fusion/screens/Visitors_Hostel/Components/list_tile.dart'; + +class ViewBookings extends StatefulWidget { + @override + _ViewBookingsState createState() => _ViewBookingsState(); +} + +class _ViewBookingsState extends State { + List> bookingData = [ + { + 'Intender': 'Bob', + 'BookingFrom': '21st Jan', + 'BookingTo': '28th Jan', + 'Category': 'B', + 'Status': 'Active' + }, + { + 'Intender': 'Jane', + 'BookingFrom': '22nd Jan', + 'BookingTo': '29th Jan', + 'Category': 'A', + 'Status': 'Inactive' + }, + { + 'Intender': 'Bob', + 'BookingFrom': '21st Jan', + 'BookingTo': '28th Jan', + 'Category': 'B', + 'Status': 'Active' + }, + { + 'Intender': 'Jane', + 'BookingFrom': '22nd Jan', + 'BookingTo': '29th Jan', + 'Category': 'A', + 'Status': 'Inactive' + }, + ]; + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: DefaultAppBar().visitorHostelAppBar(), + drawer: SideDrawer(), + body: Column( + children: [ + Expanded( + child: Container( + height: double.infinity, + width: double.infinity, + child: SingleChildScrollView( + child: Column(children: [ + SizedBox(height: 24.0), + Text( + 'Bookings', + style: TextStyle( + fontSize: 20, + fontWeight: FontWeight.bold, + ), + ), + SizedBox(height: 20.0), + Column( + children: List.generate(bookingData.length, (index) { + return Column( + children: [ + SizedBox(height: 20.0), + BookingInfoCard( + bookingInfoTiles: [ + CardListTile( + iconData: Icons.person, + label: 'Intender', + value: bookingData[index]['Intender'], + color: Colors.white, + ), + CardListTile( + iconData: Icons.today, + label: "BookingFrom", + value: bookingData[index]['BookingFrom'], + color: Color.fromARGB(255, 206, 205, 205), + ), + CardListTile( + iconData: Icons.event, + label: "BookingTo", + value: bookingData[index]['BookingTo'], + color: Colors.white, + ), + CardListTile( + iconData: Icons.category, + label: "Category", + value: bookingData[index]['Category'], + color: Color.fromARGB(255, 206, 205, 205), + ), + CardListTile( + iconData: Icons.info, + label: "Status", + value: bookingData[index]['Status'], + color: Colors.white, + ) + ], + ), + ], + ); + }), + ) + ]), + ), + ), + ), + ], + ), + ); + } +} diff --git a/lib/screens/Visitors_Hostel/visitorsDetails.dart b/lib/screens/Visitors_Hostel/visitorsDetails.dart new file mode 100644 index 00000000..bcc711f0 --- /dev/null +++ b/lib/screens/Visitors_Hostel/visitorsDetails.dart @@ -0,0 +1,354 @@ +import 'package:flutter/material.dart'; +import 'package:fusion/Components/appBar.dart'; +import 'package:fusion/Components/side_drawer.dart'; +import 'package:country_picker/country_picker.dart'; + +class VisitorsDetails extends StatefulWidget { + @override + _PlaceRequestState createState() => _PlaceRequestState(); +} + +class _PlaceRequestState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: DefaultAppBar().visitorHostelAppBar(), + drawer: SideDrawer(), + body: Column( + children: [ + Expanded( + child: Container( + height: double.infinity, + width: double.infinity, + decoration: BoxDecoration( + color: Color.fromARGB(255, 248, 247, 247), + ), + child: SingleChildScrollView( + child: Column( + children: [ + SizedBox(height: 24.0), + Text( + "Place a request", + style: + TextStyle(fontSize: 24, fontWeight: FontWeight.w700), + ), + SizedBox(height: 12.0), + Text("Vistor's Details", + style: TextStyle( + fontSize: 16, fontWeight: FontWeight.bold)), + SizedBox(height: 20), + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Container( + alignment: Alignment.center, + height: 40, + width: MediaQuery.of(context).size.width * 0.25, + child: Text( + 'Name', + style: TextStyle(fontSize: 16), + ), + ), + Row( + children: [ + Column( + children: [ + Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Colors.white, + border: Border.all( + color: Color.fromARGB(255, 243, 108, 53), + width: 1, + ), + ), + padding: EdgeInsets.symmetric(horizontal: 10), + width: + MediaQuery.of(context).size.width * 0.65, + child: TextField( + maxLines: 1, + decoration: InputDecoration( + border: InputBorder.none, + ), + onChanged: (String value) { + setState(() { + // handle updating remarks + }); + }, + ), + ), + ], + ), + ], + ), + ], + ), + SizedBox(height: 20), + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Container( + alignment: Alignment.center, + height: 40, + width: MediaQuery.of(context).size.width * 0.25, + child: Text( + 'Email', + style: TextStyle(fontSize: 16), + ), + ), + Row( + children: [ + Column( + children: [ + Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Colors.white, + border: Border.all( + color: Color.fromARGB(255, 243, 108, 53), + width: 1, + ), + ), + padding: EdgeInsets.symmetric(horizontal: 10), + width: + MediaQuery.of(context).size.width * 0.65, + child: TextField( + maxLines: 1, + decoration: InputDecoration( + border: InputBorder.none, + ), + onChanged: (String value) { + setState(() { + // handle updating remarks + }); + }, + ), + ), + ], + ), + ], + ), + ], + ), + SizedBox(height: 20), + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Container( + alignment: Alignment.center, + height: 40, + width: MediaQuery.of(context).size.width * 0.25, + child: Text( + 'Phone', + style: TextStyle(fontSize: 16), + ), + ), + Row( + children: [ + Column( + children: [ + Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Colors.white, + border: Border.all( + color: Color.fromARGB(255, 243, 108, 53), + width: 1, + ), + ), + padding: EdgeInsets.symmetric(horizontal: 10), + width: + MediaQuery.of(context).size.width * 0.65, + child: TextField( + maxLines: 1, + decoration: InputDecoration( + border: InputBorder.none, + ), + onChanged: (String value) { + setState(() { + // handle updating remarks + }); + }, + ), + ), + ], + ), + ], + ), + ], + ), + SizedBox(height: 20), + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Container( + alignment: Alignment.center, + height: 40, + width: MediaQuery.of(context).size.width * 0.25, + child: Text( + 'Organisation', + style: TextStyle(fontSize: 16), + ), + ), + Row( + children: [ + Column( + children: [ + Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Colors.white, + border: Border.all( + color: Color.fromARGB(255, 243, 108, 53), + width: 1, + ), + ), + padding: EdgeInsets.symmetric(horizontal: 10), + width: + MediaQuery.of(context).size.width * 0.65, + child: TextField( + maxLines: 1, + decoration: InputDecoration( + border: InputBorder.none, + ), + onChanged: (String value) { + setState(() { + // handle updating remarks + }); + }, + ), + ), + ], + ), + ], + ), + ], + ), + SizedBox(height: 20), + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Container( + alignment: Alignment.center, + height: 40, + width: MediaQuery.of(context).size.width * 0.25, + child: Text( + 'Address', + style: TextStyle(fontSize: 16), + ), + ), + Row( + children: [ + Column( + children: [ + Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Colors.white, + border: Border.all( + color: Color.fromARGB(255, 243, 108, 53), + width: 1, + ), + ), + padding: EdgeInsets.symmetric(horizontal: 10), + width: + MediaQuery.of(context).size.width * 0.65, + child: TextField( + maxLines: 1, + decoration: InputDecoration( + border: InputBorder.none, + ), + onChanged: (String value) { + setState(() { + // handle updating remarks + }); + }, + ), + ), + ], + ), + ], + ), + ], + ), + SizedBox(height: 20), + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Container( + alignment: Alignment.center, + height: 40, + width: MediaQuery.of(context).size.width * 0.25, + child: Text( + 'Country', + style: TextStyle(fontSize: 16), + ), + ), + Row( + children: [ + Column( + children: [ + Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Colors.white, + border: Border.all( + color: Color.fromARGB(255, 243, 108, 53), + width: 1, + ), + ), + padding: EdgeInsets.symmetric(horizontal: 10), + width: + MediaQuery.of(context).size.width * 0.65, + child: TextField( + maxLines: 1, + decoration: InputDecoration( + border: InputBorder.none, + ), + onChanged: (String value) { + setState(() { + // handle updating remarks + }); + }, + ), + ), + ], + ), + ], + ), + ], + ), + SizedBox(height: 20), + Column( + children: [ + SizedBox(height: 16.0), + Container( + width: MediaQuery.of(context).size.width * 0.5, + child: MaterialButton( + height: 60.0, + onPressed: () {}, + color: Color.fromARGB(255, 243, 108, 53), + textColor: Colors.white, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(5.0), + topRight: Radius.circular(5.0), + bottomLeft: Radius.circular(5.0), + bottomRight: Radius.circular(5.0), + ), + ), + child: Text('Place Request', + style: TextStyle(fontSize: 18.0))), + ), + ], + ), + ], + ), + ), + ), + ), + ], + ), + ); + } +} diff --git a/lib/screens/Visitors_Hostel/visitors_hostel_home.dart b/lib/screens/Visitors_Hostel/visitors_hostel_home.dart new file mode 100644 index 00000000..6768af1d --- /dev/null +++ b/lib/screens/Visitors_Hostel/visitors_hostel_home.dart @@ -0,0 +1,268 @@ +import 'package:flutter/material.dart'; +import 'package:fusion/Components/appBar.dart'; +import 'package:fusion/Components/side_drawer.dart'; +import 'package:fusion/screens/Visitors_Hostel/Components/RulesAndRegulation.dart'; +import 'package:fusion/screens/Visitors_Hostel/activeBookings.dart'; +import 'package:fusion/screens/Visitors_Hostel/cancelRequest.dart'; +import 'package:fusion/screens/Visitors_Hostel/completedBookings.dart'; +import 'package:fusion/screens/Visitors_Hostel/place_request.dart'; +import 'package:fusion/screens/Visitors_Hostel/viewBookings.dart'; +import 'package:fusion/screens/Visitors_Hostel/visitors_hostel_home_admin.dart'; + +class VisitorHostel extends StatefulWidget { + @override + _VisitorHostelState createState() => _VisitorHostelState(); +} + +class _VisitorHostelState extends State { + bool _isDropdownVisible = false; + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Colors.black, + appBar: DefaultAppBar().visitorHostelAppBar(), + drawer: SideDrawer(), + body: Column( + children: [ + Expanded( + child: Container( + height: double.infinity, + width: double.infinity, + decoration: BoxDecoration( + color: Color.fromARGB(255, 248, 247, 247), + ), + child: Column( + children: [ + SizedBox(height: 24.0), + Container( + width: MediaQuery.of(context).size.width * 0.8, + child: MaterialButton( + height: 60.0, + onPressed: () { + setState(() { + _isDropdownVisible = !_isDropdownVisible; + }); + }, + color: Colors.white, + textColor: Color.fromARGB(255, 59, 59, 59), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(5.0), + topRight: Radius.circular(5.0), + bottomLeft: Radius.circular(5.0), + bottomRight: Radius.circular(5.0), + ), + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text('Manage Bookings', + style: TextStyle(fontSize: 18.0)), + Icon( + _isDropdownVisible + ? Icons.arrow_drop_up + : Icons.arrow_drop_down, + color: Colors.grey), + ], + ), + ), + ), + SizedBox(height: 8.0), + _isDropdownVisible + ? Padding( + padding: const EdgeInsets.only(bottom: 16.0), + child: Container( + width: MediaQuery.of(context).size.width * 0.8, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.only( + topLeft: Radius.circular(5.0), + topRight: Radius.circular(5.0), + bottomLeft: Radius.circular(5.0), + bottomRight: Radius.circular(5.0), + ), + boxShadow: [ + BoxShadow( + color: Colors.black26, + offset: Offset(0.0, 2.0), + blurRadius: 6.0, + ), + ], + ), + child: Padding( + padding: EdgeInsets.all(16.0), + child: Column( + children: [ + SizedBox(height: 9.0), + GestureDetector( + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => + ViewBookings()), + ); + }, + child: Text("View Bookings"), + ), + SizedBox(height: 9.0), + Divider( + thickness: 1.0, + ), + SizedBox(height: 9.0), + GestureDetector( + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => + CancelledBookings()), + ); + }, + child: Text("Cancellation Requests"), + ), + SizedBox(height: 9.0), + Divider( + thickness: 1.0, + ), + SizedBox(height: 9.0), + GestureDetector( + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => + ActiveBookings()), + ); + }, + child: Text("Active Bookings"), + ), + SizedBox(height: 9.0), + Divider( + thickness: 1.0, + ), + SizedBox(height: 9.0), + GestureDetector( + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => + CompletedBookings()), + ); + }, + child: Text("Completed Bookings"), + ), + SizedBox(height: 9.0), + ], + ), + ), + ), + ) + : SizedBox.shrink(), + SizedBox(height: 16.0), + Container( + width: MediaQuery.of(context).size.width * 0.8, + child: MaterialButton( + height: 60.0, + onPressed: () {}, + color: Colors.white, + textColor: Colors.black, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(5.0), + topRight: Radius.circular(5.0), + bottomLeft: Radius.circular(5.0), + bottomRight: Radius.circular(5.0), + ), + ), + child: Text('Booking Form', + style: TextStyle(fontSize: 18.0))), + ), + SizedBox(height: 16.0), + Container( + width: MediaQuery.of(context).size.width * 0.8, + child: MaterialButton( + height: 60.0, + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => MyPdfViewer()), + ); + }, + color: Colors.white, + textColor: Colors.black, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(5.0), + topRight: Radius.circular(5.0), + bottomLeft: Radius.circular(5.0), + bottomRight: Radius.circular(5.0), + ), + ), + child: Text('Rules and Regulations', + style: TextStyle(fontSize: 18.0))), + ), + SizedBox(height: 16.0), + Container( + width: MediaQuery.of(context).size.width * 0.6, + child: MaterialButton( + height: 60.0, + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => PlaceRequest()), + ); + }, + color: Color.fromARGB(255, 243, 108, 53), + textColor: Colors.white, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(5.0), + topRight: Radius.circular(5.0), + bottomLeft: Radius.circular(5.0), + bottomRight: Radius.circular(5.0), + ), + ), + child: Text('Place Request', + style: TextStyle(fontSize: 18.0))), + ), + SizedBox( + height: 16, + ), + Container( + width: MediaQuery.of(context).size.width * 0.8, + child: MaterialButton( + height: 60.0, + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => VisitorHostelA()), + ); + }, + color: Colors.white, + textColor: Colors.black, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(5.0), + topRight: Radius.circular(5.0), + bottomLeft: Radius.circular(5.0), + bottomRight: Radius.circular(5.0), + ), + ), + child: Text('Incharge/Caretaker Login', + style: TextStyle(fontSize: 18.0))), + ), + ], + ), + ), + ), + ], + ), + ); + } +} diff --git a/lib/screens/Visitors_Hostel/visitors_hostel_home_admin.dart b/lib/screens/Visitors_Hostel/visitors_hostel_home_admin.dart new file mode 100644 index 00000000..ffb5bf6f --- /dev/null +++ b/lib/screens/Visitors_Hostel/visitors_hostel_home_admin.dart @@ -0,0 +1,372 @@ +import 'package:flutter/material.dart'; +import 'package:fusion/Components/appBar.dart'; +import 'package:fusion/Components/side_drawer.dart'; +import 'package:fusion/screens/Visitors_Hostel/Components/RulesAndRegulation.dart'; +import 'package:fusion/screens/Visitors_Hostel/accounts.dart'; +import 'package:fusion/screens/Visitors_Hostel/activeBookings.dart'; +import 'package:fusion/screens/Visitors_Hostel/billDetails.dart'; +import 'package:fusion/screens/Visitors_Hostel/cancelRequest.dart'; +import 'package:fusion/screens/Visitors_Hostel/completedBookings.dart'; +import 'package:fusion/screens/Visitors_Hostel/getDetails.dart'; +import 'package:fusion/screens/Visitors_Hostel/inventory.dart'; +import 'package:fusion/screens/Visitors_Hostel/mealRecord.dart'; +import 'package:fusion/screens/Visitors_Hostel/place_request.dart'; +import 'package:fusion/screens/Visitors_Hostel/viewBookings.dart'; + +class VisitorHostelA extends StatefulWidget { + @override + _VisitorHostelState createState() => _VisitorHostelState(); +} + +class _VisitorHostelState extends State { + bool _isDropdownVisible = false; + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Colors.black, + appBar: DefaultAppBar().visitorHostelAppBar(), + drawer: SideDrawer(), + body: Column( + children: [ + Expanded( + child: Container( + height: double.infinity, + width: double.infinity, + decoration: BoxDecoration( + color: Color.fromARGB(255, 248, 247, 247), + ), + child: SingleChildScrollView( + child: Column( + children: [ + SizedBox(height: 24.0), + Container( + width: MediaQuery.of(context).size.width * 0.8, + child: MaterialButton( + height: 60.0, + onPressed: () { + setState(() { + _isDropdownVisible = !_isDropdownVisible; + }); + }, + color: Colors.white, + textColor: Color.fromARGB(255, 59, 59, 59), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(5.0), + topRight: Radius.circular(5.0), + bottomLeft: Radius.circular(5.0), + bottomRight: Radius.circular(5.0), + ), + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text('Manage Bookings', + style: TextStyle(fontSize: 18.0)), + Icon( + _isDropdownVisible + ? Icons.arrow_drop_up + : Icons.arrow_drop_down, + color: Colors.grey), + ], + ), + ), + ), + SizedBox(height: 8.0), + _isDropdownVisible + ? Padding( + padding: const EdgeInsets.only(bottom: 16.0), + child: Container( + width: MediaQuery.of(context).size.width * 0.8, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.only( + topLeft: Radius.circular(5.0), + topRight: Radius.circular(5.0), + bottomLeft: Radius.circular(5.0), + bottomRight: Radius.circular(5.0), + ), + boxShadow: [ + BoxShadow( + color: Colors.black26, + offset: Offset(0.0, 2.0), + blurRadius: 6.0, + ), + ], + ), + child: Padding( + padding: EdgeInsets.all(16.0), + child: Column( + children: [ + SizedBox(height: 9.0), + GestureDetector( + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => + ViewBookings()), + ); + }, + child: Text("View Bookings"), + ), + SizedBox(height: 9.0), + Divider( + thickness: 1.0, + ), + SizedBox(height: 9.0), + GestureDetector( + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => + CancelledBookings()), + ); + }, + child: Text("Cancellation Requests"), + ), + SizedBox(height: 9.0), + Divider( + thickness: 1.0, + ), + SizedBox(height: 9.0), + GestureDetector( + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => + ActiveBookings()), + ); + }, + child: Text("Active Bookings"), + ), + SizedBox(height: 9.0), + Divider( + thickness: 1.0, + ), + SizedBox(height: 9.0), + GestureDetector( + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => + CompletedBookings()), + ); + }, + child: Text("Completed Bookings"), + ), + SizedBox(height: 9.0), + ], + ), + ), + ), + ) + : SizedBox.shrink(), + SizedBox(height: 16.0), + Container( + width: MediaQuery.of(context).size.width * 0.8, + child: MaterialButton( + height: 60.0, + onPressed: () {}, + color: Colors.white, + textColor: Colors.black, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(5.0), + topRight: Radius.circular(5.0), + bottomLeft: Radius.circular(5.0), + bottomRight: Radius.circular(5.0), + ), + ), + child: Text('Booking Form', + style: TextStyle(fontSize: 18.0))), + ), + SizedBox(height: 16.0), + Container( + width: MediaQuery.of(context).size.width * 0.8, + child: MaterialButton( + height: 60.0, + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => GetDetails()), + ); + }, + color: Colors.white, + textColor: Colors.black, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(5.0), + topRight: Radius.circular(5.0), + bottomLeft: Radius.circular(5.0), + bottomRight: Radius.circular(5.0), + ), + ), + child: Text('Get Details', + style: TextStyle(fontSize: 18.0))), + ), + SizedBox(height: 16.0), + Container( + width: MediaQuery.of(context).size.width * 0.8, + child: MaterialButton( + height: 60.0, + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => MealRecord()), + ); + }, + color: Colors.white, + textColor: Colors.black, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(5.0), + topRight: Radius.circular(5.0), + bottomLeft: Radius.circular(5.0), + bottomRight: Radius.circular(5.0), + ), + ), + child: Text('Meals Record', + style: TextStyle(fontSize: 18.0))), + ), + SizedBox(height: 16.0), + Container( + width: MediaQuery.of(context).size.width * 0.8, + child: MaterialButton( + height: 60.0, + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => Accounts()), + ); + }, + color: Colors.white, + textColor: Colors.black, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(5.0), + topRight: Radius.circular(5.0), + bottomLeft: Radius.circular(5.0), + bottomRight: Radius.circular(5.0), + ), + ), + child: Text('Accounts', + style: TextStyle(fontSize: 18.0))), + ), + SizedBox(height: 16.0), + Container( + width: MediaQuery.of(context).size.width * 0.8, + child: MaterialButton( + height: 60.0, + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => Inventory()), + ); + }, + color: Colors.white, + textColor: Colors.black, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(5.0), + topRight: Radius.circular(5.0), + bottomLeft: Radius.circular(5.0), + bottomRight: Radius.circular(5.0), + ), + ), + child: Text('Inventory', + style: TextStyle(fontSize: 18.0))), + ), + SizedBox(height: 16.0), + Container( + width: MediaQuery.of(context).size.width * 0.8, + child: MaterialButton( + height: 60.0, + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => BillDetails()), + ); + }, + color: Colors.white, + textColor: Colors.black, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(5.0), + topRight: Radius.circular(5.0), + bottomLeft: Radius.circular(5.0), + bottomRight: Radius.circular(5.0), + ), + ), + child: Text('Bill Details', + style: TextStyle(fontSize: 18.0))), + ), + SizedBox(height: 16.0), + Container( + width: MediaQuery.of(context).size.width * 0.8, + child: MaterialButton( + height: 60.0, + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => MyPdfViewer()), + ); + }, + color: Colors.white, + textColor: Colors.black, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(5.0), + topRight: Radius.circular(5.0), + bottomLeft: Radius.circular(5.0), + bottomRight: Radius.circular(5.0), + ), + ), + child: Text('Rules and Regulations', + style: TextStyle(fontSize: 18.0))), + ), + SizedBox(height: 16.0), + Container( + width: MediaQuery.of(context).size.width * 0.6, + child: MaterialButton( + height: 60.0, + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => PlaceRequest()), + ); + }, + color: Color.fromARGB(255, 243, 108, 53), + textColor: Colors.white, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(5.0), + topRight: Radius.circular(5.0), + bottomLeft: Radius.circular(5.0), + bottomRight: Radius.circular(5.0), + ), + ), + child: Text('Place Request', + style: TextStyle(fontSize: 18.0))), + ), + ], + ), + ), + ), + ), + ], + ), + ); + } +} diff --git a/pubspec.yaml b/pubspec.yaml index 49030f0b..4aefe3e6 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -39,6 +39,14 @@ dependencies: path_provider: ^2.0.8 open_file: ^3.2.1 flutter_html: ^2.2.1 + flutter_lints: ^2.0.0 + date_picker_number: ^1.0.2 + date_time_picker: ^2.1.0 + dropdown_button2: ^1.9.2 + get: ^4.6.5 + intl: ^0.17.0 + material: ^1.0.0+2 + country_picker: ^2.0.20 @@ -68,6 +76,7 @@ flutter: - assets/mypic.jpg - assets/unknown.jpg - assets/profile_pic.png + - assets/Rules.pdf - db/ # An image asset can refer to one or more resolution-specific "variants", see