Commit eb0043ca authored by tejaswi's avatar tejaswi
Browse files

All the Changes

1 merge request!2WIP: Resolve "Image upload"
This commit is part of merge request !2. Comments created here will be created in the context of that merge request.
Showing with 43 additions and 59 deletions
+43 -59
......@@ -104,7 +104,7 @@ export default class AdminProjectReports extends Component {
displayedDate: moment(),
startDate: moment().set("date", -15),
endDate: moment().set("date", 15),
selectedDays: [],
selectedWeeks: [],
select: ''
......@@ -156,32 +156,15 @@ export default class AdminProjectReports extends Component {
Reports() {
const { assignedto, sprintName, startDate, endDate } = this.state;
// alert("Test")
// alert("value:"+assignedto+"label:"+sprintName)
// alert("startDate :"+moment(this.state.startDate).format('YYYY-MM-DD[T]hh:mm:ss.SSS[Z]')+"endDate :"+moment(this.state.startDate).format('YYYY-MM-DD[T]hh:mm:ss.SSS[Z]'))
// const data = {
// "selectedOption":
// {
// "value": assignedto,
// "label": sprintName
// }
// }
const filter =[{
startDate: moment(this.state.startDate).format('YYYY-MM-DD[T]hh:mm:ss.SSS[Z]'),
endDate: moment(this.state.endDate).format('YYYY-MM-DD[T]hh:mm:ss.SSS[Z]'),
const filter = [{
startDate: moment(this.state.startDate).format('YYYY-MM-DD[T]hh:mm:ss.SSS[Z]'),
endDate: moment(this.state.endDate).format('YYYY-MM-DD[T]hh:mm:ss.SSS[Z]'),
"key": "selection"
}]
// alert(JSON.stringify({data,filter}))
// {"data":{"selectedOption":
// {"value":"6b2218ba7636d07530aa63b3848656ba",
// "label":"Naveen Gade"}},"
// filter":[{"startDate":"2021-06-30T18:30:00.000Z",
// "endDate":"2021-07-30T18:30:00.000Z","key":"selection"}]}
// alert(JSON.stringify(filter1));
NetInfo.fetch().then(state => {
if (state.type == "none") {
Snackbar.show({
......@@ -191,21 +174,19 @@ export default class AdminProjectReports extends Component {
});
} else {
fetch(ReportsAPI + `getAllCount`, {
method: 'POST',
fetch(ReportsAPI + `projectReport`, {
method: 'GET',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({
// data,
filter
})
}).then((response) => response.json())
.then((responseJson) => {
// alert("data" + JSON.stringify(responseJson))
// alert(JSON.stringify(responseJson))
// alert("project reports" + JSON.stringify(responseJson))
// var sprintList = [];
// responseJson.map((sprints) => {
......@@ -216,6 +197,10 @@ export default class AdminProjectReports extends Component {
// );
// })
// var employee = [];
// responseJson.map((x) => {
// return (x.name !== "admin@novisync.com" ? employee.push(x) : null);
// })
var employee = [];
responseJson.map((x) => {
return (x.name !== "admin@novisync.com" ? employee.push(x) : null);
......@@ -223,13 +208,12 @@ export default class AdminProjectReports extends Component {
this.setState({
dataSource: employee,
},
function () {
}
);
// alert("data "+JSON.stringify(this.state.dataSource)+"test")
alert("data "+JSON.stringify(this.state.projectreports)+"test")
}).catch((error) => {
check.Maintenance();
......@@ -242,8 +226,8 @@ export default class AdminProjectReports extends Component {
});
}
render() {
const { assignedto, sprintName, startDate, endDate, displayedDate } = this.state;
......@@ -339,10 +323,10 @@ export default class AdminProjectReports extends Component {
<Image style={{ width: wp('8%'), height: hp('4%'), margin: 5 }} source={require('../Images/calender.jpeg')} />
</DateRangePicker>
<TouchableOpacity style={styles.opensave} onPress={() => { this.Reports() }}>
<Text style={{ color: 'white', padding: 5 }}>Show</Text>
</TouchableOpacity>
<Text style={{ color: 'white', padding: 5 }}>Show</Text>
</TouchableOpacity>
</View>
......@@ -394,25 +378,25 @@ export default class AdminProjectReports extends Component {
<DataTable>
<DataTable.Header style={{ backgroundColor: '#333f50', color: "white" }}>
<DataTable.Title style={{ width: 200 }}><Text style={{ color: "white" }}>EMPLOYEE_NAME</Text></DataTable.Title>
<DataTable.Title style={{ width: 200 }}><Text style={{ color: "white" }}>NO_OF_PROJECTS_INVOLVED</Text></DataTable.Title>
<DataTable.Title style={{ width: 200 }}><Text style={{ color: "white" }}>ASSIGNED_STORY_POINTS</Text></DataTable.Title>
<DataTable.Title style={{ width: 100 }}><Text style={{ color: "white" }}>PENDING</Text></DataTable.Title>
<DataTable.Title style={{ width: 100 }}><Text style={{ color: "white" }}>COMPLETED</Text></DataTable.Title>
<DataTable.Title style={{ width: 200 }}><Text style={{ color: "white" }}>Project Name</Text></DataTable.Title>
<DataTable.Title style={{ width: 200 }}><Text style={{ color: "white" }}>No of total Users</Text></DataTable.Title>
<DataTable.Title style={{ width: 200 }}><Text style={{ color: "white" }}>No of active Users</Text></DataTable.Title>
<DataTable.Title style={{ width: 100 }}><Text style={{ color: "white" }}>No of inactive Users</Text></DataTable.Title>
<DataTable.Title style={{ width: 100 }}><Text style={{ color: "white" }}>No of Working Users</Text></DataTable.Title>
</DataTable.Header>
</DataTable>
{this.state.dataSource.length !== 0 ? this.state.dataSource.map((item, index) => {
{this.state.dataSource.map((item, index) => {
return (
<DataTable>
<DataTable.Row style={{ marginLeft: -10,}} key={index}>
<TouchableOpacity onPress={() => this.props.navigation.navigate("AdminReportsUser", { emp_id: item.emp_id,name: item.name,projects_involved:item.data[0].projects_involved,startDate:this.state.startDate,endDate:this.state.endDate })}>
<DataTable.Cell style={{ backgroundColor: '#eaedf3', width: 200,marginTop:15 }}>{item.name}</DataTable.Cell>
</TouchableOpacity>
<DataTable.Cell style={{ paddingLeft: 20, width: 200 }}>{item.data[0].projects_involved}</DataTable.Cell>
{item.data[0].estimated !== null ? <DataTable.Cell style={{ width: 200 }}>{item.data[0].estimated}</DataTable.Cell> : <DataTable.Cell style={{ width: 200 }}>0</DataTable.Cell>}
{item.data[0].pending !== null ? <DataTable.Cell style={{ width: 100 }}>{item.data[0].pending}</DataTable.Cell> : <DataTable.Cell style={{ width: 100 }}>0</DataTable.Cell>}
{item.data[0].completed !== null ? <DataTable.Cell style={{ width: 100 }}>{item.data[0].completed}</DataTable.Cell> : <DataTable.Cell style={{ width: 100 }}>0</DataTable.Cell>}
<DataTable.Row style={{ marginLeft: -10, }} key={index}>
<DataTable.Cell style={{ paddingLeft: 20, width: 200 }}>{item.project_name}</DataTable.Cell>
<DataTable.Cell style={{ paddingLeft: 20, width: 200 }}>{item.Total_users_per_project}</DataTable.Cell>
<DataTable.Cell style={{ width: 200 }}>{item.active_users_per_project}</DataTable.Cell>
<DataTable.Cell style={{ width: 200 }}>{item.Inactive_users_per_project}</DataTable.Cell>
<DataTable.Cell style={{ width: 100 }}>{item.Working_users_per_projects}</DataTable.Cell>
</DataTable.Row>
......@@ -421,7 +405,7 @@ export default class AdminProjectReports extends Component {
)
}) : null}
}) }
</View>
......
/*****MySql********/
//pre production environment (development)
export const API = "https://api-single.agile24x7.com/release/";
export const ReportsAPI = "https://testapiv2reporting.agile24x7.com/";
export const Client_URL = "https://sdtest.agile24x7.com/#/";
// export const API = "https://api-single.agile24x7.com/release/";
// export const ReportsAPI = "https://testapiv2reporting.agile24x7.com/";
// export const Client_URL = "https://sdtest.agile24x7.com/#/";
//production environment
// export const API = "https://api-single.agile24x7.com/Migration/";
......@@ -15,9 +15,9 @@ export const Client_URL = "https://sdtest.agile24x7.com/#/";
//pre production environment (development)
// export const API = "https://api-single.agile24x7.com/pg_migration/";
// export const ReportsAPI = "https://pgtestreporting.agile24x7.com/";
// export const Client_URL = "https://pgtest.agile24x7.com/#/";
export const API = "https://api-single.agile24x7.com/pg_migration/";
export const ReportsAPI = "https://pgtestreporting.agile24x7.com/";
export const Client_URL = "https://pgtest.agile24x7.com/#/";
......
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