Commit 21d0ba44 authored by santhosh's avatar santhosh
Browse files

bugs resolved in reports screen and notification screen

Showing with 223 additions and 56 deletions
+223 -56
......@@ -134,7 +134,7 @@ android {
applicationId "com.agile24x7"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 4
versionCode 5
versionName "1.0.1"
}
......
......@@ -182,12 +182,11 @@ export default class ReportUserEpicVelocity extends Component {
// });
var epicList = [];
responseJson.map((sprints) => {
return (
epicList.push({
'id': sprints.epic_id, 'name': sprints.epic_name
'key': sprints.epic_id, 'label': sprints.epic_name
})
);
})
......@@ -195,6 +194,19 @@ export default class ReportUserEpicVelocity extends Component {
this.setState({
resource2: epicList
},
// var epicList = [];
// responseJson.map((sprints) => {
// return (
// epicList.push({
// 'id': sprints.epic_id, 'name': sprints.epic_name
// })
// );
// })
// this.setState({
// resource2: epicList
// },
function () {
}
......@@ -335,8 +347,24 @@ export default class ReportUserEpicVelocity extends Component {
<Container>
<Text style={{ padding: 10, fontWeight: 'bold' }}>Epic Velocity</Text>
<View style={{ paddingTop: 20, }}>
<SearchableDropdown
<View style={{ width: "96%", borderRadius: 20, height: 45, marginTop: 5, flexDirection: 'row' }}>
<ModalSelector
style={{ width: "96%",marginLeft:"4%", backgroundColor: 'white', borderColor: 'black',borderWidth:1,borderRadius:30 }}
data={this.state.resource2}
initValue={this.state.epicName}
optionContainerStyle={{ backgroundColor: 'white' ,color:'red'}}
onChange={(item) => { this.NetworkEpic(item.key), this.setState({ epicName: item.label }) }} >
<View style={{ width: 300, borderRadius: 20, height: 45, marginTop: 5, flexDirection: 'row' }}>
{/* <Text style={{ marginTop: 15, color: 'white', width: 80 }}>PROJECT : </Text> */}
<Text style={{ margin: 5, color: 'black', width: "100%", }}>{this.state.epicName}</Text>
<Icon name="md-chevron-down-outline" size={25} style={{ color: 'black', marginTop: 5, }}
/>
</View>
</ModalSelector>
{/* <SearchableDropdown
placeholder={this.state.epicName}
onTextChange={text => console.log(text)}
......@@ -373,7 +401,7 @@ export default class ReportUserEpicVelocity extends Component {
defaultIndex={2}
resetValue={false}
underlineColorAndroid="transparent"
/>
/> */}
<Text style={{ color: 'red' }}>{this.state.error3}</Text>
</View>
<Content>
......
......@@ -204,7 +204,7 @@ export default class ReportUserIndiVelocity extends Component {
responseJson.map((sprints) => {
return (
sprintList.push({
'id': sprints.sprint_id, 'name': sprints.sprint
'key': sprints.sprint_id, 'label': sprints.sprint
})
);
})
......@@ -675,8 +675,24 @@ export default class ReportUserIndiVelocity extends Component {
<Text style={{ padding: 10, fontWeight: 'bold' }}>Individual Velocity</Text>
<View style={{ paddingTop: 20, }}>
<SearchableDropdown
<View style={{ width: "96%", borderRadius: 20, height: 45, marginTop: 5, flexDirection: 'row' }}>
<ModalSelector
style={{ width: "96%",marginLeft:"4%", backgroundColor: 'white', borderColor: 'black',borderWidth:1,borderRadius:30 }}
data={this.state.resource1}
initValue={this.state.sprintName}
optionContainerStyle={{ backgroundColor: 'white' ,color:'red'}}
onChange={(item) => { this.Network2(item.key), this.NetworkBurn(item.key), this.setState({ sprintName: item.label }) }} >
<View style={{ width: 300, borderRadius: 20, height: 45, marginTop: 5, flexDirection: 'row' }}>
{/* <Text style={{ marginTop: 15, color: 'white', width: 80 }}>PROJECT : </Text> */}
<Text style={{ margin: 5, color: 'black', width: "100%", }}>{this.state.sprintName}</Text>
<Icon name="md-chevron-down-outline" size={25} style={{ color: 'black', marginTop: 5, }}
/>
</View>
</ModalSelector>
{/* <SearchableDropdown
placeholder={this.state.sprintName}
onTextChange={text => console.log(text)}
// onItemSelect={item => item.name}
......@@ -716,7 +732,7 @@ export default class ReportUserIndiVelocity extends Component {
defaultIndex={2}
resetValue={false}
underlineColorAndroid="transparent"
/>
/> */}
<Text style={{ color: 'red' }}>{this.state.error3}</Text>
</View>
......
......@@ -110,17 +110,16 @@ export default class ReportUserIndiWorkload extends Component {
if (responseJson.status === 'True') {
var empList = [];
responseJson.data.map((employee) => {
responseJson.data.map((sprints) => {
return (
empList.push({
'id': employee.id, 'name': employee.name
'key': sprints.id, 'label': sprints.name
})
);
})
// alert("Employee Data"+JSON.stringify(responseJson))
// this.Network1()
this.setState({
resource: responseJson.data
resource: empList
});
}
})
......@@ -430,8 +429,25 @@ export default class ReportUserIndiWorkload extends Component {
<Container>
<Text style={{ padding: 10, fontWeight: 'bold' }}>Individual Workload</Text>
<View style={{ paddingTop: 20, }}>
<SearchableDropdown
<View style={{ width: "96%", borderRadius: 20, height: 45, marginTop: 5, flexDirection: 'row' }}>
<ModalSelector
style={{ width: "96%",marginLeft:"4%", backgroundColor: 'white', borderColor: 'black',borderWidth:1,borderRadius:30 }}
data={this.state.resource}
initValue={this.state.assignedName}
optionContainerStyle={{ backgroundColor: 'white' ,color:'red'}}
onChange={(item) => { this.Network1(item.key), this.setState({ assignedName: item.label }) }} >
<View style={{ width: 300, borderRadius: 20, height: 45, marginTop: 5, flexDirection: 'row' }}>
{/* <Text style={{ marginTop: 15, color: 'white', width: 80 }}>PROJECT : </Text> */}
<Text style={{ margin: 5, color: 'black', width: "100%", }}>{this.state.assignedName}</Text>
<Icon name="md-chevron-down-outline" size={25} style={{ color: 'black', marginTop: 5, }}
/>
</View>
</ModalSelector>
{/* <SearchableDropdown
placeholderTextColor='black'
placeholder={this.state.assignedName}
onTextChange={text => console.log(text)}
......@@ -467,7 +483,7 @@ export default class ReportUserIndiWorkload extends Component {
defaultIndex={2}
resetValue={false}
underlineColorAndroid="transparent"
/>
/> */}
<Text style={{ color: 'red' }}>{this.state.error3}</Text>
</View>
<Content>
......
......@@ -265,35 +265,38 @@ export default class ReportUserSprintVelocity extends Component {
style={{ flex: 1 }}
behavior={Platform.OS === "ios" ? "padding" : "height"}
>
<Container>
<View style={styles.calendar}>
<DateRangePicker
style={{ zIndex: 1, position: 'absolute' }}
onChange={this.setDates}
startDate={startDate}
endDate={endDate}
// minDate={minDate}
// maxDate={maxDate}
presetButtons={true}
completed
range
displayedDate={displayedDate}
moment={moment}
>
{/* <Text style={{ color: 'white', fontSize: 14,height: 30, padding: 5,backgroundColor:"#00A2C1" }}>Date</Text> */}
<Image style={{ width: wp('9%'), height: hp('5%'), margin: 5 }} source={require('../Images/calender.jpeg')} />
</DateRangePicker>
<TouchableOpacity style={styles.opensave} onPress={() => { this.Reports() }}>
<Text style={{ color: 'black', paddingTop: 15 }}>Show</Text>
</TouchableOpacity>
</View>
<View style={styles.calendar}>
<DateRangePicker
style={{ zIndex: 1,top:100,flex:1}}
containerStyle={{marginTop:-200}}
onChange={this.setDates}
startDate={startDate}
endDate={endDate}
// minDate={minDate}
// maxDate={maxDate}
presetButtons={true}
completed
range
displayedDate={displayedDate}
moment={moment}
>
{/* <Text style={{ color: 'white', fontSize: 14,height: 30, padding: 5,backgroundColor:"#00A2C1" }}>Date</Text> */}
<Image style={{ width: wp('9%'), height: hp('5%'), margin: 5 }} source={require('../Images/calender.jpeg')} />
</DateRangePicker>
<TouchableOpacity style={styles.opensave} onPress={() => { this.Reports() }}>
<Text style={{ color: 'black', paddingTop: 15 }}>Show</Text>
</TouchableOpacity>
</View>
<Content>
{/* Sprint Velocity */}
<View style={{ flex: 1, marginTop: 10, marginBottom: 10 }}>
......@@ -376,12 +379,14 @@ const styles = StyleSheet.create({
}),
},
calendar: {
...Platform.select({
ios: {
flexDirection: 'row',zIndex:100
},
android: {
flexDirection: 'row',
},
}),
},
......
......@@ -12,6 +12,7 @@ import { widthPercentageToDP as wp, heightPercentageToDP as hp } from 'react-nat
import Modal from "react-native-simple-modal";
// import Icon from 'react-native-vector-icons/FontAwesome';
import { API } from "../WebServices/RestClient";
import moment from "moment";
import NetInfo from '@react-native-community/netinfo';
import jwt_decode from "jwt-decode";
import Snackbar from 'react-native-snackbar';
......@@ -124,7 +125,7 @@ class ListItem extends React.Component {
<Text style={styles.signUpText1}>{item.project_name}</Text>
</View>
<Text style={styles.signUpText2} > {item.date}</Text>
<Text style={styles.signUpText2}>{moment(item.date).format('MM-DD-YYYY hh:mm:ss')}</Text>
</View>
......
......@@ -67,6 +67,7 @@ class ListItem extends React.Component {
this.setState({ expanded: !this.state.expanded });
}
getMessages() {
log("Info", " getMessages(role, userToken, cropcode) is used getting task related messages");
......@@ -541,6 +542,7 @@ export default class Pending extends Component {
});
componentDidMount() {
this.getActiveSprints();
AsyncStorage.getItem("userName", (err, res) => {
this.setState({ usertype: res });
console.warn(this.state.usertype);
......@@ -558,6 +560,7 @@ export default class Pending extends Component {
console.warn(this.state.moduleId);
// alert(this.state.moduleId)
});
log("Debug", "user pending mytask tasks screen is loaded at user side");
NetInfo.fetch().then(state => {
if (state.type == "none" || state.type == 'unknown' || state.type == 'undefined') {
......@@ -568,6 +571,7 @@ export default class Pending extends Component {
duration: Snackbar.LENGTH_LONG,
});
this.getSubtaskListPending()
// this.getPendingtasksList();
// this.getActive(); //For pending subtaskslist from offline
} else {
......@@ -579,7 +583,93 @@ export default class Pending extends Component {
});
}
//get ActiveSprints data
getActiveSprints() {
log("Info", "UserProfile:GetStatus() method is used to get status of employee");
AsyncStorage.getItem("empId", (err, res) => {
const empId = res;
AsyncStorage.getItem("cropcode", (err, res) => {
const cropcode = res;
AsyncStorage.getItem("emp_role", (err, res) => {
const emp_role = res;
AsyncStorage.getItem("projectId", (err, res) => {
const projectId = res;
NetInfo.fetch().then(state => {
if (state.type == "none" || state.type == 'unknown' || state.type == 'undefined') {
// console.log(state.type);
Snackbar.show({
title: 'No Internet Connection',
backgroundColor: 'red',
duration: Snackbar.LENGTH_LONG,
});
this.getOfflineActiveSprints("currentsprint")//Getting Current Sprint Backlogs in offline
// this.getBacklogs("currentsprint") //Getting Current Sprint Backlogs in offline
} else {
fetch(API + 'getUpdateSprint.php', {
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({
crop: cropcode,
// userType: emp_role,
// empId: empId,
action: "get_sprints",
projectId: projectId
})
})
.then((response) => response.json())
.then((responseJson) => {
//alert(JSON.stringify(responseJson.data))
// console.warn("getActiveSprint data" + JSON.stringify(responseJson.data));
if (responseJson.status == 'True') {
this.setState({
isLoading: false,
dataSource1: [...responseJson.data],
moduleId: responseJson.data[0].moduleId,
ideaId: responseJson.data[0].ideaId,
moduleDesc: responseJson.data[0].moduleDesc,
startDate: responseJson.data[0].startDate,
targetDate: responseJson.data[0].targetDate,
sprint_status: responseJson.data[0].sprint_status,
}, function () {
// In this block you can do something with new state.
});
AsyncStorage.setItem('moduleId', responseJson.data[0].moduleId);
AsyncStorage.setItem('ideaId', responseJson.data[0].ideaId);
this.getInvolvedEmployees(responseJson.data[0].moduleId)
this.getRequestedIdeas(responseJson.data[0].moduleId)
} else {
//For No Active Sprints
this.setState({
isLoading: false,
dataSource1: [],
moduleId: '',
moduleDesc: ''
})
log("Warn", "status of employee is not available");
}
})
.catch((error) => {
console.error(error);
log("Error", "error in getting status of employee");
});
}
});
});
});
});
});
}
//to refresh the pending my task list
onRefresh() {
this.setState({
......@@ -716,26 +806,30 @@ export default class Pending extends Component {
.then((response) => response.json())
.then((responseJson) => {
console.log(responseJson);
// alert(JSON.stringify(responseJson))
//alert(JSON.stringify(responseJson))
console.warn("module id setting" + JSON.stringify(responseJson))
if (responseJson.connection === 'connected ') {
if (responseJson.status === 'True') {
// this.getSubtaskListPending(responseJson.data) //For store pending subtaskslist from offline
// this.setState({
// isLoading: false,
// // dataSource: responseJson.data,
// isFetching: false
// }, function () {
// });
this.setState({
isLoading: false,
moduleId: responseJson.data[0].moduleId,
}, function () {
// In this block you can do something with new state.
});
AsyncStorage.setItem('moduleId', responseJson.data[0].moduleId);
this.getSubtaskListPending(responseJson.data[0].moduleId)
// this.arrayholder = responseJson.data;
} else {
log("Info", "No ToDo List");
// this.arrayholder = [];
this.setState({
isLoading: false,
dataSource: []
dataSource: [],
moduleId: '',
moduleDesc: ''
})
Snackbar.show({
title: 'No ToDo List',
......@@ -1458,12 +1552,19 @@ updateActiveTaskStatus1 = (todoStoryId,assignedTo,inProgressStoryId) => {
<NavigationEvents
onDidFocus={() => this.onRefresh()}
/>
<Input placeholder="Search"
<Input placeholder="Search123"
onChangeText={(text) => this.SearchFilterFunction(text)} />
<Icon style={{ marginRight: 10, color: 'black' }} size={20} name="search" />
</Item>
<Toast ref="toast" />
<View style={{ height: '80%' }}>
<View style={{ flexDirection: 'row' }}>
<Text style={{ marginTop: 5, color: 'blue', width: '60%', marginLeft: 5, fontSize: 14,fontWeight:'bold' }}>ACTIVE SPRINT - {(this.state.cropcode).substring(0, 3).toUpperCase()} : {this.state.moduleDesc}</Text>
{this.state.sprint_status === 'commited' &&
<Text style={{ width: 80, color: 'orange',paddingTop:5,fontWeight:'bold' }}>Committed</Text>
}
</View>
<FlatList
......
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