forked from FusionIIIT/Fusion-mobile
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from root-reborn/main
Added all screens for Caretaker and Warden actors under the Hostel Management Module
- Loading branch information
Showing
17 changed files
with
3,993 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter/widgets.dart'; | ||
import 'package:fusion/Components/side_drawer.dart'; | ||
|
||
class Complaintregister extends StatelessWidget { | ||
const Complaintregister({Key? key}) : super(key: key); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Scaffold( | ||
drawer: SideDrawer(), | ||
appBar: AppBar( | ||
title: const Text('Complaint Register'), | ||
backgroundColor: Color.fromARGB(255, 245, 103, 47), | ||
foregroundColor: Colors.white, | ||
), | ||
body: Padding( | ||
padding: const EdgeInsets.fromLTRB(20, 30, 20, 0), // Add padding to the body | ||
child: GridView.count( | ||
crossAxisCount: 2, | ||
childAspectRatio: 1.5, // Adjust the aspect ratio to make the cards horizontally rectangular | ||
children: List.generate( | ||
roomNumbers.length, | ||
(index) => InkWell( | ||
onTap: () { | ||
// Navigate to a new screen when the card is tapped | ||
Navigator.push( | ||
context, | ||
MaterialPageRoute(builder: (context) => DetailScreen(roomNumber: roomNumbers[index])), | ||
); | ||
}, | ||
child: Card( | ||
color: Color.fromARGB(255, 245, 103, 47), | ||
child: Padding( | ||
padding: const EdgeInsets.all(8.0), // Add padding to make the cards compact | ||
child: Center( | ||
child: Column( | ||
mainAxisAlignment: MainAxisAlignment.center, | ||
children: [ | ||
Text( | ||
roomNumbers[index], | ||
style: TextStyle( | ||
fontSize: 20, | ||
fontWeight: FontWeight.bold, | ||
color: Colors.white, // Set the text color to white | ||
), | ||
), | ||
Icon(Icons.arrow_forward, color: Colors.white), // Set the arrow color to white | ||
], | ||
), | ||
), | ||
), | ||
), | ||
), | ||
), | ||
), | ||
), | ||
); | ||
} | ||
} | ||
|
||
class DetailScreen extends StatelessWidget { | ||
final String roomNumber; | ||
|
||
const DetailScreen({Key? key, required this.roomNumber}) : super(key: key); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Scaffold( | ||
appBar: AppBar( | ||
title: Text('Room $roomNumber Details'), | ||
), | ||
body: Center( | ||
child: Text( | ||
'Room $roomNumber Details', | ||
style: TextStyle( | ||
color: Colors.white, // Set the text color to white | ||
), | ||
), | ||
), | ||
); | ||
} | ||
} | ||
|
||
List<String> roomNumbers = [ | ||
'101', | ||
'102', | ||
'103', | ||
'104', | ||
'105', | ||
'106', | ||
'107', | ||
'108', | ||
'109', | ||
'110', | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,226 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter/widgets.dart'; | ||
import 'package:fusion/Components/side_drawer.dart'; | ||
class Guestroom extends StatelessWidget { | ||
const Guestroom({Key? key}) : super(key: key); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Scaffold( | ||
drawer: SideDrawer(), | ||
appBar: AppBar( | ||
title: const Text('Guest Room'), | ||
backgroundColor: Color.fromARGB(255, 245, 103, 47), | ||
foregroundColor: Colors.white, | ||
), | ||
body: Container( | ||
child: Padding( | ||
padding: const EdgeInsets.fromLTRB(20, 40, 20, 20), | ||
child: Container( | ||
width: double.infinity, // Prevent horizontal scrolling | ||
child: Expanded( | ||
child: SingleChildScrollView( | ||
scrollDirection: Axis.horizontal, | ||
child: Row( | ||
children: [ | ||
Container( | ||
child: Column( | ||
crossAxisAlignment: CrossAxisAlignment.start, | ||
children: [ | ||
Container( | ||
alignment: Alignment.topLeft, | ||
child: const Text( | ||
'Status', | ||
style: TextStyle( | ||
fontSize: 23, | ||
fontWeight: FontWeight.bold, | ||
), | ||
textAlign: TextAlign.left, | ||
), | ||
), | ||
Container( | ||
width: MediaQuery.of(context).size.width - 40, | ||
height: 250, | ||
decoration: BoxDecoration( | ||
color: Color.fromARGB( | ||
255, 245, 103, 47), // Change to orange color | ||
borderRadius: BorderRadius.circular(8), | ||
), | ||
padding: const EdgeInsets.all(8), | ||
margin: const EdgeInsets.symmetric(vertical: 4), | ||
child: const Text( | ||
'', | ||
style: TextStyle( | ||
color: Colors.white, | ||
fontSize: 16, | ||
fontWeight: FontWeight.bold, | ||
), | ||
), | ||
), | ||
Container( | ||
alignment: Alignment.topLeft, | ||
padding: const EdgeInsets.only(top: 30, bottom: 10), | ||
child: const Text( | ||
'Guest Room 1', | ||
style: TextStyle( | ||
fontSize: 23, | ||
fontWeight: FontWeight.bold, | ||
), | ||
textAlign: TextAlign.left, | ||
), | ||
), | ||
Container( | ||
child: Center( | ||
child: Column( | ||
mainAxisAlignment: MainAxisAlignment | ||
.center, // Align vertically center | ||
children: [ | ||
Column( | ||
children: [ | ||
Container( | ||
width: MediaQuery.of(context).size.width - 40, | ||
height: 70, // Set the height to 30px | ||
padding: const EdgeInsets.only(top: 10, bottom: 10), | ||
child: ElevatedButton( | ||
onPressed: () { | ||
// View Documents | ||
}, | ||
child: const Text('View Documents', style: TextStyle(color: Colors.white)), | ||
style: ElevatedButton.styleFrom( | ||
backgroundColor: Color.fromARGB(255, 245, 103, 47), // Add background color | ||
shape: RoundedRectangleBorder( | ||
borderRadius: BorderRadius.circular(5), // Set border radius to 5px | ||
), | ||
|
||
), | ||
), | ||
), | ||
Container( | ||
child: Row( | ||
children: [ | ||
ElevatedButton.icon( | ||
onPressed: () { | ||
// Approve | ||
}, | ||
icon: Icon(Icons.check, color: Colors.white), | ||
label: const Text('Approve', style: TextStyle(color: Colors.white)), | ||
style: ElevatedButton.styleFrom( | ||
backgroundColor: Colors.green, | ||
shape: RoundedRectangleBorder( | ||
borderRadius: BorderRadius.circular(5), // Set border radius to 5px | ||
), | ||
), | ||
), | ||
SizedBox(width: 10), | ||
ElevatedButton.icon( | ||
onPressed: () { | ||
// Cancel | ||
}, | ||
icon: Icon(Icons.close, color: Colors.white), | ||
label: const Text('Cancel', style: TextStyle(color: Colors.white)), | ||
style: ElevatedButton.styleFrom( | ||
backgroundColor: Colors.red, | ||
shape: RoundedRectangleBorder( | ||
borderRadius: BorderRadius.circular(5), // Set border radius to 5px | ||
), | ||
), | ||
), | ||
], | ||
), | ||
), | ||
], | ||
), | ||
], | ||
), | ||
), | ||
), | ||
Container( | ||
alignment: Alignment.topLeft, | ||
padding: const EdgeInsets.only(top: 30, bottom: 10), | ||
child: const Text( | ||
'Guest Room 2', | ||
style: TextStyle( | ||
fontSize: 23, | ||
fontWeight: FontWeight.bold, | ||
), | ||
textAlign: TextAlign.left, | ||
), | ||
), | ||
Container( | ||
child: Center( | ||
child: Column( | ||
mainAxisAlignment: MainAxisAlignment | ||
.center, // Align vertically center | ||
children: [ | ||
Column( | ||
children: [ | ||
Container( | ||
width: MediaQuery.of(context).size.width - 40, | ||
height: 70, // Set the height to 30px | ||
padding: const EdgeInsets.only(top: 10, bottom: 10), | ||
child: ElevatedButton( | ||
onPressed: () { | ||
// View Documents | ||
}, | ||
child: const Text('View Documents', style: TextStyle(color: Colors.white)), | ||
style: ElevatedButton.styleFrom( | ||
backgroundColor: Color.fromARGB(255, 245, 103, 47), // Add background color | ||
shape: RoundedRectangleBorder( | ||
borderRadius: BorderRadius.circular(5), // Set border radius to 5px | ||
), | ||
|
||
), | ||
), | ||
), | ||
Container( | ||
child: Row( | ||
children: [ | ||
ElevatedButton.icon( | ||
onPressed: () { | ||
// Approve | ||
}, | ||
icon: Icon(Icons.check, color: Colors.white), | ||
label: const Text('Approve', style: TextStyle(color: Colors.white)), | ||
style: ElevatedButton.styleFrom( | ||
backgroundColor: Colors.green, | ||
shape: RoundedRectangleBorder( | ||
borderRadius: BorderRadius.circular(5), // Set border radius to 5px | ||
), | ||
), | ||
), | ||
SizedBox(width: 10), | ||
ElevatedButton.icon( | ||
onPressed: () { | ||
// Cancel | ||
}, | ||
icon: Icon(Icons.close, color: Colors.white), | ||
label: const Text('Cancel', style: TextStyle(color: Colors.white)), | ||
style: ElevatedButton.styleFrom( | ||
backgroundColor: Colors.red, | ||
shape: RoundedRectangleBorder( | ||
borderRadius: BorderRadius.circular(5), // Set border radius to 5px | ||
), | ||
), | ||
), | ||
], | ||
), | ||
), | ||
], | ||
), | ||
], | ||
), | ||
), | ||
), | ||
], | ||
), | ||
), | ||
], | ||
), | ||
), | ||
), | ||
), | ||
), | ||
), | ||
); | ||
} | ||
} |
Oops, something went wrong.