if creation is edited, insert text in form

This commit is contained in:
ogerly 2021-11-28 09:56:02 +01:00
parent 9f7eecc49d
commit 7d7277d475
2 changed files with 17 additions and 8 deletions

View File

@ -73,7 +73,6 @@
:min="rangeMin"
:max="rangeMax"
step="10"
@load="checkFormForUpdate('range')"
></b-form-input>
</b-input-group>
</div>
@ -86,7 +85,6 @@
v-model="text"
:state="text.length >= 10"
placeholder="Mindestens 10 Zeichen eingeben"
@load="checkFormForUpdate('text')"
rows="3"
></b-form-textarea>
</div>
@ -159,7 +157,7 @@ export default {
data() {
return {
radioSelected: '',
text: '',
text: !this.creationUserData.note ? '' : this.creationUserData.note,
value: 0,
rangeMin: 0,
rangeMax: 1000,
@ -180,6 +178,7 @@ export default {
createdIndex: null,
}
},
methods: {
// Auswählen eines Zeitraumes
updateRadioSelected(name, index, openCreation) {
@ -196,7 +195,10 @@ export default {
this.rangeMax = openCreation
}
},
/*
checkFormForUpdate(input) {
console.log('checkFormForUpdate', input)
console.log('checkFormForUpdate creationUserData', this.creationUserData)
switch (input) {
case 'text':
this.text = this.creationUserData.text
@ -209,6 +211,7 @@ export default {
alert("I don't know such values")
}
},
*/
submitCreation() {
// Formular Prüfen ob ein Zeitraum ausgewählt wurde. Ansonsten abbrechen und Hinweis anzeigen
if (this.radioSelected === '') {

View File

@ -66,7 +66,7 @@
:pagetype="type"
:creation="row.item.creation"
:item="row.item"
:creationUserData="creationData"
:creationUserData="creationUserData"
@update-creation-data="updateCreationData"
@update-user-data="updateUserData"
/>
@ -150,7 +150,7 @@ export default {
},
data() {
return {
creationData: {},
creationUserData: {},
overlay: false,
overlayBookmarkType: '',
overlayItem: [],
@ -223,13 +223,13 @@ export default {
if (!row.detailsShowing) {
alert('offen edit loslegen')
// this.item = rowItem
this.creationData = rowItem
// alert(this.creationData)
this.creationUserData = rowItem
console.log('editCreationUserTable creationUserData', this.creationUserData)
}
row.toggleDetails()
},
updateCreationData(data) {
this.creationData = {
this.creationUserData = {
...data,
}
},
@ -237,6 +237,12 @@ export default {
rowItem.creation = newCreation
},
},
watch: {
creationUserData: function () {
alert('yolo')
console.log(this.creationUserData)
},
},
}
</script>
<style>