import client from './client'

export function getWorkbench(periodId) {
  return client.get('/okr/workbench', { params: { periodId } })
}

export function saveDraft(data) {
  return client.post('/okr/draft', data)
}

export function submitOkr(data) {
  return client.post('/okr/submit', data)
}

export function reviewOkr(data) {
  return client.post('/okr/review', data)
}

export function updateProgress(krId, data) {
  return client.put(`/okr/kr/${krId}/progress`, data)
}

export function getMyOkr(periodId) {
  return client.get('/okr/my', { params: { periodId } })
}

export function getTeamOkr(periodId) {
  return client.get('/okr/team', { params: { periodId } })
}
