Verified Commit e8f4b9e9 authored by Marek Veselý's avatar Marek Veselý
Browse files

feat: update to backend 4.5.0

parent 537ea5f9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
{
  "name": "@inject/analyst",
  "version": "4.4.0",
  "version": "4.5.0",
  "description": "Analyst module for Inject Exercise Platform",
  "main": "index.js",
  "license": "MIT",
+8 −6
Original line number Diff line number Diff line
import type { IAnalystActionLogSimple, LogType } from '@inject/graphql'
import { AnalystActionLogsSimpleQuery, useTypedQuery } from '@inject/graphql'
import type { IAnalystActionLogTree, LogType } from '@inject/graphql'
import { AnalystActionLogsTreeQuery, useTypedQuery } from '@inject/graphql'
import { useContext, useMemo } from 'react'
import { getStringContent } from '../ActionLogTitle/getStringContent'
import { ExerciseContext } from '../ExerciseContext'
@@ -14,7 +14,7 @@ const useActionLogsRoot = (teamId: string) => {
  const { exercise } = useContext(ExerciseContext)

  const [{ data: actionLogsData }] = useTypedQuery({
    query: AnalystActionLogsSimpleQuery,
    query: AnalystActionLogsTreeQuery,
    variables: {
      teamIds: [teamId],
      exerciseId: exercise.id,
@@ -31,7 +31,7 @@ const useActionLogsRoot = (teamId: string) => {
  // analyst should only be accessible by instructors/admins,
  // so we can rely on the type returned being IActionLog
  const actionLogs = (actionLogsData?.teamActionLogs ??
    []) as IAnalystActionLogSimple[]
    []) as IAnalystActionLogTree[]

  const treeNodeMap = new Map<string, TreeNode>()

@@ -50,8 +50,10 @@ const useActionLogsRoot = (teamId: string) => {

    if (!node) return

    if (actionLog.previousLogId) {
      treeNodeMap.get(actionLog.previousLogId)?.children.push(node)
    if (actionLog.previousLogs.length) {
      actionLog.previousLogs.forEach(prevLog => {
        treeNodeMap.get(prevLog.id)?.children.push(node)
      })
    } else {
      rootNode.children.push(node)
    }
Compare 5821a40d to 3c431b73
Original line number Diff line number Diff line
Subproject commit 5821a40d3d36353e2330f6f9442d3d5e0c332a6d
Subproject commit 3c431b731783c8e779c93034799c6afe7f1f5273
+1 −1
Original line number Diff line number Diff line
{
  "name": "@inject/codegen",
  "version": "4.4.0",
  "version": "4.5.0",
  "description": "GraphQL API Codegen Setup for the Inject Backend",
  "main": "index.js",
  "license": "MIT",
+1 −1
Original line number Diff line number Diff line
{
  "name": "@inject/eslint-config",
  "version": "4.4.0",
  "version": "4.5.0",
  "packageManager": "yarn@4.5.2",
  "type": "module",
  "private": true,
Loading