Browse Source

document delete

pull/1/head
AiraBilqis 9 months ago
parent
commit
3c8a0f1b0c
  1. 9
      src/views/SimproV2/CreatedProyek/DialogDocument.js

9
src/views/SimproV2/CreatedProyek/DialogDocument.js

@ -5,7 +5,7 @@ import { Table, Tooltip, Popover, Spin } from 'antd';
import 'antd/dist/antd.css'; import 'antd/dist/antd.css';
import moment from 'moment'; import moment from 'moment';
import SweetAlert from 'react-bootstrap-sweetalert'; import SweetAlert from 'react-bootstrap-sweetalert';
import { DOCUMENT_DOWNLOAD, DOCUMENT_GET, BASE_SIMPRO_LUMEN_FILE_COMPANY, REQUEST_MATERIAL_EDIT, DOCUMENT_DELETE, DOCUMENT_SEARCH, FOLDER_DOCUMENT_PROYEK_GET_TREE, FOLDER_DOCUMENT_PROYEK_DELETE } from '../../../const/ApiConst'; import { DOCUMENT_DOWNLOAD, BASE_SIMPRO_LUMEN_FILE_COMPANY, DOCUMENT_DELETE, FOLDER_DOCUMENT_PROYEK_GET_TREE, FOLDER_DOCUMENT_PROYEK_DELETE } from '../../../const/ApiConst';
import axios from "../../../const/interceptorApi" import axios from "../../../const/interceptorApi"
import { NotificationContainer, NotificationManager } from 'react-notifications'; import { NotificationContainer, NotificationManager } from 'react-notifications';
import DialogRequest from './FormDocument'; import DialogRequest from './FormDocument';
@ -45,11 +45,6 @@ const DialogDocument = ({ openDialog, closeDialog, toggleDialog, idTask, proyekN
} }
}, [openDialog]) }, [openDialog])
const getDataDocument = async () => { const getDataDocument = async () => {
const url = FOLDER_DOCUMENT_PROYEK_GET_TREE(idTask) const url = FOLDER_DOCUMENT_PROYEK_GET_TREE(idTask)
const result = await axios const result = await axios
@ -211,7 +206,7 @@ const DialogDocument = ({ openDialog, closeDialog, toggleDialog, idTask, proyekN
} }
const onConfirmDelete = async () => { const onConfirmDelete = async () => {
let urlDel = DOCUMENT_DELETE(idDelete, company_id) let urlDel = DOCUMENT_DELETE(idDelete, idTask)
const result = await axios.delete(urlDel, HEADER) const result = await axios.delete(urlDel, HEADER)
.then(res => res) .then(res => res)
.catch((error) => error.response); .catch((error) => error.response);

Loading…
Cancel
Save