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

UITEN-299 Rewrite class components to functional ones (ui-tenant-settings module) #416

Merged
merged 8 commits into from
Aug 7, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
update Locale time
vashjs committed Aug 6, 2024
commit 77a7683d906ab345e235b975e6f5669e02446208
2 changes: 1 addition & 1 deletion src/settings/Locale.js
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@ const Locale = ({ label, ...rest }) => {
if (locale) stripes.setLocale(locale);
if (timezone) stripes.setTimezone(timezone);
if (currency) stripes.setCurrency(currency);
}, 500);
}, 2000);
};

return (

Unchanged files with check annotations Beta

setIsReadOnly(true);
checkLocationHasHoldingsOrItems(locationId).then(setIsReadOnly);
},
[locationId, noInterfaces]

Check warning on line 39 in src/settings/LocationLocations/LocationForm/RemoteStorageField.js

GitHub Actions / github-actions-ci

React Hook useEffect has a missing dependency: 'checkLocationHasHoldingsOrItems'. Either include it or remove the dependency array. If 'checkLocationHasHoldingsOrItems' changes too often, find the parent component that defines it and wrap that definition in useCallback

Check warning on line 39 in src/settings/LocationLocations/LocationForm/RemoteStorageField.js

GitHub Actions / github-actions-ci

React Hook useEffect has a missing dependency: 'checkLocationHasHoldingsOrItems'. Either include it or remove the dependency array. If 'checkLocationHasHoldingsOrItems' changes too often, find the parent component that defines it and wrap that definition in useCallback
);
if (noInterfaces) return null;
const [isConfirmPickupLocationChangeModal, setIsConfirmPickupLocationChangeModal] = useState(false);
const stripes = useStripes();
const intl = useIntl();
const CViewMetaData = useMemo(() => stripes.connect(ViewMetaData), []);

Check warning on line 79 in src/settings/ServicePoints/ServicePointForm.js

GitHub Actions / github-actions-ci

React Hook useMemo has a missing dependency: 'stripes'. Either include it or remove the dependency array

Check warning on line 79 in src/settings/ServicePoints/ServicePointForm.js

GitHub Actions / github-actions-ci

React Hook useMemo has a missing dependency: 'stripes'. Either include it or remove the dependency array
const servicePoint = initialValues || {};
const locations = servicePoint.id
useEffect(() => {
setInitialValues(getServicePoint());
}, [servicePoint.id, parentResources.staffSlips.hasLoaded]);

Check warning on line 39 in src/settings/ServicePoints/ServicePointFormContainer.js

GitHub Actions / github-actions-ci

React Hook useEffect has a missing dependency: 'getServicePoint'. Either include it or remove the dependency array

Check warning on line 39 in src/settings/ServicePoints/ServicePointFormContainer.js

GitHub Actions / github-actions-ci

React Hook useEffect has a missing dependency: 'getServicePoint'. Either include it or remove the dependency array
const transformStaffSlipsData = useCallback((staffSlips) => {
const currentSlips = parentResources?.staffSlips?.records || [];
},
// eslint-disable-next-line react/prop-types
Pluggable: props => <><button onClick={props.entityTypeDataSource}>Get query</button>

Check failure on line 95 in test/jest/__mocks__/stripesCore.mock.js

GitHub Actions / github-actions-ci

Missing an explicit type attribute for button

Check failure on line 95 in test/jest/__mocks__/stripesCore.mock.js

GitHub Actions / github-actions-ci

Missing an explicit type attribute for button
<button onClick={props.cancelQueryDataSource}>Cancel query</button>

Check failure on line 96 in test/jest/__mocks__/stripesCore.mock.js

GitHub Actions / github-actions-ci

Missing an explicit type attribute for button

Check failure on line 96 in test/jest/__mocks__/stripesCore.mock.js

GitHub Actions / github-actions-ci

Missing an explicit type attribute for button
</>,

Check failure on line 97 in test/jest/__mocks__/stripesCore.mock.js

GitHub Actions / github-actions-ci

Expected closing tag to match indentation of opening

Check failure on line 97 in test/jest/__mocks__/stripesCore.mock.js

GitHub Actions / github-actions-ci

Expected closing tag to match indentation of opening
// eslint-disable-next-line react/prop-types
IfPermission: jest.fn(props => <>{props.children}</>),