mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-15 21:03:30 +00:00
parent
51e83c183d
commit
b6428b2651
@ -62,8 +62,6 @@
|
||||
"@anticrm/server-chunter": "~0.6.1",
|
||||
"@anticrm/server-chunter-resources": "~0.6.0",
|
||||
"@anticrm/server-recruit": "~0.6.0",
|
||||
"@anticrm/server-recruit-resources": "~0.6.0",
|
||||
"@anticrm/server-task": "~0.6.0",
|
||||
"@anticrm/server-task-resources": "~0.6.0"
|
||||
"@anticrm/server-recruit-resources": "~0.6.0"
|
||||
}
|
||||
}
|
||||
|
@ -24,7 +24,6 @@ import { DOMAIN_ATTACHMENT } from '@anticrm/model-attachment'
|
||||
import { createInMemoryAdapter, createInMemoryTxAdapter } from '@anticrm/dev-storage'
|
||||
import { serverChunterId } from '@anticrm/server-chunter'
|
||||
import { serverRecruitId } from '@anticrm/server-recruit'
|
||||
import { serverViewId } from '@anticrm/server-task'
|
||||
import { addLocation } from '@anticrm/platform'
|
||||
import { listMinioObjects } from './minio'
|
||||
|
||||
@ -71,7 +70,6 @@ async function dropElastic (elasticUrl: string, dbName: string): Promise<void> {
|
||||
async function restoreElastic (mongoUrl: string, dbName: string, minio: Client, elasticUrl: string): Promise<void> {
|
||||
addLocation(serverChunterId, () => import('@anticrm/server-chunter-resources'))
|
||||
addLocation(serverRecruitId, () => import('@anticrm/server-recruit-resources'))
|
||||
addLocation(serverViewId, () => import('@anticrm/server-task-resources'))
|
||||
const mongoClient = new MongoClient(mongoUrl)
|
||||
try {
|
||||
await mongoClient.connect()
|
||||
|
@ -176,14 +176,18 @@ export function createModel (builder: Builder): void {
|
||||
options: {
|
||||
lookup: {
|
||||
attachedTo: recruit.class.Candidate,
|
||||
state: task.class.State
|
||||
state: task.class.State,
|
||||
assignee: contact.class.Employee,
|
||||
doneState: task.class.DoneState
|
||||
}
|
||||
} as FindOptions<Doc>, // TODO: fix
|
||||
config: [
|
||||
'',
|
||||
'$lookup.attachedTo',
|
||||
'$lookup.assignee',
|
||||
'$lookup.state',
|
||||
'$lookup.attachedTo.city',
|
||||
'$lookup.doneState',
|
||||
// '$lookup.attachedTo.city',
|
||||
{ presenter: attachment.component.AttachmentsPresenter, label: 'Files' },
|
||||
{ presenter: chunter.component.CommentsPresenter, label: 'Comments' },
|
||||
'modifiedOn',
|
||||
|
@ -87,7 +87,7 @@ export class TTask extends TAttachedDoc implements Task {
|
||||
@Prop(TypeRef(task.class.State), 'State' as IntlString)
|
||||
state!: Ref<State>
|
||||
|
||||
@Prop(TypeRef(task.class.DoneState), 'Done Status' as IntlString)
|
||||
@Prop(TypeRef(task.class.DoneState), 'Done' as IntlString)
|
||||
doneState!: Ref<DoneState> | null
|
||||
|
||||
@Prop(TypeString(), 'No.' as IntlString)
|
||||
@ -383,6 +383,10 @@ export function createModel (builder: Builder): void {
|
||||
},
|
||||
task.space.Sequence
|
||||
)
|
||||
|
||||
builder.mixin(task.class.DoneState, core.class.Class, view.mixin.AttributePresenter, {
|
||||
presenter: task.component.DoneStatePresenter
|
||||
})
|
||||
}
|
||||
|
||||
export { taskOperation } from './migration'
|
||||
|
@ -78,6 +78,12 @@ export const taskOperation: MigrateOperation = {
|
||||
'view:class:DoneStateTemplate' as Ref<Class<Doc>>,
|
||||
task.class.DoneStateTemplate
|
||||
)
|
||||
await migrateClass(
|
||||
client,
|
||||
DOMAIN_KANBAN,
|
||||
'view:class:WonStateTemplate' as Ref<Class<Doc>>,
|
||||
task.class.WonStateTemplate
|
||||
)
|
||||
await migrateClass(
|
||||
client,
|
||||
DOMAIN_KANBAN,
|
||||
|
@ -44,6 +44,7 @@ export default mergeIds(taskId, task, {
|
||||
KanbanCard: '' as AnyComponent,
|
||||
TemplatesIcon: '' as AnyComponent,
|
||||
StatePresenter: '' as AnyComponent,
|
||||
DoneStatePresenter: '' as AnyComponent,
|
||||
StateEditor: '' as AnyComponent,
|
||||
KanbanView: '' as AnyComponent
|
||||
},
|
||||
|
@ -22,7 +22,9 @@ export let error: any
|
||||
|
||||
{error.message}
|
||||
<pre>
|
||||
{#if error.status.params}
|
||||
{#if error?.status?.params}
|
||||
{JSON.stringify(error.status.params, undefined, 2)}
|
||||
{:else}
|
||||
{JSON.stringify(error, undefined, 2)}
|
||||
{/if}
|
||||
</pre>
|
||||
|
@ -31,8 +31,6 @@
|
||||
<Avatar size={'x-small'} avatar={value.avatar} />
|
||||
<div class="overflow-label user">{formatName(value.name)}</div>
|
||||
</div>
|
||||
{:else}
|
||||
<div class="flex-row-center user-container" on:click={onClick}>Not defined</div>
|
||||
{/if}
|
||||
|
||||
<style lang="scss">
|
||||
|
@ -0,0 +1,38 @@
|
||||
<!--
|
||||
// Copyright © 2020, 2021 Anticrm Platform Contributors.
|
||||
// Copyright © 2021 Hardcore Engineering Inc.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
-->
|
||||
|
||||
<script lang="ts">
|
||||
import type { DoneState } from '@anticrm/task'
|
||||
import task from '@anticrm/task'
|
||||
|
||||
export let value: DoneState
|
||||
|
||||
$: color = value._class === task.class.WonState ? '#a5d179' : '#f28469'
|
||||
|
||||
</script>
|
||||
|
||||
{#if value }
|
||||
<div class="overflow-label state-container" style="background-color: {color};">
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<style lang="scss">
|
||||
.state-container {
|
||||
width: 0.5rem;
|
||||
height: 0.5rem;
|
||||
border-radius: 0.5rem;
|
||||
}
|
||||
</style>
|
@ -15,7 +15,7 @@
|
||||
-->
|
||||
|
||||
<script lang="ts">
|
||||
import type { State } from '@anticrm/core'
|
||||
import type { State } from '@anticrm/task'
|
||||
|
||||
export let value: State
|
||||
|
||||
|
@ -28,6 +28,7 @@ import { showPopup } from '@anticrm/ui'
|
||||
import KanbanView from './components/kanban/KanbanView.svelte'
|
||||
import StateEditor from './components/state/StateEditor.svelte'
|
||||
import StatePresenter from './components/state/StatePresenter.svelte'
|
||||
import DoneStatePresenter from './components/state/DoneStatePresenter.svelte'
|
||||
import EditStatuses from './components/state/EditStatuses.svelte'
|
||||
import { SpaceWithStates } from '@anticrm/task'
|
||||
|
||||
@ -55,7 +56,8 @@ export default async (): Promise<Resources> => ({
|
||||
TemplatesIcon,
|
||||
KanbanView,
|
||||
StatePresenter,
|
||||
StateEditor
|
||||
StateEditor,
|
||||
DoneStatePresenter
|
||||
},
|
||||
actionImpl: {
|
||||
CreateTask: createTask,
|
||||
|
Loading…
Reference in New Issue
Block a user