// Need full OptionValue records
$actStatuses = civicrm_api3('OptionValue', 'get', array('option_group_id' => 'activity_status'));
$actTypes = civicrm_api3('OptionValue', 'get', array('option_group_id' => 'activity_type'));
+ $relTypes = civicrm_api3('RelationshipType', 'get', array());
+
CRM_Core_Resources::singleton()->addSetting(array(
'crmCaseType' => array(
'actStatuses' => array_values($actStatuses['values']),
'actTypes' => array_values($actTypes['values']),
+ 'relTypes' => array_values($relTypes['values']),
//CRM_Core_PseudoConstant::activityType(TRUE, TRUE, FALSE, 'name'),
+
),
));
return $result;
$scope.activityStatuses = CRM.crmCaseType.actStatuses;
$scope.activityTypes = CRM.crmCaseType.actTypes;
$scope.activityTypeNames = _.pluck(CRM.crmCaseType.actTypes, 'name');
+ $scope.relationshipTypeNames = _.pluck(CRM.crmCaseType.relTypes, 'label_b_a'); // label_b_a is CRM_Case_XMLProcessor::REL_TYPE_CNAME
$scope.workflows = {
'timeline': 'Timeline',
}
};
+ /// Add a new role
+ $scope.addRole = function(roles, roleName) {
+ roles.push({
+ name: roleName
+ });
+ };
+
$scope.onManagerChange = function(managerRole) {
angular.forEach($scope.caseType.definition.caseRoles, function(caseRole) {
if (caseRole != managerRole) {