mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-23 18:28:49 +02:00
Added admin page for measurement unit.
This commit is contained in:
parent
06c6483fd1
commit
fd4b474dbd
8 changed files with 218 additions and 15 deletions
|
@ -36,6 +36,7 @@ use App\Entity\Devices\Device;
|
|||
use App\Entity\Parts\Footprint;
|
||||
use App\Entity\Parts\Manufacturer;
|
||||
use App\Entity\Base\NamedDBElement;
|
||||
use App\Entity\Parts\MeasurementUnit;
|
||||
use App\Entity\Parts\Part;
|
||||
use App\Entity\Parts\Storelocation;
|
||||
use App\Entity\Parts\Supplier;
|
||||
|
@ -185,6 +186,10 @@ class EntityURLGenerator
|
|||
return $this->urlGenerator->generate('currency_edit', ['id' => $entity->getID()]);
|
||||
}
|
||||
|
||||
if ($entity instanceof MeasurementUnit) {
|
||||
return $this->urlGenerator->generate('measurement_unit_edit', ['id' => $entity->getID()]);
|
||||
}
|
||||
|
||||
//Otherwise throw an error
|
||||
throw new EntityNotSupported('The given entity is not supported yet!');
|
||||
}
|
||||
|
@ -238,6 +243,10 @@ class EntityURLGenerator
|
|||
return $this->urlGenerator->generate('currency_new');
|
||||
}
|
||||
|
||||
if ($entity instanceof MeasurementUnit) {
|
||||
return $this->urlGenerator->generate('measurement_unit_new');
|
||||
}
|
||||
|
||||
throw new EntityNotSupported('The given entity is not supported yet!');
|
||||
}
|
||||
|
||||
|
@ -312,6 +321,10 @@ class EntityURLGenerator
|
|||
return $this->urlGenerator->generate('currency_delete', ['id' => $entity->getID()]);
|
||||
}
|
||||
|
||||
if ($entity instanceof MeasurementUnit) {
|
||||
return $this->urlGenerator->generate('measurement_unit_delete', ['id' => $entity->getID()]);
|
||||
}
|
||||
|
||||
throw new EntityNotSupported('The given entity is not supported yet!');
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue