Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Santhosh
Agile24X7-Mobile-singledb
Commits
eb0043ca
Commit
eb0043ca
authored
3 years ago
by
tejaswi
Browse files
Options
Download
Email Patches
Plain Diff
All the Changes
parent
3dcf118c
image-upload
1 merge request
!2
WIP: Resolve "Image upload"
This commit is part of merge request
!2
. Comments created here will be created in the context of that merge request.
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/AdminComponets/AdminProjectReports.js
+37
-53
src/AdminComponets/AdminProjectReports.js
src/WebServices/RestClient.js
+6
-6
src/WebServices/RestClient.js
with
43 additions
and
59 deletions
+43
-59
src/AdminComponets/AdminProjectReports.js
Edit
View file @
eb0043ca
...
...
@@ -104,7 +104,7 @@ export default class AdminProjectReports extends Component {
displayedDate
:
moment
(),
startDate
:
moment
().
set
(
"
date
"
,
-
15
),
endDate
:
moment
().
set
(
"
date
"
,
15
),
selectedDays
:
[],
selectedWeeks
:
[],
select
:
''
...
...
@@ -156,32 +156,15 @@ export default class AdminProjectReports extends Component {
Reports
()
{
const
{
assignedto
,
sprintName
,
startDate
,
endDate
}
=
this
.
state
;
// alert("Test")
// alert("value:"+assignedto+"label:"+sprintName)
// alert("startDate :"+moment(this.state.startDate).format('YYYY-MM-DD[T]hh:mm:ss.SSS[Z]')+"endDate :"+moment(this.state.startDate).format('YYYY-MM-DD[T]hh:mm:ss.SSS[Z]'))
// const data = {
// "selectedOption":
// {
// "value": assignedto,
// "label": sprintName
// }
// }
const
filter
=
[{
startDate
:
moment
(
this
.
state
.
startDate
).
format
(
'
YYYY-MM-DD[T]hh:mm:ss.SSS[Z]
'
),
endDate
:
moment
(
this
.
state
.
endDate
).
format
(
'
YYYY-MM-DD[T]hh:mm:ss.SSS[Z]
'
),
const
filter
=
[{
startDate
:
moment
(
this
.
state
.
startDate
).
format
(
'
YYYY-MM-DD[T]hh:mm:ss.SSS[Z]
'
),
endDate
:
moment
(
this
.
state
.
endDate
).
format
(
'
YYYY-MM-DD[T]hh:mm:ss.SSS[Z]
'
),
"
key
"
:
"
selection
"
}]
// alert(JSON.stringify({data,filter}))
// {"data":{"selectedOption":
// {"value":"6b2218ba7636d07530aa63b3848656ba",
// "label":"Naveen Gade"}},"
// filter":[{"startDate":"2021-06-30T18:30:00.000Z",
// "endDate":"2021-07-30T18:30:00.000Z","key":"selection"}]}
// alert(JSON.stringify(filter1));
NetInfo
.
fetch
().
then
(
state
=>
{
if
(
state
.
type
==
"
none
"
)
{
Snackbar
.
show
({
...
...
@@ -191,21 +174,19 @@ export default class AdminProjectReports extends Component {
});
}
else
{
fetch
(
ReportsAPI
+
`
getAllCoun
t`
,
{
method
:
'
POS
T
'
,
fetch
(
ReportsAPI
+
`
projectRepor
t`
,
{
method
:
'
GE
T
'
,
headers
:
{
'
Accept
'
:
'
application/json
'
,
'
Content-Type
'
:
'
application/json
'
,
},
body
:
JSON
.
stringify
({
// data,
filter
})
}).
then
((
response
)
=>
response
.
json
())
.
then
((
responseJson
)
=>
{
// alert("data" + JSON.stringify(responseJson))
// alert(JSON.stringify(responseJson))
// alert("project reports" + JSON.stringify(responseJson))
// var sprintList = [];
// responseJson.map((sprints) => {
...
...
@@ -216,6 +197,10 @@ export default class AdminProjectReports extends Component {
// );
// })
// var employee = [];
// responseJson.map((x) => {
// return (x.name !== "admin@novisync.com" ? employee.push(x) : null);
// })
var
employee
=
[];
responseJson
.
map
((
x
)
=>
{
return
(
x
.
name
!==
"
admin@novisync.com
"
?
employee
.
push
(
x
)
:
null
);
...
...
@@ -223,13 +208,12 @@ export default class AdminProjectReports extends Component {
this
.
setState
({
dataSource
:
employee
,
},
function
()
{
}
);
//
alert("data "+JSON.stringify(this.state.
dataSource
)+"test")
alert
(
"
data
"
+
JSON
.
stringify
(
this
.
state
.
projectreports
)
+
"
test
"
)
}).
catch
((
error
)
=>
{
check
.
Maintenance
();
...
...
@@ -242,8 +226,8 @@ export default class AdminProjectReports extends Component {
});
}
render
()
{
const
{
assignedto
,
sprintName
,
startDate
,
endDate
,
displayedDate
}
=
this
.
state
;
...
...
@@ -339,10 +323,10 @@ export default class AdminProjectReports extends Component {
<
Image
style
=
{{
width
:
wp
(
'
8%
'
),
height
:
hp
(
'
4%
'
),
margin
:
5
}}
source
=
{
require
(
'
../Images/calender.jpeg
'
)}
/
>
<
/DateRangePicker
>
<
TouchableOpacity
style
=
{
styles
.
opensave
}
onPress
=
{()
=>
{
this
.
Reports
()
}}
>
<
Text
style
=
{{
color
:
'
white
'
,
padding
:
5
}}
>
Show
<
/Text
>
<
/TouchableOpacity
>
<
Text
style
=
{{
color
:
'
white
'
,
padding
:
5
}}
>
Show
<
/Text
>
<
/TouchableOpacity
>
<
/View
>
...
...
@@ -394,25 +378,25 @@ export default class AdminProjectReports extends Component {
<
DataTable
>
<
DataTable
.
Header
style
=
{{
backgroundColor
:
'
#333f50
'
,
color
:
"
white
"
}}
>
<
DataTable
.
Title
style
=
{{
width
:
200
}}
><
Text
style
=
{{
color
:
"
white
"
}}
>
EMPLOYEE_NAME
<
/Text></
DataTable
.
Title
>
<
DataTable
.
Title
style
=
{{
width
:
200
}}
><
Text
style
=
{{
color
:
"
white
"
}}
>
NO_OF_PROJECTS_INVOLVED
<
/Text></
DataTable
.
Title
>
<
DataTable
.
Title
style
=
{{
width
:
200
}}
><
Text
style
=
{{
color
:
"
white
"
}}
>
ASSIGNED_STORY_POINTS
<
/Text></
DataTable
.
Title
>
<
DataTable
.
Title
style
=
{{
width
:
100
}}
><
Text
style
=
{{
color
:
"
white
"
}}
>
PENDING
<
/Text></
DataTable
.
Title
>
<
DataTable
.
Title
style
=
{{
width
:
100
}}
><
Text
style
=
{{
color
:
"
white
"
}}
>
COMPLETED
<
/Text></
DataTable
.
Title
>
<
DataTable
.
Title
style
=
{{
width
:
200
}}
><
Text
style
=
{{
color
:
"
white
"
}}
>
Project
Name
<
/Text></
DataTable
.
Title
>
<
DataTable
.
Title
style
=
{{
width
:
200
}}
><
Text
style
=
{{
color
:
"
white
"
}}
>
No
of
total
Users
<
/Text></
DataTable
.
Title
>
<
DataTable
.
Title
style
=
{{
width
:
200
}}
><
Text
style
=
{{
color
:
"
white
"
}}
>
No
of
active
Users
<
/Text></
DataTable
.
Title
>
<
DataTable
.
Title
style
=
{{
width
:
100
}}
><
Text
style
=
{{
color
:
"
white
"
}}
>
No
of
inactive
Users
<
/Text></
DataTable
.
Title
>
<
DataTable
.
Title
style
=
{{
width
:
100
}}
><
Text
style
=
{{
color
:
"
white
"
}}
>
No
of
Working
Users
<
/Text></
DataTable
.
Title
>
<
/DataTable.Header
>
<
/DataTable
>
{
this
.
state
.
dataSource
.
length
!==
0
?
this
.
state
.
dataSource
.
map
((
item
,
index
)
=>
{
{
this
.
state
.
dataSource
.
map
((
item
,
index
)
=>
{
return
(
<
DataTable
>
<
DataTable
.
Row
style
=
{{
marginLeft
:
-
10
,}}
key
=
{
index
}
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
"
AdminReportsUser
"
,
{
emp_id
:
item
.
emp_id
,
name
:
item
.
name
,
projects_involved
:
item
.
data
[
0
].
projects_involved
,
startDate
:
this
.
state
.
startDate
,
endDate
:
this
.
state
.
endDate
})}
>
<
DataTable
.
Cell
style
=
{{
backgroundColor
:
'
#eaedf3
'
,
width
:
200
,
marginTop
:
15
}}
>
{
item
.
name
}
<
/DataTable.Cell
>
<
/TouchableOpacity
>
<
DataTable
.
Cell
style
=
{{
paddingLeft
:
20
,
width
:
200
}}
>
{
item
.
data
[
0
].
projects_involved
}
<
/DataTable.Cell
>
{
item
.
data
[
0
].
estimated
!==
null
?
<
DataTable
.
Cell
style
=
{{
width
:
200
}}
>
{
item
.
data
[
0
].
estimated
}
<
/DataTable.Cell> : <DataTable.Cell style={{ width: 200 }}>0</
DataTable
.
Cell
>
}
{
item
.
data
[
0
].
pending
!==
null
?
<
DataTable
.
Cell
style
=
{{
width
:
100
}}
>
{
item
.
data
[
0
].
pending
}
<
/DataTable.Cell> : <DataTable.Cell style={{ width: 100 }}>0</
DataTable
.
Cell
>
}
{
item
.
data
[
0
].
completed
!==
null
?
<
DataTable
.
Cell
style
=
{{
width
:
100
}}
>
{
item
.
data
[
0
].
completed
}
<
/DataTable.Cell> : <DataTable.Cell style={{ width: 100 }}>0</
DataTable
.
Cell
>
}
<
DataTable
.
Row
style
=
{{
marginLeft
:
-
10
,
}}
key
=
{
index
}
>
<
DataTable
.
Cell
style
=
{{
paddingLeft
:
20
,
width
:
200
}}
>
{
item
.
project_name
}
<
/DataTable.Cell
>
<
DataTable
.
Cell
style
=
{{
paddingLeft
:
20
,
width
:
200
}}
>
{
item
.
Total_users_per_project
}
<
/DataTable.Cell
>
<
DataTable
.
Cell
style
=
{{
width
:
200
}}
>
{
item
.
active_users_per_project
}
<
/DataTable.Cell>
<
DataTable
.
Cell
style
=
{{
width
:
200
}}
>
{
item
.
Inactive_users_per_project
}
<
/DataTable.Cell>
<
DataTable
.
Cell
style
=
{{
width
:
100
}}
>
{
item
.
Working_users_per_projects
}
<
/DataTable.Cell
>
<
/DataTable.Row
>
...
...
@@ -421,7 +405,7 @@ export default class AdminProjectReports extends Component {
)
})
:
null
}
})
}
<
/View
>
...
...
This diff is collapsed.
Click to expand it.
src/WebServices/RestClient.js
Edit
View file @
eb0043ca
/*****MySql********/
//pre production environment (development)
export
const
API
=
"
https://api-single.agile24x7.com/release/
"
;
export
const
ReportsAPI
=
"
https://testapiv2reporting.agile24x7.com/
"
;
export
const
Client_URL
=
"
https://sdtest.agile24x7.com/#/
"
;
//
export const API = "https://api-single.agile24x7.com/release/";
//
export const ReportsAPI = "https://testapiv2reporting.agile24x7.com/";
//
export const Client_URL = "https://sdtest.agile24x7.com/#/";
//production environment
// export const API = "https://api-single.agile24x7.com/Migration/";
...
...
@@ -15,9 +15,9 @@ export const Client_URL = "https://sdtest.agile24x7.com/#/";
//pre production environment (development)
//
export const API = "https://api-single.agile24x7.com/pg_migration/";
//
export const ReportsAPI = "https://pgtestreporting.agile24x7.com/";
//
export const Client_URL = "https://pgtest.agile24x7.com/#/";
export
const
API
=
"
https://api-single.agile24x7.com/pg_migration/
"
;
export
const
ReportsAPI
=
"
https://pgtestreporting.agile24x7.com/
"
;
export
const
Client_URL
=
"
https://pgtest.agile24x7.com/#/
"
;
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Projects
Groups
Snippets
Help