Skip to content

Commit

Permalink
4032 - Split User Role / Invitation (#4053)
Browse files Browse the repository at this point in the history
* 4032 - Split database table and data migration (#4036)

* 4032 - UserInvitation type

* 4032 - Update getCreatePublicSchemaDDL

* 4032 - Migration step

* 4032 - update DDL

* 4032 - update migration

* 4032 - restore meta/userRole

* 4032 -  add created at

* disable testing/building

* enable tests

* l_ur.accepted_at as created_at

* fix invitation_uuid

* 4032 -  migrate valid roles and populate created at

* 4032 -  default time stamp from cycle for roles

* 4032 - UserInvitation and UserRole types and integration test (#4054)

* 4032 - meta: userRole, userRoles

* 4032 - test/integration: userInvite update

* 4032 - getCreatePublicSchemaDDL: update users_invitation ddl

* 4032 - userInvitation: isInvitationExpired -> isExpired

* 4032 - userInvitation: require assessmentUuid, userRole: optional cycleUuid

* 4032 - userInvitation: require countryIso

* 4032 - compare role.createdAt with Dates

* 4032 - UserInvitation: invitedByUserUuid required

* 4032 - deepscan

* 4032 - userRoles: add unit test for getLastRole

* 4032 - update hasRoleInAssessment

* 4032 - Create invitation (Backend) (#4055)

* 4032 - AssessmentController: get one with UUID

* 4032 - AssessmentController: get one with UUID

* 4032 - UserRepository: uuid on roles

* 4032 - UserInvitationRepository: create

* 4032 - MailService: update user invite

* 4032 - UserController: invite

* 4032 - AssessmentController: get one with UUID

* 4032 - Remove user invitation related code from getOne user

* 4032 - AssessmentRepository: use type checking for props

* 4032 - Accept invitation and generic fixes (Backend) (#4056)

* 4032 - UserController: update findByInvitation

* 4032 - auth/strategy: Update with new findByInvitation

* 4032 - UserInvitation: Accept

* 4032 - Update UserRole create

* 4032 - Update sendInvitationEmail

* 4032 - Accept and Remove invitation (#4057)

* 4032 - Remove unused UserRoleRepository functions

add todo for update/pendingInvitations

* 4032 - Introduce UserInvitationRepository remove

* 4032 - Remove Invitation API and Controller

* 4032 - Get Invitation API

* 4032 - UserInvitation Repository: renew, getOne, getMany, getCount

* 4032 - User Repository: count, getAdmins, getContacts, getMany, readCountryUsersByRole

* 4032 - Client: Login/Invitation (#4063)

* 4032 - Backend: Get many invitations (#4064)

* 4032 - store/userManagement: use singular endpoint for updating user

* 4032 - backend: get many (pending) invitations

* 4032 - Fix Admin Invitations Expired column (#4068)

* 4032 - UI: Invitations placeholder with invite button (#4069)

* 4032 - Add UserInvitations with Invite button

* 4032 - Move collaborators from FraHome to CountryHome

* 4032 - Introduce UserList element

* 4032 - Introduce UserInvitation and sub elements (#4070)

* 4032 - Add refetch invitations hook (#4071)

* 4032 - Add user invitation info button with Popover (#4072)

* 4032 - Add UserList component and subcomponents (#4074)

* fix typo in query (#4077)

* 4032 -  Update country status change confirm pop up (#4076)

* 4032 - unique class name

* 4032 - deprecate old UserList

* 4032 - Update StatusConfirm: add simple user list

* 4032 - Update StatusConfirm: add simple user list

* Use props extraction

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* 4032 - Delete old userlist component (#4078)

* 4032 - Update country summary (#4089)

* 4032 - Country User Summary (#4096)

* 4032 - Country User Summary

* 4032 - rename CountryUserSummaryRepository.createOrReplaceView to getCreateOrReplaceViewCountryUserSummary

* 4032 - remove optional param schemaName

* 4032 - CountryUserSummary view query: remove user_data CTE, rename user_uuid to uuid, include fullname

* 4032 - CountryUserSummary view query: let role and invitation be undefined

* 4032 - Users: Get Many through Country User Summary (#4103)

* 4032 - Country User Summary type

* 4032 - Country User Summary update view

- Include admins
- Include id
- Fix typo in full name column

* 4032 - users/getMany: Initial commit

* 4032 - Separate type UserQueryParams

* 4032 - UserRepository: Use named params for getMany

* 4032 - UserRepository: Use named params for getMany

* 4032 - CountryUserSummary: clean up query

* 4032 - Add indexes for users_invitation, users_role

* 4032 - Rehaul country_user_summary

* 4032 - Users/getMany: fix role filtering for invitations

* 4032 - country_user_summary: Fix admins role column

* 4032 - repository/user: update count

* 4032 - Admin collaborators view (#4112)

* 4032 - Manage Collaborators -> Collaborators

* 4032 - Move and update Admin/UserManagement to AdminCollaborators

* 4032 - useRoutes: use AdminCollaborators

* 4032 - RoleField: Support invitations

* 4032 - deepscan

* 4111 - Fix country filtering

* 4032 - Update Country Collaborators (#4118)

* 4032 - Include Lang column in country_user_summary

* 4032 - Deprecation notice/todo

* 4032 - meta/CountryUserSummaries: getCountryRoleAndInvitation, isInvitation

* 4032 - UserList: Move invite to UserList and remove UserInvitations component

* 4032 - ActionsContainer: Remove unused component

* 4032 - Users: update (invitation) Info column

* 4032 - users/getMany: include lang

* 4032 - Users/Actions: Update hooks

* 4032 - Users/Actions: Update CopyLink

* 4032 - Users/Actions: Update Edit [user]

* 4032 - Users/Actions: Update Remove

* 4032 - Users/Actions: Update Resend

* 4032 - Users: Update Actions

* 4032 - Update Users

* 4032 - Users/getInvitations: Remove unused invitations endpoint (#4119)

* 4032 - Fix Messageboard and country status change recipients (#4128)

* 4032 - Fix Recipients in country status change

* 4032 - Fix MessageBoard

* 4032 - store/userManagement: Update types and deprecate

* 4032 - Fix UUID comparison (#4127)

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* 4032 - Remove country message board (#4131)

* 4032 - Remove Messageboard, move MessageButton to components

* 4032 - use buttonText -> label

* 4032 - Country message button fix

* 4032 - Fix sections order, hide regions for unpublished areas

* 4032 - Add icon rotate

* 4032 - Darken buttons with type Danger (global change)

* 4032 - MessageButton: Remove margin

* 4032 - CountryHome/Collaborators/ButtonInvite: Update style and use useButtonClassName

* 4032 - MessageButton: Add prop className

* 4032 - Update rule to access messaging on platform

* 4032 - useCanAccessMessaging -> useCanSeeUserActivities

* 4032 - useCanSeeUserActivities move to store/user

* 4032 - components/MessageButton: use useCountryRouteParams

* 4032 - Update collaborators view (#4139)

* 4032 - users/getMany: sort users

- Return users with role first
- Return users with invitation next

* 4032 - Initial commit for UserCard

* 4032 - Add translations

* 4032 - Highlight expired invitation

* 4032 - Remove unused CSS class

* 4032 - Common component Avatar

* 4032 - useActions: Separate hook with return types

* 4032 - useRefetchUsers: Remove unnecessary useMemo and add return type

* 4032 - Add home -prefix for user css classes

* 4032 - TablePaginated: add possibility to sort client side

* 4032 - home/Users: introduce useUserSortFn to sort invited users last

* 4032 - Multi role change (#4141)

* 4032 - db/country_user_summary: Only show pending invitations

* 4032 - be/updateUserRoles: fix updating multiple roles

* 4032 - client/CountryRoles: fix updating multiple roles

* 4032 - fix typo

* 4032 - cloneCycle: Update cloning user roles (#4143)

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* 4032 - Admin/Collaborators: count: Show correct values per role and total (#4145)

* 4032 - Initial commit for fix admin count

* 4032 - Clean up

* 4032 - Update UI and Generic Fixes (1) (#4150)

* 4032 - fix: hide country message button in regions

* 4032 - Update UI

* 4032 - Rename route and tab: User management -> Collaborators

* 4032 - Minor fixes (2) (#4154)

* 4032 - delete unused file

* 4032 - remove unused parameter

* 4032 - fix invitation count

* 4032 - Minor fixes (3) (#4157)

* 4032 - Reviewer cannot access invitation actions

* 4032 - introduce hook: useCanEditUserActivities

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* 4032 - Fix migrations (#4160)

* 4032 - Fix Collaborators page access / edit auth (#4167)

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* 4032 - UI refactor (#4168)

* 4032 - Remove Users component

* 4032 - refactor ui

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* 4032 - refactor Country Home header (#4170)

* 4032 - refactor Country Home header

* 4032 - fix message count

* 4032 - improve ui

* 4032 - Dashboard UI (#4174)

* 4032 - Dashboard UI

* 4032 - update users sort fn

* 4032 - update user role label

* 4032 - refactor table paginated sort

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* 4032 - Disabled users toggle (#4177)

* 4032 - Fix inconsistencies in Admin/Collaborators

* 4032 - Admin collaborators: Filter by disabled

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* 4032 - Fix User status (#4179)

* 4032 - Refactor/Fix Users.getMany (#4180)

* 4032 - Refactor users.getMany filters logic

* 4032 - Fix users results

* 4032 - Fix ts-ignore

* 4032 - Fix deep scan

* 4032 - 4156 - Refactor Atlantis countries usage (#4181)

* 4032 - useUserCountryISOs: hide atlantis countries in published views

* 4032 - remove isAtlantisAllowed

* 4156 - update .env.template

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* 4032 - fix export (#4183)

* 4032 - Collaborators Grouped UI (#4184)

* 4032 - Ui Collaborators grouped

* 4032 - Collaborators Grouped UI

* 4032 - Collaborators/User edit final fixes (#4187)

* 4032 - Collaborators/User edit final fixes

* 4032 - add user i18n

* 4032 - update sections collaborator i18n

* 4032 - update roles logic in /UserCountryRoleSelector/hooks/useOptions

* 4032 - fix panEuropean description labels

* 4032 - fix clone cycle

* 4032 - update skeleton duration

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Mino Togna <[email protected]>
  • Loading branch information
3 people authored Dec 19, 2024
1 parent 55f3cc5 commit 8b9298e
Show file tree
Hide file tree
Showing 279 changed files with 3,435 additions and 3,032 deletions.
1 change: 0 additions & 1 deletion .env.template
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ FRA_GOOGLE_CLIENT_SECRET=goggle-client-secret
FRA_GOOGLE_MAPS_API_KEY=google-maps-api-key

#FRA
FRA_ATLANTIS_ALLOWED='[{"assessmentName":"fra","cycleName":"2025"}]'
FRA_REPORT_COLLABORATORS_EXCLUDED=[]

# Local development mail server
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
"ts-node-dev": "^2.0.0",
"tsc-alias": "^1.8.6",
"turndown": "^7.1.1",
"typescript": "^4.6.3",
"typescript": "^5.7.2",
"webpack": "^5.71.0",
"webpack-bundle-analyzer": "^4.4.2",
"webpack-cli": "^4.7.2",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CountryIso } from 'meta/area'
import { Areas, CountryIso } from 'meta/area'
import { Cycles, CycleUuid } from 'meta/assessment'
import { RoleName, Users } from 'meta/user'
import { UserRoles } from 'meta/user/userRoles'
Expand Down Expand Up @@ -37,7 +37,7 @@ export const useUserCountryISOs = (): Record<CycleUuid, Record<string, Array<Cou
// For no user role, show only current cycle countries
userCountryISOs[UserRoles.noRole.role][cycle.uuid] = allCountries
.map((c) => c.countryIso)
.filter((countryIso: CountryIso) => !userCountries?.includes(countryIso))
.filter((countryIso: CountryIso) => !Areas.isAtlantis(countryIso) && !userCountries?.includes(countryIso))
}
}

Expand Down
15 changes: 15 additions & 0 deletions src/client/components/Avatar/Avatar.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
@import 'src/client/style/partials';

.user-avatar {
width: 28px;
height: 28px;
border-radius: 50%;
overflow: hidden;

img {
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
height: 100%;
object-fit: cover;
width: 100%;
}
}
23 changes: 23 additions & 0 deletions src/client/components/Avatar/Avatar.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import './Avatar.scss'
import React from 'react'

import { CountryUserSummary, User, Users } from 'meta/user'

type Props = {
user: User | CountryUserSummary
}

const Avatar: React.FC<Props> = (props: Props) => {
const { user } = props

const alt = 'fullName' in user ? user.fullName : Users.getFullName(user)
const src = Users.profilePictureUri(user.id)

return (
<div className="user-avatar">
<img alt={alt} src={src} />
</div>
)
}

export default Avatar
1 change: 1 addition & 0 deletions src/client/components/Avatar/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from './Avatar'
6 changes: 5 additions & 1 deletion src/client/components/Buttons/Button/Button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@
}
}

&.noBorder {
border: unset;
}

&.inverse {
background-color: $colorSecondary;
color: $colorPrimary;
Expand Down Expand Up @@ -153,7 +157,7 @@
}

.button__type-danger {
@include withTheme($ui-destructive, 58%);
@include withTheme(darken($ui-destructive, 5%), 58%);
}

.button__type-primary {
Expand Down
13 changes: 11 additions & 2 deletions src/client/components/Buttons/Button/hooks/useButtonClassName.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,15 @@ import classNames from 'classnames'
import { ButtonProps, ButtonSize, ButtonType } from 'client/components/Buttons/Button/types'

export const useButtonClassName = (props: ButtonProps): string => {
const { className, disabled, inverse, noPrint = true, size = ButtonSize.s, type = ButtonType.primary } = props
const {
className,
disabled,
inverse,
noBorder = false,
noPrint = true,
size = ButtonSize.s,
type = ButtonType.primary,
} = props

return useMemo<string>(() => {
return classNames(
Expand All @@ -15,7 +23,8 @@ export const useButtonClassName = (props: ButtonProps): string => {
`button__type-${type}`,
{ inverse },
{ disabled },
{ noBorder },
className
)
}, [className, disabled, inverse, noPrint, size, type])
}, [className, disabled, inverse, noBorder, noPrint, size, type])
}
1 change: 1 addition & 0 deletions src/client/components/Buttons/Button/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ export type ButtonProps = Pick<InputHTMLAttributes<HTMLButtonElement>, 'classNam
noPrint?: boolean
size?: ButtonSize
type?: ButtonType
noBorder?: boolean
}
39 changes: 26 additions & 13 deletions src/client/components/Dashboard/Dashboard.scss
Original file line number Diff line number Diff line change
@@ -1,15 +1,35 @@
@import 'src/client/style/partials';

$border: 1px dotted $ui-border;

.dashboard {
background-color: $ui-bg-light;
border-left: $border;
border-radius: 2px;
border-right: $border;
border-top: $border;
display: grid;
grid-column-gap: $spacing-xs;
grid-row-gap: $spacing-xs;
grid-template-columns: 1fr;
overflow: hidden;

@include min-width($laptop) {
grid-template-columns: repeat(2, minmax(0, 1fr));
padding-top: $spacing-s;
margin-top: $spacing-s;

> .dashboard-item:nth-child(odd) {
border-right: $border;
}
}
}

@include rtl {
.dashboard {
@include min-width($laptop) {
> .dashboard-item:nth-child(odd) {
border-left: $border;
border-right: unset;
}
}
}
}

Expand All @@ -18,23 +38,16 @@
align-items: start;
display: grid;
overflow: hidden;
padding: $spacing-xs $spacing-s;
border-bottom: $border;

.header {
border-radius: 2px;
border: 1px solid $ui-border;
padding: 6px;

h3 {
background-color: $ui-bg;
border-radius: 2px;
font-size: $font-m;
padding: 6px $spacing-xxs;
text-transform: uppercase;
font-size: $font-m + 1px;
}
}

> :nth-child(2) {
padding: 0 $spacing-xs;
overflow: hidden;
}

Expand Down
24 changes: 16 additions & 8 deletions src/client/components/EditUserForm/CountryRoles/CountryRoles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ import CountrySelectModal from 'client/components/CountrySelectModal'

import CountryRole from './CountryRole'

/*
This component is used by admins when setting or removing multiple roles
*/

// properties used to render ui form fields
const roles = [
RoleName.REVIEWER,
Expand All @@ -33,6 +37,10 @@ type ModalOptionsProps = {
role: RoleName | null
}

/**
* @deprecated
* Deprecation notice: EditUserForm is scheduled for refactor in #3810
*/
const CountryRoles: React.FC<{ user: User }> = ({ user }) => {
const dispatch = useAppDispatch()
const { t } = useTranslation()
Expand All @@ -58,7 +66,7 @@ const CountryRoles: React.FC<{ user: User }> = ({ user }) => {
(countryIso): Partial<UserRole<RoleName>> => ({
countryIso: countryIso as CountryIso,
role,
assessmentId: assessment.id,
assessmentUuid: assessment.uuid,
cycleUuid: cycle.uuid,
})
)
Expand All @@ -70,16 +78,16 @@ const CountryRoles: React.FC<{ user: User }> = ({ user }) => {
assessmentName: assessment.props.name,
cycleName: cycle.name,
roles,
userId: user.id,
userUuid: user.uuid,
})
)
},
[assessment.id, assessment.props.name, cycle.name, cycle.uuid, dispatch, user.id, user.roles]
[assessment.props.name, assessment.uuid, cycle.name, cycle.uuid, dispatch, user.roles, user.uuid]
)

const _toggleAdmin = useCallback(() => {
if (window.confirm(t(Users.isAdministrator(user) ? 'editUser.demoteToUser' : 'editUser.promoteToAdmin'))) {
dispatch(UserManagementActions.updateUserAdminRole({ userId: user.id }))
dispatch(UserManagementActions.updateUserAdminRole({ userUuid: user.uuid }))
}
}, [dispatch, t, user])

Expand Down Expand Up @@ -121,9 +129,9 @@ const CountryRoles: React.FC<{ user: User }> = ({ user }) => {

{Users.isAdministrator(userInfo) && (
<div
aria-hidden="true"
className="edit-user__form-field-role edit-user__form-field-role-admin edit-user__form-field-role-container validation-error-sensitive-field"
onClick={_toggleAdmin}
aria-hidden="true"
>
<div className="role">{t(Users.getI18nRoleLabelKey(RoleName.ADMINISTRATOR))}</div>
<div className={classNames('fra-checkbox', { checked: Users.isAdministrator(user) })} />
Expand All @@ -132,15 +140,15 @@ const CountryRoles: React.FC<{ user: User }> = ({ user }) => {
</div>

<CountrySelectModal
open={modalOptions.open}
countries={countries}
excludedRegions={excludeRegions}
headerLabel={t(Users.getI18nRoleLabelKey(modalOptions.role as RoleName))}
onClose={() => setModalOptions(initialModalState)}
initialSelection={modalOptions.initialSelection}
unselectableCountries={modalOptions.unselectableCountries}
onChange={(_, selectionUpdate: Array<string>) => _onChange(selectionUpdate, modalOptions.role)}
onClose={() => setModalOptions(initialModalState)}
open={modalOptions.open}
showFooter={false}
unselectableCountries={modalOptions.unselectableCountries}
/>
</div>
)
Expand Down
38 changes: 21 additions & 17 deletions src/client/components/EditUserForm/EditUserForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ import TextInputField from './TextInputField'
import UserRolePropsFields from './UserRolePropsFields'

type Props = {
targetUser: User
canEditPermissions?: boolean
canEditRoles?: boolean
canEditUser?: boolean
targetUser: User
}

const EditUserForm: React.FC<Props> = (props: Props) => {
const { targetUser, canEditPermissions, canEditRoles, canEditUser } = props
const { canEditPermissions, canEditRoles, canEditUser, targetUser } = props
const dispatch = useAppDispatch()
const assessment = useAssessment()
const countryIso = useCountryIso()
Expand Down Expand Up @@ -81,45 +81,49 @@ const EditUserForm: React.FC<Props> = (props: Props) => {
const enabled = canEditUser
const isAdmin = Users.isAdministrator(user)
const isTargetAdmin = Users.isAdministrator(targetUser)
const showRoleSelector = !Areas.isGlobal(countryIso) && isAdmin && !isTargetAdmin
const isSelf = user.id === targetUser.id
const showRoleSelector =
!Areas.isGlobal(countryIso) &&
!isSelf &&
((isAdmin && !isTargetAdmin) || Users.getRolesAllowedToEdit({ user, cycle, countryIso }).length > 0)

return (
<div className="edit-user__form-container">
<ProfilePicture
enabled={enabled}
onChange={(profilePicture: File) => setProfilePicture(profilePicture)}
userId={targetUser.id}
enabled={enabled}
/>
<TextInputField
enabled={Users.isAdministrator(user)}
mandatory
name="email"
value={targetUser.email}
onChange={changeUser}
validator={Users.validEmailField}
enabled={Users.isAdministrator(user)}
mandatory
value={targetUser.email}
/>
<SelectField
enabled={enabled}
mandatory
name="title"
value={targetUser.props.title}
onChange={changeUserProp}
options={appellationOptions}
enabled={enabled}
mandatory
value={targetUser.props.title}
/>
<TextInputField name="name" value={targetUser.props.name} onChange={changeUserProp} enabled={enabled} mandatory />
<TextInputField enabled={enabled} mandatory name="name" onChange={changeUserProp} value={targetUser.props.name} />
<TextInputField
name="surname"
value={targetUser.props.surname}
onChange={changeUserProp}
enabled={enabled}
mandatory
name="surname"
onChange={changeUserProp}
value={targetUser.props.surname}
/>
{showRoleSelector && <UserCountryRoleSelector user={targetUser} enabled={enabled} />}
{showRoleSelector && <UserCountryRoleSelector enabled={enabled} target={targetUser} />}

{[RoleName.NATIONAL_CORRESPONDENT, RoleName.ALTERNATE_NATIONAL_CORRESPONDENT, RoleName.COLLABORATOR].includes(
userRole?.role
) &&
roleToEdit && <UserRolePropsFields role={roleToEdit} onChange={changeUserRoleProp} enabled={enabled} />}
roleToEdit && <UserRolePropsFields enabled={enabled} onChange={changeUserRoleProp} role={roleToEdit} />}
<div className="edit-user__form-item">
<div className="edit-user__form-label">{t('editUser.mandatoryFields')}</div>
</div>
Expand All @@ -128,7 +132,7 @@ const EditUserForm: React.FC<Props> = (props: Props) => {
)}
{canEditRoles && <CountryRoles user={targetUser} />}

{isAdmin && <DisableUser user={targetUser} changeUser={changeUser} />}
{isAdmin && <DisableUser changeUser={changeUser} user={targetUser} />}
</div>
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ const TextInputField: React.FC<Props> = (props) => {
error: !valid,
})}
>
{editorLink && <EditorWYSIWYGLinks onChange={(_value) => onChange(name, _value)} value={value} />}
{editorLink && (
<EditorWYSIWYGLinks disabled={!enabled} onChange={(_value) => onChange(name, _value)} value={value} />
)}

{!editorLink && (
<input
Expand Down
Loading

0 comments on commit 8b9298e

Please sign in to comment.