mirror of
https://github.com/chirpstack/chirpstack.git
synced 2024-12-20 21:53:11 +00:00
ui: Fix setting initial tagsMap in TenantForm.
This commit is contained in:
parent
3f86bf6e71
commit
b6d390b6ad
@ -12,18 +12,18 @@ interface IProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function TenantForm(props: IProps) {
|
function TenantForm(props: IProps) {
|
||||||
const onFinish = (v: Tenant.AsObject) => {
|
const onFinish = (values: Tenant.AsObject) => {
|
||||||
const values = Object.assign(props.initialValues.toObject(), v);
|
const v = Object.assign(props.initialValues.toObject(), values);
|
||||||
|
|
||||||
let tenant = new Tenant();
|
let tenant = new Tenant();
|
||||||
tenant.setId(values.id);
|
tenant.setId(v.id);
|
||||||
tenant.setName(values.name);
|
tenant.setName(v.name);
|
||||||
tenant.setDescription(values.description);
|
tenant.setDescription(v.description);
|
||||||
tenant.setCanHaveGateways(values.canHaveGateways);
|
tenant.setCanHaveGateways(v.canHaveGateways);
|
||||||
tenant.setMaxGatewayCount(values.maxGatewayCount);
|
tenant.setMaxGatewayCount(v.maxGatewayCount);
|
||||||
tenant.setMaxDeviceCount(values.maxDeviceCount);
|
tenant.setMaxDeviceCount(v.maxDeviceCount);
|
||||||
tenant.setPrivateGatewaysUp(values.privateGatewaysUp);
|
tenant.setPrivateGatewaysUp(v.privateGatewaysUp);
|
||||||
tenant.setPrivateGatewaysDown(values.privateGatewaysDown);
|
tenant.setPrivateGatewaysDown(v.privateGatewaysDown);
|
||||||
|
|
||||||
// tags
|
// tags
|
||||||
for (const elm of v.tagsMap) {
|
for (const elm of v.tagsMap) {
|
||||||
|
Loading…
Reference in New Issue
Block a user