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",
|
"SwitchToCards": "Switch to cards",
|
||||||
"SearchArchive": "Search archive...",
|
"SearchArchive": "Search archive...",
|
||||||
"Size": "Size",
|
"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": "К карточкам",
|
"SwitchToCards": "К карточкам",
|
||||||
"SearchArchive": "Поиск в архиве...",
|
"SearchArchive": "Поиск в архиве...",
|
||||||
"Size": "Размер",
|
"Size": "Размер",
|
||||||
"RemoveCover": "Удалить обложку"
|
"RemoveCover": "Удалить обложку",
|
||||||
|
"DeleteChecklist": "Удалить список задач",
|
||||||
|
"DeleteChecklistConfirm": "Удаление списка задач необратимо, и не будет возможности его вернуть."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
-->
|
-->
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Ref } from '@anticrm/core'
|
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 type { TodoItem } from '@anticrm/task'
|
||||||
import task from '@anticrm/task'
|
import task from '@anticrm/task'
|
||||||
import { Button, CheckBox, TextAreaEditor, Icon, IconMoreH, Progress, showPopup } from '@anticrm/ui'
|
import { Button, CheckBox, TextAreaEditor, Icon, IconMoreH, Progress, showPopup } from '@anticrm/ui'
|
||||||
@ -39,13 +39,25 @@
|
|||||||
if (!value) {
|
if (!value) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
client.removeCollection(
|
showPopup(
|
||||||
value._class,
|
MessageBox,
|
||||||
value.space,
|
{
|
||||||
value._id,
|
label: board.string.DeleteChecklist,
|
||||||
value.attachedTo,
|
message: board.string.DeleteChecklistConfirm
|
||||||
value.attachedToClass,
|
},
|
||||||
value.collection
|
undefined,
|
||||||
|
(result?: boolean) => {
|
||||||
|
if (result === true) {
|
||||||
|
client.removeCollection(
|
||||||
|
value._class,
|
||||||
|
value.space,
|
||||||
|
value._id,
|
||||||
|
value.attachedTo,
|
||||||
|
value.attachedToClass,
|
||||||
|
value.collection
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -125,7 +125,9 @@ export default mergeIds(boardId, board, {
|
|||||||
SwitchToCards: '' as IntlString,
|
SwitchToCards: '' as IntlString,
|
||||||
SearchArchive: '' as IntlString,
|
SearchArchive: '' as IntlString,
|
||||||
Size: '' as IntlString,
|
Size: '' as IntlString,
|
||||||
RemoveCover: '' as IntlString
|
RemoveCover: '' as IntlString,
|
||||||
|
DeleteChecklist: '' as IntlString,
|
||||||
|
DeleteChecklistConfirm: '' as IntlString
|
||||||
},
|
},
|
||||||
component: {
|
component: {
|
||||||
EditCard: '' as AnyComponent,
|
EditCard: '' as AnyComponent,
|
||||||
|
Loading…
Reference in New Issue
Block a user