Browse Source

using dispatch

amenpunk 2 years ago
parent
commit
8de6933749
3 changed files with 3 additions and 7 deletions
  1. 0 5
      src/Components/Test/Cleaver/Question.jsx
  2. 3 1
      src/Pages/Prueba.jsx
  3. 0 1
      src/Slices/cleaverSlice.js

+ 0 - 5
src/Components/Test/Cleaver/Question.jsx

1
 import * as React from 'react';
1
 import * as React from 'react';
2
-
3
 import { Remove as RemoveIcon, Add as AddIcon } from '@mui/icons-material';
2
 import { Remove as RemoveIcon, Add as AddIcon } from '@mui/icons-material';
4
 import {
3
 import {
5
   Card,CardContent,Avatar,Checkbox,List,Tooltip,Fade,
4
   Card,CardContent,Avatar,Checkbox,List,Tooltip,Fade,
60
           B: resp[index] ? resp[index].B : 0
59
           B: resp[index] ? resp[index].B : 0
61
         }
60
         }
62
       }
61
       }
63
-      // let final = Object.assign(resp,temp);
64
       dispatch(setResponse(temp))
62
       dispatch(setResponse(temp))
65
     }
63
     }
66
   };
64
   };
75
           A: resp[index] ? resp[index].A : 0
73
           A: resp[index] ? resp[index].A : 0
76
         }
74
         }
77
       }
75
       }
78
-      // let final = Object.assign(resp,temp)
79
       dispatch(setResponse(temp))
76
       dispatch(setResponse(temp))
80
     }
77
     }
81
   };
78
   };
84
     <List sx={{ width: '100%', bgcolor: 'background.paper' }}>
81
     <List sx={{ width: '100%', bgcolor: 'background.paper' }}>
85
 
82
 
86
       {quiz.map((value) => {
83
       {quiz.map((value) => {
87
-        // console.log("QUIZ VALUE: ", value)
88
         const labelId = `checkbox-list-label-${value.id}`;
84
         const labelId = `checkbox-list-label-${value.id}`;
89
-
90
         return (
85
         return (
91
           <ListItem key={value.id}>
86
           <ListItem key={value.id}>
92
             <ListItemButton dense>
87
             <ListItemButton dense>

+ 3 - 1
src/Pages/Prueba.jsx

40
       "score": "0",
40
       "score": "0",
41
       "mensaje": "0",
41
       "mensaje": "0",
42
       "mensaje2": "0",
42
       "mensaje2": "0",
43
-      "idcontrasenia": profile.role.passid,
43
+      //candidatoinpwd -> idSuperContraseña -> viene al hacer login
44
+      "idcontrasenia": profile.role.passid, // ya no se va enviar
44
       "nombre": "assing CLEVAERR"
45
       "nombre": "assing CLEVAERR"
46
+      //cattest_id // catalogo de examenes -> viene del api del catalogo del admin
45
     }
47
     }
46
 
48
 
47
     let rest = new Service("/prueba/asignacion");
49
     let rest = new Service("/prueba/asignacion");

+ 0 - 1
src/Slices/cleaverSlice.js

6
   name : 'cleaver',
6
   name : 'cleaver',
7
   reducers : {
7
   reducers : {
8
     setResponse : (state, action) => {
8
     setResponse : (state, action) => {
9
-      // console.log(action.payload)
10
       state.responses = { ...state.responses, ...action.payload  }
9
       state.responses = { ...state.responses, ...action.payload  }
11
     }
10
     }
12
   },
11
   },