Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 1634 & 1640 A few bug fixes #1673

Merged
merged 12 commits into from
Nov 18, 2024
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -208,4 +208,6 @@ sync/data/
schemaspy/output

# local testing
*.bat
*.bat

mgaseta marked this conversation as resolved.
Show resolved Hide resolved
oracle-api/config/*
18 changes: 12 additions & 6 deletions frontend/src/components/ClientAndCodeInput/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,16 @@
const clientInputRef = useRef<HTMLInputElement>(null);
const locCodeInputRef = useRef<HTMLInputElement>(null);
const [isDefault, setIsDefault] = useState<boolean>(
() => getIsDefaultVal()
!shouldSelectDefaultValue ? false : () => getIsDefaultVal()
);

const [isChecked, setIsChecked] = useState<boolean>(() => {
if (!shouldSelectDefaultValue) {
return false;
}
return checkBoxInput ? checkBoxInput.value : isDefault;
});

const [showClientValidationStatus, setShowClientValidationStatus] = useState<boolean>(true);

const [showLocCodeValidationStatus, setShowLocCodeValidationStatus] = useState<boolean>(false);
Expand All @@ -60,7 +67,9 @@
useEffect(() => {
const areValsDefault = getIsDefaultVal();

setIsDefault(areValsDefault);
if (shouldSelectDefaultValue) {
setIsDefault(areValsDefault);
}

// Do not show validation status if isDefault is true
if (areValsDefault) {
Expand Down Expand Up @@ -226,6 +235,7 @@

if (!checkBoxInput) {
setIsDefault(checked);
setIsChecked(checked);
}
};

Expand Down Expand Up @@ -331,11 +341,7 @@
}
};

let isChecked = checkBoxInput ? checkBoxInput.value : isDefault;
if (!shouldSelectDefaultValue) {
isChecked = false;
}

Check failure on line 344 in frontend/src/components/ClientAndCodeInput/index.tsx

View workflow job for this annotation

GitHub Actions / Typescript lint

More than 1 blank line not allowed
mgaseta marked this conversation as resolved.
Show resolved Hide resolved
return (
<FlexGrid className="agency-information-section">
{
Expand Down
Loading