Commit 55f7ad36 authored by tejaswi's avatar tejaswi
Browse files

Changes

parents c6e847a3 42e8f064
Showing with 1464 additions and 537 deletions
+1464 -537
...@@ -136,8 +136,8 @@ android { ...@@ -136,8 +136,8 @@ android {
applicationId "com.agile24x7" applicationId "com.agile24x7"
minSdkVersion rootProject.ext.minSdkVersion minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 16 versionCode 19
versionName "1.0.14" versionName "1.0.16"
} }
......
...@@ -13280,6 +13280,14 @@ ...@@ -13280,6 +13280,14 @@
"resolved": "https://registry.npmjs.org/react-native-device-info/-/react-native-device-info-8.1.3.tgz", "resolved": "https://registry.npmjs.org/react-native-device-info/-/react-native-device-info-8.1.3.tgz",
"integrity": "sha512-73e3wiGFL8DvIXEd8x4Aq+mO8mZvHARwfYorIEu+X0trLHY92bP5Ict8DJHDjCQ0+HtAvpA4Wda2VoUVN1zh6Q==" "integrity": "sha512-73e3wiGFL8DvIXEd8x4Aq+mO8mZvHARwfYorIEu+X0trLHY92bP5Ict8DJHDjCQ0+HtAvpA4Wda2VoUVN1zh6Q=="
}, },
"react-native-document-picker": {
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/react-native-document-picker/-/react-native-document-picker-8.0.0.tgz",
"integrity": "sha512-4O1FNOJHzfZ7BBFOJhNoeCKHSjthFtZyMEWJsAxX1ORdShGSa6miLvTHtQjpCDMNWSoPU1C7fXLNNPrv8GAarQ==",
"requires": {
"invariant": "^2.2.4"
}
},
"react-native-drawer": { "react-native-drawer": {
"version": "2.5.1", "version": "2.5.1",
"resolved": "https://registry.npmjs.org/react-native-drawer/-/react-native-drawer-2.5.1.tgz", "resolved": "https://registry.npmjs.org/react-native-drawer/-/react-native-drawer-2.5.1.tgz",
...@@ -13388,6 +13396,11 @@ ...@@ -13388,6 +13396,11 @@
"resolved": "https://registry.npmjs.org/react-native-image-crop-picker/-/react-native-image-crop-picker-0.37.2.tgz", "resolved": "https://registry.npmjs.org/react-native-image-crop-picker/-/react-native-image-crop-picker-0.37.2.tgz",
"integrity": "sha512-YwZXW21Km8+3tSt0smTaLVgY4398c0/OJcpcH6EP0JDOt1BNNxl/R8m6qdvnwdXdIoa0CCnMVW6TL9IN5ia9OA==" "integrity": "sha512-YwZXW21Km8+3tSt0smTaLVgY4398c0/OJcpcH6EP0JDOt1BNNxl/R8m6qdvnwdXdIoa0CCnMVW6TL9IN5ia9OA=="
}, },
"react-native-image-picker": {
"version": "4.7.3",
"resolved": "https://registry.npmjs.org/react-native-image-picker/-/react-native-image-picker-4.7.3.tgz",
"integrity": "sha512-eRKm4wlsmZHmsWFyv77kYc2F+ZyEVqe0m7mqhsMzWk6TQT4FBDtEDxmRDDFq+ivCu/1QD+EPhmYcAIpeGr7Ekg=="
},
"react-native-indicators": { "react-native-indicators": {
"version": "0.17.0", "version": "0.17.0",
"resolved": "https://registry.npmjs.org/react-native-indicators/-/react-native-indicators-0.17.0.tgz", "resolved": "https://registry.npmjs.org/react-native-indicators/-/react-native-indicators-0.17.0.tgz",
......
...@@ -363,29 +363,30 @@ class ListItem extends Component { ...@@ -363,29 +363,30 @@ class ListItem extends Component {
<Text style={styles.iconSend} >{(item.name).substring(0, 2).toUpperCase()}</Text> <Text style={styles.iconSend} >{(item.name).substring(0, 2).toUpperCase()}</Text>
</View> </View>
<Text style={styles.signUpText1} >{item.name}</Text> <Text style={styles.signUpText1} >{item.name}</Text>
</View> </View>
{/* <View style={{ flexDirection: 'row', justifyContent: 'flex-end', alignItems: 'center' }}> */}
{getMessagesCount(this.state.dataSource2, item.id)} {getMessagesCount(this.state.dataSource2, item.id)}
{/* </View> */}
</View> </View>
<View style={{ flexDirection: 'row' }}>
<Text style={{ color: 'grey', width: '70%', paddingLeft: 60 }}> {getLastMsg(this.state.dataSource3, item.id)}</Text>
<Text style={{ color: 'grey', fontSize: 10 }}> {getLastMsgTime(this.state.dataSource3, item.id)}</Text>
</View>
<View> <View>
<Text style={{ color: 'black' }}> {getLastMsg(this.state.dataSource3, item.id)}</Text>
<Text style={{ color: 'black' }}> {getLastMsgTime(this.state.dataSource3, item.id)}</Text>
</View> </View>
</View> </View>
{/* <View {/* <View
style={{ style={{
marginTop: 15, marginTop: 15,
borderBottomColor: '#C0C0C0', borderBottomColor: '#C0C0C0',
borderBottomWidth: 0.2, borderBottomWidth: 0.2,
}} }}
/> */} /> */}
</View> </View>
...@@ -1503,4 +1504,4 @@ const pickerSelectStyles = StyleSheet.create({ ...@@ -1503,4 +1504,4 @@ const pickerSelectStyles = StyleSheet.create({
}, },
}); });
\ No newline at end of file
...@@ -28,10 +28,21 @@ import AsyncStorage from '@react-native-community/async-storage'; ...@@ -28,10 +28,21 @@ 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 { Title, Container, Content, Header, Right, Left, Body, Tab, Tabs, TabHeading, Footer, Item, Input, FooterTab, Subtitle } from 'native-base';
import moment from "moment"; import moment from "moment";
import NetInfo from '@react-native-community/netinfo'; import NetInfo from '@react-native-community/netinfo';
import { API } from "../WebServices/RestClient"; import { API,CHATAPI } from "../WebServices/RestClient";
import log from '../LogFile/Log'; import log from '../LogFile/Log';
import { launchCamera, launchImageLibrary } from 'react-native-image-picker';
const options = {
title: 'Select Image',
type: 'library',
options: {
maxHeight: 200,
maxWidth: 200,
selectionLimit: 1,
mediaType: 'photo',
includeBase64: false
},
}
export default class AdminChatUser extends Component { export default class AdminChatUser extends Component {
constructor(props) { constructor(props) {
...@@ -321,6 +332,50 @@ export default class AdminChatUser extends Component { ...@@ -321,6 +332,50 @@ export default class AdminChatUser extends Component {
// }); // });
} }
openGallery = async () => {
// alert("clicked")
const images = await launchImageLibrary(options);
console.log(images.assets[0])
const message = this.state.message;
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: images.assets[0].uri,
type: images.assets[0].type,
name: images.assets[0].fileName,
})
data.append('message', this.state.message)
data.append('action', 'media')
data.append('projectId', projectId)
data.append('corp_code', cropcode)
data.append('sendBy', userToken)
data.append('receivedBy', this.props.navigation.state.params.empId)
data.append('messagedBy', userToken)
data.append('api', CHATAPI)
data.append('reply_id', this.state.commentDetails.id ? this.state.commentDetails.id : "")
let res1 = await fetch(API + 'squad_send_file.php',
{
method: 'post',
body: data,
headers: {
'Content-Type': 'multipart/form-data; ',
},
}
);
let responseJson = await res1.json();
this.getMessages();
alert("Image Uploaded successfully")
});
});
}
renderDate = (date) => { renderDate = (date) => {
return ( return (
<Text style={styles.time}> <Text style={styles.time}>
...@@ -328,13 +383,14 @@ export default class AdminChatUser extends Component { ...@@ -328,13 +383,14 @@ export default class AdminChatUser extends Component {
</Text> </Text>
); );
} }
handlecom = (comment) => {
handlecom = (comment) => {
this.setState({ this.setState({
handleHover: true, handleHover: true,
commentDetails: comment commentDetails: comment
}) })
} }
handlecomClose = () => { handlecomClose = () => {
this.setState({ this.setState({
...@@ -367,7 +423,16 @@ export default class AdminChatUser extends Component { ...@@ -367,7 +423,16 @@ export default class AdminChatUser extends Component {
onPress={() => onPress={() =>
this.props.navigation.goBack()} /> this.props.navigation.goBack()} />
<Body style={styles.hstyles}> <Body style={styles.hstyles}>
<Title style={{ color: '#fff', fontSize: 14, paddingTop: 10,paddingLeft:10 }}>{this.props.navigation.state.params.name}</Title> <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}}>
{this.props.navigation.state.params.name}
</Text>
</View>
</Title>
<Subtitle></Subtitle> <Subtitle></Subtitle>
</Body> </Body>
...@@ -401,17 +466,18 @@ export default class AdminChatUser extends Component { ...@@ -401,17 +466,18 @@ export default class AdminChatUser extends Component {
<View style={[styles.itemReply, itemStyleReply]}> <View style={[styles.itemReply, itemStyleReply]}>
<View style={{ padding: 5, }}> <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>} {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}
<Text style={{ width: 210 }} selectable={true} key={Math.random()}>{item.reply_message}</Text> <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'))}
{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'))}
</View> </View>
</View> </View>
<View style={[styles.item, itemStyle]}> <View style={[styles.itemown, itemStyle]}>
<View style={{ padding: 5, }}> <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>} {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}
<Text style={{ width: 210 }} selectable={true} key={Math.random()}>{item.message}</Text> <Text style={{ width: 210 }} selectable={true} key={Math.random()}>{item.message}</Text>
{/* {item.path !== "" ? <Image source={{ uri: item.path }} style={styles.imageview } /> : null} */}
{!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'))}
{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'))}
</View> </View>
...@@ -421,8 +487,8 @@ export default class AdminChatUser extends Component { ...@@ -421,8 +487,8 @@ export default class AdminChatUser extends Component {
<View style={[styles.itemSingle, itemStyleSingle]}> <View style={[styles.itemSingle, itemStyleSingle]}>
<View style={{ padding: 5, }}> <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>} {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 !== null ? <Image source={{ uri: item.path }} style={styles.imageview} /> : null}
<Text selectable={true} key={Math.random()}>{item.message}</Text> <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'))}
{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'))}
</View> </View>
...@@ -448,19 +514,27 @@ export default class AdminChatUser extends Component { ...@@ -448,19 +514,27 @@ export default class AdminChatUser extends Component {
</View> </View>
} }
<View style={styles.inputContainer}> <View style={{ flexDirection: 'row' }}>
<TextInput style={styles.inputs} <View style={styles.inputContainer}>
placeholder="Write a message..." <TextInput style={styles.inputs}
underlineColorAndroid='transparent' placeholder="Message"
multiline={true} underlineColorAndroid='transparent'
onChangeText={(value) => this.setState({ message: value })} multiline={true}
value={this.state.message} /> 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() }}> <TouchableOpacity style={styles.btnSend} disabled={this.state.itemPressedDisabled} onPress={() => { this.sendMessageText() }}>
{/* <Image source={{uri:"https://png.icons8.com/small/75/ffffff/filled-sent.png"}} style={styles.iconSend} /> */}
<Image source={require('../Images/sent.png')} style={styles.iconSend} /> <Image source={require('../Images/sent.png')} style={styles.iconSend} />
</TouchableOpacity> </TouchableOpacity>
</View> </View>
</View> </View>
</View> </View>
...@@ -476,14 +550,15 @@ export default class AdminChatUser extends Component { ...@@ -476,14 +550,15 @@ export default class AdminChatUser extends Component {
//Styles fro UI //Styles fro UI
const styles = StyleSheet.create({ const styles = StyleSheet.create({
container: { container: {
flex: 1 flex: 1,
backgroundColor: '#efe6dd'
}, },
list: { list: {
paddingHorizontal: 17, paddingHorizontal: 17,
}, },
footer1: { footer1: {
flexDirection: 'column', flexDirection: 'column',
height: 130, height: 140,
backgroundColor: '#eeeeee', backgroundColor: '#eeeeee',
paddingHorizontal: 10, paddingHorizontal: 10,
padding: 5, padding: 5,
...@@ -492,24 +567,36 @@ const styles = StyleSheet.create({ ...@@ -492,24 +567,36 @@ const styles = StyleSheet.create({
footer: { footer: {
flexDirection: 'row', flexDirection: 'row',
height: 60, height: 60,
backgroundColor: '#eeeeee', backgroundColor: '#efe6dd',
paddingHorizontal: 10, paddingHorizontal: 10,
padding: 5, padding: 5,
}, },
btnSend: { btnSend: {
backgroundColor: "#00BFFF", backgroundColor: "#00BFFF",
width: 40, width: 40,
margin: 6,
height: 40, height: 40,
borderRadius: 360, borderRadius: 360,
alignItems: 'center', alignItems: 'center',
justifyContent: 'center', justifyContent: 'center',
top: -5
}, },
iconSend: { iconSend: {
width: 30, width: 25,
height: 30, height: 25,
alignSelf: 'center',
},
iconSendtop: {
width: 25,
height: 25,
alignSelf: 'center', alignSelf: 'center',
color: 'white',
padding:1
},
iconSendfile: {
width: 25,
height: 25,
}, },
inputContainer: { inputContainer: {
...@@ -517,16 +604,17 @@ const styles = StyleSheet.create({ ...@@ -517,16 +604,17 @@ const styles = StyleSheet.create({
backgroundColor: '#FFFFFF', backgroundColor: '#FFFFFF',
borderRadius: 30, borderRadius: 30,
borderBottomWidth: 1, borderBottomWidth: 1,
height: 40, height: 45,
flexDirection: 'row', flexDirection: 'row',
alignItems: 'center', // alignItems: 'center',
flex: 1, // flex: 1,
marginRight: 0, width: '85%',
marginTop: 5,
alignItems: 'baseline', alignItems: 'baseline',
}, },
imageview: { imageview: {
width: 350, width: 300,
resizeMode: 'contain', height: 200, resizeMode: 'contain', height: 200,
}, },
msgview: { msgview: {
...@@ -539,7 +627,8 @@ const styles = StyleSheet.create({ ...@@ -539,7 +627,8 @@ const styles = StyleSheet.create({
flex: 1, flex: 1,
// position:'absolute', // position:'absolute',
alignItems: 'baseline', alignItems: 'baseline',
paddingTop: 10 paddingTop: 10,
width: 90,
}, },
balloon: { balloon: {
maxWidth: 200, maxWidth: 200,
...@@ -589,12 +678,13 @@ const styles = StyleSheet.create({ ...@@ -589,12 +678,13 @@ const styles = StyleSheet.create({
color: "#808080", color: "#808080",
paddingRight: 10 paddingRight: 10
}, },
itemSingle: { itemSingle: {
marginVertical: 14, marginVertical: 14,
flex: 1, flex: 1,
flexDirection: 'row', flexDirection: 'row',
// paddingLeft:50, // paddingLeft:50,
backgroundColor: "#eeeeee", backgroundColor: "#fff",
borderRadius: 10, borderRadius: 10,
padding: 5, padding: 5,
}, },
...@@ -603,15 +693,25 @@ const styles = StyleSheet.create({ ...@@ -603,15 +693,25 @@ const styles = StyleSheet.create({
flex: 1, flex: 1,
flexDirection: 'row', flexDirection: 'row',
// paddingLeft:50, // paddingLeft:50,
backgroundColor: "#eeeeee", backgroundColor: "#fff",
borderRadius: 10, borderRadius: 10,
padding: 5, padding: 5,
}, },
itemBottom: { itemown: {
marginVertical: 14, marginVertical: 14,
flex: 1, flex: 1,
flexDirection: 'row', flexDirection: 'row',
// paddingLeft:50, // paddingLeft:50,
backgroundColor: "#fff",
borderRadius: 10,
padding: 5,
},
itemBottom: {
marginVertical: 14,
// flex: 1,
width: '88%',
flexDirection: 'row',
// paddingLeft:50,
backgroundColor: "#D2ECDF", backgroundColor: "#D2ECDF",
borderRadius: 10, borderRadius: 10,
padding: 5, padding: 5,
...@@ -621,7 +721,7 @@ const styles = StyleSheet.create({ ...@@ -621,7 +721,7 @@ const styles = StyleSheet.create({
flex: 1, flex: 1,
flexDirection: 'row', flexDirection: 'row',
// paddingLeft:50, // paddingLeft:50,
backgroundColor: "#D2ECDF", backgroundColor: "#e7ffdb",
borderRadius: 10, borderRadius: 10,
padding: 5, padding: 5,
}, },
......
...@@ -28,14 +28,25 @@ import AsyncStorage from '@react-native-community/async-storage'; ...@@ -28,14 +28,25 @@ 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 { Title, Container, Content, Header, Right, Left, Body, Tab, Tabs, TabHeading, Footer, Item, Input, FooterTab, Subtitle } from 'native-base';
import NetInfo from '@react-native-community/netinfo'; import NetInfo from '@react-native-community/netinfo';
import { API } from "../WebServices/RestClient"; import { API, CHATAPI } from "../WebServices/RestClient";
import log from '../LogFile/Log'; import log from '../LogFile/Log';
import { EMPLOYEEID } from './Header'; import { EMPLOYEEID } from './Header';
import moment from "moment"; import moment from "moment";
import { DataTable } from 'react-native-paper'; import { DataTable } from 'react-native-paper';
import { launchCamera, launchImageLibrary } from 'react-native-image-picker';
const options = {
title: 'Select Image',
type: 'library',
options: {
maxHeight: 200,
maxWidth: 200,
selectionLimit: 1,
mediaType: 'photo',
includeBase64: false
},
}
export default class GroupChat extends Component { export default class GroupChat extends Component {
constructor(props) { constructor(props) {
...@@ -673,6 +684,51 @@ export default class GroupChat extends Component { ...@@ -673,6 +684,51 @@ export default class GroupChat extends Component {
}); });
} }
attach = async () => {
// alert("clicked")
const images1 = await launchImageLibrary(options);
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")
});
});
}
renderDate = (date) => { renderDate = (date) => {
return ( return (
<Text style={styles.time}> <Text style={styles.time}>
...@@ -756,7 +812,8 @@ export default class GroupChat extends Component { ...@@ -756,7 +812,8 @@ export default class GroupChat extends Component {
<View style={[styles.itemReply, itemStyleReply]}> <View style={[styles.itemReply, itemStyleReply]}>
<View style={{ padding: 5, }}> <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>} {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>}
<Text style={{width:200}} selectable={true} key={Math.random()}>{item.reply_message}</Text> {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'))}
{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'))}
</View> </View>
...@@ -765,9 +822,8 @@ export default class GroupChat extends Component { ...@@ -765,9 +822,8 @@ export default class GroupChat extends Component {
<View style={[styles.item, itemStyle]}> <View style={[styles.item, itemStyle]}>
<View style={{ padding: 5, }}> <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>} {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>}
<Text style={{width:200}} selectable={true} key={Math.random()}>{item.message}</Text> {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'))}
{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'))}
</View> </View>
...@@ -797,27 +853,35 @@ export default class GroupChat extends Component { ...@@ -797,27 +853,35 @@ export default class GroupChat extends Component {
{this.state.handleHover && {this.state.handleHover &&
// alert(JSON.stringify(this.state.commentDetails)) // alert(JSON.stringify(this.state.commentDetails))
<View style={styles.itemBottom}> <View style={styles.itemBottom}>
<View style={{width:"90%"}}> <View style={{ width: "90%" }}>
<Text style={{ fontSize: 12, color: 'green' }}>{this.state.commentDetails.username}</Text> <Text style={{ fontSize: 12, color: 'green' }}>{this.state.commentDetails.username}</Text>
<Text style={{ fontSize: 12, color: 'black' }}>{this.state.commentDetails.message}</Text> <Text style={{ fontSize: 12, color: 'black' }}>{this.state.commentDetails.message}</Text>
</View> </View>
<TouchableOpacity onPress={() => this.handlecomClose()} ><Icon color={'#000'} size={25} style={{ marginLeft: 10,marginTop:5 }} name="times-circle-o" /></TouchableOpacity> <TouchableOpacity onPress={() => this.handlecomClose()} ><Icon color={'#000'} size={25} style={{ marginLeft: 10, marginTop: 5 }} name="times-circle-o" /></TouchableOpacity>
</View> </View>
} }
{/* <View style={styles.footer}> */} <View style={{ flexDirection: 'row' }}>
<View style={styles.inputContainer}> <View style={styles.inputContainer}>
<TextInput style={styles.inputs} <TextInput style={styles.inputs}
placeholder="Write a message..." placeholder="Message"
underlineColorAndroid='transparent' underlineColorAndroid='transparent'
multiline={true} multiline={true}
onChangeText={(value) => this.setState({ message: value })} onChangeText={(value) => this.setState({ message: value })}
value={this.state.message} /> 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() }}> <TouchableOpacity style={styles.btnSend} disabled={this.state.itemPressedDisabled} onPress={() => { this.sendMessageText() }}>
{/* <Image source={{uri:"https://png.icons8.com/small/75/ffffff/filled-sent.png"}} style={styles.iconSend} /> */}
<Image source={require('../Images/sent.png')} style={styles.iconSend} /> <Image source={require('../Images/sent.png')} style={styles.iconSend} />
</TouchableOpacity> </TouchableOpacity>
</View> </View>
</View> </View>
</View> </View>
{/* </View> */} {/* </View> */}
...@@ -833,57 +897,71 @@ export default class GroupChat extends Component { ...@@ -833,57 +897,71 @@ export default class GroupChat extends Component {
//Styles fro UI //Styles fro UI
const styles = StyleSheet.create({ const styles = StyleSheet.create({
container: { container: {
flex: 1 flex: 1,
backgroundColor: '#efe6dd'
}, },
list: { list: {
paddingHorizontal: 17, paddingHorizontal: 17,
}, },
footer1: { footer1: {
flexDirection: 'column', flexDirection: 'column',
height: 130, height: 140,
backgroundColor: '#eeeeee', backgroundColor: '#eeeeee',
paddingHorizontal: 10, paddingHorizontal: 10,
padding: 5, padding: 5,
paddingBottom:15 paddingBottom: 15
}, },
footer: { footer: {
flexDirection: 'row', flexDirection: 'row',
height: 60, height: 60,
backgroundColor: '#eeeeee', backgroundColor: '#efe6dd',
paddingHorizontal: 10, paddingHorizontal: 10,
padding: 5, padding: 5,
}, },
btnSend: { btnSend: {
backgroundColor: "#00BFFF", backgroundColor: "#00BFFF",
width: 40, width: 40,
margin: 6,
height: 40, height: 40,
borderRadius: 360, borderRadius: 360,
alignItems: 'center', alignItems: 'center',
justifyContent: 'center', justifyContent: 'center',
top:-5
}, },
iconSend: { iconSend: {
width: 30, width: 25,
height: 30, height: 25,
alignSelf: 'center', alignSelf: 'center',
}, },
iconSendtop: {
width: 25,
height: 25,
alignSelf: 'center',
color: 'white',
padding: 1
},
iconSendfile: {
width: 25,
height: 25,
},
inputContainer: { inputContainer: {
borderBottomColor: '#F5FCFF', borderBottomColor: '#F5FCFF',
backgroundColor: '#FFFFFF', backgroundColor: '#FFFFFF',
borderRadius: 30, borderRadius: 30,
borderBottomWidth: 1, borderBottomWidth: 1,
height: 40, height: 45,
flexDirection: 'row', flexDirection: 'row',
alignItems: 'center', // alignItems: 'center',
flex: 1, // flex: 1,
marginRight: 0, width: '85%',
marginTop: 5,
alignItems: 'baseline', alignItems: 'baseline',
}, },
imageview: { imageview: {
width: 350, width: 300,
resizeMode: 'contain', height: 200, resizeMode: 'contain', height: 200,
}, },
msgview: { msgview: {
...@@ -896,7 +974,8 @@ const styles = StyleSheet.create({ ...@@ -896,7 +974,8 @@ const styles = StyleSheet.create({
flex: 1, flex: 1,
// position:'absolute', // position:'absolute',
alignItems: 'baseline', alignItems: 'baseline',
paddingTop: 10 paddingTop: 10,
width: 90,
}, },
balloon: { balloon: {
maxWidth: 200, maxWidth: 200,
...@@ -946,12 +1025,13 @@ const styles = StyleSheet.create({ ...@@ -946,12 +1025,13 @@ const styles = StyleSheet.create({
color: "#808080", color: "#808080",
paddingRight: 10 paddingRight: 10
}, },
itemSingle: { itemSingle: {
marginVertical: 14, marginVertical: 14,
flex: 1, flex: 1,
flexDirection: 'row', flexDirection: 'row',
// paddingLeft:50, // paddingLeft:50,
backgroundColor: "#eeeeee", backgroundColor: "#fff",
borderRadius: 10, borderRadius: 10,
padding: 5, padding: 5,
}, },
...@@ -960,15 +1040,25 @@ const styles = StyleSheet.create({ ...@@ -960,15 +1040,25 @@ const styles = StyleSheet.create({
flex: 1, flex: 1,
flexDirection: 'row', flexDirection: 'row',
// paddingLeft:50, // paddingLeft:50,
backgroundColor: "#eeeeee", backgroundColor: "#fff",
borderRadius: 10, borderRadius: 10,
padding: 5, padding: 5,
}, },
itemBottom: { itemown: {
marginVertical: 14, marginVertical: 14,
flex: 1, flex: 1,
flexDirection: 'row', flexDirection: 'row',
// paddingLeft:50, // paddingLeft:50,
backgroundColor: "#fff",
borderRadius: 10,
padding: 5,
},
itemBottom: {
marginVertical: 14,
// flex: 1,
width: '88%',
flexDirection: 'row',
// paddingLeft:50,
backgroundColor: "#D2ECDF", backgroundColor: "#D2ECDF",
borderRadius: 10, borderRadius: 10,
padding: 5, padding: 5,
...@@ -978,7 +1068,7 @@ const styles = StyleSheet.create({ ...@@ -978,7 +1068,7 @@ const styles = StyleSheet.create({
flex: 1, flex: 1,
flexDirection: 'row', flexDirection: 'row',
// paddingLeft:50, // paddingLeft:50,
backgroundColor: "#D2ECDF", backgroundColor: "#e7ffdb",
borderRadius: 10, borderRadius: 10,
padding: 5, padding: 5,
}, },
......
/* /*
FileName:ReportBug.js FileName:UserSupport.js
Version:1.0.0 Version:1.0.0
Purpose: Report Bug Screen Purpose: User Support Screen
Devloper:Mahesh Reddy Devloper:Mahesh Reddy
*/ */
import React, { Component } from 'react'; import React, { Component } from 'react';
...@@ -12,7 +12,7 @@ import Icon from 'react-native-vector-icons/MaterialCommunityIcons'; ...@@ -12,7 +12,7 @@ import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
import SearchableDropdown from 'react-native-searchable-dropdown'; import SearchableDropdown from 'react-native-searchable-dropdown';
import AsyncStorage from '@react-native-community/async-storage'; import AsyncStorage from '@react-native-community/async-storage';
// import { tsMethodSignature } from '@babel/types'; // import { tsMethodSignature } from '@babel/types';
import { API } from "../WebServices/RestClient"; import { API, CHATAPI } from "../WebServices/RestClient";
import NetInfo from '@react-native-community/netinfo'; import NetInfo from '@react-native-community/netinfo';
import Snackbar from 'react-native-snackbar'; import Snackbar from 'react-native-snackbar';
import ModalSelector from 'react-native-modal-selector'; import ModalSelector from 'react-native-modal-selector';
...@@ -23,7 +23,19 @@ import { MAINTASKINFO, MAINTASKTITLE, DESCRIPTION, } from '../CommonComponents/H ...@@ -23,7 +23,19 @@ import { MAINTASKINFO, MAINTASKTITLE, DESCRIPTION, } from '../CommonComponents/H
import { ScrollView } from 'react-native-gesture-handler'; import { ScrollView } from 'react-native-gesture-handler';
import { EMPLOYEEID1, FULLNAME, USERNAME1, EMAIL1, MOBILE1, ADDEMPLOYEE, EMPLOYEEDETAILS } from '../CommonComponents/Header'; import { EMPLOYEEID1, FULLNAME, USERNAME1, EMAIL1, MOBILE1, ADDEMPLOYEE, EMPLOYEEDETAILS } from '../CommonComponents/Header';
import RadioButtonRN from 'radio-buttons-react-native'; import RadioButtonRN from 'radio-buttons-react-native';
import { launchCamera, launchImageLibrary } from 'react-native-image-picker';
const options = {
title: 'Select Image',
type: 'library',
options: {
maxHeight: 200,
maxWidth: 200,
selectionLimit: 1,
mediaType: 'photo',
includeBase64: false
},
}
export default class ReportBug extends Component { export default class ReportBug extends Component {
...@@ -31,101 +43,147 @@ export default class ReportBug extends Component { ...@@ -31,101 +43,147 @@ export default class ReportBug extends Component {
super(props); super(props);
this.state = { this.state = {
email_to_contact:'', email_to_contact: '',
bug_one_sen:'', bug_one_sen: '',
steps_for_bug:'', steps_for_bug: '',
docFile: '',
}; };
} }
//upload Report
reportBugimage = async () => {
log("Info", " onSignIn( usertype, user_status, password) is used to Adding the new Employee");
const images = await launchImageLibrary(options);
if (this.isValid()) {
//Adding the new Employee
onSignIn() {
log("Info", " onSignIn( usertype, user_status, password) is used to Adding the new Employee"); AsyncStorage.multiGet(["cropcode", "userName", "fullName"], (err, response) => {
const cropcode = response[0][1];
const userName = response[1][1];
const { empId, bug_one_sen, steps_for_bug, docFile } = this.state;
const data = new FormData();
data.append('file', {
uri: images.assets[0].uri,
type: images.assets[0].type,
name: images.assets[0].fileName,
})
data.append('action', 'releaseBug');
data.append('api', CHATAPI);
data.append('bug_one_sen', bug_one_sen);
data.append('email_to_contact', userName);
data.append('steps_for_bug', steps_for_bug);
NetInfo.fetch().then(state => {
if (state.type == "none") {
console.log(state.type);
log("Warn", "No internet connection");
Snackbar.show({
title: 'No Internet Connection',
backgroundColor: 'red',
duration: Snackbar.LENGTH_LONG,
});
} else {
fetch(API + 'report_bug.php', {
method: 'post',
body: data,
headers: {
'Content-Type': 'multipart/form-data; ',
},
}).then((response) => response.json())
.then((responseJson) => {
//alert(responseJson);
console.log(JSON.stringify(responseJson));
console.log(responseJson);
alert("Your report was sent successfully")
if (responseJson.status === 'True') {
this.props.navigation.navigate('MyTask');
}
else {
console.log(JSON.stringify(responseJson));
log("Warn", "Error found");
// alert("error");
// alert(responseJson.message)
}
}).catch((error) => {
console.error(error);
log("Error", "Adding the new Employee error");
});
}
});
});
}
}
//upload Report
reportBug() {
if (this.isValid()) { if (this.isValid()) {
console.log("staredt.,.................");
// console.log(this.state.designation);
// console.log(this.state.team); AsyncStorage.multiGet(["cropcode", "userName", "fullName"], (err, response) => {
// console.warn(this.state.usertype); const cropcode = response[0][1];
// console.warn("empId" + this.state.empId + "fulllname" + this.state.fullname + "username" + this.state.username + "mobile" + this.state.mobile + "emp_role" + this.state.emp_role); const userName = response[1][1];
console.log(this.state.email_to_contact); const { empId, bug_one_sen, steps_for_bug, email_to_contact, docFile } = this.state;
console.warn(this.state.bug_one_sen);
console.log(this.state.steps_for_bug); const data = new FormData();
const { empId, email_to_contact, bug_one_sen, steps_for_bug } = this.state; data.append('file', '')
data.append('action', 'releaseBug');
data.append('api', CHATAPI);
AsyncStorage.getItem("cropcode", (err, res) => { data.append('bug_one_sen', bug_one_sen);
const cropcode = res; data.append('email_to_contact', email_to_contact);
AsyncStorage.getItem("userToken", (err, res) => { data.append('steps_for_bug', steps_for_bug);
const userToken = res;
NetInfo.fetch().then(state => {
AsyncStorage.getItem("projectId", (err, res) => { if (state.type == "none") {
const projectId = res; console.log(state.type);
log("Warn", "No internet connection");
NetInfo.fetch().then(state => { Snackbar.show({
if (state.type == "none") { title: 'No Internet Connection',
console.log(state.type); backgroundColor: 'red',
log("Warn", "No internet connection"); duration: Snackbar.LENGTH_LONG,
Snackbar.show({
title: 'No Internet Connection',
backgroundColor: 'red',
duration: Snackbar.LENGTH_LONG,
});
} else {
fetch(API + 'report_bug.php', {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({
empId: empId,
fullname: this.state.fullname,
email: this.state.email,
username: this.state.username,
mobile: this.state.mobile,
action: "check_user",
corp: cropcode,
password: pass_code,
// team: team,
// functionalManager: fmanager,
// reportingManager: rmanager,
// designation: designation,
userType: usertype,
// user_status: user_status,
// created_by: "admin",
// created_by: userToken,
projectId: projectId,
})
}).then((response) => response.json())
.then((responseJson) => {
//alert(responseJson);
console.log(JSON.stringify(responseJson));
console.log(responseJson);
// alert(JSON.stringify(responseJson));
if (responseJson.status === 'True') {
this.props.navigation.navigate('UserManageEmployees');
}
else {
console.log(JSON.stringify(responseJson));
log("Warn", "Error found");
// alert("error");
alert(responseJson.message)
}
}).catch((error) => {
console.error(error);
log("Error", "Adding the new Employee error");
});
}
}); });
}); } else {
fetch(API + 'report_bug.php', {
method: 'post',
body: data,
headers: {
'Content-Type': 'multipart/form-data; ',
},
}).then((response) => response.json())
.then((responseJson) => {
//alert(responseJson);
console.log(JSON.stringify(responseJson));
console.log(responseJson);
alert("Your report was sent successfully")
if (responseJson.status === 'True') {
this.props.navigation.navigate('Login');
}
else {
console.log(JSON.stringify(responseJson));
log("Warn", "Error found");
// alert("error");
// alert(responseJson.message)
}
}).catch((error) => {
console.error(error);
log("Error", "Adding the new Employee error");
});
}
}); });
}); });
} }
} }
//Checking the Validations start //Checking the Validations start
...@@ -140,19 +198,31 @@ export default class ReportBug extends Component { ...@@ -140,19 +198,31 @@ export default class ReportBug extends Component {
if (!this.verifyEmail(email_to_contact)) { if (!this.verifyEmail(email_to_contact)) {
log("Warn", "Email should not be empty"); log("Warn", "Email should not be empty");
alert("Enter Email"); alert("Enter Email ");
} }
else if (bug_one_sen.length === 0) { else if (bug_one_sen.length === 0) {
log("Warn", "Bug should not be empty"); log("Warn", "Bug should not be empty");
alert("Enter Bug Report"); // alert("Enter Bug Report");
} }
else if (steps_for_bug.length === 0) { else if (steps_for_bug.length === 0) {
log("Warn", "Steps should not be empty"); log("Warn", "Steps should not be empty");
alert("Enter Steps of Bugs"); // alert("Enter Steps of Bugs");
} }
// else if (mobile.length === 0) {
// log("Warn", "mobile should not be empty");
// alert("Enter phonenumber");
// }
// else if (mobile.length > 10) {
// log("Warn", "mobile should not be greater than 10");
// alert("Invalid phonenumber");
// }
// else if (mobile.length < 10) {
// log("Warn", "mobile should not be less than 10");
// alert("Invalid phonenumber");
// }
else { else {
valid = true; valid = true;
} }
...@@ -173,6 +243,7 @@ export default class ReportBug extends Component { ...@@ -173,6 +243,7 @@ export default class ReportBug extends Component {
componentDidMount() { componentDidMount() {
//Getting Employees List //Getting Employees List
log("Debug", "Add Task screen is loaded"); log("Debug", "Add Task screen is loaded");
// alert("")
} }
...@@ -182,7 +253,6 @@ export default class ReportBug extends Component { ...@@ -182,7 +253,6 @@ export default class ReportBug extends Component {
<Container> <Container>
<Header <Header
androidStatusBarColor="#00A2C1" androidStatusBarColor="#00A2C1"
style={{ style={{
backgroundColor: '#00A2C1', backgroundColor: '#00A2C1',
height: 60, height: 60,
...@@ -191,15 +261,16 @@ export default class ReportBug extends Component { ...@@ -191,15 +261,16 @@ export default class ReportBug extends Component {
justifyContent: 'space-between', justifyContent: 'space-between',
}}> }}>
<Left> <Left>
<Icon name="arrow-left" size={25} style={{ color: '#fff', }} onPress={() => <Icon name="menu" size={25} style={{ color: '#fff' }} onPress={() =>
this.props.navigation.navigate('UserManageEmployees')} /> this.props.navigation.toggleDrawer()} />
</Left> </Left>
<Body> <Body>
<Title style={{ color: '#fff', fontWeight: '600' }}>Report Bug</Title> <Title style={{ color: '#fff', fontWeight: '600' }}>Report Support</Title>
</Body> </Body>
<Right></Right>
</Header> </Header>
<Content> <Content>
<Toast ref="toast" /> <Toast ref="toast" />
...@@ -208,14 +279,15 @@ export default class ReportBug extends Component { ...@@ -208,14 +279,15 @@ export default class ReportBug extends Component {
Tell us about the bug you found! Tell us about the bug you found!
</Text> </Text>
</View> </View>
<View style={{ paddingTop: 20, }}>
<View style={{ paddingTop: 20, }}>
<View style={{ paddingLeft: 10, }}> <View style={{ paddingLeft: 10, }}>
<View style={{ width: wp('95%'), }}> <View style={{ width: wp('95%'), }}>
<Text> <Text>
When The Bug Is Resolved, Which Email Should We Contact You At?* When The Bug Is Resolved, Which Email Should We Contact You At?*
</Text> </Text>
</View> </View>
<View> <View>
...@@ -224,12 +296,13 @@ export default class ReportBug extends Component { ...@@ -224,12 +296,13 @@ export default class ReportBug extends Component {
<TextInput style={{ width: wp('95%'), height: 45, borderBottomWidth: 1, }} <TextInput style={{ width: wp('95%'), height: 45, borderBottomWidth: 1, }}
placeholder="Enter Emai" placeholder="Enter Emai"
underlineColorAndroid='transparent' underlineColorAndroid='transparent'
value={this.state.email_to_contact} // value={this.state.email_to_contact}
onChangeText={(email_to_contact) => this.setState({ email_to_contact })} onChangeText={(email_to_contact) => this.setState({ email_to_contact })}
/> />
</View> </View>
</View> </View>
<View style={{ paddingLeft: 10, }}> <View style={{ paddingLeft: 10, }}>
<View style={{ width: wp('95%'), }}> <View style={{ width: wp('95%'), }}>
<Text> <Text>
...@@ -240,7 +313,7 @@ export default class ReportBug extends Component { ...@@ -240,7 +313,7 @@ export default class ReportBug extends Component {
<TextInput style={{ width: wp('95%'), height: 45, borderBottomWidth: 1, }} <TextInput style={{ width: wp('95%'), height: 45, borderBottomWidth: 1, }}
placeholder="Scrum board or Active Sprint: Sprint Name not displaying " placeholder="Scrum board or Active Sprint: Sprint Name not displaying "
underlineColorAndroid='transparent' underlineColorAndroid='transparent'
value={this.state.bug_one_sen} // value={this.state.bug_one_sen}
onChangeText={(bug_one_sen) => this.setState({ bug_one_sen })} onChangeText={(bug_one_sen) => this.setState({ bug_one_sen })}
/> />
...@@ -256,27 +329,29 @@ export default class ReportBug extends Component { ...@@ -256,27 +329,29 @@ export default class ReportBug extends Component {
<TextInput style={{ width: wp('95%'), height: 45, borderBottomWidth: 1, }} <TextInput style={{ width: wp('95%'), height: 45, borderBottomWidth: 1, }}
placeholder="1. Go to Dashboards | 2. Add a new Project " placeholder="1. Go to Dashboards | 2. Add a new Project "
maxLength={10} // maxLength={10}
keyboardType={"number-pad"} // keyboardType={"number-pad"}
underlineColorAndroid='transparent' underlineColorAndroid='transparent'
value={this.state.steps_for_bug} // value={this.state.steps_for_bug}
onChangeText={(steps_for_bug) => this.setState({ steps_for_bug })} onChangeText={(steps_for_bug) => this.setState({ steps_for_bug })}
/> />
</View> </View>
</View> </View>
<TouchableOpacity style={styles.upload}
onPress={this.reportBugimage} >
<Text style={{ color: 'white' }}>Uplaod</Text>
</TouchableOpacity>
<View style={{ flexDirection: 'row', marginTop: 10, justifyContent: "space-between" }}> <View style={{ flexDirection: 'row', marginTop: 10, justifyContent: "space-between" }}>
<TouchableOpacity style={styles.opensave}
onPress={() => this.onSignIn()} >
<Text style={{ color: 'white' }}>ADD</Text>
</TouchableOpacity>
<TouchableOpacity style={styles.opencancel} onPress={() => this.props.navigation.navigate('UserDashboard')}>
<Text style={{ color: 'white' }}>CANCEL</Text>
</TouchableOpacity>
<TouchableOpacity style={styles.opensave}
onPress={this.reportBug()} >
<Text style={{ color: 'white' }}>Submit</Text>
</TouchableOpacity>
</View> </View>
</View> </View>
...@@ -313,4 +388,17 @@ const styles = StyleSheet.create({ ...@@ -313,4 +388,17 @@ const styles = StyleSheet.create({
}, },
}), }),
}, },
upload: {
flex: 1,
...Platform.select({
ios: {
backgroundColor: '#f1f0ef', margin: 20, height: 30, alignItems:
"center", justifyContent: 'center'
},
android: {
backgroundColor: '#f1f0ef', margin: 20, height: 30, alignItems:
"center", justifyContent: 'center'
},
}),
},
}); });
\ No newline at end of file
...@@ -28,12 +28,23 @@ import AsyncStorage from '@react-native-community/async-storage'; ...@@ -28,12 +28,23 @@ 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 { Title, Container, Content, Header, Right, Left, Body, Tab, Tabs, TabHeading, Footer, Item, Input, FooterTab, Subtitle } from 'native-base';
import NetInfo from '@react-native-community/netinfo'; import NetInfo from '@react-native-community/netinfo';
import { API } from "../WebServices/RestClient"; import { API, CHATAPI } from "../WebServices/RestClient";
import log from '../LogFile/Log'; import log from '../LogFile/Log';
import { EMPLOYEEID } from './Header'; import { EMPLOYEEID } from './Header';
import moment from "moment"; import moment from "moment";
import { launchCamera, launchImageLibrary } from 'react-native-image-picker';
const options = {
title: 'Select Image',
type: 'library',
options: {
maxHeight: 200,
maxWidth: 200,
selectionLimit: 1,
mediaType: 'photo',
includeBase64: false
},
}
export default class TaskChat extends Component { export default class TaskChat extends Component {
constructor(props) { constructor(props) {
...@@ -665,7 +676,50 @@ export default class TaskChat extends Component { ...@@ -665,7 +676,50 @@ export default class TaskChat extends Component {
}); });
}); });
} }
attach = async () => {
// alert("clicked")
const images1 = await launchImageLibrary(options);
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")
});
});
}
...@@ -750,7 +804,8 @@ export default class TaskChat extends Component { ...@@ -750,7 +804,8 @@ export default class TaskChat extends Component {
<View style={[styles.itemReply, itemStyleReply]}> <View style={[styles.itemReply, itemStyleReply]}>
<View style={{ padding: 5, }}> <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>} {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>}
<Text style={{ width: 200 }} selectable={true} key={Math.random()}>{item.reply_message}</Text> {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'))}
{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'))}
</View> </View>
...@@ -759,9 +814,8 @@ export default class TaskChat extends Component { ...@@ -759,9 +814,8 @@ export default class TaskChat extends Component {
<View style={[styles.item, itemStyle]}> <View style={[styles.item, itemStyle]}>
<View style={{ padding: 5, }}> <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>} {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>}
<Text style={{ width: 200 }} selectable={true} key={Math.random()}>{item.message}</Text> {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'))}
{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'))}
</View> </View>
...@@ -773,7 +827,7 @@ export default class TaskChat extends Component { ...@@ -773,7 +827,7 @@ export default class TaskChat extends Component {
<View style={{ padding: 5, }}> <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>} {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 selectable={true} key={Math.random()}>{item.message}</Text> <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'))}
{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'))}
</View> </View>
...@@ -786,29 +840,32 @@ export default class TaskChat extends Component { ...@@ -786,29 +840,32 @@ export default class TaskChat extends Component {
</ScrollView> </ScrollView>
<View style={this.state.handleHover === true ? styles.footer1 : styles.footer}> <View style={this.state.handleHover === true ? styles.footer1 : styles.footer}>
{this.state.handleHover && {this.state.handleHover &&
// alert(JSON.stringify(this.state.commentDetails)) // alert(JSON.stringify(this.state.commentDetails))
<View style={styles.itemBottom}> <View style={styles.itemBottom}>
<View style={{width:"90%"}}> <View style={{ width: "90%" }}>
<Text style={{ fontSize: 12, color: 'green' }}>{this.state.commentDetails.username}</Text> <Text style={{ fontSize: 12, color: 'green' }}>{this.state.commentDetails.username}</Text>
<Text style={{ fontSize: 12, color: 'black' }}>{this.state.commentDetails.message}</Text> <Text style={{ fontSize: 12, color: 'black' }}>{this.state.commentDetails.message}</Text>
</View> </View>
<TouchableOpacity onPress={() => this.handlecomClose()} ><Icon color={'#000'} size={25} style={{ marginLeft: 10,marginTop:5 }} name="times-circle-o" /></TouchableOpacity> <TouchableOpacity onPress={() => this.handlecomClose()} ><Icon color={'#000'} size={25} style={{ marginLeft: 10, marginTop: 5 }} name="times-circle-o" /></TouchableOpacity>
</View> </View>
} }
{/* <View style={styles.footer}> */} <View style={{ flexDirection: 'row' }}>
<View style={styles.inputContainer}> <View style={styles.inputContainer}>
<TextInput style={styles.inputs} <TextInput style={styles.inputs}
placeholder="Write a message..." placeholder="Message"
underlineColorAndroid='transparent' underlineColorAndroid='transparent'
multiline={true} multiline={true}
onChangeText={(value) => this.setState({ message: value })} onChangeText={(value) => this.setState({ message: value })}
value={this.state.message} /> 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() }}> <TouchableOpacity style={styles.btnSend} disabled={this.state.itemPressedDisabled} onPress={() => { this.sendMessageText() }}>
{/* <Image source={{uri:"https://png.icons8.com/small/75/ffffff/filled-sent.png"}} style={styles.iconSend} /> */}
<Image source={require('../Images/sent.png')} style={styles.iconSend} /> <Image source={require('../Images/sent.png')} style={styles.iconSend} />
</TouchableOpacity> </TouchableOpacity>
</View> </View>
...@@ -827,57 +884,71 @@ export default class TaskChat extends Component { ...@@ -827,57 +884,71 @@ export default class TaskChat extends Component {
//Styles fro UI //Styles fro UI
const styles = StyleSheet.create({ const styles = StyleSheet.create({
container: { container: {
flex: 1 flex: 1,
backgroundColor: '#efe6dd'
}, },
list: { list: {
paddingHorizontal: 17, paddingHorizontal: 17,
}, },
footer1: { footer1: {
flexDirection: 'column', flexDirection: 'column',
height: 130, height: 140,
backgroundColor: '#eeeeee', backgroundColor: '#eeeeee',
paddingHorizontal: 10, paddingHorizontal: 10,
padding: 5, padding: 5,
paddingBottom:15 paddingBottom: 15
}, },
footer: { footer: {
flexDirection: 'row', flexDirection: 'row',
height: 60, height: 60,
backgroundColor: '#eeeeee', backgroundColor: '#efe6dd',
paddingHorizontal: 10, paddingHorizontal: 10,
padding: 5, padding: 5,
}, },
btnSend: { btnSend: {
backgroundColor: "#00BFFF", backgroundColor: "#00BFFF",
width: 40, width: 40,
margin: 6,
height: 40, height: 40,
borderRadius: 360, borderRadius: 360,
alignItems: 'center', alignItems: 'center',
justifyContent: 'center', justifyContent: 'center',
top:-5
}, },
iconSend: { iconSend: {
width: 30, width: 25,
height: 30, height: 25,
alignSelf: 'center', alignSelf: 'center',
}, },
iconSendtop: {
width: 25,
height: 25,
alignSelf: 'center',
color: 'white',
padding: 1
},
iconSendfile: {
width: 25,
height: 25,
},
inputContainer: { inputContainer: {
borderBottomColor: '#F5FCFF', borderBottomColor: '#F5FCFF',
backgroundColor: '#FFFFFF', backgroundColor: '#FFFFFF',
borderRadius: 30, borderRadius: 30,
borderBottomWidth: 1, borderBottomWidth: 1,
height: 40, height: 45,
flexDirection: 'row', flexDirection: 'row',
alignItems: 'center', // alignItems: 'center',
flex: 1, // flex: 1,
marginRight: 0, width: '85%',
marginTop: 5,
alignItems: 'baseline', alignItems: 'baseline',
}, },
imageview: { imageview: {
width: 350, width: 300,
resizeMode: 'contain', height: 200, resizeMode: 'contain', height: 200,
}, },
msgview: { msgview: {
...@@ -890,7 +961,8 @@ const styles = StyleSheet.create({ ...@@ -890,7 +961,8 @@ const styles = StyleSheet.create({
flex: 1, flex: 1,
// position:'absolute', // position:'absolute',
alignItems: 'baseline', alignItems: 'baseline',
paddingTop: 10 paddingTop: 10,
width: 90,
}, },
balloon: { balloon: {
maxWidth: 200, maxWidth: 200,
...@@ -940,12 +1012,13 @@ const styles = StyleSheet.create({ ...@@ -940,12 +1012,13 @@ const styles = StyleSheet.create({
color: "#808080", color: "#808080",
paddingRight: 10 paddingRight: 10
}, },
itemSingle: { itemSingle: {
marginVertical: 14, marginVertical: 14,
flex: 1, flex: 1,
flexDirection: 'row', flexDirection: 'row',
// paddingLeft:50, // paddingLeft:50,
backgroundColor: "#eeeeee", backgroundColor: "#fff",
borderRadius: 10, borderRadius: 10,
padding: 5, padding: 5,
}, },
...@@ -954,15 +1027,25 @@ const styles = StyleSheet.create({ ...@@ -954,15 +1027,25 @@ const styles = StyleSheet.create({
flex: 1, flex: 1,
flexDirection: 'row', flexDirection: 'row',
// paddingLeft:50, // paddingLeft:50,
backgroundColor: "#eeeeee", backgroundColor: "#fff",
borderRadius: 10, borderRadius: 10,
padding: 5, padding: 5,
}, },
itemBottom: { itemown: {
marginVertical: 14, marginVertical: 14,
flex: 1, flex: 1,
flexDirection: 'row', flexDirection: 'row',
// paddingLeft:50, // paddingLeft:50,
backgroundColor: "#fff",
borderRadius: 10,
padding: 5,
},
itemBottom: {
marginVertical: 14,
// flex: 1,
width: '88%',
flexDirection: 'row',
// paddingLeft:50,
backgroundColor: "#D2ECDF", backgroundColor: "#D2ECDF",
borderRadius: 10, borderRadius: 10,
padding: 5, padding: 5,
...@@ -972,7 +1055,7 @@ const styles = StyleSheet.create({ ...@@ -972,7 +1055,7 @@ const styles = StyleSheet.create({
flex: 1, flex: 1,
flexDirection: 'row', flexDirection: 'row',
// paddingLeft:50, // paddingLeft:50,
backgroundColor: "#D2ECDF", backgroundColor: "#e7ffdb",
borderRadius: 10, borderRadius: 10,
padding: 5, padding: 5,
}, },
......
...@@ -28,9 +28,21 @@ import AsyncStorage from '@react-native-community/async-storage'; ...@@ -28,9 +28,21 @@ 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 { Title, Container, Content, Header, Right, Left, Body, Tab, Tabs, TabHeading, Footer, Item, Input, FooterTab, Subtitle } from 'native-base';
import moment from "moment"; import moment from "moment";
import NetInfo from '@react-native-community/netinfo'; import NetInfo from '@react-native-community/netinfo';
import { API } from "../WebServices/RestClient"; import { API, CHATAPI } from "../WebServices/RestClient";
import log from '../LogFile/Log'; import log from '../LogFile/Log';
import { launchCamera, launchImageLibrary } from 'react-native-image-picker';
const options = {
title: 'Select Image',
type: 'library',
options: {
maxHeight: 200,
maxWidth: 200,
selectionLimit: 1,
mediaType: 'photo',
includeBase64: false
},
}
export default class UserChat extends Component { export default class UserChat extends Component {
...@@ -261,7 +273,50 @@ export default class UserChat extends Component { ...@@ -261,7 +273,50 @@ export default class UserChat extends Component {
}); });
}); });
} }
attach = async () => {
// alert("clicked")
const images1 = await launchImageLibrary(options);
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('projectId', projectId)
data.append('messagedBy', userToken)
data.append('api', CHATAPI)
data.append('sendBy',userToken);
data.append('receivedBy',this.props.navigation.state.params.empId);
data.append('reply_id', this.state.commentDetails.id ? this.state.commentDetails.id : "")
let res1 = await fetch(API+'userChat1.php',
{
method: 'post',
body: data,
headers: {
'Content-Type': 'multipart/form-data; ',
},
}
);
let responseJson = await res1.json();
this.getMessages();
alert("Image Uploaded successfully")
});
});
}
renderDate = (date) => { renderDate = (date) => {
return ( return (
<Text style={styles.time}> <Text style={styles.time}>
...@@ -343,6 +398,7 @@ export default class UserChat extends Component { ...@@ -343,6 +398,7 @@ export default class UserChat extends Component {
<View style={[styles.itemReply, itemStyleReply]}> <View style={[styles.itemReply, itemStyleReply]}>
<View style={{ padding: 5, }}> <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>} {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}
<Text style={{ width: 210 }} selectable={true} key={Math.random()}>{item.reply_message}</Text> <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'))}
{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'))}
...@@ -351,9 +407,8 @@ export default class UserChat extends Component { ...@@ -351,9 +407,8 @@ export default class UserChat extends Component {
<View style={[styles.item, itemStyle]}> <View style={[styles.item, itemStyle]}>
<View style={{ padding: 5, }}> <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>} {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}
<Text style={{ width: 210 }} selectable={true} key={Math.random()}>{item.message}</Text> <Text style={{ width: 210 }} selectable={true} key={Math.random()}>{item.message}</Text>
{/* {item.path !== "" ? <Image source={{ uri: item.path }} style={styles.imageview } /> : null} */}
{!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'))}
{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'))}
</View> </View>
...@@ -364,7 +419,7 @@ export default class UserChat extends Component { ...@@ -364,7 +419,7 @@ export default class UserChat extends Component {
<View style={{ padding: 5, }}> <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>} {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 selectable={true} key={Math.random()}>{item.message}</Text> <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'))}
{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'))}
</View> </View>
...@@ -391,19 +446,27 @@ export default class UserChat extends Component { ...@@ -391,19 +446,27 @@ export default class UserChat extends Component {
</View> </View>
} }
<View style={styles.inputContainer}> <View style={{ flexDirection: 'row' }}>
<TextInput style={styles.inputs} <View style={styles.inputContainer}>
placeholder="Write a message..." <TextInput style={styles.inputs}
underlineColorAndroid='transparent' placeholder="Message"
multiline={true} underlineColorAndroid='transparent'
onChangeText={(value) => this.setState({ message: value })} multiline={true}
value={this.state.message} /> 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() }}> <TouchableOpacity style={styles.btnSend} disabled={this.state.itemPressedDisabled} onPress={() => { this.sendMessageText() }}>
{/* <Image source={{uri:"https://png.icons8.com/small/75/ffffff/filled-sent.png"}} style={styles.iconSend} /> */}
<Image source={require('../Images/sent.png')} style={styles.iconSend} /> <Image source={require('../Images/sent.png')} style={styles.iconSend} />
</TouchableOpacity> </TouchableOpacity>
</View> </View>
</View> </View>
</View> </View>
...@@ -419,14 +482,15 @@ export default class UserChat extends Component { ...@@ -419,14 +482,15 @@ export default class UserChat extends Component {
//Styles fro UI //Styles fro UI
const styles = StyleSheet.create({ const styles = StyleSheet.create({
container: { container: {
flex: 1 flex: 1,
backgroundColor: '#efe6dd'
}, },
list: { list: {
paddingHorizontal: 17, paddingHorizontal: 17,
}, },
footer1: { footer1: {
flexDirection: 'column', flexDirection: 'column',
height: 130, height: 140,
backgroundColor: '#eeeeee', backgroundColor: '#eeeeee',
paddingHorizontal: 10, paddingHorizontal: 10,
padding: 5, padding: 5,
...@@ -435,41 +499,54 @@ const styles = StyleSheet.create({ ...@@ -435,41 +499,54 @@ const styles = StyleSheet.create({
footer: { footer: {
flexDirection: 'row', flexDirection: 'row',
height: 60, height: 60,
backgroundColor: '#eeeeee', backgroundColor: '#efe6dd',
paddingHorizontal: 10, paddingHorizontal: 10,
padding: 5, padding: 5,
}, },
btnSend: { btnSend: {
backgroundColor: "#00BFFF", backgroundColor: "#00BFFF",
width: 40, width: 40,
margin: 6,
height: 40, height: 40,
borderRadius: 360, borderRadius: 360,
alignItems: 'center', alignItems: 'center',
justifyContent: 'center', justifyContent: 'center',
top: -5
}, },
iconSend: { iconSend: {
width: 30, width: 25,
height: 30, height: 25,
alignSelf: 'center', alignSelf: 'center',
}, },
iconSendtop: {
width: 25,
height: 25,
alignSelf: 'center',
color: 'white',
padding: 1
},
iconSendfile: {
width: 25,
height: 25,
},
inputContainer: { inputContainer: {
borderBottomColor: '#F5FCFF', borderBottomColor: '#F5FCFF',
backgroundColor: '#FFFFFF', backgroundColor: '#FFFFFF',
borderRadius: 30, borderRadius: 30,
borderBottomWidth: 1, borderBottomWidth: 1,
height: 40, height: 45,
flexDirection: 'row', flexDirection: 'row',
alignItems: 'center', // alignItems: 'center',
flex: 1, // flex: 1,
marginRight: 0, width: '85%',
marginTop: 5,
alignItems: 'baseline', alignItems: 'baseline',
}, },
imageview: { imageview: {
width: 350, width: 300,
resizeMode: 'contain', height: 200, resizeMode: 'contain', height: 200,
}, },
msgview: { msgview: {
...@@ -482,7 +559,8 @@ const styles = StyleSheet.create({ ...@@ -482,7 +559,8 @@ const styles = StyleSheet.create({
flex: 1, flex: 1,
// position:'absolute', // position:'absolute',
alignItems: 'baseline', alignItems: 'baseline',
paddingTop: 10 paddingTop: 10,
width: 90,
}, },
balloon: { balloon: {
maxWidth: 200, maxWidth: 200,
...@@ -532,12 +610,13 @@ const styles = StyleSheet.create({ ...@@ -532,12 +610,13 @@ const styles = StyleSheet.create({
color: "#808080", color: "#808080",
paddingRight: 10 paddingRight: 10
}, },
itemSingle: { itemSingle: {
marginVertical: 14, marginVertical: 14,
flex: 1, flex: 1,
flexDirection: 'row', flexDirection: 'row',
// paddingLeft:50, // paddingLeft:50,
backgroundColor: "#eeeeee", backgroundColor: "#fff",
borderRadius: 10, borderRadius: 10,
padding: 5, padding: 5,
}, },
...@@ -546,15 +625,25 @@ const styles = StyleSheet.create({ ...@@ -546,15 +625,25 @@ const styles = StyleSheet.create({
flex: 1, flex: 1,
flexDirection: 'row', flexDirection: 'row',
// paddingLeft:50, // paddingLeft:50,
backgroundColor: "#eeeeee", backgroundColor: "#fff",
borderRadius: 10, borderRadius: 10,
padding: 5, padding: 5,
}, },
itemBottom: { itemown: {
marginVertical: 14, marginVertical: 14,
flex: 1, flex: 1,
flexDirection: 'row', flexDirection: 'row',
// paddingLeft:50, // paddingLeft:50,
backgroundColor: "#fff",
borderRadius: 10,
padding: 5,
},
itemBottom: {
marginVertical: 14,
// flex: 1,
width: '88%',
flexDirection: 'row',
// paddingLeft:50,
backgroundColor: "#D2ECDF", backgroundColor: "#D2ECDF",
borderRadius: 10, borderRadius: 10,
padding: 5, padding: 5,
...@@ -564,7 +653,7 @@ const styles = StyleSheet.create({ ...@@ -564,7 +653,7 @@ const styles = StyleSheet.create({
flex: 1, flex: 1,
flexDirection: 'row', flexDirection: 'row',
// paddingLeft:50, // paddingLeft:50,
backgroundColor: "#D2ECDF", backgroundColor: "#e7ffdb",
borderRadius: 10, borderRadius: 10,
padding: 5, padding: 5,
}, },
......
src/Images/paperclip.png

13.3 KB

src/Images/support.png

52.4 KB

...@@ -550,6 +550,11 @@ export default class Login extends Component { ...@@ -550,6 +550,11 @@ export default class Login extends Component {
<Text style={styles.signUpTextforgot}>Forgot Password ?</Text> <Text style={styles.signUpTextforgot}>Forgot Password ?</Text>
<Text style={styles.signUpTextforgotred}>Click here</Text> <Text style={styles.signUpTextforgotred}>Click here</Text>
</TouchableOpacity> </TouchableOpacity>
<TouchableOpacity onPress={() => this.props.navigation.navigate("ReportBug")} style={[styles.buttonContainerforgot,]}>
<Text style={styles.signUpTextforgot}>Support</Text>
<Icon name="handshake-o" size={20} style={{ color: '#fff',}} />
</TouchableOpacity>
<View > <View >
{/* <Text style={{ color: 'white' }} onPress={()=>this.props.navigation.navigate('RegisterUser')}> New User ? </Text> */} {/* <Text style={{ color: 'white' }} onPress={()=>this.props.navigation.navigate('RegisterUser')}> New User ? </Text> */}
</View> </View>
......
/*
FileName:UserSupport.js
Version:1.0.0
Purpose: User Support Screen
Devloper:Mahesh Reddy
*/
import React, { Component } from 'react';
import { Platform, StyleSheet, Text, View, StatusBar, Dimensions, Picker, TouchableOpacity, Linking, TextInput, Alert } from 'react-native';
import { Title, Button, Container, Content, Header, Right, Left, Body, Tab, Tabs, TabHeading, Footer, Item, Input, FooterTab } from 'native-base';
import { widthPercentageToDP as wp, heightPercentageToDP as hp } from 'react-native-responsive-screen';
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
import SearchableDropdown from 'react-native-searchable-dropdown';
import AsyncStorage from '@react-native-community/async-storage';
// import { tsMethodSignature } from '@babel/types';
import { API, CHATAPI } from "../WebServices/RestClient";
import NetInfo from '@react-native-community/netinfo';
import Snackbar from 'react-native-snackbar';
import ModalSelector from 'react-native-modal-selector';
// import { Dropdown } from 'react-native-material-dropdown';
import log from '../LogFile/Log';
import Toast from 'react-native-whc-toast';
import { MAINTASKINFO, MAINTASKTITLE, DESCRIPTION, } from '../CommonComponents/Header';
import { ScrollView } from 'react-native-gesture-handler';
import { EMPLOYEEID1, FULLNAME, USERNAME1, EMAIL1, MOBILE1, ADDEMPLOYEE, EMPLOYEEDETAILS } from '../CommonComponents/Header';
import RadioButtonRN from 'radio-buttons-react-native';
import { launchCamera, launchImageLibrary } from 'react-native-image-picker';
const options = {
title: 'Select Image',
type: 'library',
options: {
maxHeight: 200,
maxWidth: 200,
selectionLimit: 1,
mediaType: 'photo',
includeBase64: false
},
}
export default class UserSupport extends Component {
constructor(props) {
super(props);
this.state = {
email_to_contact: '',
bug_one_sen: '',
steps_for_bug: '',
docFile: '',
};
}
//upload Report
reportBugimage = async () => {
log("Info", " onSignIn( usertype, user_status, password) is used to Adding the new Employee");
const images = await launchImageLibrary(options);
if (this.isValid()) {
AsyncStorage.multiGet(["cropcode", "userName", "fullName"], (err, response) => {
const cropcode = response[0][1];
const userName = response[1][1];
const { empId, bug_one_sen, steps_for_bug, docFile } = this.state;
const data = new FormData();
data.append('file', {
uri: images.assets[0].uri,
type: images.assets[0].type,
name: images.assets[0].fileName,
})
data.append('action', 'releaseBug');
data.append('api', CHATAPI);
data.append('bug_one_sen', bug_one_sen);
data.append('email_to_contact', userName);
data.append('steps_for_bug', steps_for_bug);
NetInfo.fetch().then(state => {
if (state.type == "none") {
console.log(state.type);
log("Warn", "No internet connection");
Snackbar.show({
title: 'No Internet Connection',
backgroundColor: 'red',
duration: Snackbar.LENGTH_LONG,
});
} else {
fetch(API + 'report_bug.php', {
method: 'post',
body: data,
headers: {
'Content-Type': 'multipart/form-data; ',
},
}).then((response) => response.json())
.then((responseJson) => {
//alert(responseJson);
console.log(JSON.stringify(responseJson));
console.log(responseJson);
alert("Your report was sent successfully")
if (responseJson.status === 'True') {
this.props.navigation.navigate('Login');
}
else {
console.log(JSON.stringify(responseJson));
log("Warn", "Error found");
// alert("error");
// alert(responseJson.message)
}
}).catch((error) => {
console.error(error);
log("Error", "Adding the new Employee error");
});
}
});
});
}
}
//upload Report
reportBug(){
if (this.isValid()) {
AsyncStorage.multiGet(["cropcode", "userName", "fullName"], (err, response) => {
const cropcode = response[0][1];
const userName = response[1][1];
const { empId, bug_one_sen, steps_for_bug, docFile } = this.state;
const data = new FormData();
data.append('file', '')
data.append('action', 'releaseBug');
data.append('api', CHATAPI);
data.append('bug_one_sen', bug_one_sen);
data.append('email_to_contact', userName);
data.append('steps_for_bug', steps_for_bug);
NetInfo.fetch().then(state => {
if (state.type == "none") {
console.log(state.type);
log("Warn", "No internet connection");
Snackbar.show({
title: 'No Internet Connection',
backgroundColor: 'red',
duration: Snackbar.LENGTH_LONG,
});
} else {
fetch(API + 'report_bug.php', {
method: 'post',
body: data,
headers: {
'Content-Type': 'multipart/form-data; ',
},
}).then((response) => response.json())
.then((responseJson) => {
//alert(responseJson);
console.log(JSON.stringify(responseJson));
console.log(responseJson);
alert("Your report was sent successfully")
if (responseJson.status === 'True') {
this.props.navigation.navigate('Login');
}
else {
console.log(JSON.stringify(responseJson));
log("Warn", "Error found");
// alert("error");
// alert(responseJson.message)
}
}).catch((error) => {
console.error(error);
log("Error", "Adding the new Employee error");
});
}
});
});
}
}
//Checking the Validations start
isValid() {
var { email_to_contact, bug_one_sen, steps_for_bug } = this.state;
let valid = false;
// if (empId.length === 0) {
// log("Warn", "empId should not be empty");
// alert("Enter Employee Id");
// }
// if (!this.verifyEmail(email_to_contact)) {
// log("Warn", "Email should not be empty");
// alert("Enter Email");
// }
if (bug_one_sen.length === 0) {
log("Warn", "Bug should not be empty");
// alert("Enter Bug Report");
}
else if (steps_for_bug.length === 0) {
log("Warn", "Steps should not be empty");
// alert("Enter Steps of Bugs");
}
// else if (mobile.length === 0) {
// log("Warn", "mobile should not be empty");
// alert("Enter phonenumber");
// }
// else if (mobile.length > 10) {
// log("Warn", "mobile should not be greater than 10");
// alert("Invalid phonenumber");
// }
// else if (mobile.length < 10) {
// log("Warn", "mobile should not be less than 10");
// alert("Invalid phonenumber");
// }
else {
valid = true;
}
return valid;
}
verifyEmail(email_to_contact) {
var reg = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
return reg.test(email_to_contact);
}
//Checking the Validations end
//Add or Mpdify the Maintask close
// componentDidMount() {
// //Getting Employees List
// log("Debug", "Add Task screen is loaded");
// }
render() {
return (
<Container>
<Header
androidStatusBarColor="#00A2C1"
style={{
backgroundColor: '#00A2C1',
height: 60,
width: Dimensions.get('window').width,
borderBottomColor: '#ffffff',
justifyContent: 'space-between',
}}>
{/* <Left>
<Icon name="menu" size={25} style={{ color: '#fff' }} onPress={() =>
this.props.navigation.toggleDrawer()} />
</Left> */}
<Body>
<Title style={{ color: '#fff', fontWeight: '600',paddingLeft:20 }}>Support</Title>
</Body>
</Header>
<Content>
<Toast ref="toast" />
<View style={{ paddingTop: 20, }}>
<Text style={{ paddingTop: 10, paddingLeft: 20 }}>
Tell us about the bug you found!
</Text>
</View>
<View style={{ paddingTop: 20, }}>
<View style={{ paddingLeft: 10, }}>
<View style={{ width: wp('95%'), }}>
<Text>
Could You Please Describe This Bug In One Sentence?* </Text>
</View>
<View>
<TextInput style={{ width: wp('95%'), height: 45, borderBottomWidth: 1, }}
placeholder="Scrum board or Active Sprint: Sprint Name not displaying "
underlineColorAndroid='transparent'
value={this.state.bug_one_sen}
onChangeText={(bug_one_sen) => this.setState({ bug_one_sen })}
/>
</View>
</View>
<View style={{ paddingLeft: 10, }}>
<View style={{ width: wp('95%'), }}>
<Text>
Let Us Know How To Reproduce The Bug For Us To Work On?*
</Text>
</View>
<View>
<TextInput style={{ width: wp('95%'), height: 45, borderBottomWidth: 1, }}
placeholder="1. Go to Dashboards | 2. Add a new Project "
// maxLength={10}
// keyboardType={"number-pad"}
underlineColorAndroid='transparent'
value={this.state.steps_for_bug}
onChangeText={(steps_for_bug) => this.setState({ steps_for_bug })}
/>
</View>
</View>
<TouchableOpacity style={styles.upload}
onPress={this.reportBugimage} >
<Text style={{ color: 'white' }}>Uplaod</Text>
</TouchableOpacity>
<View style={{ flexDirection: 'row', marginTop: 10, justifyContent: "space-between" }}>
<TouchableOpacity style={styles.opensave}
onPress={this.reportBug()} >
<Text style={{ color: 'white' }}>Submit</Text>
</TouchableOpacity>
</View>
</View>
</Content>
</Container>
);
}
}
//Styles for UI
const styles = StyleSheet.create({
opencancel: {
flex: 1,
...Platform.select({
ios: {
backgroundColor: 'red', margin: 20, height: 30, alignItems:
"center", justifyContent: 'center'
},
android: {
backgroundColor: 'red', margin: 20, height: 30, alignItems:
"center", justifyContent: 'center'
},
}),
},
opensave: {
flex: 1,
...Platform.select({
ios: {
backgroundColor: 'green', margin: 20, height: 30, alignItems:
"center", justifyContent: 'center'
},
android: {
backgroundColor: 'green', margin: 20, height: 30, alignItems:
"center", justifyContent: 'center'
},
}),
},
upload: {
flex: 1,
...Platform.select({
ios: {
backgroundColor: '#f1f0ef', margin: 20, height: 30, alignItems:
"center", justifyContent: 'center'
},
android: {
backgroundColor: '#f1f0ef', margin: 20, height: 30, alignItems:
"center", justifyContent: 'center'
},
}),
},
});
\ No newline at end of file
...@@ -22,6 +22,7 @@ import UserDashboardTodo from '../UserComponents/UserDashboardTodo'; ...@@ -22,6 +22,7 @@ import UserDashboardTodo from '../UserComponents/UserDashboardTodo';
import Login from '../LaunchScreens/Login'; import Login from '../LaunchScreens/Login';
import RegisterUser from '../LaunchScreens/RegisterUser'; import RegisterUser from '../LaunchScreens/RegisterUser';
import Forgot from '../LaunchScreens/Forgot'; import Forgot from '../LaunchScreens/Forgot';
import Support from '../LaunchScreens/Support';
import Maintenance from '../Maintenance/Maintenance'; import Maintenance from '../Maintenance/Maintenance';
// import drawerContentComponents from './UserDrawerComponents'; // import drawerContentComponents from './UserDrawerComponents';
...@@ -71,6 +72,7 @@ import UserManageEmployeesTasks from '../UserComponents/UserManageEmployeesTasks ...@@ -71,6 +72,7 @@ import UserManageEmployeesTasks from '../UserComponents/UserManageEmployeesTasks
import UserManageProjects1 from '../UserComponents/UserManageProjects1'; import UserManageProjects1 from '../UserComponents/UserManageProjects1';
import UserRoadblock from '../UserComponents/UserRoadblocks'; import UserRoadblock from '../UserComponents/UserRoadblocks';
import AddBlocked from '../CommonComponents/AddBlocked'; import AddBlocked from '../CommonComponents/AddBlocked';
import UserSupport from '../UserComponents/UserSupport';
import UserRoadblockList from '../UserComponents/UserRoadblockList'; import UserRoadblockList from '../UserComponents/UserRoadblockList';
import UserTaskStatus from '../UserComponents/UserTaskStatus'; import UserTaskStatus from '../UserComponents/UserTaskStatus';
import UserPassword from '../UserComponents/UserPassword'; import UserPassword from '../UserComponents/UserPassword';
...@@ -90,7 +92,7 @@ import UserGroupChat from '../UserComponents/UserGroupChat'; ...@@ -90,7 +92,7 @@ import UserGroupChat from '../UserComponents/UserGroupChat';
import UserGroupChatModify from '../UserComponents/UserGroupChatModify'; import UserGroupChatModify from '../UserComponents/UserGroupChatModify';
import UserDashboard from '../UserComponents/UserDashboard'; import UserDashboard from '../UserComponents/UserDashboard';
import Instruction from '../UserComponents/Instruction'; import Instruction from '../UserComponents/Instruction';
import UserSupport from '../UserComponents/UserSupport'; // import UserSupport from '../UserComponents/UserSupport';
import AddModule from '../CommonComponents/AddModule'; import AddModule from '../CommonComponents/AddModule';
import AddMainTask from '../CommonComponents/AddMainTask'; import AddMainTask from '../CommonComponents/AddMainTask';
...@@ -379,7 +381,8 @@ const UserDrawer = createDrawerNavigator( ...@@ -379,7 +381,8 @@ const UserDrawer = createDrawerNavigator(
UserGroupChat: { screen: UserGroupChat }, UserGroupChat: { screen: UserGroupChat },
//EmployeeManageTask: { screen: EmployeeManageTask }, //EmployeeManageTask: { screen: EmployeeManageTask },
// AddModule : {screen: AddModule}, // AddModule : {screen: AddModule},
Updates: { screen: Updates }, UserSupport: { screen: UserSupport },
Updates: { screen: UserSupport },
Logout: { screen: Login }, Logout: { screen: Login },
}, { }, {
...@@ -657,12 +660,12 @@ const adminAppStack = createStackNavigator({ ...@@ -657,12 +660,12 @@ const adminAppStack = createStackNavigator({
header: null, header: null,
}, },
}, },
ReportBug:{ // ReportBug:{
screen:ReportBug, // screen:ReportBug,
navigationOptions:{ // navigationOptions:{
header:null, // header:null,
}, // },
}, // },
AddRoadblock: { AddRoadblock: {
screen: AddRoadblock, screen: AddRoadblock,
...@@ -893,6 +896,12 @@ const userAppStack = createStackNavigator({ ...@@ -893,6 +896,12 @@ const userAppStack = createStackNavigator({
header: null, header: null,
}, },
}, },
UserSupport: {
screen: UserSupport,
navigationOptions: {
header: null,
},
},
UserRoadblockList: { UserRoadblockList: {
screen: UserRoadblockList, screen: UserRoadblockList,
navigationOptions: { navigationOptions: {
...@@ -1144,12 +1153,12 @@ const userAppStack = createStackNavigator({ ...@@ -1144,12 +1153,12 @@ const userAppStack = createStackNavigator({
header: null, header: null,
}, },
}, },
UserSupport:{ // UserSupport:{
screen:UserSupport, // screen:UserSupport,
navigationOptions:{ // navigationOptions:{
header:null, // header:null,
}, // },
}, // },
RoadBlockList: { RoadBlockList: {
screen: RoadBlockList, screen: RoadBlockList,
navigationOptions: { navigationOptions: {
...@@ -1190,12 +1199,12 @@ const userAppStack = createStackNavigator({ ...@@ -1190,12 +1199,12 @@ const userAppStack = createStackNavigator({
header: null, header: null,
}, },
}, },
ReportBug:{ // ReportBug:{
screen:ReportBug, // screen:ReportBug,
navigationOptions:{ // navigationOptions:{
header:null, // header:null,
}, // },
}, // },
UserManageProjects1: { UserManageProjects1: {
screen: UserManageProjects1, screen: UserManageProjects1,
navigationOptions: { navigationOptions: {
...@@ -1274,6 +1283,12 @@ const AuthStack = createStackNavigator({ ...@@ -1274,6 +1283,12 @@ const AuthStack = createStackNavigator({
header: null, header: null,
}, },
}, },
ReportBug:{
screen:ReportBug,
navigationOptions:{
header:null,
},
},
// Maintenance: { // Maintenance: {
// screen: Maintenance, // screen: Maintenance,
......
...@@ -310,19 +310,15 @@ export default class drawerContentComponents extends Component { ...@@ -310,19 +310,15 @@ export default class drawerContentComponents extends Component {
<Text style={{ color: '#000000', marginLeft: 20 }}>Chat Room</Text> <Text style={{ color: '#000000', marginLeft: 20 }}>Chat Room</Text>
</View> </View>
</TouchableOpacity> </TouchableOpacity>
<TouchableOpacity onPress={this.navigateToScreen('UserSupport')}> <TouchableOpacity onPress={this.navigateToScreen('UserSupport')}>
<View style={styles.screenStyle}> <View style={styles.screenStyle}>
<Image style={{ width: wp('6%'), height: hp('3%') }} source={require('../Images/groupchat.png')} /> <Image style={{ width: wp('6%'), height: hp('3%') }} source={require('../Images/support.png')} />
<Text style={{ color: '#000000', marginLeft: 20 }}>Support</Text> <Text style={{ color: '#000000', marginLeft: 20 }}>Support</Text>
</View> </View>
</TouchableOpacity> </TouchableOpacity>
{/* <TouchableOpacity onPress={this.navigateToScreen('Updates')}>
<View style={styles.screenStyle}>
<Icon size={25} name="history" style={{ color: '#000000', width: wp('8%') }} />
<Text style={{ color: '#000000', marginLeft: 20 }}>{UPDATES}</Text>
</View>
</TouchableOpacity> */}
<TouchableOpacity onPress={this.logOutOption.bind(this)}> <TouchableOpacity onPress={this.logOutOption.bind(this)}>
<View style={styles.screenStyle}> <View style={styles.screenStyle}>
<Image style={{ width: wp('6%'), height: hp('3%') }} source={require('../Images/logout.png')} /> <Image style={{ width: wp('6%'), height: hp('3%') }} source={require('../Images/logout.png')} />
......
...@@ -975,7 +975,7 @@ export default class UserDashboard extends Component { ...@@ -975,7 +975,7 @@ export default class UserDashboard extends Component {
<Image style={{ width: 25, height: 25 }} source={require('../Images/add.png')} /> <Image style={{ width: 25, height: 25 }} source={require('../Images/add.png')} />
<Text style={{ width: 150, borderRadius: 20, height: 45, flexDirection: 'row', color: 'white', padding: 5 }}> <Text style={{ width: 120, borderRadius: 20, height: 45, flexDirection: 'row', color: 'white', padding: 5 }}>
Add New Project Add New Project
</Text> </Text>
</View> </View>
...@@ -1004,7 +1004,7 @@ export default class UserDashboard extends Component { ...@@ -1004,7 +1004,7 @@ export default class UserDashboard extends Component {
</TouchableOpacity> </TouchableOpacity>
</View> */} </View> */}
<View style={{ marginLeft: 2, marginTop: 5 }}> <View style={{ marginTop: 5,marginLeft:10 }}>
<ModalSelector <ModalSelector
style={{ backgroundColor: 'transparent', borderColor: 'transparent', }} style={{ backgroundColor: 'transparent', borderColor: 'transparent', }}
data={this.state.dataSource} data={this.state.dataSource}
...@@ -1012,9 +1012,7 @@ export default class UserDashboard extends Component { ...@@ -1012,9 +1012,7 @@ export default class UserDashboard extends Component {
optionContainerStyle={{ backgroundColor: 'white' }} optionContainerStyle={{ backgroundColor: 'white' }}
onChange={(itemValue) => { this.UpdateStatus1(itemValue.label) }} > onChange={(itemValue) => { this.UpdateStatus1(itemValue.label) }} >
<View style={{ width: 160, borderRadius: 20, height: 45, marginTop: 5, flexDirection: 'row' }}> <View style={{ width: 160, borderRadius: 20, height: 45, marginTop: 5, flexDirection: 'row' }}>
<Text style={{ marginTop: 15, color: 'white', width: 120, }}>{this.state.status}</Text>
<Text style={{ marginTop: 15, color: 'white', width: 100, }}>{this.state.status}</Text>
<Icon name="chevron-down" size={20} style={{ color: 'white', marginTop: 12, }} <Icon name="chevron-down" size={20} style={{ color: 'white', marginTop: 12, }}
/> />
</View> </View>
...@@ -1023,7 +1021,7 @@ export default class UserDashboard extends Component { ...@@ -1023,7 +1021,7 @@ export default class UserDashboard extends Component {
</View> </View>
<View style={{ marginTop: 20, flexDirection: 'row' }}> <View style={{ marginTop: 20, marginLeft: 25, flexDirection: 'row', marginLeft: -20 }}>
<TouchableOpacity onPress={this.logOutOption.bind(this)}> <TouchableOpacity onPress={this.logOutOption.bind(this)}>
{/* <Text style={{ borderRadius: 20, height: 45,color: 'white' }}>Logout</Text> */} {/* <Text style={{ borderRadius: 20, height: 45,color: 'white' }}>Logout</Text> */}
<Icon name="power-off" style={{ color: 'white' }} size={25} /> <Icon name="power-off" style={{ color: 'white' }} size={25} />
......
...@@ -40,6 +40,7 @@ import { ...@@ -40,6 +40,7 @@ import {
} from 'react-native-indicators'; } from 'react-native-indicators';
import { PROJECTNO, TITLE, ADDPROJECT, REQUESTED_BY, RELEASEOWNER, PROJECTSTATUS, RO, VERIFY, DELETE } from '../CommonComponents/Header'; import { PROJECTNO, TITLE, ADDPROJECT, REQUESTED_BY, RELEASEOWNER, PROJECTSTATUS, RO, VERIFY, DELETE } from '../CommonComponents/Header';
import MultiSelect from 'react-native-multiple-select'; import MultiSelect from 'react-native-multiple-select';
import { ScrollView } from 'react-native-gesture-handler';
class ListItem extends React.Component { class ListItem extends React.Component {
...@@ -326,7 +327,7 @@ class ListItem extends React.Component { ...@@ -326,7 +327,7 @@ class ListItem extends React.Component {
// empSorted.length > 0 ? empSorted.map((group, index) => { // empSorted.length > 0 ? empSorted.map((group, index) => {
return ( return (
<View style={Number(item.taskStatus) === 1 ? styles.buttonContainer : styles.buttonContainer1}> <ScrollView style={Number(item.taskStatus) === 1 ? styles.buttonContainer : styles.buttonContainer1}>
{/* <TouchableOpacity onPress={this.props.Module}> */} {/* <TouchableOpacity onPress={this.props.Module}> */}
{/* <TouchableOpacity onPress={this.props.MainTask}> */} {/* <TouchableOpacity onPress={this.props.MainTask}> */}
<View style={styles.signup}> <View style={styles.signup}>
...@@ -359,7 +360,7 @@ class ListItem extends React.Component { ...@@ -359,7 +360,7 @@ class ListItem extends React.Component {
</View> </View>
</View> </View>
{/* </TouchableOpacity> */} {/* </TouchableOpacity> */}
</View> </ScrollView>
) )
...@@ -1524,7 +1525,7 @@ export default class UserGroupChat extends Component { ...@@ -1524,7 +1525,7 @@ export default class UserGroupChat extends Component {
behavior={Platform.OS === "ios" ? "padding" : "height"} behavior={Platform.OS === "ios" ? "padding" : "height"}
style={styles.container} style={styles.container}
> >
<TouchableWithoutFeedback onPress={Keyboard.dismiss}> {/* <TouchableWithoutFeedback onPress={Keyboard.dismiss}> */}
<Container style={{ height: Dimensions.get('window').height }}> <Container style={{ height: Dimensions.get('window').height }}>
<NavigationEvents <NavigationEvents
onDidFocus={() => this.onRefresh()} onDidFocus={() => this.onRefresh()}
...@@ -1772,7 +1773,7 @@ export default class UserGroupChat extends Component { ...@@ -1772,7 +1773,7 @@ export default class UserGroupChat extends Component {
</View> </View>
</Container> </Container>
</TouchableWithoutFeedback> {/* </TouchableWithoutFeedback> */}
</KeyboardAvoidingView> </KeyboardAvoidingView>
); );
} }
...@@ -1865,7 +1866,6 @@ const styles = StyleSheet.create({ ...@@ -1865,7 +1866,6 @@ const styles = StyleSheet.create({
marginLeft: 4, marginLeft: 4,
}, },
buttonContainer1: { buttonContainer1: {
width: wp('98%'), width: wp('98%'),
...@@ -2006,7 +2006,6 @@ const styles = StyleSheet.create({ ...@@ -2006,7 +2006,6 @@ const styles = StyleSheet.create({
position: 'relative', position: 'relative',
marginBottom: 10, marginBottom: 10,
}, },
signUpText: { signUpText: {
fontSize: 13, fontSize: 13,
......
...@@ -1040,6 +1040,4 @@ const styles = StyleSheet.create( ...@@ -1040,6 +1040,4 @@ const styles = StyleSheet.create(
}, },
}), }),
}, },
}); });
\ No newline at end of file
This diff is collapsed.
...@@ -2,25 +2,29 @@ ...@@ -2,25 +2,29 @@
//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 CHATAPI = "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/";
// export const CHATAPI = "https://api-single.agile24x7.com/Migration";
// export const ReportsAPI = "https://apiv2reporting.agile24x7.com/"; // export const ReportsAPI = "https://apiv2reporting.agile24x7.com/";
// export const Client_URL = "https://novisync.agile24x7.com/#/"; // export const Client_URL = "https://novisync.agile24x7.com/#/";
/*****Postgress********/ /*****Postgress********/
// //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 CHATAPI = "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/#/";
//production environment //production environment
// export const API = "https://api-single.agile24x7.com/pg_prod/"; // export const API = "https://api-single.agile24x7.com/pg_prod/";
// export const CHATAPI = "https://api-single.agile24x7.com/pg_prod";
// export const ReportsAPI = "https://pgreporting.agile24x7.com/"; // export const ReportsAPI = "https://pgreporting.agile24x7.com/";
// export const Client_URL = "https://www.agile24x7.com/#/"; // export const Client_URL = "https://www.agile24x7.com/#/";
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment