Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. workSchedule: {
  2. all: (params = { count: 10000 }) => {
  3. const ENDPOINT = ConturConfig.get().API_SP;
  4. return axios.get(`${ENDPOINT}/api/wt_schedule/v1/workScheduleList`, {
  5. params
  6. });
  7. },
  8. find: id => {
  9. const ENDPOINT = ConturConfig.get().API_SP;
  10. return axios.get(
  11. `${ENDPOINT}/api/wt_schedule/v1/workScheduleFull/${id}`
  12. );
  13. },
  14. update: (guid, params) => {
  15. const ENDPOINT = ConturConfig.get().API_SP;
  16. if (params.spStatus) {
  17. return axios.put(
  18. `${ENDPOINT}/api/wt_schedule/v1/workschedule/${guid}/status`,
  19. { guid, ...params }
  20. );
  21. }
  22. },
  23. calendar: (year) => {
  24. const ENDPOINT = ConturConfig.get().API_SP;
  25. return axios.get(`${ENDPOINT}/api/wt_schedule/v1/workScheduleCalendar`, {
  26. params: { year }
  27. });
  28. }
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement