mirror of
https://github.com/Karaka-Management/oms-AssetManagement.git
synced 2026-02-16 05:18:40 +00:00
bug fixes
This commit is contained in:
parent
dcd88ac569
commit
e1934a84ea
2
.github/workflows/greetings.yml
vendored
2
.github/workflows/greetings.yml
vendored
|
|
@ -9,5 +9,5 @@ jobs:
|
||||||
- uses: actions/first-interaction@v1
|
- uses: actions/first-interaction@v1
|
||||||
with:
|
with:
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
issue-message: 'Thank you for createing this issue. We will check it as soon as possible.'
|
issue-message: 'Thank you for creating this issue. We will check it as soon as possible.'
|
||||||
pr-message: 'Thank you for your pull request. We will check it as soon as possible.'
|
pr-message: 'Thank you for your pull request. We will check it as soon as possible.'
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,4 @@
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"type": "type",
|
|
||||||
"name": "equipment_profile_image",
|
|
||||||
"l11n": [
|
|
||||||
{
|
|
||||||
"title": "Profile image",
|
|
||||||
"lang": "en"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"title": "Profilbild",
|
|
||||||
"lang": "de"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "collection",
|
"type": "collection",
|
||||||
"create_directory": true,
|
"create_directory": true,
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@ final class ApiAssetAttributeController extends Controller
|
||||||
->where('id', (int) $request->getData('type'))
|
->where('id', (int) $request->getData('type'))
|
||||||
->execute();
|
->execute();
|
||||||
|
|
||||||
if (!$type->repeatable) {
|
if (!$type->isRepeatable) {
|
||||||
$attr = AssetAttributeMapper::count()
|
$attr = AssetAttributeMapper::count()
|
||||||
->with('type')
|
->with('type')
|
||||||
->where('type/id', $type->id)
|
->where('type/id', $type->id)
|
||||||
|
|
|
||||||
|
|
@ -194,7 +194,7 @@ final class ApiController extends Controller
|
||||||
pathSettings: PathSettings::FILE_PATH,
|
pathSettings: PathSettings::FILE_PATH,
|
||||||
hasAccountRelation: false,
|
hasAccountRelation: false,
|
||||||
readContent: $request->getDataBool('parse_content') ?? false,
|
readContent: $request->getDataBool('parse_content') ?? false,
|
||||||
type: $request->getDataInt('type'),
|
tag: $request->getDataInt('tag'),
|
||||||
rel: $asset->id,
|
rel: $asset->id,
|
||||||
mapper: AssetMapper::class,
|
mapper: AssetMapper::class,
|
||||||
field: 'files'
|
field: 'files'
|
||||||
|
|
|
||||||
|
|
@ -19,8 +19,8 @@ use Modules\AssetManagement\Models\AssetTypeMapper;
|
||||||
use Modules\AssetManagement\Models\Attribute\AssetAttributeTypeL11nMapper;
|
use Modules\AssetManagement\Models\Attribute\AssetAttributeTypeL11nMapper;
|
||||||
use Modules\AssetManagement\Models\Attribute\AssetAttributeTypeMapper;
|
use Modules\AssetManagement\Models\Attribute\AssetAttributeTypeMapper;
|
||||||
use Modules\Media\Models\MediaMapper;
|
use Modules\Media\Models\MediaMapper;
|
||||||
use Modules\Media\Models\MediaTypeMapper;
|
|
||||||
use Modules\Organization\Models\UnitMapper;
|
use Modules\Organization\Models\UnitMapper;
|
||||||
|
use Modules\Tag\Models\TagMapper;
|
||||||
use phpOMS\Contract\RenderableInterface;
|
use phpOMS\Contract\RenderableInterface;
|
||||||
use phpOMS\DataStorage\Database\Query\Builder;
|
use phpOMS\DataStorage\Database\Query\Builder;
|
||||||
use phpOMS\Message\RequestAbstract;
|
use phpOMS\Message\RequestAbstract;
|
||||||
|
|
@ -94,7 +94,7 @@ final class BackendController extends Controller
|
||||||
->with('attributes/type/l11n')
|
->with('attributes/type/l11n')
|
||||||
->with('attributes/value/l11n')
|
->with('attributes/value/l11n')
|
||||||
->with('files')
|
->with('files')
|
||||||
->with('files/types')
|
->with('files/tags')
|
||||||
->with('type')
|
->with('type')
|
||||||
->with('type/l11n')
|
->with('type/l11n')
|
||||||
->where('id', (int) $request->getData('id'))
|
->where('id', (int) $request->getData('id'))
|
||||||
|
|
@ -112,15 +112,14 @@ final class BackendController extends Controller
|
||||||
->on(AssetMapper::HAS_MANY['files']['table'] . '.' . AssetMapper::HAS_MANY['files']['self'], '=', AssetMapper::TABLE . '.' . AssetMapper::PRIMARYFIELD)
|
->on(AssetMapper::HAS_MANY['files']['table'] . '.' . AssetMapper::HAS_MANY['files']['self'], '=', AssetMapper::TABLE . '.' . AssetMapper::PRIMARYFIELD)
|
||||||
->leftJoin(MediaMapper::TABLE)
|
->leftJoin(MediaMapper::TABLE)
|
||||||
->on(AssetMapper::HAS_MANY['files']['table'] . '.' . AssetMapper::HAS_MANY['files']['external'], '=', MediaMapper::TABLE . '.' . MediaMapper::PRIMARYFIELD)
|
->on(AssetMapper::HAS_MANY['files']['table'] . '.' . AssetMapper::HAS_MANY['files']['external'], '=', MediaMapper::TABLE . '.' . MediaMapper::PRIMARYFIELD)
|
||||||
->leftJoin(MediaMapper::HAS_MANY['types']['table'])
|
->leftJoin(MediaMapper::HAS_MANY['tags']['table'])
|
||||||
->on(MediaMapper::TABLE . '.' . MediaMapper::PRIMARYFIELD, '=', MediaMapper::HAS_MANY['types']['table'] . '.' . MediaMapper::HAS_MANY['types']['self'])
|
->on(MediaMapper::TABLE . '.' . MediaMapper::PRIMARYFIELD, '=', MediaMapper::HAS_MANY['tags']['table'] . '.' . MediaMapper::HAS_MANY['tags']['self'])
|
||||||
->leftJoin(MediaTypeMapper::TABLE)
|
->leftJoin(TagMapper::TABLE)
|
||||||
->on(MediaMapper::HAS_MANY['types']['table'] . '.' . MediaMapper::HAS_MANY['types']['external'], '=', MediaTypeMapper::TABLE . '.' . MediaTypeMapper::PRIMARYFIELD)
|
->on(MediaMapper::HAS_MANY['tags']['table'] . '.' . MediaMapper::HAS_MANY['tags']['external'], '=', TagMapper::TABLE . '.' . TagMapper::PRIMARYFIELD)
|
||||||
->where(AssetMapper::HAS_MANY['files']['self'], '=', $view->data['asset']->id)
|
->where(AssetMapper::HAS_MANY['files']['self'], '=', $view->data['asset']->id)
|
||||||
->where(MediaTypeMapper::TABLE . '.' . MediaTypeMapper::getColumnByMember('name'), '=', 'asset_profile_image');
|
->where(TagMapper::TABLE . '.' . TagMapper::getColumnByMember('name'), '=', 'profile_image');
|
||||||
|
|
||||||
$view->data['assetImage'] = MediaMapper::get()
|
$view->data['assetImage'] = MediaMapper::get()
|
||||||
->with('types')
|
|
||||||
->where('id', $results)
|
->where('id', $results)
|
||||||
->limit(1)
|
->limit(1)
|
||||||
->execute();
|
->execute();
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ final class AssetAttributeTypeMapper extends DataMapperFactory
|
||||||
'assetmgmt_attr_type_datatype' => ['name' => 'assetmgmt_attr_type_datatype', 'type' => 'int', 'internal' => 'datatype'],
|
'assetmgmt_attr_type_datatype' => ['name' => 'assetmgmt_attr_type_datatype', 'type' => 'int', 'internal' => 'datatype'],
|
||||||
'assetmgmt_attr_type_fields' => ['name' => 'assetmgmt_attr_type_fields', 'type' => 'int', 'internal' => 'fields'],
|
'assetmgmt_attr_type_fields' => ['name' => 'assetmgmt_attr_type_fields', 'type' => 'int', 'internal' => 'fields'],
|
||||||
'assetmgmt_attr_type_custom' => ['name' => 'assetmgmt_attr_type_custom', 'type' => 'bool', 'internal' => 'custom'],
|
'assetmgmt_attr_type_custom' => ['name' => 'assetmgmt_attr_type_custom', 'type' => 'bool', 'internal' => 'custom'],
|
||||||
'assetmgmt_attr_type_repeatable' => ['name' => 'assetmgmt_attr_type_repeatable', 'type' => 'bool', 'internal' => 'repeatable'],
|
'assetmgmt_attr_type_repeatable' => ['name' => 'assetmgmt_attr_type_repeatable', 'type' => 'bool', 'internal' => 'isRepeatable'],
|
||||||
'assetmgmt_attr_type_internal' => ['name' => 'assetmgmt_attr_type_internal', 'type' => 'bool', 'internal' => 'isInternal'],
|
'assetmgmt_attr_type_internal' => ['name' => 'assetmgmt_attr_type_internal', 'type' => 'bool', 'internal' => 'isInternal'],
|
||||||
'assetmgmt_attr_type_pattern' => ['name' => 'assetmgmt_attr_type_pattern', 'type' => 'string', 'internal' => 'validationPattern'],
|
'assetmgmt_attr_type_pattern' => ['name' => 'assetmgmt_attr_type_pattern', 'type' => 'string', 'internal' => 'validationPattern'],
|
||||||
'assetmgmt_attr_type_required' => ['name' => 'assetmgmt_attr_type_required', 'type' => 'bool', 'internal' => 'isRequired'],
|
'assetmgmt_attr_type_required' => ['name' => 'assetmgmt_attr_type_required', 'type' => 'bool', 'internal' => 'isRequired'],
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user