mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-18 16:22:14 +00:00
team members limitation frontend/backend
This commit is contained in:
@@ -91,6 +91,7 @@
|
||||
import InfoBox from "../Others/Forms/InfoBox";
|
||||
import {events} from '/resources/js/bus'
|
||||
import axios from "axios";
|
||||
import {mapGetters} from "vuex";
|
||||
|
||||
export default {
|
||||
name: 'CreateTeamFolderPopup',
|
||||
@@ -109,6 +110,9 @@
|
||||
InfoBox,
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'user'
|
||||
]),
|
||||
popupTitle() {
|
||||
return this.item ? this.$t('Convert as Team Folder') : this.$t('Create Team Folder')
|
||||
},
|
||||
@@ -198,6 +202,17 @@
|
||||
return
|
||||
}
|
||||
|
||||
// Get team folder limitations
|
||||
let limit = this.user.data.meta.limitations.max_team_members
|
||||
|
||||
if (limit.percentage >= 100 && ! limit.meta.allowed_emails.includes(email)) {
|
||||
this.$refs.teamFolderForm.setErrors({
|
||||
'Email': this.$t("You have to upgrade your account to add this new member.")
|
||||
});
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
this.$refs.teamFolderForm.reset()
|
||||
|
||||
this.invitations.push({
|
||||
|
||||
@@ -80,6 +80,7 @@
|
||||
import InfoBox from "../Others/Forms/InfoBox";
|
||||
import {events} from '/resources/js/bus'
|
||||
import axios from "axios";
|
||||
import {mapGetters} from "vuex";
|
||||
|
||||
export default {
|
||||
name: 'EditTeamFolderPopup',
|
||||
@@ -98,6 +99,9 @@
|
||||
InfoBox,
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'user'
|
||||
]),
|
||||
isDisabledSubmit() {
|
||||
return Object.values(this.members).length === 0 && Object.values(this.invitations).length === 0
|
||||
}
|
||||
@@ -157,6 +161,17 @@
|
||||
});
|
||||
}
|
||||
|
||||
// Get team folder limitations
|
||||
let limit = this.user.data.meta.limitations.max_team_members
|
||||
|
||||
if (limit.percentage >= 100 && ! limit.meta.allowed_emails.includes(email)) {
|
||||
this.$refs.teamFolderForm.setErrors({
|
||||
'Email': this.$t("You have to upgrade your account to add this new member.")
|
||||
});
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
this.$refs.teamFolderForm.reset()
|
||||
|
||||
this.invitations.push({
|
||||
|
||||
Reference in New Issue
Block a user