mirror of
https://github.com/hcengineering/platform.git
synced 2025-06-09 09:20:54 +00:00
initial create application button in candidates pool
Signed-off-by: Andrey Platov <andrey@hardcoreeng.com>
This commit is contained in:
parent
3ab72eb819
commit
4f33365b25
File diff suppressed because it is too large
Load Diff
@ -108,7 +108,7 @@ export function createModel (builder: Builder): void {
|
|||||||
resume: chunter.class.Attachment
|
resume: chunter.class.Attachment
|
||||||
}
|
}
|
||||||
} as FindOptions<Doc>, // TODO: fix
|
} as FindOptions<Doc>, // TODO: fix
|
||||||
config: ['', 'city', '$lookup.resume', 'channels']
|
config: ['', '#' + recruit.component.CreateApplicationPresenter, 'city', '$lookup.resume', 'channels']
|
||||||
})
|
})
|
||||||
|
|
||||||
builder.createDoc(view.class.Viewlet, core.space.Model, {
|
builder.createDoc(view.class.Viewlet, core.space.Model, {
|
||||||
|
@ -33,7 +33,8 @@ export default mergeIds(recruitId, recruit, {
|
|||||||
CreateCandidate: '' as AnyComponent,
|
CreateCandidate: '' as AnyComponent,
|
||||||
CreateApplication: '' as AnyComponent,
|
CreateApplication: '' as AnyComponent,
|
||||||
EditCandidate: '' as AnyComponent,
|
EditCandidate: '' as AnyComponent,
|
||||||
KanbanCard: '' as AnyComponent
|
KanbanCard: '' as AnyComponent,
|
||||||
|
CreateApplicationPresenter: '' as AnyComponent
|
||||||
},
|
},
|
||||||
space: {
|
space: {
|
||||||
CandidatesPublic: '' as Ref<Space>
|
CandidatesPublic: '' as Ref<Space>
|
||||||
|
@ -29,12 +29,10 @@
|
|||||||
import contact from '@anticrm/contact'
|
import contact from '@anticrm/contact'
|
||||||
|
|
||||||
export let space: Ref<Space>
|
export let space: Ref<Space>
|
||||||
|
export let candidate: Ref<Person>
|
||||||
|
export let employee: Ref<Employee>
|
||||||
|
|
||||||
const dispatch = createEventDispatcher()
|
const dispatch = createEventDispatcher()
|
||||||
|
|
||||||
let candidate: Ref<Person>
|
|
||||||
let employee: Ref<Employee>
|
|
||||||
|
|
||||||
const client = getClient()
|
const client = getClient()
|
||||||
|
|
||||||
async function createApplication() {
|
async function createApplication() {
|
||||||
|
@ -0,0 +1,29 @@
|
|||||||
|
<!--
|
||||||
|
// 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 { Doc } from '@anticrm/core'
|
||||||
|
import { Button, showPopup } from '@anticrm/ui'
|
||||||
|
import CreateApplication from './CreateApplication.svelte'
|
||||||
|
|
||||||
|
export let object: Doc
|
||||||
|
|
||||||
|
let button: HTMLElement
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div bind:this={button}><Button label="Create Application" size="small" on:click={ () => { showPopup(CreateApplication, { candidate: object._id }, button) } }/></div>
|
@ -21,6 +21,7 @@ import EditCandidate from './components/EditCandidate.svelte'
|
|||||||
import CandidateGeneral from './components/CandidateGeneral.svelte'
|
import CandidateGeneral from './components/CandidateGeneral.svelte'
|
||||||
import Attachments from './components/Attachments.svelte'
|
import Attachments from './components/Attachments.svelte'
|
||||||
import KanbanCard from './components/KanbanCard.svelte'
|
import KanbanCard from './components/KanbanCard.svelte'
|
||||||
|
import CreateApplicationPresenter from './components/CreateApplicationPresenter.svelte'
|
||||||
|
|
||||||
export default async () => ({
|
export default async () => ({
|
||||||
component: {
|
component: {
|
||||||
@ -31,6 +32,7 @@ export default async () => ({
|
|||||||
EditCandidate,
|
EditCandidate,
|
||||||
CandidateGeneral,
|
CandidateGeneral,
|
||||||
Attachments,
|
Attachments,
|
||||||
KanbanCard
|
KanbanCard,
|
||||||
|
CreateApplicationPresenter
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
@ -72,7 +72,7 @@
|
|||||||
{#each objects as object (object._id)}
|
{#each objects as object (object._id)}
|
||||||
<tr class="tr-body" on:click={() => onClick(object)}>
|
<tr class="tr-body" on:click={() => onClick(object)}>
|
||||||
{#each model as attribute}
|
{#each model as attribute}
|
||||||
<td><svelte:component this={attribute.presenter} value={getValue(object, attribute.key)}/></td>
|
<td><svelte:component this={attribute.presenter} {object} value={getValue(object, attribute.key)}/></td>
|
||||||
{/each}
|
{/each}
|
||||||
</tr>
|
</tr>
|
||||||
{/each}
|
{/each}
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
import type { IntlString } from '@anticrm/platform'
|
import type { IntlString } from '@anticrm/platform'
|
||||||
import { getResource } from '@anticrm/platform'
|
import { getResource } from '@anticrm/platform'
|
||||||
import type { Ref, Class, Obj, FindOptions, Doc, Client } from '@anticrm/core'
|
import type { Ref, Class, Obj, FindOptions, Doc, Client } from '@anticrm/core'
|
||||||
import type { AnySvelteComponent } from '@anticrm/ui'
|
import type { AnyComponent, AnySvelteComponent } from '@anticrm/ui'
|
||||||
|
|
||||||
import view from '@anticrm/view'
|
import view from '@anticrm/view'
|
||||||
|
|
||||||
@ -64,6 +64,13 @@ async function getPresenter(client: Client, _class: Ref<Class<Obj>>, key: string
|
|||||||
if (key.length === 0) {
|
if (key.length === 0) {
|
||||||
return getObjectPresenter(client, _class, preserveKey)
|
return getObjectPresenter(client, _class, preserveKey)
|
||||||
} else {
|
} else {
|
||||||
|
if (key.startsWith('#')) {
|
||||||
|
return {
|
||||||
|
key: '',
|
||||||
|
label: '' as IntlString,
|
||||||
|
presenter: await getResource(key.substring(1) as AnyComponent)
|
||||||
|
}
|
||||||
|
}
|
||||||
const split = key.split('.')
|
const split = key.split('.')
|
||||||
if (split[0] === '$lookup') {
|
if (split[0] === '$lookup') {
|
||||||
const lookupClass = (options?.lookup as any)[split[1]] as Ref<Class<Obj>>
|
const lookupClass = (options?.lookup as any)[split[1]] as Ref<Class<Obj>>
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user