Commit d4ff4d90 by Giang Tran

update packet

parent 88248ed1
...@@ -26,6 +26,7 @@ const PacketCQG = (props) => { ...@@ -26,6 +26,7 @@ const PacketCQG = (props) => {
const [feeConnect, setFeeConnect] = useState({data: [], title: ''}); const [feeConnect, setFeeConnect] = useState({data: [], title: ''});
const [feeNonPro, setFeeNonPro] = useState({data: [], title: ''}); const [feeNonPro, setFeeNonPro] = useState({data: [], title: ''});
const [feePro, setFeePro] = useState({data: [], title: ''}); const [feePro, setFeePro] = useState({data: [], title: ''});
const [feeOperating, setOperrating] = useState({data: [], title: ''});
const [totalMD, setTotalMD] = useState(0); const [totalMD, setTotalMD] = useState(0);
const [totalTB, setTotalTB] = useState(0); const [totalTB, setTotalTB] = useState(0);
const [isUpdate, setIsUpdate] = useState(false); const [isUpdate, setIsUpdate] = useState(false);
...@@ -133,6 +134,7 @@ const PacketCQG = (props) => { ...@@ -133,6 +134,7 @@ const PacketCQG = (props) => {
setFeeConnect(res.data.data.fee_connect); setFeeConnect(res.data.data.fee_connect);
setFeeNonPro(res.data.data.fee_pro); setFeeNonPro(res.data.data.fee_pro);
setFeePro(res.data.data.fee_non_pro); setFeePro(res.data.data.fee_non_pro);
setOperrating(res.data.data.fee_operating);
if (res.data.package_register.length > 0) { if (res.data.package_register.length > 0) {
setListData(res.data.package_register); setListData(res.data.package_register);
...@@ -161,6 +163,13 @@ const PacketCQG = (props) => { ...@@ -161,6 +163,13 @@ const PacketCQG = (props) => {
<WrapNomarl <WrapNomarl
onRemovePacket={onRemovePacket} onRemovePacket={onRemovePacket}
onChoosePacket={onChoosePacket} onChoosePacket={onChoosePacket}
data={feeOperating}
listRegister={listRegister}
/>
<WrapNomarl
onRemovePacket={onRemovePacket}
onChoosePacket={onChoosePacket}
data={feeConnect} data={feeConnect}
listRegister={listRegister} listRegister={listRegister}
/> />
......
...@@ -21,12 +21,9 @@ const ContainerTop = (props) => { ...@@ -21,12 +21,9 @@ const ContainerTop = (props) => {
useEffect(() => { useEffect(() => {
const newList = data.map((e) => { const newList = data.map((e) => {
console.log(props.listRegister);
if (props.listRegister.includes(e.id)) { if (props.listRegister.includes(e.id)) {
console.log('Chay vao day', e.id);
return {...e, selected: true}; return {...e, selected: true};
} else { } else {
console.log('Chay xuong duoi', e.id);
return {...e, selected: false}; 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