mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-22 01:25:00 +02:00
Update the labels of the create button (#1138)
Signed-off-by: Alexander Platov <sas_lord@mail.ru>
This commit is contained in:
@@ -70,7 +70,8 @@ export function createModel (builder: Builder): void {
|
||||
builder.mixin(lead.class.Funnel, core.class.Class, workbench.mixin.SpaceView, {
|
||||
view: {
|
||||
class: lead.class.Lead,
|
||||
createItemDialog: lead.component.CreateLead
|
||||
createItemDialog: lead.component.CreateLead,
|
||||
createItemLabel: lead.string.LeadCreateLabel
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -122,7 +122,8 @@ export function createModel (builder: Builder): void {
|
||||
builder.mixin(recruit.class.Vacancy, core.class.Class, workbench.mixin.SpaceView, {
|
||||
view: {
|
||||
class: recruit.class.Applicant,
|
||||
createItemDialog: recruit.component.CreateApplication
|
||||
createItemDialog: recruit.component.CreateApplication,
|
||||
createItemLabel: recruit.string.ApplicationCreateLabel
|
||||
}
|
||||
})
|
||||
|
||||
@@ -157,6 +158,7 @@ export function createModel (builder: Builder): void {
|
||||
component: recruit.component.Vacancies,
|
||||
icon: recruit.icon.Vacancy,
|
||||
label: recruit.string.Vacancies,
|
||||
createItemLabel: recruit.string.VacancyCreateLabel,
|
||||
position: 'bottom'
|
||||
},
|
||||
{
|
||||
@@ -164,6 +166,7 @@ export function createModel (builder: Builder): void {
|
||||
component: recruit.component.Candidates,
|
||||
icon: contact.icon.Person,
|
||||
label: recruit.string.Candidates,
|
||||
createItemLabel: recruit.string.CandidateCreateLabel,
|
||||
position: 'bottom'
|
||||
},
|
||||
{
|
||||
@@ -180,6 +183,7 @@ export function createModel (builder: Builder): void {
|
||||
component: recruit.component.SkillsView,
|
||||
icon: tags.icon.Tags,
|
||||
label: recruit.string.SkillsLabel,
|
||||
createItemLabel: recruit.string.SkillCreateLabel,
|
||||
position: 'bottom'
|
||||
}
|
||||
]
|
||||
|
||||
@@ -13,7 +13,8 @@ export function createReviewModel (builder: Builder): void {
|
||||
builder.mixin(recruit.class.ReviewCategory, core.class.Class, workbench.mixin.SpaceView, {
|
||||
view: {
|
||||
class: recruit.class.Review,
|
||||
createItemDialog: recruit.component.CreateReview
|
||||
createItemDialog: recruit.component.CreateReview,
|
||||
createItemLabel: recruit.string.ReviewCreateLabel
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -248,7 +248,8 @@ export function createModel (builder: Builder): void {
|
||||
builder.mixin(task.class.Project, core.class.Class, workbench.mixin.SpaceView, {
|
||||
view: {
|
||||
class: task.class.Issue,
|
||||
createItemDialog: task.component.CreateTask
|
||||
createItemDialog: task.component.CreateTask,
|
||||
createItemLabel: task.string.TaskCreateLabel
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
"PersonsFolder": "Persons folder",
|
||||
"MakePrivate": "Make private",
|
||||
"MakePrivateDescription": "Only members can see it",
|
||||
"Create": "Contact",
|
||||
"ContactCreateLabel": "Contact",
|
||||
"SearchEmployee": "Search for employee...",
|
||||
"SearchPerson": "Search for person...",
|
||||
"SearchOrganization": "Search for organization...",
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
"PersonsFolder": "Папка с людьми",
|
||||
"MakePrivate": "Сделать личным",
|
||||
"MakePrivateDescription": "Только пользователи могут видеть это",
|
||||
"Create": "Контакт",
|
||||
"ContactCreateLabel": "Контакт",
|
||||
"SearchEmployee": "Поиск сотрудника...",
|
||||
"SearchPerson": "Поиск персоны...",
|
||||
"SearchOrganization": "Поиск организации...",
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
<SearchEdit bind:value={search} on:change={() => {
|
||||
updateResultQuery(search)
|
||||
}}/>
|
||||
<Button icon={IconAdd} label={contact.string.Create} primary={true} size={'small'} on:click={(ev) => showCreateDialog(ev)}/>
|
||||
<Button icon={IconAdd} label={contact.string.ContactCreateLabel} primary={true} size={'small'} on:click={(ev) => showCreateDialog(ev)}/>
|
||||
</div>
|
||||
|
||||
<Scroller>
|
||||
|
||||
@@ -38,7 +38,7 @@ export default mergeIds(contactId, contact, {
|
||||
Name: '' as IntlString,
|
||||
MakePrivate: '' as IntlString,
|
||||
MakePrivateDescription: '' as IntlString,
|
||||
Create: '' as IntlString,
|
||||
ContactCreateLabel: '' as IntlString,
|
||||
SocialLinks: '' as IntlString,
|
||||
ViewActivity: '' as IntlString
|
||||
}
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
"string": {
|
||||
"Categories": "Categories",
|
||||
"Category": "Category",
|
||||
"CreateCategoryShort": "Category",
|
||||
"CategoryCreateLabel": "Category",
|
||||
"CreateCategory": "Create category",
|
||||
"CreateSubcategory": "Create subcategory",
|
||||
"Inventory": "Inventory",
|
||||
"CreateProductShort": "Product",
|
||||
"ProductCreateLabel": "Product",
|
||||
"CreateProduct": "Create product",
|
||||
"Products": "Products",
|
||||
"Product": "Product",
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
"string": {
|
||||
"Categories": "Категории",
|
||||
"Category": "Категория",
|
||||
"CreateCategoryShort": "Категория",
|
||||
"CategoryCreateLabel": "Категорию",
|
||||
"CreateCategory": "Создать категорию",
|
||||
"CreateSubcategory": "Создать подкатегорию",
|
||||
"Inventory": "Инвентарь",
|
||||
"CreateProductShort": "Продукт",
|
||||
"ProductCreateLabel": "Продукт",
|
||||
"CreateProduct": "Создать продукт",
|
||||
"Products": "Продукты",
|
||||
"Product": "Продукт",
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
updateResultQuery(search)
|
||||
}}/>
|
||||
<Button
|
||||
label={inventory.string.CreateCategoryShort}
|
||||
label={inventory.string.CategoryCreateLabel}
|
||||
icon={IconAdd}
|
||||
primary={true}
|
||||
size={'small'}
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
}}
|
||||
/>
|
||||
<Button
|
||||
label={inventory.string.CreateProductShort}
|
||||
label={inventory.string.ProductCreateLabel}
|
||||
icon={IconAdd}
|
||||
primary={true}
|
||||
size={'small'}
|
||||
|
||||
@@ -26,11 +26,11 @@ export default mergeIds(inventoryId, inventory, {
|
||||
string: {
|
||||
Categories: '' as IntlString,
|
||||
Category: '' as IntlString,
|
||||
CreateCategoryShort: '' as IntlString,
|
||||
CategoryCreateLabel: '' as IntlString,
|
||||
CreateCategory: '' as IntlString,
|
||||
CreateSubcategory: '' as IntlString,
|
||||
Inventory: '' as IntlString,
|
||||
CreateProductShort: '' as IntlString,
|
||||
ProductCreateLabel: '' as IntlString,
|
||||
CreateProduct: '' as IntlString,
|
||||
Products: '' as IntlString,
|
||||
Product: '' as IntlString,
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
"MakePrivate": "Make private",
|
||||
"MakePrivateDescription": "Only members can see it",
|
||||
"LeadApplication": "Leads",
|
||||
"LeadCreateLabel": "Lead",
|
||||
"SelectFunnel": "Select funnel",
|
||||
"LeadName": "Lead name",
|
||||
"More": "More...",
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
"MakePrivate": "Сделать личным",
|
||||
"MakePrivateDescription": "Только пользователи могут видеть это",
|
||||
"LeadApplication": "Сделки",
|
||||
"LeadCreateLabel": "Сделку",
|
||||
"SelectFunnel": "Выбрать воронку",
|
||||
"LeadName": "Название сделки",
|
||||
"More": "Еще...",
|
||||
|
||||
@@ -27,6 +27,7 @@ export default mergeIds(leadId, lead, {
|
||||
More: '' as IntlString,
|
||||
SelectFunnel: '' as IntlString,
|
||||
CreateLead: '' as IntlString,
|
||||
LeadCreateLabel: '' as IntlString,
|
||||
Customer: '' as IntlString,
|
||||
SelectCustomer: '' as IntlString,
|
||||
Customers: '' as IntlString,
|
||||
|
||||
@@ -9,13 +9,16 @@
|
||||
"CreateVacancy": "Create Vacancy",
|
||||
"MakePrivate": "Make Private",
|
||||
"Vacancy": "Vacancy",
|
||||
"VacancyCreateLabel": "Vacancy",
|
||||
"VacancyPlaceholder": "Software Engineer",
|
||||
"MakePrivateDescription": "Only members can see it",
|
||||
"CreateAnApplication": "Create an application",
|
||||
"NoApplicationsForCandidate": "There are no applications for this candidate.",
|
||||
"CreateApplication": "Create Application",
|
||||
"ApplicationCreateLabel": "Application",
|
||||
"SelectVacancy": "Select vacancy",
|
||||
"Candidate": "Candidate",
|
||||
"CandidateCreateLabel": "Candidate",
|
||||
"CreateCandidate": "Create Candidate",
|
||||
"AssignRecruiter": "Assign recruiter",
|
||||
"UnAssignRecruiter": "Unassign recruiter",
|
||||
@@ -35,6 +38,7 @@
|
||||
"AssignedRecruiter": "Assigned recruiter",
|
||||
"SkillLabel": "Skill",
|
||||
"SkillsLabel": "Skills",
|
||||
"SkillCreateLabel": "Skill",
|
||||
"General": "General",
|
||||
"Members": "Members",
|
||||
"Yes": "Yes",
|
||||
@@ -62,6 +66,7 @@
|
||||
"SelectReviewCategory": "select category",
|
||||
"Reviews": "Reviews",
|
||||
"Review": "Review",
|
||||
"ReviewCreateLabel": "Review",
|
||||
"Opinions": "Opinions",
|
||||
"Opinion": "Opinion",
|
||||
"OpinionValue": "Rating",
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
"VacancyDescription": "Описание вакансии",
|
||||
"CreateVacancy": "Создать вакансию",
|
||||
"Vacancy": "Вакансия",
|
||||
"VacancyCreateLabel": "Вакансию",
|
||||
"VacancyPlaceholder": "Разработчик",
|
||||
"MakePrivate": "Сделать личным",
|
||||
"MakePrivateDescription": "Только пользователи могут видеть это",
|
||||
@@ -16,6 +17,7 @@
|
||||
"CreateApplication": "Создать претендента",
|
||||
"SelectVacancy": "Выбрать вакансию",
|
||||
"Candidate": "Кандидат",
|
||||
"CandidateCreateLabel": "Кандидата",
|
||||
"CreateCandidate": "Создать кандидата",
|
||||
"AssignRecruiter": "Назначить рекрутера",
|
||||
"UnAssignRecruiter": "Отменить назначение рекрутера",
|
||||
@@ -32,9 +34,11 @@
|
||||
"Remote": "Удаленно",
|
||||
"SearchApplication": "Поиск претендента...",
|
||||
"Application": "Претендент",
|
||||
"ApplicationCreateLabel": "Претендента",
|
||||
"AssignedRecruiter": "Назначенные рекрутер",
|
||||
"SkillLabel": "Навык",
|
||||
"SkillsLabel": "Навыки",
|
||||
"SkillCreateLabel": "Навык",
|
||||
"General": "Основное",
|
||||
"Members": "Пользователи",
|
||||
"Yes": "Да",
|
||||
@@ -63,6 +67,7 @@
|
||||
"SelectReviewCategory": "выбрать категорию",
|
||||
"Reviews": "Оценки",
|
||||
"Review": "Оценка",
|
||||
"ReviewCreateLabel": "Оценку",
|
||||
"Opinions": "Мнения",
|
||||
"Opinion": "Мнение",
|
||||
"OpinionValue": "Оценка",
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
import { Doc, DocumentQuery, Ref } from '@anticrm/core'
|
||||
import { createQuery, getClient } from '@anticrm/presentation'
|
||||
import tags, { selectedTagElements, TagCategory, TagElement } from '@anticrm/tags'
|
||||
import { Button, Component, Icon, Label, Scroller, SearchEdit, showPopup } from '@anticrm/ui'
|
||||
import { Button, Component, Icon, Label, Scroller, SearchEdit, showPopup, IconAdd } from '@anticrm/ui'
|
||||
import view, { Viewlet } from '@anticrm/view'
|
||||
import { Table } from '@anticrm/view-resources'
|
||||
import recruit from '../plugin'
|
||||
@@ -69,7 +69,7 @@
|
||||
<SearchEdit bind:value={search} on:change={() => {
|
||||
updateResultQuery(search, documentIds)
|
||||
}} />
|
||||
<Button label={recruit.string.Create} primary={true} size={'small'} on:click={(ev) => showCreateDialog(ev)} />
|
||||
<Button icon={IconAdd} label={recruit.string.CandidateCreateLabel} primary size={'small'} on:click={(ev) => showCreateDialog(ev)} />
|
||||
</div>
|
||||
|
||||
<Component is={tags.component.TagsCategoryBar} props={{ targetClass: recruit.mixin.Candidate, category }} on:change={(evt) => updateCategory(evt.detail) }/>
|
||||
|
||||
@@ -4,4 +4,4 @@
|
||||
import recruit from '../plugin'
|
||||
</script>
|
||||
|
||||
<Component is={tags.component.TagsView} props={{ targetClass: recruit.mixin.Candidate, title: recruit.string.SkillsLabel, item: recruit.string.SkillLabel, key: 'skills' }}/>
|
||||
<Component is={tags.component.TagsView} props={{ targetClass: recruit.mixin.Candidate, title: recruit.string.SkillsLabel, item: recruit.string.SkillLabel, key: 'skills', сreateItemLabel: recruit.string.SkillCreateLabel }}/>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
import { Doc, DocumentQuery, Ref } from '@anticrm/core'
|
||||
import { createQuery } from '@anticrm/presentation'
|
||||
import { Applicant, Vacancy } from '@anticrm/recruit'
|
||||
import { Button, getCurrentLocation, Icon, Label, navigate, Scroller, showPopup } from '@anticrm/ui'
|
||||
import { Button, getCurrentLocation, Icon, Label, navigate, Scroller, showPopup, IconAdd } from '@anticrm/ui'
|
||||
import SearchEdit from '@anticrm/ui/src/components/SearchEdit.svelte'
|
||||
import { Table } from '@anticrm/view-resources'
|
||||
import recruit from '../plugin'
|
||||
@@ -101,7 +101,7 @@
|
||||
vquery = search
|
||||
}}
|
||||
/>
|
||||
<Button label={recruit.string.Create} primary={true} size={'small'} on:click={(ev) => showCreateDialog(ev)} />
|
||||
<Button icon={IconAdd} label={recruit.string.VacancyCreateLabel} primary size={'small'} on:click={(ev) => showCreateDialog(ev)} />
|
||||
</div>
|
||||
<Scroller>
|
||||
<Table
|
||||
|
||||
@@ -41,9 +41,12 @@ export default mergeIds(recruitId, recruit, {
|
||||
LastName: '' as IntlString,
|
||||
Candidates: '' as IntlString,
|
||||
CreateApplication: '' as IntlString,
|
||||
ApplicationCreateLabel: '' as IntlString,
|
||||
Vacancy: '' as IntlString,
|
||||
VacancyCreateLabel: '' as IntlString,
|
||||
SelectVacancy: '' as IntlString,
|
||||
Candidate: '' as IntlString,
|
||||
CandidateCreateLabel: '' as IntlString,
|
||||
CreateCandidate: '' as IntlString,
|
||||
AssignRecruiter: '' as IntlString,
|
||||
Recruiters: '' as IntlString,
|
||||
@@ -61,6 +64,7 @@ export default mergeIds(recruitId, recruit, {
|
||||
Remote: '' as IntlString,
|
||||
SkillLabel: '' as IntlString,
|
||||
SkillsLabel: '' as IntlString,
|
||||
SkillCreateLabel: '' as IntlString,
|
||||
General: '' as IntlString,
|
||||
Members: '' as IntlString,
|
||||
Yes: '' as IntlString,
|
||||
@@ -73,6 +77,7 @@ export default mergeIds(recruitId, recruit, {
|
||||
Vacancies: '' as IntlString,
|
||||
|
||||
Review: '' as IntlString,
|
||||
ReviewCreateLabel: '' as IntlString,
|
||||
ReviewCategory: '' as IntlString,
|
||||
CreateReviewCategory: '' as IntlString,
|
||||
ReviewCategoryName: '' as IntlString,
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
"AddNowTooltip": "Create {word}",
|
||||
"AddTag": "Create {word}",
|
||||
"EditTag": "Edit {word}",
|
||||
"CreateItemLabel": "Create",
|
||||
"TagCreateLabel": "Tag",
|
||||
"CancelLabel": "Cancel",
|
||||
"SearchCreate": "Search/Name ...",
|
||||
"NoItems": "There is no {word} added ...",
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
"AddNowTooltip": "Создать {word}",
|
||||
"AddTag": "Создать {word}",
|
||||
"EditTag": "Редактировать {word}",
|
||||
"CreateItemLabel": "Создать",
|
||||
"TagCreateLabel": "Тег",
|
||||
"CancelLabel": "Отмена",
|
||||
"SearchCreate": "Название...",
|
||||
"NoItems": "Отсутсвует добавленный {word}",
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
import { Class, Doc, DocumentQuery, FindOptions, Ref } from '@anticrm/core'
|
||||
import { IntlString, translate } from '@anticrm/platform'
|
||||
import { TagCategory, TagElement } from '@anticrm/tags'
|
||||
import { Button, Icon, Label, Scroller, SearchEdit, showPopup } from '@anticrm/ui'
|
||||
import { Button, Icon, Label, Scroller, SearchEdit, showPopup, IconAdd } from '@anticrm/ui'
|
||||
import { Table } from '@anticrm/view-resources'
|
||||
import tags from '../plugin'
|
||||
import CategoryBar from './CategoryBar.svelte'
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
export let title: IntlString = tags.string.Tags
|
||||
export let item: IntlString = tags.string.Tag
|
||||
export let сreateItemLabel: IntlString = tags.string.TagCreateLabel
|
||||
export let targetClass: Ref<Class<Doc>>
|
||||
|
||||
let keyTitle: string
|
||||
@@ -64,7 +65,7 @@
|
||||
updateResultQuery(search, category)
|
||||
}}
|
||||
/>
|
||||
<Button label={tags.string.CreateItemLabel} primary={true} size={'small'} on:click={(ev) => showCreateDialog(ev)} />
|
||||
<Button icon={IconAdd} label={сreateItemLabel} primary size={'small'} on:click={(ev) => showCreateDialog(ev)} />
|
||||
</div>
|
||||
|
||||
<CategoryBar
|
||||
|
||||
@@ -26,7 +26,6 @@ export default mergeIds(tagsId, tags, {
|
||||
EditTag: '' as IntlString,
|
||||
AddTagTooltip: '' as IntlString,
|
||||
AddNowTooltip: '' as IntlString,
|
||||
CreateItemLabel: '' as IntlString,
|
||||
CancelLabel: '' as IntlString,
|
||||
SearchCreate: '' as IntlString,
|
||||
NoItems: '' as IntlString,
|
||||
@@ -37,6 +36,7 @@ export default mergeIds(tagsId, tags, {
|
||||
TagTooltip: '' as IntlString,
|
||||
Tags: '' as IntlString,
|
||||
Tag: '' as IntlString,
|
||||
TagCreateLabel: '' as IntlString,
|
||||
TagName: '' as IntlString,
|
||||
SaveLabel: '' as IntlString,
|
||||
CategoryLabel: '' as IntlString,
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
"KanbanTemplateTitle": "Title",
|
||||
"Rank": "Rank",
|
||||
"CreateTask": "Create task",
|
||||
"TaskCreateLabel": "Task",
|
||||
"EditStates": "Edit states",
|
||||
"Archive": "Archive",
|
||||
"Unarchive": "Unarchive",
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
"KanbanTemplateTitle": "Заголовок",
|
||||
"Rank": "Ранк",
|
||||
"CreateTask": "Создать задачу",
|
||||
"TaskCreateLabel": "Задачу",
|
||||
"EditStates": "Редактировать статусы",
|
||||
"Archive": "Архивировать",
|
||||
"Unarchive": "Разархивировать",
|
||||
|
||||
@@ -24,6 +24,7 @@ export default mergeIds(taskId, task, {
|
||||
ProjectName: '' as IntlString,
|
||||
ProjectNamePlaceholder: '' as IntlString,
|
||||
CreateTask: '' as IntlString,
|
||||
TaskCreateLabel: '' as IntlString,
|
||||
TaskAssignee: '' as IntlString,
|
||||
TaskNamePlaceholder: '' as IntlString,
|
||||
TaskDescription: '' as IntlString,
|
||||
|
||||
@@ -15,10 +15,11 @@
|
||||
|
||||
<script lang="ts">
|
||||
import type { Ref,Space } from '@anticrm/core'
|
||||
import core,{ WithLookup } from '@anticrm/core'
|
||||
import presentation,{ createQuery,getClient } from '@anticrm/presentation'
|
||||
import core, { WithLookup } from '@anticrm/core'
|
||||
import { IntlString } from '@anticrm/platform'
|
||||
import presentation, { createQuery, getClient } from '@anticrm/presentation'
|
||||
import type { AnyComponent } from '@anticrm/ui'
|
||||
import { Button,Icon,SearchEdit,showPopup,Tooltip } from '@anticrm/ui'
|
||||
import { Button, Icon, SearchEdit, showPopup, Tooltip, IconAdd } from '@anticrm/ui'
|
||||
import { Viewlet } from '@anticrm/view'
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
import { classIcon } from '../utils'
|
||||
@@ -27,6 +28,7 @@
|
||||
export let spaceId: Ref<Space> | undefined
|
||||
// export let _class: Ref<Class<Doc>> | undefined
|
||||
export let createItemDialog: AnyComponent | undefined
|
||||
export let createItemLabel: IntlString = presentation.string.Create
|
||||
export let search: string
|
||||
export let viewlet: WithLookup<Viewlet> | undefined
|
||||
export let viewlets: WithLookup<Viewlet>[] = []
|
||||
@@ -51,7 +53,6 @@
|
||||
search = ''
|
||||
dispatch('search', '')
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<div class="ac-header full">
|
||||
@@ -62,7 +63,9 @@
|
||||
{#each viewlets as viewlet, i}
|
||||
<Tooltip label={viewlet.$lookup?.descriptor?.label} direction={'top'}>
|
||||
<button class="ac-header__icon-button" class:selected={selectedViewlet === i} on:click={() => { selectedViewlet = i }}>
|
||||
<Icon icon={viewlet.$lookup?.descriptor?.icon} size={'small'}/>
|
||||
{#if viewlet.$lookup?.descriptor?.icon}
|
||||
<Icon icon={viewlet.$lookup?.descriptor?.icon} size={'small'} />
|
||||
{/if}
|
||||
</button>
|
||||
</Tooltip>
|
||||
{/each}
|
||||
@@ -72,7 +75,7 @@
|
||||
dispatch('search', search)
|
||||
}}/>
|
||||
{#if createItemDialog}
|
||||
<Button label={presentation.string.Create} primary={true} size={'small'} on:click={(ev) => showCreateDialog(ev)}/>
|
||||
<Button icon={IconAdd} label={createItemLabel} primary size={'small'} on:click={(ev) => showCreateDialog(ev)}/>
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
|
||||
<script lang="ts">
|
||||
import core, { Class, Doc, Ref, Space, WithLookup } from '@anticrm/core'
|
||||
import { IntlString } from '@anticrm/platform'
|
||||
import { getClient } from '@anticrm/presentation'
|
||||
import type { AnyComponent } from '@anticrm/ui'
|
||||
import view, { Viewlet } from '@anticrm/view'
|
||||
@@ -26,6 +27,7 @@
|
||||
export let currentSpace: Ref<Space> | undefined
|
||||
export let currentView: ViewConfiguration | undefined
|
||||
export let createItemDialog: AnyComponent | undefined
|
||||
export let createItemLabel: IntlString | undefined
|
||||
|
||||
let search: string = ''
|
||||
let viewlet: WithLookup<Viewlet> | undefined = undefined
|
||||
@@ -52,7 +54,7 @@
|
||||
$: update(currentView?.class, currentSpace)
|
||||
</script>
|
||||
|
||||
<SpaceHeader spaceId={space} {_class} {viewlets} {createItemDialog} bind:search={search} bind:viewlet={viewlet} />
|
||||
<SpaceHeader spaceId={space} {_class} {viewlets} {createItemDialog} {createItemLabel} bind:search={search} bind:viewlet={viewlet} />
|
||||
{#if _class && space}
|
||||
<SpaceContent {space} {_class} {search} {viewlet} />
|
||||
{/if}
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
import core, { Client, getCurrentAccount, Ref, Space } from '@anticrm/core'
|
||||
import notification, { NotificationStatus } from '@anticrm/notification'
|
||||
import { NotificationClientImpl } from '@anticrm/notification-resources'
|
||||
import { IntlString } from '@anticrm/platform'
|
||||
import { Avatar, createQuery, setClient } from '@anticrm/presentation'
|
||||
import {
|
||||
AnyComponent, closePopup,
|
||||
@@ -55,6 +56,7 @@
|
||||
let currentApplication: Application | undefined
|
||||
let currentView: ViewConfiguration | undefined
|
||||
let createItemDialog: AnyComponent | undefined
|
||||
let createItemLabel: IntlString | undefined
|
||||
let navigatorModel: NavigatorModel | undefined
|
||||
|
||||
onDestroy(
|
||||
@@ -96,7 +98,8 @@
|
||||
const spaceClass = client.getHierarchy().getClass(space._class) // (await client.findAll(core.class.Class, { _id: space._class }))[0]
|
||||
const view = client.getHierarchy().as(spaceClass, workbench.mixin.SpaceView)
|
||||
currentView = view.view
|
||||
createItemDialog = currentView.createItemDialog
|
||||
createItemDialog = currentView.createItemDialog ?? undefined
|
||||
createItemLabel = currentView.createItemLabel ?? undefined
|
||||
|
||||
const loc = getCurrentLocation()
|
||||
loc.path[2] = spaceId
|
||||
@@ -105,6 +108,7 @@
|
||||
} else {
|
||||
currentView = undefined
|
||||
createItemDialog = undefined
|
||||
createItemLabel = undefined
|
||||
}
|
||||
}
|
||||
$: updateSpace(currentSpace)
|
||||
@@ -192,6 +196,7 @@
|
||||
currentSpecial = undefined
|
||||
currentView = undefined
|
||||
createItemDialog = undefined
|
||||
createItemLabel = undefined
|
||||
|
||||
const loc = getCurrentLocation()
|
||||
loc.path[1] = app._id
|
||||
@@ -292,7 +297,7 @@
|
||||
{:else if specialComponent}
|
||||
<Component is={specialComponent} props={{ model: navigatorModel }} />
|
||||
{:else}
|
||||
<SpaceView {currentSpace} {currentView} {createItemDialog} />
|
||||
<SpaceView {currentSpace} {currentView} {createItemDialog} {createItemLabel} />
|
||||
{/if}
|
||||
</div>
|
||||
<!-- <div class="aside"><Chat thread/></div> -->
|
||||
|
||||
@@ -70,6 +70,7 @@ export interface SpecialNavModel {
|
||||
export interface ViewConfiguration {
|
||||
class: Ref<Class<Doc>> // show object of this class
|
||||
createItemDialog?: AnyComponent
|
||||
createItemLabel?: IntlString
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,7 +10,7 @@ test.describe('recruit tests', () => {
|
||||
|
||||
await page.click('text=Candidates')
|
||||
|
||||
await page.click('button:has-text("Create")')
|
||||
await page.click('button:has-text("Candidate")')
|
||||
|
||||
const firstName = page.locator('[placeholder="John"]')
|
||||
await firstName.click()
|
||||
@@ -65,13 +65,13 @@ test.describe('recruit tests', () => {
|
||||
|
||||
await page.locator('text=Vacancies').click()
|
||||
|
||||
await page.click('button:has-text("Create")')
|
||||
await page.click('button:has-text("Vacancy")')
|
||||
await page.fill('[placeholder="Software\\ Engineer"]', 'My vacancy')
|
||||
await page.click('text=Create Cancel >> button')
|
||||
await page.locator('text=My vacancy').click()
|
||||
|
||||
// Create Applicatio n1
|
||||
await page.click('text=Create')
|
||||
await page.click('text=Application')
|
||||
await page.click('text=Not selected')
|
||||
await page.click('button:has-text("Alex P.")')
|
||||
await page.click('text=Create Cancel >> button')
|
||||
|
||||
Reference in New Issue
Block a user