Projekt

Obecné

Profil

« Předchozí | Další » 

Revize a27b3427

Přidáno uživatelem Fantič před více než 1 rok

#re 10797 NoteView: Note replies base

Zobrazit rozdíly:

src/stores/actions/notesThunks.ts
86 86
                    let notes = [];
87 87
                    for (let i = 0; i < response.data.length; i++) {
88 88
                        let note = response.data[i];
89
                        let replies : any = undefined
90

  
91
                        // convert replies
92
                        if(note.replies){
93
                            replies = [];
94
                            for(let i = 0; i < note.replies.length; i++){
95
                                const reply = note.replies[i];
96
                                replies.push({
97
                                    uuid: (reply as any).uuid,
98
                                    username: (reply as any).created_by,
99
                                    userId: (reply as any).created_by_id,
100
                                    note: (reply as any).note,
101
                                    avatarUrl: (reply as any).avatar,
102
                                    items: (reply as any).items,
103
                                    createdTime: (reply as any).created,
104
                                    updatedTime: (reply as any).updated,
105
                                    noteColor: (reply as any).note_color,
106
                                    reply_to: note.uuid
107
                                })
108
                            }
109
                        }
110

  
89 111
                        notes.push({
90 112
                            uuid: (note as any).uuid,
91 113
                            username: (note as any).created_by,
......
93 115
                            note: (note as any).note,
94 116
                            avatarUrl: (note as any).avatar,
95 117
                            items: (note as any).items,
96
                            replies: (note as any).replies ?? undefined,
118
                            replies: replies,
97 119
                            createdTime: (note as any).created,
98 120
                            updatedTime: (note as any).updated,
99 121
                            noteColor: (note as any).note_color,

Také k dispozici: Unified diff