7691-testToMaster #2703

Merged
alexm merged 268 commits from 7691-testToMaster into master 2024-07-09 05:38:28 +00:00
2 changed files with 5 additions and 1 deletions
Showing only changes of commit 7bf55c6815 - Show all commits

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) {