Skip to content

Commit

Permalink
Merge pull request #1050 from compucorp/neu-67-fix-case-category-upda…
Browse files Browse the repository at this point in the history
…tion

NEU-67: Fix Case Category Updation
  • Loading branch information
shahrukh-compuco authored Nov 4, 2024
2 parents 2dfa77d + 9b67eb2 commit 29c37f8
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']) ?? NULL,
'icon' => isset($apiRequest['params']['icon']) ?? NULL,
];

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

/**
Expand Down

0 comments on commit 29c37f8

Please sign in to comment.