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
f0f1ae29
Commit
f0f1ae29
authored
3 years ago
by
tejaswi
Browse files
Options
Download
Plain Diff
Merge branch 'master' of
http://git.novisync.com/santhosh/agile24x7-mobile-singledb
parents
cd54948c
f31f3a0b
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
src/AdminComponets/AdminReports1.js
+1
-1
src/AdminComponets/AdminReports1.js
src/CommonComponents/AdminChat.js
+11
-6
src/CommonComponents/AdminChat.js
src/CommonComponents/AdminChatUser.js
+126
-37
src/CommonComponents/AdminChatUser.js
src/CommonComponents/GroupChat.js
+151
-69
src/CommonComponents/GroupChat.js
src/CommonComponents/TaskChat.js
+148
-68
src/CommonComponents/TaskChat.js
src/CommonComponents/UserChat.js
+108
-27
src/CommonComponents/UserChat.js
src/UserComponents/CalendarDashboard.js
+13
-10
src/UserComponents/CalendarDashboard.js
src/UserComponents/UserGroupChat.js
+5
-1
src/UserComponents/UserGroupChat.js
src/WebServices/RestClient.js
+9
-9
src/WebServices/RestClient.js
src/splash.js
+1
-1
src/splash.js
with
573 additions
and
229 deletions
+573
-229
src/AdminComponets/AdminReports1.js
View file @
f0f1ae29
...
...
@@ -166,7 +166,7 @@ export default class AdminReports1 extends Component {
AsyncStorage
.
getItem
(
"
userName
"
,
(
err
,
res
)
=>
{
const
userName
=
res
;
const
[,
extension
]
=
userName
.
split
(
'
@
'
)
//
const [, extension] = userName.split('@')
AsyncStorage
.
getItem
(
"
userToken
"
,
(
err
,
res
)
=>
{
this
.
setState
({
empId
:
res
});
// alert(extension)
...
...
This diff is collapsed.
Click to expand it.
src/CommonComponents/AdminChat.js
View file @
f0f1ae29
...
...
@@ -100,19 +100,24 @@ class ListItem extends Component {
.
then
((
response
)
=>
response
.
json
())
.
then
((
responseJson
)
=>
{
console
.
warn
(
"
Messages For chat application
"
+
JSON
.
stringify
(
responseJson
.
data
));
// alert(
"datasource3"+
JSON.stringify(responseJson))
// alert(JSON.stringify(responseJson))
// console.warn("Messages from users" + JSON.stringify(responseJson))
// console.warn("Send By Name" + JSON.stringify(responseJson.data))
if
(
responseJson
.
status
===
'
True
'
)
{
console
.
warn
(
"
Setted Data
"
)
this
.
setState
({
dataSource3
:
responseJson
.
data
,
});
}
else
{
console
.
warn
(
"
Empty Data
"
)
this
.
setState
({
dataSource
3
:
''
,
dataSource
:
''
,
});
}
})
...
...
@@ -187,7 +192,7 @@ class ListItem extends Component {
else
{
console
.
warn
(
"
Empty Data
"
)
this
.
setState
({
dataSource
2
:
''
,
dataSource
:
''
,
});
}
})
...
...
@@ -256,7 +261,7 @@ class ListItem extends Component {
return
groupMsg
[
groupMsg
.
length
-
1
]
}
// alert(getLastMsgTime)
// var data1=this.state.dataSource1;
const
getMessagesCount
=
(
data1
,
id
)
=>
{
// console.warn("ids"+JSON.stringify(data1) +id)
...
...
@@ -844,7 +849,7 @@ export default class AdminChat extends Component {
.
then
((
responseJson
)
=>
{
// alert(JSON.stringify(responseJson))
// console.warn("Employees" + JSON.stringify(responseJson));
//
this.addManageEmployeesList(responseJson.data, cropcode) //Store Manage Employee List in Offline
this
.
addManageEmployeesList
(
responseJson
.
data
,
cropcode
)
//Store Manage Employee List in Offline
// this.setState({
// isLoading: false,
...
...
@@ -1507,4 +1512,4 @@ const pickerSelectStyles = StyleSheet.create({
},
});
});
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/CommonComponents/AdminChatUser.js
View file @
f0f1ae29
...
...
@@ -28,7 +28,7 @@ import AsyncStorage from '@react-native-community/async-storage';
import
{
Title
,
Container
,
Content
,
Header
,
Right
,
Left
,
Body
,
Tab
,
Tabs
,
TabHeading
,
Footer
,
Item
,
Input
,
FooterTab
,
Subtitle
}
from
'
native-base
'
;
import
moment
from
"
moment
"
;
import
NetInfo
from
'
@react-native-community/netinfo
'
;
import
{
API
,
CHATAPI
}
from
"
../WebServices/RestClient
"
;
import
{
API
,
CHATAPI
}
from
"
../WebServices/RestClient
"
;
import
log
from
'
../LogFile/Log
'
;
import
{
launchCamera
,
launchImageLibrary
}
from
'
react-native-image-picker
'
;
...
...
@@ -63,6 +63,9 @@ export default class AdminChatUser extends Component {
groupList
:
''
,
handleHover
:
false
,
commentDetails
:
{},
SendImg
:
false
,
cls
:
'
1
'
,
};
// alert("Msgcount"+this.props.navigation.state.params.sno)
}
...
...
@@ -322,7 +325,8 @@ export default class AdminChatUser extends Component {
this
.
getMessages
();
this
.
setState
({
message
:
''
,
handleHover
:
false
handleHover
:
false
,
// commentDetails:null
});
...
...
@@ -335,10 +339,16 @@ export default class AdminChatUser extends Component {
// });
}
openGallery
=
async
()
=>
{
// alert("clicked")
const
images
=
await
launchImageLibrary
(
options
);
console
.
log
(
images
.
assets
[
0
])
openGallery1
()
{
const
images
=
this
.
state
.
images
;
// // alert(JSON.stringify(images))
// this.setState({
// images1: images,
// uri: images.assets[0].uri,
// SendImg : true
// })
// alert("images" + JSON.stringify(this.state.images1))
const
message
=
this
.
state
.
message
;
AsyncStorage
.
multiGet
([
"
cropcode
"
,
"
userToken
"
],
async
(
err
,
response
)
=>
{
const
cropcode
=
response
[
0
][
1
];
...
...
@@ -374,11 +384,32 @@ export default class AdminChatUser extends Component {
);
let
responseJson
=
await
res1
.
json
();
this
.
getMessages
();
this
.
setState
({
handleHover
:
false
,
uri
:
null
,
SendImg
:
false
,
message
:
''
,
// commentDetails:null
})
alert
(
"
Image Uploaded successfully
"
)
});
});
}
openGallery
=
async
()
=>
{
// alert("clicked")
const
images
=
await
launchImageLibrary
(
options
);
// alert(JSON.stringify(images))
this
.
setState
({
images
:
images
,
uri
:
images
.
assets
[
0
].
uri
,
SendImg
:
true
})
// alert("images" + JSON.stringify(this.state.images))
}
renderDate
=
(
date
)
=>
{
return
(
<
Text
style
=
{
styles
.
time
}
>
...
...
@@ -398,6 +429,10 @@ export default class AdminChatUser extends Component {
this
.
setState
({
handleHover
:
false
,
uri
:
null
,
SendImg
:
false
,
reply_id
:
''
})
}
...
...
@@ -426,12 +461,12 @@ export default class AdminChatUser extends Component {
onPress
=
{()
=>
this
.
props
.
navigation
.
goBack
()}
/
>
<
Body
style
=
{
styles
.
hstyles
}
>
<
Title
style
=
{{
color
:
'
#fff
'
,
fontSize
:
14
,
paddingLeft
:
10
,
flexDirection
:
'
row
'
}}
>
<
Title
style
=
{{
color
:
'
#fff
'
,
fontSize
:
14
,
paddingLeft
:
10
,
flexDirection
:
'
row
'
}}
>
<
View
style
=
{
styles
.
btnSend
}
>
<
Text
style
=
{
styles
.
iconSendtop
}
>
{(
this
.
props
.
navigation
.
state
.
params
.
name
).
substring
(
0
,
2
).
toUpperCase
()}
<
/Text
>
<
/View
>
<
View
style
=
{{
top
:
-
10
}}
>
<
Text
style
=
{{
color
:
'
white
'
,
fontWeight
:
'
bold
'
,
paddingLeft
:
10
,
top
:
-
10
}}
>
<
View
style
=
{{
top
:
-
10
}}
>
<
Text
style
=
{{
color
:
'
white
'
,
fontWeight
:
'
bold
'
,
paddingLeft
:
10
,
top
:
-
10
}}
>
{
this
.
props
.
navigation
.
state
.
params
.
name
}
<
/Text
>
<
/View
>
...
...
@@ -502,41 +537,86 @@ export default class AdminChatUser extends Component {
)
}}
/
>
<
/ScrollView
>
{
this
.
state
.
uri
&&
<
View
style
=
{{
width
:
"
100%
"
,
height
:
100
,
backgroundColor
:
'
grey
'
,
flexDirection
:
'
row
'
}}
>
<
View
style
=
{{
width
:
'
90%
'
}}
>
<
Image
source
=
{{
uri
:
this
.
state
.
uri
}}
style
=
{{
width
:
100
,
height
:
100
,
resizeMode
:
'
contain
'
}}
/
>
<
/View
>
<
View
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
handlecomClose
()}
><
Icon
color
=
{
'
#fff
'
}
size
=
{
25
}
style
=
{{
marginLeft
:
10
,
marginTop
:
5
}}
name
=
"
times-circle-o
"
/><
/TouchableOpacity
>
<
/View
>
<
/View>
}
<
View
style
=
{
this
.
state
.
handleHover
===
true
?
styles
.
footer1
:
styles
.
footer
}
>
{
this
.
state
.
handleHover
&&
{
this
.
state
.
handleHover
===
true
?
// alert(JSON.stringify(this.state.commentDetails))
<
View
style
=
{
styles
.
itemBottom
}
>
<
View
style
=
{{
width
:
"
90%
"
}}
>
<
Text
style
=
{{
fontSize
:
12
,
color
:
'
green
'
}}
>
{
this
.
state
.
commentDetails
.
username
}
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
color
:
'
black
'
}}
>
{
this
.
state
.
commentDetails
.
message
}
<
/Text
>
<
View
>
<
View
style
=
{
styles
.
itemBottom
}
>
<
View
style
=
{{
width
:
"
90%
"
}}
>
<
Text
style
=
{{
fontSize
:
12
,
color
:
'
green
'
}}
>
{
this
.
state
.
commentDetails
.
username
}
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
color
:
'
black
'
}}
>
{
this
.
state
.
commentDetails
.
message
}
<
/Text
>
<
/View
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
handlecomClose
(
this
.
state
.
commentDetails
)}
><
Icon
color
=
{
'
#000
'
}
size
=
{
25
}
style
=
{{
marginLeft
:
10
,
marginTop
:
5
}}
name
=
"
times-circle-o
"
/><
/TouchableOpacity
>
<
/View
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
handlecomClose
()}
><
Icon
color
=
{
'
#000
'
}
size
=
{
25
}
style
=
{{
marginLeft
:
10
,
marginTop
:
5
}}
name
=
"
times-circle-o
"
/><
/TouchableOpacity
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'
row
'
}}
>
<
View
style
=
{
styles
.
inputContainer
}
>
<
TextInput
style
=
{
styles
.
inputs
}
autoFocus
=
{
true
}
placeholder
=
"
Message
"
underlineColorAndroid
=
'
transparent
'
multiline
=
{
true
}
onChangeText
=
{(
value
)
=>
this
.
setState
({
message
:
value
})}
value
=
{
this
.
state
.
message
}
/
>
<
TouchableOpacity
style
=
{{
top
:
-
5
,
right
:
15
}}
disabled
=
{
this
.
state
.
itemPressedDisabled
}
onPress
=
{
this
.
openGallery
}
>
<
Image
source
=
{
require
(
'
../Images/paperclip.png
'
)}
style
=
{
styles
.
iconSendfile
}
/
>
<
/TouchableOpacity
>
<
/View
>
{
this
.
state
.
SendImg
===
false
?
<
TouchableOpacity
style
=
{
styles
.
btnSend
}
disabled
=
{
this
.
state
.
itemPressedDisabled
}
onPress
=
{()
=>
{
this
.
sendMessageText
()
}}
>
<
Image
source
=
{
require
(
'
../Images/sent.png
'
)}
style
=
{
styles
.
iconSend
}
/
>
<
/TouchableOpacity
>
:
<
TouchableOpacity
style
=
{
styles
.
btnSend
}
disabled
=
{
this
.
state
.
itemPressedDisabled
}
onPress
=
{()
=>
{
this
.
openGallery1
()
}}
>
<
Image
source
=
{
require
(
'
../Images/sent.png
'
)}
style
=
{
styles
.
iconSend
}
/
>
<
/TouchableOpacity
>
}
}
<
View
style
=
{{
flexDirection
:
'
row
'
}}
>
<
View
style
=
{
styles
.
inputContainer
}
>
<
TextInput
style
=
{
styles
.
inputs
}
placeholder
=
"
Message
"
underlineColorAndroid
=
'
transparent
'
multiline
=
{
true
}
onChangeText
=
{(
value
)
=>
this
.
setState
({
message
:
value
})}
value
=
{
this
.
state
.
message
}
/
>
<
TouchableOpacity
style
=
{{
top
:
-
5
,
right
:
15
}}
disabled
=
{
this
.
state
.
itemPressedDisabled
}
onPress
=
{
this
.
openGallery
}
>
<
Image
source
=
{
require
(
'
../Images/paperclip.png
'
)}
style
=
{
styles
.
iconSendfile
}
/
>
<
/TouchableOpacity
>
<
/View
>
<
TouchableOpacity
style
=
{
styles
.
btnSend
}
disabled
=
{
this
.
state
.
itemPressedDisabled
}
onPress
=
{()
=>
{
this
.
sendMessageText
()
}}
>
<
Image
source
=
{
require
(
'
../Images/sent.png
'
)}
style
=
{
styles
.
iconSend
}
/
>
<
/TouchableOpacity
>
<
/View
>
<
/View>
:
<
View
style
=
{{
flexDirection
:
'
row
'
}}
>
<
View
style
=
{
styles
.
inputContainer
}
>
<
TextInput
style
=
{
styles
.
inputs
}
autoFocus
=
{
true
}
placeholder
=
"
Message
"
underlineColorAndroid
=
'
transparent
'
multiline
=
{
true
}
onChangeText
=
{(
value
)
=>
this
.
setState
({
message
:
value
})}
value
=
{
this
.
state
.
message
}
/
>
<
TouchableOpacity
style
=
{{
top
:
-
5
,
right
:
15
}}
disabled
=
{
this
.
state
.
itemPressedDisabled
}
onPress
=
{
this
.
openGallery
}
>
<
Image
source
=
{
require
(
'
../Images/paperclip.png
'
)}
style
=
{
styles
.
iconSendfile
}
/
>
<
/TouchableOpacity
>
<
/View
>
{
this
.
state
.
SendImg
===
false
?
<
TouchableOpacity
style
=
{
styles
.
btnSend
}
disabled
=
{
this
.
state
.
itemPressedDisabled
}
onPress
=
{()
=>
{
this
.
sendMessageText
()
}}
>
<
Image
source
=
{
require
(
'
../Images/sent.png
'
)}
style
=
{
styles
.
iconSend
}
/
>
<
/TouchableOpacity
>
:
<
TouchableOpacity
style
=
{
styles
.
btnSend
}
disabled
=
{
this
.
state
.
itemPressedDisabled
}
onPress
=
{()
=>
{
this
.
openGallery1
()
}}
>
<
Image
source
=
{
require
(
'
../Images/sent.png
'
)}
style
=
{
styles
.
iconSend
}
/
>
<
/TouchableOpacity
>
}
<
/View
>
<
/View
>
}
<
/View
>
...
...
@@ -583,6 +663,15 @@ const styles = StyleSheet.create({
alignItems
:
'
center
'
,
justifyContent
:
'
center
'
,
},
btnSendImg
:
{
backgroundColor
:
"
green
"
,
width
:
40
,
margin
:
6
,
height
:
40
,
borderRadius
:
360
,
alignItems
:
'
center
'
,
justifyContent
:
'
center
'
,
},
iconSend
:
{
width
:
25
,
...
...
@@ -594,7 +683,7 @@ const styles = StyleSheet.create({
height
:
25
,
alignSelf
:
'
center
'
,
color
:
'
white
'
,
padding
:
1
padding
:
1
},
iconSendfile
:
{
width
:
25
,
...
...
@@ -612,7 +701,7 @@ const styles = StyleSheet.create({
// alignItems: 'center',
// flex: 1,
width
:
'
85%
'
,
marginTop
:
5
,
marginTop
:
5
,
alignItems
:
'
baseline
'
,
},
...
...
This diff is collapsed.
Click to expand it.
src/CommonComponents/GroupChat.js
View file @
f0f1ae29
...
...
@@ -40,11 +40,11 @@ const options = {
title
:
'
Select Image
'
,
type
:
'
library
'
,
options
:
{
maxHeight
:
200
,
maxWidth
:
200
,
selectionLimit
:
1
,
mediaType
:
'
photo
'
,
includeBase64
:
false
maxHeight
:
200
,
maxWidth
:
200
,
selectionLimit
:
1
,
mediaType
:
'
photo
'
,
includeBase64
:
false
},
}
export
default
class
GroupChat
extends
Component
{
...
...
@@ -65,6 +65,7 @@ export default class GroupChat extends Component {
groupList
:
''
,
handleHover
:
false
,
commentDetails
:
{},
SendImg
:
false
,
};
}
...
...
@@ -683,51 +684,71 @@ export default class GroupChat extends Component {
});
});
}
attach
=
async
()
=>
{
attach1
()
{
// alert("clicked")
const
images1
=
await
launchImageLibrary
(
options
);
const
images1
=
this
.
state
.
images
;
console
.
log
(
images1
.
assets
[
0
])
const
message
=
this
.
state
.
message
;
const
groupId
=
this
.
state
.
subtaskId
;
AsyncStorage
.
multiGet
([
"
cropcode
"
,
"
userToken
"
],
async
(
err
,
response
)
=>
{
const
cropcode
=
response
[
0
][
1
];
const
userToken
=
response
[
1
][
1
];
AsyncStorage
.
getItem
(
"
projectId
"
,
async
(
err
,
res
)
=>
{
const
projectId
=
res
;
const
data
=
new
FormData
()
data
.
append
(
'
file
'
,
{
uri
:
images1
.
assets
[
0
].
uri
,
type
:
images1
.
assets
[
0
].
type
,
name
:
images1
.
assets
[
0
].
fileName
,
})
data
.
append
(
'
message
'
,
this
.
state
.
message
)
data
.
append
(
'
action
'
,
'
media
'
)
data
.
append
(
'
corp_code
'
,
cropcode
)
data
.
append
(
'
groupId
'
,
groupId
)
data
.
append
(
'
messagedBy
'
,
userToken
)
data
.
append
(
'
api
'
,
CHATAPI
)
data
.
append
(
'
groupName
'
,
this
.
state
.
groupName
);
data
.
append
(
'
groupEmail
'
,
this
.
state
.
members_email
);
data
.
append
(
'
reply_id
'
,
this
.
state
.
commentDetails
.
id
?
this
.
state
.
commentDetails
.
id
:
""
)
let
res1
=
await
fetch
(
API
+
'
group_chat1.php
'
,
{
method
:
'
post
'
,
body
:
data
,
headers
:
{
'
Content-Type
'
:
'
multipart/form-data;
'
,
},
}
);
let
responseJson
=
await
res1
.
json
();
this
.
getMessages
();
alert
(
"
Image Uploaded successfully
"
)
});
const
cropcode
=
response
[
0
][
1
];
const
userToken
=
response
[
1
][
1
];
AsyncStorage
.
getItem
(
"
projectId
"
,
async
(
err
,
res
)
=>
{
const
projectId
=
res
;
const
data
=
new
FormData
()
data
.
append
(
'
file
'
,
{
uri
:
images1
.
assets
[
0
].
uri
,
type
:
images1
.
assets
[
0
].
type
,
name
:
images1
.
assets
[
0
].
fileName
,
})
data
.
append
(
'
message
'
,
this
.
state
.
message
)
data
.
append
(
'
action
'
,
'
media
'
)
data
.
append
(
'
corp_code
'
,
cropcode
)
data
.
append
(
'
groupId
'
,
groupId
)
data
.
append
(
'
messagedBy
'
,
userToken
)
data
.
append
(
'
api
'
,
CHATAPI
)
data
.
append
(
'
groupName
'
,
this
.
state
.
groupName
);
data
.
append
(
'
groupEmail
'
,
this
.
state
.
members_email
);
data
.
append
(
'
reply_id
'
,
this
.
state
.
commentDetails
.
id
?
this
.
state
.
commentDetails
.
id
:
""
)
let
res1
=
await
fetch
(
API
+
'
group_chat1.php
'
,
{
method
:
'
post
'
,
body
:
data
,
headers
:
{
'
Content-Type
'
:
'
multipart/form-data;
'
,
},
}
);
let
responseJson
=
await
res1
.
json
();
this
.
getMessages
();
this
.
setState
({
handleHover
:
false
,
uri
:
null
,
SendImg
:
false
,
message
:
''
,
// commentDetails:null
})
alert
(
"
Image Uploaded successfully
"
)
});
});
}
}
attach
=
async
()
=>
{
// alert("clicked")
const
images
=
await
launchImageLibrary
(
options
);
this
.
setState
({
images
:
images
,
uri
:
images
.
assets
[
0
].
uri
,
SendImg
:
true
})
// alert("images" + JSON.stringify(this.state.images))
}
renderDate
=
(
date
)
=>
{
return
(
...
...
@@ -748,6 +769,9 @@ export default class GroupChat extends Component {
this
.
setState
({
handleHover
:
false
,
uri
:
null
,
SendImg
:
false
,
reply_id
:
''
})
}
...
...
@@ -848,38 +872,86 @@ export default class GroupChat extends Component {
}}
/
>
<
/ScrollView
>
{
this
.
state
.
uri
&&
<
View
style
=
{{
width
:
"
100%
"
,
height
:
100
,
backgroundColor
:
'
grey
'
,
flexDirection
:
'
row
'
}}
>
<
View
style
=
{{
width
:
'
90%
'
}}
>
<
Image
source
=
{{
uri
:
this
.
state
.
uri
}}
style
=
{{
width
:
100
,
height
:
100
,
resizeMode
:
'
contain
'
}}
/
>
<
/View
>
<
View
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
handlecomClose
()}
><
Icon
color
=
{
'
#fff
'
}
size
=
{
25
}
style
=
{{
marginLeft
:
10
,
marginTop
:
5
}}
name
=
"
times-circle-o
"
/><
/TouchableOpacity
>
<
/View
>
<
/View>
}
<
View
style
=
{
this
.
state
.
handleHover
===
true
?
styles
.
footer1
:
styles
.
footer
}
>
{
this
.
state
.
handleHover
&&
{
this
.
state
.
handleHover
===
true
?
// alert(JSON.stringify(this.state.commentDetails))
<
View
style
=
{
styles
.
itemBottom
}
>
<
View
style
=
{{
width
:
"
90%
"
}}
>
<
Text
style
=
{{
fontSize
:
12
,
color
:
'
green
'
}}
>
{
this
.
state
.
commentDetails
.
username
}
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
color
:
'
black
'
}}
>
{
this
.
state
.
commentDetails
.
message
}
<
/Text
>
<
View
>
<
View
style
=
{
styles
.
itemBottom
}
>
<
View
style
=
{{
width
:
"
90%
"
}}
>
<
Text
style
=
{{
fontSize
:
12
,
color
:
'
green
'
}}
>
{
this
.
state
.
commentDetails
.
username
}
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
color
:
'
black
'
}}
>
{
this
.
state
.
commentDetails
.
message
}
<
/Text
>
<
/View
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
handlecomClose
()}
><
Icon
color
=
{
'
#000
'
}
size
=
{
25
}
style
=
{{
marginLeft
:
10
,
marginTop
:
5
}}
name
=
"
times-circle-o
"
/><
/TouchableOpacity
>
<
/View
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
handlecomClose
()}
><
Icon
color
=
{
'
#000
'
}
size
=
{
25
}
style
=
{{
marginLeft
:
10
,
marginTop
:
5
}}
name
=
"
times-circle-o
"
/><
/TouchableOpacity
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'
row
'
}}
>
<
View
style
=
{
styles
.
inputContainer
}
>
<
TextInput
style
=
{
styles
.
inputs
}
autoFocus
=
{
true
}
placeholder
=
"
Message
"
underlineColorAndroid
=
'
transparent
'
multiline
=
{
true
}
onChangeText
=
{(
value
)
=>
this
.
setState
({
message
:
value
})}
value
=
{
this
.
state
.
message
}
/
>
<
TouchableOpacity
style
=
{{
top
:
-
5
,
right
:
15
}}
onPress
=
{
this
.
attach
}
>
<
Image
source
=
{
require
(
'
../Images/paperclip.png
'
)}
style
=
{
styles
.
iconSendfile
}
/
>
<
/TouchableOpacity
>
<
/View
>
{
this
.
state
.
SendImg
===
false
?
<
TouchableOpacity
style
=
{
styles
.
btnSend
}
disabled
=
{
this
.
state
.
itemPressedDisabled
}
onPress
=
{()
=>
{
this
.
sendMessageText
()
}}
>
<
Image
source
=
{
require
(
'
../Images/sent.png
'
)}
style
=
{
styles
.
iconSend
}
/
>
<
/TouchableOpacity
>
:
<
TouchableOpacity
style
=
{
styles
.
btnSend
}
disabled
=
{
this
.
state
.
itemPressedDisabled
}
onPress
=
{()
=>
{
this
.
attach1
()
}}
>
<
Image
source
=
{
require
(
'
../Images/sent.png
'
)}
style
=
{
styles
.
iconSend
}
/
>
<
/TouchableOpacity
>
}
<
/View
>
<
/View>
:
<
View
style
=
{{
flexDirection
:
'
row
'
}}
>
<
View
style
=
{
styles
.
inputContainer
}
>
<
TextInput
style
=
{
styles
.
inputs
}
autoFocus
=
{
true
}
placeholder
=
"
Message
"
underlineColorAndroid
=
'
transparent
'
multiline
=
{
true
}
onChangeText
=
{(
value
)
=>
this
.
setState
({
message
:
value
})}
value
=
{
this
.
state
.
message
}
/
>
<
TouchableOpacity
style
=
{{
top
:
-
5
,
right
:
15
}}
onPress
=
{
this
.
attach
}
>
<
Image
source
=
{
require
(
'
../Images/paperclip.png
'
)}
style
=
{
styles
.
iconSendfile
}
/
>
<
/TouchableOpacity
>
<
/View
>
{
this
.
state
.
SendImg
===
false
?
<
TouchableOpacity
style
=
{
styles
.
btnSend
}
disabled
=
{
this
.
state
.
itemPressedDisabled
}
onPress
=
{()
=>
{
this
.
sendMessageText
()
}}
>
<
Image
source
=
{
require
(
'
../Images/sent.png
'
)}
style
=
{
styles
.
iconSend
}
/
>
<
/TouchableOpacity
>
:
<
TouchableOpacity
style
=
{
styles
.
btnSend
}
disabled
=
{
this
.
state
.
itemPressedDisabled
}
onPress
=
{()
=>
{
this
.
attach1
()
}}
>
<
Image
source
=
{
require
(
'
../Images/sent.png
'
)}
style
=
{
styles
.
iconSend
}
/
>
<
/TouchableOpacity
>
}
}
<
View
style
=
{{
flexDirection
:
'
row
'
}}
>
<
View
style
=
{
styles
.
inputContainer
}
>
<
TextInput
style
=
{
styles
.
inputs
}
placeholder
=
"
Message
"
underlineColorAndroid
=
'
transparent
'
multiline
=
{
true
}
onChangeText
=
{(
value
)
=>
this
.
setState
({
message
:
value
})}
value
=
{
this
.
state
.
message
}
/
>
<
TouchableOpacity
style
=
{{
top
:
-
5
,
right
:
15
}}
onPress
=
{
this
.
attach
}
>
<
Image
source
=
{
require
(
'
../Images/paperclip.png
'
)}
style
=
{
styles
.
iconSendfile
}
/
>
<
/TouchableOpacity
>
<
/View
>
<
TouchableOpacity
style
=
{
styles
.
btnSend
}
disabled
=
{
this
.
state
.
itemPressedDisabled
}
onPress
=
{()
=>
{
this
.
sendMessageText
()
}}
>
<
Image
source
=
{
require
(
'
../Images/sent.png
'
)}
style
=
{
styles
.
iconSend
}
/
>
<
/TouchableOpacity
>
}
<
/View
>
<
/View
>
...
...
@@ -889,7 +961,7 @@ export default class GroupChat extends Component {
<
/Container
>
{
/* </TouchableWithoutFeedback> */
}
<
/KeyboardAvoidingView
>
<
/KeyboardAvoidingView
>
);
}
...
...
@@ -928,6 +1000,16 @@ const styles = StyleSheet.create({
justifyContent
:
'
center
'
,
},
btnSendImg
:
{
backgroundColor
:
"
green
"
,
width
:
40
,
margin
:
6
,
height
:
40
,
borderRadius
:
360
,
alignItems
:
'
center
'
,
justifyContent
:
'
center
'
,
},
iconSend
:
{
width
:
25
,
height
:
25
,
...
...
This diff is collapsed.
Click to expand it.
src/CommonComponents/TaskChat.js
View file @
f0f1ae29
...
...
@@ -38,11 +38,11 @@ const options = {
title
:
'
Select Image
'
,
type
:
'
library
'
,
options
:
{
maxHeight
:
200
,
maxWidth
:
200
,
selectionLimit
:
1
,
mediaType
:
'
photo
'
,
includeBase64
:
false
maxHeight
:
200
,
maxWidth
:
200
,
selectionLimit
:
1
,
mediaType
:
'
photo
'
,
includeBase64
:
false
},
}
export
default
class
TaskChat
extends
Component
{
...
...
@@ -61,6 +61,7 @@ export default class TaskChat extends Component {
groupList
:
''
,
handleHover
:
false
,
commentDetails
:
{},
SendImg
:
false
,
};
}
...
...
@@ -676,52 +677,72 @@ export default class TaskChat extends Component {
});
});
}
attach
=
async
()
=>
{
attach
1
()
{
// alert("clicked")
const
images1
=
await
launchImageLibrary
(
options
);
const
images1
=
this
.
state
.
images
;
console
.
log
(
images1
.
assets
[
0
])
const
message
=
this
.
state
.
message
;
const
groupId
=
this
.
state
.
subtaskId
;
AsyncStorage
.
multiGet
([
"
cropcode
"
,
"
userToken
"
],
async
(
err
,
response
)
=>
{
const
cropcode
=
response
[
0
][
1
];
const
userToken
=
response
[
1
][
1
];
AsyncStorage
.
getItem
(
"
projectId
"
,
async
(
err
,
res
)
=>
{
const
projectId
=
res
;
const
data
=
new
FormData
()
data
.
append
(
'
file
'
,
{
uri
:
images1
.
assets
[
0
].
uri
,
type
:
images1
.
assets
[
0
].
type
,
name
:
images1
.
assets
[
0
].
fileName
,
})
data
.
append
(
'
message
'
,
this
.
state
.
message
)
data
.
append
(
'
action
'
,
'
media
'
)
data
.
append
(
'
corp_code
'
,
cropcode
)
data
.
append
(
'
groupId
'
,
groupId
)
data
.
append
(
'
messagedBy
'
,
userToken
)
data
.
append
(
'
api
'
,
CHATAPI
)
data
.
append
(
'
groupName
'
,
this
.
state
.
groupName
);
data
.
append
(
'
groupEmail
'
,
this
.
state
.
members_email
);
data
.
append
(
'
reply_id
'
,
this
.
state
.
commentDetails
.
id
?
this
.
state
.
commentDetails
.
id
:
""
)
let
res1
=
await
fetch
(
API
+
'
user_story_chat1.php
'
,
{
method
:
'
post
'
,
body
:
data
,
headers
:
{
'
Content-Type
'
:
'
multipart/form-data;
'
,
},
}
);
let
responseJson
=
await
res1
.
json
();
this
.
getMessages
();
alert
(
"
Image Uploaded successfully
"
)
});
const
cropcode
=
response
[
0
][
1
];
const
userToken
=
response
[
1
][
1
];
AsyncStorage
.
getItem
(
"
projectId
"
,
async
(
err
,
res
)
=>
{
const
projectId
=
res
;
const
data
=
new
FormData
()
data
.
append
(
'
file
'
,
{
uri
:
images1
.
assets
[
0
].
uri
,
type
:
images1
.
assets
[
0
].
type
,
name
:
images1
.
assets
[
0
].
fileName
,
})
data
.
append
(
'
message
'
,
this
.
state
.
message
)
data
.
append
(
'
action
'
,
'
media
'
)
data
.
append
(
'
corp_code
'
,
cropcode
)
data
.
append
(
'
groupId
'
,
groupId
)
data
.
append
(
'
messagedBy
'
,
userToken
)
data
.
append
(
'
api
'
,
CHATAPI
)
data
.
append
(
'
groupName
'
,
this
.
state
.
groupName
);
data
.
append
(
'
groupEmail
'
,
this
.
state
.
members_email
);
data
.
append
(
'
reply_id
'
,
this
.
state
.
commentDetails
.
id
?
this
.
state
.
commentDetails
.
id
:
""
)
let
res1
=
await
fetch
(
API
+
'
user_story_chat1.php
'
,
{
method
:
'
post
'
,
body
:
data
,
headers
:
{
'
Content-Type
'
:
'
multipart/form-data;
'
,
},
}
);
let
responseJson
=
await
res1
.
json
();
this
.
getMessages
();
this
.
setState
({
handleHover
:
false
,
uri
:
null
,
SendImg
:
false
,
message
:
''
,
// commentDetails:null
})
alert
(
"
Image Uploaded successfully
"
)
});
});
}
}
attach
=
async
()
=>
{
// alert("clicked")
const
images
=
await
launchImageLibrary
(
options
);
this
.
setState
({
images
:
images
,
uri
:
images
.
assets
[
0
].
uri
,
SendImg
:
true
})
// alert("images" + JSON.stringify(this.state.images))
}
renderDate
=
(
date
)
=>
{
...
...
@@ -743,6 +764,9 @@ export default class TaskChat extends Component {
this
.
setState
({
handleHover
:
false
,
uri
:
null
,
SendImg
:
false
,
message
:
''
,
})
}
...
...
@@ -804,7 +828,7 @@ export default class TaskChat extends Component {
<
View
style
=
{[
styles
.
itemReply
,
itemStyleReply
]}
>
<
View
style
=
{{
padding
:
5
,
}}
>
{
itemStyle
===
styles
.
itemOut
?
<
View
style
=
{{
flexDirection
:
'
row
'
}}
><
Text
style
=
{{
fontSize
:
12
,
color
:
'
orange
'
}}
>
{
item
.
reply_username
}
<
/Text></
View
>
:
<
View
style
=
{{
flexDirection
:
'
row
'
}}
><
Text
style
=
{{
fontSize
:
12
,
color
:
'
blue
'
}}
>
{
item
.
username
}
<
/Text></
View
>
}
{
item
.
reply_path
!==
""
?
<
Image
source
=
{{
uri
:
item
.
reply_path
}}
style
=
{{
width
:
210
,
height
:
50
}}
/> : null
}
{
item
.
reply_path
!==
""
?
<
Image
source
=
{{
uri
:
item
.
reply_path
}}
style
=
{{
width
:
210
,
height
:
50
}}
/> : null
}
<
Text
style
=
{{
width
:
210
}}
selectable
=
{
true
}
key
=
{
Math
.
random
()}
>
{
item
.
reply_message
}
<
/Text
>
{
!
inMessage
&&
this
.
renderDate
(
moment
(
item
.
messagedTime
).
format
(
'
MM.DD.YYYY hh:mm:ss
'
))}
{
inMessage
&&
this
.
renderDate
(
moment
(
item
.
messagedTime
).
format
(
'
MM.DD.YYYY hh:mm:ss
'
))}
...
...
@@ -814,7 +838,7 @@ export default class TaskChat extends Component {
<
View
style
=
{[
styles
.
item
,
itemStyle
]}
>
<
View
style
=
{{
padding
:
5
,
}}
>
{
itemStyle
===
styles
.
itemOut
?
<
View
style
=
{{
flexDirection
:
'
row
'
}}
><
Text
style
=
{{
fontSize
:
12
,
color
:
'
orange
'
}}
>
{
item
.
username
}
<
/Text><TouchableOpacity onPress={
()
=> this.handlecom
(
item
)
} ><Icon color={'#C0C0C0'} size=
{25}
style={{ marginLeft: 10 }} name="reply" /
><
/TouchableOpacity></
View
>
:
<
View
style
=
{{
flexDirection
:
'
row
'
}}
><
Text
style
=
{{
fontSize
:
12
,
color
:
'
blue
'
}}
>
{
item
.
username
}
<
/Text><TouchableOpacity onPress={
()
=> this.handlecom
(
item
)
} ><Icon color={'#C0C0C0'} size=
{25}
style={{ marginLeft: 10 }} name="reply" /
><
/TouchableOpacity></
View
>
}
{
item
.
path
!==
""
?
<
Image
source
=
{{
uri
:
item
.
path
}}
style
=
{
styles
.
imageview
}
/> : null
}
{
item
.
path
!==
""
?
<
Image
source
=
{{
uri
:
item
.
path
}}
style
=
{
styles
.
imageview
}
/> : null
}
<
Text
style
=
{{
width
:
210
}}
selectable
=
{
true
}
key
=
{
Math
.
random
()}
>
{
item
.
message
}
<
/Text
>
{
!
inMessage
&&
this
.
renderDate
(
moment
(
item
.
messagedTime
).
format
(
'
MM.DD.YYYY hh:mm:ss
'
))}
{
inMessage
&&
this
.
renderDate
(
moment
(
item
.
messagedTime
).
format
(
'
MM.DD.YYYY hh:mm:ss
'
))}
...
...
@@ -839,36 +863,82 @@ export default class TaskChat extends Component {
}}
/
>
<
/ScrollView
>
{
this
.
state
.
uri
&&
<
View
style
=
{{
width
:
"
100%
"
,
height
:
100
,
backgroundColor
:
'
grey
'
,
flexDirection
:
'
row
'
}}
>
<
View
style
=
{{
width
:
'
90%
'
}}
>
<
Image
source
=
{{
uri
:
this
.
state
.
uri
}}
style
=
{{
width
:
100
,
height
:
100
,
resizeMode
:
'
contain
'
}}
/
>
<
/View
>
<
View
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
handlecomClose
()}
><
Icon
color
=
{
'
#fff
'
}
size
=
{
25
}
style
=
{{
marginLeft
:
10
,
marginTop
:
5
}}
name
=
"
times-circle-o
"
/><
/TouchableOpacity
>
<
/View
>
<
/View>
}
<
View
style
=
{
this
.
state
.
handleHover
===
true
?
styles
.
footer1
:
styles
.
footer
}
>
{
this
.
state
.
handleHover
&&
// alert(JSON.stringify(this.state.commentDetails))
{
this
.
state
.
handleHover
===
true
?
<
View
>
// alert(JSON.stringify(this.state.commentDetails))
<
View
style
=
{
styles
.
itemBottom
}
>
<
View
style
=
{{
width
:
"
90%
"
}}
>
<
Text
style
=
{{
fontSize
:
12
,
color
:
'
green
'
}}
>
{
this
.
state
.
commentDetails
.
username
}
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
color
:
'
black
'
}}
>
{
this
.
state
.
commentDetails
.
message
}
<
/Text
>
<
View
style
=
{{
width
:
"
90%
"
}}
>
<
Text
style
=
{{
fontSize
:
12
,
color
:
'
green
'
}}
>
{
this
.
state
.
commentDetails
.
username
}
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
color
:
'
black
'
}}
>
{
this
.
state
.
commentDetails
.
message
}
<
/Text
>
<
/View
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
handlecomClose
()}
><
Icon
color
=
{
'
#000
'
}
size
=
{
25
}
style
=
{{
marginLeft
:
10
,
marginTop
:
5
}}
name
=
"
times-circle-o
"
/><
/TouchableOpacity
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'
row
'
}}
>
<
View
style
=
{
styles
.
inputContainer
}
>
<
TextInput
style
=
{
styles
.
inputs
}
placeholder
=
"
Message
"
autoFocus
=
{
true
}
underlineColorAndroid
=
'
transparent
'
multiline
=
{
true
}
onChangeText
=
{(
value
)
=>
this
.
setState
({
message
:
value
})}
value
=
{
this
.
state
.
message
}
/
>
<
TouchableOpacity
style
=
{{
top
:
-
5
,
right
:
15
}}
onPress
=
{
this
.
attach
}
>
<
Image
source
=
{
require
(
'
../Images/paperclip.png
'
)}
style
=
{
styles
.
iconSendfile
}
/
>
<
/TouchableOpacity
>
<
/View
>
{
this
.
state
.
SendImg
===
false
?
<
TouchableOpacity
style
=
{
styles
.
btnSend
}
disabled
=
{
this
.
state
.
itemPressedDisabled
}
onPress
=
{()
=>
{
this
.
sendMessageText
()
}}
>
<
Image
source
=
{
require
(
'
../Images/sent.png
'
)}
style
=
{
styles
.
iconSend
}
/
>
<
/TouchableOpacity
>
:
<
TouchableOpacity
style
=
{
styles
.
btnSend
}
disabled
=
{
this
.
state
.
itemPressedDisabled
}
onPress
=
{()
=>
{
this
.
attach1
()
}}
>
<
Image
source
=
{
require
(
'
../Images/sent.png
'
)}
style
=
{
styles
.
iconSend
}
/
>
<
/TouchableOpacity
>
}
<
/View
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
handlecomClose
()}
><
Icon
color
=
{
'
#000
'
}
size
=
{
25
}
style
=
{{
marginLeft
:
10
,
marginTop
:
5
}}
name
=
"
times-circle-o
"
/><
/TouchableOpacity
>
<
/View
>
:
<
View
style
=
{{
flexDirection
:
'
row
'
}}
>
<
View
style
=
{
styles
.
inputContainer
}
>
<
TextInput
style
=
{
styles
.
inputs
}
placeholder
=
"
Message
"
autoFocus
=
{
true
}
underlineColorAndroid
=
'
transparent
'
multiline
=
{
true
}
onChangeText
=
{(
value
)
=>
this
.
setState
({
message
:
value
})}
value
=
{
this
.
state
.
message
}
/
>
<
TouchableOpacity
style
=
{{
top
:
-
5
,
right
:
15
}}
onPress
=
{
this
.
attach
}
>
<
Image
source
=
{
require
(
'
../Images/paperclip.png
'
)}
style
=
{
styles
.
iconSendfile
}
/
>
<
/TouchableOpacity
>
<
/View
>
{
this
.
state
.
SendImg
===
false
?
<
TouchableOpacity
style
=
{
styles
.
btnSend
}
disabled
=
{
this
.
state
.
itemPressedDisabled
}
onPress
=
{()
=>
{
this
.
sendMessageText
()
}}
>
<
Image
source
=
{
require
(
'
../Images/sent.png
'
)}
style
=
{
styles
.
iconSend
}
/
>
<
/TouchableOpacity
>
:
<
TouchableOpacity
style
=
{
styles
.
btnSend
}
disabled
=
{
this
.
state
.
itemPressedDisabled
}
onPress
=
{()
=>
{
this
.
attach1
()
}}
>
<
Image
source
=
{
require
(
'
../Images/sent.png
'
)}
style
=
{
styles
.
iconSend
}
/
>
<
/TouchableOpacity
>
}
<
/View
>
}
<
View
style
=
{{
flexDirection
:
'
row
'
}}
>
<
View
style
=
{
styles
.
inputContainer
}
>
<
TextInput
style
=
{
styles
.
inputs
}
placeholder
=
"
Message
"
underlineColorAndroid
=
'
transparent
'
multiline
=
{
true
}
onChangeText
=
{(
value
)
=>
this
.
setState
({
message
:
value
})}
value
=
{
this
.
state
.
message
}
/
>
<
TouchableOpacity
style
=
{{
top
:
-
5
,
right
:
15
}}
onPress
=
{
this
.
attach
}
>
<
Image
source
=
{
require
(
'
../Images/paperclip.png
'
)}
style
=
{
styles
.
iconSendfile
}
/
>
<
/TouchableOpacity
>
<
/View
>
<
TouchableOpacity
style
=
{
styles
.
btnSend
}
disabled
=
{
this
.
state
.
itemPressedDisabled
}
onPress
=
{()
=>
{
this
.
sendMessageText
()
}}
>
<
Image
source
=
{
require
(
'
../Images/sent.png
'
)}
style
=
{
styles
.
iconSend
}
/
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
<
/View
>
...
...
@@ -915,6 +985,16 @@ const styles = StyleSheet.create({
justifyContent
:
'
center
'
,
},
btnSendImg
:
{
backgroundColor
:
"
green
"
,
width
:
40
,
margin
:
6
,
height
:
40
,
borderRadius
:
360
,
alignItems
:
'
center
'
,
justifyContent
:
'
center
'
,
},
iconSend
:
{
width
:
25
,
height
:
25
,
...
...
This diff is collapsed.
Click to expand it.
src/CommonComponents/UserChat.js
View file @
f0f1ae29
...
...
@@ -63,6 +63,7 @@ export default class UserChat extends Component {
groupList
:
''
,
handleHover
:
false
,
commentDetails
:
{},
SendImg
:
false
,
};
}
...
...
@@ -274,10 +275,10 @@ export default class UserChat extends Component {
});
});
}
attach
=
async
()
=>
{
attach
1
()
{
// alert("clicked")
const
images1
=
await
launchImageLibrary
(
options
)
;
console
.
log
(
images1
.
assets
[
0
])
const
images1
=
this
.
state
.
images
;
const
message
=
this
.
state
.
message
;
const
groupId
=
this
.
state
.
subtaskId
;
AsyncStorage
.
multiGet
([
"
cropcode
"
,
"
userToken
"
],
async
(
err
,
response
)
=>
{
...
...
@@ -314,9 +315,29 @@ export default class UserChat extends Component {
);
let
responseJson
=
await
res1
.
json
();
this
.
getMessages
();
this
.
setState
({
handleHover
:
false
,
uri
:
null
,
SendImg
:
false
,
message
:
''
,
// commentDetails:null
})
alert
(
"
Image Uploaded successfully
"
)
});
});
}
attach
=
async
()
=>
{
// alert("clicked")
const
images
=
await
launchImageLibrary
(
options
);
this
.
setState
({
images
:
images
,
uri
:
images
.
assets
[
0
].
uri
,
SendImg
:
true
})
// alert("images" + JSON.stringify(this.state.images))
}
renderDate
=
(
date
)
=>
{
return
(
...
...
@@ -336,6 +357,9 @@ export default class UserChat extends Component {
this
.
setState
({
handleHover
:
false
,
uri
:
null
,
SendImg
:
false
,
message
:
''
,
})
}
...
...
@@ -432,40 +456,87 @@ export default class UserChat extends Component {
}}
/
>
<
/ScrollView
>
{
this
.
state
.
uri
&&
<
View
style
=
{{
width
:
"
100%
"
,
height
:
100
,
backgroundColor
:
'
grey
'
,
flexDirection
:
'
row
'
}}
>
<
View
style
=
{{
width
:
'
90%
'
}}
>
<
Image
source
=
{{
uri
:
this
.
state
.
uri
}}
style
=
{{
width
:
100
,
height
:
100
,
resizeMode
:
'
contain
'
}}
/
>
<
/View
>
<
View
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
handlecomClose
()}
><
Icon
color
=
{
'
#fff
'
}
size
=
{
25
}
style
=
{{
marginLeft
:
10
,
marginTop
:
5
}}
name
=
"
times-circle-o
"
/><
/TouchableOpacity
>
<
/View
>
<
/View>
}
<
View
style
=
{
this
.
state
.
handleHover
===
true
?
styles
.
footer1
:
styles
.
footer
}
>
{
this
.
state
.
handleHover
&&
{
this
.
state
.
handleHover
===
true
?
// alert(JSON.stringify(this.state.commentDetails))
<
View
style
=
{
styles
.
itemBottom
}
>
<
View
style
=
{{
width
:
"
90%
"
}}
>
<
Text
style
=
{{
fontSize
:
12
,
color
:
'
green
'
}}
>
{
this
.
state
.
commentDetails
.
username
}
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
color
:
'
black
'
}}
>
{
this
.
state
.
commentDetails
.
message
}
<
/Text
>
<
View
>
<
View
style
=
{
styles
.
itemBottom
}
>
<
View
style
=
{{
width
:
"
90%
"
}}
>
<
Text
style
=
{{
fontSize
:
12
,
color
:
'
green
'
}}
>
{
this
.
state
.
commentDetails
.
username
}
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
color
:
'
black
'
}}
>
{
this
.
state
.
commentDetails
.
message
}
<
/Text
>
<
/View
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
handlecomClose
()}
><
Icon
color
=
{
'
#000
'
}
size
=
{
25
}
style
=
{{
marginLeft
:
10
,
marginTop
:
5
}}
name
=
"
times-circle-o
"
/><
/TouchableOpacity
>
<
/View
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
handlecomClose
()}
><
Icon
color
=
{
'
#000
'
}
size
=
{
25
}
style
=
{{
marginLeft
:
10
,
marginTop
:
5
}}
name
=
"
times-circle-o
"
/><
/TouchableOpacity
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'
row
'
}}
>
<
View
style
=
{
styles
.
inputContainer
}
>
<
TextInput
style
=
{
styles
.
inputs
}
placeholder
=
"
Message
"
autoFocus
=
{
true
}
underlineColorAndroid
=
'
transparent
'
multiline
=
{
true
}
onChangeText
=
{(
value
)
=>
this
.
setState
({
message
:
value
})}
value
=
{
this
.
state
.
message
}
/
>
<
TouchableOpacity
style
=
{{
top
:
-
5
,
right
:
15
}}
onPress
=
{
this
.
attach
}
>
<
Image
source
=
{
require
(
'
../Images/paperclip.png
'
)}
style
=
{
styles
.
iconSendfile
}
/
>
<
/TouchableOpacity
>
<
/View
>
{
this
.
state
.
SendImg
===
false
?
<
TouchableOpacity
style
=
{
styles
.
btnSend
}
disabled
=
{
this
.
state
.
itemPressedDisabled
}
onPress
=
{()
=>
{
this
.
sendMessageText
()
}}
>
<
Image
source
=
{
require
(
'
../Images/sent.png
'
)}
style
=
{
styles
.
iconSend
}
/
>
<
/TouchableOpacity
>
:
<
TouchableOpacity
style
=
{
styles
.
btnSend
}
disabled
=
{
this
.
state
.
itemPressedDisabled
}
onPress
=
{()
=>
{
this
.
attach1
()
}}
>
<
Image
source
=
{
require
(
'
../Images/sent.png
'
)}
style
=
{
styles
.
iconSend
}
/
>
<
/TouchableOpacity
>
}
<
/View
>
<
/View>
:
<
View
style
=
{{
flexDirection
:
'
row
'
}}
>
<
View
style
=
{
styles
.
inputContainer
}
>
<
TextInput
style
=
{
styles
.
inputs
}
placeholder
=
"
Message
"
autoFocus
=
{
true
}
underlineColorAndroid
=
'
transparent
'
multiline
=
{
true
}
onChangeText
=
{(
value
)
=>
this
.
setState
({
message
:
value
})}
value
=
{
this
.
state
.
message
}
/
>
<
TouchableOpacity
style
=
{{
top
:
-
5
,
right
:
15
}}
onPress
=
{
this
.
attach
}
>
<
Image
source
=
{
require
(
'
../Images/paperclip.png
'
)}
style
=
{
styles
.
iconSendfile
}
/
>
<
/TouchableOpacity
>
<
/View
>
{
this
.
state
.
SendImg
===
false
?
<
TouchableOpacity
style
=
{
styles
.
btnSend
}
disabled
=
{
this
.
state
.
itemPressedDisabled
}
onPress
=
{()
=>
{
this
.
sendMessageText
()
}}
>
<
Image
source
=
{
require
(
'
../Images/sent.png
'
)}
style
=
{
styles
.
iconSend
}
/
>
<
/TouchableOpacity
>
:
<
TouchableOpacity
style
=
{
styles
.
btnSend
}
disabled
=
{
this
.
state
.
itemPressedDisabled
}
onPress
=
{()
=>
{
this
.
attach1
()
}}
>
<
Image
source
=
{
require
(
'
../Images/sent.png
'
)}
style
=
{
styles
.
iconSend
}
/
>
<
/TouchableOpacity
>
}
}
<
View
style
=
{{
flexDirection
:
'
row
'
}}
>
<
View
style
=
{
styles
.
inputContainer
}
>
<
TextInput
style
=
{
styles
.
inputs
}
placeholder
=
"
Message
"
underlineColorAndroid
=
'
transparent
'
multiline
=
{
true
}
onChangeText
=
{(
value
)
=>
this
.
setState
({
message
:
value
})}
value
=
{
this
.
state
.
message
}
/
>
<
TouchableOpacity
style
=
{{
top
:
-
5
,
right
:
15
}}
onPress
=
{
this
.
attach
}
>
<
Image
source
=
{
require
(
'
../Images/paperclip.png
'
)}
style
=
{
styles
.
iconSendfile
}
/
>
<
/TouchableOpacity
>
<
/View
>
<
TouchableOpacity
style
=
{
styles
.
btnSend
}
disabled
=
{
this
.
state
.
itemPressedDisabled
}
onPress
=
{()
=>
{
this
.
sendMessageText
()
}}
>
<
Image
source
=
{
require
(
'
../Images/sent.png
'
)}
style
=
{
styles
.
iconSend
}
/
>
<
/TouchableOpacity
>
}
<
/View
>
<
/View
>
...
...
@@ -514,6 +585,16 @@ const styles = StyleSheet.create({
justifyContent
:
'
center
'
,
},
btnSendImg
:
{
backgroundColor
:
"
green
"
,
width
:
40
,
margin
:
6
,
height
:
40
,
borderRadius
:
360
,
alignItems
:
'
center
'
,
justifyContent
:
'
center
'
,
},
iconSend
:
{
width
:
25
,
height
:
25
,
...
...
This diff is collapsed.
Click to expand it.
src/UserComponents/CalendarDashboard.js
View file @
f0f1ae29
...
...
@@ -7,7 +7,7 @@ Devloper:Santosh,Mahesh Reddy
// import { Calendar } from 'react-native-big-calendar'
import
EventCalendar
from
'
react-native-events-calendar
'
;
import
React
,
{
Component
}
from
'
react
'
;
import
{
Alert
,
StyleSheet
,
TextInput
,
Text
,
Image
,
View
,
TouchableOpacity
,
Dimensions
,
Button
}
from
'
react-native
'
;
import
{
Alert
,
StyleSheet
,
TextInput
,
Text
,
Image
,
View
,
TouchableOpacity
,
Dimensions
,
Button
,
Linking
}
from
'
react-native
'
;
import
NetInfo
from
'
@react-native-community/netinfo
'
;
// import { Agenda } from 'react-native-calendars';
import
AsyncStorage
from
'
@react-native-community/async-storage
'
;
...
...
@@ -287,7 +287,7 @@ export default class CalendarDashboard extends Component {
//alert(JSON.stringify(responseJson))
if
(
responseJson
.
status
===
'
True
'
)
{
// console.warn("Sprints from active sprint board" + JSON.stringify(responseJson))
//
alert(JSON.stringify(responseJson))
//alert(JSON.stringify(responseJson))
// var sprintDetails = [];
// responseJson.data.map((sprints) => {
...
...
@@ -926,6 +926,7 @@ export default class CalendarDashboard extends Component {
start
:
event
.
start
,
end
:
event
.
end
,
summary
:
event
.
summary
,
location
:
event
.
location
,
status
:
event
.
status
,
eventdescription
:
event
.
eventdescription
,
Id
:
event
.
Id
,
...
...
@@ -995,16 +996,18 @@ export default class CalendarDashboard extends Component {
const
{
modalVisible
,
selectedItems
}
=
this
.
state
;
// alert(JSON.stringify("data"+this.state.timesheet))
//alert("data"+JSON.stringify(this.state.dataSource1))
//
alert("data"+JSON.stringify(this.state.dataSource1))
const
timesheet
=
[]
this
.
state
.
dataSource1
.
map
((
x
)
=>
{
return
(
timesheet
.
push
({
start
:
x
.
target_date
||
x
.
EndTime
,
end
:
x
.
assigned_date
||
x
.
StartTime
,
title
:
x
.
story_title
||
x
.
Subject
,
start
:
x
.
StartTime
||
"
2022-03-08 20:30:00+00
"
,
end
:
x
.
EndTime
||
"
2022-03-08 20:30:00+00
"
,
title
:
x
.
Subject
||
x
.
Subject
,
summary
:
x
.
assignedto
||
x
.
Members
,
location
:
"
https://meet.google.com/wja-iynx-cvf
"
,
status
:
x
.
EventStatus
,
eventdescription
:
x
.
Description
,
Id
:
x
.
Id
,
...
...
@@ -1048,11 +1051,10 @@ export default class CalendarDashboard extends Component {
events
=
{
timesheet
}
height
=
{
600
}
onPressCell
=
{()
=>
{
this
.
setState
({
isVisible
:
true
})
}}
//
mode='3days'
mode
=
'
3days
'
onPressEvent
=
{
this
.
_eventTapped
.
bind
(
this
)}
/
>
{
/* <EventCalendar
eventTapped={this._eventTapped.bind(this)}
events={timesheet}
...
...
@@ -1072,9 +1074,10 @@ export default class CalendarDashboard extends Component {
<
/View
>
<
Text
style
=
{{
padding
:
5
}}
>
{
moment
(
this
.
state
.
start
).
format
(
'
MM.DD.YYYY hh:mm:ss
'
)}
<
/Text
>
<
Text
style
=
{{
paddingLeft
:
5
}}
>
{
this
.
state
.
summary
}
<
/Text
>
<
Text
style
=
{{
paddingLeft
:
5
,
color
:
'
#00A2C1
'
}}
onPress
=
{()
=>
Linking
.
openURL
(
this
.
state
.
location
)}
>
{
this
.
state
.
location
}
<
/Text
>
<
Text
style
=
{{
paddingLeft
:
5
,
paddingTop
:
5
}}
>
{
this
.
state
.
Location
}
<
/Text
>
<
View
style
=
{{
flexDirection
:
'
row
'
,
marginTop
:
10
,
alignSelf
:
'
flex-end
'
}}
>
<
TouchableOpacity
onPress
=
{
this
.
deleteEvent
.
bind
(
this
)}
disabled
=
{
this
.
state
.
itemPressedDisabled
}
>
<
Image
style
=
{{
width
:
27
,
height
:
27
,
marginRight
:
10
}}
source
=
{
require
(
'
../Images/bin.png
'
)}
/
>
...
...
This diff is collapsed.
Click to expand it.
src/UserComponents/UserGroupChat.js
View file @
f0f1ae29
...
...
@@ -344,7 +344,11 @@ class ListItem extends React.Component {
<
/View
>
<
/View
>
<
Text
style
=
{{
width
:
'
90%
'
,
color
:
'
grey
'
}}
>
{
getLastMsg
(
this
.
state
.
dataSource2
,
item
.
id
)}
<
/Text
>
<
View
style
=
{{
flexDirection
:
'
row
'
}}
>
<
Text
style
=
{{
color
:
'
#214274
'
,}}
>
{
getLastMsgSendBy
(
this
.
state
.
dataSource2
,
item
.
id
)
}
<
/Text
>
<
Text
style
=
{{
color
:
'
black
'
,
paddingLeft
:
10
,
fontSize
:
10
,
paddingTop
:
3
}}
>
{
getLastMsgTime
(
this
.
state
.
dataSource2
,
item
.
id
)}
<
/Text
>
<
/View
>
<
Text
style
=
{{
width
:
'
60%
'
,
color
:
'
grey
'
}}
>
{
getLastMsg
(
this
.
state
.
dataSource2
,
item
.
id
)}
<
/Text
>
<
View
style
=
{{
justifyContent
:
'
flex-end
'
,
flexDirection
:
'
row
'
,
marginTop
:
5
}}
>
{
buttonDelete
}
...
...
This diff is collapsed.
Click to expand it.
src/WebServices/RestClient.js
View file @
f0f1ae29
/*****MySql********/
//pre production environment (development)
//
export const API = "https://api-single.agile24x7.com/release/";
//
export const CHATAPI = "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
CHATAPI
=
"
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/";
// export const CHATAPI = "https://api-single.agile24x7.com/Migration";
// export const ReportsAPI = "https://apiv2reporting.agile24x7.com/";
// export const Client_URL = "https://novisync.agile24x7.com/#/";
/*****Postgress********/
// //pre production environment (development)
export
const
API
=
"
https://api-single.agile24x7.com/pg_migration/
"
;
export
const
CHATAPI
=
"
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 CHATAPI = "https://api-single.agile24x7.com/pg_migration";
//
export const ReportsAPI = "https://pgtestreporting.agile24x7.com/";
//
export const Client_URL = "https://pgtest.agile24x7.com/#/";
//production environment
...
...
This diff is collapsed.
Click to expand it.
src/splash.js
View file @
f0f1ae29
...
...
@@ -123,7 +123,7 @@ export default class App extends React.Component {
<
Image
style
=
{{
width
:
400
,
height
:
162
}}
source
=
{
require
(
'
./Images/agile2.png
'
)}
/
>
<
Text
style
=
{
styles
.
text
}
>
Powered
by
Novisync
<
/Text
>
<
Text
><
/Text
>
<
Text
style
=
{
styles
.
text1
}
>
1.0
.
16
0
2
-
25
-
2022
<
/Text
>
<
Text
style
=
{
styles
.
text1
}
>
1.0
.
16
0
3
-
04
-
2022
<
/Text
>
<
/View
>
);
};
...
...
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