Browse Source

Merge pull request 'upload 23/08/14' (#77) from staging into master

Reviewed-on: ordo/adw-frontend#77
pull/2/head
ibnu 1 year ago
parent
commit
2443131287
  1. 11
      src/views/SimproV2/CreatedProyek/index.js

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

@ -19,7 +19,7 @@ import {
Tooltip, Tooltip,
Popover, Popover,
Skeleton, Skeleton,
Divider, Spin,
} from "antd"; } from "antd";
import { import {
PROJECT_APPROVAL_ADD, PROJECT_APPROVAL_ADD,
@ -134,6 +134,7 @@ const CreatedProyek = ({ params, ...props }) => {
const [dataVersionGantt, setDataVersionGantt] = useState([]); const [dataVersionGantt, setDataVersionGantt] = useState([]);
const [dataHierarchy, setDataHierarchy] = useState([]); const [dataHierarchy, setDataHierarchy] = useState([]);
const [dataDetail, setDataDetail] = useState(null); const [dataDetail, setDataDetail] = useState(null);
const [loading, setLoading] = useState(true);
const pageName = params.name; const pageName = params.name;
@ -244,6 +245,8 @@ const CreatedProyek = ({ params, ...props }) => {
operator: "AND", operator: "AND",
}, },
], ],
select: ["id", "nama", "rencana_biaya",
"currency_symbol", "mulai_proyek", "akhir_proyek"],
joins: [ joins: [
{ {
name: "m_users", name: "m_users",
@ -273,13 +276,14 @@ const CreatedProyek = ({ params, ...props }) => {
.then((res) => res) .then((res) => res)
.catch((error) => error.response); .catch((error) => error.response);
if (result && result.data && result.data.code == 200) { if (result && result.data && result.data.code == 200) {
let dataRes = result.data.data || []; let dataRes = result.data.data || [];
setDatatable(dataRes); setDatatable(dataRes);
setTotalPage(result.data.totalRecord); setTotalPage(result.data.totalRecord);
setLoading(false);
} else { } else {
setLoading(false);
NotificationManager.error("Gagal Mengambil Data!!", "Failed"); NotificationManager.error("Gagal Mengambil Data!!", "Failed");
} }
}; };
@ -1466,7 +1470,10 @@ const CreatedProyek = ({ params, ...props }) => {
</Row> </Row>
</CardHeader> </CardHeader>
<CardBody> <CardBody>
<Spin tip="Loading..." spinning={loading}>
{RenderTable} {RenderTable}
</Spin>
<Pagination <Pagination
style={{ marginTop: "25px" }} style={{ marginTop: "25px" }}
showSizeChanger showSizeChanger

Loading…
Cancel
Save