Skip to content

Commit

Permalink
Merge pull request #1164 from mozzy11/develop
Browse files Browse the repository at this point in the history
cleanup code
  • Loading branch information
mozzy11 authored Jul 5, 2024
2 parents 75611b0 + 17e43b1 commit 0a7c868
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -703,49 +703,6 @@ function OrganizationAddModify() {
</TableContainer>
)}
</DataTable>
{/* <Pagination
onChange={handlePageChange}
page={page}
pageSize={pageSize}
pageSizes={[5, 10, 20]}
totalItems={typeOfActivityShow.length}
forwardText={intl.formatMessage({
id: "pagination.forward",
})}
backwardText={intl.formatMessage({
id: "pagination.backward",
})}
itemRangeText={(min, max, total) =>
intl.formatMessage(
{ id: "pagination.item-range" },
{ min: min, max: max, total: total },
)
}
itemsPerPageText={intl.formatMessage({
id: "pagination.items-per-page",
})}
itemText={(min, max) =>
intl.formatMessage(
{ id: "pagination.item" },
{ min: min, max: max },
)
}
pageNumberText={intl.formatMessage({
id: "pagination.page-number",
})}
pageRangeText={(_current, total) =>
intl.formatMessage(
{ id: "pagination.page-range" },
{ total: total },
)
}
pageText={(page, pagesUnknown) =>
intl.formatMessage(
{ id: "pagination.page" },
{ page: pagesUnknown ? "" : page },
)
}
/> */}
<br />
</Column>
</Grid>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ function OrganizationManagement() {
});
setTimeout(() => {
window.location.reload();
}, 2000);
}, 200);
};

const handlePageChange = ({ page, pageSize }) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function UserAddModify() {
const [selectedTestSectionLabUnits, setSelectedTestSectionLabUnits] =
useState({});

// this keeps the order of the test section lab roles
// this keeps the order of the test section lab roles
const [selectedTestSectionList, setSelectedTestSectionList] = useState([]);

const ID = (() => {
Expand Down
10 changes: 4 additions & 6 deletions frontend/src/components/admin/userManagement/UserManagement.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ function UserManagement() {
});
setTimeout(() => {
window.location.reload();
}, 2000);
}, 200);
} else {
addNotification({
kind: NotificationKinds.error,
Expand All @@ -151,7 +151,7 @@ function UserManagement() {
setNotificationVisible(true);
setTimeout(() => {
window.location.reload();
}, 2000);
}, 200);
}
}

Expand Down Expand Up @@ -429,15 +429,15 @@ function UserManagement() {
<Column lg={6} md={6} sm={3}>
<Select
id="filters"
noLabel={true}
labelText={<FormattedMessage id="menu.label.filter.role" />}
defaultValue={
testSectionsShow && testSectionsShow.length > 0
? testSectionsShow[0].id
: ""
}
onChange={handleTestSectionsSelectChange}
>
<SelectItem key="" value="" text="Not Selected" />
<SelectItem key="" value="" text="" />
{testSectionsShow && testSectionsShow.length > 0 ? (
testSectionsShow.map((section) => (
<SelectItem
Expand All @@ -454,8 +454,6 @@ function UserManagement() {
/>
)}
</Select>
<br />
<FormattedMessage id="menu.label.filter.role" />
</Column>
<Column lg={8} md={8} sm={4}>
<CustomCheckBox
Expand Down

0 comments on commit 0a7c868

Please sign in to comment.