Browse Source

Merge branch 'master' of https://git.oslog.id/ordo/adw-frontend into dev-wahyu

pull/2/head
Wahyu Ramadhan 1 year ago
parent
commit
70fafe07ed
  1. 13
      src/views/SimproV2/CreatedProyek/index.js

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

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

Loading…
Cancel
Save