Skip to content

Commit

Permalink
fix: post accept dipsute changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Riddhiagrawal001 committed Jan 18, 2024
1 parent f1c08b6 commit d9840b9
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/screens/HyperSwitch/Disputes/ShowDisputes.res
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ module DisputesNoteComponent = {
}
}

let showFieldsForPayments = ["amount", "reason", "dipsute_id"]
module DisputesInfoBarComponent = {
@react.component
let make = (~disputeStatus, ~isFromPayments=false, ~disputeDataValue=None) => {
Expand Down Expand Up @@ -106,6 +105,7 @@ module DisputesInfo = {
~widthClass="w-1/4",
~bgColor="bg-white dark:bg-jp-gray-lightgray_background",
~children=?,
~setDisputeData,
) => {
open APIUtils
let updateDetails = useUpdateMethod()
Expand All @@ -120,7 +120,8 @@ module DisputesInfo = {
~id=Some(data.dispute_id),
(),
)
let _ = await updateDetails(url, Dict.make()->Js.Json.object_, Post)
let response = await updateDetails(url, Dict.make()->Js.Json.object_, Post)
setDisputeData(_ => response)
setDisputeStatus(_ => Accepted)
} catch {
| _ => ()
Expand Down Expand Up @@ -200,13 +201,13 @@ module DisputesInfo = {
}
}
@react.component
let make = (~orderDict) => {
let make = (~orderDict, ~setDisputeData) => {
let disputesData = DisputesEntity.itemToObjMapper(orderDict)
<>
<div className={`font-bold text-fs-16 dark:text-white dark:text-opacity-75 mt-4 mb-4`}>
{"Summary"->React.string}
</div>
<Details data=disputesData getHeading getCell detailsFields=allColumns />
<Details data=disputesData getHeading getCell detailsFields=allColumns setDisputeData />
<DisputesNoteComponent disputesData />
</>
}
Expand Down Expand Up @@ -252,7 +253,7 @@ let make = (~id) => {
<div />
</div>
</div>
<DisputesInfo orderDict={disputeData->LogicUtils.getDictFromJsonObject} />
<DisputesInfo orderDict={disputeData->LogicUtils.getDictFromJsonObject} setDisputeData />
</div>
</PageLoaderWrapper>
}

0 comments on commit d9840b9

Please sign in to comment.