Skip to content
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

LIMS-705: Ignore null visits #586

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions api/src/Page/Proposal.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class Proposal extends Page
'started' => '\d',
'scheduled' => '\d',
'current' => '\d',
'notnull' => '\d+',

'COMMENTS' => '(\w|\s|-)+',

Expand Down Expand Up @@ -340,6 +341,10 @@ function _get_visits($visit = null, $output = true)
$where = 'WHERE s.proposalid = :1';
}

if ($this->has_arg('notnull')) {
$where .= ' AND s.visit_number is not NULL';
}

if ($this->has_arg('year')) {
$where .= " AND TO_CHAR(s.startdate, 'YYYY') = :" . (sizeof($args) + 1);
array_push($args, $this->arg('year'));
Expand Down
1 change: 1 addition & 0 deletions client/src/js/modules/shipment/views/dispatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ define(['marionette', 'views/form',

var self = this
this.visits = new VVisits(null, { state: { pageSize: 9999 } })
this.visits.queryParams.notnull = 1
this.ready = []
this.ready.push(this.visits.fetch())

Expand Down
Loading