diff --git a/models/calendar/src/index.ts b/models/calendar/src/index.ts index 0f5c767fb9..2df8a5e354 100644 --- a/models/calendar/src/index.ts +++ b/models/calendar/src/index.ts @@ -22,6 +22,7 @@ import { ArrOf, Builder, Collection, + Hidden, Index, Mixin, Model, @@ -85,10 +86,12 @@ export class TEvent extends TAttachedDoc implements Event { @UX(calendar.string.Reminder, calendar.icon.Calendar) export class TReminder extends TEvent implements Reminder { @Prop(TypeDate(true), calendar.string.Shift) + @Hidden() shift!: Timestamp @Prop(TypeString(), calendar.string.State) @Index(IndexKind.Indexed) + @Hidden() state!: 'active' | 'done' } diff --git a/models/lead/src/index.ts b/models/lead/src/index.ts index 0cb27d367c..514fc41ba0 100644 --- a/models/lead/src/index.ts +++ b/models/lead/src/index.ts @@ -23,9 +23,8 @@ import chunter from '@anticrm/model-chunter' import contact, { TPerson } from '@anticrm/model-contact' import core from '@anticrm/model-core' import task, { TSpaceWithStates, TTask } from '@anticrm/model-task' -import view from '@anticrm/model-view' -import workbench from '@anticrm/model-workbench' -import type {} from '@anticrm/view' +import view, { createAction } from '@anticrm/model-view' +import workbench, { Application } from '@anticrm/model-workbench' import lead from './plugin' @Model(lead.class.Funnel, task.class.SpaceWithStates) @@ -102,7 +101,7 @@ export function createModel (builder: Builder): void { label: lead.string.Customers, icon: contact.icon.Person, // <-- Put contact general icon here. component: lead.component.Customers, - position: 'bottom' + position: 'top' } ], spaces: [ @@ -200,6 +199,22 @@ export function createModel (builder: Builder): void { }, lead.space.FunnelTemplates ) + + createAction(builder, { + action: workbench.actionImpl.Navigate, + actionProps: { + mode: 'app', + application: lead.app.Lead as Ref + }, + label: lead.string.GotoLeadApplication, + icon: view.icon.ArrowRight, + input: 'none', + category: view.category.Navigation, + target: core.class.Doc, + context: { + mode: ['workbench', 'browser', 'editor', 'panel', 'popup'] + } + }) } export { leadOperation } from './migration' diff --git a/models/lead/src/plugin.ts b/models/lead/src/plugin.ts index 5c5c4fa4e9..3c133d4764 100644 --- a/models/lead/src/plugin.ts +++ b/models/lead/src/plugin.ts @@ -31,7 +31,8 @@ export default mergeIds(leadId, lead, { Title: '' as IntlString, Assignee: '' as IntlString, ManageFunnelStatuses: '' as IntlString, - FunnelBrowser: '' as IntlString + FunnelBrowser: '' as IntlString, + GotoLeadApplication: '' as IntlString }, component: { CreateFunnel: '' as AnyComponent, diff --git a/packages/presentation/src/components/AttributeBarEditor.svelte b/packages/presentation/src/components/AttributeBarEditor.svelte index cda9b195f7..466e5a57d5 100644 --- a/packages/presentation/src/components/AttributeBarEditor.svelte +++ b/packages/presentation/src/components/AttributeBarEditor.svelte @@ -123,18 +123,20 @@ {:else} - +
+ +
{/if} {:else}
diff --git a/plugins/calendar-assets/lang/en.json b/plugins/calendar-assets/lang/en.json index 4eda6db8d0..160249d643 100644 --- a/plugins/calendar-assets/lang/en.json +++ b/plugins/calendar-assets/lang/en.json @@ -32,6 +32,8 @@ "EditReminder": "Edit reminder", "CreateReminder": "Create reminder", "CreatedReminder": "Created a reminder", - "Reminders": "Reminders" + "Reminders": "Reminders", + "Shift": "Shift", + "State": "State" } } \ No newline at end of file diff --git a/plugins/lead-assets/lang/en.json b/plugins/lead-assets/lang/en.json index 5c748c7935..bf5b91dd13 100644 --- a/plugins/lead-assets/lang/en.json +++ b/plugins/lead-assets/lang/en.json @@ -21,6 +21,7 @@ "Title": "Title", "LeadPlaceholder": "The simple lead", "ManageFunnelStatuses": "Manage funnel statuses", - "FunnelBrowser": "Funnel browser" + "FunnelBrowser": "Funnel browser", + "GotoLeadApplication": "Switch to Lead Application" } } \ No newline at end of file diff --git a/plugins/lead-assets/lang/ru.json b/plugins/lead-assets/lang/ru.json index f32df93809..310c219918 100644 --- a/plugins/lead-assets/lang/ru.json +++ b/plugins/lead-assets/lang/ru.json @@ -21,6 +21,7 @@ "Title": "Загаловок", "LeadPlaceholder": "Простая сделка", "ManageFunnelStatuses": "Управление статусами воронки", - "FunnelBrowser": "Браузер воронок" + "FunnelBrowser": "Браузер воронок", + "GotoLeadApplication": "Открыть приложение Сделки" } } \ No newline at end of file