import {
	WeaTools
} from 'ecCom'

export const getAuth = (params) => {
	return WeaTools.callApi('/api/hrm/trainplan/getHasRight', 'GET', params);
}

export const getMainTable = (params) => {
	return WeaTools.callApi('/api/hrm/trainplan/getSearchList', 'GET', params);
}

export const getSubTable = (params) => {
	return WeaTools.callApi('/api/hrm/trainplanrange/getSearchList', 'GET', params);
}


export const getButtonsMenu = (params) => {
	return WeaTools.callApi('/api/hrm/trainplan/getRightMenu', 'GET', params);
}

export const getSearchInfo = (params) => {
	return WeaTools.callApi('/api/hrm/trainplan/getSearchCondition', 'GET', params);
}


export const deleteMainTableInfo = (params) => {
	return WeaTools.callApi('/api/hrm/trainplan/delete', 'POST', params);
}

export const deleteSubTableInfo = (params) => {
	return WeaTools.callApi('/api/hrm/trainplanrange/delete', 'POST', params);
}


export const notify = (params) => {
	return WeaTools.callApi('/api/hrm/trainplan/inform', 'GET', params);
}


export const getMainForm = (params) => {
	return WeaTools.callApi('/api/hrm/trainplan/getTrainPlanForm?is_multilang_set=true', 'GET', params);
}

export const getSubForm = (params) => {
	return WeaTools.callApi('/api/hrm/trainplanrange/getTrainPlanRangeForm?is_multilang_set=true', 'GET', params);
}

export const saveMainForm = (params) => {
	return WeaTools.callApi('/api/hrm/trainplan/add', 'POST', params);
}

export const saveSubForm = (params) => {
	return WeaTools.callApi('/api/hrm/trainplanrange/add', 'POST', params);
}

export const saveEditMainForm = (params) => {
	return WeaTools.callApi('/api/hrm/trainplan/edit', 'POST', params);
}

export const saveEditSubForm = (params) => {
	return WeaTools.callApi('/api/hrm/trainplanrange/edit', 'POST', params);
}

export const saveSchedule = (params) => {
	return WeaTools.callApi('/api/hrm/trainplanday/add', 'POST', params);
}

export const getTrainSchedule = (params) => {
	return WeaTools.callApi('/api/hrm/trainplanday/getTrainPlanDayForm?is_multilang_set=true', 'GET', params);
}

export const getTrainLayoutInfo = (params) => {
	return WeaTools.callApi('/api/hrm/trainplan/getTrainLayoutInfo', 'GET', params);
}

export const getWorkFlowId = (params) => {
	return WeaTools.callApi('/api/hrm/trainplan/getRequestInfo', 'GET', params);
}

export const getSingleArrangeInfo = (params) => {
	return WeaTools.callApi('/api/hrm/trainplan/getTrainPlanForm?is_multilang_set=true', 'GET', params);
}

export const getSinglePageButtonsMenu = (params) => {
	return WeaTools.callApi('/api/hrm/trainplan/getViewRightMenu', 'GET', params);
}