Added Notes field to the File Details section of Data Sources, Techniques and Groups.

master
Ruben Bouman 2020-06-10 20:40:13 +02:00
parent 217980bbd3
commit f17cf9d0d0
6 changed files with 117 additions and 62 deletions

View File

@ -315,6 +315,17 @@ textarea.form-control {
max-height: 115px !important; max-height: 115px !important;
} }
.textareaFileDetails textarea.textarea-customstyle {
height: 75px !important;
}
.textareaFileDetails {
margin-top: 6px;
margin-bottom: 6px;
position: relative;
padding-right: 15px;
}
.modal-content .modal-body textarea { .modal-content .modal-body textarea {
height: 52px !important; height: 52px !important;
} }
@ -427,14 +438,14 @@ h4 {
.icon-example { .icon-example {
position: absolute; position: absolute;
z-index: 9999; z-index: 1;
right: 19px; right: 19px;
bottom: 3px; bottom: 3px;
} }
.icon-example:after { .icon-example:after {
content: url(img/maximize-2.svg); content: url(img/maximize-2.svg);
position: absolute; position: absolute;
z-index: 9999; z-index: 1;
right: 6px; right: 6px;
bottom: 3px; bottom: 3px;
cursor: pointer; cursor: pointer;

View File

@ -21,6 +21,14 @@
<td>Name:</td> <td>Name:</td>
<td><base-input v-model="doc['name']" class="file-detail-edit"></base-input></td> <td><base-input v-model="doc['name']" class="file-detail-edit"></base-input></td>
</tr> </tr>
<tr>
<td>Notes:</td>
<td>
<div class="textareaFileDetails">
<extended-textarea :data_object="doc" data_field="notes" rows="2" id="notes"></extended-textarea>
</div>
</td>
</tr>
<tr> <tr>
<td>Platform:</td> <td>Platform:</td>
<td> <td>
@ -36,27 +44,28 @@
<script> <script>
import { notificationMixin } from '@/mixins/NotificationMixins.js'; import { notificationMixin } from '@/mixins/NotificationMixins.js';
import ExtendedTextarea from '@/components/Inputs/ExtendedTextarea';
export default { export default {
mixins: [notificationMixin], mixins: [notificationMixin],
props: { props: {
filename: { filename: {
type: String, type: String,
required: true required: true,
}, },
doc: { doc: {
type: Object, type: Object,
required: true required: true,
}, },
platforms: { platforms: {
type: Array, type: Array,
required: true required: true,
}, },
showName: { showName: {
type: Boolean, type: Boolean,
required: false, required: false,
default: true default: true,
} },
}, },
methods: { methods: {
platformEventHandler(event) { platformEventHandler(event) {
@ -80,8 +89,11 @@ export default {
if (this.doc.platform.length == 0) { if (this.doc.platform.length == 0) {
this.notifyDanger('Missing value', 'No value for platform selected. Please select one or more platforms.'); this.notifyDanger('Missing value', 'No value for platform selected. Please select one or more platforms.');
} }
} },
} },
components: {
ExtendedTextarea,
},
}; };
</script> </script>

View File

@ -69,7 +69,13 @@
</div> </div>
<div class="row mt-md-0"> <div class="row mt-md-0">
<div class="col-md-11"> <div class="col-md-11">
<extended-textarea :row="row" :id="title + i" :cb_function="editCommentCallback"></extended-textarea> <extended-textarea
:data_object="row"
data_field="comment"
:id="title + i"
rows="4"
:cb_function="editCommentCallback"
></extended-textarea>
</div> </div>
</div> </div>
<div class="row mt-md-3"> <div class="row mt-md-3">
@ -171,57 +177,57 @@ export default {
defaultKVKeys: Object.keys(this.emptyObject), defaultKVKeys: Object.keys(this.emptyObject),
showHelptextScore: false, showHelptextScore: false,
currentModal: '', currentModal: '',
commentModal: '' commentModal: '',
}; };
}, },
mixins: [notificationMixin, pageDetailMixin], mixins: [notificationMixin, pageDetailMixin],
props: { props: {
title: { title: {
type: String, type: String,
required: true required: true,
}, },
applicable_to: { applicable_to: {
type: Array, type: Array,
required: true required: true,
}, },
showLocation: { showLocation: {
type: Boolean, type: Boolean,
required: false, required: false,
default: true default: true,
}, },
helpText: { helpText: {
type: String, type: String,
required: true required: true,
}, },
scores: { scores: {
type: Array, type: Array,
required: true required: true,
}, },
scoresTooltip: { scoresTooltip: {
type: Object, type: Object,
required: true required: true,
}, },
defaultScore: { defaultScore: {
type: Number, type: Number,
required: true required: true,
}, },
showAutoGenerated: { showAutoGenerated: {
type: Boolean, type: Boolean,
required: false, required: false,
default: false default: false,
}, },
emptyScoreEntry: { emptyScoreEntry: {
type: Object, type: Object,
required: true required: true,
}, },
helptextScore: { helptextScore: {
type: String, type: String,
required: true required: true,
}, },
emptyObject: { emptyObject: {
type: Object, type: Object,
required: true required: true,
} },
}, },
components: { components: {
ListEditor, ListEditor,
@ -230,7 +236,7 @@ export default {
ScoreLogbook, ScoreLogbook,
ScoreSlider, ScoreSlider,
Icons, Icons,
ExtendedTextarea ExtendedTextarea,
}, },
methods: { methods: {
escapeKeyListener: function(evt) { escapeKeyListener: function(evt) {
@ -329,8 +335,8 @@ export default {
}, },
editCommentCallback(b) { editCommentCallback(b) {
this.commentModal = b; this.commentModal = b;
} },
} },
}; };
</script> </script>

View File

@ -1,6 +1,12 @@
<template> <template>
<div> <div>
<textarea rows="4" placeholder=". . ." class="form-control textarea-border pl-md-3" v-model="row.comment"> </textarea> <textarea
:rows="rows"
placeholder=". . ."
class="form-control textarea-border pl-md-3 textarea-customstyle"
v-model="data_object[data_field]"
>
</textarea>
<div v-b-modal="'comment-modal-' + id" class="icon-example" @click="callCbFunction('comment-modal-' + id)"></div> <div v-b-modal="'comment-modal-' + id" class="icon-example" @click="callCbFunction('comment-modal-' + id)"></div>
<b-modal :id="'comment-modal-' + id" dialog-class="modal-edit-small" content-class="modal-dark-mode" hide-footer hide-header no-close-on-esc> <b-modal :id="'comment-modal-' + id" dialog-class="modal-edit-small" content-class="modal-dark-mode" hide-footer hide-header no-close-on-esc>
<div class="row"> <div class="row">
@ -27,7 +33,7 @@
rows="50" rows="50"
placeholder=". . ." placeholder=". . ."
class="form-control textarea-border textarea-modal pl-md-3" class="form-control textarea-border textarea-modal pl-md-3"
v-model="row.comment" v-model="data_object[data_field]"
></textarea> ></textarea>
</div> </div>
</div> </div>
@ -42,25 +48,33 @@ export default {
}, },
components: {}, components: {},
props: { props: {
row: { data_object: {
type: Object, type: Object,
required: true required: true,
},
data_field: {
type: String,
required: true,
}, },
id: { id: {
type: String, type: String,
required: true required: true,
}, },
cb_function: { cb_function: {
type: Function, type: Function,
required: false required: false,
} },
rows: {
type: String,
required: true,
},
}, },
methods: { methods: {
callCbFunction(b) { callCbFunction(b) {
if (this.cb_function != undefined) { if (this.cb_function != undefined) {
this.cb_function(b); this.cb_function(b);
} }
} },
} },
}; };
</script> </script>

View File

@ -60,7 +60,13 @@
></score-slider> ></score-slider>
</div> </div>
<div class="col-md-5"> <div class="col-md-5">
<extended-textarea :row="v" :id="'modal' + index" :cb_function="cb_function"></extended-textarea> <extended-textarea
:data_object="v"
data_field="comment"
:id="'modal' + index"
:cb_function="cb_function"
rows="4"
></extended-textarea>
</div> </div>
<div v-if="showAutoGenerated" class="col-md-auto"> <div v-if="showAutoGenerated" class="col-md-auto">
<toggle-button <toggle-button
@ -99,51 +105,51 @@ export default {
data() { data() {
return { return {
newScore: this.defaultScore, newScore: this.defaultScore,
componentKey: 0 componentKey: 0,
}; };
}, },
mixins: [notificationMixin], mixins: [notificationMixin],
props: { props: {
item: { item: {
type: Array, type: Array,
required: true required: true,
}, },
scores: { scores: {
type: Array, type: Array,
required: true required: true,
}, },
scoresTooltip: { scoresTooltip: {
type: Object, type: Object,
required: true required: true,
}, },
defaultScore: { defaultScore: {
type: Number, type: Number,
required: true required: true,
}, },
showAutoGenerated: { showAutoGenerated: {
type: Boolean, type: Boolean,
required: false, required: false,
default: false default: false,
}, },
modalId: { modalId: {
type: String, type: String,
required: true required: true,
}, },
emptyScoreEntry: { emptyScoreEntry: {
type: Object, type: Object,
required: true required: true,
}, },
cb_function: { cb_function: {
type: Function, type: Function,
required: false required: false,
} },
}, },
components: { components: {
DatePicker, DatePicker,
ScoreSlider, ScoreSlider,
ToggleButton, ToggleButton,
Icons, Icons,
ExtendedTextarea ExtendedTextarea,
}, },
mounted() { mounted() {
this.sortOnDates(); this.sortOnDates();
@ -203,8 +209,8 @@ export default {
}, },
showHelptextScore(event) { showHelptextScore(event) {
this.$emit('showHelptextScoreNow', event); this.$emit('showHelptextScoreNow', event);
} },
} },
}; };
</script> </script>

View File

@ -54,7 +54,13 @@
<div class="row mt-md-0"> <div class="row mt-md-0">
<div class="col-md-11 form-group pr-md-2"> <div class="col-md-11 form-group pr-md-2">
<label class="card">Comment</label> <label class="card">Comment</label>
<extended-textarea :row="dataSource" id="datasource" :cb_function="editCommentCallback"></extended-textarea> <extended-textarea
:data_object="dataSource"
data_field="comment"
id="datasource"
rows="4"
:cb_function="editCommentCallback"
></extended-textarea>
</div> </div>
</div> </div>
<div class="row mt-md-3 col-md-5"> <div class="row mt-md-3 col-md-5">
@ -153,37 +159,37 @@ export default {
'2': 'Fair', '2': 'Fair',
'3': 'Good', '3': 'Good',
'4': 'Very good', '4': 'Very good',
'5': 'Excellent' '5': 'Excellent',
}, },
dataSourceDefaultKeys: Object.keys(constants.YAML_OBJ_DATA_SOURCES), dataSourceDefaultKeys: Object.keys(constants.YAML_OBJ_DATA_SOURCES),
dataSourceSuggestionList: dataSources, dataSourceSuggestionList: dataSources,
helptextDataQuality: false, helptextDataQuality: false,
helptextDataSourceKVPairs: false, helptextDataSourceKVPairs: false,
commentModal: false commentModal: false,
}; };
}, },
mixins: [pageDetailMixin], mixins: [pageDetailMixin],
props: { props: {
dataSource: { dataSource: {
type: Object, type: Object,
required: true required: true,
}, },
allDataSources: { allDataSources: {
type: Array, type: Array,
required: true required: true,
}, },
dqHelpText: { dqHelpText: {
type: String, type: String,
required: true required: true,
}, },
dsHelpText: { dsHelpText: {
type: String, type: String,
required: true required: true,
}, },
prevDataSourceQuality: { prevDataSourceQuality: {
type: Array, type: Array,
required: true required: true,
} },
}, },
methods: { methods: {
escapeKeyListener: function(evt) { escapeKeyListener: function(evt) {
@ -217,7 +223,7 @@ export default {
}, },
editCommentCallback(b) { editCommentCallback(b) {
this.commentModal = b; this.commentModal = b;
} },
}, },
computed: { computed: {
dsEnabled() { dsEnabled() {
@ -227,7 +233,7 @@ export default {
} }
} }
return false; return false;
} },
}, },
components: { components: {
DatePicker, DatePicker,
@ -238,7 +244,7 @@ export default {
AutoSuggestTitle, AutoSuggestTitle,
Modal, Modal,
Icons, Icons,
ExtendedTextarea ExtendedTextarea,
} },
}; };
</script> </script>