Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
loadData() {
const { projectId } = AppState.currentMenuType;
axios.get(`agile/v1/projects/${projectId}/product_version/versions`)
.then((res) => {
const latestVersionId = Math.max(...res.filter(item => item.statusCode !== 'archived').map((item => item.versionId)));
if (latestVersionId !== -Infinity) {
this.loadSelectData(latestVersionId);
}
this.setState({
versionList: res.filter(item => item.statusCode !== 'archived'),
currentVersionId: latestVersionId,
loading: false,
});
});
}
loadData() {
const projectId = AppState.currentMenuType.id;
const orgId = AppState.currentMenuType.organizationId;
axios.get(`agile/v1/projects/${projectId}/sprint/active/${orgId}`)
.then((res) => {
this.setState({
sprint: res,
loading: false,
});
});
}
loadData() {
const projectId = AppState.currentMenuType.id;
const userId = AppState.getUserId;
this.setState({ loading: true });
axios.get(`/agile/v1/projects/${projectId}/issues/unfinished/${userId}`)
.then((res) => {
this.setState({
issues: res,
loading: false,
});
});
}
loadPriorityInfo() {
this.setState({ loading: true });
const projectId = AppState.currentMenuType.id;
const orgId = AppState.currentMenuType.organizationId;
axios.get(`agile/v1/projects/${projectId}/reports/issue_priority_distribution_chart?organizationId=${orgId}`)
.then((res) => {
this.setState({
priorityInfo: res,
loading: false,
});
});
}
loadEpics() {
const projectId = AppState.currentMenuType.id;
const orgId = AppState.currentMenuType.organizationId;
axios.get(`/agile/v1/projects/${projectId}/issues/epics?organizationId=${orgId}`)
.then((res) => {
this.handleEpics(res.slice(0, 6));
});
}
loadTemplateType = (appType, orgId) => {
const path = appType === 'site' ? '' : `/organizations/${orgId}`;
return axios.get(`/notify/v1/notices/send_settings/names${path}`);
};
loadTemplateType = (appType, orgId) => {
const path = appType === 'site' ? '' : `/organizations/${orgId}`;
return axios.get(`/notify/v1/notices/send_settings/names${path}`);
}
loadCurrentRecord = (id, appType, orgId) => {
const path = appType === 'site' ? '' : `/organizations/${orgId}`;
return axios.get(`/notify/v1/notices/send_settings/${id}${path}`);
};
searchMemberId(loginName) {
if (loginName) {
return axios.get(`/iam/v1/users?login_name=${loginName}`);
}
}
loadProgramDetail = (recordId, type, id) => {
const path = type === 'site' ? '' : `/${type}s/${id}`;
return axios.get(`/asgard/v1/schedules${path}/methods/${recordId}`);
};