Skip to content

Commit

Permalink
cs
Browse files Browse the repository at this point in the history
  • Loading branch information
4rthem committed Oct 10, 2024
1 parent e3a9c07 commit 1c40248
Show file tree
Hide file tree
Showing 59 changed files with 640 additions and 485 deletions.
16 changes: 10 additions & 6 deletions dashboard/client/src/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,16 @@ export default function Dashboard({}: Props) {
]}
/>
)}
{isInIframe ? <Service
mainUrl={`/`}
title={`Dashboard`}
description={`Phrasea entrypoint`}
logo={notifyImg}
/> : ''}
{isInIframe ? (
<Service
mainUrl={`/`}
title={`Dashboard`}
description={`Phrasea entrypoint`}
logo={notifyImg}
/>
) : (
''
)}
</Grid>
{roles.includes('tech') && (
<Grid container spacing={2} marginTop={1}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class FileOutputTransformer implements OutputTransformerInterface

public function __construct(
private readonly FileUrlResolver $fileUrlResolver,
private readonly EntityManagerInterface $em
private readonly EntityManagerInterface $em,
) {
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,10 @@
namespace App\Api\Processor;

use Alchemy\AuthBundle\Security\Traits\SecurityAwareTrait;
use Alchemy\CoreBundle\Util\DoctrineUtil;
use ApiPlatform\Metadata\Operation;
use ApiPlatform\State\ProcessorInterface;
use App\Api\Model\Input\Attribute\AssetAttributeBatchUpdateInput;
use App\Attribute\BatchAttributeManager;
use App\Entity\Core\Asset;
use App\Security\Voter\AssetVoter;
use Doctrine\ORM\EntityManagerInterface;
use Ramsey\Uuid\Uuid;

Expand Down
5 changes: 2 additions & 3 deletions databox/api/src/Api/Provider/ShareCollectionProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,13 @@ final class ShareCollectionProvider extends AbstractAssetFilteredCollectionProvi
{
public function __construct(
private readonly ShareReadProvider $shareReadProvider,
)
{
) {
}

protected function provideCollection(
Operation $operation,
array $uriVariables = [],
array $context = []
array $context = [],
): array|object {

$asset = $this->getAsset($context);
Expand Down
1 change: 0 additions & 1 deletion databox/api/src/Api/Provider/ShareRenditionProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
use ApiPlatform\Metadata\Operation;
use ApiPlatform\Metadata\UrlGeneratorInterface;
use ApiPlatform\State\ProviderInterface;
use App\Api\Traits\ItemProviderAwareTrait;
use App\Asset\FileUrlResolver;
use App\Entity\Core\AssetRendition;
use App\Entity\Core\Share;
Expand Down
14 changes: 0 additions & 14 deletions databox/api/src/Controller/Admin/ShareCrudController.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,15 @@
use Alchemy\AdminBundle\Controller\AbstractAdminCrudController;
use Alchemy\AdminBundle\Field\CodeField;
use Alchemy\AdminBundle\Field\IdField;
use Alchemy\AdminBundle\Field\JsonField;
use Alchemy\AdminBundle\Field\UserChoiceField;
use Alchemy\AdminBundle\Filter\AssociationIdentifierFilter;
use Alchemy\AdminBundle\Filter\UserChoiceFilter;
use App\Attribute\AttributeTypeRegistry;
use App\Entity\Core\AttributeDefinition;
use App\Entity\Core\Share;
use EasyCorp\Bundle\EasyAdminBundle\Config\Crud;
use EasyCorp\Bundle\EasyAdminBundle\Config\Filters;
use EasyCorp\Bundle\EasyAdminBundle\Field\ArrayField;
use EasyCorp\Bundle\EasyAdminBundle\Field\AssociationField;
use EasyCorp\Bundle\EasyAdminBundle\Field\BooleanField;
use EasyCorp\Bundle\EasyAdminBundle\Field\ChoiceField;
use EasyCorp\Bundle\EasyAdminBundle\Field\DateTimeField;
use EasyCorp\Bundle\EasyAdminBundle\Field\Field;
use EasyCorp\Bundle\EasyAdminBundle\Field\IntegerField;
use EasyCorp\Bundle\EasyAdminBundle\Field\TextareaField;
use EasyCorp\Bundle\EasyAdminBundle\Field\TextField;
use EasyCorp\Bundle\EasyAdminBundle\Filter\BooleanFilter;
use EasyCorp\Bundle\EasyAdminBundle\Filter\ChoiceFilter;
use EasyCorp\Bundle\EasyAdminBundle\Filter\EntityFilter;
use EasyCorp\Bundle\EasyAdminBundle\Filter\TextFilter;
use Symfony\Component\String\ByteString;

final class ShareCrudController extends AbstractAdminCrudController
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
{
public function __construct(
private Security $security,
)
{
) {
}

public function prePersist(PrePersistEventArgs $args): void
Expand Down
2 changes: 1 addition & 1 deletion databox/api/src/Entity/Basket/Basket.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

use Alchemy\AclBundle\AclObjectInterface;
use Alchemy\AuthBundle\Security\JwtUser;
use Alchemy\CoreBundle\Entity\AbstractUuidEntity;
use Alchemy\ESBundle\Indexer\ESIndexableInterface;
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Delete;
Expand All @@ -20,7 +21,6 @@
use App\Api\Processor\AddToBasketProcessor;
use App\Api\Processor\RemoveFromBasketProcessor;
use App\Api\Provider\BasketCollectionProvider;
use Alchemy\CoreBundle\Entity\AbstractUuidEntity;
use App\Entity\Traits\CreatedAtTrait;
use App\Entity\Traits\OwnerIdTrait;
use App\Entity\Traits\UpdatedAtTrait;
Expand Down
2 changes: 1 addition & 1 deletion databox/api/src/Entity/Basket/BasketAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

namespace App\Entity\Basket;

use Alchemy\CoreBundle\Entity\AbstractUuidEntity;
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\GetCollection;
use ApiPlatform\Metadata\Link;
use App\Api\Provider\BasketAssetCollectionProvider;
use Alchemy\CoreBundle\Entity\AbstractUuidEntity;
use App\Entity\Core\Asset;
use App\Entity\Traits\AssetAnnotationsTrait;
use App\Entity\Traits\CreatedAtTrait;
Expand Down
2 changes: 1 addition & 1 deletion databox/api/src/Entity/Core/Asset.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

use Alchemy\AclBundle\AclObjectInterface;
use Alchemy\AuthBundle\Security\JwtUser;
use Alchemy\CoreBundle\Entity\AbstractUuidEntity;
use Alchemy\ESBundle\Indexer\ESIndexableDependencyInterface;
use Alchemy\ESBundle\Indexer\ESIndexableInterface;
use ApiPlatform\Metadata\ApiResource;
Expand Down Expand Up @@ -37,7 +38,6 @@
use App\Api\Provider\SearchSuggestionCollectionProvider;
use App\Controller\Core\DeleteAssetByIdsAction;
use App\Controller\Core\DeleteAssetByKeysAction;
use Alchemy\CoreBundle\Entity\AbstractUuidEntity;
use App\Entity\Traits\CreatedAtTrait;
use App\Entity\Traits\LocaleTrait;
use App\Entity\Traits\OwnerIdTrait;
Expand Down
4 changes: 2 additions & 2 deletions databox/api/src/Entity/Core/AssetFileVersion.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

namespace App\Entity\Core;

use Alchemy\CoreBundle\Entity\AbstractUuidEntity;
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Delete;
use ApiPlatform\Metadata\Get;
use ApiPlatform\Metadata\GetCollection;
use App\Api\Provider\AssetFileVersionCollectionProvider;

use Alchemy\CoreBundle\Entity\AbstractUuidEntity;
use App\Api\Provider\AssetFileVersionCollectionProvider;
use App\Entity\Traits\CreatedAtTrait;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
Expand Down
2 changes: 1 addition & 1 deletion databox/api/src/Entity/Core/AssetRendition.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace App\Entity\Core;

use Alchemy\CoreBundle\Entity\AbstractUuidEntity;
use ApiPlatform\Metadata\ApiProperty;
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Delete;
Expand All @@ -15,7 +16,6 @@
use App\Api\Model\Input\RenditionInput;
use App\Api\Model\Output\AssetRenditionOutput;
use App\Api\Provider\RenditionCollectionProvider;
use Alchemy\CoreBundle\Entity\AbstractUuidEntity;
use App\Entity\Traits\CreatedAtTrait;
use App\Entity\Traits\UpdatedAtTrait;
use App\Repository\Core\AssetRenditionRepository;
Expand Down
2 changes: 1 addition & 1 deletion databox/api/src/Entity/Core/AttributeClass.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

use Alchemy\AclBundle\AclObjectInterface;
use Alchemy\AuthBundle\Security\JwtUser;
use Alchemy\CoreBundle\Entity\AbstractUuidEntity;
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Delete;
use ApiPlatform\Metadata\Get;
Expand All @@ -15,7 +16,6 @@
use ApiPlatform\Metadata\Put;
use App\Api\Model\Input\AttributeClassInput;
use App\Api\Provider\AttributeClassCollectionProvider;
use Alchemy\CoreBundle\Entity\AbstractUuidEntity;
use App\Entity\Traits\CreatedAtTrait;
use App\Entity\Traits\WorkspaceTrait;
use Doctrine\Common\Collections\ArrayCollection;
Expand Down
2 changes: 1 addition & 1 deletion databox/api/src/Entity/Core/AttributeDefinition.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace App\Entity\Core;

use Alchemy\AuthBundle\Security\JwtUser;
use Alchemy\CoreBundle\Entity\AbstractUuidEntity;
use ApiPlatform\Metadata\ApiProperty;
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Delete;
Expand All @@ -19,7 +20,6 @@
use App\Attribute\AttributeInterface;
use App\Attribute\Type\TextAttributeType;
use App\Controller\Core\AttributeDefinitionSortAction;
use Alchemy\CoreBundle\Entity\AbstractUuidEntity;
use App\Entity\Traits\CreatedAtTrait;
use App\Entity\Traits\UpdatedAtTrait;
use App\Entity\Traits\WorkspaceTrait;
Expand Down
2 changes: 1 addition & 1 deletion databox/api/src/Entity/Core/AttributeEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace App\Entity\Core;

use Alchemy\CoreBundle\Entity\AbstractUuidEntity;
use ApiPlatform\Doctrine\Orm\Filter\SearchFilter;
use ApiPlatform\Metadata\ApiFilter;
use ApiPlatform\Metadata\ApiResource;
Expand All @@ -14,7 +15,6 @@
use ApiPlatform\Metadata\Post;
use ApiPlatform\Metadata\Put;
use App\Api\Provider\AttributeEntityCollectionProvider;
use Alchemy\CoreBundle\Entity\AbstractUuidEntity;
use App\Entity\Traits\CreatedAtTrait;
use App\Entity\Traits\UpdatedAtTrait;
use App\Entity\Traits\WorkspaceTrait;
Expand Down
2 changes: 1 addition & 1 deletion databox/api/src/Entity/Core/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace App\Entity\Core;

use Alchemy\AclBundle\AclObjectInterface;
use Alchemy\CoreBundle\Entity\AbstractUuidEntity;
use Alchemy\ESBundle\Indexer\ESIndexableDeleteDependencyInterface;
use Alchemy\ESBundle\Indexer\ESIndexableDependencyInterface;
use Alchemy\ESBundle\Indexer\ESIndexableInterface;
Expand All @@ -21,7 +22,6 @@
use App\Api\Processor\MoveCollectionProcessor;
use App\Api\Provider\CollectionProvider;
use App\Doctrine\Listener\SoftDeleteableInterface;
use Alchemy\CoreBundle\Entity\AbstractUuidEntity;
use App\Entity\Traits\CreatedAtTrait;
use App\Entity\Traits\DeletedAtTrait;
use App\Entity\Traits\LocaleTrait;
Expand Down
2 changes: 1 addition & 1 deletion databox/api/src/Entity/Core/CollectionAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

namespace App\Entity\Core;

use Alchemy\CoreBundle\Entity\AbstractUuidEntity;
use Alchemy\ESBundle\Indexer\ESIndexableDeleteDependencyInterface;
use Alchemy\ESBundle\Indexer\ESIndexableDependencyInterface;
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Delete;
use ApiPlatform\Metadata\Post;
use Alchemy\CoreBundle\Entity\AbstractUuidEntity;
use App\Entity\Traits\CreatedAtTrait;
use App\Repository\Core\CollectionAssetRepository;
use Doctrine\ORM\Mapping as ORM;
Expand Down
2 changes: 1 addition & 1 deletion databox/api/src/Entity/Core/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

namespace App\Entity\Core;

use Alchemy\CoreBundle\Entity\AbstractUuidEntity;
use ApiPlatform\Metadata\ApiResource;
use App\Api\Model\Output\FileOutput;
use Alchemy\CoreBundle\Entity\AbstractUuidEntity;
use App\Entity\Traits\CreatedAtTrait;
use App\Entity\Traits\UpdatedAtTrait;
use App\Entity\Traits\WorkspaceTrait;
Expand Down
4 changes: 2 additions & 2 deletions databox/api/src/Entity/Core/RenditionClass.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
namespace App\Entity\Core;

use Alchemy\AuthBundle\Security\JwtUser;
use Alchemy\CoreBundle\Entity\AbstractUuidEntity;
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Delete;
use ApiPlatform\Metadata\Get;
use ApiPlatform\Metadata\GetCollection;
use ApiPlatform\Metadata\Patch;
use ApiPlatform\Metadata\Post;
use ApiPlatform\Metadata\Put;

use ApiPlatform\Metadata\Put;
use App\Api\Provider\RenditionClassCollectionProvider;
use Alchemy\CoreBundle\Entity\AbstractUuidEntity;
use App\Entity\Traits\CreatedAtTrait;
use App\Entity\Traits\WorkspaceTrait;
use Doctrine\Common\Collections\ArrayCollection;
Expand Down
2 changes: 1 addition & 1 deletion databox/api/src/Entity/Core/RenditionDefinition.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace App\Entity\Core;

use Alchemy\CoreBundle\Entity\AbstractUuidEntity;
use ApiPlatform\Metadata\ApiProperty;
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Delete;
Expand All @@ -15,7 +16,6 @@
use App\Api\Model\Input\RenditionDefinitionInput;
use App\Api\Provider\RenditionDefinitionCollectionProvider;
use App\Controller\Core\RenditionDefinitionSortAction;
use Alchemy\CoreBundle\Entity\AbstractUuidEntity;

use App\Entity\Traits\CreatedAtTrait;
use App\Entity\Traits\UpdatedAtTrait;
Expand Down
2 changes: 1 addition & 1 deletion databox/api/src/Entity/Core/RenditionRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace App\Entity\Core;

use Alchemy\AuthBundle\Security\JwtUser;
use Alchemy\CoreBundle\Entity\AbstractUuidEntity;
use ApiPlatform\Doctrine\Orm\Filter\SearchFilter;
use ApiPlatform\Metadata\ApiFilter;
use ApiPlatform\Metadata\ApiResource;
Expand All @@ -16,7 +17,6 @@
use ApiPlatform\Metadata\Put;
use App\Api\Model\Input\RenditionRuleInput;
use App\Api\Model\Output\RenditionRuleOutput;
use Alchemy\CoreBundle\Entity\AbstractUuidEntity;
use App\Entity\Traits\CreatedAtTrait;
use App\Entity\Traits\UpdatedAtTrait;
use App\Repository\Core\RenditionRuleRepository;
Expand Down
9 changes: 3 additions & 6 deletions databox/api/src/Entity/Core/Share.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,22 @@

namespace App\Entity\Core;

use Alchemy\CoreBundle\Entity\AbstractUuidEntity;
use ApiPlatform\Doctrine\Orm\Filter\SearchFilter;
use ApiPlatform\Metadata\ApiFilter;
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Delete;
use ApiPlatform\Metadata\Get;
use ApiPlatform\Metadata\GetCollection;
use ApiPlatform\Metadata\Link;
use ApiPlatform\Metadata\Post;
use ApiPlatform\Metadata\Put;
use Alchemy\CoreBundle\Entity\AbstractUuidEntity;
use App\Api\Processor\ShareProcessor;
use App\Api\Provider\ShareCollectionProvider;
use App\Api\Provider\ShareReadProvider;
use App\Api\Provider\ShareRenditionProvider;
use App\Entity\Basket\Basket;
use App\Entity\Traits\CreatedAtTrait;
use App\Entity\Traits\OwnerIdTrait;
use App\Entity\Traits\UpdatedAtTrait;
use App\Entity\WithOwnerIdInterface;
use App\Listener\OwnerPersistableInterface;
use App\Repository\Core\ShareRepository;
use App\Security\Voter\AbstractVoter;
Expand All @@ -39,7 +36,7 @@
uriTemplate: '/shares/{id}/public',
normalizationContext: [
'groups' => [
self::GROUP_PUBLIC_READ
self::GROUP_PUBLIC_READ,
],
],
security: 'is_granted("'.AbstractVoter::READ.'", object)',
Expand All @@ -53,7 +50,7 @@
],
normalizationContext: [
'groups' => [
self::GROUP_PUBLIC_READ
self::GROUP_PUBLIC_READ,
],
],
name: 'share_public_rendition',
Expand Down
2 changes: 1 addition & 1 deletion databox/api/src/Entity/Core/Tag.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace App\Entity\Core;

use Alchemy\CoreBundle\Entity\AbstractUuidEntity;
use ApiPlatform\Doctrine\Orm\Filter\SearchFilter;
use ApiPlatform\Metadata\ApiFilter;
use ApiPlatform\Metadata\ApiResource;
Expand All @@ -15,7 +16,6 @@
use App\Api\Model\Input\TagInput;
use App\Api\Model\Output\TagOutput;
use App\Api\Provider\TagCollectionProvider;
use Alchemy\CoreBundle\Entity\AbstractUuidEntity;
use App\Entity\Traits\CreatedAtTrait;
use App\Entity\Traits\LocaleTrait;
use App\Entity\Traits\UpdatedAtTrait;
Expand Down
Loading

0 comments on commit 1c40248

Please sign in to comment.