Nyomtatáshoz cég hozzáadva

This commit is contained in:
Vincze József 2025-05-13 10:57:56 +02:00
parent f46a5792cb
commit 1d9b9f63aa
3 changed files with 7 additions and 3 deletions

2
app.js
View File

@ -1779,7 +1779,7 @@ app.get('/print_workreport/:id',utils.ensureAuthenticated,async function(req,res
if (workTimesSum.length>0) wtSum=workTimesSum[0].count*8 if (workTimesSum.length>0) wtSum=workTimesSum[0].count*8
var data=await printWorkReport(reports,workHeader) var data=await printWorkReport(reports,workHeader)
console.log(JSON.stringify(data)); //console.log(JSON.stringify(data));
// fss.writeFile(path.normalize('d:\\test.json'), JSON.stringify(data)); // fss.writeFile(path.normalize('d:\\test.json'), JSON.stringify(data));
res.send(data); res.send(data);
//res.send({'response':'ok','reports':reports, 'workTimesSum':wtSum}); //res.send({'response':'ok','reports':reports, 'workTimesSum':wtSum});

View File

@ -220,7 +220,7 @@ block content
col(width='10%') col(width='10%')
col(width='auto') col(width='auto')
col(width='10%') col(width='10%')
col(width='10%') col(width='15%')
thead thead
tr tr
-//th # -//th #

View File

@ -40,11 +40,13 @@ block content
col(width='auto') col(width='auto')
col(width='15%') col(width='15%')
col(width='15%') col(width='15%')
col(width='15%')
thead thead
tr tr
th(style='text-align:left') # th(style='text-align:left') #
th(style='text-align:left') Munkavégzés leírása th(style='text-align:left') Munkavégzés leírása
th(style='text-align:left') Cég
th(style='text-align:left') Résztvevők th(style='text-align:left') Résztvevők
th(style='text-align:center') Művelet th(style='text-align:center') Művelet
@ -100,12 +102,14 @@ block content
var rid var rid
if (item._id){ rid=item._id} else {rid=item.cid} if (item._id){ rid=item._id} else {rid=item.cid}
if (idx==0){ if (idx==0){
newRow+=`<td>${employee.company}</td>`
newRow+=`<td>${employee.name}</td>`+ newRow+=`<td>${employee.name}</td>`+
`<td rowspan="${rows}" class="vcenter"><button class="btn btn-success" data-rid='${rid}' data-toggle='modal' type='button' data-target='#workReportEditModal'>Szerkeszt</button></td>` `<td rowspan="${rows}" class="vcenter"><button class="btn btn-success" data-rid='${rid}' data-toggle='modal' type='button' data-target='#workReportEditModal'>Szerkeszt</button></td>`
newRow+= `</tr>` newRow+= `</tr>`
} else } else
{ {
newRow+=`<tr><td>${employee.name}</td></tr>`//+ //newRow+=`<tr><td>${employee.company}</td></tr>`//+
newRow+=`<tr><td>${employee.company}</td><td>${employee.name}</td></tr>`//+
//`<td><button>Edit</button></td></tr>` //`<td><button>Edit</button></td></tr>`
} }