Merge branch 'staging_environment' into dev_environment
This commit is contained in:
commit
0661ddf4ea
7 changed files with 13 additions and 13 deletions
|
|
@ -102,8 +102,8 @@ export default function LocalAuthPlaceholder(props: Props) {
|
|||
/>
|
||||
)}
|
||||
<TextField
|
||||
label="Email"
|
||||
type="email"
|
||||
label="Username or Email"
|
||||
type="text"
|
||||
value={email}
|
||||
onChange={e => setEmail(e.target.value)}
|
||||
required
|
||||
|
|
|
|||
|
|
@ -1159,7 +1159,7 @@ export default function BinVisualizer(props: Props) {
|
|||
<BindaptIcon />
|
||||
</Avatar>
|
||||
<Box textAlign="center" width={"85%"}>
|
||||
<Link href="https://www.bindapt.com/bins/">View Smart Bin Devices</Link>
|
||||
<Typography>No Plenums found</Typography>
|
||||
</Box>
|
||||
</Box>
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -512,7 +512,7 @@ export default function DeviceActions(props: Props) {
|
|||
};
|
||||
|
||||
const showSupport = () => {
|
||||
return user.allowedTo("provision") && !location.pathname.includes("support")
|
||||
return user.hasAdmin() && !location.pathname.includes("support")
|
||||
}
|
||||
|
||||
const buttons = () => {
|
||||
|
|
@ -523,7 +523,7 @@ export default function DeviceActions(props: Props) {
|
|||
<Visibility />
|
||||
</IconButton>
|
||||
</Tooltip>}
|
||||
{canWrite && user.allowedTo("provision") && <UpgradeDevice device={device} />}
|
||||
{canWrite && user.hasAdmin() && <UpgradeDevice device={device} />}
|
||||
{/* {!isShareableLink(match.params.deviceID) && ( */}
|
||||
<NotificationButton
|
||||
notify={preferences.notify}
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ export default function ObjectTeams(props: Props) {
|
|||
const theme = useTheme();
|
||||
const permissionAPI = usePermissionAPI();
|
||||
const [{ user, as }] = useGlobalState();
|
||||
const canProvision = user.allowedTo("provision");
|
||||
const isAdmin = user.hasAdmin();
|
||||
const teamAPI = useTeamAPI();
|
||||
const { error, success, warning } = useSnackbar();
|
||||
const {
|
||||
|
|
@ -513,7 +513,7 @@ export default function ObjectTeams(props: Props) {
|
|||
) : (
|
||||
canManageUsers &&
|
||||
!isRemoved &&
|
||||
(!permissions.includes(pond.Permission.PERMISSION_USERS) || canProvision) && (
|
||||
(!permissions.includes(pond.Permission.PERMISSION_USERS) || isAdmin) && (
|
||||
<ListItemSecondaryAction>
|
||||
<Tooltip title="Revoke user's access">
|
||||
<IconButton
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ export default function ObjectUsers(props: Props) {
|
|||
const theme = useTheme();
|
||||
const permissionAPI = usePermissionAPI();
|
||||
const [{ user, team }, dispatch] = useGlobalState();
|
||||
const canProvision = user.allowedTo("provision");
|
||||
const isAdmin = user.hasAdmin();
|
||||
const userAPI = useUserAPI();
|
||||
const { error, success, warning } = useSnackbar();
|
||||
const {
|
||||
|
|
@ -560,7 +560,7 @@ export default function ObjectUsers(props: Props) {
|
|||
</IconButton>
|
||||
</Tooltip>
|
||||
</ListItemSecondaryAction>
|
||||
) : (canManageUsers || canProvision) && !isRemoved && !cardMode ? (
|
||||
) : (canManageUsers || isAdmin) && !isRemoved && !cardMode ? (
|
||||
<ListItemSecondaryAction>
|
||||
<Tooltip title="Revoke user's access">
|
||||
<IconButton
|
||||
|
|
@ -572,7 +572,7 @@ export default function ObjectUsers(props: Props) {
|
|||
</Tooltip>
|
||||
</ListItemSecondaryAction>
|
||||
) : (
|
||||
(canManageUsers || canProvision) && (
|
||||
(canManageUsers || isAdmin) && (
|
||||
<ListItemSecondaryAction>
|
||||
<Tooltip title="Edit user's permissions">
|
||||
<IconButton
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ export default function UserSettings(props: Props) {
|
|||
const [sharing, setSharing] = useState(false)
|
||||
const userAPI = useUserAPI();
|
||||
const classes = useStyles()
|
||||
const { success } = useSnackbar();
|
||||
const { success, error } = useSnackbar();
|
||||
|
||||
const [isLoading, setIsLoading] = useState<boolean>(false);
|
||||
const [user, setUser] = useState<User>(globalState.user);
|
||||
|
|
@ -113,7 +113,7 @@ export default function UserSettings(props: Props) {
|
|||
setDistanceUnit(user.settings.distanceUnit);
|
||||
setGrainUnit(user.settings.grainUnit);
|
||||
})
|
||||
.catch((error: any) => {
|
||||
.catch(() => {
|
||||
error("Error occurred while updating your profile");
|
||||
})
|
||||
.finally(() => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue