Browse Source

Merge pull request 'dev-wahyu' (#50) from dev-wahyu into staging

Reviewed-on: ordo/adw-frontend#50
pull/2/head
ibnu 2 years ago
parent
commit
a33823a0ac
  1. 11
      src/views/Dashboard/DashboardProject.js
  2. 36
      src/views/SimproV2/CreatedProyek/ImportActivity/index.js
  3. 12
      src/views/SimproV2/Gantt/index.js

11
src/views/Dashboard/DashboardProject.js

@ -562,17 +562,6 @@ const DashboardProject = () => {
return (
<div style={{ marginLeft: -25, marginRight: -25 }}>
<NotificationContainer />
<Fab
icon={<i className="fa fa-bars" />}
alwaysShowTitle={true}
>
<Action
text="Gantt Chart"
onClick={() => handleRedirect()}
>
<i className="fa fa-gears" />
</Action>
</Fab>
<Row>
<Col span={18}>
<Row>

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

@ -55,10 +55,8 @@ const columnToIndexs = {
no: 2,
name: 3,
weight: 4,
start_date: 5,
end_date: 6,
nik: 7,
duration: 8
nik: 5,
duration: 6
}
const ExcelDateToJSDate = (date) => {
@ -181,19 +179,6 @@ const ImportActivity = ({ params }) => {
columnData = columnData.trim().replace(/&nbsp;/g, '').replace(/<[^\/>][^>]*><\/[^>]+>/g, "")
}
// convert excel's DATEVALUE
if(["start_date"].includes(prop)){
if (columnData) {
columnData = ExcelDateToJSDate(columnData)
}
}
if(["end_date"].includes(prop)){
if (columnData) {
columnData = ExcelDateToJSDateEndDay(columnData)
}
}
if(["nik"].includes(prop)){
if(columnData){
let index = dataUserToProject.findIndex((x) => columnData == x.join_first_ktp_number);
@ -300,23 +285,6 @@ const ImportActivity = ({ params }) => {
width: '10%',
align: 'center',
},
{
title: 'Start Date',
dataIndex: 'start_date',
key: 'start_date',
},
{
title: 'Finish Date',
dataIndex: 'end_date',
key: 'end_date',
render: (text, record) => {
if(text){
return <span>{text.substring(0,8)}</span>
} else {
return <span></span>
}
}
},
{
title: 'Duration',
dataIndex: 'duration',

12
src/views/SimproV2/Gantt/index.js

@ -100,18 +100,6 @@ const Gantt = (props) => {
<div style={{ margin: "-15px", marginBottom: "-30px" }}>
{ready && <RenderGantt />}
</div>
<Fab
icon={<i className="fa fa-bars"/>}
alwaysShowTitle={true}
style={{bottom: 50, right: 24}}
>
<Action
text="Dashboard Project"
onClick={() => handleRedirect()}
>
<i className="fa fa-line-chart" />
</Action>
</Fab>
</>
);
}

Loading…
Cancel
Save