# Tâches et evénemnts

Pages à nettoyer:
* [[TODO-PRO|TODO PRO]]
* [[TODO-PERSO|TODO PERSO]]
* [[AMM-TODO|TODO AMM]]

## Tâches urgentes

Total : ${#query[[
  from i = index.tasks('URGENT') 
  where not i.done and not table.includes(i.tags, 'event')
  and string.startsWith(i.page, '0')
  order by i.text desc 
  limit 100
  select {
    REF = i.ref
  }
]]}

${query[[
  from i = index.tasks('URGENT') 
  where not i.done and not table.includes(i.tags, 'event')
  and string.startsWith(i.page, '0')
  order by i.text desc 
  limit 5
  select {
    REF = "[[" .. i.ref .. "]]",
    TEXT =  i.text,
    TAGS = i.tags,
    DATE = i.date 
  }
]]}

## Tâches next

Total : ${#query[[
  from i = index.tasks('next') 
  where not i.done and not table.includes(i.tags, 'event')
  and string.startsWith(i.page, '0')
  order by i.text desc 
  limit 100
  select {
    REF = i.ref
  }
]]}

${query[[
  from i = index.tasks('next') 
  where not i.done and not table.includes(i.tags, 'event')
  and string.startsWith(i.page, '0')
  order by i.text desc 
  limit 20
  select {
    REF = "[[" .. i.ref .. "]]",
    TEXT =  i.text,
    TAGS = i.tags
  }
]]}


## Tâches planifiées

Total : ${#query[[
  from t = index.tasks()
  where t.done == false 
    and (t.planned or t.date)
  order by t.planned asc 
  limit 1000
  select {
    REF = "[[" .. t.ref .. "]]",
    TEXT =  t.name,
    TAGS = t.tags,
    DONE = t.done,
    PLANNED = t.planned or t.date
  }
]]}


${query[[
  from t = index.tasks()
  where t.done == false 
    and t.date
  order by t.date asc 
  limit 100
  select {
    REF = "[[" .. t.ref .. "]]",
    TEXT =  t.name,
    TAGS = t.tags,
    DONE = t.done,
    PLANNED = t.date
  }
]]}

## Tâches autres

Total : ${#query[[
  from i = index.tasks() 
  where not i.done and not table.includes(i.tags, 'event') and not table.includes(i.tags, 'URGENT') and not table.includes(i.tags, 'next') and not i.planned and not i.date
  and string.startsWith(i.page, '0')
  order by i.text desc 
  limit 1000
  select {
    REF = i.ref
  }
]]}

${query[[
  from i = index.tasks() 
  where not i.done and not table.includes(i.tags, 'event') and not table.includes(i.tags, 'URGENT') and not table.includes(i.tags, 'next') and not i.planned and not i.date
  and string.startsWith(i.page, '0')
  order by i.text desc 
  limit 10
  select {
    REF = "[[" .. i.ref .. "]]",
    TEXT =  i.text,
    STATE = i.state,
    DONE = i.done,
    TAGS = i.tags
  }
]]}


## Evénements

Total : ${#query[[
  from i = index.tasks() 
  where not i.done and table.includes(i.tags, 'event')
  and string.startsWith(i.page, '0')
  order by i.text desc 
  limit 1000
  select {
    REF = i.ref
  }
]]}

${query[[
  from i = index.tasks() 
  where not i.done and table.includes(i.tags, 'event')
  and string.startsWith(i.page, '0')
  order by i.text desc 
  limit 10
  select {
    REF = "[[" .. i.ref .. "]]",
    TEXT =  i.text,
    TAGS = i.tags
  }
]]}
