Fix status view and calendar (#1239)

This commit is contained in:
Denis Bykhov 2022-03-30 07:33:59 +06:00 committed by GitHub
parent fab8ee5f14
commit 5f4edc43c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 2 deletions

View File

@ -123,7 +123,8 @@ export function createModel (builder: Builder): void {
const leadLookup: Lookup<Lead> = const leadLookup: Lookup<Lead> =
{ {
attachedTo: [lead.mixin.Customer, { _id: { channels: contact.class.Channel } }], attachedTo: [lead.mixin.Customer, { _id: { channels: contact.class.Channel } }],
state: task.class.State state: task.class.State,
doneState: task.class.DoneState
} }
builder.createDoc(view.class.Viewlet, core.space.Model, { builder.createDoc(view.class.Viewlet, core.space.Model, {
@ -137,6 +138,7 @@ export function createModel (builder: Builder): void {
'', '',
'$lookup.attachedTo', '$lookup.attachedTo',
'$lookup.state', '$lookup.state',
'$lookup.doneState',
{ presenter: attachment.component.AttachmentsPresenter, label: attachment.string.Files, sortingKey: 'attachments' }, { presenter: attachment.component.AttachmentsPresenter, label: attachment.string.Files, sortingKey: 'attachments' },
{ presenter: chunter.component.CommentsPresenter, label: chunter.string.Comments, sortingKey: 'comments' }, { presenter: chunter.component.CommentsPresenter, label: chunter.string.Comments, sortingKey: 'comments' },
'modifiedOn', 'modifiedOn',

View File

@ -300,12 +300,18 @@ export function createModel (builder: Builder): void {
descriptor: task.viewlet.StatusTable, descriptor: task.viewlet.StatusTable,
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions // eslint-disable-next-line @typescript-eslint/consistent-type-assertions
options: { options: {
lookup: { assignee: contact.class.Employee } lookup: {
assignee: contact.class.Employee,
state: task.class.State,
doneState: task.class.DoneState
}
} as FindOptions<Doc>, } as FindOptions<Doc>,
config: [ config: [
'', '',
'name', 'name',
'$lookup.assignee', '$lookup.assignee',
'$lookup.state',
'$lookup.doneState',
{ presenter: attachment.component.AttachmentsPresenter, label: attachment.string.Files, sortingKey: 'attachments' }, { presenter: attachment.component.AttachmentsPresenter, label: attachment.string.Files, sortingKey: 'attachments' },
{ presenter: chunter.component.CommentsPresenter, label: chunter.string.Comments, sortingKey: 'comments' }, { presenter: chunter.component.CommentsPresenter, label: chunter.string.Comments, sortingKey: 'comments' },
'modifiedOn' 'modifiedOn'

View File

@ -13,6 +13,8 @@
// limitations under the License. // limitations under the License.
--> -->
<script type="ts"> <script type="ts">
import { dataset_dev } from 'svelte/internal';
import MonthCalendar from './MonthCalendar.svelte' import MonthCalendar from './MonthCalendar.svelte'
/** /**
@ -30,6 +32,7 @@
} }
function month (date: Date, m: number): Date { function month (date: Date, m: number): Date {
date = new Date(date) date = new Date(date)
date.setDate(1)
date.setMonth(m) date.setMonth(m)
return date return date
} }