Skip to content

Commit

Permalink
Add #101: Attribute detail page should be configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
Mumthasir mohammed authored and georgepadayatti committed Oct 30, 2023
1 parent 55f9143 commit 34d6d8a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ public class BBConsentPrivacyDashboardiOS: UIViewController {
public static var shared = BBConsentPrivacyDashboardiOS()
public var turnOnUserRequests = false
public var turnOnAskMeSection = false

public var turnOnAttributeDetailScreen = false

var orgId: String?
var userId: String?
var hideBackButton = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ extension BBConsentAttributesViewController : UITableViewDelegate,UITableViewDa
}

public func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
if indexPath.section == 1 {
if indexPath.section == 1 && BBConsentPrivacyDashboardiOS.shared.turnOnAttributeDetailScreen {
if self.consentslistInfo?.consents?.purpose?.lawfulUsage == false && !isFromQR {
let consentVC = self.storyboard?.instantiateViewController(withIdentifier: Constant.ViewControllerID.consentVC) as! BBConsentAttributesDetailViewController
consentVC.consent = consentslist?[indexPath.row]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,9 @@ extension BBConsentOrganisationViewController: ExpandableLabelDelegate ,PurposeC
if status == false {
alerController.addAction(UIAlertAction(title: titleStr, style: .destructive, handler: {(action:UIAlertAction) in
let filteredRecord = self.records?.dataAgreementRecords?.map({ $0 }).filter({ $0.dataAgreementId == self.organisaionDeatils?.purposeConsents?[cell.tag].iD })
serviceManager.updatePurpose(dataAgreementRecordId: filteredRecord?[0].id ?? "", dataAgreementId: filteredRecord?[0].dataAgreementId ?? "", status: status)
if filteredRecord?.count ?? 0 > 0 {
serviceManager.updatePurpose(dataAgreementRecordId: filteredRecord?[0].id ?? "", dataAgreementId: filteredRecord?[0].dataAgreementId ?? "", status: status)
}
}));
alerController.addAction(UIAlertAction(title: NSLocalizedString(Constant.Strings.cancel, comment: ""), style: .cancel, handler: {(action:UIAlertAction) in
cell.statusSwitch.isOn = !cell.statusSwitch.isOn
Expand All @@ -470,7 +472,9 @@ extension BBConsentOrganisationViewController: ExpandableLabelDelegate ,PurposeC

alerController.addAction(UIAlertAction(title: value, style: .default, handler: {(action:UIAlertAction) in
let filteredRecord = self.records?.dataAgreementRecords?.map({ $0 }).filter({ $0.dataAgreementId == self.organisaionDeatils?.purposeConsents?[cell.tag].iD })
serviceManager.updatePurpose(dataAgreementRecordId: filteredRecord?[0].id ?? "", dataAgreementId: filteredRecord?[0].dataAgreementId ?? "", status: status)
if filteredRecord?.count ?? 0 > 0 {
serviceManager.updatePurpose(dataAgreementRecordId: filteredRecord?[0].id ?? "", dataAgreementId: filteredRecord?[0].dataAgreementId ?? "", status: status)
}
}));
}
present(alerController, animated: true, completion: nil)
Expand Down
2 changes: 1 addition & 1 deletion PrivacyDashboardiOS/PrivacyDashboardiOS.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'PrivacyDashboardiOS'
s.version = '2023.10.6'
s.version = '2023.10.7'
s.summary = 'A short description of PrivacyDashboardiOS.'

# This description is used to generate tags and improve search results.
Expand Down

0 comments on commit 34d6d8a

Please sign in to comment.