Welcome to mirror list, hosted at ThFree Co, Russian Federation.

current_user_todos.rb « widgets « work_items « models « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 64297b433dd8b15e4b68652e2c2d8f0077af6990 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# frozen_string_literal: true

module WorkItems
  module Widgets
    class CurrentUserTodos < Base
      def self.quick_action_commands
        [:todo, :done]
      end

      def self.quick_action_params
        [:todo_event]
      end

      def self.process_quick_action_param(param_name, value)
        return super unless param_name == :todo_event

        { action: value == 'done' ? 'mark_as_done' : 'add' }
      end
    end
  end
end