mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-22 11:01:54 +03:00
Fix errors in Task. EditBox placeholder to IntlString. (#839)
Signed-off-by: Alexander Platov <sas_lord@mail.ru>
This commit is contained in:
parent
bc9493ae54
commit
122f57d648
@ -41,7 +41,7 @@ export const DOMAIN_CONTACT = 'contact' as Domain
|
||||
export class TChannelProvider extends TDoc implements ChannelProvider {
|
||||
label!: IntlString
|
||||
icon?: Asset
|
||||
placeholder!: string
|
||||
placeholder!: IntlString
|
||||
}
|
||||
|
||||
@Model(contact.class.TypeChannel, core.class.Type)
|
||||
@ -172,7 +172,7 @@ export function createModel (builder: Builder): void {
|
||||
{
|
||||
label: 'Phone' as IntlString,
|
||||
icon: contact.icon.Phone,
|
||||
placeholder: '+1 555 333 7777'
|
||||
placeholder: '+1 555 333 7777' as IntlString
|
||||
},
|
||||
contact.channelProvider.Phone
|
||||
)
|
||||
@ -183,7 +183,7 @@ export function createModel (builder: Builder): void {
|
||||
{
|
||||
label: 'LinkedIn' as IntlString,
|
||||
icon: contact.icon.LinkedIn,
|
||||
placeholder: 'https://linkedin.com/in/jappleseed'
|
||||
placeholder: 'https://linkedin.com/in/jappleseed' as IntlString
|
||||
},
|
||||
contact.channelProvider.LinkedIn
|
||||
)
|
||||
@ -194,7 +194,7 @@ export function createModel (builder: Builder): void {
|
||||
{
|
||||
label: 'Twitter' as IntlString,
|
||||
icon: contact.icon.Twitter,
|
||||
placeholder: '@appleseed'
|
||||
placeholder: '@appleseed' as IntlString
|
||||
},
|
||||
contact.channelProvider.Twitter
|
||||
)
|
||||
@ -205,7 +205,7 @@ export function createModel (builder: Builder): void {
|
||||
{
|
||||
label: 'GitHub' as IntlString,
|
||||
icon: contact.icon.GitHub,
|
||||
placeholder: '@appleseed'
|
||||
placeholder: '@appleseed' as IntlString
|
||||
},
|
||||
contact.channelProvider.GitHub
|
||||
)
|
||||
|
@ -32,7 +32,7 @@ function TypeSharedMessage (): Type<SharedMessage> {
|
||||
|
||||
@Model(gmail.class.Message, core.class.Doc, DOMAIN_GMAIL)
|
||||
export class TMessage extends TDoc implements Message {
|
||||
@Prop(TypeString(), 'MessageID' as IntlString)
|
||||
@Prop(TypeString(), gmail.string.MessageID)
|
||||
messageId!: string
|
||||
|
||||
@Prop(TypeString(), 'ReplyTo' as IntlString)
|
||||
@ -75,7 +75,7 @@ export function createModel (builder: Builder): void {
|
||||
{
|
||||
label: 'Gmail' as IntlString,
|
||||
icon: contact.icon.Email,
|
||||
placeholder: 'john.appleseed@apple.com',
|
||||
placeholder: 'john.appleseed@apple.com' as IntlString,
|
||||
presenter: gmail.component.Main,
|
||||
integrationType: gmail.integrationType.Gmail
|
||||
},
|
||||
@ -86,8 +86,8 @@ export function createModel (builder: Builder): void {
|
||||
setting.class.IntegrationType,
|
||||
core.space.Model,
|
||||
{
|
||||
label: 'Gmail' as IntlString,
|
||||
description: 'Use gmail integration' as IntlString,
|
||||
label: gmail.string.IntegrationLabel,
|
||||
description: gmail.string.IntegrationDescription,
|
||||
icon: gmail.component.IconGmail,
|
||||
createComponent: gmail.component.Connect,
|
||||
onDisconnect: gmail.handler.DisconnectHandler
|
||||
|
@ -23,6 +23,9 @@ import type { TxViewlet } from '@anticrm/activity'
|
||||
|
||||
export default mergeIds(gmailId, gmail, {
|
||||
string: {
|
||||
MessageID: '' as IntlString,
|
||||
IntegrationLabel: '' as IntlString,
|
||||
IntegrationDescription: '' as IntlString,
|
||||
SharedMessages: '' as IntlString
|
||||
},
|
||||
ids: {
|
||||
|
@ -36,6 +36,7 @@
|
||||
"@anticrm/model-contact": "~0.6.1",
|
||||
"@anticrm/model-attachment": "~0.6.0",
|
||||
"@anticrm/task": "~0.6.0",
|
||||
"@anticrm/task-resources": "~0.6.0",
|
||||
"@anticrm/model-chunter": "~0.6.0",
|
||||
"@anticrm/workbench": "~0.6.1",
|
||||
"@anticrm/view": "~0.6.0"
|
||||
|
@ -67,9 +67,9 @@ export const DOMAIN_TASK = 'task' as Domain
|
||||
export const DOMAIN_STATE = 'state' as Domain
|
||||
export const DOMAIN_KANBAN = 'kanban' as Domain
|
||||
@Model(task.class.State, core.class.Doc, DOMAIN_STATE, [task.interface.DocWithRank])
|
||||
@UX('State' as IntlString, task.icon.TaskState, undefined, 'rank')
|
||||
@UX(task.string.TaskState, task.icon.TaskState, undefined, 'rank')
|
||||
export class TState extends TDoc implements State {
|
||||
@Prop(TypeString(), 'Title' as IntlString)
|
||||
@Prop(TypeString(), task.string.TaskStateTitle)
|
||||
title!: string
|
||||
|
||||
color!: number
|
||||
@ -78,9 +78,9 @@ export class TState extends TDoc implements State {
|
||||
}
|
||||
|
||||
@Model(task.class.DoneState, core.class.Doc, DOMAIN_STATE, [task.interface.DocWithRank])
|
||||
@UX('Done' as IntlString, task.icon.TaskState, undefined, 'title')
|
||||
@UX(task.string.TaskStateDone, task.icon.TaskState, undefined, 'title')
|
||||
export class TDoneState extends TDoc implements DoneState {
|
||||
@Prop(TypeString(), 'Title' as IntlString)
|
||||
@Prop(TypeString(), task.string.TaskStateTitle)
|
||||
title!: string
|
||||
|
||||
declare rank: string
|
||||
@ -99,34 +99,34 @@ export class TLostState extends TDoneState implements LostState {}
|
||||
*/
|
||||
@Model(task.class.Task, core.class.AttachedDoc, DOMAIN_TASK, [task.interface.DocWithRank])
|
||||
export class TTask extends TAttachedDoc implements Task {
|
||||
@Prop(TypeRef(task.class.State), 'State' as IntlString)
|
||||
@Prop(TypeRef(task.class.State), task.string.TaskState)
|
||||
state!: Ref<State>
|
||||
|
||||
@Prop(TypeRef(task.class.DoneState), 'Done' as IntlString)
|
||||
@Prop(TypeRef(task.class.DoneState), task.string.TaskStateDone)
|
||||
doneState!: Ref<DoneState> | null
|
||||
|
||||
@Prop(TypeString(), 'No.' as IntlString)
|
||||
@Prop(TypeString(), task.string.TaskNumber)
|
||||
number!: number
|
||||
|
||||
// @Prop(TypeRef(contact.class.Employee), 'Assignee' as IntlString)
|
||||
// @Prop(TypeRef(contact.class.Employee), task.string.TaskAssignee)
|
||||
assignee!: Ref<Employee> | null
|
||||
|
||||
declare rank: string
|
||||
|
||||
@Prop(Collection(task.class.TodoItem), "Todo's" as IntlString)
|
||||
@Prop(Collection(task.class.TodoItem), task.string.Todos)
|
||||
todoItems!: number
|
||||
}
|
||||
|
||||
@Model(task.class.TodoItem, core.class.AttachedDoc, DOMAIN_TASK)
|
||||
@UX('Todo' as IntlString)
|
||||
@UX(task.string.Todo)
|
||||
export class TTodoItem extends TAttachedDoc implements TodoItem {
|
||||
@Prop(TypeString(), 'Name' as IntlString, task.icon.Task)
|
||||
@Prop(TypeString(), task.string.TodoName, task.icon.Task)
|
||||
name!: string
|
||||
|
||||
@Prop(TypeBoolean(), 'Complete' as IntlString)
|
||||
@Prop(TypeBoolean(), task.string.TaskDone)
|
||||
done!: boolean
|
||||
|
||||
@Prop(TypeDate(), 'Due date' as IntlString)
|
||||
@Prop(TypeDate(), task.string.TaskDueTo)
|
||||
dueTo?: Timestamp
|
||||
}
|
||||
|
||||
@ -134,32 +134,32 @@ export class TTodoItem extends TAttachedDoc implements TodoItem {
|
||||
export class TSpaceWithStates extends TSpace {}
|
||||
|
||||
@Model(task.class.Project, task.class.SpaceWithStates)
|
||||
@UX('Project' as IntlString, task.icon.Task)
|
||||
@UX(task.string.ProjectName, task.icon.Task)
|
||||
export class TProject extends TSpaceWithStates implements Project {}
|
||||
|
||||
@Model(task.class.Issue, task.class.Task, DOMAIN_TASK)
|
||||
@UX('Task' as IntlString, task.icon.Task, 'Task' as IntlString, 'number')
|
||||
export class TIssue extends TTask implements Issue {
|
||||
// We need to declare, to provide property with label
|
||||
@Prop(TypeRef(core.class.Doc), 'Parent' as IntlString)
|
||||
@Prop(TypeRef(core.class.Doc), task.string.TaskParent)
|
||||
declare attachedTo: Ref<Doc>
|
||||
|
||||
@Prop(TypeString(), 'Name' as IntlString)
|
||||
@Prop(TypeString(), task.string.IssueName)
|
||||
name!: string
|
||||
|
||||
@Prop(TypeString(), 'Description' as IntlString)
|
||||
@Prop(TypeString(), task.string.TaskDescription)
|
||||
description!: string
|
||||
|
||||
@Prop(Collection(chunter.class.Comment), 'Comments' as IntlString)
|
||||
@Prop(Collection(chunter.class.Comment), task.string.TaskComments)
|
||||
comments!: number
|
||||
|
||||
@Prop(Collection(attachment.class.Attachment), 'Attachments' as IntlString)
|
||||
@Prop(Collection(attachment.class.Attachment), task.string.TaskAttachments)
|
||||
attachments!: number
|
||||
|
||||
@Prop(TypeString(), 'Labels' as IntlString)
|
||||
@Prop(TypeString(), task.string.TaskLabels)
|
||||
labels!: string
|
||||
|
||||
@Prop(TypeRef(contact.class.Employee), 'Assignee' as IntlString)
|
||||
@Prop(TypeRef(contact.class.Employee), task.string.TaskAssignee)
|
||||
declare assignee: Ref<Employee> | null
|
||||
}
|
||||
|
||||
@ -182,10 +182,10 @@ export class TKanbanTemplateSpace extends TSpace implements KanbanTemplateSpace
|
||||
|
||||
@Model(task.class.StateTemplate, core.class.AttachedDoc, DOMAIN_KANBAN, [task.interface.DocWithRank])
|
||||
export class TStateTemplate extends TAttachedDoc implements StateTemplate {
|
||||
@Prop(TypeString(), 'Title' as IntlString)
|
||||
@Prop(TypeString(), task.string.StateTemplateTitle)
|
||||
title!: string
|
||||
|
||||
@Prop(TypeString(), 'Color' as IntlString)
|
||||
@Prop(TypeString(), task.string.StateTemplateColor)
|
||||
color!: number
|
||||
|
||||
declare rank: string
|
||||
@ -193,7 +193,7 @@ export class TStateTemplate extends TAttachedDoc implements StateTemplate {
|
||||
|
||||
@Model(task.class.DoneStateTemplate, core.class.AttachedDoc, DOMAIN_KANBAN, [task.interface.DocWithRank])
|
||||
export class TDoneStateTemplate extends TAttachedDoc implements DoneStateTemplate {
|
||||
@Prop(TypeString(), 'Title' as IntlString)
|
||||
@Prop(TypeString(), task.string.StateTemplateTitle)
|
||||
title!: string
|
||||
|
||||
declare rank: string
|
||||
@ -207,13 +207,13 @@ export class TLostStateTemplate extends TDoneStateTemplate implements LostStateT
|
||||
|
||||
@Model(task.class.KanbanTemplate, core.class.Doc, DOMAIN_KANBAN)
|
||||
export class TKanbanTemplate extends TDoc implements KanbanTemplate {
|
||||
@Prop(TypeString(), 'Title' as IntlString)
|
||||
@Prop(TypeString(), task.string.KanbanTemplateTitle)
|
||||
title!: string
|
||||
|
||||
@Prop(Collection(task.class.StateTemplate), 'States' as IntlString)
|
||||
@Prop(Collection(task.class.StateTemplate), task.string.States)
|
||||
statesC!: number
|
||||
|
||||
@Prop(Collection(task.class.DoneStateTemplate), 'Done States' as IntlString)
|
||||
@Prop(Collection(task.class.DoneStateTemplate), task.string.DoneStates)
|
||||
doneStatesC!: number
|
||||
}
|
||||
|
||||
@ -225,7 +225,7 @@ export class TSequence extends TDoc implements Sequence {
|
||||
|
||||
@Implements(task.interface.DocWithRank)
|
||||
export class TDocWithRank extends TDoc {
|
||||
@Prop(TypeString(), 'Rank' as IntlString)
|
||||
@Prop(TypeString(), task.string.Rank)
|
||||
@Hidden()
|
||||
rank!: string
|
||||
}
|
||||
@ -263,7 +263,7 @@ export function createModel (builder: Builder): void {
|
||||
view.class.ViewletDescriptor,
|
||||
core.space.Model,
|
||||
{
|
||||
label: 'Status' as IntlString,
|
||||
label: task.string.States,
|
||||
icon: task.icon.ManageStatuses,
|
||||
component: task.component.StatusTableView
|
||||
},
|
||||
@ -375,7 +375,7 @@ export function createModel (builder: Builder): void {
|
||||
view.class.Action,
|
||||
core.space.Model,
|
||||
{
|
||||
label: 'Create task' as IntlString,
|
||||
label: task.string.CreateTask,
|
||||
icon: task.icon.Task,
|
||||
action: task.actionImpl.CreateTask
|
||||
},
|
||||
@ -386,7 +386,7 @@ export function createModel (builder: Builder): void {
|
||||
view.class.Action,
|
||||
core.space.Model,
|
||||
{
|
||||
label: 'Edit Statuses' as IntlString,
|
||||
label: task.string.EditStates,
|
||||
icon: view.icon.Statuses,
|
||||
action: task.actionImpl.EditStatuses
|
||||
},
|
||||
@ -397,7 +397,7 @@ export function createModel (builder: Builder): void {
|
||||
view.class.Action,
|
||||
core.space.Model,
|
||||
{
|
||||
label: 'Archive' as IntlString,
|
||||
label: task.string.Archive,
|
||||
icon: view.icon.Archive,
|
||||
action: task.actionImpl.ArchiveSpace
|
||||
},
|
||||
@ -408,7 +408,7 @@ export function createModel (builder: Builder): void {
|
||||
view.class.Action,
|
||||
core.space.Model,
|
||||
{
|
||||
label: 'Unarchive' as IntlString,
|
||||
label: task.string.Unarchive,
|
||||
icon: view.icon.Archive,
|
||||
action: task.actionImpl.UnarchiveSpace
|
||||
},
|
||||
@ -451,7 +451,7 @@ export function createModel (builder: Builder): void {
|
||||
view.class.ViewletDescriptor,
|
||||
core.space.Model,
|
||||
{
|
||||
label: 'Kanban' as IntlString,
|
||||
label: task.string.Kanban,
|
||||
icon: task.icon.Kanban,
|
||||
component: task.component.KanbanView
|
||||
},
|
||||
@ -487,7 +487,7 @@ export function createModel (builder: Builder): void {
|
||||
view.class.Action,
|
||||
core.space.Model,
|
||||
{
|
||||
label: 'Mark as done' as IntlString,
|
||||
label: task.string.MarkAsDone,
|
||||
icon: task.icon.TodoCheck,
|
||||
action: task.actionImpl.TodoItemMarkDone
|
||||
},
|
||||
@ -498,7 +498,7 @@ export function createModel (builder: Builder): void {
|
||||
view.class.Action,
|
||||
core.space.Model,
|
||||
{
|
||||
label: 'Mark as undone' as IntlString,
|
||||
label: task.string.MarkAsUndone,
|
||||
icon: task.icon.TodoUnCheck,
|
||||
action: task.actionImpl.TodoItemMarkUnDone
|
||||
},
|
||||
|
@ -17,7 +17,8 @@
|
||||
import type { Doc, Ref, Space } from '@anticrm/core'
|
||||
import type { IntlString, Resource } from '@anticrm/platform'
|
||||
import { mergeIds } from '@anticrm/platform'
|
||||
import task, { KanbanTemplate, taskId } from '@anticrm/task'
|
||||
import { KanbanTemplate, taskId } from '@anticrm/task'
|
||||
import task from '@anticrm/task-resources/src/plugin'
|
||||
import type { AnyComponent } from '@anticrm/ui'
|
||||
import { Application } from '@anticrm/workbench'
|
||||
import type { Action } from '@anticrm/view'
|
||||
@ -60,10 +61,31 @@ export default mergeIds(taskId, task, {
|
||||
TaskHeader: '' as AnyComponent
|
||||
},
|
||||
string: {
|
||||
TaskState: '' as IntlString,
|
||||
TaskStateTitle: '' as IntlString,
|
||||
TaskStateDone: '' as IntlString,
|
||||
TaskNumber: '' as IntlString,
|
||||
Todo: '' as IntlString,
|
||||
TaskDone: '' as IntlString,
|
||||
TaskDueTo: '' as IntlString,
|
||||
Task: '' as IntlString,
|
||||
TaskParent: '' as IntlString,
|
||||
IssueName: '' as IntlString,
|
||||
TaskComments: '' as IntlString,
|
||||
TaskAttachments: '' as IntlString,
|
||||
TaskLabels: '' as IntlString,
|
||||
StateTemplateTitle: '' as IntlString,
|
||||
StateTemplateColor: '' as IntlString,
|
||||
KanbanTemplateTitle: '' as IntlString,
|
||||
Rank: '' as IntlString,
|
||||
EditStates: '' as IntlString,
|
||||
Archive: '' as IntlString,
|
||||
Unarchive: '' as IntlString,
|
||||
MarkAsDone: '' as IntlString,
|
||||
MarkAsUndone: '' as IntlString,
|
||||
Kanban: '' as IntlString,
|
||||
ApplicationLabelTask: '' as IntlString,
|
||||
Projects: '' as IntlString,
|
||||
CreateProject: '' as IntlString
|
||||
Projects: '' as IntlString
|
||||
},
|
||||
space: {
|
||||
TasksPublic: '' as Ref<Space>
|
||||
|
@ -60,7 +60,7 @@ export function createModel (builder: Builder): void {
|
||||
{
|
||||
label: 'Telegram' as IntlString,
|
||||
icon: contact.icon.Telegram,
|
||||
placeholder: '@appleseed',
|
||||
placeholder: '@appleseed' as IntlString,
|
||||
presenter: telegram.component.Chat,
|
||||
integrationType: telegram.integrationType.Telegram
|
||||
},
|
||||
|
@ -330,6 +330,7 @@ a.no-line {
|
||||
user-select: none;
|
||||
}
|
||||
.fs-bold { font-weight: 500; }
|
||||
.uppercase { text-transform: uppercase; }
|
||||
|
||||
.over-underline {
|
||||
cursor: pointer;
|
||||
|
@ -1,5 +1,6 @@
|
||||
{
|
||||
"string": {
|
||||
"EditBoxPlaceholder": "placeholder",
|
||||
"Cancel": "Cancel",
|
||||
"Minutes": "{minutes, plural, =0 {less than a minute ago} =1 {a minute ago} other {# minutes ago}}",
|
||||
"Hours": "{hours, plural, =0 {less than an hour ago} =1 {an hour ago} other {# hours ago}}",
|
||||
|
@ -16,15 +16,17 @@
|
||||
<script lang="ts">
|
||||
import { createEventDispatcher, onMount, afterUpdate } from 'svelte'
|
||||
import type { IntlString, Asset } from '@anticrm/platform'
|
||||
import { translate } from '@anticrm/platform'
|
||||
import type { AnySvelteComponent } from '../types'
|
||||
import Label from './Label.svelte'
|
||||
import Icon from './Icon.svelte'
|
||||
import plugin from '../plugin'
|
||||
|
||||
export let label: IntlString | undefined = undefined
|
||||
export let icon: Asset | AnySvelteComponent | undefined = undefined
|
||||
export let maxWidth: string | undefined
|
||||
export let value: string | undefined
|
||||
export let placeholder: string = 'placeholder'
|
||||
export let placeholder: IntlString = plugin.string.EditBoxPlaceholder
|
||||
export let password: boolean = false
|
||||
export let focus: boolean = false
|
||||
|
||||
@ -33,13 +35,15 @@
|
||||
let text: HTMLElement
|
||||
let input: HTMLInputElement
|
||||
let style: string
|
||||
let phTraslate: string = ''
|
||||
|
||||
$: style = maxWidth ? `max-width: ${maxWidth};` : ''
|
||||
$: translate(placeholder, {}).then(res => { phTraslate = res })
|
||||
|
||||
function computeSize (t: EventTarget | null) {
|
||||
function computeSize (t: HTMLInputElement | EventTarget | null) {
|
||||
const target = t as HTMLInputElement
|
||||
const value = target.value
|
||||
text.innerHTML = (value === '' ? placeholder : value).replaceAll(' ', ' ')
|
||||
text.innerHTML = (value === '' ? phTraslate : value).replaceAll(' ', ' ')
|
||||
target.style.width = text.clientWidth + 'px'
|
||||
dispatch('input')
|
||||
}
|
||||
@ -55,8 +59,6 @@
|
||||
afterUpdate(() => {
|
||||
computeSize(input)
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<div class="container" on:click={() => { input.focus() }}>
|
||||
@ -70,9 +72,9 @@
|
||||
{/if}
|
||||
<div class="wrap">
|
||||
{#if password}
|
||||
<input bind:this={input} type="password" bind:value {placeholder} {style} on:input={(ev) => ev.target && computeSize(ev.target)} on:change/>
|
||||
<input bind:this={input} type="password" bind:value placeholder={phTraslate} {style} on:input={(ev) => ev.target && computeSize(ev.target)} on:change/>
|
||||
{:else}
|
||||
<input bind:this={input} type="text" bind:value {placeholder} {style} on:input={(ev) => ev.target && computeSize(ev.target)} on:change/>
|
||||
<input bind:this={input} type="text" bind:value placeholder={phTraslate} {style} on:input={(ev) => ev.target && computeSize(ev.target)} on:change/>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
@ -119,6 +121,7 @@
|
||||
input {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
min-width: 0;
|
||||
color: var(--theme-caption-color);
|
||||
border: none;
|
||||
border-radius: 2px;
|
||||
|
@ -14,7 +14,6 @@
|
||||
-->
|
||||
|
||||
<script lang="ts">
|
||||
import type { Asset, IntlString } from '@anticrm/platform'
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
import Label from '../Label.svelte'
|
||||
|
||||
|
@ -24,6 +24,7 @@ export const uiId = 'ui' as Plugin
|
||||
|
||||
export default plugin(uiId, {
|
||||
string: {
|
||||
EditBoxPlaceholder: '' as IntlString,
|
||||
Cancel: '' as IntlString,
|
||||
Minutes: '' as IntlString,
|
||||
Hours: '' as IntlString,
|
||||
|
@ -6,6 +6,7 @@
|
||||
"Channels": "Channels",
|
||||
"CreateChannel": "New Channel",
|
||||
"ChannelName": "Name",
|
||||
"ChannelNamePlaceholder": "Channel",
|
||||
"ChannelDescription": "Description",
|
||||
"MakePrivate": "Make private",
|
||||
"MakePrivateDescription": "Only members can see it",
|
||||
|
@ -49,7 +49,14 @@
|
||||
on:close={() => { dispatch('close') }}
|
||||
>
|
||||
<Grid column={1} rowGap={1.5}>
|
||||
<EditBox label={chunter.string.ChannelName} icon={IconFolder} bind:value={name} placeholder={'Channel'} maxWidth={'16rem'} focus/>
|
||||
<EditBox
|
||||
label={chunter.string.ChannelName}
|
||||
icon={IconFolder}
|
||||
bind:value={name}
|
||||
placeholder={chunter.string.ChannelNamePlaceholder}
|
||||
maxWidth={'16rem'}
|
||||
focus
|
||||
/>
|
||||
<ToggleWithLabel label={chunter.string.MakePrivate} description={chunter.string.MakePrivateDescription}/>
|
||||
</Grid>
|
||||
</SpaceCreateCard>
|
||||
|
@ -33,6 +33,7 @@ export default mergeIds(chunterId, chunter, {
|
||||
Channels: '' as IntlString,
|
||||
CreateChannel: '' as IntlString,
|
||||
ChannelName: '' as IntlString,
|
||||
ChannelNamePlaceholder: '' as IntlString,
|
||||
ChannelDescription: '' as IntlString,
|
||||
MakePrivate: '' as IntlString,
|
||||
MakePrivateDescription: '' as IntlString
|
||||
|
@ -7,6 +7,12 @@
|
||||
"CreatePerson": "Create person",
|
||||
"CreatePersons": "Create persons folder",
|
||||
"CreateOrganization": "Create organization",
|
||||
"OrganizationNamePlaceholder": "Apple",
|
||||
"OrganizationsNamePlaceholder": "Organizations",
|
||||
"PersonFirstNamePlaceholder": "John",
|
||||
"PersonLastNamePlaceholder": "Appleseed",
|
||||
"PersonLocationPlaceholder": "Location",
|
||||
"PersonsNamePlaceholder": "Folder",
|
||||
"CreateOrganizations": "Create organizations folder",
|
||||
"Name": "Name",
|
||||
"SelectFolder": "Select folder",
|
||||
|
@ -57,7 +57,9 @@
|
||||
<Company size={'large'} />
|
||||
</div>
|
||||
<div class="flex-col">
|
||||
<div class="fs-title"><EditBox placeholder="Apple" maxWidth="11rem" bind:value={object.name} /></div>
|
||||
<div class="fs-title">
|
||||
<EditBox placeholder={contact.string.OrganizationNamePlaceholder} maxWidth="11rem" bind:value={object.name} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -51,7 +51,14 @@
|
||||
}}
|
||||
>
|
||||
<Grid column={1} rowGap={1.5}>
|
||||
<EditBox label={contact.string.Name} icon={IconFolder} bind:value={name} placeholder="Organizations" maxWidth={'16rem'} focus />
|
||||
<EditBox
|
||||
label={contact.string.Name}
|
||||
icon={IconFolder}
|
||||
bind:value={name}
|
||||
placeholder={contact.string.OrganizationsNamePlaceholder}
|
||||
maxWidth={'16rem'}
|
||||
focus
|
||||
/>
|
||||
<ToggleWithLabel label={contact.string.MakePrivate} description={contact.string.MakePrivateDescription} />
|
||||
</Grid>
|
||||
</SpaceCreateCard>
|
||||
|
@ -80,9 +80,9 @@
|
||||
<EditableAvatar avatar={object.avatar} size={'large'} on:done={onAvatarDone} />
|
||||
</div>
|
||||
<div class="flex-col">
|
||||
<div class="fs-title"><EditBox placeholder="John" maxWidth="12rem" bind:value={firstName} /></div>
|
||||
<div class="fs-title mb-1"><EditBox placeholder="Appleseed" maxWidth="12rem" bind:value={lastName} /></div>
|
||||
<div class="small-text"><EditBox placeholder="Location" maxWidth="12rem" bind:value={object.city} /></div>
|
||||
<div class="fs-title"><EditBox placeholder={contact.string.PersonFirstNamePlaceholder} maxWidth="12rem" bind:value={firstName} /></div>
|
||||
<div class="fs-title mb-1"><EditBox placeholder={contact.string.PersonLastNamePlaceholder} maxWidth="12rem" bind:value={lastName} /></div>
|
||||
<div class="small-text"><EditBox placeholder={contact.string.PersonLocationPlaceholder} maxWidth="12rem" bind:value={object.city} /></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -51,7 +51,14 @@
|
||||
}}
|
||||
>
|
||||
<Grid column={1} rowGap={1.5}>
|
||||
<EditBox label={contact.string.Name} icon={IconFolder} bind:value={name} placeholder="Folder" maxWidth={'16rem'} focus />
|
||||
<EditBox
|
||||
label={contact.string.Name}
|
||||
icon={IconFolder}
|
||||
bind:value={name}
|
||||
placeholder={contact.string.PersonsNamePlaceholder}
|
||||
maxWidth={'16rem'}
|
||||
focus
|
||||
/>
|
||||
<ToggleWithLabel label={contact.string.MakePrivate} description={contact.string.MakePrivateDescription} />
|
||||
</Grid>
|
||||
</SpaceCreateCard>
|
||||
|
@ -60,7 +60,7 @@
|
||||
</div>
|
||||
<div class="flex-grow flex-col">
|
||||
<div class="name">
|
||||
<EditBox placeholder="John" maxWidth="20rem" bind:value={object.name} on:change={nameChange} />
|
||||
<EditBox placeholder={contact.string.PersonFirstNamePlaceholder} maxWidth="20rem" bind:value={object.name} on:change={nameChange} />
|
||||
</div>
|
||||
<div class="flex-between channels">
|
||||
<div class="flex-row-center">
|
||||
|
@ -87,10 +87,10 @@
|
||||
<div class="flex-grow flex-col">
|
||||
<div class="flex-grow flex-col">
|
||||
<div class="name">
|
||||
<EditBox placeholder="John" maxWidth="20rem" bind:value={firstName} on:change={firstNameChange} />
|
||||
<EditBox placeholder={contact.string.PersonFirstNamePlaceholder} maxWidth="20rem" bind:value={firstName} on:change={firstNameChange} />
|
||||
</div>
|
||||
<div class="name">
|
||||
<EditBox placeholder="Appleseed" maxWidth="20rem" bind:value={lastName} on:change={lastNameChange} />
|
||||
<EditBox placeholder={contact.string.PersonLastNamePlaceholder} maxWidth="20rem" bind:value={lastName} on:change={lastNameChange} />
|
||||
</div>
|
||||
<div class="location">
|
||||
<AttributeEditor maxWidth="20rem" _class={contact.class.Person} {object} key="city" />
|
||||
|
@ -25,6 +25,12 @@ export default mergeIds(contactId, contact, {
|
||||
CreatePerson: '' as IntlString,
|
||||
CreatePersons: '' as IntlString,
|
||||
CreateOrganization: '' as IntlString,
|
||||
OrganizationNamePlaceholder: '' as IntlString,
|
||||
OrganizationsNamePlaceholder: '' as IntlString,
|
||||
PersonFirstNamePlaceholder: '' as IntlString,
|
||||
PersonLastNamePlaceholder: '' as IntlString,
|
||||
PersonLocationPlaceholder: '' as IntlString,
|
||||
PersonsNamePlaceholder: '' as IntlString,
|
||||
CreateOrganizations: '' as IntlString,
|
||||
Organizations: '' as IntlString,
|
||||
SelectFolder: '' as IntlString,
|
||||
|
@ -13,7 +13,7 @@
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
import { plugin } from '@anticrm/platform'
|
||||
import { IntlString, plugin } from '@anticrm/platform'
|
||||
import type { Plugin, Asset } from '@anticrm/platform'
|
||||
import type { Doc, Ref, Class, UXObject, Space, Account } from '@anticrm/core'
|
||||
import type { AnyComponent } from '@anticrm/ui'
|
||||
@ -32,7 +32,7 @@ export interface Persons extends Space {}
|
||||
* @public
|
||||
*/
|
||||
export interface ChannelProvider extends Doc, UXObject {
|
||||
placeholder: string
|
||||
placeholder: IntlString
|
||||
presenter?: AnyComponent
|
||||
integrationType?: Ref<Doc>
|
||||
}
|
||||
|
@ -1,5 +1,8 @@
|
||||
{
|
||||
"string": {
|
||||
"MessageID": "MessageID",
|
||||
"IntegrationLabel": "Gmail",
|
||||
"IntegrationDescription": "Use gmail integration",
|
||||
"SharedMessages": "shared emails",
|
||||
"To": "To:",
|
||||
"From": "From:",
|
||||
@ -16,6 +19,8 @@
|
||||
"Subject": "Subject",
|
||||
"Send": "Send",
|
||||
"NewMessageTo": "New message to",
|
||||
"Cancel": "Cancel"
|
||||
"Cancel": "Cancel",
|
||||
"SubjectPlaceholder": "Message subject",
|
||||
"CopyPlaceholder": "Copy to"
|
||||
}
|
||||
}
|
@ -23,7 +23,7 @@
|
||||
import { IconArrowLeft, Label } from '@anticrm/ui'
|
||||
import { Contact, formatName } from '@anticrm/contact'
|
||||
import { TextEditor } from '@anticrm/text-editor'
|
||||
import gmail from '../plugin'
|
||||
import plugin from '../plugin'
|
||||
|
||||
export let object: Contact
|
||||
export let contact: string
|
||||
@ -71,20 +71,30 @@
|
||||
<div class="flex-grow flex-col">
|
||||
<div class="fs-title">Gmail</div>
|
||||
<div class="small-text content-dark-color overflow-label">
|
||||
<Label label={gmail.string.NewMessageTo} />
|
||||
<Label label={plugin.string.NewMessageTo} />
|
||||
<span class="content-accent-color">{formatName(object.name)} ({contact})</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mr-3">
|
||||
<Button label={gmail.string.Send} size={'small'} primary on:click={sendMsg} />
|
||||
<Button label={plugin.string.Send} size={'small'} primary on:click={sendMsg} />
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-col clear-mins right-content">
|
||||
<div class="mb-2">
|
||||
<EditBox label={gmail.string.Subject} bind:value={obj.subject} placeholder={'Message subject'} maxWidth={'min-content'} />
|
||||
<EditBox
|
||||
label={plugin.string.Subject}
|
||||
bind:value={obj.subject}
|
||||
placeholder={plugin.string.SubjectPlaceholder}
|
||||
maxWidth={'min-content'}
|
||||
/>
|
||||
</div>
|
||||
<div class="mb-4">
|
||||
<EditBox label={gmail.string.Copy} bind:value={copy} placeholder={'Copy to'} maxWidth={'min-content'} />
|
||||
<EditBox
|
||||
label={plugin.string.Copy}
|
||||
bind:value={copy}
|
||||
placeholder={plugin.string.CopyPlaceholder}
|
||||
maxWidth={'min-content'}
|
||||
/>
|
||||
</div>
|
||||
<div class="input clear-mins">
|
||||
<TextEditor bind:this={editor} bind:content={obj.content} on:blur={editor.submit} />
|
||||
|
@ -35,6 +35,8 @@ export default mergeIds(gmailId, gmail, {
|
||||
Subject: '' as IntlString,
|
||||
Send: '' as IntlString,
|
||||
NewMessageTo: '' as IntlString,
|
||||
Cancel: '' as IntlString
|
||||
Cancel: '' as IntlString,
|
||||
SubjectPlaceholder: '' as IntlString,
|
||||
CopyPlaceholder: '' as IntlString
|
||||
}
|
||||
})
|
||||
|
@ -18,6 +18,9 @@
|
||||
"Saving": "Saving...",
|
||||
"Saved": "Saved",
|
||||
"Add": "Add",
|
||||
"LearnMore": "Learn more"
|
||||
"LearnMore": "Learn more",
|
||||
"EnterCurrentPassword": "Enter current password",
|
||||
"EnterNewPassword": "Enter new password",
|
||||
"RepeatNewPassword": "Repeat new password"
|
||||
}
|
||||
}
|
@ -44,6 +44,7 @@
|
||||
"@anticrm/login-resources": "~0.6.2",
|
||||
"@anticrm/task": "~0.6.0",
|
||||
"@anticrm/task-resources": "~0.6.0",
|
||||
"@anticrm/workbench": "~0.6.1"
|
||||
"@anticrm/workbench": "~0.6.1",
|
||||
"@anticrm/contact-resources": "~0.6.0"
|
||||
}
|
||||
}
|
||||
|
@ -51,7 +51,7 @@
|
||||
<div>
|
||||
<EditBox
|
||||
password
|
||||
placeholder="Enter current password"
|
||||
placeholder={setting.string.EnterCurrentPassword}
|
||||
label={setting.string.CurrentPassword}
|
||||
maxWidth="20rem"
|
||||
bind:value={oldPassword}
|
||||
@ -60,7 +60,7 @@
|
||||
<div class="mt-6">
|
||||
<EditBox
|
||||
password
|
||||
placeholder="Enter new password"
|
||||
placeholder={setting.string.EnterNewPassword}
|
||||
label={setting.string.NewPassword}
|
||||
maxWidth="20rem"
|
||||
bind:value={password}
|
||||
@ -69,7 +69,7 @@
|
||||
<div class="mt-6">
|
||||
<EditBox
|
||||
password
|
||||
placeholder="Repeat new password"
|
||||
placeholder={setting.string.RepeatNewPassword}
|
||||
label={setting.string.NewPassword}
|
||||
maxWidth="20rem"
|
||||
bind:value={password2}
|
||||
|
@ -24,6 +24,7 @@
|
||||
import setting from '@anticrm/setting'
|
||||
import { CircleButton, EditBox, Icon, IconAdd, Label, showPopup } from '@anticrm/ui'
|
||||
import contact, { Employee, EmployeeAccount, getFirstName, getLastName } from '@anticrm/contact'
|
||||
import contactRes from '@anticrm/contact-resources/src/plugin'
|
||||
import { getCurrentAccount, Ref } from '@anticrm/core'
|
||||
import { getResource } from '@anticrm/platform'
|
||||
import attachment from '@anticrm/attachment'
|
||||
@ -101,7 +102,7 @@
|
||||
<div class="flex-col">
|
||||
<div class="name">
|
||||
<EditBox
|
||||
placeholder="John"
|
||||
placeholder={contactRes.string.PersonFirstNamePlaceholder}
|
||||
maxWidth="20rem"
|
||||
bind:value={firstName}
|
||||
on:change={() => {
|
||||
@ -111,7 +112,7 @@
|
||||
</div>
|
||||
<div class="name">
|
||||
<EditBox
|
||||
placeholder="Appleseed"
|
||||
placeholder={contactRes.string.PersonLastNamePlaceholder}
|
||||
maxWidth="20rem"
|
||||
bind:value={lastName}
|
||||
on:change={() => {
|
||||
|
@ -84,7 +84,10 @@ export default plugin(settingId, {
|
||||
NewPassword: '' as IntlString,
|
||||
Save: '' as IntlString,
|
||||
Saving: '' as IntlString,
|
||||
Saved: '' as IntlString
|
||||
Saved: '' as IntlString,
|
||||
EnterCurrentPassword: '' as IntlString,
|
||||
EnterNewPassword: '' as IntlString,
|
||||
RepeatNewPassword: '' as IntlString
|
||||
},
|
||||
icon: {
|
||||
EditProfile: '' as Asset,
|
||||
|
@ -1,18 +1,47 @@
|
||||
{
|
||||
"string": {
|
||||
"TaskState": "State",
|
||||
"TaskStateTitle": "Title",
|
||||
"TaskStateDone": "Done",
|
||||
"TaskNumber": "No.",
|
||||
"Todos": "Todo's",
|
||||
"Todo": "Todo",
|
||||
"TaskDone": "Complete",
|
||||
"TaskDueTo": "Due date",
|
||||
"ProjectName": "Project",
|
||||
"Task": "Task",
|
||||
"TaskParent": "Parent",
|
||||
"IssueName": "Name",
|
||||
"TaskDescription": "Description",
|
||||
"TaskComments": "Comments",
|
||||
"TaskAttachments": "Attachments",
|
||||
"TaskLabels": "Labels",
|
||||
"TaskAssignee": "Assignee",
|
||||
"StateTemplateTitle": "Title",
|
||||
"StateTemplateColor": "Color",
|
||||
"KanbanTemplateTitle": "Title",
|
||||
"Rank": "Rank",
|
||||
"CreateTask": "Create task",
|
||||
"EditStates": "Edit states",
|
||||
"Archive": "Archive",
|
||||
"Unarchive": "Unarchive",
|
||||
"MarkAsDone": "Mark as done",
|
||||
"MarkAsUndone": "Mark as undone",
|
||||
"Kanban": "Kanban",
|
||||
|
||||
"ApplicationLabelTask": "Tasks",
|
||||
"Projects": "Projects",
|
||||
"CreateProject": "New Project",
|
||||
"ProjectName": "Project",
|
||||
"ProjectNamePlaceholder": "Project name",
|
||||
"TaskNamePlaceholder": "The boring task",
|
||||
"TaskDescriptionPlaceholder": "Description",
|
||||
"TodoDescriptionPlaceholder": "todo...",
|
||||
"MakePrivate": "Make Private",
|
||||
"MakePrivateDescription": "Only members can see it",
|
||||
"CreateTask": "Create task",
|
||||
"TaskProject": "selected project",
|
||||
"SelectProject": "Select project",
|
||||
"Task": "Task",
|
||||
"TaskName": "Task name *",
|
||||
"TaskAssignee": "Assignee",
|
||||
"TaskDescription": "Description",
|
||||
"AssignThisTask": "Assign this task",
|
||||
"AssigneeRequired": "Assignee is required",
|
||||
"More": "Options",
|
||||
"TaskUnAssign": "Unassign",
|
||||
@ -27,6 +56,13 @@
|
||||
"TodoDescription": "To do description *",
|
||||
"TodoEdit": "Edit To Do",
|
||||
"TodoSave": "Save",
|
||||
"TodoCreate": "Create To Do"
|
||||
"TodoCreate": "Create To Do",
|
||||
"ActiveStates": "Active statuses",
|
||||
"DoneStatesWon": "Done status / Won",
|
||||
"DoneStatesLost": "Done status / Lost",
|
||||
"AllStates": "All states",
|
||||
"DoneStates": "Done states",
|
||||
"States": "States",
|
||||
"ChooseAColor": "Choose a color"
|
||||
}
|
||||
}
|
@ -9,7 +9,8 @@
|
||||
"build:docs": "api-extractor run --local",
|
||||
"lint": "svelte-check && eslint",
|
||||
"lint:fix": "eslint --fix src",
|
||||
"format": "prettier --write --plugin-search-dir=. src && eslint --fix src"
|
||||
"format": "prettier --write --plugin-search-dir=. src && eslint --fix src",
|
||||
"svelte-check": "svelte-check"
|
||||
},
|
||||
"devDependencies": {
|
||||
"svelte-loader": "^3.1.2",
|
||||
|
@ -17,9 +17,9 @@
|
||||
import { getClient, SpaceCreateCard } from '@anticrm/presentation'
|
||||
import { EditBox, Grid, IconFolder, ToggleWithLabel } from '@anticrm/ui'
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
import task from '../plugin'
|
||||
import { createKanban, KanbanTemplate } from '@anticrm/task'
|
||||
import task, { createKanban, KanbanTemplate } from '@anticrm/task'
|
||||
import KanbanTemplateSelector from './kanban/KanbanTemplateSelector.svelte'
|
||||
import plugin from '../plugin'
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
|
||||
@ -55,7 +55,7 @@
|
||||
</script>
|
||||
|
||||
<SpaceCreateCard
|
||||
label={task.string.CreateProject}
|
||||
label={plugin.string.CreateProject}
|
||||
okAction={createProject}
|
||||
canSave={name.length > 0}
|
||||
on:close={() => {
|
||||
@ -63,8 +63,8 @@
|
||||
}}
|
||||
>
|
||||
<Grid column={1} rowGap={1.5}>
|
||||
<EditBox label={task.string.ProjectName} icon={IconFolder} bind:value={name} placeholder={'Project name'} maxWidth={'16rem'} focus />
|
||||
<ToggleWithLabel label={task.string.MakePrivate} description={task.string.MakePrivateDescription} />
|
||||
<EditBox label={plugin.string.ProjectName} icon={IconFolder} bind:value={name} placeholder={plugin.string.ProjectNamePlaceholder} maxWidth={'16rem'} focus />
|
||||
<ToggleWithLabel label={plugin.string.MakePrivate} description={plugin.string.MakePrivateDescription} />
|
||||
<KanbanTemplateSelector folders={[task.space.ProjectTemplates]} bind:template={templateId}/>
|
||||
</Grid>
|
||||
</SpaceCreateCard>
|
||||
|
@ -18,10 +18,10 @@
|
||||
import { generateId } from '@anticrm/core'
|
||||
import { OK, Status } from '@anticrm/platform'
|
||||
import { Card, getClient, UserBox } from '@anticrm/presentation'
|
||||
import { calcRank, Issue, State } from '@anticrm/task'
|
||||
import task, { calcRank, Issue, State } from '@anticrm/task'
|
||||
import { EditBox, Grid, Status as StatusControl } from '@anticrm/ui'
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
import task from '../plugin'
|
||||
import plugin from '../plugin'
|
||||
|
||||
export let space: Ref<Space>
|
||||
export let parent: Pick<Doc, '_id' | '_class'> | undefined
|
||||
@ -95,12 +95,12 @@
|
||||
</script>
|
||||
|
||||
<Card
|
||||
label={task.string.CreateTask}
|
||||
label={plugin.string.CreateTask}
|
||||
okAction={createTask}
|
||||
canSave={object.name.length > 0 && _space != null}
|
||||
spaceClass={task.class.Project}
|
||||
spaceLabel={task.string.ProjectName}
|
||||
spacePlaceholder={task.string.SelectProject}
|
||||
spaceLabel={plugin.string.ProjectName}
|
||||
spacePlaceholder={plugin.string.SelectProject}
|
||||
bind:space={_space}
|
||||
on:close={() => {
|
||||
dispatch('close')
|
||||
@ -109,20 +109,20 @@
|
||||
<StatusControl slot="error" {status} />
|
||||
<Grid column={1} rowGap={1.5}>
|
||||
<EditBox
|
||||
label={task.string.TaskName}
|
||||
label={plugin.string.TaskName}
|
||||
bind:value={object.name}
|
||||
icon={task.icon.Task}
|
||||
placeholder="The boring task"
|
||||
placeholder={plugin.string.TaskNamePlaceholder}
|
||||
maxWidth={'16rem'}
|
||||
focus
|
||||
/>
|
||||
<UserBox
|
||||
_class={contact.class.Employee}
|
||||
title="Assignee *"
|
||||
caption="Assign this task"
|
||||
title={plugin.string.TaskAssignee}
|
||||
caption={plugin.string.AssignThisTask}
|
||||
bind:value={assignee}
|
||||
allowDeselect
|
||||
titleDeselect={task.string.TaskUnAssign}
|
||||
titleDeselect={plugin.string.TaskUnAssign}
|
||||
/>
|
||||
</Grid>
|
||||
</Card>
|
||||
|
@ -16,9 +16,10 @@
|
||||
<script lang="ts">
|
||||
import { getClient } from '@anticrm/presentation'
|
||||
import type { Issue } from '@anticrm/task'
|
||||
import task from '@anticrm/task'
|
||||
import { EditBox, Grid } from '@anticrm/ui'
|
||||
import { createEventDispatcher, onMount } from 'svelte'
|
||||
import task from '../plugin'
|
||||
import plugin from '../plugin'
|
||||
|
||||
export let object: Issue
|
||||
|
||||
@ -45,21 +46,21 @@
|
||||
{#if object !== undefined}
|
||||
<Grid column={1} rowGap={1.5}>
|
||||
<EditBox
|
||||
label={task.string.TaskName}
|
||||
label={plugin.string.TaskName}
|
||||
bind:value={object.name}
|
||||
icon={task.icon.Task}
|
||||
placeholder="The boring task"
|
||||
placeholder={plugin.string.TaskNamePlaceholder}
|
||||
maxWidth="39rem"
|
||||
focus
|
||||
on:change={(evt) => change('name', object.name)}
|
||||
on:change={() => change('name', object.name)}
|
||||
/>
|
||||
<EditBox
|
||||
label={task.string.TaskDescription}
|
||||
label={plugin.string.TaskDescription}
|
||||
bind:value={object.description}
|
||||
icon={task.icon.Task}
|
||||
placeholder="Description"
|
||||
placeholder={plugin.string.TaskDescriptionPlaceholder}
|
||||
maxWidth="39rem"
|
||||
on:change={(evt) => change('description', object.description)}
|
||||
on:change={() => change('description', object.description)}
|
||||
/>
|
||||
</Grid>
|
||||
{/if}
|
||||
|
@ -15,11 +15,10 @@
|
||||
<script lang="ts">
|
||||
import { CommentsPresenter } from '@anticrm/chunter-resources'
|
||||
import { AttachmentsPresenter } from '@anticrm/attachment-resources'
|
||||
import { formatName } from '@anticrm/contact'
|
||||
import type { WithLookup } from '@anticrm/core'
|
||||
import { Avatar } from '@anticrm/presentation'
|
||||
import type { Issue } from '@anticrm/task'
|
||||
import { ActionIcon, IconMoreH, Label, showPopup } from '@anticrm/ui'
|
||||
import { ActionIcon, IconMoreH, showPopup } from '@anticrm/ui'
|
||||
import { ContextMenu } from '@anticrm/view-resources'
|
||||
import task from '../plugin'
|
||||
import TaskPresenter from './TaskPresenter.svelte'
|
||||
@ -28,7 +27,7 @@
|
||||
export let draggable: boolean
|
||||
|
||||
const showMenu = (ev?: Event): void => {
|
||||
showPopup(ContextMenu, { object }, (ev as MouseEvent).target as HTMLElement)
|
||||
showPopup(ContextMenu, { object }, ev ? ev.target as HTMLElement : null)
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -48,8 +47,9 @@
|
||||
<div class="step-lr75"><CommentsPresenter value={object} /></div>
|
||||
{/if}
|
||||
</div>
|
||||
{#if object.$lookup?.assignee}
|
||||
<Avatar avatar={object.$lookup?.assignee?.avatar} size={'x-small'} />
|
||||
{#if object.$lookup}
|
||||
<!-- object.$lookup?.assignee?.avatar -->
|
||||
<Avatar avatar={undefined} size={'x-small'} />
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -23,6 +23,7 @@
|
||||
import Lost from './icons/Lost.svelte'
|
||||
import Won from './icons/Won.svelte'
|
||||
import StatesBar from './state/StatesBar.svelte'
|
||||
import plugin from '../plugin'
|
||||
|
||||
export let _class: Ref<Class<Task>>
|
||||
export let space: Ref<SpaceWithStates>
|
||||
@ -101,7 +102,7 @@
|
||||
updateQuery()
|
||||
}}
|
||||
>
|
||||
<Label label={'All statuses'} />
|
||||
<Label label={plugin.string.AllStates} />
|
||||
</div>
|
||||
<div
|
||||
class="button flex-center ml-3"
|
||||
@ -113,7 +114,7 @@
|
||||
updateQuery()
|
||||
}}
|
||||
>
|
||||
<Label label={'Done statuses'} />
|
||||
<Label label={plugin.string.DoneStates} />
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-row-center caption-color states">
|
||||
|
@ -14,10 +14,9 @@
|
||||
-->
|
||||
|
||||
<script lang="ts">
|
||||
import type { IntlString } from '@anticrm/platform'
|
||||
import { Label, ScrollBox, IconAdd } from '@anticrm/ui'
|
||||
import { ScrollBox, IconAdd } from '@anticrm/ui'
|
||||
|
||||
export let label: IntlString
|
||||
export let label: string
|
||||
export let color: string
|
||||
// export let counter: number
|
||||
export let addAction: () => void | undefined
|
||||
@ -28,7 +27,7 @@
|
||||
<div class="bar" style="background-color: {color}" />
|
||||
<div class="flex-between label">
|
||||
<div>
|
||||
<Label {label} />
|
||||
{label}
|
||||
<!-- <span>({counter})</span> -->
|
||||
</div>
|
||||
<div class="tool" on:click|preventDefault={addAction}>
|
||||
|
@ -19,6 +19,7 @@
|
||||
import type { DropdownTextItem } from '@anticrm/ui/src/types'
|
||||
import type { KanbanTemplate, KanbanTemplateSpace } from '@anticrm/task'
|
||||
import task from '@anticrm/task'
|
||||
import plugin from '../../plugin'
|
||||
|
||||
export let folders: Ref<KanbanTemplateSpace>[]
|
||||
export let template: Ref<KanbanTemplate> | undefined = undefined
|
||||
@ -34,4 +35,4 @@
|
||||
$: template = selectedItem === undefined ? undefined : selectedItem as Ref<KanbanTemplate>
|
||||
</script>
|
||||
|
||||
<DropdownLabels {items} bind:selected={selectedItem} title="Statuses" />
|
||||
<DropdownLabels {items} bind:selected={selectedItem} title={plugin.string.States} />
|
||||
|
@ -22,7 +22,7 @@
|
||||
import type { Kanban, SpaceWithStates, State } from '@anticrm/task'
|
||||
import task, { DoneState, LostState, WonState, DocWithRank, calcRank } from '@anticrm/task'
|
||||
import { AnySvelteComponent, getPlatformColor } from '@anticrm/ui'
|
||||
import { AnyComponent, Loading, ScrollBox } from '@anticrm/ui'
|
||||
import { Loading, ScrollBox } from '@anticrm/ui'
|
||||
import KanbanPanel from './KanbanPanel.svelte'
|
||||
// import KanbanPanelEmpty from './KanbanPanelEmpty.svelte'
|
||||
|
||||
@ -30,9 +30,10 @@
|
||||
|
||||
export let _class: Ref<Class<Item>>
|
||||
export let space: Ref<SpaceWithStates>
|
||||
// export let open: AnyComponent
|
||||
export let search: string
|
||||
export let options: FindOptions<Item> | undefined
|
||||
export let config: string[]
|
||||
// export let config: string[]
|
||||
|
||||
let kanban: Kanban
|
||||
let states: State[] = []
|
||||
@ -101,7 +102,7 @@
|
||||
)
|
||||
}
|
||||
|
||||
function dragover (ev: MouseEvent, object: Item) {
|
||||
function dragover (object: Item) {
|
||||
if (dragCard !== object) {
|
||||
const dragover = objects.indexOf(object)
|
||||
objects = objects.filter(x => x !== dragCard)
|
||||
@ -181,7 +182,7 @@
|
||||
<ScrollBox>
|
||||
<div class="kanban-content">
|
||||
{#each states as state (state)}
|
||||
<KanbanPanel label={state.title} color={getPlatformColor(state.color)} counter={4}
|
||||
<KanbanPanel label={state.title} color={getPlatformColor(state.color)} addAction={() => {}}
|
||||
on:dragover={(event) => {
|
||||
event.preventDefault()
|
||||
if (dragCard.state !== state._id) {
|
||||
@ -197,8 +198,8 @@
|
||||
{#if object.state === state._id && (target === undefined || target.has(object._id))}
|
||||
<div
|
||||
class="step-tb75"
|
||||
on:dragover|preventDefault={(ev) => {
|
||||
dragover(ev, object)
|
||||
on:dragover|preventDefault={() => {
|
||||
dragover(object)
|
||||
dragCardEndPosition = j
|
||||
}}
|
||||
on:drop|preventDefault={() => {
|
||||
|
@ -18,6 +18,7 @@
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
import { getPlatformColors } from '@anticrm/ui'
|
||||
import PopupDialog from './PopupDialog.svelte'
|
||||
import task from '../../plugin'
|
||||
|
||||
export let colors: readonly string[] = getPlatformColors()
|
||||
export let columns: number = 5
|
||||
@ -25,7 +26,7 @@
|
||||
const dispatch = createEventDispatcher()
|
||||
</script>
|
||||
|
||||
<PopupDialog label={'CHOOSE A COLOR'}>
|
||||
<PopupDialog label={task.string.ChooseAColor}>
|
||||
<div class="color-grid" style="grid-template-columns: repeat({columns}, 1.5rem)">
|
||||
{#each colors as color, i}
|
||||
<div class="color" style="background-color: {color}" on:click={() => { dispatch('close', i) }} />
|
||||
|
@ -80,7 +80,10 @@
|
||||
<div class="flex-grow flex-col">
|
||||
<div class="flex-row-center">
|
||||
<div class="mr-2"><Icon icon={task.icon.ManageStatuses} size={'small'} /></div>
|
||||
<span class="fs-title overflow-label">Manage application statuses within <Label label={spaceClassInstance?.label}/></span>
|
||||
<span class="fs-title overflow-label">
|
||||
Manage application statuses within
|
||||
{#if spaceClassInstance}<Label label={spaceClassInstance?.label}/>{:else}...{/if}
|
||||
</span>
|
||||
</div>
|
||||
<div class="small-text content-dark-color overflow-label">{spaceInstance?.name}</div>
|
||||
</div>
|
||||
|
@ -19,6 +19,7 @@
|
||||
import task, { SpaceWithStates, State } from '@anticrm/task'
|
||||
import { createEventDispatcher, onDestroy, onMount } from 'svelte'
|
||||
import StatesBarElement from './StatesBarElement.svelte'
|
||||
import { getPlatformColor } from '@anticrm/ui'
|
||||
|
||||
export let space: Ref<SpaceWithStates>
|
||||
export let state: Ref<State> | undefined = undefined
|
||||
@ -86,10 +87,10 @@
|
||||
selectItem(ev, item)
|
||||
}}
|
||||
>
|
||||
<StatesBarElement side={'left'} kind={i ? 'arrow' : 'round'} selected={item._id === state} color={item.color} />
|
||||
<StatesBarElement side={'left'} kind={i ? 'arrow' : 'round'} selected={item._id === state} color={getPlatformColor(item.color)} />
|
||||
<div
|
||||
class="flex-row-center overflow-label label"
|
||||
style={item._id === state ? `background-color: ${item.color};` : ''}
|
||||
style={item._id === state ? `background-color: ${getPlatformColor(item.color)};` : ''}
|
||||
>
|
||||
{item.title}
|
||||
</div>
|
||||
@ -97,7 +98,7 @@
|
||||
side={'right'}
|
||||
kind={i < states.length - 1 ? 'arrow' : 'round'}
|
||||
selected={item._id === state}
|
||||
color={item.color}
|
||||
color={getPlatformColor(item.color)}
|
||||
/>
|
||||
</div>
|
||||
{/each}
|
||||
|
@ -23,6 +23,7 @@
|
||||
import ColorsPopup from './ColorsPopup.svelte'
|
||||
import Circles from './Circles.svelte'
|
||||
import StatusesPopup from './StatusesPopup.svelte'
|
||||
import task from '../../plugin'
|
||||
|
||||
export let states: State[] = []
|
||||
export let wonStates: DoneState[] = []
|
||||
@ -74,8 +75,8 @@
|
||||
</script>
|
||||
|
||||
<div class="flex-col">
|
||||
<div class="flex-no-shrink flex-between trans-title">
|
||||
<Label label={'ACTIVE STATUSES'} />
|
||||
<div class="flex-no-shrink flex-between trans-title uppercase">
|
||||
<Label label={task.string.ActiveStates} />
|
||||
<div on:click={onAdd}><CircleButton icon={IconAdd} size={'medium'} /></div>
|
||||
</div>
|
||||
<div class="overflow-y-auto mt-3">
|
||||
@ -116,11 +117,11 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-col mt-9">
|
||||
<div class="flex-no-shrink trans-title">
|
||||
<Label label={'DONE STATUS / WON'} />
|
||||
<div class="flex-no-shrink trans-title uppercase">
|
||||
<Label label={task.string.DoneStatesWon} />
|
||||
</div>
|
||||
<div class="overflow-y-auto mt-4">
|
||||
{#each wonStates as state, i}
|
||||
{#each wonStates as state}
|
||||
{#if state}
|
||||
<div class="states flex-row-center">
|
||||
<div class="bar"/>
|
||||
@ -132,11 +133,11 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-col mt-9">
|
||||
<div class="flex-no-shrink trans-title">
|
||||
<Label label={'DONE STATUS / LOST'} />
|
||||
<div class="flex-no-shrink trans-title uppercase">
|
||||
<Label label={task.string.DoneStatesLost} />
|
||||
</div>
|
||||
<div class="overflow-y-auto mt-4">
|
||||
{#each lostStates as state, i}
|
||||
{#each lostStates as state}
|
||||
{#if state}
|
||||
<div class="states flex-row-center">
|
||||
<div class="bar"/>
|
||||
|
@ -16,9 +16,10 @@
|
||||
import type { Class, Ref, Space } from '@anticrm/core'
|
||||
import { Card, getClient } from '@anticrm/presentation'
|
||||
import type { Task } from '@anticrm/task'
|
||||
import task from '@anticrm/task'
|
||||
import { DatePicker, EditBox, Grid } from '@anticrm/ui'
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
import task from '../../plugin'
|
||||
import plugin from '../../plugin'
|
||||
|
||||
export let objectId: Ref<Task>
|
||||
export let _class: Ref<Class<Task>>
|
||||
@ -54,23 +55,23 @@
|
||||
</script>
|
||||
|
||||
<Card
|
||||
label={task.string.TodoCreate}
|
||||
label={plugin.string.TodoCreate}
|
||||
okAction={createTodo}
|
||||
canSave={name?.length > 0}
|
||||
bind:space={_space}
|
||||
on:close={() => {
|
||||
dispatch('close')
|
||||
}}
|
||||
okLabel={task.string.TodoSave}>
|
||||
okLabel={plugin.string.TodoSave}>
|
||||
<Grid column={1} rowGap={1.75}>
|
||||
<EditBox
|
||||
label={task.string.TodoDescription}
|
||||
label={plugin.string.TodoDescription}
|
||||
bind:value={name}
|
||||
icon={task.icon.Task}
|
||||
placeholder="todo..."
|
||||
placeholder={plugin.string.TodoDescriptionPlaceholder}
|
||||
maxWidth="39rem"
|
||||
focus
|
||||
/>
|
||||
<DatePicker title={task.string.TodoDueDate} bind:selected={dueTo} />
|
||||
<DatePicker title={plugin.string.TodoDueDate} bind:selected={dueTo} />
|
||||
</Grid>
|
||||
</Card>
|
||||
|
@ -14,12 +14,12 @@
|
||||
-->
|
||||
<script lang="ts">
|
||||
import type { DocumentUpdate, Ref, Timestamp } from '@anticrm/core'
|
||||
import { IntlString } from '@anticrm/platform'
|
||||
import { Card, getClient } from '@anticrm/presentation'
|
||||
import type { TodoItem } from '@anticrm/task'
|
||||
import task from '@anticrm/task'
|
||||
import { DatePicker, EditBox, Grid } from '@anticrm/ui'
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
import task from '../../plugin'
|
||||
import plugin from '../../plugin'
|
||||
|
||||
export let item: TodoItem
|
||||
|
||||
@ -61,23 +61,23 @@
|
||||
</script>
|
||||
|
||||
<Card
|
||||
label={task.string.TodoEdit}
|
||||
label={plugin.string.TodoEdit}
|
||||
okAction={editTodo}
|
||||
canSave={name.length > 0}
|
||||
space={item.space}
|
||||
on:close={() => {
|
||||
dispatch('close')
|
||||
}}
|
||||
okLabel={task.string.TodoSave}>
|
||||
okLabel={plugin.string.TodoSave}>
|
||||
<Grid column={1} rowGap={1.75}>
|
||||
<EditBox
|
||||
label={task.string.TodoDescription}
|
||||
label={plugin.string.TodoDescription}
|
||||
bind:value={name}
|
||||
icon={task.icon.Task}
|
||||
placeholder="todo..."
|
||||
placeholder={plugin.string.TodoDescriptionPlaceholder}
|
||||
maxWidth="39rem"
|
||||
focus
|
||||
/>
|
||||
<DatePicker title={task.string.TodoDueDate} bind:selected={dueTo} />
|
||||
<DatePicker title={plugin.string.TodoDueDate} bind:selected={dueTo} />
|
||||
</Grid>
|
||||
</Card>
|
||||
|
@ -21,7 +21,8 @@
|
||||
import CreateTodo from './CreateTodo.svelte'
|
||||
import { Table } from '@anticrm/view-resources'
|
||||
|
||||
import task from '../../plugin'
|
||||
import task from '@anticrm/task'
|
||||
import plugin from '../../plugin'
|
||||
|
||||
export let objectId: Ref<Doc>
|
||||
export let space: Ref<Space>
|
||||
@ -39,13 +40,13 @@
|
||||
|
||||
<div class="applications-container">
|
||||
<div class="flex-row-center">
|
||||
<div class="title">To Do's</div>
|
||||
<div class="title"><Label label={plugin.string.Todos} /></div>
|
||||
<CircleButton icon={IconAdd} size={'small'} selected on:click={createApp} />
|
||||
</div>
|
||||
{#if todos.length > 0}
|
||||
<Table
|
||||
_class={task.class.TodoItem}
|
||||
config={[{ key: '', label: task.string.TodoName }, 'dueTo', { key: 'done', presenter: task.component.TodoStatePresenter, label: task.string.TodoState }]}
|
||||
config={[{ key: '', label: plugin.string.TodoName }, 'dueTo', { key: 'done', presenter: plugin.component.TodoStatePresenter, label: plugin.string.TodoState }]}
|
||||
options={
|
||||
{
|
||||
// lookup: {
|
||||
@ -57,7 +58,7 @@
|
||||
{:else}
|
||||
<div class="flex-col-center mt-5 createapp-container">
|
||||
<div class="small-text">
|
||||
<a href={'#'} on:click={createApp}><Label label={task.string.NoTodoItems} /></a>
|
||||
<a href={'#'} on:click={createApp}><Label label={plugin.string.NoTodoItems} /></a>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
@ -13,31 +13,39 @@
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
import { IntlString, mergeIds } from '@anticrm/platform'
|
||||
import type { IntlString } from '@anticrm/platform'
|
||||
import { mergeIds } from '@anticrm/platform'
|
||||
import task, { taskId } from '@anticrm/task'
|
||||
import { AnyComponent } from '@anticrm/ui'
|
||||
|
||||
export default mergeIds(taskId, task, {
|
||||
string: {
|
||||
ApplicationLabelTask: '' as IntlString,
|
||||
Projects: '' as IntlString,
|
||||
CreateProject: '' as IntlString,
|
||||
ProjectName: '' as IntlString,
|
||||
ProjectNamePlaceholder: '' as IntlString,
|
||||
CreateTask: '' as IntlString,
|
||||
TaskAssignee: '' as IntlString,
|
||||
TaskNamePlaceholder: '' as IntlString,
|
||||
TaskDescription: '' as IntlString,
|
||||
TaskDescriptionPlaceholder: '' as IntlString,
|
||||
States: '' as IntlString,
|
||||
DoneStates: '' as IntlString,
|
||||
TodoDescriptionPlaceholder: '' as IntlString,
|
||||
Todos: '' as IntlString,
|
||||
TodoName: '' as IntlString,
|
||||
|
||||
MakePrivate: '' as IntlString,
|
||||
MakePrivateDescription: '' as IntlString,
|
||||
CreateTask: '' as IntlString,
|
||||
TaskProject: '' as IntlString,
|
||||
SelectProject: '' as IntlString,
|
||||
TaskName: '' as IntlString,
|
||||
TaskAssignee: '' as IntlString,
|
||||
AssignThisTask: '' as IntlString,
|
||||
TaskUnAssign: '' as IntlString,
|
||||
TaskDescription: '' as IntlString,
|
||||
More: '' as IntlString,
|
||||
UploadDropFilesHere: '' as IntlString,
|
||||
NoTaskForObject: '' as IntlString,
|
||||
Delete: '' as IntlString,
|
||||
NoTodoItems: '' as IntlString,
|
||||
TodoName: '' as IntlString,
|
||||
TodoState: '' as IntlString,
|
||||
DoneState: '' as IntlString,
|
||||
UndoneState: '' as IntlString,
|
||||
@ -45,7 +53,12 @@ export default mergeIds(taskId, task, {
|
||||
TodoDescription: '' as IntlString,
|
||||
TodoEdit: '' as IntlString,
|
||||
TodoSave: '' as IntlString,
|
||||
TodoCreate: '' as IntlString
|
||||
TodoCreate: '' as IntlString,
|
||||
ActiveStates: '' as IntlString,
|
||||
DoneStatesWon: '' as IntlString,
|
||||
DoneStatesLost: '' as IntlString,
|
||||
AllStates: '' as IntlString,
|
||||
ChooseAColor: '' as IntlString
|
||||
},
|
||||
status: {
|
||||
AssigneeRequired: '' as IntlString
|
||||
|
@ -25,7 +25,7 @@ import {
|
||||
Timestamp,
|
||||
TxOperations
|
||||
} from '@anticrm/core'
|
||||
import type { Asset, Plugin } from '@anticrm/platform'
|
||||
import type { Asset, IntlString, Plugin } from '@anticrm/platform'
|
||||
import { plugin } from '@anticrm/platform'
|
||||
import type { AnyComponent } from '@anticrm/ui'
|
||||
import { ViewletDescriptor } from '@anticrm/view'
|
||||
@ -240,11 +240,11 @@ export async function createKanban (
|
||||
const ranks = [...genRanks(2)]
|
||||
await Promise.all([
|
||||
client.createDoc(task.class.WonState, attachedTo, {
|
||||
title: 'Won',
|
||||
title: 'Won' as IntlString,
|
||||
rank: ranks[0]
|
||||
}),
|
||||
client.createDoc(task.class.LostState, attachedTo, {
|
||||
title: 'Lost',
|
||||
title: 'Lost' as IntlString,
|
||||
rank: ranks[1]
|
||||
})
|
||||
])
|
||||
|
Loading…
Reference in New Issue
Block a user