mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
removeComment button replaced by link
that allows to keep it both inside <form> and in <ul class="record_actions">
This commit is contained in:
parent
30b127bc88
commit
c39097f164
@ -7,6 +7,7 @@
|
|||||||
TODO fix errors flashbag for app component
|
TODO fix errors flashbag for app component
|
||||||
</div-->
|
</div-->
|
||||||
|
|
||||||
|
<div>
|
||||||
<div v-if="initialComment">
|
<div v-if="initialComment">
|
||||||
créé par {{ initialComment.creator.text }}
|
créé par {{ initialComment.creator.text }}
|
||||||
le {{ $d(initialComment.createdAt.datetime, 'long') }}
|
le {{ $d(initialComment.createdAt.datetime, 'long') }}
|
||||||
@ -17,6 +18,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<form @submit.prevent="submitform">
|
<form @submit.prevent="submitform">
|
||||||
|
<label for="content">{{ $t('comment.label') }}</label>
|
||||||
<textarea
|
<textarea
|
||||||
name="content"
|
name="content"
|
||||||
v-bind:placeholder="$t('comment.content')"
|
v-bind:placeholder="$t('comment.content')"
|
||||||
@ -29,16 +31,15 @@
|
|||||||
<li>
|
<li>
|
||||||
<button type="submit" class="sc-button bt-save">{{ $t('action.save') }}</button>
|
<button type="submit" class="sc-button bt-save">{{ $t('action.save') }}</button>
|
||||||
</li>
|
</li>
|
||||||
<li id="xyz">
|
<li v-if="initialComment !== null">
|
||||||
|
<a class="sc-button bt-delete"
|
||||||
|
@click="removeComment">
|
||||||
|
{{ $t('action.delete') }}
|
||||||
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
||||||
<button v-if="initialComment !== null"
|
|
||||||
class="sc-button bt-delete"
|
|
||||||
@click="removeComment">
|
|
||||||
{{ $t('action.delete') }}
|
|
||||||
</button>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -83,9 +84,14 @@ export default {
|
|||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* TODO
|
* TODO
|
||||||
* - patch endpoint to update Content
|
* - [x] delete button in ul record_actions, but not in form
|
||||||
* - delete/reset button ?
|
* - [ ] display updatedAt => initialComment fetch PATCH content changes MUST NOT change object id !!
|
||||||
* - manage flash messages => specific component ?
|
* - [ ] ckeditor integration
|
||||||
* - ckeditor
|
|
||||||
*/
|
*/
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
div.vue-component > div {
|
||||||
|
margin: 1em;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@ -64,7 +64,8 @@ const appMessages = {
|
|||||||
add_resources: "Ajouter des interlocuteurs",
|
add_resources: "Ajouter des interlocuteurs",
|
||||||
},
|
},
|
||||||
comment: {
|
comment: {
|
||||||
title: "Ajout d'une note",
|
title: "Observations",
|
||||||
|
label: "Ajout d'une première note",
|
||||||
content: "Rédigez une première note..."
|
content: "Rédigez une première note..."
|
||||||
},
|
},
|
||||||
confirm: {
|
confirm: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user