Commit cd54948c authored by tejaswi's avatar tejaswi
Browse files

All changes and kudos part

parent 5e13db03
Showing with 2722 additions and 394 deletions
+2722 -394
......@@ -228,6 +228,7 @@ class ListItem extends Component {
// action:"send"
name: item.name,
device_id: item.device_id,
player_id:item.player_id,
// mobile: item.mobileNumber,
// email: item.email,
// designation: item.designation,
......@@ -281,6 +282,7 @@ class ListItem extends Component {
empId: item.id,
name: item.name,
device_id: item.device_id,
player_id:item.player_id,
sno: msgCount,
......@@ -294,6 +296,7 @@ class ListItem extends Component {
empId: item.id,
name: item.name,
device_id: item.device_id,
player_id:item.player_id,
sno: msgCount,
......
......@@ -54,6 +54,7 @@ export default class AdminChatUser extends Component {
action: this.props.navigation.state.params.action,
empId: this.props.navigation.state.params.empId,
device_id: this.props.navigation.state.params.device_id,
player_id:this.props.navigation.state.params.player_id,
name: this.props.navigation.state.params.name,
sno: this.props.navigation.state.params.sno,
......@@ -176,6 +177,7 @@ export default class AdminChatUser extends Component {
receivedBy: this.props.navigation.state.params.empId,
projectId: projectId,
device_id: device_id,
player_id:player_id,
})
})
......@@ -309,6 +311,7 @@ export default class AdminChatUser extends Component {
messagedBy: userToken,
projectId: projectId,
device_id: this.state.device_id,
player_id:player_id,
reply_id: this.state.commentDetails.id ? this.state.commentDetails.id : ""
})
......
......@@ -46,6 +46,7 @@ export default class EmployeeInfo extends Component {
this.arrayholder = [];
}
componentDidMount() {
//to get the lsit of list of employees
this.UserManageEmployees()
AsyncStorage.getItem("emp_role", (err, res) => {
......@@ -53,7 +54,10 @@ export default class EmployeeInfo extends Component {
const emp_role1 = res;
this.setState({ emp_role: emp_role1 })
})
}
//to refresh the data
onRefresh() {
this.setState({ isFetching: true }, function () { this.UserManageEmployees() });
......@@ -66,6 +70,7 @@ export default class EmployeeInfo extends Component {
//to get the lsit of list of employees
UserManageEmployees() {
// alert("empId"+this.props.navigation.state.params.empId)
AsyncStorage.getItem("cropcode", (err, res) => {
const cropcode = res;
......@@ -99,6 +104,7 @@ export default class EmployeeInfo extends Component {
.then((responseJson) => {
console.warn(JSON.stringify(responseJson))
alert(JSON.stringify(responseJson))
this.setState({
isLoading: false,
IdeaCount: responseJson.IdeaCount,
......@@ -198,14 +204,14 @@ export default class EmployeeInfo extends Component {
}
// alert(this.props.navigation.state.params.empId);
if (this.state.isLoading) {
return (
<View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
<DotIndicator color='#00A2C1' />
</View>
);
// if (this.state.isLoading) {
// return (
// <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
// <DotIndicator color='#00A2C1' />
// </View>
// );
}
// }
return (
<Container>
......@@ -286,7 +292,7 @@ export default class EmployeeInfo extends Component {
</ View>
</View>
<View style={{ paddingTop: 20 }}>
<View style={{ height: hp('25%') }}>
<View style={{ height: hp('20%') }}>
<View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
<View style={{ paddingLeft: 20 ,flexDirection:'row'}}>
<TouchableOpacity onPress={() => this.props.navigation.navigate('ManageProjects', { empId: this.props.navigation.state.params.empId, emp_role: this.props.navigation.state.params.role })}>
......@@ -316,7 +322,7 @@ export default class EmployeeInfo extends Component {
</View>
<View style={{ paddingTop: 20 }}>
<View style={{ height: hp('35%') }}>
<View style={{ height: hp('20%') }}>
<View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
<View style={{ paddingLeft: 20 }}>
<TouchableOpacity onPress={() => this.UserCheck()}>
......@@ -346,6 +352,37 @@ export default class EmployeeInfo extends Component {
</View>
</View>
<View style={{ paddingTop: 20 }}>
<View style={{ height: hp('20%') }}>
<View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
<View style={{ paddingLeft: 20 ,flexDirection:'row'}}>
<TouchableOpacity onPress={() => this.props.navigation.navigate('KudosPoints', { empId: this.props.navigation.state.params.empId, emp_role: this.props.navigation.state.params.role })}>
{/* <ImageBackground style={{ width: wp('40%'), height: hp('22%'), margin: 10, backgroundColor:'#DCD9D9'}} > */}
<ImageBackground style={{ width: wp('40%'), height: hp('22%'), margin: 10, backgroundColor:'#DCD9D9'}} >
<Text style={{justifyContent:'center',fontWeight: 'bold', textAlign:'center',alignContent:'center',alignItems:'center',paddingTop: 50,}}>Kudos Points</Text>
<Text style={{ paddingLeft: '85%',fontWeight: 'bold', fontSize: 15 }}>{this.state.IdeaCount}</Text>
</ImageBackground>
</TouchableOpacity>
</View>
{/* <View style={{ paddingRight: 40 }}>
<TouchableOpacity onPress={() => this.props.navigation.navigate('EmployeeManageTask', { empId: this.props.navigation.state.params.empId, emp_role: this.props.navigation.state.params.role })}>
<ImageBackground style={{ width: wp('40%'), height: hp('22%'), margin: 10, backgroundColor:'#DCD9D9'}} >
<Text style={{justifyContent:'center',fontWeight: 'bold', textAlign:'center',alignContent:'center',alignItems:'center',paddingTop: 50,}}>Sprint</Text>
<Text style={{ paddingLeft: '85%', paddingTop: 20, fontWeight: 'bold', fontSize: 15 }}>{this.state.mainTaskCount}</Text>
</ImageBackground>
</TouchableOpacity>
</View> */}
</View>
</View>
</View>
</View>
......
This diff is collapsed.
......@@ -42,7 +42,7 @@ const options = {
mediaType: 'photo',
includeBase64: false
},
}
}
export default class UserChat extends Component {
......@@ -55,6 +55,7 @@ export default class UserChat extends Component {
action: this.props.navigation.state.params.action,
empId: this.props.navigation.state.params.empId,
device_id: this.props.navigation.state.params.device_id,
player_id: this.props.navigation.state.params.player_id,
name: this.props.navigation.state.params.name,
userid: '',
......@@ -254,8 +255,8 @@ export default class UserChat extends Component {
messagedBy: userToken,
projectId: projectId,
device_id: this.props.navigation.state.params.device_id,
reply_id: this.state.commentDetails.id ? this.state.commentDetails.id : ""
reply_id: this.state.commentDetails.id ? this.state.commentDetails.id : "",
player_id: this.props.navigation.state.params.player_id,
})
}).then((response) => response.json())
......@@ -290,19 +291,19 @@ export default class UserChat extends Component {
type: images1.assets[0].type,
name: images1.assets[0].fileName,
})
data.append('message',this.state.message)
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('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',
let res1 = await fetch(API + 'userChat1.php',
{
method: 'post',
body: data,
......@@ -393,7 +394,7 @@ export default class UserChat extends Component {
// const right = <Text style={{ fontSize: 12, color: 'blue' }}>{item.username}</Text>
return (
<ScrollView>
{ item.reply_message !== null ?
{item.reply_message !== null ?
<View>
<View style={[styles.itemReply, itemStyleReply]}>
<View style={{ padding: 5, }}>
......
......@@ -26,7 +26,7 @@ import {
SkypeIndicator,
UIActivityIndicator
} from 'react-native-indicators';
import { PROJECTNO, TITLE, REQUESTED_BY ,RELEASEOWNER,PROJECTSTATUS,RO,VERIFY} from '../CommonComponents/Header';
import { PROJECTNO, TITLE, REQUESTED_BY, RELEASEOWNER, PROJECTSTATUS, RO, VERIFY } from '../CommonComponents/Header';
class ListItem extends React.Component {
......@@ -107,8 +107,8 @@ class ListItem extends React.Component {
<TouchableOpacity onPress={this.props.Module}>
<View style={styles.signup}>
<View style={[styles.buttonContainer, styles.signupButton]} >
<View style={styles.box}>
<View style={{ flexDirection: 'row' ,width:wp('75%')}}>
{/* <View style={styles.box}>
<View style={{ flexDirection: 'row', width: wp('75%') }}>
<Text style={styles.signUpText0} >{PROJECTNO} : </Text>
<Text style={styles.signUpText1} >{item.idea_id}</Text>
......@@ -121,7 +121,7 @@ class ListItem extends React.Component {
borderBottomColor: '#C0C0C0',
borderBottomWidth: 0.3,
}}
/>
/> */}
{/* <View style={{ flexDirection: 'row', paddingRight: 25, }}>
<Text style={styles.signUpText4} >Title:</Text>
......@@ -133,31 +133,34 @@ class ListItem extends React.Component {
</View> */}
<View style={{ flexDirection: 'row', paddingRight: 25, }}>
{/* <View style={{width:'45%'}}> */}
<Text style={styles.signUpText4} >{TITLE}:</Text>
<Text style={styles.signUpText9} >{item.idea_title}</Text>
{/* </View> */}
<Text style={styles.listgap} >{RELEASEOWNER} :</Text>
<Text style={styles.signUpText3} >{item.releaseOwner}</Text>
</View>
<View style={{ flexDirection: 'row', paddingRight: 25, }}>
{/* <View style={{width:'45%'}}> */}
<Text style={styles.signUpText4} >Epic Name: </Text>
<Text style={styles.signUpText9} >{item.idea_title}</Text>
{/* </View> */}
{/* <Text style={styles.listgap} >{RELEASEOWNER} :</Text>
<Text style={styles.signUpText3} >{item.releaseOwner}</Text> */}
</View>
<View style={{ flexDirection: 'row', paddingRight: 25 }}>
<Text style={styles.signUpText444} >Description: </Text>
<Text style={styles.signUpText333} >{item.idea_description}</Text>
</View>
<View style={{ flexDirection: 'row', paddingRight: 25 }}>
<Text style={styles.signUpText444} >{REQUESTED_BY}:</Text>
<Text style={styles.signUpText444} >Created By: </Text>
<Text style={styles.signUpText333} >{item.userName}</Text>
</View>
<View style={{ flexDirection: 'row', justifyContent: 'flex-end', alignItems: 'center' }}>
{/* <View style={{ flexDirection: 'row', justifyContent: 'flex-end', alignItems: 'center' }}>
<TouchableOpacity onPress={() => { this.ProjectVerify() }} style={{ width: 60, backgroundColor: 'green' }}><Text style={{ color: '#fff', textAlign: 'center' }}>{VERIFY}</Text></TouchableOpacity>
<TouchableOpacity onPress={() => { this.props.ReleaseOwner() }} style={{ width: 40, backgroundColor: 'black', marginLeft: 10 }}><Text style={{ color: '#fff', textAlign: 'center' }}>{RO}</Text></TouchableOpacity>
</View>
</View> */}
</View>
<View style={{ backgroundColor: '#fff', height: 5 }}>
</View>
</View>
</View>
</TouchableOpacity>
</View>
......@@ -201,7 +204,7 @@ export default class ApprovedProjects extends Component {
this.userApprovedProjects()
this.getResource()
}
//to get the user approved projects in to the list
......@@ -251,7 +254,7 @@ export default class ApprovedProjects extends Component {
//to refreshthe data in user apprroved projects
onRefresh() {
this.userApprovedProjects() ;
this.userApprovedProjects();
}
......@@ -326,64 +329,67 @@ export default class ApprovedProjects extends Component {
//const userToken = response[1][1];
//const role = response[2][1];
// alert(cropcode+userToken+role)
NetInfo.fetch().then(state => {
if (state.type == "none") {
console.log(state.type);
Snackbar.show({
title: 'No Internet Connection',
backgroundColor: 'red',
duration: Snackbar.LENGTH_LONG,
});
} else {
fetch(API + 'getIdeas.php',
{
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({
crop: cropcode,
action: 'approved',
empId: this.state.userToken,
userType: this.state.role
AsyncStorage.getItem("projectId", (err, res) => {
const projectId = res;
NetInfo.fetch().then(state => {
if (state.type == "none") {
console.log(state.type);
Snackbar.show({
title: 'No Internet Connection',
backgroundColor: 'red',
duration: Snackbar.LENGTH_LONG,
});
} else {
fetch(API + 'get_epics.php',
{
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({
corp: cropcode,
action: "approved",
// userType: this.state.role,
empId: this.props.navigation.state.params.empId,
projectId: projectId,
})
})
})
.then((response) => response.json())
.then((responseJson) => {
// alert(JSON.stringify(responseJson));
if (responseJson.dbconnect === 'dbconnected') {
if (responseJson.status === 'True') {
console.log(responseJson)
this.setState({
isLoading: false,
dataSource: responseJson.data,
isFetching: false
}, function () {
.then((response) => response.json())
.then((responseJson) => {
// alert(JSON.stringify(responseJson));
if (responseJson.status === 'True') {
console.log(responseJson)
this.setState({
isLoading: false,
dataSource: responseJson.data,
isFetching: false
}, function () {
});
this.arrayholder = responseJson.data;
} else {
this.arrayholder = [];
this.setState({
isLoading: false,
})
Snackbar.show({
title: 'No Approved Epics',
backgroundColor: '#3BB9FF',
duration: Snackbar.LENGTH_LONG,
});
}
});
this.arrayholder = responseJson.data;
} else {
this.arrayholder = [];
this.setState({
isLoading: false,
})
Snackbar.show({
title: 'No Approved Epics',
backgroundColor: '#3BB9FF',
duration: Snackbar.LENGTH_LONG,
.catch((error) => {
console.error(error);
log("Error", "error in listing approved projects at user side");
});
}}
else{
this.props.navigation.navigate('Maintenance');
}
})
.catch((error) => {
console.error(error);
log("Error", "error in listing approved projects at user side");
});
}
}
});
});
});
}
......@@ -397,12 +403,12 @@ export default class ApprovedProjects extends Component {
}
//Navigate to AddModule sctreen
//Navigate to AddModule sctreen
Module = (item, index) => {
log("Info", "UserApprovedProjects:Module() method is used to move module listing screen");
console.log(item);
console.log(index);
this.props.navigation.navigate("EmployeeModules", { idea_id: item.idea_id,idea_title:item.idea_title });
this.props.navigation.navigate("EmployeeModules", { idea_id: item.idea_id, idea_title: item.idea_title });
}
//list seperator
......@@ -464,11 +470,11 @@ export default class ApprovedProjects extends Component {
}
return (
<Container style={{ height: Dimensions.get('window').height }}>
<Item>
{/* <Item>
<Input placeholder="Search"
onChangeText={(text) => this.SearchFilterFunction(text)} />
<Icon size={20} name="search" />
</Item>
</Item> */}
<View>
<View style={{ height: '96%' }}>
......@@ -561,7 +567,7 @@ export default class ApprovedProjects extends Component {
</View>
</View>
<View style={{ flexDirection: 'row', marginTop: 30,justifyContent:"space-between" }}>
<View style={{ flexDirection: 'row', marginTop: 30, justifyContent: "space-between" }}>
<TouchableOpacity style={styles.opencancel} onPress={this.closeModal}>
<Text style={{ color: 'white' }}>CANCEL</Text>
</TouchableOpacity>
......@@ -583,8 +589,8 @@ const styles = StyleSheet.create({
container: {
flex: 1,
width: '100%',
backgroundColor:'#f8f8f8',
// paddingLeft: hp('1%'),
backgroundColor: '#f8f8f8',
// paddingLeft: hp('1%'),
},
footer: {
position: 'absolute',
......@@ -631,7 +637,7 @@ const styles = StyleSheet.create({
fontSize: 13,
color: 'green',
paddingTop: 10,
// fontWeight:"bold",
// fontWeight:"bold",
},
signUpText1: {
......@@ -639,7 +645,7 @@ const styles = StyleSheet.create({
color: 'green',
paddingTop: 10,
// fontWeight:"bold",
paddingLeft: 10,
paddingLeft: 10,
},
end: {
......@@ -666,7 +672,7 @@ const styles = StyleSheet.create({
},
signUpText2: {
fontSize: 13,
//marginLeft: 200,
//marginLeft: 200,
// fontSize: 13,
color: 'black',
paddingTop: 10,
......@@ -678,7 +684,7 @@ const styles = StyleSheet.create({
listgap: {
fontSize: 13,
paddingTop: 10,
// paddingLeft: 130,
// paddingLeft: 130,
alignItems: 'center',
......@@ -695,7 +701,7 @@ const styles = StyleSheet.create({
fontSize: 13,
paddingTop: 10,
paddingLeft: 10,
paddingLeft: 10,
// fontWeight:"bold",
alignItems: 'center',
},
......@@ -703,15 +709,15 @@ const styles = StyleSheet.create({
fontSize: 13,
paddingTop: 10,
color:'black',
color: 'black',
// fontWeight:"bold",
alignItems: 'center',
},
signUpText9: {
fontSize: 13,
paddingTop: 10,
width:wp('45%'),
color:'black',
width: wp('45%'),
color: 'black',
// fontWeight:"bold",
alignItems: 'center',
},
......@@ -748,17 +754,17 @@ width:wp('45%'),
color: 'white',
alignSelf: 'center',
},
//Based ON Platform
opencancel: {
//Based ON Platform
opencancel: {
flex: 1,
...Platform.select({
ios: {
backgroundColor: 'red', margin:20,height:30, alignItems:
"center", justifyContent: 'center'
backgroundColor: 'red', margin: 20, height: 30, alignItems:
"center", justifyContent: 'center'
},
android: {
backgroundColor: 'red',margin:20,height:30, alignItems:
"center", justifyContent: 'center'
backgroundColor: 'red', margin: 20, height: 30, alignItems:
"center", justifyContent: 'center'
},
}),
},
......@@ -766,12 +772,12 @@ width:wp('45%'),
flex: 1,
...Platform.select({
ios: {
backgroundColor: 'green',margin:20,height:30, alignItems:
"center", justifyContent: 'center'
backgroundColor: 'green', margin: 20, height: 30, alignItems:
"center", justifyContent: 'center'
},
android: {
backgroundColor: 'green',margin:20,height:30, alignItems:
"center", justifyContent: 'center'
backgroundColor: 'green', margin: 20, height: 30, alignItems:
"center", justifyContent: 'center'
},
}),
},
......
......@@ -152,16 +152,11 @@ class ListItem extends React.Component {
<View style={styles.container}>
<View style={styles.boxheader}>
<TouchableOpacity activeOpacity={0.8} onPress={this.changeLayout} >
<View style={{ flexDirection: 'row' }}>
<Text style={styles.signUpText0} >#Task_ID:</Text>
<Text style={styles.signUpText1} >{item.taskid}</Text>
{/* <Text style={styles.signUpText1} >{item.date}</Text> */}
</View>
<View style={{ flexDirection: 'row', width: wp('85%'), paddingRight: 25, }}>
<Text style={styles.signUpText4} >Project Title :</Text>
<Text style={styles.signUpText3} >{item.projectitle}</Text>
<Text style={styles.signUpText4} >Sprint Name :</Text>
<Text style={styles.signUpText3} >{item.sprint_desc}</Text>
</View>
......@@ -170,17 +165,16 @@ class ListItem extends React.Component {
<View style={styles.box1}>
<View style={{ flexDirection: 'row', width: wp('65%'), paddingRight: 30 }}>
<Text style={styles.signUpText00} >Task Title :</Text>
<Text style={styles.signUpText11} >{item.tasktitle}</Text>
<Text style={styles.signUpText00} >Start Date :</Text>
<Text style={styles.signUpText11} >{item.start_date}</Text>
{/* <Text style={styles.signUpText1} >{item.date}</Text> */}
</View>
{/* <TouchableOpacity onPress={() => { this.MaintaskVerify() }}> */}
<View>
{(this.state.roledata == 'Approver' || this.state.roledata == 'admin') ? button : button1}
</View>
{/* <Text style={styles.signUpText02} >{item.completeStatus} </Text> */}
{/* </TouchableOpacity> */}
</View>
<View style={{ flexDirection: 'row', width: wp('85%'), paddingRight: 25, }}>
<Text style={styles.signUpText4} >End Date :</Text>
<Text style={styles.signUpText3} >{item.target_date}</Text>
</View>
</TouchableOpacity>
</View>
......@@ -354,7 +348,8 @@ export default class EmployeeCompletedManageTask extends Component {
//const empId = res;
AsyncStorage.getItem("nodays", (err, res) => {
const ptime = res;
AsyncStorage.getItem("projectId", (err, res) => {
const projectId = res;
AsyncStorage.getItem("emp_role", (err, res) => {
//const emp_role = res;
......@@ -368,7 +363,7 @@ export default class EmployeeCompletedManageTask extends Component {
});
} else {
fetch(API + 'getManageMaintasks.php',
fetch(API + 'get_user_pending_sprints.php',
{
method: 'POST',
headers: {
......@@ -377,9 +372,10 @@ export default class EmployeeCompletedManageTask extends Component {
},
body: JSON.stringify({
crop: cropcode,
action: "completed",
userType: this.state.role,
empId: this.state.userToken
// action: "approved",
// userType: this.state.role,
empId: this.props.navigation.state.params.empId,
projectId: projectId,
})
})
.then((response) => response.json())
......@@ -395,10 +391,10 @@ export default class EmployeeCompletedManageTask extends Component {
// <DotIndicator color='#283B53' />
// </View>
// );
if (responseJson.dbconnect === 'dbconnected') {
// alert(JSON.stringify(responseJson));
if (responseJson.connection === 'connected ') {
if (responseJson.status === 'true')
// alert(JSON.stringify(responseJson.data[0].ptime));
{
// isLoading: false
......@@ -479,6 +475,7 @@ export default class EmployeeCompletedManageTask extends Component {
});
});
});
});
});
}
//Navigate to AddSubtaskModal for Modify Task
......@@ -562,13 +559,13 @@ export default class EmployeeCompletedManageTask extends Component {
return (
<Container style={{ height: Dimensions.get('window').height }}>
<Item>
{/* <Icon name="ios-search" /> */}
{/* <Item>
<Input placeholder="Search"
onChangeText={(text) => this.SearchFilterFunction(text)} />
<Icon style={{ marginRight: 10, color: '#c0c0c0' }} size={20} name="search" />
</Item>
</Item> */}
<View style={styles.end1}>
<FlatList
extraData={this.state}
......
......@@ -56,11 +56,11 @@ export default class EmployeeManageTask extends Component {
</Header>
<Tabs tabBarUnderlineStyle={{ borderBottomWidth: 0 }}>
<Tab heading={<TabHeading style={{ backgroundColor: '#00A2C1' }}><Text style={{ color: '#fff' }}>{PENDING}</Text></TabHeading>}>
{/* <Tab heading={<TabHeading style={{ backgroundColor: '#00A2C1' }}><Text style={{ color: '#fff' }}>{PENDING}</Text></TabHeading>}>
<EmployeePendingManageTask navigation={this.props.navigation} />
</Tab>
</Tab> */}
<Tab heading={<TabHeading style={{ backgroundColor: '#00A2C1' }}><Text style={{ color: '#fff' }}>{COMPLETED}</Text></TabHeading>}>
<Tab heading={<TabHeading style={{ backgroundColor: '#00A2C1' }}><Text style={{ color: '#fff' }}>Sprints</Text></TabHeading>}>
<EmployeeCompletedManageTask navigation={this.props.navigation} />
</Tab>
</Tabs>
......
......@@ -7,8 +7,8 @@ Devloper:Rishitha,Naveen,Mahesh
import React, { Component } from 'react';
import moment from "moment";
import { Platform, StyleSheet, Text, View, TextInput, Dimensions,LayoutAnimation, UIManager, TouchableOpacity, FlatList, Image, Alert } from 'react-native';
import { Left, Button, Container, Header, Content, Item, Input } from 'native-base';
import { Platform, StyleSheet, Text, View, TextInput, Dimensions, LayoutAnimation, UIManager, TouchableOpacity, FlatList, Image, Alert } from 'react-native';
import { Left, Button, Container, Header, Content, Item, Input } from 'native-base';
import Icon from 'react-native-vector-icons/FontAwesome';
import AsyncStorage from '@react-native-community/async-storage';
import { widthPercentageToDP as wp, heightPercentageToDP as hp } from 'react-native-responsive-screen';
......@@ -91,74 +91,74 @@ class ListItem extends React.Component {
{/* <Collapse style={[item.cDate >= item.targettime ? styles.container : styles.container1]}>
<CollapseHeader style={styles.boxheader}> */}
<View style={[item.cDate >= item.targettime ? styles.container : styles.container1]}>
<View style={[item.cDate >= item.targettime ? styles.container : styles.container1]}>
<View style={styles.boxheader}>
<TouchableOpacity activeOpacity={0.8} onPress={this.changeLayout} >
<View style={{ flexDirection: 'row' }}>
<Text style={styles.signUpText0} >#TASK ID:</Text>
<Text style={styles.signUpText1} >{item.taskid}</Text>
{/* <Text style={styles.signUpText1} >{item.date}</Text> */}
</View>
{/* <Text style={styles.signUpText2} >{item.date}</Text> */}
<TouchableOpacity activeOpacity={0.8} onPress={this.changeLayout} >
<View style={{ flexDirection: 'row' }}>
<Text style={styles.signUpText0} >#TASK ID:</Text>
<Text style={styles.signUpText1} >{item.taskid}</Text>
{/* <Text style={styles.signUpText1} >{item.date}</Text> */}
</View>
{/* <Text style={styles.signUpText2} >{item.date}</Text> */}
<View style={{ flexDirection: 'row', width: wp('85%'), paddingRight: 25, }}>
<Text style={styles.signUpText4} >Project Title:</Text>
<Text style={styles.signUpText3} >{item.projectitle}</Text>
</View>
<View style={{ flexDirection: 'row', width: wp('85%'), paddingRight: 25, }}>
<Text style={styles.signUpText4} >Project Title:</Text>
<Text style={styles.signUpText3} >{item.projectitle}</Text>
</View>
<View style={styles.box1}>
<View style={styles.box1}>
<View style={{ flexDirection: 'row', width: wp('65%'), paddingRight: 30 }}>
<Text style={styles.signUpText00} >Task Title:</Text>
<Text style={styles.signUpText11} >{item.tasktitle}</Text>
{/* <Text style={styles.signUpText1} >{item.date}</Text> */}
</View>
<Text style={styles.signUpText02} >Pending </Text>
<View style={{ flexDirection: 'row', width: wp('65%'), paddingRight: 30 }}>
<Text style={styles.signUpText00} >Task Title:</Text>
<Text style={styles.signUpText11} >{item.tasktitle}</Text>
{/* <Text style={styles.signUpText1} >{item.date}</Text> */}
</View>
<Text style={styles.signUpText02} >Pending </Text>
</View>
</View>
</TouchableOpacity>
{/* </CollapseHeader> */}
{/* </CollapseHeader> */}
</View>
<View style={{ height: this.state.expanded ? null : 0, overflow: 'hidden' }}>
<CollapseBody>
<CollapseBody>
<View style={{ flexDirection: 'row', paddingRight: 35, width: wp('90%') }}>
<Text style={styles.signUpText44} >Description</Text>
<Text style={styles.signUpText33} >{item.taskdescription}</Text>
{/* <Text style={styles.signUpText33} >{item.recipeNames}</Text> */}
</View>
{(item.targettime === '0000-00-00 00:00:00') ? TaskStatus : TargetTime}
<View style={styles.box1}>
<View style={{ flexDirection: 'row', width: wp('50%') }}>
<Text style={styles.signUpText44} >Assigned To:</Text>
<Text style={styles.signUpText33} >{item.assigntto}</Text>
{/* <Text style={styles.signUpText1} >{item.date}</Text> */}
<View style={{ flexDirection: 'row', paddingRight: 35, width: wp('90%') }}>
<Text style={styles.signUpText44} >Description</Text>
<Text style={styles.signUpText33} >{item.taskdescription}</Text>
{/* <Text style={styles.signUpText33} >{item.recipeNames}</Text> */}
</View>
<Text style={styles.signUpText002} >Assigned By:{item.assignby} </Text>
{(item.targettime === '0000-00-00 00:00:00') ? TaskStatus : TargetTime}
<View style={styles.box1}>
<View style={{ flexDirection: 'row', width: wp('50%') }}>
<Text style={styles.signUpText44} >Assigned To:</Text>
<Text style={styles.signUpText33} >{item.assigntto}</Text>
{/* <Text style={styles.signUpText1} >{item.date}</Text> */}
</View>
<Text style={styles.signUpText002} >Assigned By:{item.assignby} </Text>
</View>
<View style={{ flexDirection: 'row', paddingRight: 25, }}>
<Text style={styles.signUpText44} >Assigned On:</Text>
<Text style={styles.signUpText33} >{moment(item.assignedon).format('MM.DD.YYYY hh:mm:ss')}</Text>
{/* <Text style={styles.signUpText33} >{item.recipeNames}</Text> */}
</View>
</View>
<View style={{ flexDirection: 'row', paddingRight: 25, }}>
<Text style={styles.signUpText44} >Assigned On:</Text>
<Text style={styles.signUpText33} >{moment(item.assignedon).format('MM.DD.YYYY hh:mm:ss')}</Text>
{/* <Text style={styles.signUpText33} >{item.recipeNames}</Text> */}
</View>
{(item.targettime === '0000-00-00 00:00:00') ? null : TaskTime}
{(item.targettime === '0000-00-00 00:00:00') ? null : TaskTime}
{(item.targettime === '0000-00-00 00:00:00') ? AddSubTask : ViewSubTasks}
{(item.targettime === '0000-00-00 00:00:00') ? AddSubTask : ViewSubTasks}
</CollapseBody>
</CollapseBody>
</View>
{/* </Collapse> */}
{/* </Collapse> */}
</View>
<View style={{ backgroundColor: '#fff', height: 5 }}>
......@@ -239,132 +239,136 @@ export default class EmployeePendingManageTask extends Component {
//UserPendingManagetasks Getting
UserPendingManagetasks() {
log("Info", "userPendingManageTasks:DeleteMaintask(maintaskid) method is used to delete maintask");
AsyncStorage.getItem("cropcode", (err, res) => {
const cropcode = res;
AsyncStorage.getItem("empId", (err, res) => {
//const empId = res;
AsyncStorage.getItem("projectId", (err, res) => {
const projectId = res;
AsyncStorage.getItem("emp_role", (err, res) => {
//const emp_role = res;
AsyncStorage.getItem("nodays", (err, res) => {
const ptime = res;
//Checking the Internet Connection
NetInfo.fetch().then(state => {
if (state.type == "none") {
console.log(state.type);
Snackbar.show({
title: 'No Internet Connection',
backgroundColor: '#3BB9FF',
duration: Snackbar.LENGTH_LONG,
});
} else {
AsyncStorage.getItem("emp_role", (err, res) => {
//const emp_role = res;
AsyncStorage.getItem("nodays", (err, res) => {
const ptime = res;
//Checking the Internet Connection
NetInfo.fetch().then(state => {
if (state.type == "none") {
console.log(state.type);
Snackbar.show({
title: 'No Internet Connection',
backgroundColor: '#3BB9FF',
duration: Snackbar.LENGTH_LONG,
});
} else {
fetch(API + 'getManageMaintasks.php',
{
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({
crop: cropcode,
action: "pending",
// userType: this.state.role,
empId: this.state.userToken
})
})
.then((response) => response.json())
.then((responseJson) => {
console.log(responseJson);
let viewitemsList = [];
// if (this.state.isLoading) {
// return (
// <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
// <DotIndicator color='#283B53' />
// </View>
// );
if (responseJson.dbconnect === 'dbconnected') {
if (responseJson.status === 'true')
// alert(JSON.stringify(responseJson.data[0].ptime));
fetch(API + 'get_user_pending_sprints.php',
{
// isLoading: false
for (let i = 0; i < JSON.stringify(responseJson.data.length); i++) {
let time = JSON.stringify(responseJson.data[i].ptime) / 24;
let comparetime = Number(ptime);
let countTime = Math.round(time);
if (comparetime > 0) {
if (countTime === comparetime) {
console.log("intoo for");
viewitemsList.push(responseJson.data[i]);
this.setState({
// alert(JSON.stringify(responseJson.data[i]));
isLoading: false,
dataSource: viewitemsList,
isFetching: false
},
function () {
});
this.arrayholder = viewitemsList;
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({
crop: cropcode,
// action: "approved",
// userType: this.state.role,
empId: this.props.navigation.state.params.empId,
projectId: projectId,
})
})
.then((response) => response.json())
.then((responseJson) => {
console.log(responseJson);
// alert(JSON.stringify(responseJson));
let viewitemsList = [];
// if (this.state.isLoading) {
// return (
// <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
// <DotIndicator color='#283B53' />
// </View>
// );
alert(JSON.stringify(responseJson));
if (responseJson.status === 'true')
// alert(JSON.stringify(responseJson.data[0].ptime));
{
// isLoading: false
for (let i = 0; i < JSON.stringify(responseJson.data.length); i++) {
let time = JSON.stringify(responseJson.data[i].ptime) / 24;
let comparetime = Number(ptime);
let countTime = Math.round(time);
if (comparetime > 0) {
if (countTime === comparetime) {
console.log("intoo for");
viewitemsList.push(responseJson.data[i]);
this.setState({
// alert(JSON.stringify(responseJson.data[i]));
isLoading: false,
dataSource: viewitemsList,
isFetching: false
},
function () {
});
this.arrayholder = viewitemsList;
}
// else{
// alert('no data on this days');
// }
}
else {
log("Info", "no pending manage tasks at user side");
console.log("else ptime");
this.setState({
isLoading: false,
dataSource: responseJson.data,
isFetching: false
},
function () {
});
this.arrayholder = responseJson.data;
}
}
// else{
// alert('no data on this days');
// }
}
else {
log("Info", "no pending manage tasks at user side");
console.log("else ptime");
this.setState({
isLoading: false,
dataSource: responseJson.data,
isFetching: false
},
function () {
}
else {
this.arrayholder = [];
console.log("else" + responseJson.status);
this.setState({ isLoading: false });
Snackbar.show({
title: 'No User Story',
backgroundColor: '#3BB9FF',
duration: Snackbar.LENGTH_LONG,
});
}
});
this.arrayholder = responseJson.data;
// }
})
}
}
} else {
this.arrayholder = [];
console.log("else" + responseJson.status);
this.setState({ isLoading: false });
Snackbar.show({
title: 'No User Story',
backgroundColor: '#3BB9FF',
duration: Snackbar.LENGTH_LONG,
});
}}
else{
this.props.navigation.navigate('Maintenance');
}
// }
})
.catch((error) => {
console.error(error);
log("Error", "error in pending manage tasks at user side");
});
}
.catch((error) => {
console.error(error);
log("Error", "error in pending manage tasks at user side");
});
}
});
});
});
});
});
});
}
......
......@@ -38,10 +38,10 @@ export default class ManageProjects extends Component {
this.props.navigation.navigate('UserProfile')} />
</Header>
<Tabs tabBarUnderlineStyle={{ borderBottomWidth: 0 }}>
<Tab heading={<TabHeading style={{ backgroundColor: '#00A2C1' }}><Text style={{ color: '#fff' }}>{REQUESTED}</Text></TabHeading>}>
{/* <Tab heading={<TabHeading style={{ backgroundColor: '#00A2C1' }}><Text style={{ color: '#fff' }}>{REQUESTED}</Text></TabHeading>}>
<RequestedProjects navigation={this.props.navigation} />
</Tab>
<Tab heading={<TabHeading style={{ backgroundColor: '#00A2C1' }}><Text style={{ color: '#fff' }}>{APPROVED}</Text></TabHeading>}>
</Tab> */}
<Tab heading={<TabHeading style={{ backgroundColor: '#00A2C1' }}><Text style={{ color: '#fff' }}>Epics</Text></TabHeading>}>
<ApprovedProjects navigation={this.props.navigation} />
</Tab>
</Tabs>
......
......@@ -214,7 +214,8 @@ export default class RoadBlockInfo extends Component {
AsyncStorage.multiGet(["cropcode", "userToken"], (err, response) => {
const cropcode = response[0][1];
const userToken = response[1][1];
AsyncStorage.getItem("projectId", (err, res) => {
const projectId = res;
console.log(this.state.userToken);
NetInfo.fetch().then(state => {
if (state.type == "none") {
......@@ -227,7 +228,7 @@ export default class RoadBlockInfo extends Component {
});
} else {
fetch(API + 'userRoadblocks.php',
fetch(API + 'manage_roadblocks.php',
{
method: 'POST',
headers: {
......@@ -237,14 +238,15 @@ export default class RoadBlockInfo extends Component {
body: JSON.stringify({
crop: cropcode,
action: "userRoadblocks",
empId: this.state.userToken,
empId: this.props.navigation.state.params.empId,
projectId: projectId,
})
})
.then((response) => response.json())
.then((responseJson) => {
console.log(responseJson);
console.warn(JSON.stringify(responseJson))
if (responseJson.dbconnect === 'dbconnected') {
if (responseJson.connection === 'connected ') {
if (responseJson.status === 'True') {
this.setState({
isLoading: false,
......@@ -279,6 +281,7 @@ export default class RoadBlockInfo extends Component {
}
});
});
});
}
//seperator will seperate the list of data
......
......@@ -92,6 +92,7 @@ import UserGroupChat from '../UserComponents/UserGroupChat';
import UserGroupChatModify from '../UserComponents/UserGroupChatModify';
import UserDashboard from '../UserComponents/UserDashboard';
import Instruction from '../UserComponents/Instruction';
import UserProfileKudos from '../UserComponents/UserProfileKudos';
// import UserSupport from '../UserComponents/UserSupport';
import AddModule from '../CommonComponents/AddModule';
......@@ -118,6 +119,7 @@ import ReassignUserStory from '../CommonComponents/ReassignUserStory';
import GroupChat from '../CommonComponents/GroupChat';
import AdminChat from '../CommonComponents/AdminChat';
import AdminChatUser from '../CommonComponents/AdminChatUser';
import KudosPoints from '../CommonComponents/KudosPoints';
......@@ -700,6 +702,12 @@ const adminAppStack = createStackNavigator({
header: null,
},
},
KudosPoints:{
screen:KudosPoints,
navigationOptions:{
header:null,
},
},
EmployeeInfo: {
screen: EmployeeInfo,
navigationOptions: {
......@@ -964,7 +972,18 @@ const userAppStack = createStackNavigator({
header: null,
},
},
KudosPoints:{
screen:KudosPoints,
navigationOptions:{
header:null,
},
},
UserProfileKudos:{
screen:UserProfileKudos,
navigationOptions:{
header:null,
},
},
// Maintenance: {
// screen: Maintenance,
// navigationOptions: {
......
......@@ -170,6 +170,16 @@ export default class drawerContentComponents extends Component {
buttonEmp = null;
}
else if(this.state.emp_role === "Contributor") {
buttonEmp =
<TouchableOpacity onPress={this.navigateToScreen('UserManageEmployees')}>
<View style={styles.screenStyle}>
<Image style={{ width: wp('6%'), height: hp('3%') }} source={require('../Images/teams.png')} />
<Text style={{ color: '#000000', marginLeft: 20 }}>{MANAGEEMPLOYEES}</Text>
</View>
</TouchableOpacity>
}
else {
buttonEmp =
......
......@@ -73,11 +73,11 @@ class ListItem extends React.Component {
<View style={{ flexDirection: 'row' }}>
<View style={{ flexDirection: 'row', width: wp('80%') }}>
<Text style={styles.signUpText0} >RPF:</Text>
<Text style={styles.signUpText1} > {item.id} - {item.moduleId}</Text>
<Text style={styles.signUpText0} >User Story Name:</Text>
<Text style={styles.signUpText1} > {item.tasktitle}</Text>
</View>
<View>
<Text style={styles.signUpText02} >{item.status} </Text>
{/* <Text style={styles.signUpText02} >{item.status} </Text> */}
</View>
</View>
......@@ -85,8 +85,8 @@ class ListItem extends React.Component {
<View style={styles.box1}>
<View style={{ flexDirection: 'row', width: wp('90%') }}>
<Text style={styles.signUpText00} >Title:</Text>
<Text style={styles.signUpText11} >{item.taskTitle}</Text>
<Text style={styles.signUpText00} >Description:</Text>
<Text style={styles.signUpText11} >{item.taskdescription}</Text>
</View>
{/* <View style={{paddingLeft:'25%'}}>
{item.activeStatus === 1 ? radio2 : radio1}
......@@ -99,10 +99,10 @@ class ListItem extends React.Component {
{/* </CollapseHeader> */}
<View style={{ height: this.state.expanded ? null : 0, overflow: 'hidden' }}>
<CollapseBody>
<View style={{ flexDirection: 'row', paddingRight: 25, width: wp('80%') }}>
{/* <View style={{ flexDirection: 'row', paddingRight: 25, width: wp('80%') }}>
<Text style={styles.signUpText44} >Description : </Text>
<Text style={styles.signUpText33} >{item.subTaskDesc}</Text>
</View>
</View> */}
<View style={styles.box1}>
<View style={{ flexDirection: 'row', width: wp('54%') }}>
<Text style={styles.signUpText000} >Target Time:</Text>
......@@ -120,12 +120,12 @@ class ListItem extends React.Component {
</View>
<View style={{ flexDirection: 'row', paddingRight: 25, width: wp('80%') }}>
<Text style={styles.signUpText44} >Assigned By :</Text>
<Text style={styles.signUpText33} >{item.assignedBy}</Text>
<Text style={styles.signUpText33} >{item.assignby}</Text>
</View>
<View style={{ flexDirection: 'row', paddingRight: 25, }}>
{/* <View style={{ flexDirection: 'row', paddingRight: 25, }}>
<Text style={styles.signUpText44} >Status:</Text>
<Text style={styles.signUpText33} >{item.taskStatusDesc}</Text>
</View>
</View> */}
{/* <View style={styles.box1}>
<View style={{ flexDirection: 'row' }}>
<Text style={styles.signUpText000} >TimeLeft:</Text>
......@@ -133,9 +133,9 @@ class ListItem extends React.Component {
</View>
</View> */}
{/* {item.dependencyId == 'NA' ? null : Dependency} */}
<View style={{ flexDirection: 'row', justifyContent: 'flex-end', alignItems: 'center' }}>
{/* <View style={{ flexDirection: 'row', justifyContent: 'flex-end', alignItems: 'center' }}>
<Icon size={22} style={{ paddingLeft: 10, paddingTop: 4 }} name="comments" onPress={() => { this.props.TaskChat() }}></Icon>
</View>
</View> */}
<View
style={{
borderBottomColor: '#C0C0C0',
......@@ -201,6 +201,8 @@ export default class Pending extends Component {
AsyncStorage.getItem("emp_role", (err, res) => {
const emp_role = res;
AsyncStorage.getItem("projectId", (err, res) => {
const projectId = res;
//Checking the Internet Connection
NetInfo.fetch().then(state => {
......@@ -212,7 +214,7 @@ export default class Pending extends Component {
duration: Snackbar.LENGTH_LONG,
});
} else {
fetch(API + 'getSubtasks.php',
fetch(API + 'backlogspage.php',
{
method: 'POST',
headers: {
......@@ -221,18 +223,20 @@ export default class Pending extends Component {
},
body: JSON.stringify({
crop: cropcode,
action: "pending",
userType: emp_role,
empId: this.props.navigation.state.params.empId
action: "Empcurrentsprint",
projectId: projectId,
userType:emp_role,
empId: this.props.navigation.state.params.empId,
})
})
.then((response) => response.json())
.then((responseJson) => {
console.log(responseJson);
// alert(JSON.stringify(responseJson));
// Alert.alert("status"+responseJson.status);
console.log(JSON.stringify(responseJson))
if (responseJson.dbconnect === 'dbconnected') {
if (responseJson.status === 'True') {
if (responseJson.connection === 'connected ') {
if (responseJson.status === 'true') {
this.setState({
isLoading: false,
dataSource: responseJson.data,
......@@ -263,6 +267,7 @@ export default class Pending extends Component {
}
});
});
});
});
......@@ -358,13 +363,13 @@ export default class Pending extends Component {
}
return (
<Container style={{ height: Dimensions.get('window').height }}>
<Item>
{/* <Icon name="ios-search" /> */}
{/* <Item>
<Input placeholder="Search"
onChangeText={(text) => this.SearchFilterFunction(text)} />
<Icon style={{ marginRight: 10, color: 'black' }} size={20} name="search" />
</Item>
</Item> */}
<Content>
......
......@@ -25,7 +25,7 @@ import jwt_decode from "jwt-decode";
import Main from '../Maintenance/Main';
const check = new Main()
import UserDatabase from '../OfflineDB/UserDatabase';
import { MANAGEEMPLOYEES, EMAIL, MOBILE, CONTACT, EMAILUSERNAME, ADDEMPLOYEE,WORKING_STATUS } from '../CommonComponents/Header';
import { MANAGEEMPLOYEES, EMAIL, MOBILE, CONTACT, EMAILUSERNAME, ADDEMPLOYEE, WORKING_STATUS } from '../CommonComponents/Header';
const db = new UserDatabase();
import {
......@@ -338,6 +338,41 @@ class ListItem extends Component {
</TouchableOpacity>
}
let buttonUser;
if (this.state.emp_role === "Contributor") {
const { item } = this.props;
buttonUser = <View style={{ flexDirection: 'row' }}>
<Text style={styles.signUpText1} >{item.name} </Text>
</View>;
}
else {
const { item } = this.props;
buttonUser = <TouchableOpacity style={{ alignSelf: 'flex-end', paddingTop: -50 }}
onPress={() => this.props.navigation.navigate("EmployeeInfo", {
empId: item.id,
name: item.name,
mobile: item.mobileNumber,
email: item.email,
designation: item.designation,
userName: item.userName,
team: item.team,
empStatus: item.empStatus,
workingStatus: item.workingStatus,
emp_role: item.role,
functionalManager: item.functionalManager,
reportingManager: item.reportingManager
})}>
<View style={{ flexDirection: 'row' }}>
<Text style={[styles.signUpText1,styles.nameText]} >{item.name} </Text>
</View>
</TouchableOpacity>;
}
let button4;
if (item.role === "Contributor") {
......@@ -375,6 +410,7 @@ class ListItem extends Component {
// action:"send"
name: item.name,
device_id: item.device_id,
player_id:item.player_id,
// mobile: item.mobileNumber,
// email: item.email,
// designation: item.designation,
......@@ -436,7 +472,8 @@ class ListItem extends Component {
<Icon name="comments" style={{ color: '#808080', paddingRight: 5 }} size={25} onPress={() => this.props.navigation.navigate("UserChat", {
empId: item.id,
name: item.name,
device_id: item.device_id
device_id: item.device_id,
player_id:item.player_id,
})} />
......@@ -445,7 +482,8 @@ class ListItem extends Component {
<Icon name="comments" style={{ color: '#808080', paddingRight: 5 }} size={25} onPress={() => this.props.navigation.navigate("UserChat", {
empId: item.id,
name: item.name,
device_id: item.device_id
device_id: item.device_id,
player_id:item.player_id,
})} />
......@@ -462,67 +500,67 @@ class ListItem extends Component {
return (
<View style={styles.container}>
<View style={styles.signup}>
<View style={[styles.buttonContainer, styles.signupButton]} >
<View style={styles.box}>
<View style={{ flexDirection: 'row' }}>
<Text style={styles.signUpText1} >{item.name} </Text>
<View style={styles.signup}>
<View style={[styles.buttonContainer, styles.signupButton]} >
<View style={styles.box}>
{buttonUser}
{button4}
</View>
<View style={{ flexDirection: 'row', }}>
<View style={{ flexDirection: 'row', width: wp('90%') }}>
<Text style={styles.signUpText11}>{EMAILUSERNAME} : </Text>
<TouchableOpacity style={{ flexDirection: 'row' }}>
<Icon name="envelope" style={{ color: 'red', marginLeft: 5, marginTop: 5 }} size={25}
onPress={(item) => Linking.openURL('mailto:' + (item.email))} />
</TouchableOpacity>
<Text style={styles.signUpText11email}
onPress={() => Linking.openURL('mailto:' + (item.email))}
>{item.email}</Text>
</View>
<View>
{button}
</View>
</View>
{button4}
</View>
<View style={{ flexDirection: 'row' }}>
<View style={{ width: '90%', flexDirection: 'row' }}>
<Text style={styles.signUpText11}>{CONTACT} : </Text>
<View style={{ flexDirection: 'row', }}>
<View style={{ flexDirection: 'row', width: wp('90%') }}>
<Text style={styles.signUpText11}>{EMAILUSERNAME} : </Text>
<TouchableOpacity style={{ flexDirection: 'row' }}>
<Icon name="envelope" style={{ color: 'red', marginLeft: 5, marginTop: 5 }} size={25}
onPress={(item) => Linking.openURL('mailto:' + (item.email))} />
<Icon name="phone" style={{ color: '#00FF00', marginLeft: 5, marginTop: 10 }} size={20}
onPress={() => Communications.phonecall(item.mobileNumber, true)} />
<Text style={styles.signUpText11mobile}
onPress={() => Communications.phonecall(item.mobileNumber, true)}
>{item.mobileNumber}</Text>
</TouchableOpacity>
<Text style={styles.signUpText11email}
onPress={() => Linking.openURL('mailto:' + (item.email))}
>{item.email}</Text>
</View>
<View>
{button}
</View>
<Text style={{ marginTop: 10, }}>{item.workingStatus}</Text>
</View>
<View style={{ flexDirection: 'row' }}>
<View style={{ width: '90%', flexDirection: 'row' }}>
<Text style={styles.signUpText11} >{WORKING_STATUS} : </Text>
<Text style={styles.signUpText1} >{item.empStatus}</Text>
</View>
{getMessagesCount(this.state.dataSource2, item.id)}
</View>
<View style={{ flexDirection: 'row' }}>
<View style={{ width: '90%', flexDirection: 'row' }}>
<Text style={styles.signUpText11}>{CONTACT} : </Text>
<TouchableOpacity style={{ flexDirection: 'row' }}>
<Icon name="phone" style={{ color: '#00FF00', marginLeft: 5, marginTop: 10 }} size={20}
onPress={() => Communications.phonecall(item.mobileNumber, true)} />
<Text style={styles.signUpText11mobile}
onPress={() => Communications.phonecall(item.mobileNumber, true)}
>{item.mobileNumber}</Text>
</TouchableOpacity>
</View>
<Text style={{ marginTop: 10, }}>{item.workingStatus}</Text>
</View>
<View style={{ flexDirection: 'row' }}>
<View style={{ width: '90%', flexDirection: 'row' }}>
<Text style={styles.signUpText11} >{WORKING_STATUS} : </Text>
<Text style={styles.signUpText1} >{item.empStatus}</Text>
</View>
{getMessagesCount(this.state.dataSource2, item.id)}
</View>
<View
style={{
marginTop: 15,
borderBottomColor: '#C0C0C0',
borderBottomWidth: 0.2,
}}
/>
</View>
<View
style={{
marginTop: 15,
borderBottomColor: '#C0C0C0',
borderBottomWidth: 0.2,
}}
/>
</View>
</View>
)
......@@ -1347,6 +1385,9 @@ const styles = StyleSheet.create({
justifyContent: 'center',
},
nameText:{
color:'blue'
},
rowBack: {
alignItems: 'center',
backgroundColor: '#81def0',
......
......@@ -51,12 +51,12 @@ export default class UserManageEmployeesTasks extends Component {
</Right>
</Header>
<Tabs tabBarUnderlineStyle={{ borderBottomWidth: 0 }}>
<Tab heading={<TabHeading style={{ backgroundColor: '#00A2C1' }}><Text style={{ color: '#fff' }}>PENDING</Text></TabHeading>}>
<Tab heading={<TabHeading style={{ backgroundColor: '#00A2C1' }}><Text style={{ color: '#fff' }}>User Stories</Text></TabHeading>}>
<Pending navigation={this.props.navigation} />
</Tab>
<Tab heading={<TabHeading style={{ backgroundColor: '#00A2C1' }}><Text style={{ color: '#fff' }}>COMPLETED</Text></TabHeading>}>
{/* <Tab heading={<TabHeading style={{ backgroundColor: '#00A2C1' }}><Text style={{ color: '#fff' }}>COMPLETED</Text></TabHeading>}>
<Completed navigation={this.props.navigation} />
</Tab>
</Tab> */}
{/* <Tab heading={<TabHeading style={{ backgroundColor: '#00A2C1' }}><Text style={{ color: '#fff' }}>VERIFIED</Text></TabHeading>}>
<Verified navigation={this.props.navigation} />
</Tab> */}
......
......@@ -253,7 +253,7 @@ export default class UserProfile extends Component {
})
}).then((response) => response.json())
.then((responseJson) => {
alert(JSON.stringify(responseJson));
// alert(JSON.stringify(responseJson));
console.log(JSON.stringify(responseJson))
console.log(JSON.stringify("empInfo" + responseJson.data[0]))
db.addProfile(responseJson.data, cropcode).then((result) => {
......@@ -1049,10 +1049,13 @@ export default class UserProfile extends Component {
</View>
<View>
{/* {buttonL} */}
</View>
<View style={{ marginTop: '5%' }}>
<TouchableOpacity onPress={() => this.props.navigation.navigate('UserProfileKudos')}>
<Text style={{ color: 'blue', paddingLeft: '2%' }}>Kudos Poins</Text>
</TouchableOpacity>
</View>
{/* {this.state.free_licenses === 1 ? <Text>0</Text>:<Text>2</Text>} */}
......@@ -1124,8 +1127,9 @@ export default class UserProfile extends Component {
</View>
<Text style={styles.iosdropdown}></Text>
</Content>
......
This diff is collapsed.
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