This commit is contained in:
@@ -7,9 +7,17 @@ WIFI change 5g channel to 52,56,60 and 2g channel to 8
|
||||
|
||||
|
||||
todo: USERS - Administration - Users
|
||||
is this where roles are set?
|
||||
role control see below somewhere
|
||||
mirrors or links to user edit form somehow so admin can also set user options but with added rights like roles etc
|
||||
notes
|
||||
is this where roles are set?
|
||||
role control see below somewhere
|
||||
mirrors or links to user edit form somehow so admin can also set user options but with added rights like roles etc
|
||||
UI
|
||||
LIST A standard dataList of users, opens each to a user edit form
|
||||
Has mass change options that are useful
|
||||
Or at least potential to do that d.t.r. (down the road / TTM)
|
||||
SINGLE EDIT FORM
|
||||
Set all user props relevant to the admin
|
||||
|
||||
|
||||
todo: need a role collection control of some kind for things like case 3417.
|
||||
Control present all or subset of roles for selection, user can select from them like a checkbox dropdown or something.
|
||||
|
||||
@@ -40,6 +40,7 @@ import dateControl from "./components/date-control.vue";
|
||||
import timeControl from "./components/time-control.vue";
|
||||
import tagPicker from "./components/tag-picker.vue";
|
||||
import pickList from "./components/pick-list.vue";
|
||||
import dataTable from "./components/gz-data-table.vue";
|
||||
import customFieldsControl from "./components/custom-fields-control.vue";
|
||||
import currencyControl from "./components/currency-control.vue";
|
||||
import decimalControl from "./components/decimal-control.vue";
|
||||
@@ -178,6 +179,7 @@ Vue.component("gz-date-picker", dateControl);
|
||||
Vue.component("gz-time-picker", timeControl);
|
||||
Vue.component("gz-tag-picker", tagPicker);
|
||||
Vue.component("gz-pick-list", pickList);
|
||||
Vue.component("gz-data-table", dataTable);
|
||||
Vue.component("gz-custom-fields", customFieldsControl);
|
||||
Vue.component("gz-currency", currencyControl);
|
||||
Vue.component("gz-decimal", decimalControl);
|
||||
|
||||
@@ -1,21 +1,109 @@
|
||||
<template>
|
||||
<UnderConstruction />
|
||||
<gz-data-table
|
||||
formKey="adm-users"
|
||||
:dataListKey="dataListKey"
|
||||
:dataListFilter="dataListFilter"
|
||||
:dataListSort="dataListSort"
|
||||
:showSelect="false"
|
||||
:singleSelect="false"
|
||||
v-on:update:selected="handleSelected"
|
||||
>
|
||||
</gz-data-table>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import UnderConstruction from "../components/underconstruction.vue";
|
||||
|
||||
const FORM_KEY = "adm-users";
|
||||
export default {
|
||||
components: {
|
||||
UnderConstruction
|
||||
created() {
|
||||
this.rights = window.$gz.role.getRights(window.$gz.type.User);
|
||||
window.$gz.eventBus.$on("menu-click", clickHandler);
|
||||
generateMenu(this);
|
||||
},
|
||||
beforeCreate() {
|
||||
window.$gz.eventBus.$emit("menu-change", {
|
||||
isMain: true,
|
||||
icon: "fa-users",
|
||||
title: this.$ay.t("UserList"),
|
||||
helpUrl: "form-adm-users"
|
||||
});
|
||||
beforeDestroy() {
|
||||
window.$gz.eventBus.$off("menu-click", clickHandler);
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
currentListViewId: 1,
|
||||
dataListKey: "TestUserDataList", //maybe special admin version? More stuff on it
|
||||
dataListFilter: "",
|
||||
dataListSort: "",
|
||||
rights: window.$gz.role.defaultRightsObject()
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
handleSelected(selectedItems) {
|
||||
console.log(selectedItems);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/////////////////////////////
|
||||
//
|
||||
//
|
||||
function clickHandler(menuItem) {
|
||||
if (!menuItem) {
|
||||
return;
|
||||
}
|
||||
let m = window.$gz.menu.parseMenuItem(menuItem);
|
||||
if (m.owner == FORM_KEY && !m.disabled) {
|
||||
switch (m.key) {
|
||||
case "new":
|
||||
m.vm.$router.push({
|
||||
name: "user-edit",
|
||||
params: { recordid: 0 }
|
||||
});
|
||||
break;
|
||||
default:
|
||||
window.$gz.eventBus.$emit(
|
||||
"notify-warning",
|
||||
FORM_KEY + "::context click: [" + m.key + "]"
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////
|
||||
//
|
||||
//
|
||||
function generateMenu(vm) {
|
||||
let menuOptions = {
|
||||
isMain: true,
|
||||
icon: "fa-users",
|
||||
title: vm.$ay.t("UserList"),
|
||||
helpUrl: "form-adm-users",
|
||||
menuItems: [],
|
||||
formData: {
|
||||
ayaType: window.$gz.type.User
|
||||
}
|
||||
};
|
||||
|
||||
if (vm.rights.change) {
|
||||
menuOptions.menuItems.push({
|
||||
title: vm.$ay.t("New"),
|
||||
icon: "fa-plus",
|
||||
surface: true,
|
||||
key: FORM_KEY + ":new",
|
||||
vm: vm
|
||||
});
|
||||
}
|
||||
|
||||
//STUB REPORTS
|
||||
//Report not Print, print is a further option
|
||||
menuOptions.menuItems.push({
|
||||
title: vm.$ay.t("Report"),
|
||||
icon: "fa-file-alt",
|
||||
key: FORM_KEY + ":report",
|
||||
vm: vm
|
||||
});
|
||||
|
||||
menuOptions.menuItems.push({
|
||||
title: "stub: Last report used",
|
||||
icon: "fa-file-alt",
|
||||
key: FORM_KEY + ":report:STUBlastusedreportid",
|
||||
vm: vm
|
||||
});
|
||||
|
||||
window.$gz.eventBus.$emit("menu-change", menuOptions);
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -12,12 +12,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import GzDataTable from "../components/gz-data-table.vue";
|
||||
const FORM_KEY = "widget-list";
|
||||
export default {
|
||||
components: {
|
||||
GzDataTable
|
||||
},
|
||||
created() {
|
||||
this.rights = window.$gz.role.getRights(window.$gz.type.Widget);
|
||||
window.$gz.eventBus.$on("menu-click", clickHandler);
|
||||
|
||||
Reference in New Issue
Block a user