mirror of
https://github.com/Karaka-Management/oms-Profile.git
synced 2026-01-27 06:28:40 +00:00
test fixes and changes for release
This commit is contained in:
parent
7f769063eb
commit
505199b4fa
|
|
@ -194,6 +194,9 @@ final class ApiController extends Controller
|
|||
);
|
||||
|
||||
$profile->image = !empty($uploaded) ? \reset($uploaded) : new NullMedia();
|
||||
if (!($profile->image instanceof NullMedia)) {
|
||||
$profile->image = $this->app->moduleManager->get('Media')->resizeImage($profile->image, 100, 100, false);
|
||||
}
|
||||
|
||||
$this->updateModel($request->header->account, $old, $profile, ProfileMapper::class, 'profile', $request->getOrigin());
|
||||
$this->fillJsonResponse($request, $response, NotificationLevel::OK, 'Profile', 'Profile successfully updated', $profile);
|
||||
|
|
|
|||
|
|
@ -100,8 +100,10 @@ final class BackendController extends Controller
|
|||
|
||||
$profileImage = $this->app->appSettings->get(names: SettingsEnum::DEFAULT_PROFILE_IMAGE, module: 'Profile');
|
||||
|
||||
/** @var \Modules\Media\Modles\Media $image */
|
||||
$image = MediaMapper::get()->where('id', (int) $profileImage->content)->execute();
|
||||
/** @var \Modules\Media\Models\Media $image */
|
||||
$image = MediaMapper::get()
|
||||
->where('id', (int) $profileImage->content)
|
||||
->execute();
|
||||
|
||||
$view->setData('defaultImage', $image);
|
||||
|
||||
|
|
@ -144,7 +146,7 @@ final class BackendController extends Controller
|
|||
->with('location')
|
||||
->with('contactElements');
|
||||
|
||||
/** @var \Modules\Profile\Modles\Profile $profile */
|
||||
/** @var \Modules\Profile\Models\Profile $profile */
|
||||
$profile = $request->getData('for') !== null
|
||||
? $mapperQuery->where('account', (int) $request->getData('for'))->execute()
|
||||
: $mapperQuery->where('id', (int) $request->getData('id'))->execute();
|
||||
|
|
@ -162,14 +164,14 @@ final class BackendController extends Controller
|
|||
$accGrpSelector = new \Modules\Profile\Theme\Backend\Components\AccountGroupSelector\BaseView($this->app->l11nManager, $request, $response);
|
||||
$view->addData('accGrpSelector', $accGrpSelector);
|
||||
|
||||
/** @var \Modules\Media\Modles\Media[] $media */
|
||||
/** @var \Modules\Media\Models\Media[] $media */
|
||||
$media = MediaMapper::getAll()
|
||||
->with('createdBy')
|
||||
->where('createdBy', (int) $profile->account->getId())
|
||||
->limit(25)
|
||||
->execute();
|
||||
|
||||
$view->setData('media', $media instanceof NullMedia ? [] : (!\is_array($media) ? [$media] : $media));
|
||||
$view->setData('media', $media);
|
||||
|
||||
$profileImage = $this->app->appSettings->get(names: SettingsEnum::DEFAULT_PROFILE_IMAGE, module: 'Profile');
|
||||
$image = MediaMapper::get()->where('id', (int) $profileImage->content)->execute();
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ class Contact
|
|||
* @var int
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private int $profile = 0;
|
||||
public int $profile = 0;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
|
|
|
|||
|
|
@ -257,6 +257,25 @@ $CONFIG = [
|
|||
'root' => '/',
|
||||
'https' => false,
|
||||
],
|
||||
'app' => [
|
||||
'path' => __DIR__,
|
||||
'default' => [
|
||||
'app' => 'Backend',
|
||||
'id' => 'backend',
|
||||
'lang' => 'en',
|
||||
'theme' => 'Backend',
|
||||
'org' => 1,
|
||||
],
|
||||
'domains' => [
|
||||
'127.0.0.1' => [
|
||||
'app' => 'Backend',
|
||||
'id' => 'backend',
|
||||
'lang' => 'en',
|
||||
'theme' => 'Backend',
|
||||
'org' => 1,
|
||||
],
|
||||
],
|
||||
],
|
||||
'socket' => [
|
||||
'master' => [
|
||||
'host' => '127.0.0.1',
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user