ContactSummary - Update activity tab when adding contribution
authorcolemanw <coleman@civicrm.org>
Wed, 4 Oct 2023 22:30:40 +0000 (18:30 -0400)
committercolemanw <coleman@civicrm.org>
Wed, 3 Jan 2024 11:37:05 +0000 (06:37 -0500)
CRM/Contribute/Form/Contribution.php
templates/CRM/common/TabHeader.js

index 31b980012db64fcc33f276d4405484b60e01a376..507d25d136651d503ef285e233d5d8eff9e3fd33 100644 (file)
@@ -1106,6 +1106,7 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP
     if (empty($this->_id) && !empty($contribution->id)) {
       $this->_id = $contribution->id;
     }
+    $this->ajaxResponse['updateTabs']['#tab_activity'] = TRUE;
     if (!empty($this->_id) && CRM_Core_Permission::access('CiviMember')) {
       $membershipPaymentCount = civicrm_api3('MembershipPayment', 'getCount', ['contribution_id' => $this->_id]);
       if ($membershipPaymentCount) {
index a5f25b4b6e7c035c0a9c8214f0d6cca6d1ef5a79..5de7c9dfd135989ee9d2c361360f8a57e6bcb48f 100644 (file)
    * @param count {Number}
    */
   CRM.tabHeader.updateCount = function(tab, count) {
+    if (typeof count === 'boolean') {
+      return;
+    }
     var oldClass = getCountClass(tab);
     if (oldClass) {
       $(tab).removeClass(oldClass);