Merged in feature/PMCORE-2515_C (pull request #7606)
PMCORE-2515 Approved-by: Henry Jonathan Quispe Quispe
This commit is contained in:
@@ -61,7 +61,10 @@ const services = {
|
||||
DRAFT_LIST: "/home/draft",
|
||||
PAUSED_LIST: "/home/paused",
|
||||
UNASSIGNED_LIST: "/home/unassigned",
|
||||
|
||||
MY_FILTERS: "/cases/advanced-search/filters",
|
||||
POST_MY_FILTERS: "/cases/advanced-search/filter",
|
||||
DELETE_MY_FILTERS: "/cases/advanced-search/filter/",
|
||||
SEARCH: "/home/search",
|
||||
};
|
||||
|
||||
export default {
|
||||
@@ -135,5 +138,48 @@ export default {
|
||||
"Authorization": `Bearer ` + credentials.accessToken
|
||||
}
|
||||
});
|
||||
},
|
||||
post(options) {
|
||||
let service = options.service || "",
|
||||
params = options.params || {},
|
||||
data = options.data || {},
|
||||
keys = options.keys || {},
|
||||
url,
|
||||
credentials = window.config.SYS_CREDENTIALS,
|
||||
workspace = window.config.SYS_WORKSPACE,
|
||||
server = window.config.SYS_SERVER;
|
||||
url = this.getUrl(_.extend(keys, credentials, { server }, { workspace }), service);
|
||||
|
||||
return axios({
|
||||
method: "post",
|
||||
url: url,
|
||||
params,
|
||||
data,
|
||||
headers: {
|
||||
"Accept": "application/json",
|
||||
"Content-Type": "application/json",
|
||||
"Authorization": `Bearer ` + credentials.accessToken
|
||||
}
|
||||
});
|
||||
},
|
||||
delete(options) {
|
||||
let service = options.service || "",
|
||||
id = options.id || {},
|
||||
keys = options.keys || {},
|
||||
url,
|
||||
credentials = window.config.SYS_CREDENTIALS,
|
||||
workspace = window.config.SYS_WORKSPACE,
|
||||
server = window.config.SYS_SERVER;
|
||||
url = this.getUrl(_.extend(keys, credentials, { server }, { workspace }), service);
|
||||
|
||||
return axios({
|
||||
method: "delete",
|
||||
url: url + id,
|
||||
headers: {
|
||||
"Accept": "application/json",
|
||||
"Content-Type": "application/json",
|
||||
"Authorization": `Bearer ` + credentials.accessToken
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -118,14 +118,31 @@ export let cases = {
|
||||
window.config.SYS_URI +
|
||||
`cases/ajaxListener`, params);
|
||||
},
|
||||
//remove this section
|
||||
search(data) {
|
||||
return new Promise((resolutionFunc, rejectionFunc) => {
|
||||
|
||||
resolutionFunc(startedCasesFaker);
|
||||
|
||||
});
|
||||
/**
|
||||
* Service to jump a case by it's number
|
||||
* @param {object} dt
|
||||
*/
|
||||
jump(dt) {
|
||||
var params = new URLSearchParams();
|
||||
params.append('action', 'previusJump');
|
||||
params.append('appNumber', dt.APP_NUMBER);
|
||||
params.append('actionFromList', dt.ACTION_FROM_LIST);
|
||||
return axios.post(window.config.SYS_SERVER +
|
||||
window.config.SYS_URI +
|
||||
`cases/cases_Ajax.php`, params);
|
||||
},
|
||||
/**
|
||||
* Make a search request to the Api service
|
||||
* @param {object} dt - filter parameters
|
||||
*/
|
||||
search(dt) {
|
||||
return Api.get({
|
||||
service: "SEARCH",
|
||||
params: dt,
|
||||
keys: {}
|
||||
})
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
export let casesHeader = {
|
||||
|
||||
68
resources/assets/js/api/Filters.js
Normal file
68
resources/assets/js/api/Filters.js
Normal file
@@ -0,0 +1,68 @@
|
||||
import axios from "axios";
|
||||
import Api from "./Api.js";
|
||||
export let filters = {
|
||||
get(data) {
|
||||
return Api.get({
|
||||
service: "MY_FILTERS",
|
||||
params: {
|
||||
filter: data.params,
|
||||
},
|
||||
keys: {},
|
||||
});
|
||||
},
|
||||
post(data) {
|
||||
return Api.post({
|
||||
service: "POST_MY_FILTERS",
|
||||
data,
|
||||
keys: {},
|
||||
});
|
||||
},
|
||||
delete(data) {
|
||||
return Api.delete({
|
||||
service: "DELETE_MY_FILTERS",
|
||||
|
||||
id: data.id,
|
||||
|
||||
keys: {},
|
||||
});
|
||||
},
|
||||
/**
|
||||
* Service to generate a jump case URL
|
||||
*/
|
||||
jumpCase() {
|
||||
var params = new URLSearchParams();
|
||||
params.append("action", "startCase");
|
||||
return axios.post(
|
||||
window.config.SYS_SERVER +
|
||||
window.config.SYS_URI +
|
||||
`cases/casesStartPage_Ajax.php`,
|
||||
params
|
||||
);
|
||||
},
|
||||
/**
|
||||
* Service to get the process list
|
||||
*/
|
||||
processList(query) {
|
||||
return axios.post(
|
||||
window.config.SYS_SERVER +
|
||||
window.config.SYS_URI +
|
||||
`cases/casesList_Ajax?actionAjax=processListExtJs&action=search`,
|
||||
{
|
||||
query,
|
||||
}
|
||||
);
|
||||
},
|
||||
/**
|
||||
* Service to get the users list
|
||||
*/
|
||||
userValues(query) {
|
||||
return axios.post(
|
||||
window.config.SYS_SERVER +
|
||||
window.config.SYS_URI +
|
||||
`cases/casesList_Ajax?actionAjax=userValues&action=search`,
|
||||
{
|
||||
query,
|
||||
}
|
||||
);
|
||||
},
|
||||
};
|
||||
@@ -4,6 +4,7 @@ import { cases, casesHeader } from "./Cases";
|
||||
|
||||
import { caseNotes } from "./CaseNotes";
|
||||
import { process } from "./Process";
|
||||
import { filters } from "./Filters";
|
||||
|
||||
|
||||
export default {
|
||||
@@ -11,5 +12,6 @@ export default {
|
||||
cases,
|
||||
casesHeader,
|
||||
process,
|
||||
caseNotes
|
||||
caseNotes,
|
||||
filters
|
||||
};
|
||||
@@ -20,13 +20,12 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import api from "./../../api/index";
|
||||
|
||||
export default {
|
||||
name: "CustomSidebar",
|
||||
props: ['menu'],
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
collapsed: false,
|
||||
isOnMobile: false,
|
||||
hideToggle: true,
|
||||
@@ -44,14 +43,7 @@ export default {
|
||||
mounted() {
|
||||
this.onResize();
|
||||
window.addEventListener("resize", this.onResize);
|
||||
api.menu
|
||||
.get()
|
||||
.then((response) => {
|
||||
this.menu = response;
|
||||
})
|
||||
.catch((e) => {
|
||||
console.error(e);
|
||||
});
|
||||
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,8 +2,10 @@
|
||||
<div>
|
||||
<SearchPopover
|
||||
:target="tag"
|
||||
:showPopover="showPopover"
|
||||
@closePopover="onClose"
|
||||
@savePopover="onOk"
|
||||
:title="info.title"
|
||||
>
|
||||
<template v-slot:target-item>
|
||||
<div @click="onClickTag(tag)" :id="tag">
|
||||
@@ -12,26 +14,22 @@
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:body>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<input
|
||||
v-model="from"
|
||||
type="text"
|
||||
size="210"
|
||||
class="form-control"
|
||||
placeholder="From Case number #"
|
||||
/>
|
||||
</div>
|
||||
<div class="col">
|
||||
<input
|
||||
v-model="to"
|
||||
type="text"
|
||||
size="210"
|
||||
class="form-control"
|
||||
placeholder="To Case number # (Optional)"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<p>{{ info.detail }}</p>
|
||||
<form ref="form" @submit.stop.prevent="handleSubmit">
|
||||
<b-form-group
|
||||
:state="valueState"
|
||||
label-for="name-input"
|
||||
:invalid-feedback="$t('ID_INVALID_CASE_NUMBER_RANGE')"
|
||||
>
|
||||
<b-form-input
|
||||
id="name-input"
|
||||
v-model="value"
|
||||
:placeholder="$t('ID_CASE_NUMBER_FILTER_EG')"
|
||||
:state="valueState"
|
||||
required
|
||||
></b-form-input>
|
||||
</b-form-group>
|
||||
</form>
|
||||
</template>
|
||||
</SearchPopover>
|
||||
</div>
|
||||
@@ -47,26 +45,46 @@ export default {
|
||||
props: ["tag", "info"],
|
||||
data() {
|
||||
return {
|
||||
from: "",
|
||||
to: "",
|
||||
value: "",
|
||||
valueState: null,
|
||||
showPopover: false,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
tagText: function() {
|
||||
return `From: ${this.from} To: ${this.to}`;
|
||||
return `${this.$i18n.t("ID_IUD")}: ${this.value} `;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
onClose() {},
|
||||
onOk() {
|
||||
this.$emit("updateSearchTag", { from: this.from, to: this.to });
|
||||
onClose() {
|
||||
this.showPopover = true;
|
||||
},
|
||||
checkFormValidity() {
|
||||
const regex = /^((\d+?)|(\d+?)(?:\-(\d+?))?)(?:\, ((\d+?)|(\d+?)(?:\-(\d+?))?))*$/;
|
||||
regex.test(this.value);
|
||||
this.valueState = regex.test(this.value);
|
||||
return this.valueState;
|
||||
},
|
||||
handleSubmit() {
|
||||
let self = this;
|
||||
// Exit when the form isn't valid
|
||||
if (!this.checkFormValidity()) {
|
||||
return;
|
||||
}
|
||||
// Hide the modal manually
|
||||
this.$nextTick(() => {
|
||||
this.$emit("updateSearchTag", {
|
||||
filterCases: self.value.replace(/ /g, ""),
|
||||
});
|
||||
self.$root.$emit("bv::hide::popover");
|
||||
});
|
||||
},
|
||||
onOk() {
|
||||
this.handleSubmit();
|
||||
},
|
||||
onRemoveTag() {},
|
||||
onClickTag(tag) {
|
||||
this.$root.$emit("bv::hide::popover");
|
||||
},
|
||||
handler() {
|
||||
},
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
<template>
|
||||
<div id="">
|
||||
<SearchPopover
|
||||
:target="tag"
|
||||
@closePopover="onClose"
|
||||
@savePopover="onOk"
|
||||
>
|
||||
<SearchPopover :target="tag" @savePopover="onOk" :title="info.title">
|
||||
<template v-slot:target-item>
|
||||
<div @click="onClickTag(tag)" :id="tag">
|
||||
<b-icon icon="tags-fill" font-scale="1"></b-icon>
|
||||
@@ -12,7 +8,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:body>
|
||||
<h6>{{ info.title }}</h6>
|
||||
<p>{{ info.detail }}</p>
|
||||
<b-form-group :label="info.label">
|
||||
<b-form-checkbox
|
||||
v-for="option in info.options"
|
||||
@@ -45,20 +41,34 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
tagText: function() {
|
||||
return `Priority: `;
|
||||
return `${this.$i18n.t('ID_PRIORITY')}: ${this.selected.join(",")}`;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
onClose() {
|
||||
},
|
||||
/**
|
||||
* Ok button handler
|
||||
*/
|
||||
onOk() {
|
||||
|
||||
this.handleSubmit();
|
||||
},
|
||||
onRemoveTag() {},
|
||||
/**
|
||||
* Submit button handler
|
||||
*/
|
||||
handleSubmit() {
|
||||
this.$nextTick(() => {
|
||||
this.$emit("updateSearchTag", {
|
||||
priorities: this.selected.join(","),
|
||||
});
|
||||
this.$root.$emit("bv::hide::popover");
|
||||
});
|
||||
},
|
||||
/**
|
||||
* Tag Click handler
|
||||
*/
|
||||
onClickTag(tag) {
|
||||
this.$root.$emit("bv::hide::popover");
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped></style>
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<div id="">
|
||||
<SearchPopover
|
||||
:target="tag"
|
||||
@closePopover="onClose"
|
||||
@savePopover="onOk"
|
||||
:title="info.title"
|
||||
>
|
||||
<template v-slot:target-item>
|
||||
<div @click="onClickTag(tag)" :id="tag">
|
||||
@@ -12,7 +12,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:body>
|
||||
<h6>{{ info.title }}</h6>
|
||||
<h6>{{ info.detail }}</h6>
|
||||
<b-form-group :label="info.label">
|
||||
<b-form-checkbox
|
||||
v-for="option in info.options"
|
||||
@@ -45,20 +45,34 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
tagText: function() {
|
||||
return `Case Status: `;
|
||||
return `${this.$i18n.t('ID_STATUS')}: ${this.selected.join(",")}`;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
onClose() {
|
||||
},
|
||||
/**
|
||||
* Ok button handler
|
||||
*/
|
||||
onOk() {
|
||||
|
||||
this.handleSubmit();
|
||||
},
|
||||
onRemoveTag() {},
|
||||
/**
|
||||
* Submit button handler
|
||||
*/
|
||||
handleSubmit() {
|
||||
this.$nextTick(() => {
|
||||
this.$emit("updateSearchTag", {
|
||||
caseStatuses: this.selected.join(","),
|
||||
});
|
||||
this.$root.$emit("bv::hide::popover");
|
||||
});
|
||||
},
|
||||
/**
|
||||
* Tag Click handler
|
||||
*/
|
||||
onClickTag(tag) {
|
||||
this.$root.$emit("bv::hide::popover");
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped></style>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
:target="tag"
|
||||
@closePopover="onClose"
|
||||
@savePopover="onOk"
|
||||
:title="info.title"
|
||||
>
|
||||
<template v-slot:target-item>
|
||||
<div @click="onClickTag(tag)" :id="tag">
|
||||
@@ -12,14 +13,22 @@
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:body>
|
||||
<h6>Filter: Case Title</h6>
|
||||
<input
|
||||
v-model="title"
|
||||
type="text"
|
||||
size="150"
|
||||
class="form-control"
|
||||
placeholder="Case Title Name"
|
||||
/>
|
||||
<p>{{ info.detail }}</p>
|
||||
<form ref="form" @submit.stop.prevent="handleSubmit">
|
||||
<b-form-group
|
||||
:state="valueState"
|
||||
label-for="name-input"
|
||||
:invalid-feedback="$t('ID_REQUIRED_FIELD')"
|
||||
>
|
||||
<b-form-input
|
||||
id="name-input"
|
||||
v-model="title"
|
||||
:placeholder="$t('ID_CASE_TITLE_NAME')"
|
||||
:state="valueState"
|
||||
required
|
||||
></b-form-input>
|
||||
</b-form-group>
|
||||
</form>
|
||||
</template>
|
||||
</SearchPopover>
|
||||
</div>
|
||||
@@ -36,25 +45,50 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
title: "",
|
||||
valueState: null,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
tagText: function() {
|
||||
return `Case: ${this.title}`;
|
||||
return `${this.$i18n.t("ID_CASE_TITLE")}: ${this.title}`;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
onClose() {
|
||||
/**
|
||||
* Check the form validations and requiered fields
|
||||
*/
|
||||
checkFormValidity() {
|
||||
const valid = this.$refs.form.checkValidity();
|
||||
this.valueState = valid;
|
||||
return valid;
|
||||
},
|
||||
onOk() {
|
||||
this.$emit("updateSearchTag", {
|
||||
columnSearch: "APP_TITLE",
|
||||
search: this.title,
|
||||
/**
|
||||
* Submit form handler
|
||||
*/
|
||||
handleSubmit() {
|
||||
let self = this;
|
||||
// Exit when the form isn't valid
|
||||
if (!this.checkFormValidity()) {
|
||||
return;
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.$emit("updateSearchTag", {
|
||||
caseTitle: self.title,
|
||||
});
|
||||
self.$root.$emit("bv::hide::popover");
|
||||
});
|
||||
},
|
||||
onRemoveTag() {},
|
||||
/**
|
||||
* On ok event handler
|
||||
*/
|
||||
onOk() {
|
||||
this.handleSubmit();
|
||||
},
|
||||
/**
|
||||
* On ok event handler
|
||||
*/
|
||||
onClickTag(tag) {
|
||||
this.$root.$emit("bv::hide::popover");
|
||||
this.$root.$emit("bv::hide::popover");
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
117
resources/assets/js/components/search/popovers/CurrentUser.vue
Normal file
117
resources/assets/js/components/search/popovers/CurrentUser.vue
Normal file
@@ -0,0 +1,117 @@
|
||||
<template>
|
||||
<div id="">
|
||||
<SearchPopover
|
||||
:target="tag"
|
||||
@savePopover="onOk"
|
||||
:title="info.title"
|
||||
>
|
||||
<template v-slot:target-item>
|
||||
<div @click="onClickTag(tag)" :id="tag">
|
||||
<b-icon icon="tags-fill" font-scale="1"></b-icon>
|
||||
{{ tagText }}
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:body>
|
||||
<p>{{ info.detail }}</p>
|
||||
<form ref="form" @submit.stop.prevent="handleSubmit">
|
||||
<b-form-group
|
||||
:state="valueState"
|
||||
label-for="name"
|
||||
:invalid-feedback="$t('ID_PROCESS_IS_REQUIRED')"
|
||||
>
|
||||
<vue-bootstrap-typeahead
|
||||
class="mb-4"
|
||||
id="name"
|
||||
v-model="query"
|
||||
:minMatchingChars="minMatchingChars"
|
||||
:data="users"
|
||||
:serializer="(item) => item.USR_FULLNAME"
|
||||
|
||||
:placeholder="info.placeholder"
|
||||
required
|
||||
:state="valueState"
|
||||
/>
|
||||
</b-form-group>
|
||||
</form>
|
||||
</template>
|
||||
</SearchPopover>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import SearchPopover from "./SearchPopover.vue";
|
||||
import VueBootstrapTypeahead from "vue-bootstrap-typeahead";
|
||||
import api from "./../../../api/index";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
SearchPopover,
|
||||
VueBootstrapTypeahead
|
||||
},
|
||||
props: ["tag", "info"],
|
||||
data() {
|
||||
return {
|
||||
minMatchingChars: 1,
|
||||
query: "",
|
||||
users: [],
|
||||
valueState: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
tagText: function() {
|
||||
return `${this.$i18n.t('ID_USER')}: ${this.query}`;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
query(newQuery) {
|
||||
api.filters
|
||||
.userValues(this.query)
|
||||
.then((response) => {
|
||||
this.users = response.data;
|
||||
})
|
||||
.catch((e) => {
|
||||
console.error(err);
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* Form validations review
|
||||
*/
|
||||
checkFormValidity() {
|
||||
const valid = this.query !== "";
|
||||
this.valueState = valid;
|
||||
return valid;
|
||||
},
|
||||
/**
|
||||
* On Ok event handler
|
||||
*/
|
||||
onOk() {
|
||||
this.handleSubmit();
|
||||
},
|
||||
/**
|
||||
* Form submit handler
|
||||
*/
|
||||
handleSubmit() {
|
||||
// Exit when the form isn't valid
|
||||
if (!this.checkFormValidity()) {
|
||||
return;
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
let user = _.find(this.users, { USR_FULLNAME: this.query });
|
||||
this.$emit("updateSearchTag", {
|
||||
userId: user.USR_UID
|
||||
});
|
||||
this.$root.$emit("bv::hide::popover");
|
||||
});
|
||||
},
|
||||
/**
|
||||
* Cick tag event handler
|
||||
*/
|
||||
onClickTag() {
|
||||
this.$root.$emit("bv::hide::popover");
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped></style>
|
||||
@@ -1,78 +1,87 @@
|
||||
<template>
|
||||
<div id="">
|
||||
<SearchPopover
|
||||
<SearchPopover
|
||||
:target="tag"
|
||||
@closePopover="onClose"
|
||||
@savePopover="onOk"
|
||||
:title="info.title"
|
||||
>
|
||||
<template v-slot:target-item>
|
||||
<div
|
||||
@click="onClickTag(tag)"
|
||||
:id="tag"
|
||||
>
|
||||
<b-icon
|
||||
icon="tags-fill"
|
||||
font-scale="1"
|
||||
></b-icon>
|
||||
{{
|
||||
tagText
|
||||
}}
|
||||
<div @click="onClickTag(tag)" :id="tag">
|
||||
<b-icon icon="tags-fill" font-scale="1"></b-icon>
|
||||
{{ tagText }}
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:body>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<b-form-datepicker id="from" v-model="from" placeholder="From Due Date"></b-form-datepicker>
|
||||
<p>{{ info.detail }}</p>
|
||||
<form ref="form" @submit.stop.prevent="handleSubmit">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<b-form-group >
|
||||
<b-form-datepicker
|
||||
id="from"
|
||||
v-model="from"
|
||||
:placeholder="$t('ID_FROM_DUE_DATE')"
|
||||
></b-form-datepicker>
|
||||
</b-form-group>
|
||||
</div>
|
||||
<div class="col">
|
||||
<b-form-group>
|
||||
<b-form-datepicker
|
||||
id="to"
|
||||
v-model="to"
|
||||
:placeholder="$t('ID_TO_DUE_DATE')"
|
||||
></b-form-datepicker>
|
||||
</b-form-group>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<b-form-datepicker id="to" v-model="to" placeholder="To Due Date"></b-form-datepicker>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</template>
|
||||
</SearchPopover>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import SearchPopover from "./SearchPopover.vue";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
SearchPopover,
|
||||
export default {
|
||||
components: {
|
||||
SearchPopover,
|
||||
},
|
||||
props: ["tag", "info"],
|
||||
data() {
|
||||
return {
|
||||
from: "",
|
||||
to: ""
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
tagText: function() {
|
||||
return `${this.$i18n.t('ID_FROM')}: ${this.from} ${this.$i18n.t('ID_TO')}: ${this.to}`;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* Submit form handler
|
||||
*/
|
||||
handleSubmit() {
|
||||
this.$emit("updateSearchTag", {
|
||||
dueDateFrom: this.from,
|
||||
dueDateTo: this.to,
|
||||
});
|
||||
},
|
||||
props: ['tag','info'],
|
||||
data() {
|
||||
return {
|
||||
from: "",
|
||||
to: ""
|
||||
};
|
||||
/**
|
||||
* On ok event handler
|
||||
*/
|
||||
onOk() {
|
||||
this.handleSubmit();
|
||||
},
|
||||
computed: {
|
||||
tagText: function() {
|
||||
return `From: ${this.from} To: ${this.to}`;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
onClose() {
|
||||
// this.popoverShow = false;
|
||||
// this.$emit("closePopover");
|
||||
},
|
||||
onOk() {
|
||||
this.$emit("updateSearchTag", {
|
||||
columnSearch: "APP_TITLE",
|
||||
search: null,
|
||||
dateFrom: this.from,
|
||||
dateTo: this.to
|
||||
});
|
||||
},
|
||||
onClickTag(tag) {
|
||||
this.$root.$emit("bv::hide::popover");
|
||||
}
|
||||
|
||||
},
|
||||
};
|
||||
/**
|
||||
* On click tag event handler
|
||||
*/
|
||||
onClickTag(tag) {
|
||||
this.$root.$emit("bv::hide::popover");
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
</style>
|
||||
<style scoped></style>
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
<template>
|
||||
<div id="">
|
||||
<SearchPopover :target="tag" @savePopover="onOk" :title="info.title">
|
||||
<template v-slot:target-item>
|
||||
<div @click="onClickTag(tag)" :id="tag">
|
||||
<b-icon icon="tags-fill" font-scale="1"></b-icon>
|
||||
{{ tagText }}
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:body>
|
||||
<p>{{ info.detail }}</p>
|
||||
<form ref="form" @submit.stop.prevent="handleSubmit">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<b-form-group>
|
||||
<b-form-datepicker
|
||||
id="from"
|
||||
v-model="from"
|
||||
:placeholder="$t('ID_FROM_LAST_MODIFIED_DATE')"
|
||||
></b-form-datepicker>
|
||||
</b-form-group>
|
||||
</div>
|
||||
<div class="col">
|
||||
<b-form-group>
|
||||
<b-form-datepicker
|
||||
id="to"
|
||||
v-model="to"
|
||||
:placeholder="$t('ID_TO_LAST_MODIFIED_DATE')"
|
||||
></b-form-datepicker>
|
||||
</b-form-group>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</template>
|
||||
</SearchPopover>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import SearchPopover from "./SearchPopover.vue";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
SearchPopover,
|
||||
},
|
||||
props: ["tag", "info"],
|
||||
data() {
|
||||
return {
|
||||
from: "",
|
||||
to: "",
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
tagText: function() {
|
||||
return `${this.$i18n.t('ID_FROM')}: ${this.from} ${this.$i18n.t('ID_TO')}: ${this.to}`;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* Submit form handler
|
||||
*/
|
||||
handleSubmit() {
|
||||
this.$emit("updateSearchTag", {
|
||||
delegationDateFrom: this.from,
|
||||
delegationDateTo: this.to
|
||||
});
|
||||
},
|
||||
/**
|
||||
* On ok event handler
|
||||
*/
|
||||
onOk() {
|
||||
this.handleSubmit();
|
||||
},
|
||||
/**
|
||||
* On click tag event handler
|
||||
*/
|
||||
onClickTag(tag) {
|
||||
this.$root.$emit("bv::hide::popover");
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped></style>
|
||||
@@ -1,10 +1,6 @@
|
||||
<template>
|
||||
<div id="">
|
||||
<SearchPopover
|
||||
:target="tag"
|
||||
@closePopover="onClose"
|
||||
@savePopover="onOk"
|
||||
>
|
||||
<SearchPopover :target="tag" @savePopover="onOk" :title="info.title">
|
||||
<template v-slot:target-item>
|
||||
<div @click="onClickTag(tag)" :id="tag">
|
||||
<b-icon icon="tags-fill" font-scale="1"></b-icon>
|
||||
@@ -12,15 +8,27 @@
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:body>
|
||||
<h6>Filter: Process</h6>
|
||||
<vue-bootstrap-typeahead
|
||||
class="mb-4"
|
||||
v-model="query"
|
||||
:data="process"
|
||||
:serializer="(item) => item.PRO_TITLE"
|
||||
@hit="selectedUser = $event"
|
||||
placeholder="Search GitHub Users"
|
||||
/>
|
||||
<p>{{ info.detail }}</p>
|
||||
<form ref="form" @submit.stop.prevent="handleSubmit">
|
||||
<b-form-group
|
||||
:state="valueState"
|
||||
label-for="name"
|
||||
:invalid-feedback="$t('ID_PROCESS_IS_REQUIRED')"
|
||||
>
|
||||
<vue-bootstrap-typeahead
|
||||
class="mb-4"
|
||||
id="name"
|
||||
v-model="query"
|
||||
:minMatchingChars="minMatchingChars"
|
||||
:data="process"
|
||||
:serializer="(item) => item.PRO_TITLE"
|
||||
@hit="selectedUser = $event"
|
||||
:placeholder="info.placeholder"
|
||||
required
|
||||
:state="valueState"
|
||||
/>
|
||||
</b-form-group>
|
||||
</form>
|
||||
</template>
|
||||
</SearchPopover>
|
||||
</div>
|
||||
@@ -29,8 +37,8 @@
|
||||
<script>
|
||||
import SearchPopover from "./SearchPopover.vue";
|
||||
import VueBootstrapTypeahead from "vue-bootstrap-typeahead";
|
||||
import api from "./../../../api/index";
|
||||
|
||||
// OR
|
||||
export default {
|
||||
components: {
|
||||
SearchPopover,
|
||||
@@ -39,48 +47,67 @@ export default {
|
||||
props: ["tag", "info"],
|
||||
data() {
|
||||
return {
|
||||
minMatchingChars: 1,
|
||||
query: "",
|
||||
process: [],
|
||||
valueState: null,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
ProcessMaker() {
|
||||
return window.ProcessMaker;
|
||||
},
|
||||
tagText: function() {
|
||||
return `Process: ${this.query}`;
|
||||
return `${this.$i18n.t("ID_PROCESS")}: ${this.query}`;
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
query(newQuery) {
|
||||
ProcessMaker.apiClient
|
||||
.post(
|
||||
`http://localhost:350/sysworkflow/en/neoclassic/cases/casesList_Ajax?actionAjax=processListExtJs&action=search`,
|
||||
{
|
||||
query: this.query,
|
||||
}
|
||||
)
|
||||
api.filters
|
||||
.processList(this.query)
|
||||
.then((response) => {
|
||||
this.process = response.data;
|
||||
})
|
||||
.catch((err) => {
|
||||
.catch((e) => {
|
||||
console.error(err);
|
||||
});
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
onClose() {},
|
||||
/**
|
||||
* Form validations review
|
||||
*/
|
||||
checkFormValidity() {
|
||||
const valid = this.query !== "";
|
||||
this.valueState = valid;
|
||||
return valid;
|
||||
},
|
||||
/**
|
||||
* On Ok event handler
|
||||
*/
|
||||
onOk() {
|
||||
this.$emit("updateSearchTag", {
|
||||
columnSearch: "APP_TITLE",
|
||||
process_label: this.query,
|
||||
process: _.find(this.process, { PRO_TITLE: this.query }).PRO_ID,
|
||||
this.handleSubmit();
|
||||
},
|
||||
/**
|
||||
* Form submit handler
|
||||
*/
|
||||
handleSubmit() {
|
||||
// Exit when the form isn't valid
|
||||
if (!this.checkFormValidity()) {
|
||||
return;
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
let process = _.find(this.process, { PRO_TITLE: this.query });
|
||||
this.$emit("updateSearchTag", {
|
||||
process: process.PRO_ID,
|
||||
});
|
||||
this.$root.$emit("bv::hide::popover");
|
||||
});
|
||||
},
|
||||
onClickTag(tag) {
|
||||
/**
|
||||
* Cick tag event handler
|
||||
*/
|
||||
onClickTag() {
|
||||
this.$root.$emit("bv::hide::popover");
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped></style>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<slot name="target-item">here component</slot>
|
||||
<slot name="target-item"></slot>
|
||||
|
||||
<b-popover
|
||||
:show.sync="popoverShow"
|
||||
@@ -15,15 +15,13 @@
|
||||
>×</span
|
||||
>
|
||||
</b-button>
|
||||
|
||||
{{ title }}
|
||||
</template>
|
||||
<div>
|
||||
<slot name="body">
|
||||
popover body
|
||||
</slot>
|
||||
<slot name="body"></slot>
|
||||
<div class="float-right">
|
||||
<b-button @click="onClose" size="sm" variant="danger">Cancel</b-button>
|
||||
<b-button @click="onSave" size="sm" variant="primary">Save</b-button>
|
||||
<b-button @click="onClose" size="sm" variant="danger"> {{$t('ID_CANCEL')}}</b-button>
|
||||
<b-button @click="onSave" size="sm" variant="primary">{{$t('ID_SAVE')}}</b-button>
|
||||
</div>
|
||||
</div>
|
||||
</b-popover>
|
||||
@@ -31,25 +29,30 @@
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
props: ['target'],
|
||||
props: ['target', "title"],
|
||||
data() {
|
||||
return {
|
||||
popoverShow: false
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* Close buton click handler
|
||||
*/
|
||||
onClose() {
|
||||
this.popoverShow = false;
|
||||
this.$emit('closePopover');
|
||||
},
|
||||
/**
|
||||
* Save button click handler
|
||||
*/
|
||||
onSave() {
|
||||
this.$emit('savePopover');
|
||||
this.onClose();
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
.popover {
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
<template>
|
||||
<div id="">
|
||||
<SearchPopover
|
||||
:target="tag"
|
||||
@closePopover="onClose"
|
||||
@savePopover="onOk"
|
||||
>
|
||||
<template v-slot:target-item>
|
||||
<div
|
||||
@click="onClickTag(tag)"
|
||||
:id="tag"
|
||||
>
|
||||
<b-icon
|
||||
icon="tags-fill"
|
||||
font-scale="1"
|
||||
></b-icon>
|
||||
{{
|
||||
tagText
|
||||
}}
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:body>
|
||||
<h6>{{ info.title }}</h6>
|
||||
<input v-model="title" type="text" size="150" class="form-control" :placeholder="info.placeHolder">
|
||||
</template>
|
||||
</SearchPopover>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
|
||||
<script>
|
||||
import SearchPopover from "./SearchPopover.vue";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
SearchPopover,
|
||||
},
|
||||
props: ['tag','info'],
|
||||
data() {
|
||||
return {
|
||||
title: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
tagText: function () {
|
||||
return `Set By: `;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onClose() {
|
||||
},
|
||||
onOk() {
|
||||
this.$emit("updateSearchTag", {
|
||||
columnSearch: "APP_TITLE",
|
||||
search: this.title,
|
||||
});
|
||||
},
|
||||
onRemoveTag() {
|
||||
|
||||
},
|
||||
onClickTag(tag) {
|
||||
this.$root.$emit("bv::hide::popover");
|
||||
}
|
||||
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
117
resources/assets/js/components/search/popovers/TaskName.vue
Normal file
117
resources/assets/js/components/search/popovers/TaskName.vue
Normal file
@@ -0,0 +1,117 @@
|
||||
<template>
|
||||
<div id="">
|
||||
<SearchPopover
|
||||
:target="tag"
|
||||
@savePopover="onOk"
|
||||
:title="info.title"
|
||||
>
|
||||
<template v-slot:target-item>
|
||||
<div @click="onClickTag(tag)" :id="tag">
|
||||
<b-icon icon="tags-fill" font-scale="1"></b-icon>
|
||||
{{ tagText }}
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:body>
|
||||
<p>{{ info.detail }}</p>
|
||||
<form ref="form" @submit.stop.prevent="handleSubmit">
|
||||
<b-form-group
|
||||
:state="valueState"
|
||||
label-for="name"
|
||||
:invalid-feedback="$t('ID_REQUIRED_FIELD')"
|
||||
>
|
||||
<vue-bootstrap-typeahead
|
||||
class="mb-4"
|
||||
id="name"
|
||||
v-model="query"
|
||||
:minMatchingChars="minMatchingChars"
|
||||
:data="tasks"
|
||||
:serializer="(item) => item.PRO_TITLE"
|
||||
@hit="selectedUser = $event"
|
||||
:placeholder="info.placeholder"
|
||||
required
|
||||
:state="valueState"
|
||||
/>
|
||||
</b-form-group>
|
||||
</form>
|
||||
</template>
|
||||
</SearchPopover>
|
||||
</div>
|
||||
</template>
|
||||
|
|
||||
<script>
|
||||
import SearchPopover from "./SearchPopover.vue";
|
||||
import VueBootstrapTypeahead from "vue-bootstrap-typeahead";
|
||||
import api from "./../../../api/index";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
SearchPopover,
|
||||
VueBootstrapTypeahead
|
||||
},
|
||||
props: ["tag", "info"],
|
||||
data() {
|
||||
return {
|
||||
minMatchingChars: 1,
|
||||
query: "",
|
||||
tasks: [],
|
||||
valueState: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
tagText: function() {
|
||||
return `${this.$i18n.t("ID_TASK_NAME")}: ${this.query}`;
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
query(newQuery) {
|
||||
api.filters
|
||||
.processList(this.query)
|
||||
.then((response) => {
|
||||
this.tasks = response.data;
|
||||
})
|
||||
.catch((e) => {
|
||||
console.error(err);
|
||||
});
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* Form validations review
|
||||
*/
|
||||
checkFormValidity() {
|
||||
const valid = this.query !== "";
|
||||
this.valueState = valid;
|
||||
return valid;
|
||||
},
|
||||
/**
|
||||
* On Ok event handler
|
||||
*/
|
||||
onOk() {
|
||||
this.handleSubmit();
|
||||
},
|
||||
/**
|
||||
* Form submit handler
|
||||
*/
|
||||
handleSubmit() {
|
||||
// Exit when the form isn't valid
|
||||
if (!this.checkFormValidity()) {
|
||||
return;
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
let task = _.find(this.tasks, { PRO_TITLE: this.query });
|
||||
this.$emit("updateSearchTag", {
|
||||
task: task.PRO_ID,
|
||||
});
|
||||
this.$root.$emit("bv::hide::popover");
|
||||
});
|
||||
},
|
||||
/**
|
||||
* Cick tag event handler
|
||||
*/
|
||||
onClickTag() {
|
||||
this.$root.$emit("bv::hide::popover");
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped></style>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,24 +1,34 @@
|
||||
<template>
|
||||
<div id="home" :class="[{ collapsed: collapsed }, { onmobile: isOnMobile }]">
|
||||
<div class="demo">
|
||||
<div class="container">
|
||||
<router-view />
|
||||
</div>
|
||||
<div
|
||||
id="home"
|
||||
:class="[{ collapsed: collapsed }, { onmobile: isOnMobile }]"
|
||||
>
|
||||
<div class="demo">
|
||||
<div class="container">
|
||||
<router-view />
|
||||
</div>
|
||||
<CustomSidebar
|
||||
:menu="menu"
|
||||
@OnClickSidebarItem="OnClickSidebarItem"
|
||||
@onToggleCollapse="onToggleCollapse"
|
||||
/>
|
||||
<div
|
||||
v-if="isOnMobile && !collapsed"
|
||||
class="sidebar-overlay"
|
||||
@click="collapsed = true"
|
||||
/>
|
||||
|
||||
<CustomSidebar
|
||||
@OnClickSidebarItem="OnClickSidebarItem"
|
||||
@onToggleCollapse="onToggleCollapse"
|
||||
/>
|
||||
<div
|
||||
v-if="isOnMobile && !collapsed"
|
||||
class="sidebar-overlay"
|
||||
@click="collapsed = true"
|
||||
/>
|
||||
|
||||
<component v-bind:is="page" ref="component"></component>
|
||||
<component
|
||||
v-bind:is="page"
|
||||
ref="component"
|
||||
:id="pageId"
|
||||
:name="pageName"
|
||||
@onSubmitFilter="onSubmitFilter"
|
||||
@onRemoveFilter="onRemoveFilter"
|
||||
></component>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
<script>
|
||||
import CustomSidebar from "./../components/menu/CustomSidebar";
|
||||
import MyCases from "./MyCases";
|
||||
@@ -33,86 +43,149 @@ import XCase from "./XCase";
|
||||
import TaskReassignments from "./TaskReassignments";
|
||||
import AdvancedSearch from "./AdvancedSearch";
|
||||
|
||||
import api from "./../api/index";
|
||||
|
||||
export default {
|
||||
name: "Home",
|
||||
components: {
|
||||
CustomSidebar,
|
||||
MyCases,
|
||||
AdvancedSearch,
|
||||
MyDocuments,
|
||||
BatchRouting,
|
||||
TaskReassignments,
|
||||
XCase,
|
||||
Todo,
|
||||
Draft,
|
||||
Paused,
|
||||
Unassigned,
|
||||
CaseDetail,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
page: "MyCases",
|
||||
menu: [],
|
||||
dataCase: {},
|
||||
hideToggle: true,
|
||||
collapsed: false,
|
||||
selectedTheme: "",
|
||||
isOnMobile: false,
|
||||
sidebarWidth: "310px",
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.onResize();
|
||||
window.addEventListener("resize", this.onResize);
|
||||
},
|
||||
methods: {
|
||||
OnClickSidebarItem(item) {
|
||||
this.page = item.item.id || "MyCases";
|
||||
name: "Home",
|
||||
components: {
|
||||
CustomSidebar,
|
||||
MyCases,
|
||||
AdvancedSearch,
|
||||
MyDocuments,
|
||||
BatchRouting,
|
||||
TaskReassignments,
|
||||
XCase,
|
||||
Todo,
|
||||
Draft,
|
||||
Paused,
|
||||
Unassigned,
|
||||
CaseDetail,
|
||||
},
|
||||
/**
|
||||
* Update page component
|
||||
*/
|
||||
updatePage(data, page, callback) {
|
||||
this.dataCase = data;
|
||||
this.page = page;
|
||||
if (this.$refs["component"] && this.$refs["component"].update) {
|
||||
this.$refs["component"].update(data, callback);
|
||||
}
|
||||
data() {
|
||||
return {
|
||||
page: "MyCases",
|
||||
menu: null,
|
||||
dataCase: {},
|
||||
hideToggle: true,
|
||||
collapsed: false,
|
||||
selectedTheme: "",
|
||||
isOnMobile: false,
|
||||
sidebarWidth: "310px",
|
||||
pageId: null,
|
||||
pageName: null,
|
||||
};
|
||||
},
|
||||
onResize() {
|
||||
if (window.innerWidth <= 767) {
|
||||
this.isOnMobile = true;
|
||||
this.collapsed = true;
|
||||
} else {
|
||||
this.isOnMobile = false;
|
||||
this.collapsed = false;
|
||||
}
|
||||
mounted() {
|
||||
this.onResize();
|
||||
window.addEventListener("resize", this.onResize);
|
||||
this.getMenu();
|
||||
},
|
||||
/**
|
||||
* Toggle sidebar handler
|
||||
* @param {Boolean} collapsed - if sidebar is collapsed true|false
|
||||
*
|
||||
*/
|
||||
onToggleCollapse(collapsed) {
|
||||
this.collapsed = collapsed;
|
||||
methods: {
|
||||
/**
|
||||
* Gets the menu from the server
|
||||
*/
|
||||
getMenu() {
|
||||
api.menu
|
||||
.get()
|
||||
.then((response) => {
|
||||
this.menu = response;
|
||||
})
|
||||
.catch((e) => {
|
||||
console.error(e);
|
||||
});
|
||||
},
|
||||
OnClickSidebarItem(item) {
|
||||
this.page = item.item.page || "MyCases";
|
||||
this.pageId = item.item.id || null;
|
||||
this.pageName = item.item.title || null;
|
||||
},
|
||||
/**
|
||||
* Update page component
|
||||
*/
|
||||
updatePage(data, page, callback) {
|
||||
this.dataCase = data;
|
||||
this.page = page;
|
||||
if (this.$refs["component"] && this.$refs["component"].update) {
|
||||
this.$refs["component"].update(data, callback);
|
||||
}
|
||||
},
|
||||
onResize() {
|
||||
if (window.innerWidth <= 767) {
|
||||
this.isOnMobile = true;
|
||||
this.collapsed = true;
|
||||
} else {
|
||||
this.isOnMobile = false;
|
||||
this.collapsed = false;
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Toggle sidebar handler
|
||||
* @param {Boolean} collapsed - if sidebar is collapsed true|false
|
||||
*
|
||||
*/
|
||||
onToggleCollapse(collapsed) {
|
||||
this.collapsed = collapsed;
|
||||
},
|
||||
/**
|
||||
* Handle if filter was submited
|
||||
*/
|
||||
|
||||
onSubmitFilter(data) {
|
||||
this.addMenuSearchChild(data);
|
||||
},
|
||||
/**
|
||||
* Add a child submenu to search menu
|
||||
* @param {object} data - cnotains theinfo to generate a menu
|
||||
*/
|
||||
addMenuSearchChild(data) {
|
||||
let newMenu = this.menu;
|
||||
let advSearch = _.find(newMenu, function(o) {
|
||||
return o.href === "/advanced-search";
|
||||
});
|
||||
if (!advSearch.hasOwnProperty("child")) {
|
||||
advSearch["child"] = [];
|
||||
}
|
||||
advSearch.child.push({
|
||||
href: "/advanced-search/" + data.id,
|
||||
title: data.name,
|
||||
icon: "fas fa-circle",
|
||||
id: data.id,
|
||||
page: "advanced-search",
|
||||
});
|
||||
},
|
||||
onRemoveFilter(id) {
|
||||
this.removeMenuSearchChild(id);
|
||||
this.page = "advanced-search";
|
||||
this.pageId = null;
|
||||
this.pageName = null;
|
||||
},
|
||||
removeMenuSearchChild(id) {
|
||||
let newMenu = this.menu;
|
||||
let advSearch = _.find(newMenu, function(o) {
|
||||
return o.href === "/advanced-search";
|
||||
});
|
||||
const index = advSearch.child.findIndex(function(o) {
|
||||
return o.id === id;
|
||||
});
|
||||
if (index !== -1) advSearch.child.splice(index, 1);
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
#home {
|
||||
padding-left: 310px;
|
||||
transition: 0.3s;
|
||||
padding-left: 310px;
|
||||
transition: 0.3s;
|
||||
}
|
||||
#home.collapsed {
|
||||
padding-left: 50px;
|
||||
padding-left: 50px;
|
||||
}
|
||||
#home.onmobile {
|
||||
padding-left: 50px;
|
||||
padding-left: 50px;
|
||||
}
|
||||
|
||||
.container {
|
||||
max-width: 1500px;
|
||||
max-width: 1500px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -21,10 +21,18 @@ export default {
|
||||
mounted() {
|
||||
this.height = window.innerHeight - this.diffHeight;
|
||||
this.dataCase = this.$parent.dataCase;
|
||||
this.path =
|
||||
window.config.SYS_SERVER +
|
||||
window.config.SYS_URI +
|
||||
`cases/open?APP_UID=${this.dataCase.APP_UID}&DEL_INDEX=${this.dataCase.DEL_INDEX}&action=${this.dataCase.ACTION}`;
|
||||
if(this.dataCase.ACTION =="jump") {
|
||||
this.path =
|
||||
window.config.SYS_SERVER +
|
||||
window.config.SYS_URI +
|
||||
`cases/open?APP_NUMBER=${this.dataCase.APP_NUMBER}&action=${this.dataCase.ACTION}&actionFromList=${this.dataCase.ACTION_FROM_LIST}`;
|
||||
} else {
|
||||
this.path =
|
||||
window.config.SYS_SERVER +
|
||||
window.config.SYS_URI +
|
||||
`cases/open?APP_UID=${this.dataCase.APP_UID}&DEL_INDEX=${this.dataCase.DEL_INDEX}&action=${this.dataCase.ACTION}`;
|
||||
}
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -33,6 +41,7 @@ export default {
|
||||
diffHeight: 10,
|
||||
dataCase: null,
|
||||
path: "",
|
||||
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -3,7 +3,7 @@ import VueRouter from "vue-router";
|
||||
import VueSidebarMenu from "vue-sidebar-menu";
|
||||
import VueI18n from 'vue-i18n';
|
||||
import { BootstrapVue, BootstrapVueIcons } from 'bootstrap-vue';
|
||||
import { ServerTable } from 'vue-tables-2';
|
||||
import { ServerTable, Event} from 'vue-tables-2';
|
||||
import "@fortawesome/fontawesome-free/css/all.css";
|
||||
import "@fortawesome/fontawesome-free/js/all.js";
|
||||
import 'bootstrap/dist/css/bootstrap-grid.css';
|
||||
|
||||
@@ -11,9 +11,10 @@
|
||||
},
|
||||
{
|
||||
"href": "/advanced-search",
|
||||
"id": "advanced-search",
|
||||
"page": "advanced-search",
|
||||
"title": "Advanced Search",
|
||||
"icon": "fas fa-search"
|
||||
"icon": "fas fa-search",
|
||||
"child": []
|
||||
},
|
||||
{
|
||||
"header": true,
|
||||
@@ -28,7 +29,8 @@
|
||||
"text": "23",
|
||||
"class": "badge-custom"
|
||||
},
|
||||
"id": "todo"
|
||||
"id": "todo",
|
||||
"page": "todo"
|
||||
},
|
||||
{
|
||||
"href": "/draft",
|
||||
@@ -38,7 +40,8 @@
|
||||
"text": "1",
|
||||
"class": "badge-custom"
|
||||
},
|
||||
"id": "draft"
|
||||
"id": "draft",
|
||||
"page": "draft"
|
||||
},
|
||||
{
|
||||
"href": "/paused",
|
||||
@@ -48,7 +51,8 @@
|
||||
"text": "7",
|
||||
"class": "badge-custom"
|
||||
},
|
||||
"id": "paused"
|
||||
"id": "paused",
|
||||
"page": "paused"
|
||||
},
|
||||
{
|
||||
"href": "/unassigned",
|
||||
@@ -58,7 +62,8 @@
|
||||
"text": "99+",
|
||||
"class": "badge-custom"
|
||||
},
|
||||
"id": "unassigned"
|
||||
"id": "unassigned",
|
||||
"page": "unassigned"
|
||||
},
|
||||
{
|
||||
"header": true,
|
||||
@@ -69,6 +74,7 @@
|
||||
"href": "/batch-routing",
|
||||
"title": "Batch Routing",
|
||||
"id": "batch-routing",
|
||||
"page": "batch-routing",
|
||||
"icon": "fas fa-bars",
|
||||
"disabled": false
|
||||
},
|
||||
@@ -76,6 +82,7 @@
|
||||
"href": "/my-documents",
|
||||
"title": "My Documents",
|
||||
"id": "my-documents",
|
||||
"page": "my-documents",
|
||||
"icon": "fas fa-bars",
|
||||
"disabled": false
|
||||
},
|
||||
@@ -83,7 +90,9 @@
|
||||
"href": "/task-Reassignments",
|
||||
"title": "Task Reassignments",
|
||||
"icon": "fas fa-arrows-alt",
|
||||
"id": "task-reassignments"
|
||||
"id": "task-reassignments",
|
||||
"page": "task-reassignments"
|
||||
|
||||
},
|
||||
{
|
||||
"href": "/page",
|
||||
|
||||
Reference in New Issue
Block a user