Fix lead padding and add switch application (#1649)

This commit is contained in:
Andrey Sobolev 2022-05-05 18:42:32 +07:00 committed by GitHub
parent c60971c1a9
commit 96a5e53e16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 45 additions and 20 deletions

View File

@ -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'
}

View File

@ -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<Application>
},
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'

View File

@ -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,

View File

@ -123,6 +123,7 @@
</div>
{:else}
<span class="fs-bold"><Label label={attribute.label} /></span>
<div class="flex flex-grow">
<svelte:component
this={instance}
label={attribute?.label}
@ -135,6 +136,7 @@
{onChange}
{focus}
/>
</div>
{/if}
{:else}
<div style="grid-column: 1/3;">

View File

@ -32,6 +32,8 @@
"EditReminder": "Edit reminder",
"CreateReminder": "Create reminder",
"CreatedReminder": "Created a reminder",
"Reminders": "Reminders"
"Reminders": "Reminders",
"Shift": "Shift",
"State": "State"
}
}

View File

@ -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"
}
}

View File

@ -21,6 +21,7 @@
"Title": "Загаловок",
"LeadPlaceholder": "Простая сделка",
"ManageFunnelStatuses": "Управление статусами воронки",
"FunnelBrowser": "Браузер воронок"
"FunnelBrowser": "Браузер воронок",
"GotoLeadApplication": "Открыть приложение Сделки"
}
}