Browse Source

add gantt_id on payload project comments

pull/2/head
ardhi 2 years ago
parent
commit
f8a789a072
  1. 7
      src/views/Dashboard/DashboardCustomer.js
  2. 8
      src/views/Dashboard/DashboardProject.js

7
src/views/Dashboard/DashboardCustomer.js

@ -81,6 +81,12 @@ const DashboardCustomer = () => {
value: PROJECT_ID.toString(),
operator: "AND",
},
{
name: "gantt_id",
logic_operator: "=",
value: GANTT_ID.toString(),
operator: "AND",
}
],
joins: [
{
@ -125,6 +131,7 @@ const DashboardCustomer = () => {
const payload = {
"sender_id": localStorage.getItem('user_id'),
"project_id": PROJECT_ID,
"gantt_id": GANTT_ID,
"comment": comment
}
const result = await axios.post(URL, payload, HEADER).then(res => res).catch(err => err.response)

8
src/views/Dashboard/DashboardProject.js

@ -36,6 +36,7 @@ const DashboardProject = () => {
const { PROJECT_ID, GANTT_ID } = useParams();
// const URL_GANTT = `http://103.73.125.81:8446/index.html?base_url=http://103.73.125.81:8444/api&gantt_id=${GANTT_ID}&proyek_id=${PROJECT_ID}&token=${token}&ro=1`;
const URL_GANTT = `https://adw-gantt.ospro.id/index.html?base_url=${BASE_OSPRO}/api&gantt_id=${GANTT_ID}&proyek_id=${PROJECT_ID}&token=${token}&ro=1`;
// const URL_GANTT = '';
const mapRef = useRef()
const [projectName, setProjectName] = useState("Project Tower ABC");
const [projectManagerName, setProjectManagerName] = useState("John Doe");
@ -92,6 +93,12 @@ const DashboardProject = () => {
value: PROJECT_ID.toString(),
operator: "AND",
},
{
name: "gantt_id",
logic_operator: "=",
value: GANTT_ID.toString(),
operator: "AND",
}
],
joins: [
{
@ -136,6 +143,7 @@ const DashboardProject = () => {
const payload = {
"sender_id": localStorage.getItem('user_id'),
"project_id": PROJECT_ID,
"gantt_id": GANTT_ID,
"comment": comment
}
const result = await axios.post(URL, payload, HEADER).then(res => res).catch(err => err.response)

Loading…
Cancel
Save