refs #7644 Added control source
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Guillermo Bonet 2024-07-01 08:00:27 +02:00
parent 85c7336d92
commit 7bf55c6815
2 changed files with 5 additions and 1 deletions

View File

@ -74,7 +74,7 @@
<td colspan="2"> <td colspan="2">
<div class="cell"> <div class="cell">
<span class="lbl">Control</span> <span class="lbl">Control</span>
06 / 11 {{`${weekNum} / ${dayNum}`}}
</div> </div>
</td> </td>
<td> <td>

View File

@ -1,6 +1,7 @@
const vnReport = require('../../../core/mixins/vn-report.js'); const vnReport = require('../../../core/mixins/vn-report.js');
const {DOMImplementation, XMLSerializer} = require('xmldom'); const {DOMImplementation, XMLSerializer} = require('xmldom');
const jsBarcode = require('jsbarcode'); const jsBarcode = require('jsbarcode');
const moment = require('moment');
module.exports = { module.exports = {
name: 'entry-label', name: 'entry-label',
@ -8,6 +9,9 @@ module.exports = {
async serverPrefetch() { async serverPrefetch() {
this.buys = await this.rawSqlFromDef('entry', [this.id]); this.buys = await this.rawSqlFromDef('entry', [this.id]);
this.maxLabelNum = Math.max(...this.buys.map(buy => buy.labelNum)); this.maxLabelNum = Math.max(...this.buys.map(buy => buy.labelNum));
const date = new Date();
this.weekNum = moment(date).isoWeek();
this.dayNum = moment(date).day();
}, },
methods: { methods: {
getBarcode(id) { getBarcode(id) {