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
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
61 additions
and
58 deletions
+61
-58
CheckRegistration.dart
lib/Screens/CheckRegistration.dart
+9
-6
FootFall.dart
lib/Screens/FootFall.dart
+3
-2
Home.dart
lib/Screens/Home.dart
+0
-0
IssueVideos.dart
lib/Screens/IssueVideos.dart
+29
-29
LoginPage.dart
lib/Screens/LoginPage.dart
+1
-1
NotificationReport.dart
lib/Screens/NotificationReport.dart
+15
-15
Review.dart
lib/Screens/Review.dart
+2
-3
NetworkApiServices.dart
lib/Services/NetworkApiServices.dart
+1
-1
pubspec.yaml
pubspec.yaml
+1
-1
No files found.
lib/Screens/CheckRegistration.dart
View file @
c62a2345
...
@@ -16,7 +16,7 @@ class CheckRegistration extends StatefulWidget {
...
@@ -16,7 +16,7 @@ class CheckRegistration extends StatefulWidget {
class
_CheckRegistration
extends
State
<
CheckRegistration
>
{
class
_CheckRegistration
extends
State
<
CheckRegistration
>
{
final
TextEditingController
_empId
=
TextEditingController
();
final
TextEditingController
_empId
=
TextEditingController
();
late
final
ImagePicker
_picker
=
ImagePicker
();
late
final
ImagePicker
_picker
=
ImagePicker
();
XFile
?
image
;
XFile
?
image
;
File
?
newVideoFile
;
File
?
newVideoFile
;
var
store
=
''
;
var
store
=
''
;
...
@@ -143,7 +143,7 @@ class _CheckRegistration extends State<CheckRegistration> {
...
@@ -143,7 +143,7 @@ class _CheckRegistration extends State<CheckRegistration> {
if
(
image
!=
null
)
{
if
(
image
!=
null
)
{
File
file
=
File
(
image
!.
path
);
File
file
=
File
(
image
!.
path
);
String
filecontents
=
await
fileToString
(
file
);
//
String filecontents = await fileToString(file);
String
fileName
=
file
.
path
.
split
(
Platform
.
pathSeparator
).
last
;
String
fileName
=
file
.
path
.
split
(
Platform
.
pathSeparator
).
last
;
final
response
=
final
response
=
...
@@ -183,13 +183,14 @@ class _CheckRegistration extends State<CheckRegistration> {
...
@@ -183,13 +183,14 @@ class _CheckRegistration extends State<CheckRegistration> {
void
getValidReg
(
String
text
)
async
{
void
getValidReg
(
String
text
)
async
{
var
data
=
await
RemoteData
().
getValidEmp
(
text
);
var
data
=
await
RemoteData
().
getValidEmp
(
text
);
if
(
data
.
statusCode
!=
200
)
{
if
(
data
.
statusCode
!=
200
)
{
Constants
(
'Review'
,
data
.
statusCode
.
toString
())
Constants
(
'Review'
,
data
.
statusCode
.
toString
()).
showAlertDialog
(
context
,
false
);
.
showAlertDialog
(
context
,
false
);
return
;
return
;
}
}
Map
<
String
,
dynamic
>
responseMap
=
jsonDecode
(
data
.
body
);
Map
<
String
,
dynamic
>
responseMap
=
jsonDecode
(
data
.
body
);
CheckReg
checkReg
=
CheckReg
.
fromJson
(
responseMap
);
CheckReg
checkReg
=
CheckReg
.
fromJson
(
responseMap
);
print
(
'response:
$responseMap
'
);
if
(
kDebugMode
)
{
print
(
'response:
$responseMap
'
);
}
if
(
checkReg
.
status
==
'Success'
)
{
if
(
checkReg
.
status
==
'Success'
)
{
getVideo
(
text
);
getVideo
(
text
);
}
else
{
}
else
{
...
@@ -204,7 +205,9 @@ class _CheckRegistration extends State<CheckRegistration> {
...
@@ -204,7 +205,9 @@ class _CheckRegistration extends State<CheckRegistration> {
return
await
file
.
readAsString
();
return
await
file
.
readAsString
();
}
}
}
catch
(
e
)
{
}
catch
(
e
)
{
print
(
"Error reading file:
$e
"
);
if
(
kDebugMode
)
{
print
(
"Error reading file:
$e
"
);
}
}
}
return
''
;
return
''
;
}
}
...
...
lib/Screens/FootFall.dart
View file @
c62a2345
...
@@ -11,7 +11,8 @@ import 'Constants.dart';
...
@@ -11,7 +11,8 @@ import 'Constants.dart';
class
FootFall
extends
StatefulWidget
{
class
FootFall
extends
StatefulWidget
{
final
String
message
;
final
String
message
;
final
String
selecteddate
;
final
String
selecteddate
;
const
FootFall
({
super
.
key
,
required
this
.
message
,
required
this
.
selecteddate
});
const
FootFall
(
{
super
.
key
,
required
this
.
message
,
required
this
.
selecteddate
});
@override
@override
_FootFall
createState
()
=>
_FootFall
();
_FootFall
createState
()
=>
_FootFall
();
...
@@ -25,7 +26,7 @@ class _FootFall extends State<FootFall> {
...
@@ -25,7 +26,7 @@ class _FootFall extends State<FootFall> {
var
isMeeters
=
''
;
var
isMeeters
=
''
;
List
<
String
>?
storesList
;
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
@override
void
initState
()
{
void
initState
()
{
...
...
lib/Screens/Home.dart
View file @
c62a2345
This diff is collapsed.
Click to expand it.
lib/Screens/IssueVideos.dart
View file @
c62a2345
...
@@ -5,7 +5,7 @@ import 'package:permission_handler/permission_handler.dart';
...
@@ -5,7 +5,7 @@ import 'package:permission_handler/permission_handler.dart';
//import 'package:need_resume/need_resume.dart';
//import 'package:need_resume/need_resume.dart';
import
'package:shared_preferences/shared_preferences.dart'
;
import
'package:shared_preferences/shared_preferences.dart'
;
import
'package:storemonitor/Screens/Issue.dart'
;
import
'package:storemonitor/Screens/Issue.dart'
;
import
'package:storemonitor/Screens/
MyHomePage
.dart'
;
import
'package:storemonitor/Screens/
SurvellianceView
.dart'
;
import
'../Services/RemoteData.dart'
;
import
'../Services/RemoteData.dart'
;
import
'Constants.dart'
;
import
'Constants.dart'
;
...
@@ -263,35 +263,35 @@ class _IssueVideos extends State<IssueVideos> {
...
@@ -263,35 +263,35 @@ class _IssueVideos extends State<IssueVideos> {
child:
GestureDetector
(
child:
GestureDetector
(
onTap:
()
{
onTap:
()
{
requestStoragePermission
();
requestStoragePermission
();
//
Navigator.of(context)
Navigator
.
of
(
context
)
//
.push(
.
push
(
//
MaterialPageRoute(
MaterialPageRoute
(
//
builder: (_) => SurvellianceView(
builder:
(
_
)
=>
SurvellianceView
(
//
message: notificationslist![index]
message:
notificationslist
![
index
]
//
.VIDEOURL,
.
VIDEOURL
,
//
id: notificationslist![index]
id:
notificationslist
![
index
]
//
.VIDNOTID
.
VIDNOTID
//
.toString(),
.
toString
(),
//
comment: notificationslist![index]
comment:
notificationslist
![
index
]
//
.COMMENTS,
.
COMMENTS
,
//
desc: notificationslist![index]
desc:
notificationslist
![
index
]
//
.DESCRIPTION,
.
DESCRIPTION
,
//
store:
store:
//
notificationslist![index].STORE,
notificationslist
![
index
].
STORE
,
//
location: notificationslist![index]
location:
notificationslist
![
index
]
//
.LOCATION,
.
LOCATION
,
//
time: notificationslist![index]
time:
notificationslist
![
index
]
//
.TIMESTAMP,
.
TIMESTAMP
,
//
)),
)),
//
)
)
//
.then((val) => (val != null)
.
then
((
val
)
=>
(
val
!=
null
)
//
? (val
?
(
val
//
? getData(selectedDropdownItem!)
?
getData
(
selectedDropdownItem
!)
//
: true)
:
true
)
//
: false);
:
false
);
Navigator
.
of
(
context
).
push
(
MaterialPageRoute
(
//
Navigator.of(context).push(MaterialPageRoute(
builder:
(
_
)
=>
MyHomePage
()));
//
builder: (_) => MyHomePage()));
},
},
child:
Row
(
child:
Row
(
children:
[
children:
[
...
...
lib/Screens/LoginPage.dart
View file @
c62a2345
...
@@ -49,7 +49,7 @@ class LoginPage extends StatelessWidget {
...
@@ -49,7 +49,7 @@ class LoginPage extends StatelessWidget {
// 'assets/images/login_header_image.png',
// 'assets/images/login_header_image.png',
// height: 350,
// height: 350,
// width: 350,
// width: 350,
//
),
//),
const
SizedBox
(
height:
30
),
const
SizedBox
(
height:
30
),
const
LoginForm
(),
const
LoginForm
(),
],
],
...
...
lib/Screens/NotificationReport.dart
View file @
c62a2345
...
@@ -3,7 +3,6 @@ import 'dart:core';
...
@@ -3,7 +3,6 @@ import 'dart:core';
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:http/src/response.dart'
;
import
'package:http/src/response.dart'
;
import
'package:shared_preferences/shared_preferences.dart'
;
import
'package:shared_preferences/shared_preferences.dart'
;
//this below one is DateFormat Libray its not imported automatically
import
'package:intl/intl.dart'
;
import
'package:intl/intl.dart'
;
import
'../Models/Notifications.dart'
;
import
'../Models/Notifications.dart'
;
import
'../Services/RemoteData.dart'
;
import
'../Services/RemoteData.dart'
;
...
@@ -13,8 +12,9 @@ class NotificationReport extends StatefulWidget {
...
@@ -13,8 +12,9 @@ class NotificationReport extends StatefulWidget {
final
String
message
;
final
String
message
;
final
String
selecteddate
;
final
String
selecteddate
;
const
NotificationReport
({
super
.
key
,
required
this
.
message
,
required
this
.
selecteddate
});
const
NotificationReport
(
{
super
.
key
,
required
this
.
message
,
required
this
.
selecteddate
});
@override
@override
_NotificationReport
createState
()
=>
_NotificationReport
();
_NotificationReport
createState
()
=>
_NotificationReport
();
}
}
...
@@ -115,8 +115,7 @@ class _NotificationReport extends State<NotificationReport> {
...
@@ -115,8 +115,7 @@ class _NotificationReport extends State<NotificationReport> {
data
=
await
RemoteData
().
getNotificationReport
(
selectedDropdownItem
!,
data
=
await
RemoteData
().
getNotificationReport
(
selectedDropdownItem
!,
'
${_selectedDate1.year}
-
$selectedmonth
-
$selectedday
'
);
'
${_selectedDate1.year}
-
$selectedmonth
-
$selectedday
'
);
if
(
data
.
statusCode
!=
200
)
{
if
(
data
.
statusCode
!=
200
)
{
Constants
(
'NotificationReport'
,
data
.
statusCode
.
toString
())
Constants
(
'NotificationReport'
,
data
.
statusCode
.
toString
()).
showAlertDialog
(
context
,
false
);
.
showAlertDialog
(
context
,
false
);
return
;
return
;
}
}
Navigator
.
of
(
context
).
pop
();
Navigator
.
of
(
context
).
pop
();
...
@@ -293,9 +292,9 @@ class _NotificationReport extends State<NotificationReport> {
...
@@ -293,9 +292,9 @@ class _NotificationReport extends State<NotificationReport> {
width:
0
,
width:
0
,
height:
15
,
height:
15
,
),
),
Row
(
const
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
const
[
children:
[
Text
(
'Summary'
,
Text
(
'Summary'
,
textAlign:
TextAlign
.
left
,
textAlign:
TextAlign
.
left
,
style:
Constants
.
headerfontStyle
),
style:
Constants
.
headerfontStyle
),
...
@@ -411,9 +410,9 @@ class _NotificationReport extends State<NotificationReport> {
...
@@ -411,9 +410,9 @@ class _NotificationReport extends State<NotificationReport> {
height:
15
,
height:
15
,
width:
1
,
width:
1
,
),
),
Row
(
const
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
const
[
children:
[
Text
(
'Details'
,
Text
(
'Details'
,
textAlign:
TextAlign
.
left
,
textAlign:
TextAlign
.
left
,
style:
Constants
.
headerfontStyle
),
style:
Constants
.
headerfontStyle
),
...
@@ -449,8 +448,8 @@ class _NotificationReport extends State<NotificationReport> {
...
@@ -449,8 +448,8 @@ class _NotificationReport extends State<NotificationReport> {
),
),
//color: Color.fromARGB(255, 123, 50, 254),
//color: Color.fromARGB(255, 123, 50, 254),
height:
40
,
height:
40
,
child:
Row
(
child:
const
Row
(
children:
const
[
children:
[
Expanded
(
Expanded
(
child:
Text
(
child:
Text
(
'REASON'
,
'REASON'
,
...
@@ -517,10 +516,11 @@ class _NotificationReport extends State<NotificationReport> {
...
@@ -517,10 +516,11 @@ class _NotificationReport extends State<NotificationReport> {
width:
MediaQuery
.
of
(
context
).
size
.
width
/
4.3
,
width:
MediaQuery
.
of
(
context
).
size
.
width
/
4.3
,
// height: 40,
// height: 40,
child:
Text
(
child:
Text
(
notificationslist
![
index
]
Constants
.
capitalizeFirstLetter
(
.
reason
notificationslist
![
index
]
.
toString
()
.
reason
.
toLowerCase
(),
.
toString
()
.
toLowerCase
()),
style:
Constants
.
headerlistitems
,
style:
Constants
.
headerlistitems
,
maxLines:
5
,
maxLines:
5
,
overflow:
TextOverflow
.
ellipsis
,
overflow:
TextOverflow
.
ellipsis
,
...
...
lib/Screens/Review.dart
View file @
c62a2345
...
@@ -16,7 +16,6 @@ import '../Services/RemoteData.dart';
...
@@ -16,7 +16,6 @@ import '../Services/RemoteData.dart';
import
'Constants.dart'
;
import
'Constants.dart'
;
import
'ImageZoomin.dart'
;
import
'ImageZoomin.dart'
;
class
Review
extends
StatefulWidget
{
class
Review
extends
StatefulWidget
{
//const Review({super.key});
//const Review({super.key});
final
String
message
;
final
String
message
;
...
@@ -407,8 +406,8 @@ class _Review extends State<Review> {
...
@@ -407,8 +406,8 @@ class _Review extends State<Review> {
child:
Container
(
child:
Container
(
margin:
const
EdgeInsets
.
all
(
15.0
),
margin:
const
EdgeInsets
.
all
(
15.0
),
child:
Column
(
child:
Column
(
//crossAxisAlignment: CrossAxisAlignment.center
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
//
mainAxisAlignment: MainAxisAlignment.start,
children:
[
children:
[
Container
(
Container
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
10.0
),
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
10.0
),
...
...
lib/Services/NetworkApiServices.dart
View file @
c62a2345
...
@@ -16,7 +16,7 @@ class NetworkApiServices extends BaseApiServices {
...
@@ -16,7 +16,7 @@ class NetworkApiServices extends BaseApiServices {
}
on
SocketException
{
}
on
SocketException
{
throw
FetchDataException
(
'No Internet Connection'
);
throw
FetchDataException
(
'No Internet Connection'
);
}
}
return
responseJson
;
return
responseJson
;
}
}
...
...
pubspec.yaml
View file @
c62a2345
name
:
storemonitor
name
:
storemonitor
description
:
A new Flutter project.
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
version
:
1.0.4+4
environment
:
environment
:
sdk
:
'
>=2.18.4
<3.0.0'
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