Skip to content
Snippets Groups Projects
Commit fc89c2f6 authored by Florent's avatar Florent
Browse files

clean

parent 262588bb
No related branches found
No related tags found
No related merge requests found
...@@ -158,4 +158,48 @@ footer .ui.text.menu .item:not(:first-child) { ...@@ -158,4 +158,48 @@ footer .ui.text.menu .item:not(:first-child) {
border-radius: 3px; border-radius: 3px;
background-color: rgb(250, 241, 242); background-color: rgb(250, 241, 242);
padding: 1rem; padding: 1rem;
}
/* ---------------------------------- */
/* ERROR LIST */
/* ---------------------------------- */
.multiselect__tags {
border: 2px solid #ced4da;
}
.multiselect__tags > .multiselect__input {
border: none !important;
font-size: 1rem !important;
}
.multiselect__placeholder {
color: #838383;
margin-bottom: 0px;
padding-top: 0;
}
.multiselect__single, .multiselect__tags, .multiselect__content, .multiselect__option {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
max-width: 100%;
}
.multiselect__select {
z-index: 1 !important;
}
.multiselect__clear {
position: absolute;
right: 1px;
top: 8px;
width: 40px;
display: block;
cursor: pointer;
z-index: 9;
background-color: #fff;
}
.multiselect__spinner {
z-index: 2 !important;
background-color: #fff;
opacity: 1;
top: 2px;
} }
\ No newline at end of file
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
class="multiselect__clear" class="multiselect__clear"
@click.prevent.stop="selection = null" @click.prevent.stop="selection = null"
> >
<b-icon-x font-scale="2" /> <i class="close icon"></i>
</div> </div>
</template> </template>
<span slot="noResult"> <span slot="noResult">
......
...@@ -36,6 +36,8 @@ ...@@ -36,6 +36,8 @@
:selection.sync="selected_feature_to" :selection.sync="selected_feature_to"
/> --> /> -->
<SearchFeature <SearchFeature
@select="selectFeatureTo"
@close="selectFeatureTo"
/> />
{{ form.feature_to.errors }} {{ form.feature_to.errors }}
</div> </div>
...@@ -96,22 +98,22 @@ export default { ...@@ -96,22 +98,22 @@ export default {
}, },
computed: { computed: {
featureOptions: function () { // featureOptions: function () {
return this.features // return this.features
.filter( // .filter(
(el) => // (el) =>
el.feature_type.slug === this.$route.params.slug_type_signal && //* filter only for the same feature // el.feature_type.slug === this.$route.params.slug_type_signal && //* filter only for the same feature
el.feature_id !== this.$route.params.slug_signal //* filter out current feature // el.feature_id !== this.$route.params.slug_signal //* filter out current feature
) // )
.map((el) => { // .map((el) => {
return { // return {
name: `${el.title} (${el.display_creator} - ${this.formatDate( // name: `${el.title} (${el.display_creator} - ${this.formatDate(
el.created_on // el.created_on
)})`, // )})`,
value: el.feature_id, // value: el.feature_id,
}; // };
}); // });
}, // },
selected_relation_type: { selected_relation_type: {
// getter // getter
...@@ -123,28 +125,16 @@ export default { ...@@ -123,28 +125,16 @@ export default {
this.form.relation_type.value = newValue; this.form.relation_type.value = newValue;
this.updateStore(); this.updateStore();
}, },
}, }
selected_feature_to: {
// getter
get() {
return this.form.feature_to.value.name;
},
// setter
set(newValue) {
this.form.feature_to.value = newValue;
this.updateStore();
},
},
}, },
watch: { // watch: {
featureOptions(newValue) { // featureOptions(newValue) {
if (newValue) { // if (newValue) {
this.getExistingFeature_to(newValue); // this.getExistingFeature_to(newValue);
} // }
}, // },
}, // },
methods: { methods: {
formatDate(value) { formatDate(value) {
...@@ -157,6 +147,10 @@ export default { ...@@ -157,6 +147,10 @@ export default {
this.$store.commit("feature/REMOVE_LINKED_FORM", this.linkedForm.dataKey); this.$store.commit("feature/REMOVE_LINKED_FORM", this.linkedForm.dataKey);
}, },
selectFeatureTo(e) {
this.form.feature_to.value = e;
},
updateStore() { updateStore() {
this.$store.commit("feature/UPDATE_LINKED_FORM", { this.$store.commit("feature/UPDATE_LINKED_FORM", {
dataKey: this.linkedForm.dataKey, dataKey: this.linkedForm.dataKey,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment