|
|
@ -22,6 +22,7 @@ const FormAsignHr = ({ openDialog, closeDialog, toggleDialog, idTask, dataEdit, |
|
|
|
const [accrue, setAccrue] = useState("") |
|
|
|
const [accrue, setAccrue] = useState("") |
|
|
|
const [baseCalender, setBaseCalender] = useState("") |
|
|
|
const [baseCalender, setBaseCalender] = useState("") |
|
|
|
const [listHr, setListHr] = useState([]) |
|
|
|
const [listHr, setListHr] = useState([]) |
|
|
|
|
|
|
|
const [isCustomer, setIsCustomer] = useState(false) |
|
|
|
|
|
|
|
|
|
|
|
const handleClearData = () => { |
|
|
|
const handleClearData = () => { |
|
|
|
setUser(null) |
|
|
|
setUser(null) |
|
|
@ -29,6 +30,7 @@ const FormAsignHr = ({ openDialog, closeDialog, toggleDialog, idTask, dataEdit, |
|
|
|
setProjectRole(null) |
|
|
|
setProjectRole(null) |
|
|
|
setGroupR("") |
|
|
|
setGroupR("") |
|
|
|
setMaxUsed("") |
|
|
|
setMaxUsed("") |
|
|
|
|
|
|
|
setIsCustomer(false) |
|
|
|
setStandartRate("") |
|
|
|
setStandartRate("") |
|
|
|
setUomStandartRate(null) |
|
|
|
setUomStandartRate(null) |
|
|
|
setOverTimeRate("") |
|
|
|
setOverTimeRate("") |
|
|
@ -67,6 +69,7 @@ const FormAsignHr = ({ openDialog, closeDialog, toggleDialog, idTask, dataEdit, |
|
|
|
setProjectRole(dataEdit.project_role) |
|
|
|
setProjectRole(dataEdit.project_role) |
|
|
|
setGroupR(dataEdit.group_r) |
|
|
|
setGroupR(dataEdit.group_r) |
|
|
|
setMaxUsed(dataEdit.max_used ? formatNumber(dataEdit.max_used.toString()) : '') |
|
|
|
setMaxUsed(dataEdit.max_used ? formatNumber(dataEdit.max_used.toString()) : '') |
|
|
|
|
|
|
|
setIsCustomer(dataEdit.is_customer) |
|
|
|
setStandartRate(dataEdit.standart_rate ? formatNumber(dataEdit.standart_rate.toString()) : '') |
|
|
|
setStandartRate(dataEdit.standart_rate ? formatNumber(dataEdit.standart_rate.toString()) : '') |
|
|
|
setUomStandartRate(dataEdit.uom_standart_rate) |
|
|
|
setUomStandartRate(dataEdit.uom_standart_rate) |
|
|
|
setOverTimeRate(dataEdit.overtime_rate ? formatNumber(dataEdit.overtime_rate.toString()) : '') |
|
|
|
setOverTimeRate(dataEdit.overtime_rate ? formatNumber(dataEdit.overtime_rate.toString()) : '') |
|
|
@ -91,6 +94,7 @@ const FormAsignHr = ({ openDialog, closeDialog, toggleDialog, idTask, dataEdit, |
|
|
|
proyek_id: idTask, |
|
|
|
proyek_id: idTask, |
|
|
|
user_id:user, |
|
|
|
user_id:user, |
|
|
|
project_role:projectRole, |
|
|
|
project_role:projectRole, |
|
|
|
|
|
|
|
is_customer: isCustomer, |
|
|
|
max_used:maxUsed.replaceAll(".", ""), |
|
|
|
max_used:maxUsed.replaceAll(".", ""), |
|
|
|
standart_rate:standartRate.replaceAll(".", ""), |
|
|
|
standart_rate:standartRate.replaceAll(".", ""), |
|
|
|
uom_standart_rate:uomStandartRate, |
|
|
|
uom_standart_rate:uomStandartRate, |
|
|
@ -104,6 +108,7 @@ const FormAsignHr = ({ openDialog, closeDialog, toggleDialog, idTask, dataEdit, |
|
|
|
proyek_id: idTask, |
|
|
|
proyek_id: idTask, |
|
|
|
user_id:user, |
|
|
|
user_id:user, |
|
|
|
project_role:projectRole, |
|
|
|
project_role:projectRole, |
|
|
|
|
|
|
|
is_customer: isCustomer, |
|
|
|
max_used:maxUsed.replaceAll(".", ""), |
|
|
|
max_used:maxUsed.replaceAll(".", ""), |
|
|
|
standart_rate:standartRate.replaceAll(".", ""), |
|
|
|
standart_rate:standartRate.replaceAll(".", ""), |
|
|
|
uom_standart_rate:uomStandartRate, |
|
|
|
uom_standart_rate:uomStandartRate, |
|
|
@ -157,6 +162,33 @@ const FormAsignHr = ({ openDialog, closeDialog, toggleDialog, idTask, dataEdit, |
|
|
|
</FormGroup> |
|
|
|
</FormGroup> |
|
|
|
</Col> |
|
|
|
</Col> |
|
|
|
</Row> |
|
|
|
</Row> |
|
|
|
|
|
|
|
<Row> |
|
|
|
|
|
|
|
<Col> |
|
|
|
|
|
|
|
<FormGroup> |
|
|
|
|
|
|
|
<Label>Customer</Label> |
|
|
|
|
|
|
|
<div> |
|
|
|
|
|
|
|
<Select |
|
|
|
|
|
|
|
value={isCustomer} |
|
|
|
|
|
|
|
defaultValue={false} |
|
|
|
|
|
|
|
style={{ |
|
|
|
|
|
|
|
width: 235, |
|
|
|
|
|
|
|
}} |
|
|
|
|
|
|
|
onChange={(val) => setIsCustomer(val)} |
|
|
|
|
|
|
|
options={[ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
value: true, |
|
|
|
|
|
|
|
label: 'Yes', |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
value: false, |
|
|
|
|
|
|
|
label: 'No', |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
]} |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</FormGroup> |
|
|
|
|
|
|
|
</Col> |
|
|
|
|
|
|
|
</Row> |
|
|
|
<div style={{widht:"100%",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"}}> |
|
|
|
<div style={{widht:"100%",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"}}> |
|
|
|
<FormGroup style={{flexBasis:"49%"}}> |
|
|
|
<FormGroup style={{flexBasis:"49%"}}> |
|
|
|
<Label>Standart Rate</Label> |
|
|
|
<Label>Standart Rate</Label> |
|
|
|