mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 01:25:55 +02:00
Allow to filter by IPN
This commit is contained in:
parent
b1d359f538
commit
6d966ce516
3 changed files with 12 additions and 0 deletions
|
@ -47,6 +47,7 @@ class PartFilter implements FilterInterface
|
||||||
use CompoundFilterTrait;
|
use CompoundFilterTrait;
|
||||||
|
|
||||||
protected IntConstraint $dbId;
|
protected IntConstraint $dbId;
|
||||||
|
protected TextConstraint $ipn;
|
||||||
protected TextConstraint $name;
|
protected TextConstraint $name;
|
||||||
protected TextConstraint $description;
|
protected TextConstraint $description;
|
||||||
protected TextConstraint $comment;
|
protected TextConstraint $comment;
|
||||||
|
@ -95,6 +96,7 @@ class PartFilter implements FilterInterface
|
||||||
$this->measurementUnit = new EntityConstraint($nodesListBuilder, MeasurementUnit::class, 'part.partUnit');
|
$this->measurementUnit = new EntityConstraint($nodesListBuilder, MeasurementUnit::class, 'part.partUnit');
|
||||||
$this->mass = new NumberConstraint('part.mass');
|
$this->mass = new NumberConstraint('part.mass');
|
||||||
$this->dbId = new IntConstraint('part.id');
|
$this->dbId = new IntConstraint('part.id');
|
||||||
|
$this->ipn = new TextConstraint('part.ipn');
|
||||||
$this->addedDate = new DateTimeConstraint('part.addedDate');
|
$this->addedDate = new DateTimeConstraint('part.addedDate');
|
||||||
$this->lastModified = new DateTimeConstraint('part.lastModified');
|
$this->lastModified = new DateTimeConstraint('part.lastModified');
|
||||||
|
|
||||||
|
@ -235,6 +237,11 @@ class PartFilter implements FilterInterface
|
||||||
return $this->dbId;
|
return $this->dbId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getIpn(): TextConstraint
|
||||||
|
{
|
||||||
|
return $this->ipn;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return TextConstraint
|
* @return TextConstraint
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -100,6 +100,10 @@ class PartFilterType extends AbstractType
|
||||||
'step' => 1,
|
'step' => 1,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
$builder->add('ipn', TextConstraintType::class, [
|
||||||
|
'label' => 'part.edit.ipn',
|
||||||
|
]);
|
||||||
|
|
||||||
$builder->add('favorite', BooleanConstraintType::class, [
|
$builder->add('favorite', BooleanConstraintType::class, [
|
||||||
'label' => 'part.edit.is_favorite'
|
'label' => 'part.edit.is_favorite'
|
||||||
]);
|
]);
|
||||||
|
|
|
@ -53,6 +53,7 @@
|
||||||
{{ form_row(filterForm.measurementUnit) }}
|
{{ form_row(filterForm.measurementUnit) }}
|
||||||
{{ form_row(filterForm.mass) }}
|
{{ form_row(filterForm.mass) }}
|
||||||
{{ form_row(filterForm.dbId) }}
|
{{ form_row(filterForm.dbId) }}
|
||||||
|
{{ form_row(filterForm.ipn) }}
|
||||||
{{ form_row(filterForm.lastModified) }}
|
{{ form_row(filterForm.lastModified) }}
|
||||||
{{ form_row(filterForm.addedDate) }}
|
{{ form_row(filterForm.addedDate) }}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue