From 1639588e272cb39675740a549b1244f031563b87 Mon Sep 17 00:00:00 2001 From: wangyuting Date: Tue, 21 Oct 2025 09:25:53 +0800 Subject: [PATCH] * Add stage params. --- module/stage/model.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/module/stage/model.php b/module/stage/model.php index e0862d9dbf..1c2e8fd79b 100644 --- a/module/stage/model.php +++ b/module/stage/model.php @@ -145,10 +145,11 @@ class stageModel extends model * @param string $orderBy * @param int $projectID * @param string $type + * @param string $grade * @access public * @return array */ - public function getStages(string $orderBy = 'id_desc', int $projectID = 0, string $type = ''): array + public function getStages(string $orderBy = 'id_desc', int $projectID = 0, string $type = '', int $grade = 0): array { if(common::isTutorialMode()) return $this->loadModel('tutorial')->getStages(); @@ -160,6 +161,7 @@ class stageModel extends model ->andWhere('deleted')->eq('0') ->andWhere('vision')->eq($this->config->vision) ->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->sprints)->fi() + ->beginIF($grade)->andWhere('grade')->eq($grade)->fi() ->andWhere('project')->eq($projectID) ->orderBy($orderBy) ->fetchAll('id');