         detail:
           tasks: tasks
       window.dispatchEvent event
-    handleCategoryChange: (cid) ->
-      quest_category = cid
-      quests_in_category = (quest for quest in @state.quests when quest? and quest.category is quest_category)
-      quests_in_category = _.sortBy quests_in_category, (e) ->
+    handleFilterChange: (fid) ->
+      quest_filter = fid
+      quests_filtered = switch quest_filter
+        when 0
+          []
+        when 1, 2, 3, 4, 5, 6, 7
+          (quest for quest in @state.quests when quest? and quest.category is quest_filter and quest.wiki_id.charAt(0) isnt "W")
+        when 8
+          (quest for quest in @state.quests when quest? and quest.wiki_id.charAt(0) is "W")
+        when 9
+          (quest for quest in @state.quests when quest? and quest.type in [2, 4, 5])
+        when 10
+          (quest for quest in @state.quests when quest? and quest.type is 3)
+        when 11
+          (quest for quest in @state.quests when quest? and quest.type is 6)
+      quests_filtered = _.sortBy quests_filtered, (e) ->
         e.wiki_id
       @setState
-        quest_category: quest_category
-        quests_in_category: quests_in_category
+        quest_filter: quest_filter
+        quests_filtered: quests_filtered
     handleQuestChange: (qid) ->
       quest_id = qid
       quest_selected = @state.quests[quest_id]
       @setState
         quest_id: quest_id
         quest_selected: quest_selected
-    handleCategorySelect: (e) ->
-      quest_category = parseInt e.target.value
-      @handleCategoryChange quest_category
+    handleFilterSelect: (e) ->
+      quest_filter = parseInt e.target.value
+      @handleFilterChange quest_filter
       @setState
         quest_id: 0
         quest_selected: null

{_, $, $$, React, ReactBootstrap, FontAwesome, layout} = window
{Grid, Row, Col, Input, Panel, OverlayTrigger, Tooltip} = ReactBootstrap

categoryNames = ["空", "编成", "出击", "演习", "远征", "补给/入渠", "工厂", "改装"]
typeNames = ["空", "单次任务", "每日任务", "每周任务", "3/7/0日任务", "2/8日任务", "每月任务"]

module.exports =
  name: "quest-info"

          <Row>
            <Col xs=12>
              <Panel header='任务选择' bsStyle='primary'>
                <Input type='select' label='任务种类' value={@state.quest_filter} onChange={@handleFilterSelect}>
                  {
                    for filter, idx in filterNames
                      <option key={idx} value={idx}>{filter}</option>
                  }
                </Input>
                <Input type='select' label='任务名称' value={@state.quest_id} onChange={@handleQuestSelect}>
                  <option key={0}>空</option>
                  {
                    for quest in @state.quests_filtered
                      <option key={quest.game_id} value={quest.game_id}>{quest.wiki_id} - {quest.name}</option>
                  }
                </Input>
