Skip to content

Commit

Permalink
UI Tweaks on stock operations and user role scope (openmrs#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
makombe authored Dec 5, 2023
1 parent 7c97add commit ce8ef71
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,13 @@ const StockOperationTypesSelector: React.FC<
)}
menuOffset={{ right: "-100px" }}
style={{
backgroundColor: "#0f62fe !important",
backgroundColor: "#007d79",
backgroundImage: "none",
color: "#fff",
minHeight: "1em",
minHeight: "1rem",
padding: ".95rem !important",
width: "auto",
width: "8rem",
marginRight: "0.5rem",
whiteSpace: "nowrap",
}}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ import {
useStockOperationTypes,
} from "../../stock-lookups/stock-lookups.resource";
import { ResourceRepresentation } from "../../core/api/api";
import { closeOverlay } from "../../core/components/overlay/hook";
import { useTranslation } from "react-i18next";

const AddStockUserRoleScope: React.FC = () => {
const { t } = useTranslation();
// get stock sources
// operation types
const {
Expand Down Expand Up @@ -76,7 +79,7 @@ const AddStockUserRoleScope: React.FC = () => {
stockOperations.map((type) => {
return (
<div style={{ display: "flex", flexDirection: "row" }}>
<Checkbox labelText={type.name} id="operationType" />
<Checkbox labelText={type.name} id={type.operationType} />
</div>
);
})}
Expand All @@ -93,12 +96,14 @@ const AddStockUserRoleScope: React.FC = () => {
<CheckboxGroup className={styles.section}>
{locations?.length > 0 &&
locations.map((type) => {
return <Checkbox labelText={type.name} id="locations" />;
return <Checkbox labelText={type.name} id={type.uuid} />;
})}
</CheckboxGroup>
</ModalBody>
<ModalFooter>
<Button kind="secondary">Cancel</Button>
<Button kind="secondary" onClick={closeOverlay}>
{t("cancel", "Cancel")}
</Button>
<Button type="submit">Save</Button>
</ModalFooter>
</Form>
Expand Down

0 comments on commit ce8ef71

Please sign in to comment.