mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-01-13 13:49:33 +00:00
Benutzerdefinierten Bauteilstatus einführen
This commit is contained in:
parent
0dc7dbdb03
commit
ee54687f9d
56 changed files with 1312 additions and 31 deletions
|
|
@ -0,0 +1,35 @@
|
|||
<?php
|
||||
/**
|
||||
* This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony).
|
||||
*
|
||||
* Copyright (C) 2019 - 2020 Jan Böhmer (https://github.com/jbtronics)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Tests\Controller\AdminPages;
|
||||
|
||||
use App\Entity\Parts\PartCustomState;
|
||||
|
||||
/**
|
||||
* @group slow
|
||||
* @group DB
|
||||
*/
|
||||
class PartCustomStateControllerTest extends AbstractAdminControllerTest
|
||||
{
|
||||
protected static string $base_path = '/en/part_custom_state';
|
||||
protected static string $entity_class = PartCustomState::class;
|
||||
}
|
||||
|
|
@ -31,6 +31,7 @@ use App\Entity\Attachments\AttachmentType;
|
|||
use App\Entity\Attachments\AttachmentTypeAttachment;
|
||||
use App\Entity\Attachments\CategoryAttachment;
|
||||
use App\Entity\Attachments\CurrencyAttachment;
|
||||
use App\Entity\Attachments\PartCustomStateAttachment;
|
||||
use App\Entity\Attachments\ProjectAttachment;
|
||||
use App\Entity\Attachments\FootprintAttachment;
|
||||
use App\Entity\Attachments\GroupAttachment;
|
||||
|
|
@ -40,6 +41,7 @@ use App\Entity\Attachments\PartAttachment;
|
|||
use App\Entity\Attachments\StorageLocationAttachment;
|
||||
use App\Entity\Attachments\SupplierAttachment;
|
||||
use App\Entity\Attachments\UserAttachment;
|
||||
use App\Entity\Parts\PartCustomState;
|
||||
use App\Entity\ProjectSystem\Project;
|
||||
use App\Entity\Parts\Category;
|
||||
use App\Entity\Parts\Footprint;
|
||||
|
|
@ -89,6 +91,7 @@ class AttachmentTest extends TestCase
|
|||
yield [ManufacturerAttachment::class, Manufacturer::class];
|
||||
yield [MeasurementUnitAttachment::class, MeasurementUnit::class];
|
||||
yield [PartAttachment::class, Part::class];
|
||||
yield [PartCustomStateAttachment::class, PartCustomState::class];
|
||||
yield [StorageLocationAttachment::class, StorageLocation::class];
|
||||
yield [SupplierAttachment::class, Supplier::class];
|
||||
yield [UserAttachment::class, User::class];
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ use App\Entity\Parts\Manufacturer;
|
|||
use App\Entity\Parts\MeasurementUnit;
|
||||
use App\Entity\Parts\Part;
|
||||
use App\Entity\Parts\PartAssociation;
|
||||
use App\Entity\Parts\PartCustomState;
|
||||
use App\Entity\Parts\PartLot;
|
||||
use App\Entity\PriceInformations\Orderdetail;
|
||||
use App\Services\EntityMergers\Mergers\PartMerger;
|
||||
|
|
@ -54,6 +55,7 @@ class PartMergerTest extends KernelTestCase
|
|||
$manufacturer1 = new Manufacturer();
|
||||
$manufacturer2 = new Manufacturer();
|
||||
$unit = new MeasurementUnit();
|
||||
$customState = new PartCustomState();
|
||||
|
||||
$part1 = (new Part())
|
||||
->setCategory($category)
|
||||
|
|
@ -62,7 +64,8 @@ class PartMergerTest extends KernelTestCase
|
|||
$part2 = (new Part())
|
||||
->setFootprint($footprint)
|
||||
->setManufacturer($manufacturer2)
|
||||
->setPartUnit($unit);
|
||||
->setPartUnit($unit)
|
||||
->setPartCustomState($customState);
|
||||
|
||||
$merged = $this->merger->merge($part1, $part2);
|
||||
$this->assertSame($merged, $part1);
|
||||
|
|
@ -70,6 +73,7 @@ class PartMergerTest extends KernelTestCase
|
|||
$this->assertSame($footprint, $merged->getFootprint());
|
||||
$this->assertSame($manufacturer1, $merged->getManufacturer());
|
||||
$this->assertSame($unit, $merged->getPartUnit());
|
||||
$this->assertSame($customState, $merged->getPartCustomState());
|
||||
}
|
||||
|
||||
public function testMergeOfTags(): void
|
||||
|
|
|
|||
|
|
@ -7437,11 +7437,13 @@
|
|||
<field Field="lowStock" Type="tinyint(1)" Null="NO" Key="" Extra="" Comment="" />
|
||||
<field Field="metaPart" Type="tinyint(1)" Null="NO" Key="" Default="0" Extra="" Comment="" />
|
||||
<field Field="partUnit_id" Type="int(11)" Null="YES" Key="MUL" Default="NULL" Extra="" Comment="" />
|
||||
<field Field="partCustomState_id" Type="int(11)" Null="YES" Key="MUL" Default="NULL" Extra="" Comment="" />
|
||||
<field Field="storageLocation_id" Type="int(11)" Null="YES" Key="MUL" Default="NULL" Extra="" Comment="" />
|
||||
<key Table="part" Non_unique="0" Key_name="PRIMARY" Seq_in_index="1" Column_name="id" Collation="A" Cardinality="3" Null="" Index_type="BTREE" Comment="" Index_comment="" Ignored="NO" />
|
||||
<key Table="part" Non_unique="1" Key_name="IDX_E93DDFF812469DE2" Seq_in_index="1" Column_name="category_id" Collation="A" Cardinality="3" Null="YES" Index_type="BTREE" Comment="" Index_comment="" Ignored="NO" />
|
||||
<key Table="part" Non_unique="1" Key_name="IDX_E93DDFF851364C98" Seq_in_index="1" Column_name="footprint_id" Collation="A" Cardinality="3" Null="YES" Index_type="BTREE" Comment="" Index_comment="" Ignored="NO" />
|
||||
<key Table="part" Non_unique="1" Key_name="IDX_E93DDFF8F7A36E87" Seq_in_index="1" Column_name="partUnit_id" Collation="A" Cardinality="3" Null="YES" Index_type="BTREE" Comment="" Index_comment="" Ignored="NO" />
|
||||
<key Table="part" Non_unique="1" Key_name="IDX_E93DDFF8F7A36E88" Seq_in_index="1" Column_name="partCustomState_id" Collation="A" Cardinality="3" Null="YES" Index_type="BTREE" Comment="" Index_comment="" Ignored="NO" />
|
||||
<key Table="part" Non_unique="1" Key_name="IDX_E93DDFF873CD58AF" Seq_in_index="1" Column_name="storageLocation_id" Collation="A" Cardinality="3" Null="YES" Index_type="BTREE" Comment="" Index_comment="" Ignored="NO" />
|
||||
<options Name="part" Engine="InnoDB" Version="10" Row_format="Dynamic" Rows="3" Avg_row_length="5461" Data_length="16384" Max_data_length="0" Index_length="65536" Data_free="0" Auto_increment="4" Create_time="2023-03-22 22:28:36" Update_time="2023-03-22 22:40:40" Collation="utf8mb3_unicode_ci" Create_options="" Comment="" Max_index_length="0" Temporary="N" />
|
||||
</table_structure>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue