Skip to content

Commit

Permalink
Merge pull request #399 from YujithIsura/main
Browse files Browse the repository at this point in the history
vehicle fule consumption module WIP
  • Loading branch information
YujithIsura authored Sep 10, 2024
2 parents 267e484 + 4a9d9c6 commit a965f9d
Show file tree
Hide file tree
Showing 5 changed files with 1,170 additions and 307 deletions.
90 changes: 45 additions & 45 deletions campus/frontend/lib/avinya/asset_admin/lib/screens/scaffold.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ class _SMSScaffoldState extends State<SMSScaffold> {
tileName: "Consumable Monthly Report",
route: "/consumable_monthly_report",
icon: Icons.summarize_sharp),
// SideNavigationSectionTile(
// tileName: "Vehicle Fuel Consumption Monthly Report",
// route: "/vehicle_fuel_consumption_monthly_report",
// icon: Icons.local_gas_station_outlined),
SideNavigationSectionTile(
tileName: "Vehicle Fuel Consumption Monthly Report",
route: "/vehicle_fuel_consumption_monthly_report",
icon: Icons.local_gas_station_outlined),
];

return Scaffold(
Expand Down Expand Up @@ -385,47 +385,47 @@ class _SMSScaffoldState extends State<SMSScaffold> {
),
),
),
// MouseRegion(
// onEnter: (_) {
// setState(() {
// isVehicleFuelConsumptionSectionHovered = true;
// });
// },
// onExit: (_) {
// setState(() {
// isVehicleFuelConsumptionSectionHovered = false;
// });
// },
// child: Container(
// decoration: BoxDecoration(
// color: isVehicleFuelConsumptionSectionHovered
// ? Colors.white.withOpacity(0.3)
// : null,
// borderRadius: BorderRadius.circular(15.0),
// ),
// margin: EdgeInsets.all(8.0),
// child: ListTile(
// leading: Icon(Icons.local_gas_station_sharp,
// color: Colors.white, size: 20.0),
// title: Container(
// margin: EdgeInsets.only(left: 12.0),
// transform:
// Matrix4.translationValues(-25, 0.0, 0.0),
// child: Text(
// "Vehicle Fuel Consumption",
// style: TextStyle(
// color: Colors.white,
// fontSize: 12,
// ),
// ),
// ),
// onTap: () {
// Navigator.pop(context); // Close the drawer
// routeState.go('/vehicle_fuel_consumption');
// },
// ),
// ),
// ),
MouseRegion(
onEnter: (_) {
setState(() {
isVehicleFuelConsumptionSectionHovered = true;
});
},
onExit: (_) {
setState(() {
isVehicleFuelConsumptionSectionHovered = false;
});
},
child: Container(
decoration: BoxDecoration(
color: isVehicleFuelConsumptionSectionHovered
? Colors.white.withOpacity(0.3)
: null,
borderRadius: BorderRadius.circular(15.0),
),
margin: EdgeInsets.all(8.0),
child: ListTile(
leading: Icon(Icons.local_gas_station_sharp,
color: Colors.white, size: 20.0),
title: Container(
margin: EdgeInsets.only(left: 12.0),
transform:
Matrix4.translationValues(-25, 0.0, 0.0),
child: Text(
"Vehicle Fuel Consumption",
style: TextStyle(
color: Colors.white,
fontSize: 12,
),
),
),
onTap: () {
Navigator.pop(context); // Close the drawer
routeState.go('/vehicle_fuel_consumption');
},
),
),
),
SideNavigationSection(
initialSectionHoveredValue:
isConsumableReportSectionHovered,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,32 @@
import 'package:flutter/material.dart';
import 'package:gallery/avinya/asset_admin/lib/widgets/vehicle_fuel_consumption.dart';
import 'package:gallery/avinya/asset_admin/lib/widgets/vehicle_fuel_consumption_table.dart';

class VehicleFuelConsumptionScreen extends StatefulWidget {
const VehicleFuelConsumptionScreen({super.key});

@override
State<VehicleFuelConsumptionScreen> createState() => _VehicleFuelConsumptionScreenState();
State<VehicleFuelConsumptionScreen> createState() =>
_VehicleFuelConsumptionScreenState();
}

class _VehicleFuelConsumptionScreenState extends State<VehicleFuelConsumptionScreen> {
@override
class _VehicleFuelConsumptionScreenState
extends State<VehicleFuelConsumptionScreen> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
automaticallyImplyLeading: false,
title: Text("Vehicle Fuel Consumption"),
),
body: SingleChildScrollView(
child: Container(
child: VehicleFuelConsumption(),
child: SingleChildScrollView(
child: Container(
child: VehicleFuelConsumptionTable(
title: 'Daily Vehicle FuelConsumption Data',
),
),
),
),
);
}
}
}
Loading

0 comments on commit a965f9d

Please sign in to comment.