mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-01-12 09:02:06 -06:00
Add "id:xxx" search
This commit is contained in:
parent
8efc1df385
commit
8918c3ed12
@ -255,6 +255,20 @@ class GroupCollector implements GroupCollectorInterface
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Limit the result to a set of specific transaction groups.
|
||||
*
|
||||
* @param array $groupIds
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function setIds(array $groupIds): GroupCollectorInterface {
|
||||
|
||||
$this->query->whereIn('transaction_groups.id', $groupIds);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Limit the number of returned entries.
|
||||
*
|
||||
|
@ -240,6 +240,15 @@ interface GroupCollectorInterface
|
||||
*/
|
||||
public function setJournalIds(array $journalIds): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* Limit the result to a set of specific transaction groups.
|
||||
*
|
||||
* @param array $groupIds
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function setIds(array $groupIds): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* Limit the number of returned entries.
|
||||
*
|
||||
|
@ -332,6 +332,10 @@ class OperatorQuerySearch implements SearchInterface
|
||||
$parts = explode(',', $value);
|
||||
$this->collector->setJournalIds($parts);
|
||||
break;
|
||||
case 'id':
|
||||
$parts = explode(',', $value);
|
||||
$this->collector->setIds($parts);
|
||||
break;
|
||||
case 'destination_account_starts':
|
||||
$this->searchAccount($value, 2, 1);
|
||||
break;
|
||||
|
@ -482,6 +482,7 @@ return [
|
||||
'any_notes' => ['alias' => false, 'needs_context' => false,],
|
||||
|
||||
// one exact (or array of) journals:
|
||||
'id' => ['alias' => false, 'trigger_class' => null, 'needs_context' => true,],
|
||||
'journal_id' => ['alias' => false, 'trigger_class' => null, 'needs_context' => true,],
|
||||
|
||||
// exact amount
|
||||
|
Loading…
Reference in New Issue
Block a user