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"
:options="options"
ref="vueTable"
@row-click="onRowClick"
>
<div slot="info" slot-scope="props">
<b-icon
@@ -88,7 +89,6 @@ import AdvancedFilter from "../components/search/AdvancedFilter";
import TaskCell from "../components/vuetable/TaskCell.vue";
import ModalComments from "./modal/ModalComments.vue";
import api from "./../api/index";
import { Event } from "vue-tables-2";
export default {
name: "AdvancedSearch",
@@ -120,7 +120,6 @@ export default {
},
},
columns: [
"info",
"case_number",
"case_title",
"process_name",
@@ -159,7 +158,9 @@ export default {
},
customFilters: ["myfilter"],
},
pmDateFormat: window.config.FORMATS.dateFormat
pmDateFormat: window.config.FORMATS.dateFormat,
clickCount: 0,
singleClickTimer: null
};
},
watch: {
@@ -168,6 +169,23 @@ export default {
},
},
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
*/

View File

@@ -13,6 +13,7 @@
:columns="columns"
:options="options"
ref="vueTable"
@row-click="onRowClick"
>
<div slot="detail" slot-scope="props">
<div class="btn-default" @click="openCaseDetail(props.row)">
@@ -101,6 +102,8 @@ export default {
},
},
pmDateFormat: "Y-m-d H:i:s",
clickCount: 0,
singleClickTimer: null
};
},
mounted() {},
@@ -116,6 +119,23 @@ export default {
updated() {},
beforeCreate() {},
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
*/

View File

@@ -15,6 +15,7 @@
:columns="columns"
:options="options"
ref="vueTable"
@row-click="onRowClick"
>
<div slot="detail" slot-scope="props">
<div class="btn-default" @click="openCaseDetail(props.row)">
@@ -89,7 +90,6 @@ export default {
},
},
columns: [
"detail",
"case_number",
"case_title",
"process_name",
@@ -127,7 +127,9 @@ export default {
},
},
translations: null,
pmDateFormat: window.config.FORMATS.dateFormat
pmDateFormat: window.config.FORMATS.dateFormat,
clickCount: 0,
singleClickTimer: null
};
},
mounted() {
@@ -150,6 +152,23 @@ export default {
updated() {},
beforeCreate() {},
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
*
@@ -373,32 +392,6 @@ export default {
}
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
* @param {*} response

View File

@@ -13,6 +13,7 @@
:columns="columns"
:options="options"
ref="vueTable"
@row-click="onRowClick"
>
<div slot="detail" slot-scope="props">
<div class="btn-default" @click="openCaseDetail(props.row)">
@@ -132,6 +133,8 @@ export default {
},
},
pmDateFormat: "Y-m-d H:i:s",
clickCount: 0,
singleClickTimer: null
};
},
mounted() {},
@@ -147,6 +150,23 @@ export default {
updated() {},
beforeCreate() {},
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
*/

View File

@@ -13,6 +13,7 @@
:columns="columns"
:options="options"
ref="vueTable"
@row-click="onRowClick"
>
<div slot="detail" slot-scope="props">
<div class="btn-default" @click="openCaseDetail(props.row)">
@@ -124,6 +125,8 @@ export default {
},
},
pmDateFormat: "Y-m-d H:i:s",
clickCount: 0,
singleClickTimer: null
};
},
mounted() {},
@@ -139,6 +142,23 @@ export default {
updated() {},
beforeCreate() {},
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
*/

View File

@@ -13,6 +13,7 @@
:columns="columns"
:options="options"
ref="vueTable"
@row-click="onRowClick"
>
<div slot="detail" slot-scope="props">
<div class="btn-default" @click="openCaseDetail(props.row)">
@@ -129,6 +130,8 @@ export default {
},
},
pmDateFormat: "Y-m-d H:i:s",
clickCount: 0,
singleClickTimer: null
};
},
mounted() {},
@@ -144,6 +147,23 @@ export default {
updated() {},
beforeCreate() {},
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
*/