mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-30 13:34:28 +02:00
Show BOM entries in projects history
This commit is contained in:
parent
e423ef1e09
commit
f618616379
2 changed files with 8 additions and 0 deletions
|
@ -31,6 +31,7 @@ use App\Entity\Parameters\AbstractParameter;
|
||||||
use App\Entity\Parts\PartLot;
|
use App\Entity\Parts\PartLot;
|
||||||
use App\Entity\PriceInformations\Orderdetail;
|
use App\Entity\PriceInformations\Orderdetail;
|
||||||
use App\Entity\PriceInformations\Pricedetail;
|
use App\Entity\PriceInformations\Pricedetail;
|
||||||
|
use App\Entity\ProjectSystem\ProjectBOMEntry;
|
||||||
use App\Exceptions\EntityNotSupportedException;
|
use App\Exceptions\EntityNotSupportedException;
|
||||||
use App\Repository\LogEntryRepository;
|
use App\Repository\LogEntryRepository;
|
||||||
use App\Services\ElementTypeNameGenerator;
|
use App\Services\ElementTypeNameGenerator;
|
||||||
|
@ -126,6 +127,8 @@ class LogEntryTargetColumn extends AbstractColumn
|
||||||
$on = $target->getPart();
|
$on = $target->getPart();
|
||||||
} elseif ($target instanceof Pricedetail && null !== $target->getOrderdetail() && null !== $target->getOrderdetail()->getPart()) {
|
} elseif ($target instanceof Pricedetail && null !== $target->getOrderdetail() && null !== $target->getOrderdetail()->getPart()) {
|
||||||
$on = $target->getOrderdetail()->getPart();
|
$on = $target->getOrderdetail()->getPart();
|
||||||
|
} elseif ($target instanceof ProjectBOMEntry && null !== $target->getProject()) {
|
||||||
|
$on = $target->getProject();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($on) && is_object($on)) {
|
if (isset($on) && is_object($on)) {
|
||||||
|
|
|
@ -46,6 +46,7 @@ use App\Entity\Base\AbstractDBElement;
|
||||||
use App\Entity\Base\AbstractStructuralDBElement;
|
use App\Entity\Base\AbstractStructuralDBElement;
|
||||||
use App\Entity\Parameters\AbstractParameter;
|
use App\Entity\Parameters\AbstractParameter;
|
||||||
use App\Entity\Parts\Part;
|
use App\Entity\Parts\Part;
|
||||||
|
use App\Entity\ProjectSystem\Project;
|
||||||
|
|
||||||
class HistoryHelper
|
class HistoryHelper
|
||||||
{
|
{
|
||||||
|
@ -81,6 +82,10 @@ class HistoryHelper
|
||||||
$array = array_merge($array, $element->getParameters()->toArray());
|
$array = array_merge($array, $element->getParameters()->toArray());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($element instanceof Project) {
|
||||||
|
$array = array_merge($array, $element->getBomEntries()->toArray());
|
||||||
|
}
|
||||||
|
|
||||||
return $array;
|
return $array;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue