-
Notifications
You must be signed in to change notification settings - Fork 0
email filter by nights #67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -37,10 +37,11 @@ public function getText() { | |
| foreach ($this->environment->oconfig['essen'] as $key => $typ) { | ||
| $essen .= '<option value="' . $key . '">' . $typ . '</option>'; | ||
| } | ||
| $maxtage = $this->fahrt->getLenTage(); | ||
|
|
||
| $fahrt_bereich = $this->fahrt->getPossibleDates(); | ||
| $tage = ''; | ||
| for ($cnt = $maxtage; $cnt >= 0; $cnt--) | ||
| $tage .= '<option value="' . $cnt . '">' . $cnt . '</option>'; | ||
| for ($i = 0; $i < sizeof($fahrt_bereich)-1; $i += 1) | ||
| $tage .= '<option value="' . date('Y-m-d', strtotime($fahrt_bereich[$i])) . '">' . $fahrt_bereich[$i] . '</option>'; | ||
|
|
||
| return ' | ||
| <script type="text/javascript"> | ||
|
|
@@ -138,7 +139,7 @@ private function transformContacts() { | |
| } | ||
|
|
||
| private function buildQueryWhere() { | ||
| $where = ['fahrt_id' => $this->fahrt->getID(), 'OR' => ['on_waitlist' => 0, | ||
| $where = ['fahrt_id' => $this->fahrt->getID(), 'OR #waitlist' => ['on_waitlist' => 0, | ||
| 'AND' => [ | ||
| 'transferred[!]' => null, | ||
| 'on_waitlist' => 1 | ||
|
|
@@ -154,7 +155,12 @@ private function buildQueryWhere() { | |
| $where['abtyp'] = $_REQUEST['val_abtyp']; | ||
| } | ||
| if (isset($_REQUEST['check_nights'])) { | ||
| // TODO | ||
| $nights = $_REQUEST['val_nights']; | ||
| $conditions = []; | ||
| foreach ($nights as $night) | ||
| $conditions['AND #'.$night] = ['anday[<=]' => $night, 'abday[>]' => $night]; | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Definitionssache, aber ich finde, dass die Logik falsch ist.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah. gute frage - ja, hier ist angenommen: an mindestens einer der selektierten nächte da. nicht gesagt 'NUR' in den nächten da. |
||
| if (sizeof($conditions) > 0) | ||
| $where['OR #nights'] = $conditions; | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warum ist hier ein
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. wegen 'in mindestens einer selektierten nacht anwesend' logik
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ja, das stimmt schon, bin mir nur nicht sicher, ob man lustige Seiteneffekte bekommt (Klammern/Scopes). Beispiel: [[bezahlt] UND [auto] ODER [nacht1] ODER [nacht1 UND nacht2]]
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. die oberste ebene ist via und verknüpft - darunter sind die einzelnen nächte via oder verknüpft. also hat keine aushebelnde wirkung auf die bisherige selektion |
||
| } | ||
| if (isset($_REQUEST['check_essen'])) { | ||
| $where['essen'] = $_REQUEST['val_essen']; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was ist das denn mit der raute? neue medoo Syntax?
Sieht so aus, als sollte da
on_waitliststehen (?)Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
das mit kommentar muss so. es gibt ja nun auch ein OR weiter unten bei nights. zwei or MUSS man mit medoo so lösen leider. wegen unique map keys
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kannte ich noch nicht, dachte das wäre nur irgendwie die neue syntax oder so.