mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-21 15:59:15 +00:00
Fix attachments input (#6002)
This commit is contained in:
parent
630ae21a66
commit
0061162d87
@ -238,11 +238,9 @@ export class TInboxNotification extends TDoc implements InboxNotification {
|
|||||||
@Model(notification.class.ActivityInboxNotification, notification.class.InboxNotification)
|
@Model(notification.class.ActivityInboxNotification, notification.class.InboxNotification)
|
||||||
export class TActivityInboxNotification extends TInboxNotification implements ActivityInboxNotification {
|
export class TActivityInboxNotification extends TInboxNotification implements ActivityInboxNotification {
|
||||||
@Prop(TypeRef(activity.class.ActivityMessage), core.string.AttachedTo)
|
@Prop(TypeRef(activity.class.ActivityMessage), core.string.AttachedTo)
|
||||||
@Index(IndexKind.Indexed)
|
|
||||||
attachedTo!: Ref<ActivityMessage>
|
attachedTo!: Ref<ActivityMessage>
|
||||||
|
|
||||||
@Prop(TypeRef(activity.class.ActivityMessage), core.string.AttachedToClass)
|
@Prop(TypeRef(activity.class.ActivityMessage), core.string.AttachedToClass)
|
||||||
@Index(IndexKind.Indexed)
|
|
||||||
attachedToClass!: Ref<Class<ActivityMessage>>
|
attachedToClass!: Ref<Class<ActivityMessage>>
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -647,6 +645,15 @@ export function createModel (builder: Builder): void {
|
|||||||
indexes: []
|
indexes: []
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
builder.mixin<Class<DocNotifyContext>, IndexingConfiguration<DocNotifyContext>>(
|
||||||
|
notification.class.ActivityInboxNotification,
|
||||||
|
core.class.Class,
|
||||||
|
core.mixin.IndexConfiguration,
|
||||||
|
{
|
||||||
|
searchDisabled: true,
|
||||||
|
indexes: []
|
||||||
|
}
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export function generateClassNotificationTypes (
|
export function generateClassNotificationTypes (
|
||||||
|
@ -99,7 +99,7 @@
|
|||||||
async function updateAttachments (objectId: Ref<Doc>): Promise<void> {
|
async function updateAttachments (objectId: Ref<Doc>): Promise<void> {
|
||||||
draftAttachments = $draftsStore[draftKey]
|
draftAttachments = $draftsStore[draftKey]
|
||||||
if (draftAttachments && shouldSaveDraft) {
|
if (draftAttachments && shouldSaveDraft) {
|
||||||
attachments.clear()
|
attachments = new Map()
|
||||||
newAttachments.clear()
|
newAttachments.clear()
|
||||||
Object.entries(draftAttachments).map((file) => {
|
Object.entries(draftAttachments).map((file) => {
|
||||||
return attachments.set(file[0] as Ref<Attachment>, file[1])
|
return attachments.set(file[0] as Ref<Attachment>, file[1])
|
||||||
@ -127,7 +127,7 @@
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
attachments.clear()
|
attachments = new Map()
|
||||||
newAttachments.clear()
|
newAttachments.clear()
|
||||||
originalAttachments.clear()
|
originalAttachments.clear()
|
||||||
removedAttachments.clear()
|
removedAttachments.clear()
|
||||||
|
@ -144,10 +144,8 @@
|
|||||||
|
|
||||||
// Remove draft from Local Storage
|
// Remove draft from Local Storage
|
||||||
clear()
|
clear()
|
||||||
currentMessage = getDefault()
|
|
||||||
_id = currentMessage._id
|
|
||||||
loading = false
|
|
||||||
dispatch('submit', false)
|
dispatch('submit', false)
|
||||||
|
loading = false
|
||||||
}
|
}
|
||||||
|
|
||||||
async function createMessage (event: CustomEvent, _id: Ref<ChatMessage>): Promise<void> {
|
async function createMessage (event: CustomEvent, _id: Ref<ChatMessage>): Promise<void> {
|
||||||
|
Loading…
Reference in New Issue
Block a user