Add contact card to admin

This commit is contained in:
Rafael Taranto 2019-02-25 10:52:05 -03:00 committed by Josh Harvey
parent 163473a7ee
commit d345cc018c
4 changed files with 73 additions and 4 deletions

View file

@ -156,7 +156,7 @@ determineConfigCategory : String -> Maybe Category
determineConfigCategory configCode =
if List.member configCode [ "definition", "setup", "cashOut", "commissions", "balanceAlerts" ] then
Just MachineSettingsCat
else if List.member configCode [ "walletSettings", "notifications", "compliance", "coinAtmRadar", "terms" ] then
else if List.member configCode [ "walletSettings", "notifications", "compliance", "coinAtmRadar", "terms", "operatorInfo" ] then
Just GlobalSettingsCat
else
Nothing
@ -252,6 +252,7 @@ view route invalidGroups =
, configLink "compliance" "Compliance"
, configLink "coinAtmRadar" "Coin ATM Radar"
, configLink "terms" "Terms and Conditions"
, configLink "operatorInfo" "Operator Info"
]
, ll ( "Third Party Services", AccountCat, AccountRoute "bitgo", True )
[ ( "BitGo", AccountRoute "bitgo", True )

View file

@ -133,6 +133,18 @@
"termsAcceptButtonText",
"termsCancelButtonText"
]
},
{
"code": "operatorInfo",
"display": "Operator Info",
"cryptoScope": "global",
"machineScope": "global",
"fields": [
"operatorInfoActive",
"operatorInfoEmail",
"operatorInfoName",
"operatorInfoPhone"
]
}
],
"fields": [
@ -921,6 +933,48 @@
"termsScreenActive"
],
"fieldValidation": []
},
{
"code": "operatorInfoActive",
"displayBottom": "Info card enabled",
"fieldType": "onOff",
"fieldClass": null,
"fieldValidation": [],
"default": false
},
{
"code": "operatorInfoName",
"displayBottom": "Name",
"displayTopCount": 0,
"fieldType": "string",
"fieldClass": null,
"default": "",
"enabledIfAny": [
"operatorInfoActive"
],
"fieldValidation": []
},
{
"code": "operatorInfoEmail",
"displayBottom": "Email",
"displayTopCount": 0,
"fieldType": "string",
"fieldClass": "email",
"enabledIfAny": [
"operatorInfoActive"
],
"fieldValidation": []
},
{
"code": "operatorInfoPhone",
"displayBottom": "Phone",
"displayTopCount": 0,
"fieldType": "string",
"fieldClass": null,
"enabledIfAny": [
"operatorInfoActive"
],
"fieldValidation": []
}
]
}

View file

@ -90,7 +90,13 @@ function poll (req, res, next) {
twoWayMode: config.cashOutEnabled,
zeroConfLimit: config.zeroConfLimit,
reboot,
hasLightning
hasLightning,
operatorInfo: {
active: config.operatorInfoActive,
name: config.operatorInfoName,
phone: config.operatorInfoPhone,
email: config.operatorInfoEmail
}
}
if (response.idVerificationEnabled) {

View file

@ -37230,7 +37230,11 @@ var _user$project$NavBar$determineConfigCategory = function (configCode) {
_1: {
ctor: '::',
_0: 'terms',
_1: {ctor: '[]'}
_1: {
ctor: '::',
_0: 'operatorInfo',
_1: {ctor: '[]'}
}
}
}
}
@ -37679,7 +37683,11 @@ var _user$project$NavBar$view = F2(
_1: {
ctor: '::',
_0: A2(configLink, 'terms', 'Terms and Conditions'),
_1: {ctor: '[]'}
_1: {
ctor: '::',
_0: A2(configLink, 'operatorInfo', 'Operator Info'),
_1: {ctor: '[]'}
}
}
}
}