diff --git a/src/components/assignRolesAndDistrictsPage/index.js b/src/components/assignRolesAndDistrictsPage/index.js index 4d9b42e8..27e52ff2 100644 --- a/src/components/assignRolesAndDistrictsPage/index.js +++ b/src/components/assignRolesAndDistrictsPage/index.js @@ -257,7 +257,15 @@ const AssignRolesAndDistrictsPage = () => { className={classes.addButton} type="button" onClick={handleSave} - disabled={user === null || selectedDistricts === null || role === null} + disabled={ + user === null || + selectedDistricts === null || + role === null || + ( + role?.id === 4 && + selectedDistricts?.length > 0 + ) + } variant="contained" color="primary" > @@ -282,6 +290,10 @@ const AssignRolesAndDistrictsPage = () => { } {assigningError && {assigningError}} + { + (role?.id === 4 && selectedDistricts?.length > 0)&& + Range Agreement Holders cannot be assigned districts. + } {assigningSuccess && (