-
-
+
+
+
+
+ {#if todoItems.length > 0}
+
+ ( {doneTasks?.length}/ {todoItems.length} )
+
+ {/if}
-
{
- showMenu(evt)
- }}
- icon={IconMoreH}
- size={'small'}
- />
+
+
+
+
+
{
+ showMenu(evt)
+ }}
+ icon={IconMoreH}
+ size={'small'}
+ />
+
+
+
{object.name}
+
+
+
+ {#if (object.attachments ?? 0) > 0}
+
+ {/if}
+ {#if (object.comments ?? 0) > 0}
+
+
+
+ {/if}
+
+
-
{object.name}
-
-
-
- {#if (object.attachments ?? 0) > 0}
-
- {/if}
- {#if (object.comments ?? 0) > 0}
-
- {/if}
-
-
-
diff --git a/plugins/task-resources/src/components/kanban/KanbanTemplateSelector.svelte b/plugins/task-resources/src/components/kanban/KanbanTemplateSelector.svelte
index 1e57cf1e28..dfd5386a9c 100644
--- a/plugins/task-resources/src/components/kanban/KanbanTemplateSelector.svelte
+++ b/plugins/task-resources/src/components/kanban/KanbanTemplateSelector.svelte
@@ -41,4 +41,4 @@
}
-
+
diff --git a/plugins/task-resources/src/components/state/StateEditor.svelte b/plugins/task-resources/src/components/state/StateEditor.svelte
index 99ecd2b53b..f10b3cc748 100644
--- a/plugins/task-resources/src/components/state/StateEditor.svelte
+++ b/plugins/task-resources/src/components/state/StateEditor.svelte
@@ -18,7 +18,7 @@
import { Ref } from '@anticrm/core'
import task, { State } from '@anticrm/task'
import { createQuery } from '@anticrm/presentation'
- import { showPopup } from '@anticrm/ui'
+ import { showPopup, Button, SelectPopup } from '@anticrm/ui'
import StatePresenter from './StatePresenter.svelte'
import StatesPopup from './StatesPopup.svelte'
@@ -35,19 +35,30 @@
{#if state}
-
{
+
+ }}
+ >
+
+
+
+
{/if}
diff --git a/plugins/task-resources/src/components/state/StatePresenter.svelte b/plugins/task-resources/src/components/state/StatePresenter.svelte
index be9f70ae6f..6d2d9d1deb 100644
--- a/plugins/task-resources/src/components/state/StatePresenter.svelte
+++ b/plugins/task-resources/src/components/state/StatePresenter.svelte
@@ -19,22 +19,19 @@
export let value: State
+
{#if value}
-
- {value.title}
+
{/if}
diff --git a/plugins/tracker-resources/src/index.ts b/plugins/tracker-resources/src/index.ts
index 1afd8e1d84..5fa780183f 100644
--- a/plugins/tracker-resources/src/index.ts
+++ b/plugins/tracker-resources/src/index.ts
@@ -27,6 +27,10 @@ import Projects from './components/projects/Projects.svelte'
import Views from './components/views/Views.svelte'
import IssuePresenter from './components/issues/IssuePresenter.svelte'
import TitlePresenter from './components/issues/TitlePresenter.svelte'
+import PriorityPresenter from './components/issues/PriorityPresenter.svelte'
+import StatusPresenter from './components/issues/StatusPresenter.svelte'
+import AssigneePresenter from './components/issues/AssigneePresenter.svelte'
+
import ModificationDatePresenter from './components/issues/ModificationDatePresenter.svelte'
import EditIssue from './components/issues/EditIssue.svelte'
import NewIssueHeader from './components/NewIssueHeader.svelte'
@@ -45,6 +49,9 @@ export default async (): Promise
=> ({
IssuePresenter,
TitlePresenter,
ModificationDatePresenter,
+ PriorityPresenter,
+ StatusPresenter,
+ AssigneePresenter,
EditIssue,
NewIssueHeader
}
diff --git a/plugins/tracker-resources/src/plugin.ts b/plugins/tracker-resources/src/plugin.ts
index 4321418a08..9e6e2dc4c0 100644
--- a/plugins/tracker-resources/src/plugin.ts
+++ b/plugins/tracker-resources/src/plugin.ts
@@ -42,11 +42,11 @@ export default mergeIds(trackerId, tracker, {
Team: '' as IntlString,
SelectTeam: '' as IntlString,
SaveIssue: '' as IntlString,
- CreateMore: '' as IntlString,
Todo: '' as IntlString,
InProgress: '' as IntlString,
Done: '' as IntlString,
Canceled: '' as IntlString,
+ SetPriority: '' as IntlString,
SetStatus: '' as IntlString,
Priority: '' as IntlString,
NoPriority: '' as IntlString,
@@ -95,6 +95,9 @@ export default mergeIds(trackerId, tracker, {
IssuePresenter: '' as AnyComponent,
TitlePresenter: '' as AnyComponent,
ModificationDatePresenter: '' as AnyComponent,
+ PriorityPresenter: '' as AnyComponent,
+ StatusPresenter: '' as AnyComponent,
+ AssigneePresenter: '' as AnyComponent,
EditIssue: '' as AnyComponent,
CreateTeam: '' as AnyComponent,
NewIssueHeader: '' as AnyComponent
diff --git a/plugins/view-resources/src/components/Table.svelte b/plugins/view-resources/src/components/Table.svelte
index ae2d696187..9ceb57ac7d 100644
--- a/plugins/view-resources/src/components/Table.svelte
+++ b/plugins/view-resources/src/components/Table.svelte
@@ -48,7 +48,8 @@
const dispatch = createEventDispatcher()
- $: sortingFunction = (config.find(it => (typeof it !== 'string') && it.sortingKey === sortKey) as BuildModelKey)?.sortingFunction
+ $: sortingFunction = (config.find((it) => typeof it !== 'string' && it.sortingKey === sortKey) as BuildModelKey)
+ ?.sortingFunction
let qindex = 0
async function update (
@@ -103,11 +104,9 @@
let checked: Set[> = new Set][>()
- function check (id: Ref, e: Event) {
+ function check (id: Ref, event: CustomEvent) {
if (!enableChecking) return
- const target = e.target as HTMLInputElement
- const value = target.checked
- if (value) {
+ if (event.detail) {
checked.add(id)
} else {
checked.delete(id)
@@ -138,8 +137,8 @@
0}
- on:change={(e) => {
- objects.map((o) => check(o._id, e))
+ on:value={(event) => {
+ objects.map((object) => check(object._id, event))
}}
/>
]
@@ -182,20 +181,23 @@
{
- check(object._id, e)
+ on:value={(event) => {
+ check(object._id, event)
}}
/>
{/if}
-
+
{:else}
{
- check(object._id, e)
+ on:value={(event) => {
+ check(object._id, event)
}}
/>
@@ -209,7 +211,11 @@
value={getObjectValue(attribute.key, object) ?? ''}
{...attribute.props}
/>
-
@@ -236,9 +242,7 @@
{#if enableChecking}
-
+
|
{/if}
diff --git a/plugins/workbench-resources/src/components/SpaceHeader.svelte b/plugins/workbench-resources/src/components/SpaceHeader.svelte
index e33c2bba8f..00df5f91ea 100644
--- a/plugins/workbench-resources/src/components/SpaceHeader.svelte
+++ b/plugins/workbench-resources/src/components/SpaceHeader.svelte
@@ -44,7 +44,7 @@
$: query.query(core.class.Space, { _id: spaceId }, result => { space = result[0] })
function showCreateDialog (ev: Event) {
- showPopup(createItemDialog as AnyComponent, { space: spaceId }, ev.target as HTMLElement)
+ showPopup(createItemDialog as AnyComponent, { space: spaceId }, 'top')
}
$: updateViewlets(viewlets)
diff --git a/plugins/workbench-resources/src/components/SpaceView.svelte b/plugins/workbench-resources/src/components/SpaceView.svelte
index 86757e9966..18e44d2c60 100644
--- a/plugins/workbench-resources/src/components/SpaceView.svelte
+++ b/plugins/workbench-resources/src/components/SpaceView.svelte
@@ -16,11 +16,10 @@
{#if _class && space}
- {#await getHeader(space._class) then header}
- {#if header}
-
- {:else}
-
- {/if}
- {/await}
+ {#if header}
+
+ {:else}
+
+ {/if}
{/if}
diff --git a/server-plugins/chunter-resources/src/index.ts b/server-plugins/chunter-resources/src/index.ts
index 1784ccf069..fbc79374e6 100644
--- a/server-plugins/chunter-resources/src/index.ts
+++ b/server-plugins/chunter-resources/src/index.ts
@@ -13,9 +13,9 @@
// limitations under the License.
//
-import chunter, { Channel, Comment, Message } from '@anticrm/chunter'
+import chunter, { Channel, Comment, Message, ThreadMessage } from '@anticrm/chunter'
import { EmployeeAccount } from '@anticrm/contact'
-import core, { Class, Doc, DocumentQuery, FindOptions, FindResult, Hierarchy, Ref, Tx, TxCreateDoc, TxProcessor, TxUpdateDoc } from '@anticrm/core'
+import core, { Class, Doc, DocumentQuery, FindOptions, FindResult, Hierarchy, Ref, Tx, TxCreateDoc, TxProcessor, TxUpdateDoc, TxRemoveDoc } from '@anticrm/core'
import login from '@anticrm/login'
import { getMetadata } from '@anticrm/platform'
import { TriggerControl } from '@anticrm/server-core'
@@ -58,7 +58,7 @@ export async function CommentCreate (tx: Tx, control: TriggerControl): Promise
)
- if (!hierarchy.isDerived(doc._class, chunter.class.Comment)) {
+ if (!hierarchy.isDerived(doc._class, chunter.class.ThreadMessage)) {
return []
}
@@ -80,6 +80,44 @@ export async function CommentCreate (tx: Tx, control: TriggerControl): Promise {
+ const hierarchy = control.hierarchy
+ if (tx._class !== core.class.TxRemoveDoc) return []
+
+ const rmTx = tx as TxRemoveDoc
+ if (!hierarchy.isDerived(rmTx.objectClass, chunter.class.ThreadMessage)) {
+ return []
+ }
+ const createTx = (await control.findAll(core.class.TxCreateDoc, {
+ objectId: rmTx.objectId
+ }, { limit: 1 }))[0]
+
+ const comment = TxProcessor.createDoc2Doc(createTx as TxCreateDoc)
+
+ const comments = await control.findAll(chunter.class.ThreadMessage, {
+ attachedTo: comment.attachedTo
+ })
+ const updateTx = control.txFactory.createTxUpdateDoc(
+ chunter.class.Message,
+ comment.space,
+ comment.attachedTo,
+ {
+ replies:
+ comments
+ .map(comm => (control.modelDb.getObject(comm.createBy) as EmployeeAccount).employee),
+ lastReply:
+ comments.length > 0
+ ? Math.max(...comments.map(comm => comm.createOn))
+ : undefined
+ }
+ )
+
+ return [updateTx]
+}
+
/**
* @public
*/
@@ -112,7 +150,8 @@ export async function MessageCreate (tx: Tx, control: TriggerControl): Promise {
const promises = [
MessageCreate(tx, control),
- CommentCreate(tx, control)
+ CommentCreate(tx, control),
+ CommentDelete(tx, control)
]
const res = await Promise.all(promises)
return res.flat()
diff --git a/tests/sanity/tests/recruit.spec.ts b/tests/sanity/tests/recruit.spec.ts
index df36c0fdf2..a641ca517d 100644
--- a/tests/sanity/tests/recruit.spec.ts
+++ b/tests/sanity/tests/recruit.spec.ts
@@ -58,7 +58,7 @@ test.describe('recruit tests', () => {
// Click on Add button
await page.click('.applications-container .flex-row-center .flex-center')
- await page.click('span:has-text("Select vacancy")')
+ await page.click('button:has-text("Vacancy")')
await page.click(`button:has-text("${vacancyId}")`)
@@ -142,13 +142,13 @@ test.describe('recruit tests', () => {
// Click button:has-text("Review")
await page.click('button:has-text("Review")')
// Click [placeholder="\ "]
- await page.click('[placeholder="placeholder"]')
+ await page.click('[placeholder="Title"]')
// Fill [placeholder="\ "]
- await page.fill('[placeholder="placeholder"]', 'Meet PEterson')
+ await page.fill('[placeholder="Title"]', 'Meet PEterson')
// Click text=Location Company Company >> [placeholder="\ "]
- await page.click('text=placeholder Location >> [placeholder="placeholder"]')
+ await page.click('[placeholder="Location"]')
// Fill text=Location Company Company >> [placeholder="\ "]
- await page.fill('text=placeholder Location >> [placeholder="placeholder"]', 'NSK')
+ await page.fill('[placeholder="Location"]', 'NSK')
// Click text=Company Company >> div
// await page.click('text=Company Company >> div')
// Click button:has-text("Apple")
diff --git a/tests/sanity/tests/tags.spec.ts b/tests/sanity/tests/tags.spec.ts
index fdbc705826..cb140ce0f6 100644
--- a/tests/sanity/tests/tags.spec.ts
+++ b/tests/sanity/tests/tags.spec.ts
@@ -30,11 +30,11 @@ test.describe('recruit tests', () => {
// Fill [placeholder="Please\ type\ Skill\ title"]
await page.fill('[placeholder="Please\\ type\\ Skill\\ title"]', 's1')
// Click text=Create Skill s1 Please type description here Category Other Create Cancel >> button
- await page.click('text=Create Skill s1 Please type description here Category Other Create Cancel >> button')
+ await page.click('text=Create more Create >> button')
// Click text=s1
await page.click('text=s1')
// Click :nth-match(:text("Cancel"), 2)
- await page.click(':nth-match(:text("Cancel"), 2)')
+ await page.click('button:has-text("Cancel")')
// Click button:has-text("Create")
await page.click('button:has-text("Create")')
})
@@ -78,7 +78,7 @@ test.describe('recruit tests', () => {
// Click text=java
await page.click('text=java')
// Click :nth-match(:text("Cancel"), 2)
- await page.click(':nth-match(:text("Cancel"), 2)')
+ await page.click('button:has-text("Cancel")')
// Click [placeholder="John"]
await page.click('[placeholder="John"]')
// Fill [placeholder="John"]
diff --git a/tests/sanity/tests/workbench.spec.ts b/tests/sanity/tests/workbench.spec.ts
index db4cf90b7b..46aa2e4f5d 100644
--- a/tests/sanity/tests/workbench.spec.ts
+++ b/tests/sanity/tests/workbench.spec.ts
@@ -14,14 +14,14 @@ test.describe('workbench tests', () => {
await page.click('text=Applications')
await expect(page).toHaveURL('http://localhost:8083/workbench%3Acomponent%3AWorkbenchApp/recruit%3Aapp%3ARecruit/applicants')
// Click text=Applications Application >> span
- await expect(page.locator('text=Applications Application >> span')).toBeVisible()
+ await expect(page.locator('text=Applications Application')).toBeVisible()
await expect(page.locator('text=APP-1')).toBeVisible()
// Click text=Candidates
await page.click('text=Candidates')
await expect(page).toHaveURL('http://localhost:8083/workbench%3Acomponent%3AWorkbenchApp/recruit%3Aapp%3ARecruit/candidates')
- await expect(page.locator('text=Candidates Candidate >> span')).toBeVisible()
+ await expect(page.locator('text=Candidates Candidate')).toBeVisible()
await expect(page.locator('text=Andrey P.')).toBeVisible()
// Click text=Vacancies