Browse Source

update payload

pull/2/head
wahyuun 1 year ago
parent
commit
f9cbc4ad8b
  1. 31
      src/views/SimproV2/CreatedProyek/DialogAssignCust.js

31
src/views/SimproV2/CreatedProyek/DialogAssignCust.js

@ -3,7 +3,7 @@ import { Modal, ModalHeader, ModalBody, ModalFooter } from 'reactstrap';
import { Button, Form } from 'reactstrap';
import axios from "../../../const/interceptorApi";
import {
USER_LIST,
USER_SEARCH,
ASSIGN_HR_PROJECT_SEARCH,
ASSIGN_HR_PROJECT_ADD_MULTIPLE
} from '../../../const/ApiConst';
@ -40,8 +40,29 @@ const DialogAssignCust = ({ openDialog, closeDialog, toggleDialog, idTask }) =>
const getDataAssignCustomer = async () => {
const payload = {
"select": [
"id",
"name",
"role_id"
],
"paging": {
"start": 0,
"length": -1
},
"columns": [
{ "name": "role_id", "logic_operator": "=", "value": 44 }
],
"orders": {
"columns": [
"id"
],
"ascending": false
}
}
const URL = USER_SEARCH;
const result = await axios
.get(USER_LIST, HEADER)
.post(URL, payload, HEADER)
.then(res => res)
.catch((error) => error.response);
@ -99,6 +120,12 @@ const DialogAssignCust = ({ openDialog, closeDialog, toggleDialog, idTask }) =>
const getCustProject = async () => {
const payload = {
"select": [
"id",
"user_id",
"proyek_id",
"is_customer"
],
"columns": [
{ "name": "proyek_id", "logic_operator": "=", "value": idTask },
{"name": "is_customer", "logic_operator": "=", "value": "true"}

Loading…
Cancel
Save