Commit d4ff4d90 by Giang Tran

update packet

parent 88248ed1
......@@ -26,6 +26,7 @@ const PacketCQG = (props) => {
const [feeConnect, setFeeConnect] = useState({data: [], title: ''});
const [feeNonPro, setFeeNonPro] = useState({data: [], title: ''});
const [feePro, setFeePro] = useState({data: [], title: ''});
const [feeOperating, setOperrating] = useState({data: [], title: ''});
const [totalMD, setTotalMD] = useState(0);
const [totalTB, setTotalTB] = useState(0);
const [isUpdate, setIsUpdate] = useState(false);
......@@ -133,6 +134,7 @@ const PacketCQG = (props) => {
setFeeConnect(res.data.data.fee_connect);
setFeeNonPro(res.data.data.fee_pro);
setFeePro(res.data.data.fee_non_pro);
setOperrating(res.data.data.fee_operating);
if (res.data.package_register.length > 0) {
setListData(res.data.package_register);
......@@ -161,6 +163,13 @@ const PacketCQG = (props) => {
<WrapNomarl
onRemovePacket={onRemovePacket}
onChoosePacket={onChoosePacket}
data={feeOperating}
listRegister={listRegister}
/>
<WrapNomarl
onRemovePacket={onRemovePacket}
onChoosePacket={onChoosePacket}
data={feeConnect}
listRegister={listRegister}
/>
......
......@@ -21,12 +21,9 @@ const ContainerTop = (props) => {
useEffect(() => {
const newList = data.map((e) => {
console.log(props.listRegister);
if (props.listRegister.includes(e.id)) {
console.log('Chay vao day', e.id);
return {...e, selected: true};
} else {
console.log('Chay xuong duoi', e.id);
return {...e, selected: false};
}
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment