Skip to content

Commit

Permalink
fixed bug regarding useSRU
Browse files Browse the repository at this point in the history
  • Loading branch information
EliDeh committed Apr 10, 2024
1 parent 2111f22 commit 68ef28d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions signaturenDruck/js/classes/Print.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ class Print {
return this._dataAll.all
}

constructor (file, formats, manuelSignature) {
constructor (file, formats, manualSignature) {
this.formats = formats
this.manualSignature = manuelSignature
this.manualSignature = manualSignature
this.jsonFile = ''
if (fs.existsSync(file)) {
this.jsonFile = JSON.parse(jsonfile.readFile(file))
Expand Down
4 changes: 2 additions & 2 deletions signaturenDruck/js/classes/ShelfmarksFromSRUData.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ function getOccurrence (object, barcode) {
function getPPN (object) {
const data = _.find(object['zs:searchRetrieveResponse']['zs:records']['zs:record']['zs:recordData'].record.datafield, { tag: '003@' })
if (data !== undefined) {
return data.subfield['#text']
return String(data.subfield['#text'])
} else {
return ''
}
Expand All @@ -134,7 +134,7 @@ function getPPN (object) {
function getEPN (object) {
const data = _.find(object['zs:searchRetrieveResponse']['zs:records']['zs:record']['zs:recordData'].record.datafield, { tag: '203@' })
if (data !== undefined) {
return data.subfield['#text']
return String(data.subfield['#text'])
} else {
return ''
}
Expand Down
4 changes: 2 additions & 2 deletions signaturenDruck/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ function createWindow () {

const options = windowParams()
options.backgroundColor = '#f0f0f0'
options.webPreferences.preload = path.join(__dirname, 'js\\renderer.js')
//options.webPreferences.preload = path.join(__dirname, 'js\\renderer.js')

if (config.store.devMode) {
options.height = 600
Expand Down Expand Up @@ -455,7 +455,7 @@ ipcMain.on('readyToPrint', function (event, formatInformation, printImmediately,
const fileName = formatInformation.name + new Date().getTime() + '.pdf'
const fullPath = defaultProgramPath + '\\' + fileName
fs.writeFile(fullPath, data, (error) => {
if (error) throw error
if (error) {throw error}
// tested native electron silent printing, still broken
/*
else {
Expand Down

0 comments on commit 68ef28d

Please sign in to comment.