Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
StoreMonitor
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ramesh Babu Puvvadi
StoreMonitor
Commits
c62a2345
Commit
c62a2345
authored
Oct 11, 2023
by
Ramesh Babu Puvvadi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
few changes
parent
a41737ae
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
70 additions
and
55 deletions
+70
-55
CheckRegistration.dart
lib/Screens/CheckRegistration.dart
+6
-3
FootFall.dart
lib/Screens/FootFall.dart
+3
-2
Home.dart
lib/Screens/Home.dart
+17
-5
IssueVideos.dart
lib/Screens/IssueVideos.dart
+29
-29
LoginPage.dart
lib/Screens/LoginPage.dart
+1
-1
NotificationReport.dart
lib/Screens/NotificationReport.dart
+11
-11
Review.dart
lib/Screens/Review.dart
+2
-3
NetworkApiServices.dart
lib/Services/NetworkApiServices.dart
+0
-0
pubspec.yaml
pubspec.yaml
+1
-1
No files found.
lib/Screens/CheckRegistration.dart
View file @
c62a2345
...
...
@@ -143,7 +143,7 @@ class _CheckRegistration extends State<CheckRegistration> {
if
(
image
!=
null
)
{
File
file
=
File
(
image
!.
path
);
String
filecontents
=
await
fileToString
(
file
);
//
String filecontents = await fileToString(file);
String
fileName
=
file
.
path
.
split
(
Platform
.
pathSeparator
).
last
;
final
response
=
...
...
@@ -183,13 +183,14 @@ class _CheckRegistration extends State<CheckRegistration> {
void
getValidReg
(
String
text
)
async
{
var
data
=
await
RemoteData
().
getValidEmp
(
text
);
if
(
data
.
statusCode
!=
200
)
{
Constants
(
'Review'
,
data
.
statusCode
.
toString
())
.
showAlertDialog
(
context
,
false
);
Constants
(
'Review'
,
data
.
statusCode
.
toString
()).
showAlertDialog
(
context
,
false
);
return
;
}
Map
<
String
,
dynamic
>
responseMap
=
jsonDecode
(
data
.
body
);
CheckReg
checkReg
=
CheckReg
.
fromJson
(
responseMap
);
if
(
kDebugMode
)
{
print
(
'response:
$responseMap
'
);
}
if
(
checkReg
.
status
==
'Success'
)
{
getVideo
(
text
);
}
else
{
...
...
@@ -204,8 +205,10 @@ class _CheckRegistration extends State<CheckRegistration> {
return
await
file
.
readAsString
();
}
}
catch
(
e
)
{
if
(
kDebugMode
)
{
print
(
"Error reading file:
$e
"
);
}
}
return
''
;
}
}
lib/Screens/FootFall.dart
View file @
c62a2345
...
...
@@ -11,7 +11,8 @@ import 'Constants.dart';
class
FootFall
extends
StatefulWidget
{
final
String
message
;
final
String
selecteddate
;
const
FootFall
({
super
.
key
,
required
this
.
message
,
required
this
.
selecteddate
});
const
FootFall
(
{
super
.
key
,
required
this
.
message
,
required
this
.
selecteddate
});
@override
_FootFall
createState
()
=>
_FootFall
();
...
...
@@ -25,7 +26,7 @@ class _FootFall extends State<FootFall> {
var
isMeeters
=
''
;
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""";
//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
()
{
...
...
lib/Screens/Home.dart
View file @
c62a2345
...
...
@@ -132,6 +132,14 @@ class _Home extends State<Home> {
),
),
body:
SingleChildScrollView
(
child:
GestureDetector
(
onHorizontalDragUpdate:
(
dragDetail
)
{
print
(
'Testing'
);
if
(
dragDetail
.
delta
.
direction
>
0
)
{
Navigator
.
pop
(
context
);
print
(
'Hitted =====>'
);
}
},
child:
Container
(
margin:
const
EdgeInsets
.
all
(
12.0
),
child:
Column
(
...
...
@@ -181,8 +189,8 @@ class _Home extends State<Home> {
controller:
_dateTime
,
onTap:
()
{},
decoration:
InputDecoration
(
contentPadding:
const
EdgeInsets
.
symmetric
(
vertical:
15
,
horizontal:
10
),
contentPadding:
const
EdgeInsets
.
symmetric
(
vertical:
15
,
horizontal:
10
),
isDense:
true
,
hintText:
'Select date'
,
border:
OutlineInputBorder
(
...
...
@@ -200,7 +208,8 @@ class _Home extends State<Home> {
),
const
SizedBox
(
height:
10
),
const
Text
(
'AI Powered Alerts'
,
textAlign:
TextAlign
.
right
,
style:
Constants
.
headerfontStyle
),
textAlign:
TextAlign
.
right
,
style:
Constants
.
headerfontStyle
),
const
SizedBox
(
width:
0
,
height:
5
,
...
...
@@ -331,7 +340,8 @@ class _Home extends State<Home> {
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
EmployeeStatus
(
message:
selectedDropdownItem
.
toString
())),
message:
selectedDropdownItem
.
toString
())),
);
},
child:
Container
(
...
...
@@ -517,7 +527,8 @@ class _Home extends State<Home> {
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
UserRegistration
(
message:
selectedDropdownItem
.
toString
())),
message:
selectedDropdownItem
.
toString
())),
);
},
child:
Container
(
...
...
@@ -610,6 +621,7 @@ class _Home extends State<Home> {
),
),
),
),
);
}
...
...
lib/Screens/IssueVideos.dart
View file @
c62a2345
...
...
@@ -5,7 +5,7 @@ import 'package:permission_handler/permission_handler.dart';
//import 'package:need_resume/need_resume.dart';
import
'package:shared_preferences/shared_preferences.dart'
;
import
'package:storemonitor/Screens/Issue.dart'
;
import
'package:storemonitor/Screens/
MyHomePage
.dart'
;
import
'package:storemonitor/Screens/
SurvellianceView
.dart'
;
import
'../Services/RemoteData.dart'
;
import
'Constants.dart'
;
...
...
@@ -263,35 +263,35 @@ class _IssueVideos extends State<IssueVideos> {
child:
GestureDetector
(
onTap:
()
{
requestStoragePermission
();
//
Navigator.of(context)
//
.push(
//
MaterialPageRoute(
//
builder: (_) => SurvellianceView(
//
message: notificationslist![index]
//
.VIDEOURL,
//
id: notificationslist![index]
//
.VIDNOTID
//
.toString(),
//
comment: notificationslist![index]
//
.COMMENTS,
//
desc: notificationslist![index]
//
.DESCRIPTION,
//
store:
//
notificationslist![index].STORE,
//
location: notificationslist![index]
//
.LOCATION,
//
time: notificationslist![index]
//
.TIMESTAMP,
//
)),
//
)
//
.then((val) => (val != null)
//
? (val
//
? getData(selectedDropdownItem!)
//
: true)
//
: false);
Navigator
.
of
(
context
)
.
push
(
MaterialPageRoute
(
builder:
(
_
)
=>
SurvellianceView
(
message:
notificationslist
![
index
]
.
VIDEOURL
,
id:
notificationslist
![
index
]
.
VIDNOTID
.
toString
(),
comment:
notificationslist
![
index
]
.
COMMENTS
,
desc:
notificationslist
![
index
]
.
DESCRIPTION
,
store:
notificationslist
![
index
].
STORE
,
location:
notificationslist
![
index
]
.
LOCATION
,
time:
notificationslist
![
index
]
.
TIMESTAMP
,
)),
)
.
then
((
val
)
=>
(
val
!=
null
)
?
(
val
?
getData
(
selectedDropdownItem
!)
:
true
)
:
false
);
Navigator
.
of
(
context
).
push
(
MaterialPageRoute
(
builder:
(
_
)
=>
MyHomePage
()));
//
Navigator.of(context).push(MaterialPageRoute(
//
builder: (_) => MyHomePage()));
},
child:
Row
(
children:
[
...
...
lib/Screens/LoginPage.dart
View file @
c62a2345
...
...
@@ -49,7 +49,7 @@ class LoginPage extends StatelessWidget {
// 'assets/images/login_header_image.png',
// height: 350,
// width: 350,
//
),
//),
const
SizedBox
(
height:
30
),
const
LoginForm
(),
],
...
...
lib/Screens/NotificationReport.dart
View file @
c62a2345
...
...
@@ -3,7 +3,6 @@ import 'dart:core';
import
'package:flutter/material.dart'
;
import
'package:http/src/response.dart'
;
import
'package:shared_preferences/shared_preferences.dart'
;
//this below one is DateFormat Libray its not imported automatically
import
'package:intl/intl.dart'
;
import
'../Models/Notifications.dart'
;
import
'../Services/RemoteData.dart'
;
...
...
@@ -13,7 +12,8 @@ class NotificationReport extends StatefulWidget {
final
String
message
;
final
String
selecteddate
;
const
NotificationReport
({
super
.
key
,
required
this
.
message
,
required
this
.
selecteddate
});
const
NotificationReport
(
{
super
.
key
,
required
this
.
message
,
required
this
.
selecteddate
});
@override
_NotificationReport
createState
()
=>
_NotificationReport
();
...
...
@@ -115,8 +115,7 @@ class _NotificationReport extends State<NotificationReport> {
data
=
await
RemoteData
().
getNotificationReport
(
selectedDropdownItem
!,
'
${_selectedDate1.year}
-
$selectedmonth
-
$selectedday
'
);
if
(
data
.
statusCode
!=
200
)
{
Constants
(
'NotificationReport'
,
data
.
statusCode
.
toString
())
.
showAlertDialog
(
context
,
false
);
Constants
(
'NotificationReport'
,
data
.
statusCode
.
toString
()).
showAlertDialog
(
context
,
false
);
return
;
}
Navigator
.
of
(
context
).
pop
();
...
...
@@ -293,9 +292,9 @@ class _NotificationReport extends State<NotificationReport> {
width:
0
,
height:
15
,
),
Row
(
const
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
const
[
children:
[
Text
(
'Summary'
,
textAlign:
TextAlign
.
left
,
style:
Constants
.
headerfontStyle
),
...
...
@@ -411,9 +410,9 @@ class _NotificationReport extends State<NotificationReport> {
height:
15
,
width:
1
,
),
Row
(
const
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
const
[
children:
[
Text
(
'Details'
,
textAlign:
TextAlign
.
left
,
style:
Constants
.
headerfontStyle
),
...
...
@@ -449,8 +448,8 @@ class _NotificationReport extends State<NotificationReport> {
),
//color: Color.fromARGB(255, 123, 50, 254),
height:
40
,
child:
Row
(
children:
const
[
child:
const
Row
(
children:
[
Expanded
(
child:
Text
(
'REASON'
,
...
...
@@ -517,10 +516,11 @@ class _NotificationReport extends State<NotificationReport> {
width:
MediaQuery
.
of
(
context
).
size
.
width
/
4.3
,
// height: 40,
child:
Text
(
Constants
.
capitalizeFirstLetter
(
notificationslist
![
index
]
.
reason
.
toString
()
.
toLowerCase
(
),
.
toLowerCase
()
),
style:
Constants
.
headerlistitems
,
maxLines:
5
,
overflow:
TextOverflow
.
ellipsis
,
...
...
lib/Screens/Review.dart
View file @
c62a2345
...
...
@@ -16,7 +16,6 @@ import '../Services/RemoteData.dart';
import
'Constants.dart'
;
import
'ImageZoomin.dart'
;
class
Review
extends
StatefulWidget
{
//const Review({super.key});
final
String
message
;
...
...
@@ -407,8 +406,8 @@ class _Review extends State<Review> {
child:
Container
(
margin:
const
EdgeInsets
.
all
(
15.0
),
child:
Column
(
//crossAxisAlignment: CrossAxisAlignment.center
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
//
mainAxisAlignment: MainAxisAlignment.start,
children:
[
Container
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
10.0
),
...
...
lib/Services/NetworkApiServices.dart
View file @
c62a2345
pubspec.yaml
View file @
c62a2345
name
:
storemonitor
description
:
A new Flutter project.
publish_to
:
'
none'
# Remove this line if you wish to publish to pub.dev
publish_to
:
'
none'
version
:
1.0.4+4
environment
:
sdk
:
'
>=2.18.4
<3.0.0'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment