Add points to student notes
This commit is contained in:
parent
75e1f8fa78
commit
a24ea5b243
1 changed files with 7 additions and 1 deletions
|
@ -772,6 +772,7 @@ router.all("/Usprawiedliwienia.mvc/Post", (req, res) => {
|
|||
router.all("/UwagiIOsiagniecia.mvc/Get", (req, res) => {
|
||||
const categories = require("../../data/api/dictionaries/KategorieUwag");
|
||||
const teachers = require("../../data/api/dictionaries/Pracownicy");
|
||||
let i = 1;
|
||||
res.json({
|
||||
"data": {
|
||||
"Uwagi": require("../../data/api/student/UwagiUcznia").map(item => {
|
||||
|
@ -779,7 +780,12 @@ router.all("/UwagiIOsiagniecia.mvc/Get", (req, res) => {
|
|||
"TrescUwagi": item.TrescUwagi,
|
||||
"Kategoria": dictMap.getByValue(categories, "Id", item.IdKategoriaUwag).Nazwa,
|
||||
"DataWpisu": format(fromUnixTime(item.DataWpisu), 'yyyy-MM-dd HH:mm:ss'),
|
||||
"Nauczyciel": `${item.PracownikImie} ${item.PracownikNazwisko} [${dictMap.getByValue(teachers, "Id", item.IdPracownik).Kod}]`
|
||||
"Nauczyciel": `${item.PracownikImie} ${item.PracownikNazwisko} [${dictMap.getByValue(teachers, "Id", item.IdPracownik).Kod}]`,
|
||||
|
||||
// 19.06
|
||||
"Punkty": `${i++}`,
|
||||
"PokazPunkty": true,
|
||||
"KategoriaTyp": i % 2 + 1
|
||||
};
|
||||
}),
|
||||
"Osiagniecia": []
|
||||
|
|
Loading…
Reference in a new issue