Last report implemented throughout

This commit is contained in:
2021-09-09 22:36:00 +00:00
parent 3fb25fce47
commit 130a6d5f03
104 changed files with 634 additions and 2169 deletions

View File

@@ -9,7 +9,7 @@
</gz-extensions>
<gz-data-table
ref="gzdatatable"
form-key="cust-users"
form-key="contact-users"
data-list-key="OutsideUserDataList"
:show-select="rights.read"
:reload="reload"
@@ -21,7 +21,7 @@
</template>
<script>
const FORM_KEY = "cust-users";
const FORM_KEY = "contact-users";
export default {
created() {
this.rights = window.$gz.role.getRights(window.$gz.type.User);
@@ -71,32 +71,16 @@ async function clickHandler(menuItem) {
}
break;
case "report":
if (m.id != null) {
//last report selected is in m.id
m.vm.$router.push({
name: "ay-report",
params: { recordid: m.id, ayatype: window.$gz.type.User }
});
} else {
//general report selector chosen
{
let res = await m.vm.$refs.reportSelector.open(
m.vm.$refs.gzdatatable.getDataListSelection(window.$gz.type.User)
m.vm.$refs.gzdatatable.getDataListSelection(window.$gz.type.User),
m.id
);
//if null for no selection
//just bail out
if (res == null) {
return;
}
//persist last report selected
window.$gz.form.setLastReport(FORM_KEY, res);
//Now open the report viewer...
m.vm.$router.push({
name: "ay-report",
params: { recordid: res.id, ayatype: window.$gz.type.User }
});
generateMenu(m.vm); //refresh the menu with the new report
}
break;
case "directnotify":
@@ -164,6 +148,7 @@ function generateMenu(vm) {
if (lastReport != null) {
menuOptions.menuItems.push({
title: lastReport.name,
notrans: true,
icon: "$ayiFileAlt",
key: FORM_KEY + ":report:" + lastReport.id,
vm: vm