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

View File

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