UBERF-8063 Generic space archive/unarchive actions (#6530)

Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
This commit is contained in:
Alexander Onnikov
2024-09-12 14:06:05 +07:00
committed by GitHub
parent 04ce0d70ef
commit ba821dd5d2
53 changed files with 69 additions and 243 deletions
+1 -25
View File
@@ -47,7 +47,7 @@ import { generateClassNotificationTypes } from '@hcengineering/model-notificatio
import preference, { TPreference } from '@hcengineering/model-preference'
import presentation from '@hcengineering/model-presentation'
import tracker from '@hcengineering/model-tracker'
import view, { actionTemplates, createAction, type ViewAction } from '@hcengineering/model-view'
import view, { actionTemplates, createAction } from '@hcengineering/model-view'
import workbench from '@hcengineering/model-workbench'
import notification from '@hcengineering/notification'
import { getEmbeddedLabel, type Asset } from '@hcengineering/platform'
@@ -233,30 +233,6 @@ function defineTeamspace (builder: Builder): void {
actions: [tracker.action.EditRelatedTargets, tracker.action.NewRelatedIssue]
})
createAction(builder, {
label: view.string.UnArchive,
icon: view.icon.Archive,
action: view.actionImpl.UpdateDocument as ViewAction,
actionProps: {
key: 'archived',
ask: true,
value: false,
label: view.string.UnArchive,
message: document.string.UnarchiveConfirm
},
input: 'any',
category: view.category.General,
target: document.class.Teamspace,
visibilityTester: view.function.CanArchiveSpace,
query: {
archived: true
},
context: {
mode: ['context', 'browser'],
group: 'tools'
}
})
createAction(
builder,
{
+1 -2
View File
@@ -64,7 +64,6 @@ export default mergeIds(documentId, document, {
ConfigDescription: '' as IntlString,
ParentDocument: '' as IntlString,
ChildDocument: '' as IntlString,
LockedBy: '' as IntlString,
UnarchiveConfirm: '' as IntlString
LockedBy: '' as IntlString
}
})