import {
	WeaTools
} from 'ecCom'

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

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

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

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

export const getLeaveTypesForm = (params) => {
	return WeaTools.callApi('/api/kq/leavetypes/getLeaveTypesForm', 'GET', params);
}

export const addLeaveTypes = (params) => {
	return WeaTools.callApi('/api/kq/leavetypes/addLeaveTypes', 'POST', params);
}

export const editLeaveTypes = (params) => {
	return WeaTools.callApi('/api/kq/leavetypes/editLeaveTypes', 'POST', params);
}

export const deleteLeaveTypes = (params) => {
	return WeaTools.callApi('/api/kq/leavetypes/deleteLeaveTypes', 'POST', params);
}

export const isNameRepeat = (params) => {
	return WeaTools.callApi('/api/kq/leavetypes/isNameRepeat', 'GET', params);
}

export const saveDisableLeaveRules = (params) => {
	return WeaTools.callApi('/api/kq/leavetypes/saveDisableLeaveTypes', 'POST', params);
}