|
|
@ -11,6 +11,8 @@ import { NotificationContainer, NotificationManager } from 'react-notifications' |
|
|
|
import { PROJECT_TYPE_ADD, PROJECT_TYPE_EDIT, PROJECT_TYPE_DELETE, PROJECT_TYPE_SEARCH, COMPANY_MANAGEMENT_LIST } from '../../../const/ApiConst'; |
|
|
|
import { PROJECT_TYPE_ADD, PROJECT_TYPE_EDIT, PROJECT_TYPE_DELETE, PROJECT_TYPE_SEARCH, COMPANY_MANAGEMENT_LIST } from '../../../const/ApiConst'; |
|
|
|
import { Pagination, Button, Tooltip, Table } from 'antd'; |
|
|
|
import { Pagination, Button, Tooltip, Table } from 'antd'; |
|
|
|
import { useTranslation } from 'react-i18next'; |
|
|
|
import { useTranslation } from 'react-i18next'; |
|
|
|
|
|
|
|
import { checkActMenup } from '../../../const/CustomFunc.js'; |
|
|
|
|
|
|
|
import { useLocation } from "react-router-dom"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const ProjectType = ({ params, ...props }) => { |
|
|
|
const ProjectType = ({ params, ...props }) => { |
|
|
@ -27,6 +29,7 @@ const ProjectType = ({ params, ...props }) => { |
|
|
|
hierarchy = props.hierarchy; |
|
|
|
hierarchy = props.hierarchy; |
|
|
|
user_name = props.user_name; |
|
|
|
user_name = props.user_name; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const location = useLocation() |
|
|
|
const HEADER = { |
|
|
|
const HEADER = { |
|
|
|
headers: { |
|
|
|
headers: { |
|
|
|
"Content-Type": "application/json", |
|
|
|
"Content-Type": "application/json", |
|
|
@ -353,10 +356,20 @@ const ProjectType = ({ params, ...props }) => { |
|
|
|
className: 'nowrap', |
|
|
|
className: 'nowrap', |
|
|
|
render: (text, record) => <> |
|
|
|
render: (text, record) => <> |
|
|
|
<Tooltip title={t('delete')}> |
|
|
|
<Tooltip title={t('delete')}> |
|
|
|
<i className="fa fa-trash" style={{ color: 'red', marginRight: '10px', cursor: "pointer" }} onClick={() => handleDelete(text.id)}></i> |
|
|
|
{ |
|
|
|
|
|
|
|
checkActMenup(location.pathname, 'delete') ? |
|
|
|
|
|
|
|
<i id="TooltipDelete" className="fa fa-trash" style={{ color: 'red', marginRight: '10px', cursor: "pointer" }} onClick={() => handleDelete(text.id)}></i> |
|
|
|
|
|
|
|
: |
|
|
|
|
|
|
|
null |
|
|
|
|
|
|
|
} |
|
|
|
</Tooltip> |
|
|
|
</Tooltip> |
|
|
|
<Tooltip title={t('edit')}> |
|
|
|
<Tooltip title={t('edit')}> |
|
|
|
<i className="fa fa-edit" style={{ color: 'green', cursor: "pointer" }} onClick={() => handleEdit(text)}></i> |
|
|
|
{ |
|
|
|
|
|
|
|
checkActMenup(location.pathname, 'update') ? |
|
|
|
|
|
|
|
<i id="TooltipEdit" className="fa fa-edit" style={{ color: 'green', cursor: "pointer" }} onClick={() => handleEdit(text)}></i> |
|
|
|
|
|
|
|
: |
|
|
|
|
|
|
|
null |
|
|
|
|
|
|
|
} |
|
|
|
</Tooltip>{" "} |
|
|
|
</Tooltip>{" "} |
|
|
|
<Tooltip title="Template Gantt"> |
|
|
|
<Tooltip title="Template Gantt"> |
|
|
|
<i className="fa fa-gears" style={{ color: 'blue', cursor: "pointer" }} onClick={() => handleDialogIg(text.id)}></i> |
|
|
|
<i className="fa fa-gears" style={{ color: 'blue', cursor: "pointer" }} onClick={() => handleDialogIg(text.id)}></i> |
|
|
@ -430,7 +443,12 @@ const ProjectType = ({ params, ...props }) => { |
|
|
|
</Col> |
|
|
|
</Col> |
|
|
|
<Col> |
|
|
|
<Col> |
|
|
|
<Tooltip title={t('projectType')}> |
|
|
|
<Tooltip title={t('projectType')}> |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
checkActMenup(location.pathname, 'create') ? |
|
|
|
<Button style={{ background: "#4caf50", color: "#fff" }} onClick={() => handleOpenDialog('Save')}><i className="fa fa-plus"></i></Button> |
|
|
|
<Button style={{ background: "#4caf50", color: "#fff" }} onClick={() => handleOpenDialog('Save')}><i className="fa fa-plus"></i></Button> |
|
|
|
|
|
|
|
: |
|
|
|
|
|
|
|
null |
|
|
|
|
|
|
|
} |
|
|
|
</Tooltip> |
|
|
|
</Tooltip> |
|
|
|
<Tooltip title={t('exportExcel')}> |
|
|
|
<Tooltip title={t('exportExcel')}> |
|
|
|
<Button style={{ marginLeft: "5px" }} onClick={() => handleExportExcel()}><i className="fa fa-print"></i></Button> |
|
|
|
<Button style={{ marginLeft: "5px" }} onClick={() => handleExportExcel()}><i className="fa fa-print"></i></Button> |
|
|
|