diff --git a/src/screens/HyperSwitch/PaymentLogs/PaymentLogs.res b/src/screens/HyperSwitch/PaymentLogs/PaymentLogs.res index 89b94d128..743a990df 100644 --- a/src/screens/HyperSwitch/PaymentLogs/PaymentLogs.res +++ b/src/screens/HyperSwitch/PaymentLogs/PaymentLogs.res @@ -130,11 +130,6 @@ module ApiDetailsComponent = { let (key, _) = entry filteredKeys->Js.Array2.includes(key)->not }) - // ->Js.Array2.sortInPlaceWith((e1, e2) => { - // let (key1, _) = e1 - // let (key2, _) = e2 - // key1 > key2 ? 1 : key1 === key2 ? 0 : -1 - // }) ->Js.Dict.fromArray ->Js.Json.object_ ->Js.Json.stringify @@ -149,10 +144,20 @@ module ApiDetailsComponent = { } let statusCode = switch logType { - | Payment => paymentDetailsValue->getString("status_code", "200") + | Payment => paymentDetailsValue->getInt("status_code", 200)->Belt.Int.toString | Sdk => paymentDetailsValue->getString("log_type", "INFO") } + let method = switch logType { + | Payment => paymentDetailsValue->getString("http_method", "") + | Sdk => "" + } + + let apiPath = switch logType { + | Payment => paymentDetailsValue->getString("url_path", "") + | Sdk => "" + } + let background_color = switch (logType, statusCode) { | (Sdk, "INFO") => "blue-700" | (Payment, "200") => "green-700" @@ -190,7 +195,16 @@ module ApiDetailsComponent = {
{statusCode->React.string}
-{apiName->React.string}
+ {switch logType { + | Sdk =>{apiName->React.string}
+ | Payment => ++ + {method->Js.String2.toUpperCase->React.string} + + {apiPath->React.string} +
+ }}