Browse Source

set false loading spinner

pull/1/head
wahyun 9 months ago
parent
commit
282a368a02
  1. 10
      src/views/SimproV2/CreatedProyek/ImportActivity/index.js

10
src/views/SimproV2/CreatedProyek/ImportActivity/index.js

@ -93,6 +93,7 @@ const ImportActivity = ({ params }) => {
//
const [isMovePage, setIsMovePage] = useState(false);
const [isPreview, setIsPreview] = useState(false);
const [loading, setLoading] = useState(true);
useEffect(() => {
getDataAssignHr();
@ -130,7 +131,9 @@ const ImportActivity = ({ params }) => {
if (result && result.data && result.data.code == 200) {
let dataRes = result.data.data || []
setdataUserToProject(dataRes);
setLoading(false)
} else {
setLoading(false)
NotificationManager.error('Gagal Mengambil Data!!', 'Failed');
}
}
@ -250,8 +253,11 @@ const ImportActivity = ({ params }) => {
const timestamp = Date.now();
const newTimestamp = timestamp + 60000;
window.location = urlSplitted[0] + '//' + urlSplitted[2] + `/#/projects/` + ganttId + '/' + result.data.projectId + '/' + newTimestamp + '/gantt'
setLoading(false)
}else{
setLoading(false)
}
setLoading(false)
setIsMovePage(true);
setIsPreview(true);
}
@ -369,7 +375,7 @@ const ImportActivity = ({ params }) => {
<h4 className="capitalize">Data Preview</h4>
</CardHeader>
<CardBody>
<Spin tip="Loading...">
<Spin tip="Loading..." spinning={loading}>
<Table
rowClassName={(record, index) => index % 2 == 0 ? 'table-row-light' : 'table-row-dark'}
dataSource={dataTable}

Loading…
Cancel
Save