|
@@ -134,11 +134,11 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
|
|
Item(icon: UIImage(systemName: "person.fill"), title: "Personal Information".localized()),
|
|
Item(icon: UIImage(systemName: "person.fill"), title: "Personal Information".localized()),
|
|
// Item(icon: UIImage(systemName: "laptopcomputer.and.iphone"), title: "Login to Nexilis Web".localized()),
|
|
// Item(icon: UIImage(systemName: "laptopcomputer.and.iphone"), title: "Login to Nexilis Web".localized()),
|
|
Item(icon: UIImage(systemName: "textformat.abc"), title: "Change Language".localized()),
|
|
Item(icon: UIImage(systemName: "textformat.abc"), title: "Change Language".localized()),
|
|
- Item(icon: UIImage(systemName: "person.crop.rectangle"), title: "Login as Admin / Internal".localized()),
|
|
|
|
|
|
+ Item(icon: UIImage(systemName: "person.crop.rectangle"), title: "Access Admin / Internal Features".localized()),
|
|
]
|
|
]
|
|
}
|
|
}
|
|
if !isChangeProfile {
|
|
if !isChangeProfile {
|
|
- Item.menus["Personal"]?.append(Item(icon: UIImage(systemName: "arrow.up.and.person.rectangle.portrait"), title: "Change Device".localized()))
|
|
|
|
|
|
+ Item.menus["Personal"]?.append(Item(icon: UIImage(systemName: "arrow.up.and.person.rectangle.portrait"), title: "Login".localized()))
|
|
} else if isChangeProfile {
|
|
} else if isChangeProfile {
|
|
Item.menus["Personal"]?.append(Item(icon: UIImage(systemName: "rectangle.portrait.and.arrow.right"), title: "Logout".localized()))
|
|
Item.menus["Personal"]?.append(Item(icon: UIImage(systemName: "rectangle.portrait.and.arrow.right"), title: "Logout".localized()))
|
|
}
|
|
}
|
|
@@ -183,8 +183,8 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
|
|
Item(icon: UIImage(systemName: "person.fill"), title: "Personal Information".localized()),
|
|
Item(icon: UIImage(systemName: "person.fill"), title: "Personal Information".localized()),
|
|
// Item(icon: UIImage(systemName: "laptopcomputer.and.iphone"), title: "Login to Nexilis Web".localized()),
|
|
// Item(icon: UIImage(systemName: "laptopcomputer.and.iphone"), title: "Login to Nexilis Web".localized()),
|
|
Item(icon: UIImage(systemName: "textformat.abc"), title: "Change Language".localized()),
|
|
Item(icon: UIImage(systemName: "textformat.abc"), title: "Change Language".localized()),
|
|
- Item(icon: UIImage(systemName: "person.crop.rectangle"), title: "Login as Admin / Internal".localized()),
|
|
|
|
- Item(icon: UIImage(systemName: "arrow.up.and.person.rectangle.portrait"), title: "Change Device".localized())
|
|
|
|
|
|
+ Item(icon: UIImage(systemName: "person.crop.rectangle"), title: "Access Admin / Internal Features".localized()),
|
|
|
|
+ Item(icon: UIImage(systemName: "arrow.up.and.person.rectangle.portrait"), title: "Login".localized())
|
|
]
|
|
]
|
|
if !imageSignIn.isEmpty {
|
|
if !imageSignIn.isEmpty {
|
|
do {
|
|
do {
|
|
@@ -277,11 +277,11 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
|
|
switch menu.title {
|
|
switch menu.title {
|
|
case "Personal Information".localized():
|
|
case "Personal Information".localized():
|
|
cell.accessoryType = .disclosureIndicator
|
|
cell.accessoryType = .disclosureIndicator
|
|
- case "Login as Admin / Internal".localized():
|
|
|
|
|
|
+ case "Access Admin / Internal Features".localized():
|
|
cell.accessoryType = .disclosureIndicator
|
|
cell.accessoryType = .disclosureIndicator
|
|
case "Login to Nexilis Web".localized():
|
|
case "Login to Nexilis Web".localized():
|
|
cell.accessoryType = .disclosureIndicator
|
|
cell.accessoryType = .disclosureIndicator
|
|
- case "Change Device".localized():
|
|
|
|
|
|
+ case "Login".localized():
|
|
cell.accessoryType = .disclosureIndicator
|
|
cell.accessoryType = .disclosureIndicator
|
|
// case "Logout".localized():
|
|
// case "Logout".localized():
|
|
case "Change Admin / Internal Password".localized():
|
|
case "Change Admin / Internal Password".localized():
|
|
@@ -325,7 +325,7 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
|
|
}
|
|
}
|
|
navigationController?.show(controller, sender: nil)
|
|
navigationController?.show(controller, sender: nil)
|
|
}
|
|
}
|
|
- } else if item.title == "Login as Admin / Internal".localized() || item.title == "Change Admin / Internal Password".localized() {
|
|
|
|
|
|
+ } else if item.title == "Access Admin / Internal Features".localized() || item.title == "Change Admin / Internal Password".localized() {
|
|
if(ViewController.checkIsChangePerson()){
|
|
if(ViewController.checkIsChangePerson()){
|
|
if !CheckConnection.isConnectedToNetwork() || API.nGetCLXConnState() == 0 {
|
|
if !CheckConnection.isConnectedToNetwork() || API.nGetCLXConnState() == 0 {
|
|
let imageView = UIImageView(image: UIImage(systemName: "xmark.circle.fill"))
|
|
let imageView = UIImageView(image: UIImage(systemName: "xmark.circle.fill"))
|
|
@@ -344,10 +344,10 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
- if let action = self.actionLogin(for: "admin", title: "Login as Admin".localized()) {
|
|
|
|
|
|
+ if let action = self.actionLogin(for: "admin", title: "Access Admin Features".localized()) {
|
|
alertController.addAction(action)
|
|
alertController.addAction(action)
|
|
}
|
|
}
|
|
- if let action = self.actionLogin(for: "internal", title: "Login as Internal Team".localized()) {
|
|
|
|
|
|
+ if let action = self.actionLogin(for: "internal", title: "Access Internal Features".localized()) {
|
|
alertController.addAction(action)
|
|
alertController.addAction(action)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -389,7 +389,7 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
|
|
ThirdTabViewController.forceRefresh = true
|
|
ThirdTabViewController.forceRefresh = true
|
|
}))
|
|
}))
|
|
self.present(alert, animated: true, completion: nil)
|
|
self.present(alert, animated: true, completion: nil)
|
|
- } else if item.title == "Change Device".localized() {
|
|
|
|
|
|
+ } else if item.title == "Login".localized() {
|
|
let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "changeDevice") as! ChangeDeviceViewController
|
|
let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "changeDevice") as! ChangeDeviceViewController
|
|
controller.isDismiss = { newThumb in
|
|
controller.isDismiss = { newThumb in
|
|
self.makeMenu(imageSignIn: newThumb)
|
|
self.makeMenu(imageSignIn: newThumb)
|
|
@@ -450,13 +450,13 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
|
|
|
|
|
|
private func actionLogin(for type: String, title: String) -> UIAlertAction? {
|
|
private func actionLogin(for type: String, title: String) -> UIAlertAction? {
|
|
return UIAlertAction(title: title, style: .default) { _ in
|
|
return UIAlertAction(title: title, style: .default) { _ in
|
|
- self.alert = UIAlertController(title: "Login as Admin".localized(), message: nil, preferredStyle: .alert)
|
|
|
|
|
|
+ self.alert = UIAlertController(title:"Access Admin Features".localized(), message: nil, preferredStyle: .alert)
|
|
if type == "internal" {
|
|
if type == "internal" {
|
|
- self.alert = UIAlertController(title: "Login as Internal Team".localized(), message: nil, preferredStyle: .alert)
|
|
|
|
|
|
+ self.alert = UIAlertController(title: "Access Internal Features".localized(), message: nil, preferredStyle: .alert)
|
|
}
|
|
}
|
|
self.textFields.removeAll()
|
|
self.textFields.removeAll()
|
|
self.alert?.addTextField{ (texfield) in
|
|
self.alert?.addTextField{ (texfield) in
|
|
- texfield.placeholder = "Password"
|
|
|
|
|
|
+ texfield.placeholder = "Password".localized()
|
|
texfield.isSecureTextEntry = true
|
|
texfield.isSecureTextEntry = true
|
|
texfield.addPadding(.right(40))
|
|
texfield.addPadding(.right(40))
|
|
texfield.addTarget(self, action: #selector(self.alertTextFieldDidChange(_:)), for: UIControl.Event.editingChanged)
|
|
texfield.addTarget(self, action: #selector(self.alertTextFieldDidChange(_:)), for: UIControl.Event.editingChanged)
|
|
@@ -469,7 +469,7 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
|
|
buttonHideUnhide.tintColor = .black
|
|
buttonHideUnhide.tintColor = .black
|
|
buttonHideUnhide.addTarget(self, action: #selector(self.showPassword), for: .touchUpInside)
|
|
buttonHideUnhide.addTarget(self, action: #selector(self.showPassword), for: .touchUpInside)
|
|
}
|
|
}
|
|
- let submitAction = UIAlertAction(title: "Sign In".localized(), style: .default, handler: { (action) -> Void in
|
|
|
|
|
|
+ let submitAction = UIAlertAction(title: "Login".localized(), style: .default, handler: { (action) -> Void in
|
|
let textField = self.alert?.textFields![0]
|
|
let textField = self.alert?.textFields![0]
|
|
if !CheckConnection.isConnectedToNetwork() || API.nGetCLXConnState() == 0 {
|
|
if !CheckConnection.isConnectedToNetwork() || API.nGetCLXConnState() == 0 {
|
|
let imageView = UIImageView(image: UIImage(systemName: "xmark.circle.fill"))
|
|
let imageView = UIImageView(image: UIImage(systemName: "xmark.circle.fill"))
|