PMCORE-3117: UI - New Custom Case List Setting Window, using Listbox
This commit is contained in:
@@ -1,56 +1,50 @@
|
||||
<template>
|
||||
<div
|
||||
id="home"
|
||||
>
|
||||
<div id="home">
|
||||
<div class="demo">
|
||||
<div class="container">
|
||||
<h5 >{{ $t("ID_NEW_CASES_LISTS") }}</h5>
|
||||
<h5>{{ $t("ID_NEW_CASES_LISTS") }}</h5>
|
||||
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
<div class="col-sm">
|
||||
|
||||
<b-row>
|
||||
<b-col>
|
||||
<b-form-group
|
||||
id="nameLabel"
|
||||
label="Name "
|
||||
label-for="name"
|
||||
>
|
||||
<b-form-input
|
||||
id="name"
|
||||
v-model="params.name"
|
||||
placeholder="Set a Case List Name"
|
||||
required
|
||||
></b-form-input>
|
||||
</b-form-group>
|
||||
|
||||
</b-col>
|
||||
<b-col>
|
||||
<b-form-group
|
||||
id="tableLabel"
|
||||
label="PM Table "
|
||||
label-for="name"
|
||||
>
|
||||
<multiselect
|
||||
v-model="params.tableUid"
|
||||
:options="pmTablesOptions"
|
||||
placeholder="Chose an option"
|
||||
label="label"
|
||||
track-by="value"
|
||||
:show-no-results="false"
|
||||
@search-change="asyncFind"
|
||||
:loading="isLoading"
|
||||
id="ajax"
|
||||
:limit="10"
|
||||
:clear-on-select="true"
|
||||
<b-row>
|
||||
<b-col>
|
||||
<b-form-group
|
||||
id="nameLabel"
|
||||
label="Name"
|
||||
label-for="name"
|
||||
>
|
||||
</multiselect>
|
||||
</b-form-group>
|
||||
|
||||
</b-col>
|
||||
<b-form-input
|
||||
id="name"
|
||||
v-model="params.name"
|
||||
placeholder="Set a Case List Name"
|
||||
required
|
||||
></b-form-input>
|
||||
</b-form-group>
|
||||
</b-col>
|
||||
<b-col>
|
||||
<b-form-group
|
||||
id="tableLabel"
|
||||
label="PM Table "
|
||||
label-for="name"
|
||||
>
|
||||
<multiselect
|
||||
v-model="params.tableUid"
|
||||
:options="pmTablesOptions"
|
||||
placeholder="Chose an option"
|
||||
label="label"
|
||||
track-by="value"
|
||||
:show-no-results="false"
|
||||
@search-change="asyncFind"
|
||||
:loading="isLoading"
|
||||
id="ajax"
|
||||
:limit="10"
|
||||
:clear-on-select="true"
|
||||
>
|
||||
</multiselect>
|
||||
</b-form-group>
|
||||
</b-col>
|
||||
</b-row>
|
||||
|
||||
</b-row>
|
||||
|
||||
<b-form-group
|
||||
id="descriptionLabel"
|
||||
label="Description "
|
||||
@@ -64,224 +58,214 @@
|
||||
max-rows="1"
|
||||
></b-form-textarea>
|
||||
</b-form-group>
|
||||
|
||||
|
||||
|
||||
|
||||
<b-row>
|
||||
|
||||
<b-col cols="10">
|
||||
<v-client-table :columns="columns" v-model="data" :options="options">
|
||||
|
||||
|
||||
<div slot="name" slot-scope="{row, update, setEditing, isEditing, revertValue}">
|
||||
<span @click="setEditing(true)" v-if="!isEditing()">
|
||||
<a>{{row.name}}</a>
|
||||
</span>
|
||||
<span v-else>
|
||||
<input type="text" v-model="row.name">
|
||||
<button type="button" class="btn btn-info btn-xs" @click="update(row.name); setEditing(false)">Submit</button>
|
||||
<button type="button" class="btn btn-default btn-xs" @click="revertValue(); setEditing(false)">Cancel</button>
|
||||
|
||||
</span>
|
||||
|
||||
</div>
|
||||
</v-client-table>
|
||||
</b-col>
|
||||
<b-col cols="2">
|
||||
<!-- Control panel -->
|
||||
<div class="control-panel">
|
||||
<div class="vertical-center">
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-light"
|
||||
@click="assignAll()"
|
||||
:disabled="isButtonDisabled"
|
||||
>
|
||||
|
||||
<i class="fa fa-angle-double-right"></i>
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-light"
|
||||
@click="assignSelected()"
|
||||
:disabled="isButtonDisabled"
|
||||
>
|
||||
|
||||
<i class="fa fa-angle-right"></i>
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-light"
|
||||
@click="unassignSelected()"
|
||||
:disabled="isButtonDisabled"
|
||||
>
|
||||
<i class="fa fa-angle-left"></i>
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-light"
|
||||
@click="unassignAll()"
|
||||
:disabled="isButtonDisabled"
|
||||
>
|
||||
<i class="fa fa-angle-double-right"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End Control panel -->
|
||||
</b-col>
|
||||
</b-row>
|
||||
<b-row>
|
||||
<b-col cols="10">
|
||||
<v-client-table
|
||||
:columns="columns"
|
||||
v-model="data"
|
||||
:options="options"
|
||||
>
|
||||
</v-client-table>
|
||||
</b-col>
|
||||
<b-col cols="2">
|
||||
<!-- Control panel -->
|
||||
<div class="control-panel">
|
||||
<div class="vertical-center">
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-light"
|
||||
@click="assignAll()"
|
||||
:disabled="isButtonDisabled"
|
||||
>
|
||||
<i
|
||||
class="fa fa-angle-double-right"
|
||||
></i>
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-light"
|
||||
@click="assignSelected()"
|
||||
:disabled="isButtonDisabled"
|
||||
>
|
||||
<i class="fa fa-angle-right"></i>
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-light"
|
||||
@click="unassignSelected()"
|
||||
:disabled="isButtonDisabled"
|
||||
>
|
||||
<i class="fa fa-angle-left"></i>
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-light"
|
||||
@click="unassignAll()"
|
||||
:disabled="isButtonDisabled"
|
||||
>
|
||||
<i
|
||||
class="fa fa-angle-double-right"
|
||||
></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End Control panel -->
|
||||
</b-col>
|
||||
</b-row>
|
||||
<b-form-group
|
||||
id="iconLabel"
|
||||
label="Icon "
|
||||
label-for="icon"
|
||||
>
|
||||
<icon-picker @selected="onSelectIcon" :default="params.iconList"/>
|
||||
<icon-picker
|
||||
@selected="onSelectIcon"
|
||||
:default="params.iconList"
|
||||
/>
|
||||
</b-form-group>
|
||||
<div>
|
||||
<b-form-group
|
||||
<b-form-group
|
||||
id="menuColor"
|
||||
label="Menu Color "
|
||||
label-for="icon"
|
||||
>
|
||||
<verte :value="params.iconColor" id="icon" @input="onChangeColor" picker="square" menuPosition="left" model="hex">
|
||||
<svg viewBox="0 0 50 50">
|
||||
<path d="M 10 10 H 90 V 90 H 10 L 10 10"/>
|
||||
</svg>
|
||||
label-for="icon"
|
||||
>
|
||||
<verte
|
||||
:value="params.iconColor"
|
||||
id="icon"
|
||||
@input="onChangeColor"
|
||||
picker="square"
|
||||
menuPosition="left"
|
||||
model="hex"
|
||||
>
|
||||
<svg viewBox="0 0 50 50">
|
||||
<path
|
||||
d="M 10 10 H 90 V 90 H 10 L 10 10"
|
||||
/>
|
||||
</svg>
|
||||
</verte>
|
||||
</b-form-group>
|
||||
</div>
|
||||
|
||||
|
||||
<div>
|
||||
<b-form-group
|
||||
id="screenColor"
|
||||
label="Screen Color Icon"
|
||||
label-for="screen"
|
||||
>
|
||||
<verte :value="params.iconColorScreen" @input="onChangeColor" picker="square" menuPosition="left" model="hex">
|
||||
<svg viewBox="0 0 50 50">
|
||||
<path d="M 10 10 H 90 V 90 H 10 L 10 10"/>
|
||||
</svg>
|
||||
>
|
||||
<verte
|
||||
:value="params.iconColorScreen"
|
||||
@input="onChangeColor"
|
||||
picker="square"
|
||||
menuPosition="left"
|
||||
model="hex"
|
||||
>
|
||||
<svg viewBox="0 0 50 50">
|
||||
<path
|
||||
d="M 10 10 H 90 V 90 H 10 L 10 10"
|
||||
/>
|
||||
</svg>
|
||||
</verte>
|
||||
</b-form-group>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
|
||||
|
||||
<v-client-table :columns="columnsCaseList" v-model="data" :options="caseListOptions">
|
||||
|
||||
|
||||
|
||||
|
||||
<div slot="name" slot-scope="{row, update, setEditing, isEditing, revertValue}">
|
||||
<span @click="setEditing(true)" v-if="!isEditing()">
|
||||
<a>{{row.name}}</a>
|
||||
</span>
|
||||
<span v-else>
|
||||
<input type="text" v-model="row.name">
|
||||
<button type="button" class="btn btn-info btn-xs" @click="update(row.name); setEditing(false)">Submit</button>
|
||||
<button type="button" class="btn btn-default btn-xs" @click="revertValue(); setEditing(false)">Cancel</button>
|
||||
|
||||
</span>
|
||||
|
||||
</div>
|
||||
</v-client-table>
|
||||
<v-client-table
|
||||
:columns="columnsCaseList"
|
||||
v-model="data"
|
||||
:options="caseListOptions"
|
||||
>
|
||||
</v-client-table>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<b-button variant="danger" @click="onCancel">Cancel</b-button>
|
||||
<b-button variant="danger" @click="onCancel"
|
||||
>Cancel</b-button
|
||||
>
|
||||
<b-button variant="outline-primary">Preview</b-button>
|
||||
<b-button variant="success">Save</b-button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import utils from "../../../utils/utils"
|
||||
import utils from "../../../utils/utils";
|
||||
import Multiselect from "vue-multiselect";
|
||||
import api from "./../../../api/index";
|
||||
import IconPicker from '../../../components/iconPicker/IconPicker.vue';
|
||||
import IconPicker from "../../../components/iconPicker/IconPicker.vue";
|
||||
|
||||
export default {
|
||||
name: "CaseListSketh",
|
||||
components: {
|
||||
Multiselect,
|
||||
IconPicker,
|
||||
IconPicker
|
||||
IconPicker,
|
||||
},
|
||||
props:["params"],
|
||||
props: ["params"],
|
||||
data() {
|
||||
return {
|
||||
icon: "fas fa-user-cog",
|
||||
icon: "fas fa-user-cog",
|
||||
isLoading: false,
|
||||
isButtonDisabled: false,
|
||||
pmTablesOptions: [],
|
||||
columns: ['name', 'field', 'type', 'source', 'source'],
|
||||
|
||||
columns: ["name", "field", "type", "source", "source"],
|
||||
|
||||
data: utils.getData(),
|
||||
options: {
|
||||
headings: {
|
||||
name: 'Name',
|
||||
field: 'Field',
|
||||
type: 'Type',
|
||||
source: 'Source'
|
||||
name: "Name",
|
||||
field: "Field",
|
||||
type: "Type",
|
||||
source: "Source",
|
||||
},
|
||||
filterable:true
|
||||
filterable: true,
|
||||
},
|
||||
columnsCaseList: ['name', 'field', 'type', 'source', 'typeOfSearching', 'enableSearchFilter', 'actions'],
|
||||
columnsCaseList: [
|
||||
"name",
|
||||
"field",
|
||||
"type",
|
||||
"source",
|
||||
"typeOfSearching",
|
||||
"enableSearchFilter",
|
||||
"actions",
|
||||
],
|
||||
caseListOptions: {
|
||||
headings: {
|
||||
name: 'Name',
|
||||
field: 'Field',
|
||||
type: 'Type',
|
||||
typeOfSearching: 'Type of Searching',
|
||||
enableSearchFilter: 'Enable Search Filter'
|
||||
name: "Name",
|
||||
field: "Field",
|
||||
type: "Type",
|
||||
typeOfSearching: "Type of Searching",
|
||||
enableSearchFilter: "Enable Search Filter",
|
||||
},
|
||||
filterable:false,
|
||||
filterable: false,
|
||||
perPage: 1000,
|
||||
perPageValues: [],
|
||||
texts:{
|
||||
count:''
|
||||
}
|
||||
}
|
||||
texts: {
|
||||
count: "",
|
||||
},
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
unassignSelected(){
|
||||
|
||||
},
|
||||
unassignAll(){
|
||||
|
||||
},
|
||||
assignSelected(){
|
||||
|
||||
},
|
||||
assignAll(){
|
||||
|
||||
},
|
||||
onSelectIcon(data){
|
||||
console.log (data);
|
||||
unassignSelected() {},
|
||||
unassignAll() {},
|
||||
assignSelected() {},
|
||||
assignAll() {},
|
||||
onSelectIcon(data) {
|
||||
console.log(data);
|
||||
// this.params.iconList = data;
|
||||
},
|
||||
onChangeColor(color){
|
||||
onChangeColor(color) {
|
||||
console.log(color);
|
||||
this.menuColor = color;
|
||||
},
|
||||
onCancel(){
|
||||
onCancel() {
|
||||
this.$emit("closeSketch");
|
||||
},
|
||||
onChange (e) {
|
||||
console.log(e)
|
||||
},
|
||||
/**
|
||||
onChange(e) {
|
||||
console.log(e);
|
||||
},
|
||||
/**
|
||||
* Find asynchronously in the server
|
||||
* @param {string} query - string from the text field
|
||||
*/
|
||||
@@ -291,7 +275,7 @@ export default {
|
||||
self.processes = [];
|
||||
api.filters
|
||||
.processList(query)
|
||||
.then((response) => {
|
||||
.then((response) => {
|
||||
self.processes = [];
|
||||
_.forEach(response.data, function(elem, key) {
|
||||
self.pmTablesOptions.push({
|
||||
@@ -305,7 +289,7 @@ export default {
|
||||
console.error(err);
|
||||
});
|
||||
},
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -334,4 +318,3 @@ export default {
|
||||
margin: 5px;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
@@ -59,13 +59,11 @@ export default {
|
||||
methods: {
|
||||
onShowSketch (params) {
|
||||
this.showSketch = true;
|
||||
debugger;
|
||||
this.params = params;
|
||||
},
|
||||
onCloseSketch (params) {
|
||||
this.showSketch = false;
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user