Browse Source

remove console log

pull/1/head
farhantock 1 year ago
parent
commit
194e53fba6
  1. 15
      src/views/SimproV2/CreatedProyek/DialogGantt.js

15
src/views/SimproV2/CreatedProyek/DialogGantt.js

@ -1,5 +1,5 @@
import React, { useEffect, useState, useMemo } from 'react' import React, { useEffect, useState, useMemo } from 'react'
import { Modal, ModalHeader, ModalBody, ModalFooter, Breadcrumb, BreadcrumbItem} from 'reactstrap'; import { Modal, ModalHeader, ModalBody, ModalFooter, Breadcrumb, BreadcrumbItem } from 'reactstrap';
import { Button } from 'reactstrap'; import { Button } from 'reactstrap';
import { Table, Tooltip, Spin } from 'antd'; import { Table, Tooltip, Spin } from 'antd';
import 'antd/dist/antd.css'; import 'antd/dist/antd.css';
@ -19,13 +19,11 @@ const DialogGantt = ({ openDialog, closeDialog, toggleDialog, idTask, proyekName
user_id = user_id; user_id = user_id;
token = token; token = token;
isLogin = isLogin; isLogin = isLogin;
console.log('props.location.state success');
} else { } else {
role_id = localStorage.getItem("role_id"); role_id = localStorage.getItem("role_id");
user_id = localStorage.getItem("user_id"); user_id = localStorage.getItem("user_id");
token = localStorage.getItem("token"); token = localStorage.getItem("token");
isLogin = localStorage.getItem("isLogin"); isLogin = localStorage.getItem("isLogin");
console.error('Undefined in props.location.state');
} }
const HEADER = { const HEADER = {
headers: { headers: {
@ -171,7 +169,7 @@ const DialogGantt = ({ openDialog, closeDialog, toggleDialog, idTask, proyekName
role_id: role_id, role_id: role_id,
user_id: user_id, user_id: user_id,
} }
}}> }}>
<Tooltip title="Gantt"> <Tooltip title="Gantt">
<Button size={"sm"} color='primary'><i className="fa fa-gears"></i></Button> <Button size={"sm"} color='primary'><i className="fa fa-gears"></i></Button>
</Tooltip></Link>{" "} </Tooltip></Link>{" "}
@ -233,10 +231,10 @@ const DialogGantt = ({ openDialog, closeDialog, toggleDialog, idTask, proyekName
if (status == "Save") { if (status == "Save") {
getdataGantt() getdataGantt()
NotificationManager.success(`Gantt berhasil dibuat!`, 'Success!!'); NotificationManager.success(`Gantt berhasil dibuat!`, 'Success!!');
}else if (status == "Edit") { } else if (status == "Edit") {
getdataGantt() getdataGantt()
NotificationManager.success(`Gantt berhasil dibubah!`, 'Failed!!'); NotificationManager.success(`Gantt berhasil dibubah!`, 'Failed!!');
}else if (status == "failed") { } else if (status == "failed") {
NotificationManager.error(`Gantt gagal dibuat!`, 'Failed!!'); NotificationManager.error(`Gantt gagal dibuat!`, 'Failed!!');
} }
setDataEdit([]) setDataEdit([])
@ -269,10 +267,10 @@ const DialogGantt = ({ openDialog, closeDialog, toggleDialog, idTask, proyekName
<BreadcrumbItem><a href="/projects">Project</a></BreadcrumbItem> <BreadcrumbItem><a href="/projects">Project</a></BreadcrumbItem>
<BreadcrumbItem active>{hierarchyName}</BreadcrumbItem> <BreadcrumbItem active>{hierarchyName}</BreadcrumbItem>
</Breadcrumb> </Breadcrumb>
: :
<div>Gantt Project {proyekName} </div> <div>Gantt Project {proyekName} </div>
} }
{!hierarchyId && (<> <Button onClick={handleOpenDialogForm} size='sm' color="primary"><i className='fa fa-plus'></i></Button> {!hierarchyId && (<> <Button onClick={handleOpenDialogForm} size='sm' color="primary"><i className='fa fa-plus'></i></Button>
</> </>
)} )}
</ModalHeader> </ModalHeader>
@ -308,6 +306,7 @@ const DialogGantt = ({ openDialog, closeDialog, toggleDialog, idTask, proyekName
closeDialog={closeDialogForm} closeDialog={closeDialogForm}
typeDialog={typeDialog} typeDialog={typeDialog}
dataEdit={dataEdit} dataEdit={dataEdit}
user_id={user_id}
/> />
<DialogUserGantt <DialogUserGantt

Loading…
Cancel
Save