Currently (v1.6.1) there is no option to edit a journal entry, for e.g. appending more content after submitting the first draft.
Only workaround currently:
@djaiss Hi there,
I would like to be part of this one. Here are my first thoughts:
Two brand new routes :
Route::get('/journal/entries/{journalEntry}/edit', 'JournalController@edit');
Route::put('/journal/entries/{journalEntry}', 'JournalController@update');
Two approaches for the view:
Into the edit view, we need to modify:
The Entry post field can contain HTML/Markdown and it has to be correctly rendered during the edition process. I don't really know how to handle that since textarea tag cannot render HTML. Do you have any suggestion/idea?
Create two methods, edit() and update() in the JournalController.php file (checking for both that the user is allowed to modify the Entry using account_id field).
Add a new "Modify" link just before the "Delete" link in the JournalContentEntry.vue component. Something like:
<li class="di">
<a class="pointer" :cy-name="'entry-modify-button-' + entry.id" :href="'/journal/entries/' + entry.id + '/edit'">
{{ $t('app.modify') }}
</a>
</li>
<li class="di">
<a class="pointer" :cy-name="'entry-delete-button-' + entry.id" @click="trash()">
{{ $t('app.delete') }}
</a>
</li>
Plus tests, of course :-)
Is that this approach satisfying your expectations ? Is it simple enough to implement and maintain ?
Best regards,
We also expect this feature. What is the status?
@aiveras Thanks for your interest in this issue.
Well, actually it looks like this => https://imgur.com/a/rHAt7r3
It's fully working (but not yet programmatically tested), the code is available here => https://github.com/TeddyBear06/monica/tree/818-add-journal-entry-edit-option.
I'm gonna write tests and create a pull request.
@erdmenchen @aiveras it's done 馃憤 Not yet tested by myself but this feature is available in the latest Monica version thanks to @asbiin help 鈽猴笍
This ticket can be closed 馃帀
Most helpful comment
@erdmenchen @aiveras it's done 馃憤 Not yet tested by myself but this feature is available in the latest Monica version thanks to @asbiin help 鈽猴笍
This ticket can be closed 馃帀