Commit a96d8a62 by Ramesh Babu Puvvadi

added

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