mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-22 19:11:33 +03:00
Add confirmation to delete a checklist (#1775)
This commit is contained in:
parent
077f666619
commit
beb009acab
@ -104,6 +104,8 @@
|
||||
"SwitchToCards": "Switch to cards",
|
||||
"SearchArchive": "Search archive...",
|
||||
"Size": "Size",
|
||||
"RemoveCover": "Remove cover"
|
||||
"RemoveCover": "Remove cover",
|
||||
"DeleteChecklist": "Delete checklist",
|
||||
"DeleteChecklistConfirm": "Deleting a checklist is permanent and there is no way to get it back."
|
||||
}
|
||||
}
|
||||
|
@ -104,6 +104,8 @@
|
||||
"SwitchToCards": "К карточкам",
|
||||
"SearchArchive": "Поиск в архиве...",
|
||||
"Size": "Размер",
|
||||
"RemoveCover": "Удалить обложку"
|
||||
"RemoveCover": "Удалить обложку",
|
||||
"DeleteChecklist": "Удалить список задач",
|
||||
"DeleteChecklistConfirm": "Удаление списка задач необратимо, и не будет возможности его вернуть."
|
||||
}
|
||||
}
|
||||
|
@ -14,7 +14,7 @@
|
||||
-->
|
||||
<script lang="ts">
|
||||
import { Ref } from '@anticrm/core'
|
||||
import { createQuery, getClient } from '@anticrm/presentation'
|
||||
import { createQuery, getClient, MessageBox } from '@anticrm/presentation'
|
||||
import type { TodoItem } from '@anticrm/task'
|
||||
import task from '@anticrm/task'
|
||||
import { Button, CheckBox, TextAreaEditor, Icon, IconMoreH, Progress, showPopup } from '@anticrm/ui'
|
||||
@ -39,6 +39,15 @@
|
||||
if (!value) {
|
||||
return
|
||||
}
|
||||
showPopup(
|
||||
MessageBox,
|
||||
{
|
||||
label: board.string.DeleteChecklist,
|
||||
message: board.string.DeleteChecklistConfirm
|
||||
},
|
||||
undefined,
|
||||
(result?: boolean) => {
|
||||
if (result === true) {
|
||||
client.removeCollection(
|
||||
value._class,
|
||||
value.space,
|
||||
@ -48,6 +57,9 @@
|
||||
value.collection
|
||||
)
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
function startAddingItem () {
|
||||
isAddingItem = true
|
||||
|
@ -125,7 +125,9 @@ export default mergeIds(boardId, board, {
|
||||
SwitchToCards: '' as IntlString,
|
||||
SearchArchive: '' as IntlString,
|
||||
Size: '' as IntlString,
|
||||
RemoveCover: '' as IntlString
|
||||
RemoveCover: '' as IntlString,
|
||||
DeleteChecklist: '' as IntlString,
|
||||
DeleteChecklistConfirm: '' as IntlString
|
||||
},
|
||||
component: {
|
||||
EditCard: '' as AnyComponent,
|
||||
|
Loading…
Reference in New Issue
Block a user