Browse Source

project information

pull/1/head
khaidralirahman 10 months ago
parent
commit
9120cc187b
  1. 41
      src/views/SimproV2/CreatedProyek/index.js

41
src/views/SimproV2/CreatedProyek/index.js

@ -61,9 +61,6 @@ import {
IMAGE_GET_BY_ID, IMAGE_GET_BY_ID,
IMAGE_DELETE, IMAGE_DELETE,
} from "../../../const/ApiConst"; } from "../../../const/ApiConst";
import {
formatThousand
} from "../../../const/CustomFunc";
import moment from "moment"; import moment from "moment";
// import DialogFormResource from './DialogFormResource'; // import DialogFormResource from './DialogFormResource';
import DialogFormMaterial from "./DataRequestMaterial"; import DialogFormMaterial from "./DataRequestMaterial";
@ -72,6 +69,13 @@ import DialogDocument from "./DialogDocument";
import DialogInitDocument from "./DialogInitDocument"; import DialogInitDocument from "./DialogInitDocument";
import DialogGantt from "./DialogGantt"; import DialogGantt from "./DialogGantt";
import DialogHierarchy from "./DialogHierarchy"; import DialogHierarchy from "./DialogHierarchy";
import {
formatNumber,
formatRupiah,
formatThousand,
renderFormatRupiah,
checkActMenup,
} from "../../../const/CustomFunc";
// import DialogAsignHr from './AsignHrProject'; // import DialogAsignHr from './AsignHrProject';
import AssignHrProject from "./AsignHrProject"; import AssignHrProject from "./AsignHrProject";
import AssignCustProject from "./AsignCustProject"; import AssignCustProject from "./AsignCustProject";
@ -80,7 +84,7 @@ import ViewProject from "./ViewProject";
import ReportAnalysis from "./ReportAnalysis"; import ReportAnalysis from "./ReportAnalysis";
import { Icon } from "@iconify/react"; import { Icon } from "@iconify/react";
// import SubProyekComp from './SubProyekComp'; // import SubProyekComp from './SubProyekComp';
import { Link, useHistory, withRouter } from "react-router-dom"; import { Link, useHistory, withRouter, useLocation } from "react-router-dom";
import { t } from "i18next"; import { t } from "i18next";
const url = ""; const url = "";
@ -100,6 +104,7 @@ const CreatedProyek = ({ params, ...props }) => {
hierarchy = props.hierarchy; hierarchy = props.hierarchy;
user_name = props.user_name; user_name = props.user_name;
} }
const location = useLocation();
const history = useHistory(); const history = useHistory();
const HEADER = { const HEADER = {
headers: { headers: {
@ -1727,10 +1732,17 @@ const CreatedProyek = ({ params, ...props }) => {
content={popupMenu(text, record)} content={popupMenu(text, record)}
trigger="click" trigger="click"
> >
{
checkActMenup(location.pathname, 'read') ?
<Button size="small" type="link" style={{ color: "green" }}> <Button size="small" type="link" style={{ color: "green" }}>
<i className="fa fa-ellipsis-v"></i> <i className="fa fa-ellipsis-v"></i>
</Button> </Button>
:
null
}
</Popover> </Popover>
{
checkActMenup(location.pathname, 'update') ?
<Popover <Popover
placement="rightTop" placement="rightTop"
title={text.nama} title={text.nama}
@ -1752,6 +1764,9 @@ const CreatedProyek = ({ params, ...props }) => {
</Button> </Button>
)} )}
</Popover> </Popover>
:
null
}
</> </>
), ),
}, },
@ -2106,12 +2121,18 @@ const CreatedProyek = ({ params, ...props }) => {
<Col> <Col>
{parseInt(role_id) == 44 ? null : ( // role kustomer {parseInt(role_id) == 44 ? null : ( // role kustomer
<Tooltip title="Add Project"> <Tooltip title="Add Project">
<Button {
style={{ background: "#4caf50", color: "#fff" }} checkActMenup(location.pathname, 'create') ?
onClick={() => handleOpenDialogProyek(0)} <Button
> style={{ background: "#4caf50", color: "#fff" }}
<i className="fa fa-plus"></i> onClick={() => handleOpenDialogProyek(0)}
</Button> >
<i className="fa fa-plus"></i>
</Button>
:
null
}
</Tooltip> </Tooltip>
)} )}
<Tooltip title="Export"> <Tooltip title="Export">

Loading…
Cancel
Save