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