diff --git a/resources/assets/js/api/Api.js b/resources/assets/js/api/Api.js
index c73177d1b..fc21c1b74 100644
--- a/resources/assets/js/api/Api.js
+++ b/resources/assets/js/api/Api.js
@@ -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
+ }
+ });
}
};
diff --git a/resources/assets/js/api/Cases.js b/resources/assets/js/api/Cases.js
index 7403620aa..90ae31ea6 100644
--- a/resources/assets/js/api/Cases.js
+++ b/resources/assets/js/api/Cases.js
@@ -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 = {
diff --git a/resources/assets/js/api/Filters.js b/resources/assets/js/api/Filters.js
new file mode 100644
index 000000000..192e21665
--- /dev/null
+++ b/resources/assets/js/api/Filters.js
@@ -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,
+ }
+ );
+ },
+};
diff --git a/resources/assets/js/api/index.js b/resources/assets/js/api/index.js
index 096b8f419..c4d2b47d6 100644
--- a/resources/assets/js/api/index.js
+++ b/resources/assets/js/api/index.js
@@ -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
};
\ No newline at end of file
diff --git a/resources/assets/js/components/menu/CustomSidebar.vue b/resources/assets/js/components/menu/CustomSidebar.vue
index 9427fe3ea..5a93a31f4 100644
--- a/resources/assets/js/components/menu/CustomSidebar.vue
+++ b/resources/assets/js/components/menu/CustomSidebar.vue
@@ -20,13 +20,12 @@
+
diff --git a/resources/assets/js/components/search/popovers/CaseNumber.vue b/resources/assets/js/components/search/popovers/CaseNumber.vue
index 82960262d..edc0789e0 100644
--- a/resources/assets/js/components/search/popovers/CaseNumber.vue
+++ b/resources/assets/js/components/search/popovers/CaseNumber.vue
@@ -2,8 +2,10 @@
@@ -12,26 +14,22 @@
-
+ {{ info.detail }}
+
@@ -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() {
- },
+ }
},
};
diff --git a/resources/assets/js/components/search/popovers/CasePriority.vue b/resources/assets/js/components/search/popovers/CasePriority.vue
index 69e68b7a8..d4a1c5aee 100644
--- a/resources/assets/js/components/search/popovers/CasePriority.vue
+++ b/resources/assets/js/components/search/popovers/CasePriority.vue
@@ -1,10 +1,6 @@
-
+
@@ -12,7 +8,7 @@
- {{ info.title }}
+ {{ info.detail }}
{
+ this.$emit("updateSearchTag", {
+ priorities: this.selected.join(","),
+ });
+ this.$root.$emit("bv::hide::popover");
+ });
+ },
+ /**
+ * Tag Click handler
+ */
onClickTag(tag) {
this.$root.$emit("bv::hide::popover");
- },
- },
+ }
+ }
};
diff --git a/resources/assets/js/components/search/popovers/CaseStatus.vue b/resources/assets/js/components/search/popovers/CaseStatus.vue
index d50ee3b5b..4326ed841 100644
--- a/resources/assets/js/components/search/popovers/CaseStatus.vue
+++ b/resources/assets/js/components/search/popovers/CaseStatus.vue
@@ -2,8 +2,8 @@
@@ -12,7 +12,7 @@
- {{ info.title }}
+ {{ info.detail }}
{
+ this.$emit("updateSearchTag", {
+ caseStatuses: this.selected.join(","),
+ });
+ this.$root.$emit("bv::hide::popover");
+ });
+ },
+ /**
+ * Tag Click handler
+ */
onClickTag(tag) {
this.$root.$emit("bv::hide::popover");
- },
- },
+ }
+ }
};
diff --git a/resources/assets/js/components/search/popovers/CaseTitle.vue b/resources/assets/js/components/search/popovers/CaseTitle.vue
index 68da628be..65e192530 100644
--- a/resources/assets/js/components/search/popovers/CaseTitle.vue
+++ b/resources/assets/js/components/search/popovers/CaseTitle.vue
@@ -4,6 +4,7 @@
:target="tag"
@closePopover="onClose"
@savePopover="onOk"
+ :title="info.title"
>
@@ -12,14 +13,22 @@
- Filter: Case Title
-
+ {{ info.detail }}
+
@@ -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");
},
},
};
diff --git a/resources/assets/js/components/search/popovers/CurrentUser.vue b/resources/assets/js/components/search/popovers/CurrentUser.vue
new file mode 100644
index 000000000..c89eb0b88
--- /dev/null
+++ b/resources/assets/js/components/search/popovers/CurrentUser.vue
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+ {{ tagText }}
+
+
+
+ {{ info.detail }}
+
+
+
+
+
+
+
+
diff --git a/resources/assets/js/components/search/popovers/DueDate.vue b/resources/assets/js/components/search/popovers/DueDate.vue
index 1ee28a7f1..025937906 100644
--- a/resources/assets/js/components/search/popovers/DueDate.vue
+++ b/resources/assets/js/components/search/popovers/DueDate.vue
@@ -1,78 +1,87 @@
-
-
-
- {{
- tagText
- }}
+
+
+ {{ tagText }}
-
-
\ No newline at end of file
+
diff --git a/resources/assets/js/components/search/popovers/LastModifiedDate.vue b/resources/assets/js/components/search/popovers/LastModifiedDate.vue
new file mode 100644
index 000000000..df9383fcd
--- /dev/null
+++ b/resources/assets/js/components/search/popovers/LastModifiedDate.vue
@@ -0,0 +1,83 @@
+
+
+
+
+
+
+ {{ tagText }}
+
+
+
+ {{ info.detail }}
+
+
+
+
+
+
+
+
diff --git a/resources/assets/js/components/search/popovers/ProcessName.vue b/resources/assets/js/components/search/popovers/ProcessName.vue
index fb5ab9b90..fdc63f93d 100644
--- a/resources/assets/js/components/search/popovers/ProcessName.vue
+++ b/resources/assets/js/components/search/popovers/ProcessName.vue
@@ -1,10 +1,6 @@
-
+
@@ -12,15 +8,27 @@
- Filter: Process
-
+ {{ info.detail }}
+
@@ -29,8 +37,8 @@
diff --git a/resources/assets/js/components/search/popovers/SearchPopover.vue b/resources/assets/js/components/search/popovers/SearchPopover.vue
index f3f173ebe..a82787fd5 100644
--- a/resources/assets/js/components/search/popovers/SearchPopover.vue
+++ b/resources/assets/js/components/search/popovers/SearchPopover.vue
@@ -1,6 +1,6 @@
-
here component
+
×
-
+ {{ title }}
-
- popover body
-
+
- Cancel
- Save
+ {{$t('ID_CANCEL')}}
+ {{$t('ID_SAVE')}}
@@ -31,25 +29,30 @@
-
+
\ No newline at end of file
diff --git a/resources/assets/js/components/search/popovers/TaskName.vue b/resources/assets/js/components/search/popovers/TaskName.vue
new file mode 100644
index 000000000..7e37d4076
--- /dev/null
+++ b/resources/assets/js/components/search/popovers/TaskName.vue
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+ {{ tagText }}
+
+
+
+ {{ info.detail }}
+
+
+
+
+
+|
+
+
diff --git a/resources/assets/js/home/AdvancedSearch.vue b/resources/assets/js/home/AdvancedSearch.vue
index 22fa6a50d..31a1e2e93 100644
--- a/resources/assets/js/home/AdvancedSearch.vue
+++ b/resources/assets/js/home/AdvancedSearch.vue
@@ -1,391 +1,403 @@
-
-
-
-
+
+
+
-
-
-
-
-
- {{ props.row.CASE_NUMBER }}
-
-
- {{ props.row.CASE_TITLE }}
-
-
- {{ props.row.PROCESS_NAME }}
-
-
- {{ props.row.STATUS }}
-
- {{ props.row.START_DATE }}
-
-
- {{ props.row.FINISH_DATE }}
-
-
- {{ props.row.DURATION }}
-
-
-
-
- 9
- unread messages
-
-
-
-
+
+
+
+
+
+
+
+ {{ props.row.CASE_NUMBER }}
+
+
+ {{ props.row.CASE_TITLE }}
+
+
+ {{ props.row.PROCESS_NAME }}
+
+
+
+
+
+ {{ props.row.STATUS }}
+
+
+ {{
+ nameFormatCases(
+ props.row.USR_FIRSTNAME,
+ props.row.USR_LASTNAME,
+ props.row.USR_USERNAME
+ )
+ }}
+
+
+ {{ props.row.DUE_DATE }}
+
+
+ {{ props.row.DELEGATION_DATE }}
+
+
+ {{ props.row.PRIORITY }}
+
+
+
+
+ 9
+ unread messages
+
+
+
+
diff --git a/resources/assets/js/home/Home.vue b/resources/assets/js/home/Home.vue
index a0699c215..449c1cff6 100644
--- a/resources/assets/js/home/Home.vue
+++ b/resources/assets/js/home/Home.vue
@@ -1,24 +1,34 @@
-
-
-
+
\ No newline at end of file
+
diff --git a/resources/assets/js/home/XCase.vue b/resources/assets/js/home/XCase.vue
index d084df76d..03c0c51fa 100644
--- a/resources/assets/js/home/XCase.vue
+++ b/resources/assets/js/home/XCase.vue
@@ -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: {
diff --git a/resources/assets/js/home/main.js b/resources/assets/js/home/main.js
index ac6aa571d..91c537dc5 100644
--- a/resources/assets/js/home/main.js
+++ b/resources/assets/js/home/main.js
@@ -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';
diff --git a/resources/assets/js/mocks/menu.json b/resources/assets/js/mocks/menu.json
index 89005232b..645778c9e 100644
--- a/resources/assets/js/mocks/menu.json
+++ b/resources/assets/js/mocks/menu.json
@@ -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",