forked from AkkomaGang/admin-fe
Add dropdown item and dialog window for creating custom tag
This commit is contained in:
parent
8908ecad81
commit
2d70096f51
4 changed files with 31 additions and 4 deletions
|
@ -276,7 +276,8 @@ export default {
|
||||||
person: 'Person',
|
person: 'Person',
|
||||||
enableTagPolicy: 'Enable MRF TagPolicy to manage user tags',
|
enableTagPolicy: 'Enable MRF TagPolicy to manage user tags',
|
||||||
confirmEnablingTagPolicy: 'Are you sure you want to add TagPolicy to the list of enabled MRF policies?',
|
confirmEnablingTagPolicy: 'Are you sure you want to add TagPolicy to the list of enabled MRF policies?',
|
||||||
enableTagPolicySuccessMessage: 'MRF TagPolicy was enabled'
|
enableTagPolicySuccessMessage: 'MRF TagPolicy was enabled',
|
||||||
|
createCustomTag: 'Create custom tag'
|
||||||
},
|
},
|
||||||
statuses: {
|
statuses: {
|
||||||
statuses: 'Statuses',
|
statuses: 'Statuses',
|
||||||
|
|
|
@ -110,6 +110,12 @@
|
||||||
{{ $t('users.disableAnySubscription') }}
|
{{ $t('users.disableAnySubscription') }}
|
||||||
<i v-if="user.tags.includes('mrf_tag:disable-any-subscription')" class="el-icon-check"/>
|
<i v-if="user.tags.includes('mrf_tag:disable-any-subscription')" class="el-icon-check"/>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
|
<el-dropdown-item
|
||||||
|
v-if="user.local && tagPolicyEnabled"
|
||||||
|
icon="el-icon-plus"
|
||||||
|
@click.native="$emit('open-custom-tag-dialog')">
|
||||||
|
{{ $t('users.createCustomTag') }}
|
||||||
|
</el-dropdown-item>
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
v-if="!tagPolicyEnabled"
|
v-if="!tagPolicyEnabled"
|
||||||
divided
|
divided
|
||||||
|
|
|
@ -139,6 +139,12 @@
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
</div>
|
</div>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
|
<el-dropdown-item
|
||||||
|
v-if="tagPolicyEnabled"
|
||||||
|
icon="el-icon-plus"
|
||||||
|
@click.native="$emit('open-custom-tag-dialog')">
|
||||||
|
{{ $t('users.createCustomTag') }}
|
||||||
|
</el-dropdown-item>
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
v-if="!tagPolicyEnabled"
|
v-if="!tagPolicyEnabled"
|
||||||
divided
|
divided
|
||||||
|
|
|
@ -25,7 +25,8 @@
|
||||||
</el-button>
|
</el-button>
|
||||||
<multiple-users-menu
|
<multiple-users-menu
|
||||||
:selected-users="selectedUsers"
|
:selected-users="selectedUsers"
|
||||||
@apply-action="clearSelection"/>
|
@apply-action="clearSelection"
|
||||||
|
@open-custom-tag-dialog="openCustomTagDialog"/>
|
||||||
</div>
|
</div>
|
||||||
<new-account-dialog
|
<new-account-dialog
|
||||||
:dialog-form-visible="createAccountDialogOpen"
|
:dialog-form-visible="createAccountDialogOpen"
|
||||||
|
@ -102,7 +103,8 @@
|
||||||
v-if="propertyExists(scope.row, 'nickname')"
|
v-if="propertyExists(scope.row, 'nickname')"
|
||||||
:user="scope.row"
|
:user="scope.row"
|
||||||
:page="'users'"
|
:page="'users'"
|
||||||
@open-reset-token-dialog="openResetPasswordDialog"/>
|
@open-reset-token-dialog="openResetPasswordDialog"
|
||||||
|
@open-custom-tag-dialog="openCustomTagDialog"/>
|
||||||
<el-button v-else type="text" disabled>
|
<el-button v-else type="text" disabled>
|
||||||
{{ $t('users.moderation') }}
|
{{ $t('users.moderation') }}
|
||||||
<i v-if="isDesktop" class="el-icon-arrow-down el-icon--right"/>
|
<i v-if="isDesktop" class="el-icon-arrow-down el-icon--right"/>
|
||||||
|
@ -113,6 +115,13 @@
|
||||||
<reset-password-dialog
|
<reset-password-dialog
|
||||||
:reset-password-dialog-open="resetPasswordDialogOpen"
|
:reset-password-dialog-open="resetPasswordDialogOpen"
|
||||||
@close-reset-token-dialog="closeResetPasswordDialog"/>
|
@close-reset-token-dialog="closeResetPasswordDialog"/>
|
||||||
|
<el-dialog
|
||||||
|
:visible.sync="createCustomTagDialogOpen"
|
||||||
|
:show-close="false"
|
||||||
|
:title="$t('users.createCustomTag')"
|
||||||
|
@open="resetForm">
|
||||||
|
<span/>
|
||||||
|
</el-dialog>
|
||||||
<div v-if="!loading" class="pagination">
|
<div v-if="!loading" class="pagination">
|
||||||
<el-pagination
|
<el-pagination
|
||||||
:total="usersCount"
|
:total="usersCount"
|
||||||
|
@ -156,7 +165,8 @@ export default {
|
||||||
search: '',
|
search: '',
|
||||||
selectedUsers: [],
|
selectedUsers: [],
|
||||||
createAccountDialogOpen: false,
|
createAccountDialogOpen: false,
|
||||||
resetPasswordDialogOpen: false
|
resetPasswordDialogOpen: false,
|
||||||
|
createCustomTagDialogOpen: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -235,6 +245,9 @@ export default {
|
||||||
handleSelectionChange(value) {
|
handleSelectionChange(value) {
|
||||||
this.$data.selectedUsers = value
|
this.$data.selectedUsers = value
|
||||||
},
|
},
|
||||||
|
openCustomTagDialog() {
|
||||||
|
this.createCustomTagDialogOpen = true
|
||||||
|
},
|
||||||
openResetPasswordDialog() {
|
openResetPasswordDialog() {
|
||||||
this.resetPasswordDialogOpen = true
|
this.resetPasswordDialogOpen = true
|
||||||
},
|
},
|
||||||
|
@ -244,6 +257,7 @@ export default {
|
||||||
regReason(reason) {
|
regReason(reason) {
|
||||||
return reason && reason.length > 0
|
return reason && reason.length > 0
|
||||||
},
|
},
|
||||||
|
resetForm() {},
|
||||||
showDeactivatedButton(id) {
|
showDeactivatedButton(id) {
|
||||||
return this.$store.state.user.id !== id
|
return this.$store.state.user.id !== id
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue