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
9e803539
Commit
9e803539
authored
3 years ago
by
santhosh
Browse files
Options
Download
Email Patches
Plain Diff
added
parent
14018193
master
4-mysql-agile-mobile
mysql-agile-mobile
mysql-dev-agile-mobile
postgress-dev-agile-mobile
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/CommonComponents/AdminChatUser.js
+29
-3
src/CommonComponents/AdminChatUser.js
with
29 additions
and
3 deletions
+29
-3
src/CommonComponents/AdminChatUser.js
View file @
9e803539
...
...
@@ -31,6 +31,7 @@ import NetInfo from '@react-native-community/netinfo';
import
{
API
,
CHATAPI
}
from
"
../WebServices/RestClient
"
;
import
log
from
'
../LogFile/Log
'
;
import
{
launchCamera
,
launchImageLibrary
}
from
'
react-native-image-picker
'
;
import
Modal
from
"
react-native-simple-modal
"
;
const
options
=
{
title
:
'
Select Image
'
,
...
...
@@ -65,6 +66,7 @@ export default class AdminChatUser extends Component {
commentDetails
:
{},
SendImg
:
false
,
cls
:
'
1
'
,
open
:
false
};
// alert("Msgcount"+this.props.navigation.state.params.sno)
...
...
@@ -78,6 +80,15 @@ export default class AdminChatUser extends Component {
}
openModal
=
(
item
)
=>
{
// alert(JSON.stringify(item))
this
.
setState
({
open
:
true
,
image
:
item
})
}
//getting task related messages
getMessages
()
{
log
(
"
Info
"
,
"
getMessages(role, userToken, cropcode) is used getting task related messages
"
);
...
...
@@ -507,7 +518,8 @@ export default class AdminChatUser 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
!==
null
?
<
Image
source
=
{{
uri
:
item
.
reply_path
}}
style
=
{{
width
:
210
,
height
:
50
}}
/> : null
}
{
item
.
reply_path
!==
null
?
<
TouchableOpacity
onPress
=
{
this
.
openModal
(
item
)}
><
Image
source
=
{{
uri
:
item
.
reply_path
}}
style
=
{{
width
:
210
,
height
:
50
}}
/></
TouchableOpacity
>
:
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
'
))}
...
...
@@ -517,7 +529,7 @@ export default class AdminChatUser extends Component {
<
View
style
=
{[
styles
.
itemown
,
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
!==
null
?
<
Image
source
=
{{
uri
:
item
.
path
}}
style
=
{
styles
.
imageview
}
/> : null
}
{
item
.
path
!==
null
?
<
TouchableOpacity
onPress
=
{
this
.
openModal
(
item
)}
>
<
Image
source
=
{{
uri
:
item
.
path
}}
style
=
{
styles
.
imageview
}
/>
</
TouchableOpacity
>
:
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
'
))}
...
...
@@ -528,7 +540,7 @@ export default class AdminChatUser extends Component {
<
View
style
=
{[
styles
.
itemSingle
,
itemStyleSingle
]}
>
<
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
!==
null
?
<
Image
source
=
{{
uri
:
item
.
path
}}
style
=
{
styles
.
imageview
}
/> : null
}
{
item
.
path
!==
null
?
<
TouchableOpacity
onPress
=
{
this
.
openModal
(
item
)}
>
<
Image
source
=
{{
uri
:
item
.
path
}}
style
=
{
styles
.
imageview
}
/>
</
TouchableOpacity
>
:
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
'
))}
...
...
@@ -624,6 +636,20 @@ export default class AdminChatUser extends Component {
<
/View
>
<
/View
>
<
Modal
// offset={this.state.offset}
open
=
{
this
.
state
.
open
}
closeOnTouchOutside
=
{
false
}
modalDidOpen
=
{
this
.
modalDidOpen
}
modalDidClose
=
{
this
.
modalDidClose
}
style
=
{{
alignItems
:
"
center
"
}}
// disableOnBackPress={false}
>
<
View
style
=
{{
alignItems
:
"
center
"
,
}}
>
<
Image
source
=
{{
uri
:
this
.
state
.
path
}}
style
=
{
styles
.
imageview
}
/
>
<
/View
>
<
/Modal
>
{
/* </KeyboardAvoidingView> */
}
<
/Container
>
...
...
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