Projekt

Obecné

Profil

« Předchozí | Další » 

Revize d3c12593

Přidáno uživatelem Fantič před téměř 2 roky(ů)

re #10678 ItemViewUpdate: show related notes

Zobrazit rozdíly:

src/stores/actions/itemThunks.ts
1 1
import { createAsyncThunk } from "@reduxjs/toolkit"
2 2
import { getItemRequest } from "../../api/itemservice"
3 3
import { getItemNotesRequest } from "../../api/notesservice"
4
import { Certainty, Concordance } from "../../types/item";
4
import { Certainty, Concordance, Item } from "../../types/item";
5 5

  
6 6

  
7 7
export const getItem = createAsyncThunk(
......
104 104

  
105 105
export const getItemNotes = createAsyncThunk(
106 106
    "item/getItemNotes",
107
    async (itemId: string) => {
107
    async ({item, relatedComments}: {item: Item, relatedComments: boolean}) => {
108 108
        try {
109
            console.log("GET notes/getNotes/" + itemId);
109
            console.log("GET notes/getNotes/" + item.id);
110 110

  
111
            const response = await getItemNotesRequest(itemId);
111
            const response = await getItemNotesRequest(item, relatedComments);
112 112

  
113 113
            if (response.status === 200) {
114 114
                if(response.data.length > 0){

Také k dispozici: Unified diff