@@ -117,6 +117,42 @@ export default class GatewayDetailsComponent extends Component {
117117 return this . diagnosticSummary . last_test_order_id ;
118118 }
119119
120+ get credentialTileValue ( ) {
121+ if ( this . credentialStatus === 'success' || this . credentialStatus === 'ok' ) {
122+ return 'Verified' ;
123+ }
124+
125+ if ( this . credentialStatus === 'failed' ) {
126+ return 'Failed' ;
127+ }
128+
129+ return 'Not Checked' ;
130+ }
131+
132+ get credentialAccentClass ( ) {
133+ if ( this . credentialStatus === 'success' || this . credentialStatus === 'ok' ) {
134+ return 'ledger-gateway-kpi-accent-green' ;
135+ }
136+
137+ if ( this . credentialStatus === 'failed' ) {
138+ return 'ledger-gateway-kpi-accent-rose' ;
139+ }
140+
141+ return 'ledger-gateway-kpi-accent-slate' ;
142+ }
143+
144+ get webhookRegistrationResultMessage ( ) {
145+ if ( this . lastWebhookRegistrationAt ) {
146+ return 'Provider webhook registration completed.' ;
147+ }
148+
149+ if ( this . webhookStatus === 'configured' ) {
150+ return 'Webhook URL is configured, but no registration action has been recorded.' ;
151+ }
152+
153+ return 'No provider webhook registration stored.' ;
154+ }
155+
120156 get readinessItems ( ) {
121157 return [
122158 {
@@ -145,16 +181,11 @@ export default class GatewayDetailsComponent extends Component {
145181 } ,
146182 {
147183 label : 'Credentials' ,
148- value : this . credentialStatus === 'success' || this . credentialStatus === 'ok' ? 'Verified' : this . credentialStatus === 'failed' ? 'Failed' : 'Not Checked' ,
184+ value : this . credentialTileValue ,
149185 status : this . credentialStatus ,
150186 icon : 'key' ,
151187 caption : this . lastCredentialTestedAt ? 'Last provider auth test' : 'Run a provider check' ,
152- accentClass :
153- this . credentialStatus === 'success' || this . credentialStatus === 'ok'
154- ? 'ledger-gateway-kpi-accent-green'
155- : this . credentialStatus === 'failed'
156- ? 'ledger-gateway-kpi-accent-rose'
157- : 'ledger-gateway-kpi-accent-slate' ,
188+ accentClass : this . credentialAccentClass ,
158189 } ,
159190 ] ;
160191 }
@@ -307,11 +338,7 @@ export default class GatewayDetailsComponent extends Component {
307338 } ,
308339 {
309340 label : 'Webhook registration' ,
310- value : this . lastWebhookRegistrationAt
311- ? 'Provider webhook registration completed.'
312- : this . webhookStatus === 'configured'
313- ? 'Webhook URL is configured, but no registration action has been recorded.'
314- : 'No provider webhook registration stored.' ,
341+ value : this . webhookRegistrationResultMessage ,
315342 date : this . lastWebhookRegistrationAt ,
316343 status : this . lastWebhookRegistrationAt ? 'success' : 'warning' ,
317344 } ,
0 commit comments