- minor big fixes
- default settings toggled -update camera zoom need to test
This commit is contained in:
@@ -58,9 +58,7 @@ const ChannelFields = ({ touched, isSubmitting, format }: ChannelFieldsProps) =>
|
||||
type="text"
|
||||
id="backoffice"
|
||||
placeholder="https://www.backoffice.com"
|
||||
className={`p-1.5 border ${
|
||||
errors.backOfficeURL && touched.backOfficeURL ? "border-red-500" : "border-gray-400 "
|
||||
} rounded-lg w-full md:w-60`}
|
||||
className={`p-1.5 border border-gray-400 rounded-lg w-full md:w-60`}
|
||||
/>
|
||||
</FormGroup>
|
||||
<FormGroup>
|
||||
@@ -70,9 +68,7 @@ const ChannelFields = ({ touched, isSubmitting, format }: ChannelFieldsProps) =>
|
||||
type="text"
|
||||
id="username"
|
||||
placeholder="Back office username"
|
||||
className={`p-1.5 border ${
|
||||
errors.username && touched.username ? "border-red-500" : "border-gray-400 "
|
||||
} rounded-lg w-full md:w-60`}
|
||||
className={`p-1.5 border border-gray-400 rounded-lg w-full md:w-60`}
|
||||
/>
|
||||
</FormGroup>
|
||||
<FormGroup>
|
||||
@@ -159,7 +155,6 @@ const ChannelFields = ({ touched, isSubmitting, format }: ChannelFieldsProps) =>
|
||||
id="timestampSource"
|
||||
className="p-2 border border-gray-400 rounded-lg text-white bg-[#253445] w-full md:w-60"
|
||||
>
|
||||
<option value="">-- Select format --</option>
|
||||
<option value={"UTC"}>UTC</option>
|
||||
<option value={"local"}>Local</option>
|
||||
</Field>
|
||||
@@ -172,9 +167,8 @@ const ChannelFields = ({ touched, isSubmitting, format }: ChannelFieldsProps) =>
|
||||
id="GPSFormat"
|
||||
className="p-2 border border-gray-400 rounded-lg text-white bg-[#253445] w-full md:w-60"
|
||||
>
|
||||
<option value="">-- Select format --</option>
|
||||
<option value={"Decimal Degrees"}>Decimal degrees</option>
|
||||
<option value={"Minutes"}>Minutes</option>
|
||||
<option value={"Decimal Degrees"}>Decimal degrees</option>
|
||||
</Field>
|
||||
</FormGroup>
|
||||
</>
|
||||
|
||||
@@ -46,16 +46,6 @@ const SettingForms = () => {
|
||||
const validateValues = (values: InitialValuesForm): InitialValuesFormErrors => {
|
||||
const errors: InitialValuesFormErrors = {};
|
||||
|
||||
const url = values.backOfficeURL?.trim();
|
||||
const username = values.username?.trim();
|
||||
const password = values.password?.trim();
|
||||
if (!url) {
|
||||
errors.backOfficeURL = "Required";
|
||||
}
|
||||
|
||||
if (!username) errors.username = "Required";
|
||||
if (!password) errors.password = "Required";
|
||||
|
||||
const read = Number(values.readTimeoutSeconds);
|
||||
if (!Number.isFinite(read)) {
|
||||
errors.readTimeoutSeconds = "Must be a number";
|
||||
|
||||
Reference in New Issue
Block a user