PMCORE-3110

This commit is contained in:
Paula Quispe
2021-07-13 17:16:21 -04:00
parent 12760122a8
commit 97f67cda1e
5 changed files with 73 additions and 0 deletions

View File

@@ -1275,6 +1275,34 @@ class AbstractCases implements CasesInterface
if (!empty($properties['caseTitle'])) {
$this->setCaseTitle($properties['caseTitle']);
}
/** Apply filters related to INBOX */
// Filter date related to delegate from
if (get_class($this) === Inbox::class && !empty($properties['delegateFrom'])) {
$this->setDelegateFrom($properties['delegateFrom']);
}
// Filter date related to delegate to
if (get_class($this) === Inbox::class && !empty($properties['delegateTo'])) {
$this->setDelegateTo($properties['delegateTo']);
}
/** Apply filters related to PAUSED */
// Filter date related to delegate from
if (get_class($this) === Paused::class && !empty($properties['delegateFrom'])) {
$this->setDelegateFrom($properties['delegateFrom']);
}
// Filter date related to delegate to
if (get_class($this) === Paused::class && !empty($properties['delegateTo'])) {
$this->setDelegateTo($properties['delegateTo']);
}
/** Apply filters related to UNASSIGNED */
// Filter date related to delegate from
if (get_class($this) === Unassigned::class && !empty($properties['delegateFrom'])) {
$this->setDelegateFrom($properties['delegateFrom']);
}
// Filter date related to delegate to
if (get_class($this) === Unassigned::class && !empty($properties['delegateTo'])) {
$this->setDelegateTo($properties['delegateTo']);
}
/** Apply filters related to MY CASES */
// My cases filter: started, in-progress, completed, supervising
if (get_class($this) === Participated::class && !empty($properties['filter'])) {

View File

@@ -79,6 +79,15 @@ class Inbox extends AbstractCases
$query->appUid($this->getCaseUid());
}
// Specific delegate date from
if (!empty($this->getDelegateFrom())) {
$query->delegateDateFrom($this->getDelegateFrom());
}
// Specific delegate date to
if (!empty($this->getDelegateTo())) {
$query->delegateDateTo($this->getDelegateTo());
}
return $query;
}

View File

@@ -78,6 +78,15 @@ class Paused extends AbstractCases
$query->appUid($this->getCaseUid());
}
// Specific delegate date from
if (!empty($this->getDelegateFrom())) {
$query->delegateDateFrom($this->getDelegateFrom());
}
// Specific delegate date to
if (!empty($this->getDelegateTo())) {
$query->delegateDateTo($this->getDelegateTo());
}
return $query;
}

View File

@@ -79,6 +79,15 @@ class Unassigned extends AbstractCases
$query->appUid($this->getCaseUid());
}
// Specific delegate date from
if (!empty($this->getDelegateFrom())) {
$query->delegateDateFrom($this->getDelegateFrom());
}
// Specific delegate date to
if (!empty($this->getDelegateTo())) {
$query->delegateDateTo($this->getDelegateTo());
}
return $query;
}