30 lines
932 B
PHP
30 lines
932 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests;
|
|
use App\Http\Requests\LambdaRequest;
|
|
use Auth;
|
|
use Log;
|
|
|
|
class FormAdditional
|
|
{
|
|
public static function get_additional_info($form_id) {
|
|
switch($form_id) {
|
|
case '63c2ff17-a69c-4b47-af33-1d9909c608b6':
|
|
case 'eaef2abf-f16b-414c-b6a5-df3fd2282b2e':
|
|
$hierarchy = LambdaRequest::getrequest('ums', 'hierarchy/hierarchy_below_me', ['partition' => 'rapport-'.Auth::user()->domain, ]);
|
|
$team = [];
|
|
foreach($hierarchy->data->hierarchies as $hie) {
|
|
if(isset($hie->owner_info->id)) {
|
|
$team[$hie->owner_info->id] = ['name' => $hie->owner_info->name, 'code' => $hie->owner_info->employee_code ];
|
|
|
|
}
|
|
}
|
|
return ['team' => $team];
|
|
break;
|
|
|
|
default:
|
|
return [];
|
|
break;
|
|
}
|
|
}
|
|
} |