Update
This commit is contained in:
parent
caf3a5a696
commit
788f108b6a
|
|
@ -214,6 +214,30 @@ const StationSetting = ({
|
|||
|
||||
const handleSave = async () => {
|
||||
try {
|
||||
if (!form.values.name) {
|
||||
notifications.show({
|
||||
title: "Error",
|
||||
message: "Name is required",
|
||||
color: "red",
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (!form.values.ip) {
|
||||
notifications.show({
|
||||
title: "Error",
|
||||
message: "Ip is required",
|
||||
color: "red",
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (!form.values.port) {
|
||||
notifications.show({
|
||||
title: "Error",
|
||||
message: "Port is required",
|
||||
color: "red",
|
||||
});
|
||||
return;
|
||||
}
|
||||
const payload = {
|
||||
...form.values,
|
||||
lines: lines.filter((el) => el.lineNumber && el.port),
|
||||
|
|
|
|||
Loading…
Reference in New Issue