Commit a96d8a62 by Ramesh Babu Puvvadi

added

parent d1796431
...@@ -8,6 +8,7 @@ import 'package:storemonitor/Screens/EmployeeStatus.dart'; ...@@ -8,6 +8,7 @@ import 'package:storemonitor/Screens/EmployeeStatus.dart';
import 'package:storemonitor/Screens/IssueVideos.dart'; import 'package:storemonitor/Screens/IssueVideos.dart';
import 'package:storemonitor/Screens/NavBar.dart'; import 'package:storemonitor/Screens/NavBar.dart';
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
import 'package:storemonitor/Screens/WeeklyAudit.dart';
import 'package:storemonitor/Services/RemoteData.dart'; import 'package:storemonitor/Services/RemoteData.dart';
import 'package:syncfusion_flutter_charts/charts.dart'; import 'package:syncfusion_flutter_charts/charts.dart';
import 'Constants.dart'; import 'Constants.dart';
...@@ -644,12 +645,11 @@ class _Home extends State<Home> { ...@@ -644,12 +645,11 @@ class _Home extends State<Home> {
child: GestureDetector( child: GestureDetector(
onTap: () { onTap: () {
Navigator.push( Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
builder: (context) => UserRegistration( builder: (context) => WeeklyAudit(
message: message:
selectedDropdownItem.toString())), selectedDropdownItem.toString())));
);
}, },
child: Container( child: Container(
width: MediaQuery.of(context).size.width * 0.44, width: MediaQuery.of(context).size.width * 0.44,
...@@ -660,9 +660,9 @@ class _Home extends State<Home> { ...@@ -660,9 +660,9 @@ class _Home extends State<Home> {
begin: Alignment.bottomLeft, begin: Alignment.bottomLeft,
end: Alignment.bottomRight, end: Alignment.bottomRight,
colors: [ colors: [
Color(0xFF6d6027), Color(0xFF2c3e50),
//Color(0xFFC2185B), //Color(0xFFC2185B),
Color(0xFFd3cbb8), Color(0xFF5aacba),
], ],
), ),
borderRadius: BorderRadius.circular(7), borderRadius: BorderRadius.circular(7),
...@@ -700,18 +700,18 @@ class _Home extends State<Home> { ...@@ -700,18 +700,18 @@ class _Home extends State<Home> {
width: MediaQuery.of(context).size.width * 0.44, width: MediaQuery.of(context).size.width * 0.44,
height: MediaQuery.of(context).size.width * 0.22, height: MediaQuery.of(context).size.width * 0.22,
padding: const EdgeInsets.all(5), padding: const EdgeInsets.all(5),
decoration: BoxDecoration( // decoration: BoxDecoration(
gradient: const LinearGradient( // gradient: const LinearGradient(
begin: Alignment.bottomLeft, // begin: Alignment.bottomLeft,
end: Alignment.bottomRight, // end: Alignment.bottomRight,
colors: [ // colors: [
// Color(0xFF6a706f), // // Color(0xFF6a706f),
// //Color(0xFFC2185B), // // //Color(0xFFC2185B),
// Color(0xFF91b3b1), // // Color(0xFF91b3b1),
], // ],
), // ),
borderRadius: BorderRadius.circular(7), // borderRadius: BorderRadius.circular(7),
), // ),
), ),
), ),
), ),
......
...@@ -130,7 +130,8 @@ class _Review extends State<Review> { ...@@ -130,7 +130,8 @@ class _Review extends State<Review> {
//print('Data:$data'); //print('Data:$data');
Map<String, dynamic> responseMap = jsonDecode(data.body); Map<String, dynamic> responseMap = jsonDecode(data.body);
if (kDebugMode) { if (kDebugMode) {
print('response:$responseMap'); print('response Hit :$responseMap');
print(responseMap['status'].length);
} }
if (responseMap['status'] == 'success') { if (responseMap['status'] == 'success') {
reviewList = ReviewList.fromJson(responseMap); reviewList = ReviewList.fromJson(responseMap);
...@@ -154,10 +155,21 @@ class _Review extends State<Review> { ...@@ -154,10 +155,21 @@ class _Review extends State<Review> {
} }
}); });
Navigator.of(context).pop(); Navigator.of(context).pop();
} else if (responseMap['status'] == 'Error') {
Navigator.of(context).pop();
Constants('Review', 'No Data Found').showAlertDialog(context, false);
setState(() {
filteredAlerts?.clear();
if (filteredAlerts!.isNotEmpty) {
_controller.text = '${1}/${filteredAlerts?.length ?? 0}';
} else {
_controller.text = '${0}/${filteredAlerts?.length ?? 0}';
}
});
} else { } else {
Navigator.of(context).pop();
Constants('Review', data.statusCode.toString()) Constants('Review', data.statusCode.toString())
.showAlertDialog(context, false); .showAlertDialog(context, false);
Navigator.of(context).pop();
} }
} else {} } else {}
} }
...@@ -1322,7 +1334,8 @@ class _Review extends State<Review> { ...@@ -1322,7 +1334,8 @@ class _Review extends State<Review> {
ElevatedButton( ElevatedButton(
style: ButtonStyle( style: ButtonStyle(
backgroundColor: MaterialStateProperty.all<Color>( backgroundColor: MaterialStateProperty.all<Color>(
const Color.fromARGB(255, 124, 76, 211)), const Color.fromARGB(255, 124, 76, 211),
),
), ),
onPressed: () { onPressed: () {
getAction(index, text, textFieldValue); getAction(index, text, textFieldValue);
......
...@@ -80,7 +80,7 @@ class _CheckBoxListState extends State<WeeklyAudit> { ...@@ -80,7 +80,7 @@ class _CheckBoxListState extends State<WeeklyAudit> {
Padding( Padding(
padding: EdgeInsets.symmetric(horizontal: 20), padding: EdgeInsets.symmetric(horizontal: 20),
child: Text( child: Text(
'#Notifications\n(last 7 days)\n', ' #Notifications\n (last 7 days)\n',
style: TextStyle( style: TextStyle(
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
...@@ -90,7 +90,7 @@ class _CheckBoxListState extends State<WeeklyAudit> { ...@@ -90,7 +90,7 @@ class _CheckBoxListState extends State<WeeklyAudit> {
Padding( Padding(
padding: EdgeInsets.symmetric(horizontal: 20), padding: EdgeInsets.symmetric(horizontal: 20),
child: Text( child: Text(
'Audited?', ' Audited?',
style: TextStyle( style: TextStyle(
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
...@@ -102,7 +102,7 @@ class _CheckBoxListState extends State<WeeklyAudit> { ...@@ -102,7 +102,7 @@ class _CheckBoxListState extends State<WeeklyAudit> {
), ),
), ),
body: ListView( body: ListView(
padding: const EdgeInsets.fromLTRB(4, 2, 4, 4), padding: const EdgeInsets.fromLTRB(4, 2, 20, 4),
children: List<Widget>.generate(_items.length, (index) { children: List<Widget>.generate(_items.length, (index) {
final SimpleModel item = _items[index]; final SimpleModel item = _items[index];
final Color backgroundColor = index % 2 == 0 final Color backgroundColor = index % 2 == 0
...@@ -123,7 +123,7 @@ class _CheckBoxListState extends State<WeeklyAudit> { ...@@ -123,7 +123,7 @@ class _CheckBoxListState extends State<WeeklyAudit> {
Expanded( Expanded(
child: Align( child: Align(
alignment: Alignment.topLeft, alignment: Alignment.topLeft,
child: Text('\t\t\t ${item.alerts}'), child: Text('\t\t\t\t\t\t\t\t\t ${item.alerts}'),
), ),
), ),
], ],
......
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