EQMS-1475: space browser for qms documents (#8668)
Some checks are pending
CI / build (push) Waiting to run
CI / svelte-check (push) Blocked by required conditions
CI / formatting (push) Blocked by required conditions
CI / test (push) Blocked by required conditions
CI / uitest (push) Waiting to run
CI / uitest-pg (push) Waiting to run
CI / uitest-qms (push) Waiting to run
CI / uitest-workspaces (push) Waiting to run
CI / docker-build (push) Blocked by required conditions
CI / dist-build (push) Blocked by required conditions

* EQMS-1475: space browser for qms documents

Signed-off-by: Victor Ilyushchenko <alt13ri@gmail.com>

* ff

Signed-off-by: Victor Ilyushchenko <alt13ri@gmail.com>

* ff

Signed-off-by: Victor Ilyushchenko <alt13ri@gmail.com>

---------

Signed-off-by: Victor Ilyushchenko <alt13ri@gmail.com>
This commit is contained in:
Victor Ilyushchenko 2025-04-23 00:45:17 +03:00 committed by GitHub
parent 5a87779427
commit 37c913f0fe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 75 additions and 13 deletions

View File

@ -37,7 +37,7 @@ import setting from '@hcengineering/setting'
import tags from '@hcengineering/tags'
import textEditor from '@hcengineering/text-editor'
import { type Class, type Doc, type Ref } from '@hcengineering/core'
import { AccountRole, type Class, type Doc, type Ref } from '@hcengineering/core'
import { type Action } from '@hcengineering/view'
import { definePermissions } from './permissions'
import documents from './plugin'
@ -193,6 +193,19 @@ export function createModel (builder: Builder): void {
componentProps: {
space: documents.space.QualityDocuments
}
},
{
id: 'space-browser',
accessLevel: AccountRole.User,
label: documents.string.AllDocumentSpaces,
icon: view.icon.List,
component: workbench.component.SpecialView,
componentProps: {
_class: documents.class.DocumentSpace,
icon: view.icon.List,
label: documents.string.AllDocumentSpaces
},
position: 'bottom'
}
],
spaces: [
@ -735,6 +748,34 @@ export function createModel (builder: Builder): void {
actions: [view.action.Archive]
})
builder.createDoc(
view.class.Viewlet,
core.space.Model,
{
attachTo: documents.class.DocumentSpace,
descriptor: view.viewlet.Table,
configOptions: {
hiddenKeys: ['name', 'description']
},
config: ['', 'members', 'private', 'owners', 'archived'],
viewOptions: {
groupBy: [],
orderBy: [],
other: [
{
key: 'hideArchived',
type: 'toggle',
defaultValue: true,
actionTarget: 'options',
action: view.function.HideArchived,
label: view.string.HideArchived
}
]
}
},
documents.viewlet.DocumentSpaceTable
)
builder.mixin(documents.class.Project, core.class.Class, view.mixin.ObjectPresenter, {
presenter: documents.component.ProjectPresenter
})

View File

@ -24,7 +24,7 @@
import UserBoxList from './UserBoxList.svelte'
export let label: IntlString
export let value: AccountUuid[]
export let value: AccountUuid[] | undefined
export let onChange: ((refs: AccountUuid[]) => void | Promise<void>) | undefined
export let readonly = false
export let kind: ButtonKind = 'link'
@ -40,7 +40,7 @@
let update: (() => Promise<void>) | undefined
$: valueByPersonRef = new Map(
value.map((p) => {
(value ?? []).map((p) => {
const person = $personRefByAccountUuidStore.get(p)
if (person === undefined) {
@ -86,7 +86,9 @@
void update?.()
})
$: employees = value.map((p) => $personRefByAccountUuidStore.get(p)).filter((p) => p !== undefined) as Ref<Employee>[]
$: employees = (value ?? [])
.map((p) => $personRefByAccountUuidStore.get(p))
.filter((p) => p !== undefined) as Ref<Employee>[]
$: docQuery =
excludeItems.length === 0 && includeItems.length === 0
? {}

View File

@ -307,7 +307,9 @@
"LatestVersionHint": "nejnovější",
"CannotDeleteFolder": "Složku nelze smazat",
"CannotDeleteFolderHint": "Před odstraněním složky prosím přesuňte všechny podřízené dokumenty na jiné místo."
"CannotDeleteFolderHint": "Před odstraněním složky prosím přesuňte všechny podřízené dokumenty na jiné místo.",
"AllDocumentSpaces": "Všechny dokumentové prostory"
},
"controlledDocStates": {
"Empty": "",

View File

@ -314,7 +314,9 @@
"LatestVersionHint": "neueste",
"CannotDeleteFolder": "Der Ordner kann nicht gelöscht werden",
"CannotDeleteFolderHint": "Bitte verschieben Sie alle untergeordneten Dokumente an einen anderen Ort, bevor Sie den Ordner löschen."
"CannotDeleteFolderHint": "Bitte verschieben Sie alle untergeordneten Dokumente an einen anderen Ort, bevor Sie den Ordner löschen.",
"AllDocumentSpaces": "Alle Dokumentbereiche"
},
"controlledDocStates": {
"Empty": "",

View File

@ -316,7 +316,9 @@
"LatestVersionHint": "latest",
"CannotDeleteFolder": "The folder cannot be deleted",
"CannotDeleteFolderHint": "Please move all child documents to another location before deleting the folder."
"CannotDeleteFolderHint": "Please move all child documents to another location before deleting the folder.",
"AllDocumentSpaces": "All document spaces"
},
"controlledDocStates": {
"Empty": "",

View File

@ -274,7 +274,9 @@
"LatestVersionHint": "dernier",
"CannotDeleteFolder": "Le dossier ne peut pas être supprimé",
"CannotDeleteFolderHint": "Veuillez déplacer tous les documents enfants vers un autre emplacement avant de supprimer le dossier."
"CannotDeleteFolderHint": "Veuillez déplacer tous les documents enfants vers un autre emplacement avant de supprimer le dossier.",
"AllDocumentSpaces": "Tous les espaces de documents"
},
"controlledDocStates": {
"Empty": "",

View File

@ -272,7 +272,9 @@
"LatestVersionHint": "ultimo",
"CannotDeleteFolder": "Impossibile eliminare la cartella",
"CannotDeleteFolderHint": "Sposta tutti i documenti figli in un'altra posizione prima di eliminare la cartella."
"CannotDeleteFolderHint": "Sposta tutti i documenti figli in un'altra posizione prima di eliminare la cartella.",
"AllDocumentSpaces": "Tutti gli spazi documenti"
},
"controlledDocStates": {
"Empty": "",

View File

@ -97,7 +97,8 @@
"Title": "Título",
"CreateFolder": "Criar nova pasta",
"RenameFolder": "Renomear pasta",
"CreateChildFolder": "Criar subpasta"
"CreateChildFolder": "Criar subpasta",
"AllDocumentSpaces": "Todos os espaços de documentos"
},
"controlledDocStates": {
"Empty": "",

View File

@ -316,7 +316,9 @@
"LatestVersionHint": "последняя",
"CannotDeleteFolder": "Папка не может быть удалена",
"CannotDeleteFolderHint": "Пожалуйста, переместите все дочерние документы в другое место перед удалением папки."
"CannotDeleteFolderHint": "Пожалуйста, переместите все дочерние документы в другое место перед удалением папки.",
"AllDocumentSpaces": "Все пространства документов"
},
"controlledDocStates": {
"Empty": "",

View File

@ -313,7 +313,9 @@
"LatestVersionHint": "最新",
"CannotDeleteFolder": "无法删除文件夹",
"CannotDeleteFolderHint": "请在删除文件夹之前将所有子文档移动到其他位置。"
"CannotDeleteFolderHint": "请在删除文件夹之前将所有子文档移动到其他位置。",
"AllDocumentSpaces": "所有文档空间"
},
"controlledDocStates": {
"Empty": "",

View File

@ -13,7 +13,7 @@ import {
import type { Asset, Plugin, Resource } from '@hcengineering/platform'
import { IntlString, plugin } from '@hcengineering/platform'
import type { AnyComponent, ResolvedLocation, Location } from '@hcengineering/ui/src/types'
import { Action } from '@hcengineering/view'
import { Action, Viewlet } from '@hcengineering/view'
import type {
ChangeControl,
@ -258,6 +258,7 @@ export const documentsPlugin = plugin(documentsId, {
CreateNewDraft: '' as IntlString,
RestoreDraft: '' as IntlString,
CreateOrgSpace: '' as IntlString,
AllDocumentSpaces: '' as IntlString,
ReviewDocumentPermission: '' as IntlString,
ReviewDocumentDescription: '' as IntlString,
@ -329,6 +330,9 @@ export const documentsPlugin = plugin(documentsId, {
},
notification: {
CoAuthorsNotification: '' as Ref<NotificationType>
},
viewlet: {
DocumentSpaceTable: '' as Ref<Viewlet>
}
})