Chore: make notification center UI
Chore: fiatBalancesNotify refactor Chore: removed now-unused code in some files Feat: change column "detail" in database to use jsonb Chore: add notification center background and button Chore: notifications screen scaffolding Fix: change position of notification UI Feat: join backend and frontend Feat: notification icons and machine names Feat: add clear all button, stripe overlay on invalid notification Fix: rework notification styles Feat: use popper to render notifications Feat: make notification center UI Fix: fix css on notification center Fix: fix invalidateNotification Chore: apply PR requested changes Fix: PR fixes Fix: make toggleable body/root styles be handled by react Chore: delete old notifier file Fix: undo variable name changes for cryptobalance notifs
This commit is contained in:
parent
2a9e8dadba
commit
c457faab40
37 changed files with 1337 additions and 1332 deletions
|
|
@ -12,8 +12,9 @@ const logs = require('../../logs')
|
|||
const settingsLoader = require('../../new-settings-loader')
|
||||
// const tokenManager = require('../../token-manager')
|
||||
const blacklist = require('../../blacklist')
|
||||
const machineEventsByIdBatch = require("../../postgresql_interface").machineEventsByIdBatch
|
||||
const machineEventsByIdBatch = require('../../postgresql_interface').machineEventsByIdBatch
|
||||
const promoCodeManager = require('../../promo-codes')
|
||||
const notifierQueries = require('../../notifier/queries')
|
||||
|
||||
const serverVersion = require('../../../package.json').version
|
||||
const transactions = require('../transactions')
|
||||
|
|
@ -247,6 +248,17 @@ const typeDefs = gql`
|
|||
rate: Float
|
||||
}
|
||||
|
||||
type Notification {
|
||||
id: ID!
|
||||
deviceName: String
|
||||
type: String
|
||||
detail: JSON
|
||||
message: String
|
||||
created: Date
|
||||
read: Boolean
|
||||
valid: Boolean
|
||||
}
|
||||
|
||||
type Query {
|
||||
countries: [Country]
|
||||
currencies: [Currency]
|
||||
|
|
@ -279,6 +291,8 @@ const typeDefs = gql`
|
|||
promoCodes: [PromoCode]
|
||||
cryptoRates: JSONObject
|
||||
fiatRates: [Rate]
|
||||
notifications: [Notification]
|
||||
hasUnreadNotifications: Boolean
|
||||
}
|
||||
|
||||
type SupportLogsResponse {
|
||||
|
|
@ -312,6 +326,8 @@ const typeDefs = gql`
|
|||
insertBlacklistRow(cryptoCode: String!, address: String!): Blacklist
|
||||
createPromoCode(code: String!, discount: Int!): PromoCode
|
||||
deletePromoCode(codeId: ID!): PromoCode
|
||||
clearNotification(id: ID!): Notification
|
||||
clearAllNotifications: Notification
|
||||
}
|
||||
`
|
||||
|
||||
|
|
@ -344,9 +360,9 @@ const resolvers = {
|
|||
customers: () => customers.getCustomersList(),
|
||||
customer: (...[, { customerId }]) => customers.getCustomerById(customerId),
|
||||
funding: () => funding.getFunding(),
|
||||
machineLogs: (...[, { deviceId, from, until, limit, offset }]) =>
|
||||
machineLogs: (...[, { deviceId, from, until, limit, offset }]) =>
|
||||
logs.simpleGetMachineLogs(deviceId, from, until, limit, offset),
|
||||
machineLogsCsv: (...[, { deviceId, from, until, limit, offset }]) =>
|
||||
machineLogsCsv: (...[, { deviceId, from, until, limit, offset }]) =>
|
||||
logs.simpleGetMachineLogs(deviceId, from, until, limit, offset).then(parseAsync),
|
||||
serverVersion: () => serverVersion,
|
||||
uptime: () => supervisor.getAllProcessInfo(),
|
||||
|
|
@ -373,7 +389,9 @@ const resolvers = {
|
|||
}
|
||||
})
|
||||
}),
|
||||
fiatRates: () => forex.getFiatRates()
|
||||
fiatRates: () => forex.getFiatRates(),
|
||||
notifications: () => notifierQueries.getNotifications(),
|
||||
hasUnreadNotifications: () => notifierQueries.hasUnreadNotifications()
|
||||
},
|
||||
Mutation: {
|
||||
machineAction: (...[, { deviceId, action, cashbox, cassette1, cassette2, newName }]) => machineAction({ deviceId, action, cashbox, cassette1, cassette2, newName }),
|
||||
|
|
@ -397,7 +415,9 @@ const resolvers = {
|
|||
blacklist.insertIntoBlacklist(cryptoCode, address),
|
||||
// revokeToken: (...[, { token }]) => tokenManager.revokeToken(token)
|
||||
createPromoCode: (...[, { code, discount }]) => promoCodeManager.createPromoCode(code, discount),
|
||||
deletePromoCode: (...[, { codeId }]) => promoCodeManager.deletePromoCode(codeId)
|
||||
deletePromoCode: (...[, { codeId }]) => promoCodeManager.deletePromoCode(codeId),
|
||||
clearNotification: (...[, { id }]) => notifierQueries.markAsRead(id),
|
||||
clearAllNotifications: () => notifierQueries.markAllAsRead()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue