update task metrics
This commit is contained in:
1040
package-lock.json
generated
1040
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -21,10 +21,14 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"apexcharts": "^3.27.3",
|
||||
"@fortawesome/fontawesome-svg-core": "^1.2.35",
|
||||
"@fortawesome/free-solid-svg-icons": "^5.15.3",
|
||||
"@fortawesome/vue-fontawesome": "^2.0.2",
|
||||
"axios": "^0.15.3",
|
||||
"bootstrap": "^4.5.3",
|
||||
"bootstrap-colorpicker": "^3.0.3",
|
||||
"bootstrap-vue": "^2.19.0",
|
||||
"bootstrap-vue-font-awesome-picker": "^0.1.3",
|
||||
"chart.js": "^2.7.2",
|
||||
"dateformat": "^3.0.3",
|
||||
"faker": "^5.1.0",
|
||||
@@ -40,6 +44,9 @@
|
||||
"promise-polyfill": "8.1.3",
|
||||
"sortablejs": "^1.13.0",
|
||||
"uiv": "^0.28.0",
|
||||
"v-color": "^1.1.2",
|
||||
"verte": "0.0.12",
|
||||
"vfa-picker": "^5.9.1",
|
||||
"vue": "^2.6.12",
|
||||
"vue-apexcharts": "^1.6.1",
|
||||
"vue-awesome-swiper": "^3.1.3",
|
||||
@@ -49,6 +56,7 @@
|
||||
"vue-faker": "^3.0.0",
|
||||
"vue-fullscreen": "^2.1.3",
|
||||
"vue-i18n": "^8.22.2",
|
||||
"vue-icon-picker": "^1.0.0",
|
||||
"vue-js-toggle-button": "^1.3.1",
|
||||
"vue-multiselect": "^2.1.6",
|
||||
"vue-muuri": "^0.1.2",
|
||||
|
||||
63
resources/assets/js/admin/Modals/ModalDeleteCaseList.vue
Normal file
63
resources/assets/js/admin/Modals/ModalDeleteCaseList.vue
Normal file
@@ -0,0 +1,63 @@
|
||||
<template>
|
||||
<div>
|
||||
<b-modal
|
||||
ref="modal-delete-list"
|
||||
hide-footer
|
||||
size="md"
|
||||
>
|
||||
<template v-slot:modal-title>
|
||||
{{ $t('ID_DELETE_CUSTOM_CASE_LIST') }}
|
||||
</template>
|
||||
<b-container fluid>
|
||||
<p>
|
||||
{{ $t("ID_ARE_YOU_SURE_DELETE_CUSTOM_CASE_LIST") }}
|
||||
</p>
|
||||
</b-container>
|
||||
<div class="modal-footer">
|
||||
<div class="float-right">
|
||||
<b-button
|
||||
variant="danger"
|
||||
data-dismiss="modal"
|
||||
@click="hide"
|
||||
>
|
||||
{{ $t("ID_NO") }}
|
||||
</b-button>
|
||||
<b-button
|
||||
variant="success"
|
||||
@click="deleteCustomCaseList"
|
||||
>
|
||||
{{ $t("ID_YES") }}
|
||||
</b-button>
|
||||
</div>
|
||||
</div>
|
||||
</b-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import api from "./../settings/customCaseList/Api/CaseList";
|
||||
export default {
|
||||
name: "ModalDeleteCaseList",
|
||||
data() {
|
||||
return {
|
||||
data: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
show() {
|
||||
this.$refs["modal-delete-list"].show();
|
||||
},
|
||||
hide() {
|
||||
this.$refs["modal-delete-list"].hide();
|
||||
},
|
||||
deleteCustomCaseList() {
|
||||
api.deleteCaseList(this.data).then((response) => {
|
||||
if (response.statusText == "OK") {
|
||||
that.$refs["modal-pause-case"].hide();
|
||||
that.$parent.$refs["vueTable"].getData();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -36,6 +36,19 @@ class caseListApi extends Api {
|
||||
keys: {}
|
||||
});
|
||||
}
|
||||
deleteCaseList(data) {
|
||||
return axios.delete(
|
||||
window.config.SYS_SERVER_API +
|
||||
'/api/1.0/' +
|
||||
window.config.SYS_WORKSPACE +
|
||||
'/caseList/' + data.id, {
|
||||
headers: {
|
||||
'Authorization': 'Bearer ' + window.config.SYS_CREDENTIALS.accessToken,
|
||||
"Accept-Language": window.config.SYS_LANG
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
let api = new caseListApi(Services);
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -3,13 +3,16 @@
|
||||
id="home"
|
||||
>
|
||||
<div class="demo">
|
||||
<div class="container">
|
||||
<div class="container" v-if="!showSketch">
|
||||
<h5 >{{ $t("ID_CUSTOM_CASES_LISTS") }}</h5>
|
||||
<div class="x_content">
|
||||
<b-container fluid>
|
||||
<b-tabs content-class="mt-3">
|
||||
<b-tab :title="$t('TO_DO')" active>
|
||||
<Tables module="inbox"/>
|
||||
<Tables module="inbox"
|
||||
@showSketch="onShowSketch"
|
||||
@closeSketch="onCloseSketch"
|
||||
/>
|
||||
</b-tab>
|
||||
<b-tab :title="$t('ID_DRAFT')" lazy>
|
||||
<Tables module="draft"/>
|
||||
@@ -25,26 +28,42 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="container" v-if="showSketch">
|
||||
<CaseListSketch
|
||||
@showSketch="onShowSketch"
|
||||
@closeSketch="onCloseSketch"
|
||||
:params="params"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import Tables from "./Tables";
|
||||
import CaseListSketch from "./CaseListSketch"
|
||||
export default {
|
||||
name: "CustomCaseList",
|
||||
components: {
|
||||
Tables
|
||||
Tables,
|
||||
CaseListSketch
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
showSketch: false,
|
||||
params: {}
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
onShowSketch (params) {
|
||||
this.showSketch = true;
|
||||
this.params = params;
|
||||
},
|
||||
onCloseSketch (params) {
|
||||
this.showSketch = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<div id="people">
|
||||
<ModalDeleteCaseList ref="modal-delete-list"></ModalDeleteCaseList>
|
||||
<button-fleft :data="newList"></button-fleft>
|
||||
<button-fleft :data="importList"></button-fleft>
|
||||
<v-server-table
|
||||
@@ -27,13 +28,15 @@ import ButtonFleft from "../../../components/home/ButtonFleft.vue";
|
||||
import Ellipsis from "../../../components/utils/ellipsis.vue";
|
||||
import utils from "../../../utils/utils";
|
||||
import OwnerCell from "../../../components/vuetable/OwnerCell";
|
||||
import ModalDeleteCaseList from "./../../Modals/ModalDeleteCaseList.vue"
|
||||
export default {
|
||||
name: "Tables",
|
||||
props: ["module"],
|
||||
components: {
|
||||
ButtonFleft,
|
||||
Ellipsis,
|
||||
OwnerCell
|
||||
OwnerCell,
|
||||
ModalDeleteCaseList
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -55,6 +58,17 @@ export default {
|
||||
title: this.$i18n.t("New List"),
|
||||
class: "btn-success",
|
||||
onClick: () => {
|
||||
this.$emit("showSketch", {
|
||||
name: "Rocko",
|
||||
description: "algo te texto",
|
||||
tableUid: "1234",
|
||||
iconList: 'far fa-calendar-alt',
|
||||
iconColor: '#4287f5',
|
||||
iconColorScreen:'#4287f5',
|
||||
type: this.module
|
||||
|
||||
});
|
||||
|
||||
//TODO button
|
||||
}
|
||||
},
|
||||
@@ -76,8 +90,6 @@ export default {
|
||||
],
|
||||
tableData: [],
|
||||
options: {
|
||||
perPage:25,
|
||||
perPageValues:[25],
|
||||
filterable: true,
|
||||
headings: {
|
||||
name: this.$i18n.t("ID_NAME"),
|
||||
@@ -171,6 +183,14 @@ export default {
|
||||
data.push(v);
|
||||
});
|
||||
return data;
|
||||
},
|
||||
/**
|
||||
* Show modal to delete a custom case list
|
||||
* @param {object} data
|
||||
*/
|
||||
showModalDelete(data) {
|
||||
this.$refs["modal-delete-list"].data = data;
|
||||
this.$refs["modal-delete-list"].show();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -2,22 +2,22 @@ import Vue from "vue";
|
||||
import VueRouter from "vue-router";
|
||||
import VueSidebarMenu from "vue-sidebar-menu";
|
||||
import VueI18n from 'vue-i18n';
|
||||
import { BootstrapVue, BootstrapVueIcons } from 'bootstrap-vue';
|
||||
import { BootstrapVue } from 'bootstrap-vue';
|
||||
import { ServerTable, Event, ClientTable} from 'vue-tables-2';
|
||||
import Sortable from 'sortablejs';
|
||||
import "@fortawesome/fontawesome-free/css/all.css";
|
||||
import "@fortawesome/fontawesome-free/js/all.js";
|
||||
import 'bootstrap/dist/css/bootstrap-grid.css';
|
||||
import 'bootstrap/dist/css/bootstrap.min.css'
|
||||
import 'bootstrap-vue/dist/bootstrap-vue.css'
|
||||
|
||||
import CustomCaseList from "./CustomCaseList";
|
||||
Vue.use(VueRouter);
|
||||
import Verte from 'verte';
|
||||
import 'verte/dist/verte.css';
|
||||
// register component globally
|
||||
Vue.component('verte', Verte);
|
||||
Vue.use(VueRouter);
|
||||
Vue.use(VueSidebarMenu);
|
||||
Vue.use(BootstrapVue);
|
||||
Vue.use(BootstrapVueIcons);
|
||||
Vue.use(VueI18n);
|
||||
|
||||
Vue.use(ServerTable, {}, false, 'bootstrap3', {});
|
||||
Vue.use(ClientTable, {}, false, 'bootstrap3', {});
|
||||
window.ProcessMaker = {
|
||||
@@ -48,5 +48,6 @@ new Vue({
|
||||
// eslint-disable-line no-new
|
||||
el: "#customCaseList",
|
||||
router,
|
||||
components: { Verte },
|
||||
render: (h) => h(CustomCaseList),
|
||||
});
|
||||
24
resources/assets/js/api/Config.js
Normal file
24
resources/assets/js/api/Config.js
Normal file
@@ -0,0 +1,24 @@
|
||||
import ApiInstance from "./Api.js";
|
||||
import Services from "./Services";
|
||||
let Api = new ApiInstance( Services );
|
||||
|
||||
export let config = {
|
||||
get(data) {
|
||||
return Api.get({
|
||||
service: "GET_CONFIG",
|
||||
keys: data
|
||||
});
|
||||
},
|
||||
post(data) {
|
||||
return Api.post({
|
||||
service: "CONFIG",
|
||||
data: data
|
||||
});
|
||||
},
|
||||
put(data) {
|
||||
return Api.put({
|
||||
service: "CONFIG",
|
||||
data: data
|
||||
});
|
||||
},
|
||||
};
|
||||
@@ -1,7 +1,7 @@
|
||||
import axios from "axios";
|
||||
import ApiInstance from "./Api.js";
|
||||
import Services from "./Services";
|
||||
let Api = new ApiInstance( Services );
|
||||
let Api = new ApiInstance(Services);
|
||||
export let filters = {
|
||||
get(data) {
|
||||
return Api.get({
|
||||
@@ -42,8 +42,8 @@ export let filters = {
|
||||
params.append("action", "startCase");
|
||||
return axios.post(
|
||||
window.config.SYS_SERVER_AJAX +
|
||||
window.config.SYS_URI +
|
||||
`cases/casesStartPage_Ajax.php`,
|
||||
window.config.SYS_URI +
|
||||
`cases/casesStartPage_Ajax.php`,
|
||||
params
|
||||
);
|
||||
},
|
||||
@@ -88,11 +88,16 @@ export let filters = {
|
||||
* Service to get the categories list
|
||||
*/
|
||||
categories(query) {
|
||||
let pr = {
|
||||
limit: 15,
|
||||
offset: 0
|
||||
};
|
||||
if (query) {
|
||||
pr["name"] = query;
|
||||
}
|
||||
return Api.get({
|
||||
service: "CATEGORIES",
|
||||
params: {
|
||||
name: query,
|
||||
},
|
||||
params: pr,
|
||||
keys: {},
|
||||
});
|
||||
},
|
||||
@@ -102,8 +107,8 @@ export let filters = {
|
||||
userValues(query) {
|
||||
return axios.post(
|
||||
window.config.SYS_SERVER_AJAX +
|
||||
window.config.SYS_URI +
|
||||
`cases/casesList_Ajax?actionAjax=userValues&action=search`,
|
||||
window.config.SYS_URI +
|
||||
`cases/casesList_Ajax?actionAjax=userValues&action=search`,
|
||||
{
|
||||
query,
|
||||
}
|
||||
|
||||
@@ -13,11 +13,18 @@ export let process = {
|
||||
});
|
||||
}
|
||||
},
|
||||
categories(dt) {
|
||||
totalCasesByProcess(dt) {
|
||||
return Api.get({
|
||||
service: "TOTAL_CASES_BY_PROCESS",
|
||||
params: dt,
|
||||
keys: {}
|
||||
});
|
||||
},
|
||||
processCategories() {
|
||||
return Api.fetch({
|
||||
service: "CATEGORIES",
|
||||
service: "PROCESS_CATEGORIES",
|
||||
method: "get",
|
||||
data: dt,
|
||||
data: {},
|
||||
keys: {}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -69,8 +69,10 @@
|
||||
CATEGORIES: "/home/categories",
|
||||
DEBUG_STATUS: "/home/process-debug-status?processUid={prj_uid}",
|
||||
LIST_TOTAL_CASES: "/metrics/list-total-cases",
|
||||
TOTAL_CASES_BY_PROCESS:"/metrics/total-cases-by-process",
|
||||
CONFIG: "/home/config",
|
||||
GET_CONFIG: "/home/config/{id}/{name}",
|
||||
PAUSE_CASE: "/cases/{app_uid}/pause",
|
||||
REASSIGN_CASE: "/cases/{app_uid}/reassign-case",
|
||||
REASSIGN_USERS: "/light/userstoreassign/{task_uid}",
|
||||
CATEGORIES: "/processcategory/categories"
|
||||
REASSIGN_USERS: "/light/userstoreassign/{task_uid}"
|
||||
};
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
import { menu } from "./Menu";
|
||||
import { cases, casesHeader } from "./Cases";
|
||||
|
||||
import { config } from "./Config";
|
||||
import { caseNotes } from "./CaseNotes";
|
||||
import { process } from "./Process";
|
||||
import { filters } from "./Filters";
|
||||
@@ -13,5 +13,6 @@ export default {
|
||||
casesHeader,
|
||||
process,
|
||||
caseNotes,
|
||||
filters
|
||||
filters,
|
||||
config
|
||||
};
|
||||
239
resources/assets/js/components/iconPicker/IconPicker.vue
Normal file
239
resources/assets/js/components/iconPicker/IconPicker.vue
Normal file
@@ -0,0 +1,239 @@
|
||||
<template>
|
||||
<div class="rbt-icon-picker">
|
||||
<b-button @click="popUpActive = true">
|
||||
<i ref="icon" :class="icon"></i>
|
||||
</b-button>
|
||||
<div class="rip-popup-component" :style="popupActiveStyle">
|
||||
<div class="rip-popup-bg"></div>
|
||||
<div class="rip-popup">
|
||||
<div class="rip-popup-content">
|
||||
<div class="rip-search">
|
||||
<div class="rip-input">
|
||||
<label for="ripSearch" style="display: none;"
|
||||
>Search for Icon</label
|
||||
>
|
||||
<input
|
||||
id="ripSearch"
|
||||
placeholder="Search for Icon"
|
||||
v-model="searchText"
|
||||
@input="searchTextChanged"
|
||||
/>
|
||||
<span class="input-append">
|
||||
<i class="fas fa-search"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="rip-content">
|
||||
<div class="rip-not-found" v-show="loading">
|
||||
<i class="fas fa-spinner fa-pulse"></i>
|
||||
</div>
|
||||
<div class="rip-icons" v-show="!loading">
|
||||
<h4 class="icon-title">
|
||||
Regular Icons
|
||||
</h4>
|
||||
<p
|
||||
style="text-align: center;"
|
||||
v-if="regularIcons.length <= 0"
|
||||
>
|
||||
<i class="fas fa-eye-slash"></i>
|
||||
Sorry, No icons found!
|
||||
</p>
|
||||
<ul class="rip-row" v-if="regularIcons.length > 0">
|
||||
<li
|
||||
v-for="(icon, index) in regularIcons"
|
||||
:key="index"
|
||||
class="rip-col"
|
||||
>
|
||||
<div class="icon-content text-center">
|
||||
<div
|
||||
class="icon-el"
|
||||
@click="selectIcon(icon, 'far')"
|
||||
>
|
||||
<i :class="`far fa-${icon}`"></i>
|
||||
</div>
|
||||
<div class="icon-title">
|
||||
{{ icon }}
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<h4 class="icon-title">
|
||||
Brand Icons
|
||||
</h4>
|
||||
<p
|
||||
style="text-align: center;"
|
||||
v-if="brandIcons.length <= 0"
|
||||
>
|
||||
<i class="fas fa-eye-slash"></i>
|
||||
Sorry, No Brand icons found!
|
||||
</p>
|
||||
<ul class="rip-row" v-if="brandIcons.length > 0">
|
||||
<li
|
||||
v-for="(icon, index) in brandIcons"
|
||||
:key="index"
|
||||
class="rip-col"
|
||||
>
|
||||
<div class="icon-content text-center">
|
||||
<div
|
||||
class="icon-el"
|
||||
@click="selectIcon(icon, 'fab')"
|
||||
>
|
||||
<i :class="`fab fa-${icon}`"></i>
|
||||
</div>
|
||||
<div class="icon-title">
|
||||
{{ icon }}
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<h4 class="icon-title">
|
||||
Solid Icons
|
||||
</h4>
|
||||
<p
|
||||
style="text-align: center;"
|
||||
v-if="solidIcons.length <= 0"
|
||||
>
|
||||
<i class="fas fa-eye-slash"></i>
|
||||
Sorry, No Solid icons found!
|
||||
</p>
|
||||
<ul class="rip-row" v-if="solidIcons.length > 0">
|
||||
<li
|
||||
v-for="(icon, index) in solidIcons"
|
||||
:key="index"
|
||||
class="rip-col"
|
||||
>
|
||||
<div class="icon-content text-center">
|
||||
<div
|
||||
class="icon-el"
|
||||
@click="selectIcon(icon, 'fas')"
|
||||
>
|
||||
<i :class="`fas fa-${icon}`"></i>
|
||||
</div>
|
||||
<div class="icon-title">
|
||||
{{ icon }}
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ripIcons from "./assets/icons";
|
||||
export default {
|
||||
name: "VueAwesomeIconPicker",
|
||||
props: {
|
||||
button: {
|
||||
type: String,
|
||||
default: "Pick A Icon",
|
||||
},
|
||||
color: {
|
||||
type: String,
|
||||
default: "black",
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: "Vue Awesome Icon Picker",
|
||||
},
|
||||
iconPreview: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
default: {
|
||||
type: String,
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
allIcons: {
|
||||
brand: [],
|
||||
regular: [],
|
||||
solid: [],
|
||||
},
|
||||
|
||||
popUpActive: false,
|
||||
icon: null,
|
||||
searchText: "",
|
||||
searchIconNotFound: false,
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
color() {
|
||||
console.log("colores");
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
selectIcon(icon, type) {
|
||||
this.icon = `${type} fa-${icon}`;
|
||||
this.popUpActive = false;
|
||||
this.$emit("selected", this.icon);
|
||||
},
|
||||
searchTextChanged() {
|
||||
this.searchIcon(this.searchText);
|
||||
},
|
||||
setDefaultIcons() {
|
||||
this.allIcons.brand = ripIcons.brand;
|
||||
this.allIcons.regular = ripIcons.regular;
|
||||
this.allIcons.solid = ripIcons.solid;
|
||||
},
|
||||
searchIcon(txt) {
|
||||
this.loading = true;
|
||||
if (txt && txt.length > 0) {
|
||||
setTimeout(() => {
|
||||
this.loading = false;
|
||||
}, 950);
|
||||
|
||||
txt = txt.toLowerCase();
|
||||
Object.keys(ripIcons).forEach((key) => {
|
||||
setTimeout(() => {
|
||||
let icons = ripIcons[key].filter(
|
||||
(ico) => ico.indexOf(txt) > -1
|
||||
);
|
||||
if (icons && icons.length > 0) {
|
||||
this.allIcons[key] = icons;
|
||||
} else {
|
||||
this.allIcons[key] = [];
|
||||
}
|
||||
}, 320);
|
||||
});
|
||||
} else {
|
||||
setTimeout(() => {
|
||||
this.setDefaultIcons();
|
||||
this.loading = false;
|
||||
}, 950);
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.setDefaultIcons();
|
||||
if (this.default) {
|
||||
this.icon = this.default;
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
popupActiveStyle() {
|
||||
return !this.popUpActive ? "display: none;" : "";
|
||||
},
|
||||
brandIcons() {
|
||||
return this.loading ? [] : this.allIcons.brand;
|
||||
},
|
||||
solidIcons() {
|
||||
return this.loading ? [] : this.allIcons.solid;
|
||||
},
|
||||
regularIcons() {
|
||||
return this.loading ? [] : this.allIcons.regular;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "./assets/RbtIconPicker";
|
||||
</style>
|
||||
@@ -0,0 +1,239 @@
|
||||
.rbt-icon-picker {
|
||||
.icon-preview {
|
||||
font-size: 22px;
|
||||
padding: 10px 20px 0;
|
||||
display: inline-block;
|
||||
}
|
||||
.picker-btn {
|
||||
color: #fff;
|
||||
background: #339af0;
|
||||
padding: 12px 25px;
|
||||
border: 0;
|
||||
border-radius: 2px;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.02em;
|
||||
cursor: pointer;
|
||||
transition: all .25s ease-in;
|
||||
&:hover {
|
||||
background: #2c89d6;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.rip-popup-component {
|
||||
text-align: center;
|
||||
z-index: 5999999;
|
||||
transition: all .2s;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
-webkit-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
opacity: 1;
|
||||
.rip-popup-bg {
|
||||
width: 100%;
|
||||
background: rgba(0,0,0,.4);
|
||||
position: absolute;
|
||||
top: 0;
|
||||
height: 100%;
|
||||
z-index: 10;
|
||||
transition: all .25s ease;
|
||||
opacity: 1;
|
||||
left: 0;
|
||||
}
|
||||
.rip-popup {
|
||||
transition: all .2s;
|
||||
z-index: 100;
|
||||
margin: 10px;
|
||||
width: calc(100% - 30px);
|
||||
height: calc(100% - 30px);
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 5px 20px 0 rgba(0,0,0,.1);
|
||||
background: #f8f9fa;
|
||||
animation: rebound .3s;
|
||||
.rip-popup-header {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
background: rgba(0,0,0,.05);
|
||||
border-radius: 5px 5px;
|
||||
position: relative;
|
||||
h2 {
|
||||
transition: all .23s ease .1s;
|
||||
padding: 8px 8px 8px 12px;
|
||||
font-size: 18px;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
}
|
||||
span {
|
||||
background: #ffffff;
|
||||
transition: all .23s ease .1s;
|
||||
position: relative;
|
||||
padding: 8px;
|
||||
cursor: pointer;
|
||||
box-shadow: 0 5px 20px 0 rgba(0,0,0,.1);
|
||||
border-radius: 5px;
|
||||
color: rgba(0,0,0,.6);
|
||||
transform: translate(8px,-8px);
|
||||
line-height: 16px;
|
||||
font-size: 30px;
|
||||
&:hover {
|
||||
box-shadow: 0 0 0 0 rgba(0,0,0,.1);
|
||||
transform: translate(5px,-5px);
|
||||
}
|
||||
}
|
||||
}
|
||||
.rip-popup-content {
|
||||
padding: 14px;
|
||||
font-size: 14px;
|
||||
transition: all .23s ease .1s;
|
||||
overflow: auto;
|
||||
max-height: calc(100vh - 100px);
|
||||
margin-top: 5px;
|
||||
margin-bottom: 5px;
|
||||
.rip-search {
|
||||
.rip-input {
|
||||
display: flex;
|
||||
-webkit-box-align: start;
|
||||
-ms-flex-align: start;
|
||||
align-items: flex-start;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-direction: column;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
-webkit-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
padding-bottom: 20px;
|
||||
border-bottom: 1px dashed #e5e5e5;
|
||||
margin-bottom: 20px;
|
||||
input {
|
||||
width: 100% !important;
|
||||
transition: all .1s ease-in-out;
|
||||
padding: 16px 48px 16px 24px;
|
||||
font-size: 25px;
|
||||
border: 2px solid #dee2e6;
|
||||
box-shadow: inset 0 0.25rem 0.125rem 0 rgba(0,0,0,0.05);
|
||||
color: #495057;
|
||||
border-radius: 4px;
|
||||
&::placeholder {
|
||||
color: #c9cbcd;
|
||||
}
|
||||
}
|
||||
span {
|
||||
position: absolute;
|
||||
right: 25px;
|
||||
font-size: 28px;
|
||||
color: #caccce;
|
||||
opacity: 0.4;
|
||||
}
|
||||
}
|
||||
}
|
||||
.rip-content {
|
||||
width: 100%;
|
||||
.rip-not-found {
|
||||
min-height: 75vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
align-self: center;
|
||||
align-content: center;
|
||||
min-width: 100%;
|
||||
text-align: center;
|
||||
svg {
|
||||
margin: 0 auto;
|
||||
font-size: 50px;
|
||||
color: #adb5bd;
|
||||
}
|
||||
}
|
||||
h4.icon-title {
|
||||
font-size: 20px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.03em;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
.rip-row {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
.rip-col {
|
||||
text-align: center;
|
||||
padding: 0 0 16px;
|
||||
width: 25%;
|
||||
list-style: none;
|
||||
.icon-content {
|
||||
border-radius: 3px;
|
||||
transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
|
||||
transform: translateZ(0);
|
||||
.icon-el {
|
||||
padding: 8px;
|
||||
font-size: 35px;
|
||||
font-weight: 900;
|
||||
color: #495057;
|
||||
cursor: pointer;
|
||||
transition: all ;
|
||||
border-top-left-radius: 3px;
|
||||
border-top-right-radius: 3px;
|
||||
&:hover {
|
||||
color: #fff;
|
||||
background: #339af0;
|
||||
}
|
||||
}
|
||||
.icon-title {
|
||||
padding: 8px 4px;
|
||||
font-size: 13px;
|
||||
color: #adb5bd;
|
||||
&:hover {
|
||||
color: #495057;
|
||||
}
|
||||
}
|
||||
&:hover {
|
||||
background: #fff;
|
||||
box-shadow: 0 0.25rem 0.125rem 0 rgba(0,0,0,0.05);
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 576px) {
|
||||
width: 20%;
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
width: 16.6667%;
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
width: 11.1111%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes rebound {
|
||||
0% {
|
||||
-webkit-transform: scale(.9);
|
||||
transform: scale(.9);
|
||||
}
|
||||
|
||||
50% {
|
||||
-webkit-transform: scale(1.08);
|
||||
transform: scale(1.08);
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: scale(1);
|
||||
transform: scale(1);
|
||||
}
|
||||
}
|
||||
437
resources/assets/js/components/iconPicker/assets/icons/brand.js
Normal file
437
resources/assets/js/components/iconPicker/assets/icons/brand.js
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,7 @@
|
||||
import solid from "./solid";
|
||||
import regular from "./regular";
|
||||
import brand from "./brand";
|
||||
|
||||
const icons = { solid, brand, regular };
|
||||
|
||||
export default icons;
|
||||
@@ -0,0 +1,155 @@
|
||||
const regular = [
|
||||
'address-book',
|
||||
'address-card',
|
||||
'angry',
|
||||
'arrow-alt-circle-down',
|
||||
'arrow-alt-circle-left',
|
||||
'arrow-alt-circle-right',
|
||||
'arrow-alt-circle-up',
|
||||
'bell',
|
||||
'bell-slash',
|
||||
'bookmark',
|
||||
'building',
|
||||
'calendar',
|
||||
'calendar-alt',
|
||||
'calendar-check',
|
||||
'calendar-minus',
|
||||
'calendar-plus',
|
||||
'calendar-times',
|
||||
'caret-square-down',
|
||||
'caret-square-left',
|
||||
'caret-square-right',
|
||||
'caret-square-up',
|
||||
'chart-bar',
|
||||
'check-circle',
|
||||
'check-square',
|
||||
'circle',
|
||||
'clipboard',
|
||||
'clock',
|
||||
'clone',
|
||||
'closed-captioning',
|
||||
'comment',
|
||||
'comment-alt',
|
||||
'comment-dots',
|
||||
'comments',
|
||||
'compass',
|
||||
'copy',
|
||||
'copyright',
|
||||
'credit-card',
|
||||
'dizzy',
|
||||
'dot-circle',
|
||||
'edit',
|
||||
'envelope',
|
||||
'envelope-open',
|
||||
'eye',
|
||||
'eye-slash',
|
||||
'file',
|
||||
'file-alt',
|
||||
'file-archive',
|
||||
'file-audio',
|
||||
'file-code',
|
||||
'file-excel',
|
||||
'file-image',
|
||||
'file-pdf',
|
||||
'file-powerpoint',
|
||||
'file-video',
|
||||
'file-word',
|
||||
'flag',
|
||||
'flushed',
|
||||
'folder',
|
||||
'folder-open',
|
||||
'frown',
|
||||
'frown-open',
|
||||
'futbol',
|
||||
'gem',
|
||||
'grimace',
|
||||
'grin',
|
||||
'grin-alt',
|
||||
'grin-beam',
|
||||
'grin-beam-sweat',
|
||||
'grin-hearts',
|
||||
'grin-squint',
|
||||
'grin-squint-tears',
|
||||
'grin-stars',
|
||||
'grin-tears',
|
||||
'grin-tongue',
|
||||
'grin-tongue-squint',
|
||||
'grin-tongue-wink',
|
||||
'grin-wink',
|
||||
'hand-lizard',
|
||||
'hand-paper',
|
||||
'hand-peace',
|
||||
'hand-point-down',
|
||||
'hand-point-left',
|
||||
'hand-point-right',
|
||||
'hand-point-up',
|
||||
'hand-pointer',
|
||||
'hand-rock',
|
||||
'hand-scissors',
|
||||
'hand-spock',
|
||||
'handshake',
|
||||
'hdd',
|
||||
'heart',
|
||||
'hospital',
|
||||
'hourglass',
|
||||
'id-badge',
|
||||
'id-card',
|
||||
'image',
|
||||
'images',
|
||||
'keyboard',
|
||||
'kiss',
|
||||
'kiss-beam',
|
||||
'kiss-wink-heart',
|
||||
'laugh',
|
||||
'laugh-beam',
|
||||
'laugh-squint',
|
||||
'laugh-wink',
|
||||
'lemon',
|
||||
'life-ring',
|
||||
'lightbulb',
|
||||
'list-alt',
|
||||
'map',
|
||||
'meh',
|
||||
'meh-blank',
|
||||
'meh-rolling-eyes',
|
||||
'minus-square',
|
||||
'money-bill-alt',
|
||||
'moon',
|
||||
'newspaper',
|
||||
'object-group',
|
||||
'object-ungroup',
|
||||
'paper-plane',
|
||||
'pause-circle',
|
||||
'play-circle',
|
||||
'plus-square',
|
||||
'question-circle',
|
||||
'registered',
|
||||
'sad-cry',
|
||||
'sad-tear',
|
||||
'save',
|
||||
'share-square',
|
||||
'smile',
|
||||
'smile-beam',
|
||||
'smile-wink',
|
||||
'snowflake',
|
||||
'square',
|
||||
'star',
|
||||
'star-half',
|
||||
'sticky-note',
|
||||
'stop-circle',
|
||||
'sun',
|
||||
'surprise',
|
||||
'thumbs-down',
|
||||
'thumbs-up',
|
||||
'times-circle',
|
||||
'tired',
|
||||
'trash-alt',
|
||||
'user',
|
||||
'user-circle',
|
||||
'window-close',
|
||||
'window-maximize',
|
||||
'window-minimize',
|
||||
'window-restore'
|
||||
];
|
||||
|
||||
export default regular;
|
||||
962
resources/assets/js/components/iconPicker/assets/icons/solid.js
Normal file
962
resources/assets/js/components/iconPicker/assets/icons/solid.js
Normal file
File diff suppressed because it is too large
Load Diff
@@ -234,8 +234,10 @@ export default {
|
||||
if (element) {
|
||||
initialFilters = this.prepareFilterItems(element.items, this.selected, true);
|
||||
}
|
||||
//adding process name filter
|
||||
initialFilters =[...new Set([...initialFilters,...this.prepareFilterItems(this.processName.items, self.byProcessName, true)])];
|
||||
//adding process name filter
|
||||
if (self.byProcessName !== "") {
|
||||
initialFilters =[...new Set([...initialFilters,...this.prepareFilterItems(this.processName.items, self.byProcessName, true)])];
|
||||
}
|
||||
this.$emit("onUpdateFilters", {params: initialFilters, refresh: false});
|
||||
},
|
||||
/**
|
||||
|
||||
53
resources/assets/js/components/utils/BreadCrumb.vue
Normal file
53
resources/assets/js/components/utils/BreadCrumb.vue
Normal file
@@ -0,0 +1,53 @@
|
||||
<template>
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
<li
|
||||
v-for="item in formatOptions(options)"
|
||||
:key="item.label"
|
||||
:class="item.classObject"
|
||||
>
|
||||
<span v-if="item.classObject.active === true">{{ item.label }}</span>
|
||||
<a
|
||||
v-if="item.classObject.active === false"
|
||||
href="#"
|
||||
@click="item.onClick"
|
||||
>{{ item.label }}</a
|
||||
>
|
||||
</li>
|
||||
</ol>
|
||||
</nav>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import _ from "lodash";
|
||||
export default {
|
||||
name: "BreadCrumb",
|
||||
props: ["options"],
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* format options to Bread Crumbs
|
||||
*/
|
||||
formatOptions(data) {
|
||||
let options = data;
|
||||
for (let i = 0; i <= options.length - 1; i++) {
|
||||
if (i === options.length - 1) {
|
||||
options[i].classObject = {
|
||||
"breadcrumb-item": true,
|
||||
active: true,
|
||||
};
|
||||
} else {
|
||||
options[i].classObject = {
|
||||
"breadcrumb-item": true,
|
||||
active: false,
|
||||
};
|
||||
}
|
||||
}
|
||||
console.log("aquii");
|
||||
return options;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -0,0 +1,17 @@
|
||||
<template>
|
||||
<font-awesome-icon v-if="props.sortable" :icon="icon" class="fa-pull-right"/>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: "VtSortControl",
|
||||
props: ['props'],
|
||||
computed: {
|
||||
icon() {
|
||||
// if not sorted return base icon
|
||||
if (!this.props.sortStatus.sorted) return 'sort';
|
||||
// return sort direction icon
|
||||
return this.props.sortStatus.asc ? 'sort-amount-up' : 'sort-amount-down';
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -169,21 +169,12 @@ export default {
|
||||
selectAllMode: "page",
|
||||
programmatic: false,
|
||||
},
|
||||
sortable: [],
|
||||
orderBy: {},
|
||||
requestFunction(data) {
|
||||
return this.$parent.$parent.getCasesForVueTable(data);
|
||||
},
|
||||
customFilters: ["myfilter"],
|
||||
settings: {
|
||||
"actions":{
|
||||
class: "fas fa-cog",
|
||||
id:"pm-dr-column-settings",
|
||||
events:{
|
||||
click(){
|
||||
that.$root.$emit('bv::show::popover', 'pm-dr-column-settings')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
customFilters: ["myfilter"]
|
||||
},
|
||||
pmDateFormat: window.config.FORMATS.dateFormat,
|
||||
clickCount: 0,
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
ref="vueTable"
|
||||
@row-click="onRowClick"
|
||||
:key="random"
|
||||
name="draft"
|
||||
>
|
||||
<div slot="detail" slot-scope="props">
|
||||
<div class="btn-default" @click="openCaseDetail(props.row)">
|
||||
@@ -194,6 +195,7 @@ import VueCardView from "../../components/dataViews/vueCardView/VueCardView.vue"
|
||||
import VueListView from "../../components/dataViews/vueListView/VueListView.vue";
|
||||
import defaultMixins from "./defaultMixins";
|
||||
import Ellipsis from '../../components/utils/ellipsis.vue';
|
||||
import { Event } from 'vue-tables-2';
|
||||
|
||||
export default {
|
||||
name: "Draft",
|
||||
@@ -209,10 +211,15 @@ export default {
|
||||
VueCardView,
|
||||
VueListView
|
||||
},
|
||||
props: ["defaultOption", "filters"],
|
||||
props: ["defaultOption", "settings"],
|
||||
data() {
|
||||
let that = this;
|
||||
return {
|
||||
columMap: {
|
||||
case_number: "APP_NUMBER",
|
||||
case_title: "DEL_TITLE",
|
||||
process_name: "PRO_TITLE"
|
||||
},
|
||||
newCase: {
|
||||
title: this.$i18n.t("ID_NEW_CASE"),
|
||||
class: "btn-success",
|
||||
@@ -220,21 +227,28 @@ export default {
|
||||
this.$refs["newRequest"].show();
|
||||
},
|
||||
},
|
||||
columns: [
|
||||
"detail",
|
||||
"case_number",
|
||||
"case_title",
|
||||
"process_name",
|
||||
"task",
|
||||
"priority",
|
||||
"actions"
|
||||
],
|
||||
filters:
|
||||
this.settings && this.settings.filters
|
||||
? this.settings.filters
|
||||
: {},
|
||||
columns:
|
||||
this.settings && this.settings.columns
|
||||
? this.settings.columns
|
||||
: [
|
||||
"detail",
|
||||
"case_number",
|
||||
"case_title",
|
||||
"process_name",
|
||||
"task",
|
||||
"priority",
|
||||
"actions"
|
||||
],
|
||||
tableData: [],
|
||||
icon:"fas fa-edit",
|
||||
options: {
|
||||
filterable: false,
|
||||
headings: {
|
||||
detail: "",
|
||||
detail: this.$i18n.t("ID_DETAIL_CASE"),
|
||||
case_number: this.$i18n.t("ID_MYCASE_NUMBER"),
|
||||
case_title: this.$i18n.t("ID_CASE_TITLE"),
|
||||
process_name: this.$i18n.t("ID_PROCESS_NAME"),
|
||||
@@ -249,6 +263,8 @@ export default {
|
||||
selectAllMode: "page",
|
||||
programmatic: false,
|
||||
},
|
||||
sortable: ['case_number'],
|
||||
orderBy: this.settings && this.settings.orderBy ? this.settings.orderBy: {},
|
||||
requestFunction(data) {
|
||||
return this.$parent.$parent.getCasesForVueTable(data);
|
||||
},
|
||||
@@ -294,9 +310,21 @@ export default {
|
||||
this.initFilters();
|
||||
},
|
||||
mounted() {
|
||||
let that = this;
|
||||
this.openDefaultCase();
|
||||
// define sort event
|
||||
Event.$on('vue-tables.draft.sorted', function (data) {
|
||||
that.$emit("updateUserSettings", "orderBy", data);
|
||||
});
|
||||
},
|
||||
watch: {
|
||||
columns: function (val) {
|
||||
this.$emit("updateUserSettings", "columns", val);
|
||||
},
|
||||
filters: function (val) {
|
||||
this.$emit("updateUserSettings", "filters", val);
|
||||
},
|
||||
},
|
||||
watch: {},
|
||||
computed: {
|
||||
/**
|
||||
* Build our ProcessMaker apiClient
|
||||
@@ -388,7 +416,8 @@ export default {
|
||||
paged,
|
||||
limit = data.limit,
|
||||
start = data.page === 1 ? 0 : limit * (data.page - 1),
|
||||
filters = {};
|
||||
filters = {},
|
||||
sort = "";
|
||||
paged = start + "," + limit;
|
||||
|
||||
filters = {
|
||||
@@ -400,6 +429,10 @@ export default {
|
||||
filters[item.filterVar] = item.value;
|
||||
}
|
||||
});
|
||||
sort = that.prepareSortString(data);
|
||||
if (sort) {
|
||||
filters["sort"] = sort;
|
||||
}
|
||||
return new Promise((resolutionFunc, rejectionFunc) => {
|
||||
api.cases
|
||||
.draft(filters)
|
||||
@@ -415,6 +448,18 @@ export default {
|
||||
});
|
||||
});
|
||||
},
|
||||
/**
|
||||
* Prepare sort string to be sended in the service
|
||||
* @param {object} data
|
||||
* @returns {string}
|
||||
*/
|
||||
prepareSortString(data){
|
||||
let sort = "";
|
||||
if (data.orderBy && this.columMap[data.orderBy]) {
|
||||
sort = `${this.columMap[data.orderBy]},${data.ascending === 1 ? "ASC": "DESC"}`;
|
||||
}
|
||||
return sort;
|
||||
},
|
||||
/**
|
||||
* Format Response API TODO to grid todo and columns
|
||||
*/
|
||||
@@ -480,7 +525,7 @@ export default {
|
||||
},
|
||||
onRemoveFilter(data) {},
|
||||
onUpdateFilters(data) {
|
||||
this.$emit("onUpdateFilters", data.params);
|
||||
this.filters = data.params;
|
||||
if (data.refresh) {
|
||||
this.$nextTick(() => {
|
||||
if (this.typeView === "GRID") {
|
||||
|
||||
@@ -87,7 +87,9 @@ export default {
|
||||
|
||||
_.forIn(this.filters, function (item, key) {
|
||||
if (item.value && item.value != "") {
|
||||
filters[item.filterVar] = item.value;
|
||||
if(filters && item.value) {
|
||||
filters[item.filterVar] = item.value;
|
||||
}
|
||||
}
|
||||
});
|
||||
return new Promise((resolutionFunc, rejectionFunc) => {
|
||||
|
||||
@@ -20,19 +20,21 @@
|
||||
<component
|
||||
v-bind:is="page"
|
||||
ref="component"
|
||||
:filters="filters"
|
||||
:id="pageId"
|
||||
:pageUri="pageUri"
|
||||
:name="pageName"
|
||||
:defaultOption="defaultOption"
|
||||
@onSubmitFilter="onSubmitFilter"
|
||||
:settings="config.setting[page]"
|
||||
:filters="filters"
|
||||
@onSubmitFilter="onSubmitFilter"
|
||||
@onRemoveFilter="onRemoveFilter"
|
||||
@onUpdatePage="onUpdatePage"
|
||||
@onUpdateDataCase="onUpdateDataCase"
|
||||
@onLastPage="onLastPage"
|
||||
@onUpdateFilters="onUpdateFilters"
|
||||
@cleanDefaultOption="cleanDefaultOption"
|
||||
></component>
|
||||
@updateUserSettings="updateUserSettings"
|
||||
></component>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -87,6 +89,11 @@ export default {
|
||||
pageName: null,
|
||||
pageUri: null,
|
||||
filters: null,
|
||||
config: {
|
||||
id: window.config.userId || "1",
|
||||
name: "home",
|
||||
setting: {}
|
||||
},
|
||||
menuMap: {
|
||||
CASES_MY_CASES: "MyCases",
|
||||
CASES_SENT: "MyCases",
|
||||
@@ -105,6 +112,7 @@ export default {
|
||||
mounted() {
|
||||
this.onResize();
|
||||
this.getMenu();
|
||||
this.getUserSettings();
|
||||
this.listenerIframe();
|
||||
window.setInterval(
|
||||
this.setCounter,
|
||||
@@ -150,6 +158,65 @@ export default {
|
||||
console.error(e);
|
||||
});
|
||||
},
|
||||
/**
|
||||
* Gets the user config
|
||||
*/
|
||||
getUserSettings() {
|
||||
api.config
|
||||
.get({
|
||||
id: this.config.id,
|
||||
name: this.config.name
|
||||
})
|
||||
.then((response) => {
|
||||
if (response.data) {
|
||||
this.config = response.data;
|
||||
} else {
|
||||
this.createUserSettings();
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
console.error(e);
|
||||
});
|
||||
},
|
||||
/**
|
||||
* Creates the user config service
|
||||
*/
|
||||
createUserSettings() {
|
||||
api.config
|
||||
.post({
|
||||
...this.configParams,
|
||||
...{setting: '{}'}
|
||||
})
|
||||
.then((response) => {
|
||||
if (response.data) {
|
||||
this.config = response.data;
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
console.error(e);
|
||||
});
|
||||
},
|
||||
/**
|
||||
* Update the user config service
|
||||
*/
|
||||
updateUserSettings(prop, data) {
|
||||
if (this.config.setting) {
|
||||
if (!this.config.setting[this.page]) {
|
||||
this.config.setting[this.page] = {};
|
||||
}
|
||||
this.config.setting[this.page][prop] = data;
|
||||
api.config
|
||||
.put(this.config)
|
||||
.then((response) => {
|
||||
if (response.data) {
|
||||
//TODO success response
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
console.error(e);
|
||||
});
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Set default cases menu option
|
||||
*/
|
||||
@@ -337,7 +404,7 @@ export default {
|
||||
},
|
||||
onUpdateFilters(filters) {
|
||||
this.filters = filters;
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
ref="vueTable"
|
||||
@row-click="onRowClick"
|
||||
:key="random"
|
||||
name="todo"
|
||||
>
|
||||
<div slot="detail" slot-scope="props">
|
||||
<div class="btn-default" @click="openCaseDetail(props.row)">
|
||||
@@ -227,6 +228,7 @@ import defaultMixins from "./defaultMixins";
|
||||
import Ellipsis from '../../components/utils/ellipsis.vue';
|
||||
import ModalPauseCase from '../modal/ModalPauseCase.vue';
|
||||
import ModalReassignCase from '../modal/ModalReassignCase.vue';
|
||||
import { Event } from 'vue-tables-2';
|
||||
import CurrentUserCell from "../../components/vuetable/CurrentUserCell.vue";
|
||||
|
||||
export default {
|
||||
@@ -246,10 +248,15 @@ export default {
|
||||
ModalReassignCase,
|
||||
CurrentUserCell,
|
||||
},
|
||||
props: ["defaultOption", "filters"],
|
||||
props: ["defaultOption", "settings"],
|
||||
data() {
|
||||
let that = this;
|
||||
return {
|
||||
columMap: {
|
||||
case_number: "APP_NUMBER",
|
||||
case_title: "DEL_TITLE",
|
||||
process_name: "PRO_TITLE"
|
||||
},
|
||||
newCase: {
|
||||
title: this.$i18n.t("ID_NEW_CASE"),
|
||||
class: "btn-success",
|
||||
@@ -257,18 +264,25 @@ export default {
|
||||
this.$refs["newRequest"].show();
|
||||
},
|
||||
},
|
||||
columns: [
|
||||
"detail",
|
||||
"case_number",
|
||||
"case_title",
|
||||
"process_name",
|
||||
"task",
|
||||
"send_by",
|
||||
"due_date",
|
||||
"delegation_date",
|
||||
"priority",
|
||||
"actions"
|
||||
],
|
||||
filters:
|
||||
this.settings && this.settings.filters
|
||||
? this.settings.filters
|
||||
: {},
|
||||
columns:
|
||||
this.settings && this.settings.columns
|
||||
? this.settings.columns
|
||||
: [
|
||||
"detail",
|
||||
"case_number",
|
||||
"case_title",
|
||||
"process_name",
|
||||
"task",
|
||||
"send_by",
|
||||
"due_date",
|
||||
"delegation_date",
|
||||
"priority",
|
||||
"actions"
|
||||
],
|
||||
tableData: [],
|
||||
icon:"fas fa-check-circle",
|
||||
options: {
|
||||
@@ -302,6 +316,8 @@ export default {
|
||||
selectAllMode: "page",
|
||||
programmatic: false,
|
||||
},
|
||||
sortable: ['case_number'],
|
||||
orderBy: this.settings && this.settings.orderBy ? this.settings.orderBy: {},
|
||||
requestFunction(data) {
|
||||
return this.$parent.$parent.getCasesForVueTable(data);
|
||||
},
|
||||
@@ -338,10 +354,22 @@ export default {
|
||||
this.initFilters();
|
||||
},
|
||||
mounted() {
|
||||
let that = this;
|
||||
// force to open case
|
||||
this.openDefaultCase();
|
||||
// define sort event
|
||||
Event.$on('vue-tables.todo.sorted', function (data) {
|
||||
that.$emit("updateUserSettings", "orderBy", data);
|
||||
});
|
||||
},
|
||||
watch: {
|
||||
columns: function (val) {
|
||||
this.$emit("updateUserSettings", "columns", val);
|
||||
},
|
||||
filters: function (val) {
|
||||
this.$emit("updateUserSettings", "filters", val);
|
||||
},
|
||||
},
|
||||
watch: {},
|
||||
computed: {
|
||||
/**
|
||||
* Build our ProcessMaker apiClient
|
||||
@@ -433,18 +461,22 @@ export default {
|
||||
paged,
|
||||
limit = data.limit,
|
||||
start = data.page === 1 ? 0 : limit * (data.page - 1),
|
||||
filters = {};
|
||||
filters = {},
|
||||
sort = "";
|
||||
paged = start + "," + limit;
|
||||
|
||||
filters = {
|
||||
paged: paged,
|
||||
};
|
||||
|
||||
}
|
||||
_.forIn(this.filters, function (item, key) {
|
||||
if(filters && item.value) {
|
||||
filters[item.filterVar] = item.value;
|
||||
}
|
||||
});
|
||||
sort = that.prepareSortString(data);
|
||||
if (sort) {
|
||||
filters["sort"] = sort;
|
||||
}
|
||||
return new Promise((resolutionFunc, rejectionFunc) => {
|
||||
api.cases
|
||||
.todo(filters)
|
||||
@@ -460,6 +492,18 @@ export default {
|
||||
});
|
||||
});
|
||||
},
|
||||
/**
|
||||
* Prepare sort string to be sended in the service
|
||||
* @param {object} data
|
||||
* @returns {string}
|
||||
*/
|
||||
prepareSortString(data){
|
||||
let sort = "";
|
||||
if (data.orderBy && this.columMap[data.orderBy]) {
|
||||
sort = `${this.columMap[data.orderBy]},${data.ascending === 1 ? "ASC": "DESC"}`;
|
||||
}
|
||||
return sort;
|
||||
},
|
||||
/**
|
||||
* Format Response API TODO to grid todo and columns
|
||||
*/
|
||||
@@ -562,7 +606,7 @@ export default {
|
||||
},
|
||||
onRemoveFilter(data) {},
|
||||
onUpdateFilters(data) {
|
||||
this.$emit("onUpdateFilters", data.params);
|
||||
this.filters = data.params;
|
||||
if (data.refresh) {
|
||||
this.$nextTick(() => {
|
||||
if (this.typeView === "GRID") {
|
||||
|
||||
@@ -120,7 +120,9 @@ export default {
|
||||
paged: paged,
|
||||
};
|
||||
_.forIn(this.filters, function (item, key) {
|
||||
filters[item.filterVar] = item.value;
|
||||
if(filters && item.value) {
|
||||
filters[item.filterVar] = item.value;
|
||||
}
|
||||
});
|
||||
return new Promise((resolutionFunc, rejectionFunc) => {
|
||||
api.cases
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -23,6 +23,7 @@
|
||||
ref="vueTable"
|
||||
@row-click="onRowClick"
|
||||
:key="random"
|
||||
name="paused"
|
||||
>
|
||||
<div slot="detail" slot-scope="props">
|
||||
<div class="btn-default" @click="openCaseDetail(props.row)">
|
||||
@@ -226,6 +227,7 @@ import VueListView from "../../components/dataViews/vueListView/VueListView.vue"
|
||||
import defaultMixins from "./defaultMixins";
|
||||
import Ellipsis from '../../components/utils/ellipsis.vue';
|
||||
import ModalReassignCase from '../modal/ModalReassignCase.vue';
|
||||
import { Event } from 'vue-tables-2';
|
||||
import CurrentUserCell from "../../components/vuetable/CurrentUserCell.vue";
|
||||
|
||||
export default {
|
||||
@@ -245,10 +247,15 @@ export default {
|
||||
ModalReassignCase,
|
||||
CurrentUserCell,
|
||||
},
|
||||
props: ["defaultOption", "filters"],
|
||||
props: ["defaultOption", "settings"],
|
||||
data() {
|
||||
let that = this;
|
||||
return {
|
||||
columMap: {
|
||||
case_number: "APP_NUMBER",
|
||||
case_title: "DEL_TITLE",
|
||||
process_name: "PRO_TITLE"
|
||||
},
|
||||
newCase: {
|
||||
title: this.$i18n.t("ID_NEW_CASE"),
|
||||
class: "btn-success",
|
||||
@@ -256,18 +263,25 @@ export default {
|
||||
this.$refs["newRequest"].show();
|
||||
},
|
||||
},
|
||||
columns: [
|
||||
"detail",
|
||||
"case_number",
|
||||
"case_title",
|
||||
"process_name",
|
||||
"task",
|
||||
"send_by",
|
||||
"due_date",
|
||||
"delegation_date",
|
||||
"priority",
|
||||
"actions",
|
||||
],
|
||||
filters:
|
||||
this.settings && this.settings.filters
|
||||
? this.settings.filters
|
||||
: {},
|
||||
columns:
|
||||
this.settings && this.settings.columns
|
||||
? this.settings.columns
|
||||
: [
|
||||
"detail",
|
||||
"case_number",
|
||||
"case_title",
|
||||
"process_name",
|
||||
"task",
|
||||
"send_by",
|
||||
"due_date",
|
||||
"delegation_date",
|
||||
"priority",
|
||||
"actions"
|
||||
],
|
||||
tableData: [],
|
||||
icon:"far fa-pause-circle",
|
||||
options: {
|
||||
@@ -301,6 +315,8 @@ export default {
|
||||
selectAllMode: "page",
|
||||
programmatic: false,
|
||||
},
|
||||
sortable: ['case_number'],
|
||||
orderBy: this.settings && this.settings.orderBy ? this.settings.orderBy: {},
|
||||
requestFunction(data) {
|
||||
return this.$parent.$parent.getCasesForVueTable(data);
|
||||
},
|
||||
@@ -337,10 +353,21 @@ export default {
|
||||
this.initFilters();
|
||||
},
|
||||
mounted() {
|
||||
let that = this;
|
||||
// force to open case
|
||||
this.openDefaultCase();
|
||||
Event.$on('vue-tables.paused.sorted', function (data) {
|
||||
that.$emit("updateUserSettings", "orderBy", data);
|
||||
});
|
||||
},
|
||||
watch: {
|
||||
columns: function (val) {
|
||||
this.$emit("updateUserSettings", "columns", val);
|
||||
},
|
||||
filters: function (val) {
|
||||
this.$emit("updateUserSettings", "filters", val);
|
||||
},
|
||||
},
|
||||
watch: {},
|
||||
computed: {
|
||||
/**
|
||||
* Build our ProcessMaker apiClient
|
||||
@@ -432,7 +459,8 @@ export default {
|
||||
paged,
|
||||
limit = data.limit,
|
||||
start = data.page === 1 ? 0 : limit * (data.page - 1),
|
||||
filters = {};
|
||||
filters = {},
|
||||
sort = "";
|
||||
paged = start + "," + limit;
|
||||
|
||||
filters = {
|
||||
@@ -444,6 +472,10 @@ export default {
|
||||
filters[item.filterVar] = item.value;
|
||||
}
|
||||
});
|
||||
sort = that.prepareSortString(data);
|
||||
if (sort) {
|
||||
filters["sort"] = sort;
|
||||
}
|
||||
return new Promise((resolutionFunc, rejectionFunc) => {
|
||||
api.cases
|
||||
.paused(filters)
|
||||
@@ -459,6 +491,18 @@ export default {
|
||||
});
|
||||
});
|
||||
},
|
||||
/**
|
||||
* Prepare sort string to be sended in the service
|
||||
* @param {object} data
|
||||
* @returns {string}
|
||||
*/
|
||||
prepareSortString(data){
|
||||
let sort = "";
|
||||
if (data.orderBy && this.columMap[data.orderBy]) {
|
||||
sort = `${this.columMap[data.orderBy]},${data.ascending === 1 ? "ASC": "DESC"}`;
|
||||
}
|
||||
return sort;
|
||||
},
|
||||
/**
|
||||
* Format Response API TODO to grid todo and columns
|
||||
*/
|
||||
@@ -560,7 +604,7 @@ export default {
|
||||
},
|
||||
onRemoveFilter(data) {},
|
||||
onUpdateFilters(data) {
|
||||
this.$emit("onUpdateFilters", data.params);
|
||||
this.filters = data.params;
|
||||
if (data.refresh) {
|
||||
this.$nextTick(() => {
|
||||
if (this.typeView === "GRID") {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user