[FIX] mail_activity_team: restore to my activities when unselecting

This commit is contained in:
Enric Tobella 2022-11-20 19:47:10 +01:00
parent 607faa0857
commit e4f701d36f
2 changed files with 11 additions and 2 deletions

View File

@ -98,4 +98,13 @@ ActivityMenu.include({
session.user_context.team_activities = false;
});
},
_onActivityMenuHide: function () {
this.filter = "my";
this._update_team_activities_context();
this._getActivityData();
this.$filter_buttons.removeClass("active");
var $target = $(".my_activities");
$target.addClass("active");
return this._super.apply(this, arguments);
},
});

View File

@ -7,13 +7,13 @@
<div>
<button
type="button"
class="btn btn-link o_filter_button active"
class="my_activities btn btn-link o_filter_button active"
data-filter='my'
role="tab"
> My Activities </button>
<button
type="button"
class="btn btn-link o_filter_button"
class="team_activities btn btn-link o_filter_button"
data-filter='team'
role="tab"
> Team Activities </button>