Skip to content

Commit

Permalink
fix: update activity with emotions (#4459)
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreMacherel authored Dec 8, 2020
1 parent 307d253 commit d4adb4f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

### Fixes:

*
* Fix update activity with emotions


# RELEASED VERSIONS:
Expand Down
2 changes: 1 addition & 1 deletion public/js/app.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"/js/manifest.js": "/js/manifest.js?id=7db827d654313dce4250",
"/js/vendor.js": "/js/vendor.js?id=97d06b404edf4b6073de",
"/js/app.js": "/js/app.js?id=c43ad50e8faa0d8094d4",
"/js/app.js": "/js/app.js?id=eaa287c0e6c4e2864f61",
"/css/app-ltr.css": "/css/app-ltr.css?id=94a406592b3c938b6c66",
"/css/app-rtl.css": "/css/app-rtl.css?id=b9e7e1b64d79c5a5842a",
"/css/stripe.css": "/css/stripe.css?id=746c8aaac01c56d3cee1",
Expand Down
6 changes: 4 additions & 2 deletions resources/js/components/people/activity/CreateActivity.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
</label>
<emotion
class="pv2"
:initial-emotions="newActivity.emotions"
:initial-emotions="initialEmotions"
@update="updateEmotionsList"
/>
</div>
Expand Down Expand Up @@ -219,10 +219,11 @@ export default {
resetFields() {
if (this.activity) {
this.initialEmotions = JSON.parse(JSON.stringify(this.activity.emotions));
this.newActivity.summary = this.activity.summary;
this.newActivity.description = this.activity.description;
this.newActivity.happened_at = this.activity.happened_at;
this.newActivity.emotions = this.activity.emotions;
this.updateEmotionsList(this.activity.emotions);
this.newActivity.activity_type_id = this.activity.activity_type ? this.activity.activity_type.id : null;
this.participants = this.activity.attendees.contacts.map(attendee => {
return {
Expand All @@ -231,6 +232,7 @@ export default {
};
});
} else {
this.initialEmotions = [];
this.newActivity.summary = '';
this.newActivity.description = '';
this.newActivity.happened_at = this.todayDate;
Expand Down

0 comments on commit d4adb4f

Please sign in to comment.