PMCORE-2637 Advanced Search > 'filter by status' option does not display

code style

code style 2

code style 3

code style 4
This commit is contained in:
Rodrigo Quelca
2020-12-23 17:00:12 +00:00
parent a4c2694ef0
commit 3038ba4ba1
4 changed files with 65 additions and 14 deletions

View File

@@ -105,7 +105,7 @@
:title="tag"
:variant="tagVariant"
@click="onClickTag"
class="mr-1"
class="mr-1 badge badge-light"
>
<div :id="tag">
@@ -233,6 +233,42 @@ export default {
return `${this.tagPrefix}: ${data[0].value}`;
}
},
{
type: "caseStatus",
id: "CaseStatus",
title: `${this.$i18n.t('ID_FILTER')}: ${this.$i18n.t('ID_CASE_STATUS')}`,
optionLabel: this.$i18n.t('ID_STATUS'),
detail: "ID_PLEASE_SELECT_THE_STATUS_FOR_THE_SEARCH",
tagText: "",
tagPrefix: this.$i18n.t('ID_SEARCH_BY_STATUS'),
items:[
{
id: "caseStatuses",
value: "",
options: [
{
value: "DRAFT",
label: this.$i18n.t('ID_DRAFT')
},
{
value: "TO_DO",
label: this.$i18n.t('ID_TO_DO')
},
{
value: "COMPLETED",
label: this.$i18n.t('ID_COMPLETED')
},
{
value: "CANCELED",
label: this.$i18n.t('ID_CANCELLED')
}
]
}
],
makeTagText: function (params, data) {
return `${this.tagPrefix}: ${data[0].label || ''}`;
}
},
{
type: "ProcessName",
id: "processName",

View File

@@ -9,14 +9,14 @@
<h6>{{ info.detail }}</h6>
<b-form-group :label="info.label">
<b-form-checkbox
v-for="option in info.options"
v-model="info.caseStatuses"
v-for="option in info.items[0].options"
v-model="filter[0].options"
:key="option.value"
:value="option.value"
name="flavour-2a"
stacked
>
{{ option.text }}
{{ option.label }}
</b-form-checkbox>
</b-form-group>
</template>
@@ -31,7 +31,7 @@ export default {
components: {
SearchPopover
},
props: ["tag", "info"],
props: ["tag", "info", "filter"],
methods: {
/**
* Ok button handler
@@ -43,17 +43,18 @@ export default {
* Submit button handler
*/
handleSubmit() {
let selectedOptions = [];
let self = this;
_.forEach(this.info.caseStatuses, function(value) {
selectedOptions.push(_.find(self.info.options, function(o) { return o.value === value; }));
});
this.$emit("updateSearchTag", {
CaseStatus: {
caseStatuses: this.info.caseStatuses.join(","),
selectedOptions: selectedOptions
let selectedLabels = [],
self = this,
item;
this.filter[0].value=this.filter[0].options.join(",");
_.forEach(this.filter[0].options, function(value) {
item = _.find(self.info.items[0].options, function(o) { return o.value === value; });
if (item) {
selectedLabels.push(item.label);
}
});
this.filter[0].label=selectedLabels.join(",");
this.$emit("updateSearchTag", this.filter);
this.$root.$emit("bv::hide::popover")
},
/**

View File

@@ -4175,6 +4175,12 @@ msgstr "User or password is empty."
msgid "Start Case"
msgstr "Start Case"
# TRANSLATION
# LABEL/ID_CASE_STATUS
#: LABEL/ID_CASE_STATUS
msgid "Case Status"
msgstr "Case Status"
# TRANSLATION
# LABEL/ID_CASE_STOPPED_TRIGGER
#: LABEL/ID_CASE_STOPPED_TRIGGER
@@ -24083,6 +24089,12 @@ msgstr "Search by Process Name:"
msgid "Search by Start Date:"
msgstr "Search by Start Date:"
# TRANSLATION
# LABEL/ID_SEARCH_BY_STATUS
#: LABEL/ID_SEARCH_BY_STATUS
msgid "Search by Status:"
msgstr "Search by Status:"
# TRANSLATION
# LABEL/ID_SEARCH_BY_TASK_NAME
#: LABEL/ID_SEARCH_BY_TASK_NAME

View File

@@ -57509,6 +57509,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_CASE_SCHEDULER_SUMMARY','en','Case Scheduler Summary','2014-01-15') ,
( 'LABEL','ID_CASE_SCHEDULER_VALIDATE_ALERT','en','User or password is empty.','2014-10-21') ,
( 'LABEL','ID_CASE_START','en','Start Case','2014-01-15') ,
( 'LABEL','ID_CASE_STATUS','en','Case Status','2014-01-22') ,
( 'LABEL','ID_CASE_STOPPED_TRIGGER','en','The case has not stopped due to its trigger.','2015-01-29') ,
( 'LABEL','ID_CASE_TITLE','en','Case Title','2014-01-15') ,
( 'LABEL','ID_CASE_TITLE_NAME','en','Case Title Name','2020-12-16') ,
@@ -60926,6 +60927,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_SEARCH_BY_FINISH_DATE','en','Search by Finish Date:','2020-12-16') ,
( 'LABEL','ID_SEARCH_BY_PROCESS_NAME','en','Search by Process Name:','2020-12-16') ,
( 'LABEL','ID_SEARCH_BY_START_DATE','en','Search by Start Date:','2020-12-16') ,
( 'LABEL','ID_SEARCH_BY_STATUS','en','Search by Status:','2020-12-22') ,
( 'LABEL','ID_SEARCH_BY_TASK_NAME','en','Search by Task Name:','2020-12-16') ,
( 'LABEL','ID_SEARCH_FOR_USER','en','Search for user','2015-09-15') ,
( 'LABEL','ID_SEARCH_PATTERN','en','Search Pattern','2014-01-15') ,