Skip to content

Commit

Permalink
Merge pull request #97 from MyersResearchGroup/role-select-fix
Browse files Browse the repository at this point in the history
component role editing
  • Loading branch information
doublergreer authored Aug 23, 2024
2 parents 9de197f + c107a4e commit f8023e4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions apps/web/src/components/RoleSelection.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function Role({ idx }) {
styles={selectStyles}
sx={{ flexGrow: 1, }}
/>
<CloseButton iconSize={20} onClick={removeRole} />
{/* <CloseButton iconSize={20} onClick={removeRole} /> */}
</Group>
<Space h="lg" />
</div>
Expand All @@ -104,7 +104,7 @@ export default function RoleSelection() {
};

return roles.map((_, idx) =>
<Role key={idx} idx={idx} />).concat(<Button key={'a'} onClick={addRoleHandler}>Add Role</Button>);
<Role key={idx} idx={idx} />);
}

const RoleItem = forwardRef(({ label, shortId, ...others }, ref) =>
Expand Down
6 changes: 5 additions & 1 deletion apps/web/src/modules/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,17 @@ export const useStore = create((set, get) => ({
document.root.description = richDescriptionBuffer.originalText;

// set roles to be the same as from document
const roles = document.root.roles;
if(document.root.roles.length < 1) document.root.roles = ["http://identifiers.org/so/SO:0000804"] //default to engineered region
const roles = document.root.roles;


const fromSynBioHub = isfromSynBioHub(document.root);
let isFileEdited = false
let isUriCleaned = false
let nameChanged = false

if (document.root.uriChain.includes("https://seqimprove.synbiohub.org")) isUriCleaned = true

set({
// ...result,
isFileEdited,
Expand Down

0 comments on commit f8023e4

Please sign in to comment.