Browse Source

fix: delete console.log

pull/1/head
Watiah11 8 months ago
parent
commit
e6383ae087
  1. 53
      src/views/SimproV2/Kanban/DialogFormActivity.js
  2. 7
      src/views/SimproV2/Kanban/DialogFormReport.js
  3. 3
      src/views/SimproV2/ReferralCode/DialogForm.js

53
src/views/SimproV2/Kanban/DialogFormActivity.js

@ -6,7 +6,7 @@ import {
import { DatePicker, Tooltip, Drawer, Divider, Layout, Button, Space, Progress } from 'antd'; import { DatePicker, Tooltip, Drawer, Divider, Layout, Button, Space, Progress } from 'antd';
import { import {
CloseOutlined, CloseOutlined,
MinusOutlined, MinusOutlined,
PlusOutlined PlusOutlined
} from '@ant-design/icons'; } from '@ant-design/icons';
import { formatRupiah, formatNumber } from '../../../const/CustomFunc' import { formatRupiah, formatNumber } from '../../../const/CustomFunc'
@ -20,17 +20,17 @@ import {
import 'antd/dist/antd.css'; import 'antd/dist/antd.css';
// const { Option } = Select // const { Option } = Select
const DialogFormActivity = ({ const DialogFormActivity = ({
activityProject, activityProject,
openDialogActivity, openDialogActivity,
closeDialogActivity, closeDialogActivity,
handleOpenDialogReport, handleOpenDialogReport,
toggleDialogActivity, toggleDialogActivity,
typeDialogActivity, typeDialogActivity,
proyek_id, proyek_id,
version_gantt_id, version_gantt_id,
idBoard, idBoard,
dataHr, dataHr,
dataEditCard, dataEditCard,
userToActivityDelete, userToActivityDelete,
userToActivityAdd userToActivityAdd
@ -63,9 +63,9 @@ const DialogFormActivity = ({
setId(dataEditCard.id) setId(dataEditCard.id)
setText(dataEditCard.activity) setText(dataEditCard.activity)
setProgress(dataEditCard.persentase_progress) setProgress(dataEditCard.persentase_progress)
setStartDate(moment(dataEditCard.start_date)) setStartDate(moment(dataEditCard.start_date))
setEndDate(moment(dataEditCard.end_date)) setEndDate(moment(dataEditCard.end_date))
dataEditCard.assign_hr.map((item) => { dataEditCard.assign_hr.map((item) => {
item.value = item.id_hr item.value = item.id_hr
item.label = item.name item.label = item.name
@ -91,7 +91,7 @@ const DialogFormActivity = ({
closeDialogActivity('cancel', 'none') closeDialogActivity('cancel', 'none')
setVolumePlan(0) setVolumePlan(0)
} }
const handleSave = () => { const handleSave = () => {
let data = ''; let data = '';
@ -112,7 +112,7 @@ const DialogFormActivity = ({
alert("hr cannot be empty!"); alert("hr cannot be empty!");
return false; return false;
} }
if (typeDialogActivity === "Save") { if (typeDialogActivity === "Save") {
data = { data = {
@ -138,7 +138,7 @@ const DialogFormActivity = ({
} }
userToActivityAdd(dataSaveHr) userToActivityAdd(dataSaveHr)
}) })
IdDeleteHrTemporary.map((item)=>{ IdDeleteHrTemporary.map((item)=>{
@ -149,7 +149,7 @@ const DialogFormActivity = ({
setHrTemporaryAdd([]) setHrTemporaryAdd([])
setIdDeleteHrTemporary([]) setIdDeleteHrTemporary([])
setHrTemporary([]) setHrTemporary([])
progress == 100 ? progress == 100 ?
data = { data = {
"text": text, "text": text,
@ -179,11 +179,10 @@ const DialogFormActivity = ({
} }
const onChangeHr = (newValue, actionMeta) => { const onChangeHr = (newValue, actionMeta) => {
if (typeDialogActivity === "Edit") { if (typeDialogActivity === "Edit") {
if (actionMeta.action === 'select-option') { if (actionMeta.action === 'select-option') {
const item = actionMeta.option const item = actionMeta.option
// console.log("actionMeta", item);
// let dataSaveHr = { // let dataSaveHr = {
// "user_id": item.id, // "user_id": item.id,
// "role_proyek_id": item.proyek_role, // "role_proyek_id": item.proyek_role,
@ -196,18 +195,18 @@ const DialogFormActivity = ({
} else if (actionMeta.action === 'remove-value') { } else if (actionMeta.action === 'remove-value') {
const id = actionMeta.removedValue.id const id = actionMeta.removedValue.id
// userToActivityDelete(id) // userToActivityDelete(id)
for (let k in hrTemporary) { for (let k in hrTemporary) {
if (hrTemporary[k].id == id) { if (hrTemporary[k].id == id) {
setIdDeleteHrTemporary([...IdDeleteHrTemporary, id]) setIdDeleteHrTemporary([...IdDeleteHrTemporary, id])
} }
} }
} }
} }
setHr(newValue) setHr(newValue)
}; };
const increase = () => { const increase = () => {
let newPercent = progress + 10; let newPercent = progress + 10;
if (newPercent > 100) { if (newPercent > 100) {
@ -216,7 +215,7 @@ const DialogFormActivity = ({
setProgress(newPercent); setProgress(newPercent);
}; };
const decline = () => { const decline = () => {
let newPercent = progress - 10; let newPercent = progress - 10;
if (newPercent < 0) { if (newPercent < 0) {
@ -240,13 +239,13 @@ const DialogFormActivity = ({
<Label className="capitalize">Start Date</Label> <Label className="capitalize">Start Date</Label>
<DatePicker style={{ width: "100%" }} value={startDate} onChange={(dateItem, dateString) => { <DatePicker style={{ width: "100%" }} value={startDate} onChange={(dateItem, dateString) => {
dateItem.set({hour:0,minute:0,second:0}) dateItem.set({hour:0,minute:0,second:0})
setStartDate(dateItem)}} setStartDate(dateItem)}}
/> />
</FormGroup> </FormGroup>
</Col> </Col>
<Col md={12}> <Col md={12}>
<FormGroup> <FormGroup>
<Label className="capitalize">End date</Label> <Label className="capitalize">End date</Label>
<DatePicker style={{ width: "100%" }} value={endDate} onChange={(dateItem, dateString) => { <DatePicker style={{ width: "100%" }} value={endDate} onChange={(dateItem, dateString) => {
dateItem.set({hour:23,minute:59,second:59}) dateItem.set({hour:23,minute:59,second:59})
setEndDate(dateItem)}} setEndDate(dateItem)}}

7
src/views/SimproV2/Kanban/DialogFormReport.js

@ -110,10 +110,6 @@ const DialogFormReport = ({
closeDialogReport('cancel', 'none') closeDialogReport('cancel', 'none')
} }
const handleReport = () => {
console.log('Button Triggered')
}
const handleGetReportActivity = async (id) => { const handleGetReportActivity = async (id) => {
const payload = { const payload = {
columns: [ columns: [
@ -249,7 +245,6 @@ const DialogFormReport = ({
if (typeDialogReport === "Edit") { if (typeDialogReport === "Edit") {
if (actionMeta.action === 'select-option') { if (actionMeta.action === 'select-option') {
const item = actionMeta.option const item = actionMeta.option
// console.log("actionMeta", item);
// let dataSaveHr = { // let dataSaveHr = {
// "user_id": item.id, // "user_id": item.id,
// "role_proyek_id": item.proyek_role, // "role_proyek_id": item.proyek_role,
@ -378,7 +373,7 @@ const DialogFormReport = ({
onChange={onChangeHr} onChange={onChangeHr}
/> />
</FormGroup> </FormGroup>
</Col> </Col>
<Col md={12}> <Col md={12}>
<FormGroup> <FormGroup>
<Label className="capitalize">Description</Label> <Label className="capitalize">Description</Label>

3
src/views/SimproV2/ReferralCode/DialogForm.js

@ -21,7 +21,6 @@ const DialogForm = ({ openDialog, closeDialog, toggleDialog, typeDialog, dataEdi
const { t } = useTranslation() const { t } = useTranslation()
useEffect(() => { useEffect(() => {
console.log('dataEdit', dataEdit);
if (typeDialog === "Edit") { if (typeDialog === "Edit") {
setId(dataEdit.id) setId(dataEdit.id)
setCode(dataEdit.code) setCode(dataEdit.code)
@ -54,7 +53,6 @@ const DialogForm = ({ openDialog, closeDialog, toggleDialog, typeDialog, dataEdi
type, type,
allocation allocation
} }
console.log('data', data);
closeDialog('save', data); closeDialog('save', data);
} else { } else {
data = { data = {
@ -66,7 +64,6 @@ const DialogForm = ({ openDialog, closeDialog, toggleDialog, typeDialog, dataEdi
type, type,
allocation allocation
} }
console.log('data', data);
closeDialog('edit', data); closeDialog('edit', data);
} }
handleClear() handleClear()

Loading…
Cancel
Save