From 733cd670d763f22fc29624b7411f7948fd0bc044 Mon Sep 17 00:00:00 2001 From: Rafael Taranto Date: Thu, 24 Aug 2023 17:10:15 +0100 Subject: [PATCH] feat: aveiro stuff --- lib/db.js | 2 +- lib/graphql/types.js | 1 + lib/plugins.js | 7 ++++--- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/db.js b/lib/db.js index 4a66e566..db9c32d0 100644 --- a/lib/db.js +++ b/lib/db.js @@ -51,7 +51,7 @@ const searchPathWrapper = (t, cb) => { } const pgp = Pgp({ - pgNative: true, + //pgNative: true, schema: 'ERROR_SCHEMA', extend (obj, dbContext) { obj.__taskEx = function (cb, throwOnError = true) { diff --git a/lib/graphql/types.js b/lib/graphql/types.js index c3df301e..7840fa88 100644 --- a/lib/graphql/types.js +++ b/lib/graphql/types.js @@ -174,6 +174,7 @@ type PhysicalCassette { type PhysicalStacker { name: String! + number: Int! denomination: Int! count: Int! } diff --git a/lib/plugins.js b/lib/plugins.js index ea07030a..5d8c096a 100644 --- a/lib/plugins.js +++ b/lib/plugins.js @@ -175,6 +175,7 @@ function plugins (settings, deviceId) { const computedStackers = [] _.forEach(it => { computedStackers.push({ + number: stackers[it].number, name: stackers[it].name, denomination: stackers[it].denomination, count: counts[it] @@ -255,11 +256,13 @@ function plugins (settings, deviceId) { const stackers = [] _.forEach(it => { stackers.push({ + number: 1 + it * 2, name: `stacker${it + 1}f`, denomination: parseInt(denominations[it][0], 10), count: parseInt(counts[it][0], 10) }) stackers.push({ + number: 2 + it * 2, name: `stacker${it + 1}r`, denomination: parseInt(denominations[it][1], 10), count: parseInt(counts[it][1], 10) @@ -958,9 +961,7 @@ function plugins (settings, deviceId) { } function getPhoneCode (phone) { - const notifications = configManager.getNotifications(settings.config) - - const code = notifications.thirdParty_sms === 'mock-sms' + const code = settings.config.notifications_thirdParty_sms === 'mock-sms' ? '123' : randomCode()