Skip to content

Commit

Permalink
Fix #225: Contract DA text issue after onboarding.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mumthasir mohammed authored and georgepadayatti committed Feb 29, 2024
1 parent 526ad0c commit 2d0ca69
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ class BBConsentOrganisationViewController: BBConsentBaseViewController {
override func viewDidLoad() {
super.viewDidLoad()
setupUI()
callDataAgreementsApi { _ in
self.callRecordsApi()
}
callOrganisationApi()
callRecordsApi()
callDataAgreementsApi()
}

func setupUI(){
Expand All @@ -60,7 +61,7 @@ class BBConsentOrganisationViewController: BBConsentBaseViewController {
self.navigationController?.navigationBar.isHidden = true
if isNeedToRefresh == true{
isNeedToRefresh = false
callDataAgreementsApi()
callDataAgreementsApi { _ in }
}
}

Expand All @@ -80,7 +81,7 @@ class BBConsentOrganisationViewController: BBConsentBaseViewController {
}


func callDataAgreementsApi() {
func callDataAgreementsApi(completion: @escaping(Bool)-> Void) {
let url = baseUrl + "/service/data-agreements?offset=0&limit=500"
self.api.makeAPICall(urlString: url, method:.get) { status, result in
if status {
Expand All @@ -89,7 +90,7 @@ class BBConsentOrganisationViewController: BBConsentBaseViewController {
let model = try? jsonDecoder.decode(DataAgreementsModel.self, from: data)
debugPrint("### DataAgreements:\(String(describing: model))")
self.dataAgreementsObj = model
self.orgTableView.reloadData()
completion(true)
}
}
}
Expand Down

0 comments on commit 2d0ca69

Please sign in to comment.