Commit 546bd1ef authored by santhosh's avatar santhosh
Browse files

agile squad

parent 4f389939
Showing with 727 additions and 117 deletions
+727 -117
......@@ -28,6 +28,7 @@ const AppContainer = createAppContainer(RootStack);
export default class App extends Component {
render() {
console.disableYellowBox = true;
return <AppContainer />;
}
}
\ No newline at end of file
......@@ -236,7 +236,7 @@ export default class AddRoadblock extends React.Component {
//Add the subtask start
addRoadblock = () => {
log("Info", " addSubTask() is used to add sub task");
const { item, person,tasktitle, storyPoints, taskDescription, acceptanceCriteria, assignedto, subTaskId, roadblockId, assignedBy, roadBlockDescription, taskid, subTask, description, days, time, prioritySelected, severitySelected } = this.state;
const { item, person, tasktitle, storyPoints, taskDescription, acceptanceCriteria, assignedto, subTaskId, roadblockId, assignedBy, roadBlockDescription, taskid, subTask, description, days, time, prioritySelected, severitySelected } = this.state;
console.warn("assignedto" + assignedto);
console.warn("subTaskId" + subTaskId);
console.warn("roadblockId" + roadblockId);
......@@ -259,79 +259,79 @@ export default class AddRoadblock extends React.Component {
const cropcode = res;
AsyncStorage.getItem("projectId", (err, res) => {
const projectId = res;
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 {
if (this.isValid()) {
fetch(API + 'manage_roadblocks.php', {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({
// title: subTask,
// description: description,
// days: days,
crop: cropcode,
EstimatedHours: EstHours,
assignedBy: empId,
assignedTo: assignedto,
// dependencyId: this.state.dependencyid,
action: "assignRoadblock",
subTaskId: subTaskId,
// roadblockId:this.state.roadblockId,
// days: this.state.days,
// hours: this.state.time,
roadblockId: roadblockId,
title: tasktitle,
roadBlockDescription: roadBlockDescription,
prioritySelected: prioritySelected,
severitySelected: severitySelected,
storyPoints: storyPoints,
description: taskDescription,
acceptanceCriteria: acceptanceCriteria,
projectId:projectId,
// maintaskId: this.state.taskid,
// moduleId: this.state.moduleId,
// empId: empId,
// crop: cropcode,
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 {
if (this.isValid()) {
fetch(API + 'manage_roadblocks.php', {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({
// title: subTask,
// description: description,
// days: days,
crop: cropcode,
EstimatedHours: EstHours,
assignedBy: empId,
assignedTo: assignedto,
// dependencyId: this.state.dependencyid,
action: "assignRoadblock",
subTaskId: subTaskId,
// roadblockId:this.state.roadblockId,
// days: this.state.days,
// hours: this.state.time,
roadblockId: roadblockId,
title: tasktitle,
roadBlockDescription: roadBlockDescription,
prioritySelected: prioritySelected,
severitySelected: severitySelected,
storyPoints: storyPoints,
description: taskDescription,
acceptanceCriteria: acceptanceCriteria,
projectId: projectId,
// maintaskId: this.state.taskid,
// moduleId: this.state.moduleId,
// empId: empId,
// crop: cropcode,
})
}).then((response) => response.json())
.then((responseJson) => {
// alert(JSON.stringify(responseJson));
// console.log(JSON.stringify(responseJson));
console.log(responseJson);
if (responseJson.status === 'True') {
console.log("done")
this.props.navigation.goBack();
this.setState({ open: false })
}
}).catch((error) => {
console.error(error);
log("Error", "addSubTask error");
});
this.closeModal();
this.isAdedSucess();
})
}).then((response) => response.json())
.then((responseJson) => {
// alert(JSON.stringify(responseJson));
// console.log(JSON.stringify(responseJson));
console.log(responseJson);
if (responseJson.status === 'True') {
console.log("done")
this.props.navigation.goBack();
this.setState({ open: false })
}
}).catch((error) => {
console.error(error);
log("Error", "addSubTask error");
});
this.closeModal();
this.isAdedSucess();
}
}
}
});
});
});
});
});
};
//Getting the Employee List for Adding subtask
......@@ -550,7 +550,10 @@ export default class AddRoadblock extends React.Component {
</View> */}
<View style={{ paddingTop: 2, }}>
<View style={{ flexDirection: 'row', marginLeft: 10 }}>
<Text>Task Name</Text>
<Text style={{ color: 'red' }}>*</Text>
</View>
<View style={{ paddingLeft: 10, }}>
<TextInput style={{ width: wp('80%'), height: 35, color: 'black', borderBottomWidth: 1, }}
......@@ -564,7 +567,10 @@ export default class AddRoadblock extends React.Component {
<Text style={{ color: 'red' }}>{this.state.error1}</Text>
</View>
<View style={{ flexDirection: 'row', marginLeft: 10 }}>
<Text>Roadblock Description</Text>
<Text style={{ color: 'red' }}>*</Text>
</View>
<View style={{ paddingLeft: 10, }}>
<TextInput style={{ width: wp('80%'), height: 35, color: 'black', borderBottomWidth: 1, }}
......@@ -578,7 +584,10 @@ export default class AddRoadblock extends React.Component {
<Text style={{ color: 'red' }}>{this.state.error1}</Text>
</View>
<View style={{ flexDirection: 'row', marginLeft: 10 }}>
<Text>Description*</Text>
<Text style={{ color: 'red' }}>*</Text>
</View>
<View style={{ paddingLeft: 10, }}>
......@@ -591,7 +600,10 @@ export default class AddRoadblock extends React.Component {
</TextInput>
<Text style={{ color: 'red' }}>{this.state.error2}</Text>
</View>
<View style={{ flexDirection: 'row', marginLeft: 10 }}>
<Text>Acceptance Criteria/Definition of Done</Text>
<Text style={{ color: 'red' }}>*</Text>
</View>
<View style={{ paddingLeft: 10, }}>
......@@ -604,9 +616,20 @@ export default class AddRoadblock extends React.Component {
</TextInput>
<Text style={{ color: 'red' }}>{this.state.error2}</Text>
</View>
<View style={{ flexDirection: 'row' }}>
<View style={{ padding: 5, width: '48%', flexDirection: 'row' }}>
<Text>Select User</Text>
<Text style={{ color: 'red' }}>*</Text>
</View>
<View style={{ padding: 5, width: '48%', flexDirection: 'row' }}>
<Text>Story Points</Text>
<Text style={{ color: 'red' }}>*</Text>
</View>
</View>
<View style={{ paddingTop: 2, flexDirection: 'row' }}>
<View style={{ paddingTop: 2,flexDirection:'row' }}>
<SearchableDropdown
placeholder={this.state.assignedName}
onTextChange={text => console.log(text)}
......@@ -614,7 +637,7 @@ export default class AddRoadblock extends React.Component {
// onItemSelect={item => item.name}
onItemSelect={(item) => this.setState({ assignedto: item.id, assignedName: item.name })}
placeholderTextColor='black'
containerStyle={{ padding: 5,width:'48%' }}
containerStyle={{ padding: 5, width: '48%' }}
textInputStyle={{
padding: 12,
borderWidth: 1,
......@@ -651,8 +674,9 @@ export default class AddRoadblock extends React.Component {
{/* <Text style={{ marginLeft: 10, paddingTop: 10 }}>Story Points</Text> */}
<ModalSelector
style={{width:'48%'}}
style={{ width: '48%' }}
// value={this.state.storyPoints}
data={data}
initValue="Select something yummy!"
......@@ -664,7 +688,7 @@ export default class AddRoadblock extends React.Component {
onChange={(option) => { this.setState({ storyPoints: option.label }) }}>
<TextInput
style={{ borderWidth: 1, borderColor: '#ccc', padding: 10, height: 50, width: '100%', marginLeft: '2%',marginTop: '4%', color: 'black' }}
style={{ borderWidth: 1, borderColor: '#ccc', padding: 10, height: 50, width: '100%', marginLeft: '2%', marginTop: '4%', color: 'black' }}
editable={false}
placeholder="Select Story Points!"
value={this.state.storyPoints} />
......@@ -673,54 +697,63 @@ export default class AddRoadblock extends React.Component {
</View>
<View style={{ flexDirection: 'row' }}>
<View style={{ padding: 5, width: '48%', flexDirection: 'row' }}>
<Text>Severity</Text>
<Text style={{ color: 'red' }}>*</Text>
</View>
<View style={{ paddingTop: 2,flexDirection:'row' }}>
<View style={{ padding: 5, width: '48%', flexDirection: 'row' }}>
{/* <Text style={{ marginLeft: 10, paddingTop: 10 }}>Severity Level</Text> */}
<Text>Priority</Text>
<Text style={{ color: 'red' }}>*</Text>
</View>
</View>
<View style={{ paddingTop: 2, flexDirection: 'row' }}>
<ModalSelector
style={{width:'48%'}}
// value={this.state.storyPoints}
data={data1}
initValue="Select Severity"
// supportedOrientations={['landscape']}
accessible={true}
optionContainerStyle={{ backgroundColor: 'white' }}
scrollViewAccessibilityLabel={'Scrollable options'}
cancelButtonAccessibilityLabel={'Cancel Button'}
onChange={(option) => { this.setState({ severitySelected: option.label }) }}>
<ModalSelector
style={{ width: '48%' }}
// value={this.state.storyPoints}
data={data1}
initValue="Select Severity"
// supportedOrientations={['landscape']}
accessible={true}
optionContainerStyle={{ backgroundColor: 'white' }}
scrollViewAccessibilityLabel={'Scrollable options'}
cancelButtonAccessibilityLabel={'Cancel Button'}
onChange={(option) => { this.setState({ severitySelected: option.label }) }}>
<TextInput
style={{ borderWidth: 1, borderColor: '#ccc', padding: 10, height: 50, width: '96%', marginLeft: '2%', color: 'black' }}
editable={false}
placeholder="Select Severity"
value={this.state.severitySelected} />
<TextInput
style={{ borderWidth: 1, borderColor: '#ccc', padding: 10, height: 50, width: '96%', marginLeft: '2%', color: 'black' }}
editable={false}
placeholder="Select Severity"
value={this.state.severitySelected} />
</ModalSelector>
</ModalSelector>
{/* <Text style={{ marginLeft: 10, paddingTop: 10 }}>Priority Level</Text> */}
{/* <Text style={{ marginLeft: 10, paddingTop: 10 }}>Priority Level</Text> */}
<ModalSelector
style={{width:'48%'}}
data={data1}
initValue="Select Priority "
// supportedOrientations={['landscape']}
optionContainerStyle={{ backgroundColor: 'white' }}
accessible={true}
scrollViewAccessibilityLabel={'Scrollable options'}
cancelButtonAccessibilityLabel={'Cancel Button'}
onChange={(option) => { this.setState({ prioritySelected: option.label }) }}>
<ModalSelector
style={{ width: '48%' }}
data={data1}
initValue="Select Priority "
// supportedOrientations={['landscape']}
optionContainerStyle={{ backgroundColor: 'white' }}
accessible={true}
scrollViewAccessibilityLabel={'Scrollable options'}
cancelButtonAccessibilityLabel={'Cancel Button'}
onChange={(option) => { this.setState({ prioritySelected: option.label }) }}>
<TextInput
style={{ borderWidth: 1, borderColor: '#ccc', padding: 10, height: 50, width: '100%', marginLeft: '2%', color: 'black' }}
editable={false}
placeholder="Select Priority "
value={this.state.prioritySelected} />
<TextInput
style={{ borderWidth: 1, borderColor: '#ccc', padding: 10, height: 50, width: '100%', marginLeft: '2%', color: 'black' }}
editable={false}
placeholder="Select Priority "
value={this.state.prioritySelected} />
</ModalSelector>
</ModalSelector>
</View>
<View style={{ flexDirection: 'row', marginTop: 10, justifyContent: "space-between" }}>
......
This diff is collapsed.
......@@ -92,6 +92,7 @@ import AddStory from '../CommonComponents/AddStory';
import AddUserStory from '../CommonComponents/AddUserStory';
import EditUser from '../CommonComponents/EditUser';
import AddUser from '../CommonComponents/AddUser';
import AddSquad from '../CommonComponents/AddSquad';
import ViewSubTasks from '../CommonComponents/ViewSubTasks';
import UpdateEmployee from '../CommonComponents/UpdateEmployee';
import ModuleAdd from '../CommonComponents/ModuleAdd';
......@@ -546,6 +547,12 @@ GroupChat:{
header: null,
},
},
AddSquad: {
screen: AddSquad,
navigationOptions: {
header: null,
},
},
UpdateEmployee: {
screen: UpdateEmployee,
navigationOptions: {
......
......@@ -1004,7 +1004,7 @@ export default class UserManageEmployees extends Component {
button5 =
// <View style={{ height: hp('10%') }}></View>
<TouchableOpacity onPress={() => this.props.navigation.navigate("AddUser")} style={styles.bottomView}>
<TouchableOpacity onPress={() => this.props.navigation.navigate("AddSquad")} style={styles.bottomView}>
<View style={styles.bottomView} >
<Text style={styles.textStyle}> Add Squad Member</Text>
......@@ -1014,7 +1014,7 @@ export default class UserManageEmployees extends Component {
button5 =
// <View style={{ height: hp('10%') }}></View>
<TouchableOpacity onPress={() => this.props.navigation.navigate("AddUser")} style={styles.bottomView}>
<TouchableOpacity onPress={() => this.props.navigation.navigate("AddSquad")} style={styles.bottomView}>
<View style={styles.bottomView} >
<Text style={styles.textStyle}> Add Squad Member</Text>
......
// ------------ Testing data single db
// export const API = "https://api-single.agile24x7.com/release/"; //production
// export const ReportsAPI = "https://apiv2reporting.agile24x7.com/"//Reports
// export const ReportsAPI="https://testapiv2reporting.agile24x7.com/" //pre production"
// // ------------ Live data single db
// ------------ Live data single db
// export const ReportsAPI="https://testapiv2reporting.agile24x7.com/" //pre production"
......
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