Merge pull request #259 from answerdev/feat/1.0.7/ui

fix: admin or moderator can create or edit tag
This commit is contained in:
dashuai 2023-03-15 17:22:58 +08:00 committed by GitHub
commit 9143842e4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -144,7 +144,7 @@ const Index = () => {
<Form.Control
value={formData.displayName.value}
isInvalid={formData.displayName.isInvalid}
disabled={role_id !== 2}
disabled={role_id !== 2 && role_id !== 3}
onChange={handleDisplayNameChange}
/>
@ -157,7 +157,7 @@ const Index = () => {
<Form.Control
value={formData.slugName.value}
isInvalid={formData.slugName.isInvalid}
disabled={role_id !== 2}
disabled={role_id !== 2 && role_id !== 3}
onChange={handleSlugNameChange}
/>
<Form.Text as="div">{t('form.fields.slug_name.desc')}</Form.Text>

View File

@ -219,7 +219,7 @@ const Index = () => {
<Form.Control
value={formData.displayName.value}
isInvalid={formData.displayName.isInvalid}
disabled={role_id !== 2}
disabled={role_id !== 2 && role_id !== 3}
onChange={handleDisplayNameChange}
/>
@ -232,7 +232,7 @@ const Index = () => {
<Form.Control
value={formData.slugName.value}
isInvalid={formData.slugName.isInvalid}
disabled={role_id !== 2}
disabled={role_id !== 2 && role_id !== 3}
onChange={handleSlugNameChange}
/>
<Form.Text as="div">{t('form.fields.slug_name.info')}</Form.Text>