SearchKit - Use angular helper crmStatus for in-place-edit
authorcolemanw <coleman@civicrm.org>
Wed, 6 Sep 2023 22:02:29 +0000 (18:02 -0400)
committercolemanw <coleman@civicrm.org>
Wed, 6 Sep 2023 22:02:29 +0000 (18:02 -0400)
Followup to #27105 this uses native angular service instead of jQuery-based function

ext/search_kit/ang/crmSearchDisplay/crmSearchDisplayEditable.component.js

index d54bd66c12e64fc3f27d9bc0c671e555d1954751..46eed4615d2175b9dac5ebb471571bbbc7b49a5a 100644 (file)
@@ -11,7 +11,7 @@
       cancel: '&'
     },
     templateUrl: '~/crmSearchDisplay/crmSearchDisplayEditable.html',
-    controller: function($scope, $element, crmApi4) {
+    controller: function($scope, $element, crmApi4, crmStatus) {
       var ctrl = this,
         initialValue,
         col;
@@ -53,7 +53,7 @@
         const value = formatDataType(ctrl.value);
         if (value !== initialValue) {
           col.edit.record[col.edit.value_key] = value;
-          CRM.status({}, crmApi4(col.edit.entity, col.edit.action, {values: col.edit.record}));
+          crmStatus({}, crmApi4(col.edit.entity, col.edit.action, {values: col.edit.record}));
           ctrl.row.data[col.edit.value_path] = value;
           col.val = formatDisplayValue(value);
         }