feat: add cherry-picking of checkins
This commit is contained in:
parent
e44bd91f10
commit
92178771ad
1 changed files with 11 additions and 0 deletions
|
@ -42,6 +42,7 @@ class TrackerController extends Controller
|
||||||
$fromCheckin = $request->input('from', null);
|
$fromCheckin = $request->input('from', null);
|
||||||
$toCheckin = $request->input('to', null);
|
$toCheckin = $request->input('to', null);
|
||||||
$forceDownload = $request->input('force', false);
|
$forceDownload = $request->input('force', false);
|
||||||
|
$cherryPickedCheckins = $request->input('cherrypick', null);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$tripData = $this->get_trip_data($tripId, $forceDownload);
|
$tripData = $this->get_trip_data($tripId, $forceDownload);
|
||||||
|
@ -73,6 +74,16 @@ class TrackerController extends Controller
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($cherryPickedCheckins) {
|
||||||
|
$explodedCherryPickedCheckins = explode(',', $cherryPickedCheckins);
|
||||||
|
$tripData->checkins = array_filter(
|
||||||
|
$tripData->checkins,
|
||||||
|
function ($checkin) use ($explodedCherryPickedCheckins) {
|
||||||
|
return in_array($checkin->id, $explodedCherryPickedCheckins);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return view(
|
return view(
|
||||||
'tracker',
|
'tracker',
|
||||||
[
|
[
|
||||||
|
|
Loading…
Reference in a new issue