Skip to content

Commit

Permalink
NEU-67: Fix case category updation
Browse files Browse the repository at this point in the history
  • Loading branch information
Muhammad Shahrukh committed Nov 3, 2024
1 parent 2dfa77d commit bf41efb
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions CRM/Civicase/Event/Listener/CaseTypeCategoryIsActiveToggler.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,13 @@ public static function onRespond(RespondEvent $e) {
$caseCategoryValue = self::getCaseCategoryValue($apiRequest['params']['id']);
$caseCategoryInstance = CaseTypeCategoryHelper::getInstanceObject($caseCategoryValue);
$handler = CaseTypeCategoryEventHandlerFactory::create();
$handler->onUpdate(
$caseCategoryInstance,
$apiRequest['params']['id'],
isset($apiRequest['params']['is_active']) ? $apiRequest['params']['is_active'] : NULL,
isset($apiRequest['params']['icon']) ? $apiRequest['params']['icon'] : NULL
);
$caseCategory = [
'id' => $apiRequest['params']['id'],
'is_active' => isset($apiRequest['params']['is_active']) ? $apiRequest['params']['is_active'] : NULL,
'icon' => isset($apiRequest['params']['icon']) ? $apiRequest['params']['icon'] : NULL
];

$handler->onUpdate($caseCategoryInstance, $caseCategory);
}

/**
Expand Down

0 comments on commit bf41efb

Please sign in to comment.