Commit fff8be6c by Ramesh Babu Puvvadi

added few changes

parent 9b8435fb
......@@ -482,8 +482,7 @@ class _CheckList extends State<CheckList> {
Navigator.pop(context);
}
} else {
Constants('CheckList', 'Enter Atleast one item')
.showAlertDialog(context, false);
Constants('CheckList', 'Enter Atleast one item').showAlertDialog(context, false);
}
}
},
......
......@@ -8,8 +8,8 @@ import '../Services/RemoteData.dart';
import 'Constants.dart';
class EmployeeReport extends StatefulWidget {
String message;
EmployeeReport({super.key, required this.message});
final String message;
const EmployeeReport({super.key, required this.message});
@override
State<EmployeeReport> createState() => _EmployeeReport();
......@@ -27,6 +27,7 @@ class _EmployeeReport extends State<EmployeeReport> {
int registered = 0;
int unregistered = 0;
int total = 0;
@override
void initState() {
super.initState();
......@@ -373,6 +374,7 @@ class _EmployeeReport extends State<EmployeeReport> {
),
);
}
void showProgressDialog(BuildContext context) {
// Capture the context in a local variable
BuildContext dialogContext = context;
......@@ -392,13 +394,13 @@ class _EmployeeReport extends State<EmployeeReport> {
if (await Constants.checkInternetConnectivity()) {
showProgressDialog(context);
// showDialog(
// context: context,
// builder: (context) {
// return const Center(
// child: CircularProgressIndicator(
// color: Color.fromARGB(255, 173, 57, 230),
// ));
// });
// context: context,
// builder: (context) {
// return const Center(
// child: CircularProgressIndicator(
// color: Color.fromARGB(255, 173, 57, 230),
// ));
// });
Map<String, dynamic> body = {
'STORE': selectedDropdownItem!,
......@@ -427,8 +429,7 @@ class _EmployeeReport extends State<EmployeeReport> {
});
} else {
Navigator.of(context).pop();
Constants('Employee Report', 'Please check your internet connection')
.showAlertDialog(context, false);
Constants('Employee Report', 'Please check your internet connection').showAlertDialog(context, false);
}
}
}
......@@ -14,8 +14,6 @@ class FootFall extends StatefulWidget {
const FootFall(
{super.key, required this.message, required this.selecteddate});
//const Home({super.key});
@override
_FootFall createState() => _FootFall();
}
......@@ -29,13 +27,13 @@ class _FootFall extends State<FootFall> {
List<String>? storesList;
//var graph = """<!DOCTYPE html>\n<html>\n<script type=\"text/javascript\" src=\"https://www.gstatic.com/charts/loader.js\"></script>\n\n<body>\n<div id=\"Employees\" style=\"width:50%; max-width:150px; height:50px;\"></div>\n\n<script>\ngoogle.charts.load('current', {'packages':['corechart']});\ngoogle.charts.setOnLoadCallback(drawChart);\n\nfunction drawChart() {\n var data = google.visualization.arrayToDataTable([\n ['TIME OF DAY', 'MALE',{ role: 'annotation'},'FEMALE',{ role: 'annotation'},],\n['10-11', 8, '8', 19, '19'], ['11-12', 12, '12', 21, '21'], ['12-13', 18, '18', 13, '13'], ['13-14', 17, '17', 14, '14'], ['14-15', 10, '10', 20, '20'], ['15-16', 8, '8', 21, '21'], ['16-17', 11, '11', 19, '19'], ['17-18', 12, '12', 13, '13'], ['18-19', 13, '13', 16, '16'], ['19-20', 8, '8', 22, '22'], ['20-21', 14, '14', 15, '15'], ['21-22', 7, '7', 17, '17'],\n \n ]);\n\n var options = {\n \t \n \t \n legend:'top',\n chartArea:{left:30,bottom:50,top:40,width:\"90%\",height:\"50%\"},\n width:1080,\n height:800,\n \n colors: ['#65d9eb', '#e263eb'],\n hAxis:{\n title:'---- Time of Day ----',\n titleTextStyle:{\n\t\t\t fontSize: 18,\n bold: true,},\n }, \n vAxis:{\n \t\t fontSize: 18,\n bold:true,\n title:'Footfall --->',\n \n titleTextStyle:{\n\t\t\t fontSize: 18,\n bold: true,},},\n annotations:{\n alwaysOutside: false,\n highContrast: true, // default is true, but be sure\n textStyle: {\n \tfontSize: 14,\n bold: true\n } \n\n },\n\n\n };\n\n var chart = new google.visualization.AreaChart(document.getElementById('Employees'));\n chart.draw(data, options);\n }\n</script>\n\n</body>\n</html>\n""";
@override
void initState() {
super.initState();
isMeeters = widget.message;
loadData();
// _selectedDate = DateTime.now();
//_selectedDate = DateTime.now();
String dateString = widget.selecteddate;
DateFormat format = DateFormat("yyyy/MM/dd");
_selectedDate = format.parse(dateString);
......@@ -632,7 +630,8 @@ class _FootFall extends State<FootFall> {
const Text('Gender Breakup',
textAlign: TextAlign.left,
style: Constants.headerfontStyle)
].map((e) => Padding(
]
.map((e) => Padding(
padding:
const EdgeInsets.only(left: 10),
child: e))
......
......@@ -4,7 +4,6 @@ import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:storemonitor/Models/chartdata.dart';
import 'package:storemonitor/Screens/CameraGridItems.dart';
import 'package:storemonitor/Screens/EmployeeStatus.dart';
import 'package:storemonitor/Screens/IssueVideos.dart';
import 'package:storemonitor/Screens/NavBar.dart';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment