FOUR-14053 All Templates section (UI change) by gproly · Pull Request #6920 · ProcessMaker/processmaker

Expand Up @@ -13,6 +13,7 @@ :key="index" :process="process" @openProcessInfo="openProcessInfo" :hideBookmark="categoryId === 'all_templates'" /> <pagination :total-row="totalRow" Expand Down Expand Up @@ -43,6 +44,7 @@ import pagination from "./utils/pagination.vue"; import SearchCards from "./utils/SearchCards.vue"; import dataLoadingMixin from "../../components/common/mixins/apiDataLoading"; import Card from "./utils/Card.vue"; import { EventBus } from '../index.js';
export default { components: { Expand All @@ -63,6 +65,7 @@ export default { data: null, totalPages: 1, pmql: "", filter: "", bookmarkIcon: "far fa-bookmark", showEmpty: false, loading: false, Expand All @@ -71,6 +74,7 @@ export default { watch: { categoryId() { this.pmql = ""; this.filter = ""; this.loadCard(); }, }, Expand Down Expand Up @@ -100,7 +104,7 @@ export default { * Build URL for Process Cards */ buildURL() { if (!this.categoryId || this.categoryId === 'all_processes') { if (this.categoryId === 'all_processes') { return "process_bookmarks/processes?" + `&page=${this.currentPage}` + `&per_page=${this.perPage}` Expand All @@ -118,6 +122,14 @@ export default { + "&launchpad=true" + "&order_by=name&order_direction=asc"; } if (this.categoryId === 'all_templates') { return `templates/process?page=${this.currentPage}` + `&per_page=${this.perPage}` + `&filter=${encodeURIComponent(this.filter)}` + `&order_by=name` + `&order_direction=asc` + `&include=user,categories,category`; } return `process_bookmarks/processes?page=${this.currentPage}` + `&per_page=${this.perPage}` + `&category=${this.categoryId}` Expand All @@ -130,6 +142,10 @@ export default { * Go to process info */ openProcessInfo(process) { if (this.categoryId === 'all_templates') { EventBus.$emit('templates-selected', { template: process, type: "Process" }); return; } this.$router.push({ name: "show", params: { process: process, processId: process.id } }); this.$emit("openProcess", process); }, Expand All @@ -146,6 +162,7 @@ export default { onFilter(value, showEmpty = false) { this.currentPage = 1; this.pmql = `(fulltext LIKE "%${value}%")`; this.filter = value; this.showEmpty = showEmpty; this.loadCard(); }, Expand Down