Skip to content
GitLab
Menu
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
80a33bbd
Commit
80a33bbd
authored
3 years ago
by
tejaswi
Browse files
Options
Download
Email Patches
Plain Diff
User dashboard screen
parent
bce0939d
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
src/CommonComponents/AdminChat.js
+2
-2
src/CommonComponents/AdminChat.js
src/UserComponents/UserDashboard.js
+195
-9
src/UserComponents/UserDashboard.js
src/UserComponents/UserPendingMyTask.js
+2
-2
src/UserComponents/UserPendingMyTask.js
src/UserComponents/UserRoadblocksAssigned.js
+79
-89
src/UserComponents/UserRoadblocksAssigned.js
src/UserComponents/UserRoadblocksTobeAssigned.js
+10
-29
src/UserComponents/UserRoadblocksTobeAssigned.js
src/WebServices/RestClient.js
+6
-6
src/WebServices/RestClient.js
with
294 additions
and
137 deletions
+294
-137
src/CommonComponents/AdminChat.js
View file @
80a33bbd
...
@@ -690,7 +690,7 @@ export default class AdminChat extends Component {
...
@@ -690,7 +690,7 @@ export default class AdminChat extends Component {
}
}
);
);
//
this.arrayholder = responseJson.data;
this
.
arrayholder
=
responseJson
.
data
;
})
})
.
catch
((
error
)
=>
{
.
catch
((
error
)
=>
{
check
.
Maintenance
();
check
.
Maintenance
();
...
@@ -742,7 +742,7 @@ export default class AdminChat extends Component {
...
@@ -742,7 +742,7 @@ export default class AdminChat extends Component {
const
empStatus
=
item
.
empStatus
.
toUpperCase
()
const
empStatus
=
item
.
empStatus
.
toUpperCase
()
const
empStatus1
=
text
.
toUpperCase
()
const
empStatus1
=
text
.
toUpperCase
()
//const designation = item.designation.toUpperCase()
//const designation = item.designation.toUpperCase()
const
designation1
=
text
.
toUpperCase
()
//
const designation1 = text.toUpperCase()
const
email
=
item
.
email
.
toUpperCase
()
const
email
=
item
.
email
.
toUpperCase
()
const
email1
=
text
.
toUpperCase
()
const
email1
=
text
.
toUpperCase
()
const
mobileNumber
=
item
.
mobileNumber
.
toUpperCase
()
const
mobileNumber
=
item
.
mobileNumber
.
toUpperCase
()
...
...
This diff is collapsed.
Click to expand it.
src/UserComponents/UserDashboard.js
View file @
80a33bbd
...
@@ -57,6 +57,8 @@ export default class UserDashboard extends Component {
...
@@ -57,6 +57,8 @@ export default class UserDashboard extends Component {
abc
:
[],
abc
:
[],
squadName
:
''
,
squadName
:
''
,
dataSource2
:
[],
dataSource2
:
[],
allMessagesUser
:
[],
allMessages
:
[],
}
}
...
@@ -65,6 +67,10 @@ export default class UserDashboard extends Component {
...
@@ -65,6 +67,10 @@ export default class UserDashboard extends Component {
// console.warn("squadname" + this.state.squadName);
// console.warn("squadname" + this.state.squadName);
// });
// });
AsyncStorage
.
getItem
(
"
userToken
"
,
(
err
,
res
)
=>
{
this
.
setState
({
empId
:
res
});
})
}
}
moveUp
=
()
=>
this
.
setState
({
offset
:
-
110
});
moveUp
=
()
=>
this
.
setState
({
offset
:
-
110
});
...
@@ -86,6 +92,7 @@ export default class UserDashboard extends Component {
...
@@ -86,6 +92,7 @@ export default class UserDashboard extends Component {
});
});
}
}
...
@@ -128,6 +135,8 @@ export default class UserDashboard extends Component {
...
@@ -128,6 +135,8 @@ export default class UserDashboard extends Component {
this
.
GetStatus
();
this
.
GetStatus
();
this
.
getMessages
();
this
.
getMessages
();
this
.
getAllUserMessages
();
this
.
getAllTaskMessages
();
}
}
...
@@ -376,6 +385,148 @@ export default class UserDashboard extends Component {
...
@@ -376,6 +385,148 @@ export default class UserDashboard extends Component {
});
});
});
});
}
}
getAllUserMessages
()
{
log
(
"
Info
"
,
"
getMessages(role, userToken, cropcode) is used getting task related messages
"
);
// const groupId = this.state.subtaskId;
// console.warn("getmessages");
AsyncStorage
.
multiGet
([
"
cropcode
"
,
"
userToken
"
],
(
err
,
response
)
=>
{
const
cropcode
=
response
[
0
][
1
];
const
userToken
=
response
[
1
][
1
];
this
.
setState
({
userid
:
userToken
});
// console.warn("userToken"+userToken)
// console.warn("cropcode"+cropcode)
NetInfo
.
fetch
().
then
(
state
=>
{
if
(
state
.
type
==
"
none
"
)
{
log
(
"
Warn
"
,
"
No internet connection
"
);
Snackbar
.
show
({
title
:
'
No Internet Connection
'
,
backgroundColor
:
'
red
'
,
duration
:
Snackbar
.
LENGTH_LONG
,
});
}
else
{
fetch
(
API
+
"
user_chat.php
"
,
{
method
:
'
POST
'
,
headers
:
{
Accept
:
'
application/json
'
,
'
Content-Type
'
:
'
application/json
'
,
},
body
:
JSON
.
stringify
({
action
:
"
get_all_messages_dash
"
,
// corp_code: cropcode,
sendBy
:
userToken
,
})
})
.
then
((
response
)
=>
response
.
json
())
.
then
((
responseJson
)
=>
{
// console.warn("Messages For chat application" + JSON.stringify(responseJson.data));
// console.warn("Messages from users" + JSON.stringify(responseJson))
// console.warn("Send By Name" + JSON.stringify(responseJson.data))
// alert(JSON.stringify(responseJson.data))
if
(
responseJson
.
status
===
'
True
'
)
{
// console.warn("Setted Data")
this
.
setState
({
allMessagesUser
:
responseJson
.
data
,
});
// console.warn("Method data" + responseJson.data.sendBy)
}
else
{
// console.warn("Empty Data")
this
.
setState
({
allMessagesUser
:
[],
});
}
})
.
catch
((
error
)
=>
{
console
.
error
(
error
);
log
(
"
Error
"
,
"
getting task related messages error
"
);
});
}
});
});
}
getAllTaskMessages
()
{
log
(
"
Info
"
,
"
getMessages(role, userToken, cropcode) is used getting task related messages
"
);
AsyncStorage
.
multiGet
([
"
cropcode
"
,
"
userToken
"
],
(
err
,
response
)
=>
{
const
cropcode
=
response
[
0
][
1
];
const
userToken
=
response
[
1
][
1
];
this
.
setState
({
userid
:
userToken
});
NetInfo
.
fetch
().
then
(
state
=>
{
if
(
state
.
type
==
"
none
"
)
{
log
(
"
Warn
"
,
"
No internet connection
"
);
Snackbar
.
show
({
title
:
'
No Internet Connection
'
,
backgroundColor
:
'
red
'
,
duration
:
Snackbar
.
LENGTH_LONG
,
});
}
else
{
fetch
(
API
+
"
user_story_chat.php
"
,
{
method
:
'
POST
'
,
headers
:
{
Accept
:
'
application/json
'
,
'
Content-Type
'
:
'
application/json
'
,
},
body
:
JSON
.
stringify
({
action
:
"
getAllTaskMessagesDash
"
,
// corp_code: cropcode,
sendBy
:
userToken
,
})
})
.
then
((
response
)
=>
response
.
json
())
.
then
((
responseJson
)
=>
{
// console.warn("Messages For chat application" + JSON.stringify(responseJson.data));
// console.warn("Messages from users" + JSON.stringify(responseJson))
// console.warn("Send By Name" + JSON.stringify(responseJson.data))
// alert(JSON.stringify(responseJson.data))
if
(
responseJson
.
status
===
'
True
'
)
{
// console.warn("Setted Data")
this
.
setState
({
allMessages
:
responseJson
.
data
,
});
// console.warn("Method data" + responseJson.data.sendBy)
}
else
{
// console.warn("Empty Data")
this
.
setState
({
allMessages
:
[],
});
}
})
.
catch
((
error
)
=>
{
console
.
error
(
error
);
log
(
"
Error
"
,
"
getting task related messages error
"
);
});
}
});
});
}
...
@@ -404,9 +555,37 @@ export default class UserDashboard extends Component {
...
@@ -404,9 +555,37 @@ export default class UserDashboard extends Component {
// this.props.navigation.navigate("AdminChat");
// this.props.navigation.navigate("AdminChat");
this
.
props
.
navigation
.
push
(
"
AdminChat
"
);
this
.
props
.
navigation
.
push
(
"
AdminChat
"
);
}
}
render
()
{
render
()
{
const
getMessagesCount
=
(
p_id
,
msg
,
empId
,
userMsg
)
=>
{
const
msgCount
=
msg
.
filter
(
message
=>
message
.
readBy
.
split
(
"
,
"
).
indexOf
(
empId
)
===
-
1
&&
(
message
.
messagedBy
!==
empId
&&
message
.
project_id
===
p_id
)).
map
((
messages
,
i
)
=>
{
return
i
,
messages
})
const
msgCountUser
=
userMsg
.
filter
(
message
=>
message
.
project_id
===
p_id
).
map
((
messagess
,
index
)
=>
{
return
index
,
messagess
})
// console.warn("iiiiiiii" + id)
// console.warn("msgcount" + msgCount)
// console.warn("msgCountUser" + msgCountUser)
return
(
<
View
style
=
{{
flexDirection
:
'
row
'
,
backgroundColor
:
'
whitesmoke
'
,
flex
:
1
}}
>
{
msgCount
.
length
+
msgCountUser
.
length
>
0
?
(
<
View
style
=
{{
flexDirection
:
'
row
'
,
textAlign
:
'
right
'
}}
>
<
Text
style
=
{{
color
:
'
black
'
,
fontWeight
:
'
bold
'
}}
>
Messages
<
/Text
>
<
Text
style
=
{{
color
:
'
red
'
,
}}
>
{
msgCount
.
length
+
msgCountUser
.
length
>
0
?
msgCount
.
length
+
msgCountUser
.
length
:
null
}
<
/Text
>
<
/View>
)
: <Text></
Text
>
}
<
/View
>
)
}
if
(
this
.
state
.
isLoading
)
{
if
(
this
.
state
.
isLoading
)
{
return
(
return
(
...
@@ -431,20 +610,27 @@ export default class UserDashboard extends Component {
...
@@ -431,20 +610,27 @@ export default class UserDashboard extends Component {
borderBottomColor
:
'
#ffffff
'
,
borderBottomColor
:
'
#ffffff
'
,
justifyContent
:
'
space-between
'
,
justifyContent
:
'
space-between
'
,
}}
>
}}
>
<
View
style
=
{{
marginTop
:
20
,
flexDirection
:
'
row
'
}}
>
<
TouchableOpacity
onPress
=
{
this
.
openModal
}
>
<
Image
style
=
{{
width
:
25
,
height
:
25
}}
source
=
{
require
(
'
../Images/add.png
'
)}
/
>
<
View
style
=
{{
marginTop
:
20
,
flexDirection
:
'
row
'
}}
>
<
Image
style
=
{{
width
:
25
,
height
:
25
}}
source
=
{
require
(
'
../Images/add.png
'
)}
/
>
<
TouchableOpacity
onPress
=
{
this
.
openModal
}
>
<
Text
style
=
{{
width
:
150
,
borderRadius
:
20
,
height
:
45
,
flexDirection
:
'
row
'
,
color
:
'
white
'
,
padding
:
5
}}
>
<
Text
style
=
{{
width
:
150
,
borderRadius
:
20
,
height
:
45
,
flexDirection
:
'
row
'
,
color
:
'
white
'
,
padding
:
5
}}
>
Add
New
Project
Add
New
Project
<
/Text
>
<
/Text
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
<
/TouchableOpacity
>
<
View
style
=
{{
flexDirection
:
'
row
'
}}
>
<
TouchableOpacity
style
=
{{
marginTop
:
20
,
marginLeft
:
18
}}
onPress
=
{()
=>
{
this
.
AdminChat
()
}}
>
<
View
style
=
{{
flexDirection
:
'
row
'
,
marginTop
:
20
,
}}
>
<
View
style
=
{{
marginRight
:
2
,
}}
>
<
Text
style
=
{{
color
:
'
white
'
}}
>
{
this
.
state
.
dataSource2
.
length
}
<
/Text
>
<
Text
style
=
{{
color
:
'
white
'
}}
>
{
this
.
state
.
dataSource2
.
length
}
<
/Text
>
<
Image
style
=
{{
width
:
25
,
height
:
25
,
color
:
'
white
'
}}
source
=
{
require
(
'
../Images/chat.png
'
)}
/
>
<
/View
>
<
TouchableOpacity
onPress
=
{()
=>
{
this
.
AdminChat
()
}}
>
<
View
>
<
Image
style
=
{{
width
:
25
,
height
:
25
,
color
:
'
white
'
}}
source
=
{
require
(
'
../Images/chat.png
'
)}
/
>
<
/View
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
<
View
style
=
{{
marginTop
:
20
,
flexDirection
:
'
row
'
}}
>
<
View
style
=
{{
marginTop
:
20
,
flexDirection
:
'
row
'
}}
>
...
@@ -497,7 +683,7 @@ export default class UserDashboard extends Component {
...
@@ -497,7 +683,7 @@ export default class UserDashboard extends Component {
// onPress={() => this.props.navigation.navigate('UserMyTask', { id: projects.id,squadName: projects.value, })}
// onPress={() => this.props.navigation.navigate('UserMyTask', { id: projects.id,squadName: projects.value, })}
>
>
<
DataTable
.
Cell
style
=
{{
backgroundColor
:
projects
.
color
,
width
:
'
92%
'
,
height
:
150
,
marginTop
:
5
,
marginBottom
:
15
,
justifyContent
:
'
center
'
}}
><
Text
style
=
{{
color
:
'
black
'
,
}}
>
{
projects
.
value
}
<
/Text></
DataTable
.
Cell
>
<
DataTable
.
Cell
style
=
{{
backgroundColor
:
projects
.
color
,
width
:
'
92%
'
,
height
:
150
,
marginTop
:
5
,
marginBottom
:
15
,
justifyContent
:
'
center
'
}}
><
Text
style
=
{{
color
:
'
black
'
,
}}
>
{
projects
.
value
}
<
/Text></
DataTable
.
Cell
>
{
getMessagesCount
(
projects
.
id
,
this
.
state
.
allMessages
,
this
.
state
.
empId
,
this
.
state
.
allMessagesUser
)}
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
/DataTable.Row
>
<
/DataTable.Row
>
...
...
This diff is collapsed.
Click to expand it.
src/UserComponents/UserPendingMyTask.js
View file @
80a33bbd
...
@@ -1283,10 +1283,10 @@ updateActiveTaskStatus1 = (todoStoryId,assignedTo,inProgressStoryId) => {
...
@@ -1283,10 +1283,10 @@ updateActiveTaskStatus1 = (todoStoryId,assignedTo,inProgressStoryId) => {
.
then
((
responseJson
)
=>
{
.
then
((
responseJson
)
=>
{
console
.
warn
(
responseJson
)
console
.
warn
(
responseJson
)
if
(
responseJson
.
status
===
'
true
'
)
{
if
(
responseJson
.
status
===
'
true
'
)
{
alert
(
responseJson
.
message
)
//
alert(responseJson.message)
this
.
addCommentUserStory
(
message
,
todoStoryId
,
"
1
"
)
this
.
addCommentUserStory
(
message
,
todoStoryId
,
"
1
"
)
//
alert("Success");
alert
(
"
Updated
Success
fully
"
);
}
else
{
}
else
{
new
Pending
().
onRefresh
();
new
Pending
().
onRefresh
();
...
...
This diff is collapsed.
Click to expand it.
src/UserComponents/UserRoadblocksAssigned.js
View file @
80a33bbd
...
@@ -25,7 +25,7 @@ import {
...
@@ -25,7 +25,7 @@ import {
SkypeIndicator
,
SkypeIndicator
,
UIActivityIndicator
UIActivityIndicator
}
from
'
react-native-indicators
'
;
}
from
'
react-native-indicators
'
;
import
{
SUBTASK
,
DESCRIPTION
,
ASSIGNED_TO
,
ASSIGNED_BY
,
ROADBLOCK_DATE
,
MODIFY
,
PRIORITY
,
SEVERITY
,
TARGET_DATE
,
ASSIGNED_DATE
}
from
'
../CommonComponents/Header
'
;
import
{
SUBTASK
,
DESCRIPTION
,
ASSIGNED_TO
,
ASSIGNED_BY
,
ROADBLOCK_DATE
,
MODIFY
,
PRIORITY
,
SEVERITY
,
TARGET_DATE
,
ASSIGNED_DATE
}
from
'
../CommonComponents/Header
'
;
import
{
Collapse
,
CollapseHeader
,
CollapseBody
}
from
"
accordion-collapse-react-native
"
;
import
{
Collapse
,
CollapseHeader
,
CollapseBody
}
from
"
accordion-collapse-react-native
"
;
...
@@ -134,14 +134,14 @@ class ListItem extends React.Component {
...
@@ -134,14 +134,14 @@ class ListItem extends React.Component {
return
(
return
(
<
View
>
<
View
>
{
/* <Collapse style={styles.container}>
{
/* <Collapse style={styles.container}>
<CollapseHeader style={styles.boxheader}> */
}
<CollapseHeader style={styles.boxheader}> */
}
<
View
style
=
{
styles
.
container
}
>
<
View
style
=
{
styles
.
container
}
>
<
View
style
=
{
styles
.
boxheader
}
>
<
View
style
=
{
styles
.
boxheader
}
>
<
TouchableOpacity
activeOpacity
=
{
0.8
}
onPress
=
{
this
.
changeLayout
}
>
<
TouchableOpacity
activeOpacity
=
{
0.8
}
onPress
=
{
this
.
changeLayout
}
>
<
View
style
=
{{
flexDirection
:
'
row
'
}}
>
<
View
style
=
{{
flexDirection
:
'
row
'
}}
>
<
View
style
=
{{
flexDirection
:
'
row
'
,
width
:
wp
(
'
70%
'
)
}}
>
<
View
style
=
{{
flexDirection
:
'
row
'
,
width
:
wp
(
'
70%
'
)
}}
>
<
Text
style
=
{
styles
.
signUpText0
}
>
User
Story
Id
:
<
/Text
>
<
Text
style
=
{
styles
.
signUpText0
}
>
User
Story
Id
:
<
/Text
>
<
Text
style
=
{
styles
.
signUpText1
}
>
{(
this
.
props
.
cropcode
).
substring
(
0
,
3
).
toUpperCase
()}:{
item
.
story_id
.
substring
(
0
,
5
).
toUpperCase
()}
-
{
item
.
subtaskname
}
<
/Text
>
<
Text
style
=
{
styles
.
signUpText1
}
>
{(
this
.
props
.
cropcode
).
substring
(
0
,
3
).
toUpperCase
()}:{
item
.
story_id
.
substring
(
0
,
5
).
toUpperCase
()}
-
{
item
.
subtaskname
}
<
/Text
>
<
/View
>
<
/View
>
...
@@ -174,7 +174,7 @@ class ListItem extends React.Component {
...
@@ -174,7 +174,7 @@ class ListItem extends React.Component {
<
/View
>
<
/View
>
{
/* </CollapseHeader> */
}
{
/* </CollapseHeader> */
}
<
View
style
=
{{
height
:
this
.
state
.
expanded
?
null
:
0
,
overflow
:
'
hidden
'
}}
>
<
View
style
=
{{
height
:
this
.
state
.
expanded
?
null
:
0
,
overflow
:
'
hidden
'
}}
>
<
CollapseBody
style
=
{{
backgroundColor
:
'
white
'
,}}
>
<
CollapseBody
style
=
{{
backgroundColor
:
'
white
'
,
}}
>
<
View
style
=
{{
flexDirection
:
'
row
'
,
paddingRight
:
25
,
width
:
wp
(
'
90%
'
)
}}
>
<
View
style
=
{{
flexDirection
:
'
row
'
,
paddingRight
:
25
,
width
:
wp
(
'
90%
'
)
}}
>
...
@@ -242,10 +242,10 @@ class ListItem extends React.Component {
...
@@ -242,10 +242,10 @@ class ListItem extends React.Component {
<Text style={styles.signUpText000} >{TARGET_DATE}:</Text>
<Text style={styles.signUpText000} >{TARGET_DATE}:</Text>
<Text style={styles.signUpText111} >{item.target_date}</Text>
<Text style={styles.signUpText111} >{item.target_date}</Text>
{/* <Text style={styles.signUpText1} >{item.date}</Text> */
}
{/* <Text style={styles.signUpText1} >{item.date}</Text> */
}
{
/* </View> */
}
{
/* </View> */
}
{
/* <Text style={styles.signUpText002} >Updated On:0000-00-00 00:00:00 </Text> */
}
{
/* <Text style={styles.signUpText002} >Updated On:0000-00-00 00:00:00 </Text> */
}
{
/* </View> */
}
{
/* </View> */
}
{
/* <View style={{ flexDirection: 'row', justifyContent: 'flex-end', alignItems: 'center' }}>
{
/* <View style={{ flexDirection: 'row', justifyContent: 'flex-end', alignItems: 'center' }}>
...
@@ -368,7 +368,7 @@ export default class Assigned extends Component {
...
@@ -368,7 +368,7 @@ export default class Assigned extends Component {
//navigate to ModifySubtask
//navigate to ModifySubtask
this
.
props
.
navigation
.
navigate
(
'
ModifyRoadblock
'
,
{
this
.
props
.
navigation
.
navigate
(
'
ModifyRoadblock
'
,
{
callHome
:
this
.
userCompletedMyTasks
.
bind
(
this
),
callHome
:
this
.
userCompletedMyTasks
.
bind
(
this
),
subtaskid
:
item
.
subTaskId
,
roadblockId
:
item
.
sno
,
subTaskName
:
item
.
subTaskName
,
priorityLevel
:
item
.
priorityLevel
,
severityLevel
:
item
.
severityLevel
,
description
:
item
.
roadBlockDescription
,
requested
:
item
.
requestedBy
,
person
:
item
.
assignedTo
,
subtaskid
:
item
.
subTaskId
,
roadblockId
:
item
.
sno
,
subTaskName
:
item
.
subTaskName
,
priorityLevel
:
item
.
priorityLevel
,
severityLevel
:
item
.
severityLevel
,
description
:
item
.
roadBlockDescription
,
requested
:
item
.
requestedBy
,
person
:
item
.
assignedTo
,
name
:
item
.
assignedBy
,
subTaskId
:
item
.
subTaskId
,
days
:
days
,
hours
:
hours
name
:
item
.
assignedBy
,
subTaskId
:
item
.
subTaskId
,
days
:
days
,
hours
:
hours
});
});
...
@@ -384,69 +384,69 @@ export default class Assigned extends Component {
...
@@ -384,69 +384,69 @@ export default class Assigned extends Component {
AsyncStorage
.
getItem
(
"
projectId
"
,
(
err
,
res
)
=>
{
AsyncStorage
.
getItem
(
"
projectId
"
,
(
err
,
res
)
=>
{
const
projectId
=
res
;
const
projectId
=
res
;
AsyncStorage
.
getItem
(
"
emp_role
"
,
(
err
,
res
)
=>
{
AsyncStorage
.
getItem
(
"
emp_role
"
,
(
err
,
res
)
=>
{
const
emp_role
=
res
;
const
emp_role
=
res
;
//Checking the Internet Connection
//Checking the Internet Connection
NetInfo
.
fetch
().
then
(
state
=>
{
NetInfo
.
fetch
().
then
(
state
=>
{
if
(
state
.
type
==
"
none
"
||
state
.
type
==
'
unknown
'
)
{
if
(
state
.
type
==
"
none
"
||
state
.
type
==
'
unknown
'
)
{
console
.
log
(
state
.
type
);
console
.
log
(
state
.
type
);
Snackbar
.
show
({
Snackbar
.
show
({
title
:
'
No Internet Connection
'
,
title
:
'
No Internet Connection
'
,
backgroundColor
:
'
red
'
,
backgroundColor
:
'
red
'
,
duration
:
Snackbar
.
LENGTH_LONG
,
duration
:
Snackbar
.
LENGTH_LONG
,
});
}
else
{
fetch
(
API
+
'
manage_roadblocks.php
'
,
{
method
:
'
POST
'
,
headers
:
{
Accept
:
'
application/json
'
,
'
Content-Type
'
:
'
application/json
'
,
},
body
:
JSON
.
stringify
({
crop
:
cropcode
,
action
:
"
assignedroadblocks
"
,
projectId
:
projectId
// userType: emp_role,
// empId: empId
})
})
.
then
((
response
)
=>
response
.
json
())
.
then
((
responseJson
)
=>
{
console
.
log
(
responseJson
);
console
.
warn
(
responseJson
);
// alert(JSON.stringify(responseJson.data))
if
(
responseJson
.
status
===
'
True
'
)
{
this
.
setState
({
isLoading
:
false
,
dataSource
:
responseJson
.
data
,
isFetching
:
false
},
function
()
{
});
this
.
arrayholder
=
responseJson
.
data
;
}
else
{
log
(
"
Info
"
,
"
no completed my tasks at user side
"
);
this
.
arrayholder
=
[];
this
.
setState
({
isLoading
:
false
,
})
Snackbar
.
show
({
title
:
'
No Completed Subtasks
'
,
backgroundColor
:
'
#3BB9FF
'
,
duration
:
Snackbar
.
LENGTH_LONG
,
});
}
})
.
catch
((
error
)
=>
{
console
.
error
(
error
);
log
(
"
Error
"
,
"
Error in getting of completed my tasks at user side
"
);
});
});
}
else
{
fetch
(
API
+
'
manage_roadblocks.php
'
,
{
method
:
'
POST
'
,
headers
:
{
Accept
:
'
application/json
'
,
'
Content-Type
'
:
'
application/json
'
,
},
body
:
JSON
.
stringify
({
crop
:
cropcode
,
action
:
"
assignedroadblocks
"
,
projectId
:
projectId
// userType: emp_role,
// empId: empId
})
})
.
then
((
response
)
=>
response
.
json
())
.
then
((
responseJson
)
=>
{
console
.
log
(
responseJson
);
console
.
warn
(
responseJson
);
// alert(JSON.stringify(responseJson.data))
if
(
responseJson
.
status
===
'
True
'
)
{
this
.
setState
({
isLoading
:
false
,
dataSource
:
responseJson
.
data
,
isFetching
:
false
},
function
()
{
});
this
.
arrayholder
=
responseJson
.
data
;
}
else
{
log
(
"
Info
"
,
"
no completed my tasks at user side
"
);
this
.
arrayholder
=
[];
this
.
setState
({
isLoading
:
false
,
})
Snackbar
.
show
({
title
:
'
No Completed Subtasks
'
,
backgroundColor
:
'
#3BB9FF
'
,
duration
:
Snackbar
.
LENGTH_LONG
,
});
}
})
.
catch
((
error
)
=>
{
console
.
error
(
error
);
log
(
"
Error
"
,
"
Error in getting of completed my tasks at user side
"
);
});
}
}
});
});
});
});
});
});
...
@@ -473,34 +473,24 @@ export default class Assigned extends Component {
...
@@ -473,34 +473,24 @@ export default class Assigned extends Component {
// const subTaskId1 = text.toUpperCase()
// const subTaskId1 = text.toUpperCase()
const
r_id
=
item
.
r_id
.
toUpperCase
()
const
r_id
=
item
.
r_id
.
toUpperCase
()
const
r_id1
=
text
.
toUpperCase
()
const
r_id1
=
text
.
toUpperCase
()
const
subTaskName
=
item
.
subTaskName
.
toUpperCase
()
const
subTaskName1
=
text
.
toUpperCase
()
const
roadblock_description
=
item
.
roadblock_description
.
toUpperCase
()
const
roadblock_description
=
item
.
roadblock_description
.
toUpperCase
()
const
roadblock_description1
=
text
.
toUpperCase
()
const
roadblock_description1
=
text
.
toUpperCase
()
const
status
=
item
.
status
.
toUpperCase
()
const
status
=
item
.
status
.
toUpperCase
()
const
status1
=
text
.
toUpperCase
()
const
status1
=
text
.
toUpperCase
()
const
assignedTo
=
item
.
assignedTo
.
toUpperCase
()
const
assignedTo1
=
text
.
toUpperCase
()
const
roadblock_date
=
item
.
roadblock_date
.
toUpperCase
()
const
roadblock_date1
=
text
.
toUpperCase
()
const
assignedBy
=
item
.
assignedBy
.
toUpperCase
()
const
assignedBy1
=
text
.
toUpperCase
()
const
assigned_date
=
item
.
assigned_date
.
toUpperCase
()
const
assigned_date
=
item
.
assigned_date
.
toUpperCase
()
const
assigned_date1
=
text
.
toUpperCase
()
const
assigned_date1
=
text
.
toUpperCase
()
const
target_date
=
item
.
target_date
.
toUpperCase
()
const
assignedto
=
item
.
assignedto
.
toUpperCase
()
const
target_date1
=
text
.
toUpperCase
()
const
assignedto1
=
text
.
toUpperCase
()
return
r_id
.
indexOf
(
r_id1
)
>
-
1
||
const
assignedby
=
item
.
assignedby
.
toUpperCase
()
const
assignedby1
=
text
.
toUpperCase
()
subTaskName
.
indexOf
(
subTaskName
1
)
>
-
1
||
return
r_id
.
indexOf
(
r_id
1
)
>
-
1
||
roadblock_description
.
indexOf
(
roadblock_description1
)
>
-
1
||
roadblock_description
.
indexOf
(
roadblock_description1
)
>
-
1
||
target_date
.
indexOf
(
target_date1
)
>
-
1
||
status
.
indexOf
(
status1
)
>
-
1
||
status
.
indexOf
(
status1
)
>
-
1
||
assigned_date
.
indexOf
(
assigned_date1
)
>
-
1
||
assignedto
.
indexOf
(
assignedto1
)
>
-
1
||
assignedBy
.
indexOf
(
assignedBy1
)
>
-
1
assignedby
.
indexOf
(
assignedby1
)
>
-
1
||
assignedTo
.
indexOf
(
assignedTo1
)
>
-
1
||
assigned_date
.
indexOf
(
assigned_date1
)
>
-
1
targetDate
.
indexOf
(
targetDate1
)
>
-
1
// dependencyTitle.indexOf(dependencyTitle1) > -1
})
})
this
.
setState
({
this
.
setState
({
...
@@ -521,7 +511,7 @@ export default class Assigned extends Component {
...
@@ -521,7 +511,7 @@ export default class Assigned extends Component {
return
(
return
(
<
Container
style
=
{{
height
:
Dimensions
.
get
(
'
window
'
).
height
}}
>
<
Container
style
=
{{
height
:
Dimensions
.
get
(
'
window
'
).
height
}}
>
<
Item
>
<
Item
>
<
Input
placeholder
=
"
Search
"
onChangeText
=
{(
text
)
=>
this
.
SearchFilterFunction
(
text
)}
/
>
<
Input
placeholder
=
"
Search
"
onChangeText
=
{(
text
)
=>
this
.
SearchFilterFunction
(
text
)}
/
>
<
Icon
name
=
"
search
"
size
=
{
20
}
/
>
<
Icon
name
=
"
search
"
size
=
{
20
}
/
>
...
@@ -808,7 +798,7 @@ const styles = StyleSheet.create({
...
@@ -808,7 +798,7 @@ const styles = StyleSheet.create({
alignSelf
:
'
center
'
,
alignSelf
:
'
center
'
,
},
},
boxheader
:
{
boxheader
:
{
backgroundColor
:
'
white
'
,
backgroundColor
:
'
white
'
,
justifyContent
:
'
space-between
'
,
justifyContent
:
'
space-between
'
,
flexDirection
:
'
column
'
,
flexDirection
:
'
column
'
,
position
:
'
relative
'
,
position
:
'
relative
'
,
...
...
This diff is collapsed.
Click to expand it.
src/UserComponents/UserRoadblocksTobeAssigned.js
View file @
80a33bbd
/*
/*
FileName:TobeAssigned.js
FileName:
UserRoadblock
TobeAssigned.js
Version:1.0.0
Version:1.0.0
Purpose:Getting the List of user pending my task list
Purpose:Getting the List of user pending my task list
Devloper:Rishitha,Naveen,Harsha,Mahesh
Devloper:Rishitha,Naveen,Harsha,Mahesh
...
@@ -211,7 +211,7 @@ class ListItem extends React.Component {
...
@@ -211,7 +211,7 @@ class ListItem extends React.Component {
<
Text
style
=
{
styles
.
signUpText0
}
>
User
Story
Id
:
<
/Text
>
<
Text
style
=
{
styles
.
signUpText0
}
>
User
Story
Id
:
<
/Text
>
<
Text
style
=
{
styles
.
signUpText1
}
>
{(
this
.
props
.
cropcode
).
substring
(
0
,
3
).
toUpperCase
()}:{
item
.
story_id
.
substring
(
0
,
5
).
toUpperCase
()}
-
{
item
.
subtaskname
}
<
/Text
>
<
Text
style
=
{
styles
.
signUpText1
}
>
{(
this
.
props
.
cropcode
).
substring
(
0
,
3
).
toUpperCase
()}:{
item
.
story_id
.
substring
(
0
,
5
).
toUpperCase
()}
-
{
item
.
subtaskname
}
<
/Text
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
{
/* <Text style={styles.signUpText02} >{item.status} </Text> */
}
{
/* <Text style={styles.signUpText02} >{item.status} </Text> */
}
...
@@ -264,7 +264,7 @@ class ListItem extends React.Component {
...
@@ -264,7 +264,7 @@ class ListItem extends React.Component {
<
View
style
=
{{
flexDirection
:
'
row
'
,
justifyContent
:
'
flex-end
'
,
alignItems
:
'
center
'
}}
>
<
View
style
=
{{
flexDirection
:
'
row
'
,
justifyContent
:
'
flex-end
'
,
alignItems
:
'
center
'
}}
>
<
TouchableOpacity
onPress
=
{
this
.
props
.
RoadBlock
}
style
=
{{
width
:
80
,
backgroundColor
:
'
black
'
,
borderRadius
:
30
,
marginRight
:
5
}}
><
Text
style
=
{{
color
:
'
#fff
'
,
textAlign
:
'
center
'
}}
>
{
ASSIGN
}
<
/Text></
TouchableOpacity
>
<
TouchableOpacity
onPress
=
{
this
.
props
.
RoadBlock
}
style
=
{{
width
:
80
,
backgroundColor
:
'
black
'
,
borderRadius
:
30
,
marginRight
:
5
}}
><
Text
style
=
{{
color
:
'
#fff
'
,
textAlign
:
'
center
'
}}
>
{
ASSIGN
}
<
/Text></
TouchableOpacity
>
<
/View
>
<
/View
>
<
View
<
View
style
=
{{
style
=
{{
...
@@ -450,7 +450,7 @@ export default class TobeAssigned extends Component {
...
@@ -450,7 +450,7 @@ export default class TobeAssigned extends Component {
})
})
.
then
((
response
)
=>
response
.
json
())
.
then
((
response
)
=>
response
.
json
())
.
then
((
responseJson
)
=>
{
.
then
((
responseJson
)
=>
{
//alert(JSON.stringify(responseJson))
//
alert(JSON.stringify(responseJson))
console
.
warn
(
responseJson
);
console
.
warn
(
responseJson
);
if
(
responseJson
.
status
===
'
True
'
)
{
if
(
responseJson
.
status
===
'
True
'
)
{
this
.
setState
({
this
.
setState
({
...
@@ -629,40 +629,21 @@ export default class TobeAssigned extends Component {
...
@@ -629,40 +629,21 @@ export default class TobeAssigned extends Component {
log
(
"
Info
"
,
"
UserCompletedMyTasks:SearchFilterFunction(text) for search functionality
"
);
log
(
"
Info
"
,
"
UserCompletedMyTasks:SearchFilterFunction(text) for search functionality
"
);
console
.
log
(
text
);
console
.
log
(
text
);
const
newData
=
this
.
arrayholder
.
filter
(
function
(
item
)
{
const
newData
=
this
.
arrayholder
.
filter
(
function
(
item
)
{
//const subTaskId = item.subTaskId.toUpperCase()
//const subTaskId1 = text.toUpperCase()
const
r_id
=
item
.
r_id
.
toUpperCase
()
const
r_id
=
item
.
r_id
.
toUpperCase
()
const
r_id1
=
text
.
toUpperCase
()
const
r_id1
=
text
.
toUpperCase
()
const
subTaskName
=
item
.
subTaskName
.
toUpperCase
()
const
subTaskName1
=
text
.
toUpperCase
()
const
roadblock_description
=
item
.
roadblock_description
.
toUpperCase
()
const
roadblock_description
=
item
.
roadblock_description
.
toUpperCase
()
const
roadblock_description1
=
text
.
toUpperCase
()
const
roadblock_description1
=
text
.
toUpperCase
()
const
status
=
item
.
status
.
toUpperCase
()
const
status
=
item
.
status
.
toUpperCase
()
const
status1
=
text
.
toUpperCase
()
const
status1
=
text
.
toUpperCase
()
const
assignedTo
=
item
.
assignedTo
.
toUpperCase
()
const
requestedby
=
item
.
requestedby
.
toUpperCase
()
const
assignedTo1
=
text
.
toUpperCase
()
const
requestedby1
=
text
.
toUpperCase
()
const
roadblock_date
=
item
.
roadblock_date
.
toUpperCase
()
const
roadblock_date1
=
text
.
toUpperCase
()
const
assignedBy
=
item
.
assignedBy
.
toUpperCase
()
const
assignedBy1
=
text
.
toUpperCase
()
const
assigned_date
=
item
.
assigned_date
.
toUpperCase
()
const
assigned_date1
=
text
.
toUpperCase
()
const
target_date
=
item
.
target_date
.
toUpperCase
()
const
target_date1
=
text
.
toUpperCase
()
//
// subTaskId.indexOf(subTaskId1) > -1 ||
// r_id.indexOf(r_id1) > -1 ||
return
r_id
.
indexOf
(
r_id1
)
>
-
1
||
return
r_id
.
indexOf
(
r_id1
)
>
-
1
||
subTaskName
.
indexOf
(
subTaskName1
)
>
-
1
||
roadblock_description
.
indexOf
(
roadblock_description1
)
>
-
1
||
roadblock_description
.
indexOf
(
roadblock_description1
)
>
-
1
||
target_date
.
indexOf
(
target_date1
)
>
-
1
||
status
.
indexOf
(
status1
)
>
-
1
||
status
.
indexOf
(
status1
)
>
-
1
||
assigned_date
.
indexOf
(
assigned_date1
)
>
-
1
||
requestedby
.
indexOf
(
requestedby1
)
>
-
1
assignedBy
.
indexOf
(
assignedBy1
)
>
-
1
assignedTo
.
indexOf
(
assignedTo1
)
>
-
1
||
targetDate
.
indexOf
(
targetDate1
)
>
-
1
// dependencyTitle.indexOf(dependencyTitle1) > -1
})
})
this
.
setState
({
this
.
setState
({
...
@@ -978,7 +959,7 @@ const styles = StyleSheet.create({
...
@@ -978,7 +959,7 @@ const styles = StyleSheet.create({
fontSize
:
13
,
fontSize
:
13
,
paddingRight
:
5
,
paddingRight
:
5
,
color
:
'
red
'
,
color
:
'
red
'
,
textAlign
:
'
right
'
textAlign
:
'
right
'
// paddingBottom: 10,
// paddingBottom: 10,
...
...
This diff is collapsed.
Click to expand it.
src/WebServices/RestClient.js
View file @
80a33bbd
/*****MySql********/
/*****MySql********/
//pre production environment (development)
//pre production environment (development)
export
const
API
=
"
https://api-single.agile24x7.com/release/
"
;
//
export const API = "https://api-single.agile24x7.com/release/";
export
const
ReportsAPI
=
"
https://testapiv2reporting.agile24x7.com/
"
;
//
export const ReportsAPI = "https://testapiv2reporting.agile24x7.com/";
export
const
Client_URL
=
"
https://sdtest.agile24x7.com/#/
"
;
//
export const Client_URL = "https://sdtest.agile24x7.com/#/";
//production environment
//production environment
// export const API = "https://api-single.agile24x7.com/Migration/";
// export const API = "https://api-single.agile24x7.com/Migration/";
...
@@ -15,9 +15,9 @@ export const Client_URL = "https://sdtest.agile24x7.com/#/";
...
@@ -15,9 +15,9 @@ export const Client_URL = "https://sdtest.agile24x7.com/#/";
//pre production environment (development)
//pre production environment (development)
//
export const API = "https://api-single.agile24x7.com/pg_migration/";
export
const
API
=
"
https://api-single.agile24x7.com/pg_migration/
"
;
//
export const ReportsAPI = "https://pgtestreporting.agile24x7.com/";
export
const
ReportsAPI
=
"
https://pgtestreporting.agile24x7.com/
"
;
//
export const Client_URL = "https://pgtest.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