@@ -250,15 +250,27 @@
|
|||||||
></b-popover>
|
></b-popover>
|
||||||
</b-col>
|
</b-col>
|
||||||
<b-col cols="6">
|
<b-col cols="6">
|
||||||
<b-form-checkbox
|
<b-form-checkbox
|
||||||
|
v-if="disabledField(props.row.field)"
|
||||||
v-model="enabledFilterRows"
|
v-model="enabledFilterRows"
|
||||||
@change="onTongleFilter(props.row.field)"
|
@change="onTongleFilter(props.row.field)"
|
||||||
name="check-button"
|
name="check-button"
|
||||||
:checked="props.row.enableFilter"
|
:checked="props.row.enableFilter"
|
||||||
:value="props.row.field"
|
:value="props.row.field"
|
||||||
switch
|
switch
|
||||||
>
|
disabled
|
||||||
</b-form-checkbox>
|
>
|
||||||
|
</b-form-checkbox>
|
||||||
|
<b-form-checkbox
|
||||||
|
v-else
|
||||||
|
v-model="enabledFilterRows"
|
||||||
|
@change="onTongleFilter(props.row.field)"
|
||||||
|
name="check-button"
|
||||||
|
:checked="props.row.enableFilter"
|
||||||
|
:value="props.row.field"
|
||||||
|
switch
|
||||||
|
>
|
||||||
|
</b-form-checkbox>
|
||||||
</b-col>
|
</b-col>
|
||||||
</b-row>
|
</b-row>
|
||||||
</div>
|
</div>
|
||||||
@@ -294,7 +306,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import utils from "../../../utils/utils";
|
|
||||||
import Multiselect from "vue-multiselect";
|
import Multiselect from "vue-multiselect";
|
||||||
import Api from "./Api/CaseList";
|
import Api from "./Api/CaseList";
|
||||||
import IconPicker from "../../../components/iconPicker/IconPicker.vue";
|
import IconPicker from "../../../components/iconPicker/IconPicker.vue";
|
||||||
@@ -420,7 +431,8 @@ export default {
|
|||||||
this.data =this.params.columns.filter(elem => elem.set === false);
|
this.data =this.params.columns.filter(elem => elem.set === false);
|
||||||
this.dataCaseList =this.params.columns.filter(elem => elem.set === true);
|
this.dataCaseList =this.params.columns.filter(elem => elem.set === true);
|
||||||
this.dataCaseList.forEach(function (value) {
|
this.dataCaseList.forEach(function (value) {
|
||||||
if (value.enableFilter) {
|
//Force to false in process_category & process_name
|
||||||
|
if (value.enableFilter && !that.disabledField(value.field)) {
|
||||||
that.enabledFilterRows.push(value.field);
|
that.enabledFilterRows.push(value.field);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -729,6 +741,10 @@ export default {
|
|||||||
columns.push('actions');
|
columns.push('actions');
|
||||||
columns.unshift('detail');
|
columns.unshift('detail');
|
||||||
return columns
|
return columns
|
||||||
|
},
|
||||||
|
disabledField(field){
|
||||||
|
const fields = [ "due_date" , "process_category" , "process_name" , "priority" ];
|
||||||
|
return !(fields.indexOf(field) == -1);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import VueSidebarMenu from "vue-sidebar-menu";
|
|||||||
import VueI18n from 'vue-i18n';
|
import VueI18n from 'vue-i18n';
|
||||||
import { BootstrapVue } from 'bootstrap-vue';
|
import { BootstrapVue } from 'bootstrap-vue';
|
||||||
import { ServerTable, Event, ClientTable} from 'vue-tables-2';
|
import { ServerTable, Event, ClientTable} from 'vue-tables-2';
|
||||||
import Sortable from 'sortablejs';
|
|
||||||
import "@fortawesome/fontawesome-free/css/all.css";
|
import "@fortawesome/fontawesome-free/css/all.css";
|
||||||
import 'bootstrap/dist/css/bootstrap-grid.css';
|
import 'bootstrap/dist/css/bootstrap-grid.css';
|
||||||
import 'bootstrap/dist/css/bootstrap.min.css'
|
import 'bootstrap/dist/css/bootstrap.min.css'
|
||||||
|
|||||||
@@ -127,7 +127,7 @@
|
|||||||
<span v-if="column === 'case_number'" class="v-card-text-highlight">
|
<span v-if="column === 'case_number'" class="v-card-text-highlight">
|
||||||
{{ props["item"]["CASE_NUMBER"] }}
|
{{ props["item"]["CASE_NUMBER"] }}
|
||||||
</span>
|
</span>
|
||||||
<span v-if="column === 'thread_title'" class="v-card-text-highlight">
|
<span v-if="column === 'case_title'" class="v-card-text-highlight">
|
||||||
{{ props["item"]["THREAD_TITLE"] }}
|
{{ props["item"]["THREAD_TITLE"] }}
|
||||||
</span>
|
</span>
|
||||||
<span v-if="column === 'process_category'" class="v-card-text-highlight">
|
<span v-if="column === 'process_category'" class="v-card-text-highlight">
|
||||||
@@ -184,7 +184,7 @@
|
|||||||
<span v-if="column === 'case_number'" class="v-card-text-highlight">
|
<span v-if="column === 'case_number'" class="v-card-text-highlight">
|
||||||
{{ props["item"]["CASE_NUMBER"] }}
|
{{ props["item"]["CASE_NUMBER"] }}
|
||||||
</span>
|
</span>
|
||||||
<span v-if="column === 'thread_title'" class="v-card-text-highlight">
|
<span v-if="column === 'case_title'" class="v-card-text-highlight">
|
||||||
{{ props["item"]["THREAD_TITLE"] }}
|
{{ props["item"]["THREAD_TITLE"] }}
|
||||||
</span>
|
</span>
|
||||||
<span v-if="column === 'process_category'" class="v-card-text-highlight">
|
<span v-if="column === 'process_category'" class="v-card-text-highlight">
|
||||||
@@ -398,6 +398,7 @@ export default {
|
|||||||
},
|
},
|
||||||
itemMap: {
|
itemMap: {
|
||||||
case_number: "caseNumber",
|
case_number: "caseNumber",
|
||||||
|
task: "taskTitle",
|
||||||
thread_title: "caseTitle",
|
thread_title: "caseTitle",
|
||||||
delegation_date: "delegationDate",
|
delegation_date: "delegationDate",
|
||||||
send_by: "bySendBy",
|
send_by: "bySendBy",
|
||||||
@@ -846,7 +847,7 @@ export default {
|
|||||||
product.optionLabel = item.name;
|
product.optionLabel = item.name;
|
||||||
product.tagPrefix = item.name;
|
product.tagPrefix = item.name;
|
||||||
if (product.items && product.items[0]) {
|
if (product.items && product.items[0]) {
|
||||||
product.items[0].id = item.field;
|
product.items[0].id = item.idFilter?item.idFilter : item.field;
|
||||||
}
|
}
|
||||||
product.placeholder = "";
|
product.placeholder = "";
|
||||||
return product;
|
return product;
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ export default {
|
|||||||
dataCasesList: [],
|
dataCasesList: [],
|
||||||
defaultColumns: [
|
defaultColumns: [
|
||||||
"case_number",
|
"case_number",
|
||||||
"thread_title",
|
"case_title",
|
||||||
"process_name",
|
"process_name",
|
||||||
"task",
|
"task",
|
||||||
"send_by",
|
"send_by",
|
||||||
@@ -69,7 +69,7 @@ export default {
|
|||||||
},
|
},
|
||||||
headings: {
|
headings: {
|
||||||
case_number: this.$i18n.t("ID_MYCASE_NUMBER"),
|
case_number: this.$i18n.t("ID_MYCASE_NUMBER"),
|
||||||
thread_title: this.$i18n.t('ID_CASE_THREAD_TITLE'),
|
case_title: this.$i18n.t('ID_CASE_THREAD_TITLE'),
|
||||||
process_name: this.$i18n.t("ID_PROCESS_NAME"),
|
process_name: this.$i18n.t("ID_PROCESS_NAME"),
|
||||||
task: this.$i18n.t("ID_TASK"),
|
task: this.$i18n.t("ID_TASK"),
|
||||||
send_by: this.$i18n.t("ID_SEND_BY"),
|
send_by: this.$i18n.t("ID_SEND_BY"),
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ export default {
|
|||||||
"task"
|
"task"
|
||||||
],
|
],
|
||||||
requestFunction(data) {
|
requestFunction(data) {
|
||||||
return that.getCases(data);
|
return that.getCasesViewMore(data);
|
||||||
},
|
},
|
||||||
requestFunctionViewMore(data) {
|
requestFunctionViewMore(data) {
|
||||||
return that.getCasesViewMore(data);
|
return that.getCasesViewMore(data);
|
||||||
@@ -83,31 +83,6 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/**
|
|
||||||
* Get cases for Vue Card View
|
|
||||||
*/
|
|
||||||
getCases(data) {
|
|
||||||
let that = this,
|
|
||||||
dt,
|
|
||||||
filters = {};
|
|
||||||
_.forIn(this.filters, function (item, key) {
|
|
||||||
filters[item.filterVar] = item.value;
|
|
||||||
});
|
|
||||||
return new Promise((resolutionFunc, rejectionFunc) => {
|
|
||||||
api.cases
|
|
||||||
.draft(filters)
|
|
||||||
.then((response) => {
|
|
||||||
dt = that.formatDataResponse(response.data.data);
|
|
||||||
resolutionFunc({
|
|
||||||
data: dt,
|
|
||||||
count: response.data.total,
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.catch((e) => {
|
|
||||||
rejectionFunc(e);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/**
|
/**
|
||||||
* Get cases for Vue Card View
|
* Get cases for Vue Card View
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ export default {
|
|||||||
"send_by",
|
"send_by",
|
||||||
],
|
],
|
||||||
requestFunction(data) {
|
requestFunction(data) {
|
||||||
return that.getCases(data);
|
return that.getCasesViewMore(data);
|
||||||
},
|
},
|
||||||
requestFunctionViewMore(data) {
|
requestFunctionViewMore(data) {
|
||||||
return that.getCasesViewMore(data);
|
return that.getCasesViewMore(data);
|
||||||
@@ -86,31 +86,6 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/**
|
|
||||||
* Get cases for Vue Card View
|
|
||||||
*/
|
|
||||||
getCases(data) {
|
|
||||||
let that = this,
|
|
||||||
dt,
|
|
||||||
filters = {};
|
|
||||||
_.forIn(this.filters, function (item, key) {
|
|
||||||
filters[item.filterVar] = item.value;
|
|
||||||
});
|
|
||||||
return new Promise((resolutionFunc, rejectionFunc) => {
|
|
||||||
api.cases
|
|
||||||
.todo(filters)
|
|
||||||
.then((response) => {
|
|
||||||
dt = that.formatDataResponse(response.data.data);
|
|
||||||
resolutionFunc({
|
|
||||||
data: dt,
|
|
||||||
count: response.data.total,
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.catch((e) => {
|
|
||||||
rejectionFunc(e);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/**
|
/**
|
||||||
* Get cases for Vue Card View
|
* Get cases for Vue Card View
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ export default {
|
|||||||
"send_by",
|
"send_by",
|
||||||
],
|
],
|
||||||
requestFunction(data) {
|
requestFunction(data) {
|
||||||
return that.getCases(data);
|
return that.getCasesViewMore(data);
|
||||||
},
|
},
|
||||||
requestFunctionViewMore(data) {
|
requestFunctionViewMore(data) {
|
||||||
return that.getCasesViewMore(data);
|
return that.getCasesViewMore(data);
|
||||||
@@ -85,31 +85,6 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/**
|
|
||||||
* Get cases for Vue Card View
|
|
||||||
*/
|
|
||||||
getCases(data) {
|
|
||||||
let that = this,
|
|
||||||
dt,
|
|
||||||
filters = {};
|
|
||||||
_.forIn(this.filters, function (item, key) {
|
|
||||||
filters[item.filterVar] = item.value;
|
|
||||||
});
|
|
||||||
return new Promise((resolutionFunc, rejectionFunc) => {
|
|
||||||
api.cases
|
|
||||||
.paused(filters)
|
|
||||||
.then((response) => {
|
|
||||||
dt = that.formatDataResponse(response.data.data);
|
|
||||||
resolutionFunc({
|
|
||||||
data: dt,
|
|
||||||
count: response.data.total,
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.catch((e) => {
|
|
||||||
rejectionFunc(e);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/**
|
/**
|
||||||
* Get cases for Vue Card View
|
* Get cases for Vue Card View
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ export default {
|
|||||||
"send_by",
|
"send_by",
|
||||||
],
|
],
|
||||||
requestFunction(data) {
|
requestFunction(data) {
|
||||||
return that.getCases(data);
|
return that.getCasesViewMore(data);
|
||||||
},
|
},
|
||||||
requestFunctionViewMore(data) {
|
requestFunctionViewMore(data) {
|
||||||
return that.getCasesViewMore(data);
|
return that.getCasesViewMore(data);
|
||||||
@@ -85,31 +85,6 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/**
|
|
||||||
* Get cases for Vue Card View
|
|
||||||
*/
|
|
||||||
getCases(data) {
|
|
||||||
let that = this,
|
|
||||||
dt,
|
|
||||||
filters = {};
|
|
||||||
_.forIn(this.filters, function (item, key) {
|
|
||||||
filters[item.filterVar] = item.value;
|
|
||||||
});
|
|
||||||
return new Promise((resolutionFunc, rejectionFunc) => {
|
|
||||||
api.cases
|
|
||||||
.unassigned(filters)
|
|
||||||
.then((response) => {
|
|
||||||
dt = that.formatDataResponse(response.data.data);
|
|
||||||
resolutionFunc({
|
|
||||||
data: dt,
|
|
||||||
count: response.data.total,
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.catch((e) => {
|
|
||||||
rejectionFunc(e);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/**
|
/**
|
||||||
* Get cases for Vue Card View
|
* Get cases for Vue Card View
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -2994,6 +2994,7 @@ class LdapAdvanced
|
|||||||
$this->arrayUserUpdateChecked[$username] = 1;
|
$this->arrayUserUpdateChecked[$username] = 1;
|
||||||
|
|
||||||
$arrayUserDataUpdate = [];
|
$arrayUserDataUpdate = [];
|
||||||
|
$extendedData = [];
|
||||||
|
|
||||||
foreach ($arrayAttributesToSync as $key => $value) {
|
foreach ($arrayAttributesToSync as $key => $value) {
|
||||||
$fieldName = $key;
|
$fieldName = $key;
|
||||||
@@ -3015,12 +3016,24 @@ class LdapAdvanced
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($ldapAttributeValue != $arrayUser[$username][$fieldName]) {
|
if (isset($arrayUser[$username][$fieldName])) {
|
||||||
$arrayUserDataUpdate[$fieldName] = $ldapAttributeValue;
|
if ($ldapAttributeValue != $arrayUser[$username][$fieldName]) {
|
||||||
|
$arrayUserDataUpdate[$fieldName] = $ldapAttributeValue;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$extendedData[$fieldName] = $ldapAttributeValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//update the extended data
|
||||||
|
if (!empty($extendedData)) {
|
||||||
|
$json = $arrayUser[$username]['USR_EXTENDED_ATTRIBUTES_DATA'];
|
||||||
|
$oldExtendedData = empty($json) ? [] : json_decode($json, true);
|
||||||
|
$extendedData = array_merge($oldExtendedData, $extendedData);
|
||||||
|
$arrayUserDataUpdate['USR_EXTENDED_ATTRIBUTES_DATA'] = json_encode($extendedData);
|
||||||
|
}
|
||||||
|
|
||||||
if (!empty($arrayUserDataUpdate)) {
|
if (!empty($arrayUserDataUpdate)) {
|
||||||
$arrayUserDataUpdate['USR_UID'] = $arrayUser[$username]['USR_UID'];
|
$arrayUserDataUpdate['USR_UID'] = $arrayUser[$username]['USR_UID'];
|
||||||
|
|
||||||
|
|||||||
@@ -4016,8 +4016,8 @@ msgstr "Case Description"
|
|||||||
# TRANSLATION
|
# TRANSLATION
|
||||||
# LABEL/ID_CASE_DOES_NOT_EXIST
|
# LABEL/ID_CASE_DOES_NOT_EXIST
|
||||||
#: LABEL/ID_CASE_DOES_NOT_EXIST
|
#: LABEL/ID_CASE_DOES_NOT_EXIST
|
||||||
msgid "Case {CASE_NUMBER} does not exist"
|
msgid "Case {0} does not exist"
|
||||||
msgstr "Case {CASE_NUMBER} does not exist"
|
msgstr "Case {0} does not exist"
|
||||||
|
|
||||||
# TRANSLATION
|
# TRANSLATION
|
||||||
# LABEL/ID_CASE_DOES_NOT_EXIST2
|
# LABEL/ID_CASE_DOES_NOT_EXIST2
|
||||||
|
|||||||
@@ -57481,7 +57481,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
|
|||||||
( 'LABEL','ID_CASE_DELETED_SUCCESSFULLY','en','The Case {APP_NUMBER} was deleted successfully!','2014-01-15') ,
|
( 'LABEL','ID_CASE_DELETED_SUCCESSFULLY','en','The Case {APP_NUMBER} was deleted successfully!','2014-01-15') ,
|
||||||
( 'LABEL','ID_CASE_DEL_INDEX_DOES_NOT_EXIST','en','The case {0}: {1} with {2}: {3} does not exist.','2015-09-30') ,
|
( 'LABEL','ID_CASE_DEL_INDEX_DOES_NOT_EXIST','en','The case {0}: {1} with {2}: {3} does not exist.','2015-09-30') ,
|
||||||
( 'LABEL','ID_CASE_DESCRIPTION','en','Case Description','2014-01-15') ,
|
( 'LABEL','ID_CASE_DESCRIPTION','en','Case Description','2014-01-15') ,
|
||||||
( 'LABEL','ID_CASE_DOES_NOT_EXIST','en','Case {CASE_NUMBER} does not exist','2014-01-15') ,
|
( 'LABEL','ID_CASE_DOES_NOT_EXIST','en','Case {0} does not exist','2022-04-19') ,
|
||||||
( 'LABEL','ID_CASE_DOES_NOT_EXIST2','en','The case with {0}: {1} does not exist.','2014-06-05') ,
|
( 'LABEL','ID_CASE_DOES_NOT_EXIST2','en','The case with {0}: {1} does not exist.','2014-06-05') ,
|
||||||
( 'LABEL','ID_CASE_DOES_NOT_EXISTS','en','This case does not exist','2014-01-15') ,
|
( 'LABEL','ID_CASE_DOES_NOT_EXISTS','en','This case does not exist','2014-01-15') ,
|
||||||
( 'LABEL','ID_CASE_DOES_NOT_EXIST_JS','en','Case {0} does not exist','2014-01-15') ,
|
( 'LABEL','ID_CASE_DOES_NOT_EXIST_JS','en','Case {0} does not exist','2014-01-15') ,
|
||||||
|
|||||||
@@ -109,14 +109,15 @@
|
|||||||
deleteAttributeProcess() {
|
deleteAttributeProcess() {
|
||||||
this.rows.splice(this.selectedRowIndex - 1, 1);
|
this.rows.splice(this.selectedRowIndex - 1, 1);
|
||||||
},
|
},
|
||||||
saveRow(obj) {
|
saveRow(object) {
|
||||||
|
let obj = Object.assign({}, object);//important to clone the object
|
||||||
if (obj.index === null) {
|
if (obj.index === null) {
|
||||||
delete obj.index;
|
delete obj.index;
|
||||||
this.rows.push(obj);
|
this.rows.push(obj);
|
||||||
} else {
|
} else {
|
||||||
let i = obj.index;
|
let i = obj.index;
|
||||||
delete obj.index;
|
delete obj.index;
|
||||||
this.rows[i - 1] = obj;
|
Object.assign(this.rows[i - 1], obj);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
connectionSettings() {
|
connectionSettings() {
|
||||||
|
|||||||
@@ -91,13 +91,13 @@ class Search extends AbstractCases
|
|||||||
// Filter by user who started
|
// Filter by user who started
|
||||||
if ($this->getUserStartedId()) {
|
if ($this->getUserStartedId()) {
|
||||||
// Get the case numbers related to this filter
|
// Get the case numbers related to this filter
|
||||||
$result = Delegation::casesStartedBy($this->getUserStartedId(), $this->getOffset(), $this->getLimit());
|
$result = Delegation::casesStartedBy($this->getUserStartedId());
|
||||||
$query->specificCases($result);
|
$query->specificCases($result);
|
||||||
}
|
}
|
||||||
// Filter by user who completed
|
// Filter by user who completed
|
||||||
if ($this->getUserCompletedId()) {
|
if ($this->getUserCompletedId()) {
|
||||||
// Get the case numbers related to this filter
|
// Get the case numbers related to this filter
|
||||||
$result = Delegation::casesCompletedBy($this->getUserCompletedId(), $this->getOffset(), $this->getLimit());
|
$result = Delegation::casesCompletedBy($this->getUserCompletedId());
|
||||||
$query->specificCases($result);
|
$query->specificCases($result);
|
||||||
}
|
}
|
||||||
// Filter by task
|
// Filter by task
|
||||||
|
|||||||
@@ -366,6 +366,7 @@ class CaseList extends Model
|
|||||||
[
|
[
|
||||||
'list' => ['inbox', 'draft', 'paused', 'unassigned'],
|
'list' => ['inbox', 'draft', 'paused', 'unassigned'],
|
||||||
'field' => 'case_number',
|
'field' => 'case_number',
|
||||||
|
'idFilter' => 'case_number',
|
||||||
'name' => G::LoadTranslation('ID_MYCASE_NUMBER'),
|
'name' => G::LoadTranslation('ID_MYCASE_NUMBER'),
|
||||||
'type' => 'integer',
|
'type' => 'integer',
|
||||||
'source' => 'APPLICATION',
|
'source' => 'APPLICATION',
|
||||||
@@ -375,6 +376,7 @@ class CaseList extends Model
|
|||||||
], [
|
], [
|
||||||
'list' => ['inbox', 'draft', 'paused', 'unassigned'],
|
'list' => ['inbox', 'draft', 'paused', 'unassigned'],
|
||||||
'field' => 'case_title',
|
'field' => 'case_title',
|
||||||
|
'idFilter' => 'caseTitle',
|
||||||
'name' => G::LoadTranslation('ID_CASE_THREAD_TITLE'),
|
'name' => G::LoadTranslation('ID_CASE_THREAD_TITLE'),
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'source' => 'APPLICATION',
|
'source' => 'APPLICATION',
|
||||||
@@ -384,6 +386,7 @@ class CaseList extends Model
|
|||||||
], [
|
], [
|
||||||
'list' => ['inbox', 'draft', 'paused', 'unassigned'],
|
'list' => ['inbox', 'draft', 'paused', 'unassigned'],
|
||||||
'field' => 'process_category',
|
'field' => 'process_category',
|
||||||
|
'idFilter' => 'process_category',
|
||||||
'name' => G::LoadTranslation('ID_PROCESS_CATEGORY'),
|
'name' => G::LoadTranslation('ID_PROCESS_CATEGORY'),
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'source' => 'APPLICATION',
|
'source' => 'APPLICATION',
|
||||||
@@ -393,6 +396,7 @@ class CaseList extends Model
|
|||||||
], [
|
], [
|
||||||
'list' => ['inbox', 'draft', 'paused', 'unassigned'],
|
'list' => ['inbox', 'draft', 'paused', 'unassigned'],
|
||||||
'field' => 'process_name',
|
'field' => 'process_name',
|
||||||
|
'idFilter' => 'process_name',
|
||||||
'name' => G::LoadTranslation('ID_PROCESS_NAME'),
|
'name' => G::LoadTranslation('ID_PROCESS_NAME'),
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'source' => 'APPLICATION',
|
'source' => 'APPLICATION',
|
||||||
@@ -402,6 +406,7 @@ class CaseList extends Model
|
|||||||
], [
|
], [
|
||||||
'list' => ['inbox', 'draft', 'paused', 'unassigned'],
|
'list' => ['inbox', 'draft', 'paused', 'unassigned'],
|
||||||
'field' => 'task',
|
'field' => 'task',
|
||||||
|
'idFilter' => 'task',
|
||||||
'name' => G::LoadTranslation('ID_TASK'),
|
'name' => G::LoadTranslation('ID_TASK'),
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'source' => 'APPLICATION',
|
'source' => 'APPLICATION',
|
||||||
@@ -411,6 +416,7 @@ class CaseList extends Model
|
|||||||
], [
|
], [
|
||||||
'list' => ['inbox', 'draft', 'paused', 'unassigned'],
|
'list' => ['inbox', 'draft', 'paused', 'unassigned'],
|
||||||
'field' => 'send_by',
|
'field' => 'send_by',
|
||||||
|
'idFilter' => 'send_by',
|
||||||
'name' => G::LoadTranslation('ID_SEND_BY'),
|
'name' => G::LoadTranslation('ID_SEND_BY'),
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'source' => 'APPLICATION',
|
'source' => 'APPLICATION',
|
||||||
@@ -420,6 +426,7 @@ class CaseList extends Model
|
|||||||
], [
|
], [
|
||||||
'list' => ['inbox', 'paused', 'unassigned'],
|
'list' => ['inbox', 'paused', 'unassigned'],
|
||||||
'field' => 'due_date',
|
'field' => 'due_date',
|
||||||
|
'idFilter' => 'due_date',
|
||||||
'name' => G::LoadTranslation('ID_DUE_DATE'),
|
'name' => G::LoadTranslation('ID_DUE_DATE'),
|
||||||
'type' => 'date',
|
'type' => 'date',
|
||||||
'source' => 'APPLICATION',
|
'source' => 'APPLICATION',
|
||||||
@@ -429,6 +436,7 @@ class CaseList extends Model
|
|||||||
], [
|
], [
|
||||||
'list' => ['inbox', 'paused', 'unassigned'],
|
'list' => ['inbox', 'paused', 'unassigned'],
|
||||||
'field' => 'delegation_date',
|
'field' => 'delegation_date',
|
||||||
|
'idFilter' => 'delegation_date',
|
||||||
'name' => G::LoadTranslation('ID_DELEGATION_DATE'),
|
'name' => G::LoadTranslation('ID_DELEGATION_DATE'),
|
||||||
'type' => 'date',
|
'type' => 'date',
|
||||||
'source' => 'APPLICATION',
|
'source' => 'APPLICATION',
|
||||||
@@ -438,6 +446,7 @@ class CaseList extends Model
|
|||||||
], [
|
], [
|
||||||
'list' => ['inbox', 'draft', 'paused', 'unassigned'],
|
'list' => ['inbox', 'draft', 'paused', 'unassigned'],
|
||||||
'field' => 'priority',
|
'field' => 'priority',
|
||||||
|
'idFilter' => 'priority',
|
||||||
'name' => G::LoadTranslation('ID_PRIORITY'),
|
'name' => G::LoadTranslation('ID_PRIORITY'),
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'source' => 'APPLICATION',
|
'source' => 'APPLICATION',
|
||||||
|
|||||||
@@ -2131,12 +2131,10 @@ class Delegation extends Model
|
|||||||
* Get cases completed by specific user
|
* Get cases completed by specific user
|
||||||
*
|
*
|
||||||
* @param int $userId
|
* @param int $userId
|
||||||
* @param int $offset
|
|
||||||
* @param int $limit
|
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public static function casesCompletedBy(int $userId, int $offset = 0, int $limit = 15)
|
public static function casesCompletedBy(int $userId)
|
||||||
{
|
{
|
||||||
// Get the case numbers related to this filter
|
// Get the case numbers related to this filter
|
||||||
$query = Delegation::query()->select(['APP_NUMBER']);
|
$query = Delegation::query()->select(['APP_NUMBER']);
|
||||||
@@ -2144,8 +2142,6 @@ class Delegation extends Model
|
|||||||
$query->participated($userId);
|
$query->participated($userId);
|
||||||
// Filter the last thread
|
// Filter the last thread
|
||||||
$query->lastThread();
|
$query->lastThread();
|
||||||
// Apply the limit
|
|
||||||
$query->offset($offset)->limit($limit);
|
|
||||||
// Get the result
|
// Get the result
|
||||||
$results = $query->get();
|
$results = $query->get();
|
||||||
|
|
||||||
@@ -2156,12 +2152,10 @@ class Delegation extends Model
|
|||||||
* Get cases started by specific user
|
* Get cases started by specific user
|
||||||
*
|
*
|
||||||
* @param int $userId
|
* @param int $userId
|
||||||
* @param int $offset
|
|
||||||
* @param int $limit
|
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public static function casesStartedBy(int $userId, int $offset = 0, int $limit = 15)
|
public static function casesStartedBy(int $userId)
|
||||||
{
|
{
|
||||||
// Get the case numbers related to this filter
|
// Get the case numbers related to this filter
|
||||||
$query = Delegation::query()->select(['APP_NUMBER']);
|
$query = Delegation::query()->select(['APP_NUMBER']);
|
||||||
@@ -2169,8 +2163,6 @@ class Delegation extends Model
|
|||||||
$query->participated($userId);
|
$query->participated($userId);
|
||||||
// Filter the first thread
|
// Filter the first thread
|
||||||
$query->caseStarted();
|
$query->caseStarted();
|
||||||
// Apply the limit
|
|
||||||
$query->offset($offset)->limit($limit);
|
|
||||||
// Get the result
|
// Get the result
|
||||||
$results = $query->get();
|
$results = $query->get();
|
||||||
|
|
||||||
|
|||||||
@@ -93,4 +93,65 @@ class UserConfig extends Model
|
|||||||
->delete();
|
->delete();
|
||||||
return $userConfig;
|
return $userConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This updates the filter settings on custom case list.
|
||||||
|
* @param string $id
|
||||||
|
* @param array $caseList
|
||||||
|
*/
|
||||||
|
public static function updateUserConfig(string $id, array $caseList)
|
||||||
|
{
|
||||||
|
//get columns deactivates
|
||||||
|
$columnsDisableFilter = [];
|
||||||
|
if (isset($caseList['columns'])) {
|
||||||
|
foreach ($caseList['columns'] as $column) {
|
||||||
|
if ($column->enableFilter === false) {
|
||||||
|
$columnsDisableFilter[] = $column;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//process all custom configuration
|
||||||
|
$name = 'userConfig';
|
||||||
|
$usersConfig = UserConfig::select(['USR_ID', 'USC_SETTING'])
|
||||||
|
->where('USC_NAME', '=', $name)
|
||||||
|
->get();
|
||||||
|
foreach ($usersConfig as $value) {
|
||||||
|
if (empty($value->USC_SETTING)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$lists = json_decode($value->USC_SETTING);
|
||||||
|
foreach ($lists as &$list) {
|
||||||
|
if (!property_exists($list, 'customCaseList')) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
foreach ($list->customCaseList as $key => &$item) {
|
||||||
|
if (intval($key) !== intval($id)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (!property_exists($item, 'filters')) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (!is_array($item->filters)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$i = count($item->filters) - 1;
|
||||||
|
while ($i >= 0) {
|
||||||
|
if (isset($item->filters[$i])) {
|
||||||
|
foreach ($columnsDisableFilter as $column) {
|
||||||
|
if ($item->filters[$i]->fieldId === $column->field) {
|
||||||
|
unset($item->filters[$i]);
|
||||||
|
//reindex array keys
|
||||||
|
$item->filters = array_values($item->filters);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$i--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//update database
|
||||||
|
$lists = (array) $lists;
|
||||||
|
UserConfig::editSetting($value->USR_ID, $name, $lists);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ use Exception;
|
|||||||
use G;
|
use G;
|
||||||
use Luracast\Restler\RestException;
|
use Luracast\Restler\RestException;
|
||||||
use ProcessMaker\Model\CaseList as CaseListBusinessModel;
|
use ProcessMaker\Model\CaseList as CaseListBusinessModel;
|
||||||
|
USE ProcessMaker\Model\UserConfig;
|
||||||
use ProcessMaker\Services\Api;
|
use ProcessMaker\Services\Api;
|
||||||
use RBAC;
|
use RBAC;
|
||||||
|
|
||||||
@@ -62,6 +63,7 @@ class CaseList extends Api
|
|||||||
throw new RestException(Api::STAT_APP_EXCEPTION, G::LoadTranslation('ID_DOES_NOT_EXIST'));
|
throw new RestException(Api::STAT_APP_EXCEPTION, G::LoadTranslation('ID_DOES_NOT_EXIST'));
|
||||||
}
|
}
|
||||||
$caseList = CaseListBusinessModel::getAliasFromColumnName($caseList->toArray());
|
$caseList = CaseListBusinessModel::getAliasFromColumnName($caseList->toArray());
|
||||||
|
UserConfig::updateUserConfig($id, $caseList);
|
||||||
return $caseList;
|
return $caseList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1815,9 +1815,9 @@ class Light extends Api
|
|||||||
*
|
*
|
||||||
* @access protected
|
* @access protected
|
||||||
* @class AccessControl {@className \ProcessMaker\Services\Api\Cases}
|
* @class AccessControl {@className \ProcessMaker\Services\Api\Cases}
|
||||||
* @url GET /:app_uid/variables
|
* @url GET /:appUid/variables
|
||||||
*
|
*
|
||||||
* @param string $app_uid {@min 1}{@max 32}
|
* @param string $appUid {@min 1}{@max 32}
|
||||||
* @param string $dyn_uid
|
* @param string $dyn_uid
|
||||||
* @param string $pro_uid
|
* @param string $pro_uid
|
||||||
* @param string $act_uid
|
* @param string $act_uid
|
||||||
@@ -1825,7 +1825,7 @@ class Light extends Api
|
|||||||
* @return mixed
|
* @return mixed
|
||||||
* @throws RestException
|
* @throws RestException
|
||||||
*/
|
*/
|
||||||
public function doGetCaseVariables($app_uid, $dyn_uid = null, $pro_uid = null, $act_uid = null, $app_index = null)
|
public function doGetCaseVariables($appUid, $dyn_uid = null, $pro_uid = null, $act_uid = null, $app_index = null)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$usr_uid = $this->getUserId();
|
$usr_uid = $this->getUserId();
|
||||||
@@ -1834,7 +1834,7 @@ class Light extends Api
|
|||||||
if (!empty($pro_uid)) {
|
if (!empty($pro_uid)) {
|
||||||
$_SESSION['PROCESS'] = $pro_uid;
|
$_SESSION['PROCESS'] = $pro_uid;
|
||||||
}
|
}
|
||||||
$response = $cases->getCaseVariables($app_uid, $usr_uid, $dyn_uid, $pro_uid, $act_uid, $app_index);
|
$response = $cases->getCaseVariables($appUid, $usr_uid, $dyn_uid, $pro_uid, $act_uid, $app_index);
|
||||||
|
|
||||||
return DateTime::convertUtcToTimeZone($response);
|
return DateTime::convertUtcToTimeZone($response);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user