Add attachments to even items in homework
This commit is contained in:
parent
7e8f5c939e
commit
bacfe92899
1 changed files with 6 additions and 1 deletions
|
@ -810,11 +810,16 @@ router.all("/ZadaniaDomowe.mvc/Get", (req, res) => {
|
|||
// return 0 === differenceInDays(addDays(requestDate, j), addDays(parseISO(item.DataTekst), baseOffset));
|
||||
}).map(item => {
|
||||
const teacher = dictMap.getByValue(teachers, "Id", item.IdPracownik);
|
||||
const attachments = [
|
||||
"<a href=\"https://wulkanowy.github.io/\" target=\"_blank\">Strona główna Wulkanowego</a>",
|
||||
"<a href=\"https://github.com/wulkanowy/wulkanowy/\" target=\"_blank\">Repozytorium kodu</a>"
|
||||
];
|
||||
return {
|
||||
"Przedmiot": dictMap.getByValue(subjects, "Id", item.IdPrzedmiot).Nazwa,
|
||||
"Pracownik": `${teacher.Imie} ${teacher.Nazwisko} [${teacher.Kod}], ${converter.formatDate(new Date(item.DataTekst))}`,
|
||||
"Opis": item.Opis,
|
||||
"DataModyfikacji": converter.formatDate(new Date(item.DataTekst), true) + " 00:00:00"
|
||||
"DataModyfikacji": converter.formatDate(new Date(item.DataTekst), true) + " 00:00:00",
|
||||
"Attachments": item.Id % 2 == 0 ? attachments : []
|
||||
};
|
||||
}),
|
||||
"Pokazuj": j < 5
|
||||
|
|
Loading…
Reference in a new issue