HUGE REFACTOR / CLEANUP
if there is a issue it's probably something in here that was changed
This commit is contained in:
@@ -17,11 +17,10 @@
|
||||
></v-select>
|
||||
</template>
|
||||
<script>
|
||||
/* Xeslint-disable */
|
||||
export default {
|
||||
async created() {
|
||||
await window.$gz.enums.fetchEnumList("AuthorizationRoles");
|
||||
let rawRoles = window.$gz.enums.getSelectionList("AuthorizationRoles");
|
||||
const rawRoles = window.$gz.enums.getSelectionList("AuthorizationRoles");
|
||||
if (this.limitSelectionTo == null) {
|
||||
this.availableRoles = rawRoles;
|
||||
} else {
|
||||
@@ -55,10 +54,10 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
selectedValue() {
|
||||
let ret = [];
|
||||
const ret = [];
|
||||
if (this.value != null && this.value != 0) {
|
||||
for (let i = 0; i < this.availableRoles.length; i++) {
|
||||
let role = this.availableRoles[i];
|
||||
const role = this.availableRoles[i];
|
||||
if (!!(this.value & role.id)) {
|
||||
ret.push(role.id);
|
||||
}
|
||||
@@ -72,7 +71,7 @@ export default {
|
||||
let newValue = 0;
|
||||
if (value != null && value != [] && value.length > 0) {
|
||||
for (let i = 0; i < value.length; i++) {
|
||||
let role = value[i];
|
||||
const role = value[i];
|
||||
newValue = newValue | role;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user