Merge pull request #1584 from lamassu/feat/aveiro-stuff

feat: final aveiro changes
This commit is contained in:
Rafael Taranto 2023-08-28 10:13:10 +01:00 committed by GitHub
commit 4cab26dc83
2 changed files with 5 additions and 3 deletions

View file

@ -174,6 +174,7 @@ type PhysicalCassette {
type PhysicalStacker { type PhysicalStacker {
name: String! name: String!
number: Int!
denomination: Int! denomination: Int!
count: Int! count: Int!
} }

View file

@ -175,6 +175,7 @@ function plugins (settings, deviceId) {
const computedStackers = [] const computedStackers = []
_.forEach(it => { _.forEach(it => {
computedStackers.push({ computedStackers.push({
number: stackers[it].number,
name: stackers[it].name, name: stackers[it].name,
denomination: stackers[it].denomination, denomination: stackers[it].denomination,
count: counts[it] count: counts[it]
@ -255,11 +256,13 @@ function plugins (settings, deviceId) {
const stackers = [] const stackers = []
_.forEach(it => { _.forEach(it => {
stackers.push({ stackers.push({
number: 1 + it * 2,
name: `stacker${it + 1}f`, name: `stacker${it + 1}f`,
denomination: parseInt(denominations[it][0], 10), denomination: parseInt(denominations[it][0], 10),
count: parseInt(counts[it][0], 10) count: parseInt(counts[it][0], 10)
}) })
stackers.push({ stackers.push({
number: 2 + it * 2,
name: `stacker${it + 1}r`, name: `stacker${it + 1}r`,
denomination: parseInt(denominations[it][1], 10), denomination: parseInt(denominations[it][1], 10),
count: parseInt(counts[it][1], 10) count: parseInt(counts[it][1], 10)
@ -958,9 +961,7 @@ function plugins (settings, deviceId) {
} }
function getPhoneCode (phone) { function getPhoneCode (phone) {
const notifications = configManager.getNotifications(settings.config) const code = settings.config.notifications_thirdParty_sms === 'mock-sms'
const code = notifications.thirdParty_sms === 'mock-sms'
? '123' ? '123'
: randomCode() : randomCode()