Skip to content

Commit

Permalink
When Offline Charging, disable Quota input box
Browse files Browse the repository at this point in the history
  • Loading branch information
brianchennn committed Sep 23, 2023
1 parent 336fee0 commit 4c3bd41
Showing 1 changed file with 21 additions and 22 deletions.
43 changes: 21 additions & 22 deletions frontend/src/pages/SubscriberCreate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ export default function SubscriberCreate() {
{
"snssai": "01010203",
"dnn": "internet",
"qosRef": 1,
"filter": "permit out ip from any to 10.60.0.1",
"chargingMethod": "Offline",
"quota": "0",
Expand All @@ -256,6 +257,7 @@ export default function SubscriberCreate() {
{
"snssai": "01112233",
"dnn": "internet",
"qosRef": 2,
"filter": "permit out ip from any to 10.60.0.2",
"chargingMethod": "Online",
"quota": "2000",
Expand Down Expand Up @@ -1144,30 +1146,27 @@ export default function SubscriberCreate() {
</FormControl>
</TableCell>
</TableBody>
{/*
<TableBody>
<TableCell>
<TextField
label="Filter"
variant="outlined"
required
fullWidth
value={chargingData.filter}
onChange={(ev) => handleChangeChargingFilter(ev, dnn, flowKey, flow.qosRef!)}
/>
</TableCell>
</TableBody>
*/}
<TableBody id={idPrefix + "Quota"}>
<TableCell>
<TextField
label="Quota (monetary)"
variant="outlined"
required
fullWidth
value={chargingData.quota}
onChange={(ev) => handleChangeChargingQuota(ev, dnn, flowKey, flow.qosRef!)}
/>
{data.ChargingDatas![i].chargingMethod === 'Online' ?
<TextField
label="Quota (monetary)"
variant="outlined"
required
fullWidth
value={chargingData.quota}
onChange={(ev) => handleChangeChargingQuota(ev, dnn, flowKey, flow.qosRef!)}
/>
:
<TextField
label="Quota (monetary)"
variant="outlined"
disabled
fullWidth
value={chargingData.quota}
onChange={(ev) => handleChangeChargingQuota(ev, dnn, flowKey, flow.qosRef!)}
/>
}
</TableCell>
</TableBody>
<TableBody id={idPrefix + "UnitCost"}>
Expand Down

0 comments on commit 4c3bd41

Please sign in to comment.