This commit is contained in:
@@ -75,6 +75,8 @@ todo: Administration - Attached files manager
|
|||||||
Need a TID ui data type
|
Need a TID ui data type
|
||||||
change data-table ui column generator to support it
|
change data-table ui column generator to support it
|
||||||
look for email type 11 to find all the spots
|
look for email type 11 to find all the spots
|
||||||
|
way to implement is to include the two column names of the values to use as the tid column at server end
|
||||||
|
like the db table names but instead they are column names
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ export default {
|
|||||||
TrialSeeder: { Change: 16386, ReadFullRecord: 8193, Select: 0 },
|
TrialSeeder: { Change: 16386, ReadFullRecord: 8193, Select: 0 },
|
||||||
LogFile: { Change: 0, ReadFullRecord: 24576, Select: 0 },
|
LogFile: { Change: 0, ReadFullRecord: 24576, Select: 0 },
|
||||||
Backup: { Change: 16384, ReadFullRecord: 8195, Select: 0 },
|
Backup: { Change: 16384, ReadFullRecord: 8195, Select: 0 },
|
||||||
|
FileAttachment: { Change: 2, ReadFullRecord: 3, Select: 0 },
|
||||||
ServerJob: { Change: 16384, ReadFullRecord: 8195, Select: 0 },
|
ServerJob: { Change: 16384, ReadFullRecord: 8195, Select: 0 },
|
||||||
ServerMetrics: { Change: 16384, ReadFullRecord: 24576, Select: 0 },
|
ServerMetrics: { Change: 16384, ReadFullRecord: 24576, Select: 0 },
|
||||||
Translation: { Change: 16386, ReadFullRecord: 131071, Select: 0 },
|
Translation: { Change: 16386, ReadFullRecord: 131071, Select: 0 },
|
||||||
|
|||||||
@@ -1,21 +1,96 @@
|
|||||||
<template>
|
<template>
|
||||||
<UnderConstruction />
|
<gz-data-table
|
||||||
|
formKey="adm-attachments"
|
||||||
|
:dataListKey="dataListKey"
|
||||||
|
:dataListFilter="dataListFilter"
|
||||||
|
:dataListSort="dataListSort"
|
||||||
|
:showSelect="false"
|
||||||
|
:singleSelect="false"
|
||||||
|
v-on:update:selected="handleSelected"
|
||||||
|
>
|
||||||
|
</gz-data-table>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import UnderConstruction from "../components/underconstruction.vue";
|
const FORM_KEY = "adm-attachments";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
created() {
|
||||||
UnderConstruction
|
this.rights = window.$gz.role.getRights(window.$gz.type.FileAttachment);
|
||||||
|
window.$gz.eventBus.$on("menu-click", clickHandler);
|
||||||
|
generateMenu(this);
|
||||||
},
|
},
|
||||||
beforeCreate() {
|
beforeDestroy() {
|
||||||
window.$gz.eventBus.$emit("menu-change", {
|
window.$gz.eventBus.$off("menu-click", clickHandler);
|
||||||
isMain: true,
|
},
|
||||||
icon: "fa-folder",
|
data() {
|
||||||
title: "Attachments",
|
return {
|
||||||
helpUrl: "form-adm-attachments"
|
currentListViewId: 1,
|
||||||
});
|
dataListKey: "AttachmentDataList",
|
||||||
|
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: "widget-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-folder",
|
||||||
|
title: "Attachments",
|
||||||
|
helpUrl: "form-adm-attachments",
|
||||||
|
menuItems: []
|
||||||
|
};
|
||||||
|
|
||||||
|
//STUB REPORTS
|
||||||
|
//Report not Print, print is a further option
|
||||||
|
menuOptions.menuItems.push({
|
||||||
|
title: "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>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user