2024-04-30 15:11:10 +00:00
|
|
|
import { html } from 'lit'
|
2024-04-30 16:30:44 +00:00
|
|
|
import { repeat } from 'lit/directives/repeat.js'
|
2024-05-05 22:13:20 +00:00
|
|
|
import { __ } from 'i18n'
|
2024-04-30 15:11:10 +00:00
|
|
|
|
2024-05-05 22:13:20 +00:00
|
|
|
export default function tplMucTaskList (el, tasklist) {
|
2024-04-30 16:30:44 +00:00
|
|
|
const tasks = tasklist.getTasks()
|
2024-05-05 22:13:20 +00:00
|
|
|
// eslint-disable-next-line no-undef
|
|
|
|
const i18nDelete = __(LOC_task_list_delete)
|
2024-04-30 16:30:44 +00:00
|
|
|
return html`
|
|
|
|
<div class="">
|
2024-04-30 15:11:10 +00:00
|
|
|
Tasklist: ${tasklist.get('name')}
|
2024-05-05 22:13:20 +00:00
|
|
|
<a class="" title="${i18nDelete}"
|
|
|
|
@click=${el.deleteTaskList}
|
|
|
|
>
|
|
|
|
<converse-icon class="fa fa-trash-alt" size="1em"></converse-icon>
|
|
|
|
</a>
|
2024-04-30 16:30:44 +00:00
|
|
|
</div>
|
|
|
|
<div class="">
|
|
|
|
${
|
|
|
|
repeat(tasks, (task) => task.get('id'), (task) => {
|
|
|
|
return html`<livechat-converse-muc-task .model=${task}></livechat-converse-muc-task>`
|
|
|
|
})
|
|
|
|
}
|
2024-04-30 15:11:10 +00:00
|
|
|
</div>`
|
|
|
|
}
|