PMCORE-2691: Case detail is not opened from 'My Cases' option

add dblclick to advanced search

complete double click for all lists
This commit is contained in:
Rodrigo Quelca
2021-01-12 20:55:14 +00:00
parent 3c13ad12c8
commit ba94e6867a
6 changed files with 122 additions and 31 deletions

View File

@@ -30,6 +30,7 @@
:columns="columns" :columns="columns"
:options="options" :options="options"
ref="vueTable" ref="vueTable"
@row-click="onRowClick"
> >
<div slot="info" slot-scope="props"> <div slot="info" slot-scope="props">
<b-icon <b-icon
@@ -88,7 +89,6 @@ import AdvancedFilter from "../components/search/AdvancedFilter";
import TaskCell from "../components/vuetable/TaskCell.vue"; import TaskCell from "../components/vuetable/TaskCell.vue";
import ModalComments from "./modal/ModalComments.vue"; import ModalComments from "./modal/ModalComments.vue";
import api from "./../api/index"; import api from "./../api/index";
import { Event } from "vue-tables-2";
export default { export default {
name: "AdvancedSearch", name: "AdvancedSearch",
@@ -120,7 +120,6 @@ export default {
}, },
}, },
columns: [ columns: [
"info",
"case_number", "case_number",
"case_title", "case_title",
"process_name", "process_name",
@@ -159,7 +158,9 @@ export default {
}, },
customFilters: ["myfilter"], customFilters: ["myfilter"],
}, },
pmDateFormat: window.config.FORMATS.dateFormat pmDateFormat: window.config.FORMATS.dateFormat,
clickCount: 0,
singleClickTimer: null
}; };
}, },
watch: { watch: {
@@ -168,6 +169,23 @@ export default {
}, },
}, },
methods: { methods: {
/**
* Row click event handler
* @param {object} event
*/
onRowClick(event) {
let self = this;
self.clickCount += 1;
if (self.clickCount === 1) {
self.singleClickTimer = setTimeout(function() {
self.clickCount = 0;
}, 400);
} else if (self.clickCount === 2) {
clearTimeout(self.singleClickTimer);
self.clickCount = 0;
self.openCaseDetail(event.row);
}
},
/** /**
* Get cases data by header * Get cases data by header
*/ */

View File

@@ -13,6 +13,7 @@
:columns="columns" :columns="columns"
:options="options" :options="options"
ref="vueTable" ref="vueTable"
@row-click="onRowClick"
> >
<div slot="detail" slot-scope="props"> <div slot="detail" slot-scope="props">
<div class="btn-default" @click="openCaseDetail(props.row)"> <div class="btn-default" @click="openCaseDetail(props.row)">
@@ -101,6 +102,8 @@ export default {
}, },
}, },
pmDateFormat: "Y-m-d H:i:s", pmDateFormat: "Y-m-d H:i:s",
clickCount: 0,
singleClickTimer: null
}; };
}, },
mounted() {}, mounted() {},
@@ -116,6 +119,23 @@ export default {
updated() {}, updated() {},
beforeCreate() {}, beforeCreate() {},
methods: { methods: {
/**
* On row click event handler
* @param {object} event
*/
onRowClick(event) {
let self = this;
self.clickCount += 1;
if (self.clickCount === 1) {
self.singleClickTimer = setTimeout(function() {
self.clickCount = 0;
}, 400);
} else if (self.clickCount === 2) {
clearTimeout(self.singleClickTimer);
self.clickCount = 0;
self.openCase(event.row);
}
},
/** /**
* Get cases todo data * Get cases todo data
*/ */

View File

@@ -15,6 +15,7 @@
:columns="columns" :columns="columns"
:options="options" :options="options"
ref="vueTable" ref="vueTable"
@row-click="onRowClick"
> >
<div slot="detail" slot-scope="props"> <div slot="detail" slot-scope="props">
<div class="btn-default" @click="openCaseDetail(props.row)"> <div class="btn-default" @click="openCaseDetail(props.row)">
@@ -89,7 +90,6 @@ export default {
}, },
}, },
columns: [ columns: [
"detail",
"case_number", "case_number",
"case_title", "case_title",
"process_name", "process_name",
@@ -127,7 +127,9 @@ export default {
}, },
}, },
translations: null, translations: null,
pmDateFormat: window.config.FORMATS.dateFormat pmDateFormat: window.config.FORMATS.dateFormat,
clickCount: 0,
singleClickTimer: null
}; };
}, },
mounted() { mounted() {
@@ -150,6 +152,23 @@ export default {
updated() {}, updated() {},
beforeCreate() {}, beforeCreate() {},
methods: { methods: {
/**
* Row click event handler
* @param {object} event
*/
onRowClick(event) {
let self = this;
self.clickCount += 1;
if (self.clickCount === 1) {
self.singleClickTimer = setTimeout(function() {
self.clickCount = 0;
}, 400);
} else if (self.clickCount === 2) {
clearTimeout(self.singleClickTimer);
self.clickCount = 0;
self.openCaseDetail(event.row);
}
},
/** /**
* Open case detail * Open case detail
* *
@@ -373,32 +392,6 @@ export default {
} }
return dateToConvert; return dateToConvert;
}, },
/**
* Open selected cases in the inbox
*
* @param {object} item
*/
openCase(item) {
const action = "todo";
if (this.isIE) {
window.open(
"../../../cases/open?APP_UID=" +
item.row.APP_UID +
"&DEL_INDEX=" +
item.row.DEL_INDEX +
"&action=" +
action
);
} else {
window.location.href =
"../../../cases/open?APP_UID=" +
item.row.APP_UID +
"&DEL_INDEX=" +
item.row.DEL_INDEX +
"&action=" +
action;
}
},
/** /**
* Format Response from HEADERS * Format Response from HEADERS
* @param {*} response * @param {*} response

View File

@@ -13,6 +13,7 @@
:columns="columns" :columns="columns"
:options="options" :options="options"
ref="vueTable" ref="vueTable"
@row-click="onRowClick"
> >
<div slot="detail" slot-scope="props"> <div slot="detail" slot-scope="props">
<div class="btn-default" @click="openCaseDetail(props.row)"> <div class="btn-default" @click="openCaseDetail(props.row)">
@@ -132,6 +133,8 @@ export default {
}, },
}, },
pmDateFormat: "Y-m-d H:i:s", pmDateFormat: "Y-m-d H:i:s",
clickCount: 0,
singleClickTimer: null
}; };
}, },
mounted() {}, mounted() {},
@@ -147,6 +150,23 @@ export default {
updated() {}, updated() {},
beforeCreate() {}, beforeCreate() {},
methods: { methods: {
/**
* On row click event handler
* @param {object} event
*/
onRowClick(event) {
let self = this;
self.clickCount += 1;
if (self.clickCount === 1) {
self.singleClickTimer = setTimeout(function() {
self.clickCount = 0;
}, 400);
} else if (self.clickCount === 2) {
clearTimeout(self.singleClickTimer);
self.clickCount = 0;
self.showModalUnpauseCase(event.row);
}
},
/** /**
* Get cases todo data * Get cases todo data
*/ */

View File

@@ -13,6 +13,7 @@
:columns="columns" :columns="columns"
:options="options" :options="options"
ref="vueTable" ref="vueTable"
@row-click="onRowClick"
> >
<div slot="detail" slot-scope="props"> <div slot="detail" slot-scope="props">
<div class="btn-default" @click="openCaseDetail(props.row)"> <div class="btn-default" @click="openCaseDetail(props.row)">
@@ -124,6 +125,8 @@ export default {
}, },
}, },
pmDateFormat: "Y-m-d H:i:s", pmDateFormat: "Y-m-d H:i:s",
clickCount: 0,
singleClickTimer: null
}; };
}, },
mounted() {}, mounted() {},
@@ -139,6 +142,23 @@ export default {
updated() {}, updated() {},
beforeCreate() {}, beforeCreate() {},
methods: { methods: {
/**
* On row click event handler
* @param {object} event
*/
onRowClick(event) {
let self = this;
self.clickCount += 1;
if (self.clickCount === 1) {
self.singleClickTimer = setTimeout(function() {
self.clickCount = 0;
}, 400);
} else if (self.clickCount === 2) {
clearTimeout(self.singleClickTimer);
self.clickCount = 0;
self.openCase(event.row);
}
},
/** /**
* Get cases todo data * Get cases todo data
*/ */

View File

@@ -13,6 +13,7 @@
:columns="columns" :columns="columns"
:options="options" :options="options"
ref="vueTable" ref="vueTable"
@row-click="onRowClick"
> >
<div slot="detail" slot-scope="props"> <div slot="detail" slot-scope="props">
<div class="btn-default" @click="openCaseDetail(props.row)"> <div class="btn-default" @click="openCaseDetail(props.row)">
@@ -129,6 +130,8 @@ export default {
}, },
}, },
pmDateFormat: "Y-m-d H:i:s", pmDateFormat: "Y-m-d H:i:s",
clickCount: 0,
singleClickTimer: null
}; };
}, },
mounted() {}, mounted() {},
@@ -144,6 +147,23 @@ export default {
updated() {}, updated() {},
beforeCreate() {}, beforeCreate() {},
methods: { methods: {
/**
* On row click event handler
* @param {object} event
*/
onRowClick(event) {
let self = this;
self.clickCount += 1;
if (self.clickCount === 1) {
self.singleClickTimer = setTimeout(function() {
self.clickCount = 0;
}, 400);
} else if (self.clickCount === 2) {
clearTimeout(self.singleClickTimer);
self.clickCount = 0;
self.claimCase(event.row);
}
},
/** /**
* Get cases unassigned data * Get cases unassigned data
*/ */