Skip to content

Commit

Permalink
bugs fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
navrozhuda committed Jul 4, 2022
1 parent 6fc6a4f commit a026b38
Show file tree
Hide file tree
Showing 31 changed files with 9,501 additions and 8,994 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
filePath = "Liteapp/SceneDelegate.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "39"
endingLineNumber = "39"
startingLineNumber = "50"
endingLineNumber = "50"
landmarkName = "setUpIQKeyboardManager()"
landmarkType = "7">
</BreakpointContent>
Expand Down
21 changes: 21 additions & 0 deletions Liteapp/Assets.xcassets/triangleup.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "triangleup.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
344 changes: 172 additions & 172 deletions Liteapp/Base.lproj/Main.storyboard

Large diffs are not rendered by default.

18 changes: 8 additions & 10 deletions Liteapp/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,19 @@
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>com.lite.hr</string>
<key>CFBundleURLSchemes</key>
<array>
<string>lite.testbryteportal</string>
<string>navroz</string>
</array>
</dict>
</array>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>googlegmail</string>
<string>ms-outlook</string>
<string>readdle-spark</string>
<string>ymail</string>
</array>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
Expand All @@ -34,12 +39,5 @@
</array>
</dict>
</dict>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>googlegmail</string>
<string>ms-outlook</string>
<string>readdle-spark</string>
<string>ymail</string>
</array>
</dict>
</plist>
353 changes: 257 additions & 96 deletions Liteapp/Merchant.storyboard

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions Liteapp/Registration/DashBoardVC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -259,10 +259,9 @@ class DashBoardVC:BaseViewController, StoryboardSceneBased{
// self.showSucessMessage(strMessage: Localizable.Clockin.clockedout)
self.breakinSuccessPopup.isHidden = false
self.lblMessagebreakinPopup.text = "You are on lunch break!"
}else if event_type == UserStatus.loggedOut.rawValue {
}else if event_type == UserStatus.Endbreak.rawValue {
// self.showSucessMessage(strMessage: Localizable.Clockin.clockedout)
self.lblMessagebreakinPopup.text = ""
self.breakinSuccessPopup.isHidden = false
self.clockInSuccessPopup.isHidden = false
}
}else{
if let err = error{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ class EmployeeOnboardingVCStep3:BaseViewController, StoryboardSceneBased{

txtReferralCode.delegate = self
txtCompany.isUserInteractionEnabled = false
if let code = Utility().referralCode{
txtReferralCode.text = code
self.checkRefferalCode(code)
}
}

@IBAction func continueClicked(sender:UIButton){
Expand Down Expand Up @@ -84,6 +88,10 @@ extension EmployeeOnboardingVCStep3:UITextFieldDelegate{
func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {

if textField == self.txtReferralCode{
if string.count > 3{
//User did copy & paste
self.checkRefferalCode(string)
}
if textField.text!.count == 4{
return false
}else if textField.text!.count == 3{
Expand Down
101 changes: 73 additions & 28 deletions Liteapp/Registration/EmployeeTimeReportVC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import ObjectMapper
import Alamofire
import SwiftUI
import IQKeyboardManagerSwift
import MKToolTip

class MyButton : UIButton {
var weekIndex : Int = -1
Expand Down Expand Up @@ -80,6 +81,7 @@ class EmployeeTimeReportVC:BaseViewController, StoryboardSceneBased{
@IBOutlet weak var userinformationView: UIView!
@IBOutlet weak var timereportView: UIView!

@IBOutlet weak var editTooltipView: UIView!

@IBOutlet weak var selectedPayperiodLabel: UILabel!
@IBOutlet weak var txtselectedPayperiod: UITextField!
Expand All @@ -88,6 +90,8 @@ class EmployeeTimeReportVC:BaseViewController, StoryboardSceneBased{
@IBOutlet weak var saveView: UIView!
@IBOutlet weak var editView: UIView!

@IBOutlet weak var userinforStackview: UIView!

var isFromEmployee = false
var weekDates = [CustomDate]()
var selectedWeekIndex = 0
Expand Down Expand Up @@ -116,6 +120,12 @@ class EmployeeTimeReportVC:BaseViewController, StoryboardSceneBased{
self.userinformationView.isHidden = true
self.timereportView.isHidden = false
}

self.txtFirstName.delegate = self
self.txtLastName.delegate = self
self.txtEmail.delegate = self
self.txtjobtitle.delegate = self

tblEvents.addObserver(self, forKeyPath: #keyPath(UITableView.contentSize), options: [NSKeyValueObservingOptions.new], context: &myContext)
}
override func viewWillAppear(_ animated: Bool) {
Expand Down Expand Up @@ -193,12 +203,13 @@ class EmployeeTimeReportVC:BaseViewController, StoryboardSceneBased{
logoutView.isHidden = true
lblusername.text = "\(Defaults.shared.currentUser?.empFirstname ?? "") \(Defaults.shared.currentUser?.empLastname ?? "")"

txtFirstName.isUserInteractionEnabled = false
txtLastName.isUserInteractionEnabled = false
txtEmail.isUserInteractionEnabled = false
txtjobtitle.isUserInteractionEnabled = false
tblEvents.isUserInteractionEnabled = false
// txtFirstName.isUserInteractionEnabled = false
// txtLastName.isUserInteractionEnabled = false
// txtEmail.isUserInteractionEnabled = false
// txtjobtitle.isUserInteractionEnabled = false
// tblEvents.isUserInteractionEnabled = false

userinforStackview.alpha = 0.5

saveView.isHidden = true
editView.isUserInteractionEnabled = true
Expand Down Expand Up @@ -254,12 +265,19 @@ class EmployeeTimeReportVC:BaseViewController, StoryboardSceneBased{
}
@IBAction func editClick(sender:UIButton){


txtFirstName.isUserInteractionEnabled = true
txtLastName.isUserInteractionEnabled = true
txtEmail.isUserInteractionEnabled = true
txtjobtitle.isUserInteractionEnabled = true
tblEvents.isUserInteractionEnabled = true

txtFirstName.alpha = 1.0
txtLastName.alpha = 1.0
txtEmail.alpha = 1.0
txtjobtitle.alpha = 1.0
userinforStackview.alpha = 1.0


saveView.isHidden = false
editView.isUserInteractionEnabled = false
Expand Down Expand Up @@ -362,11 +380,11 @@ class EmployeeTimeReportVC:BaseViewController, StoryboardSceneBased{
}
@IBAction func saveClick(sender:UIButton){

txtFirstName.isUserInteractionEnabled = false
txtLastName.isUserInteractionEnabled = false
txtEmail.isUserInteractionEnabled = false
txtjobtitle.isUserInteractionEnabled = false
tblEvents.isUserInteractionEnabled = false
// txtFirstName.isUserInteractionEnabled = false
// txtLastName.isUserInteractionEnabled = false
// txtEmail.isUserInteractionEnabled = false
// txtjobtitle.isUserInteractionEnabled = false
// tblEvents.isUserInteractionEnabled = false


//call save api
Expand All @@ -390,17 +408,27 @@ class EmployeeTimeReportVC:BaseViewController, StoryboardSceneBased{
txtjobtitle.isUserInteractionEnabled = true
tblEvents.isUserInteractionEnabled = true

txtFirstName.alpha = 1.0
txtLastName.alpha = 1.0
txtEmail.alpha = 1.0
txtjobtitle.alpha = 1.0
userinforStackview.alpha = 1.0
saveView.isHidden = false
editView.isUserInteractionEnabled = false
editView.alpha = 0.5
}else{
txtFirstName.isUserInteractionEnabled = false
txtLastName.isUserInteractionEnabled = false
txtEmail.isUserInteractionEnabled = false
txtjobtitle.isUserInteractionEnabled = false
tblEvents.isUserInteractionEnabled = false

}else{
// txtFirstName.isUserInteractionEnabled = false
// txtLastName.isUserInteractionEnabled = false
// txtEmail.isUserInteractionEnabled = false
// txtjobtitle.isUserInteractionEnabled = false
// tblEvents.isUserInteractionEnabled = false

txtFirstName.alpha = 0.5
txtLastName.alpha = 0.5
txtEmail.alpha = 0.5
txtjobtitle.alpha = 0.5
userinforStackview.alpha = 0.5
saveView.isHidden = true
editView.isUserInteractionEnabled = true
editView.alpha = 1.0
Expand All @@ -409,12 +437,12 @@ class EmployeeTimeReportVC:BaseViewController, StoryboardSceneBased{

}
@IBAction func cancelClick(sender:UIButton){
txtFirstName.isUserInteractionEnabled = false
txtLastName.isUserInteractionEnabled = false
txtEmail.isUserInteractionEnabled = false
txtjobtitle.isUserInteractionEnabled = false
tblEvents.isUserInteractionEnabled = false

// txtFirstName.isUserInteractionEnabled = false
// txtLastName.isUserInteractionEnabled = false
// txtEmail.isUserInteractionEnabled = false
// txtjobtitle.isUserInteractionEnabled = false
// tblEvents.isUserInteractionEnabled = false
userinforStackview.alpha = 0.5
saveView.isHidden = true
editView.isUserInteractionEnabled = true
editView.alpha = 1.0
Expand Down Expand Up @@ -620,8 +648,31 @@ class EmployeeTimeReportVC:BaseViewController, StoryboardSceneBased{
self.weekDaysPopupView.isHidden = true

}
@IBAction func editTooltipOkClicked(){
self.editTooltipView.isHidden = true
}
}

extension EmployeeTimeReportVC:UITextFieldDelegate{
func textFieldDidBeginEditing(_ textField: UITextField) {
if editView.alpha == 1.0{
editTooltipView.isHidden = false
textField.resignFirstResponder()
}
}
func textFieldDidEndEditing(_ textField: UITextField) {
textField.resignFirstResponder()
}
func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {
if editView.alpha == 1.0{
//show tooltip
return false
}
return true

}

}
extension EmployeeTimeReportVC: UITableViewDelegate, UITableViewDataSource {

func numberOfSections(in tableView: UITableView) -> Int {
Expand Down Expand Up @@ -1295,12 +1346,6 @@ extension EmployeeTimeReportVC:MenuItemDelegate {
}
}
}

extension EmployeeTimeReportVC: UITextFieldDelegate{
func textFieldDidEndEditing(_ textField: UITextField) {
textField.resignFirstResponder()
}
}
extension String{
func toDate(dateFormat:String = DateTimeFormat.yyyy_MM_dd.rawValue)->Date{
let dateFormatter = DateFormatter()
Expand Down
6 changes: 5 additions & 1 deletion Liteapp/Registration/EmployeesVC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class EmployeesVC:BaseViewController, StoryboardSceneBased{
@IBOutlet weak var logoutView: UIView!
@IBOutlet weak var tblview: UITableView!
var employeeList = [Employee]()

var isFromProfileSetup = false
@IBOutlet weak var nameSortImageview: UIImageView!
@IBOutlet weak var jobTitleSortImageview: UIImageView!

Expand Down Expand Up @@ -52,6 +52,10 @@ class EmployeesVC:BaseViewController, StoryboardSceneBased{
}
override func viewWillAppear(_ animated: Bool) {
fetchEmployees()
if isFromProfileSetup{
let vc = CreateEmployeeVC.instantiate()
self.pushVC(controller:vc)
}
}
@IBAction func menuClicked(sender:UIButton){
self.present(menu, animated: true, completion: {})
Expand Down
2 changes: 1 addition & 1 deletion Liteapp/Registration/InviteViaEmailVC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class InviteViaEmailVC:BaseViewController, StoryboardSceneBased,MFMailComposeVie
super.viewDidLoad()

// Do any additional setup after loading the view.
inviteLink = "Hey! Please download our TimeClock App with the link below. \n Your referral code is \(Defaults.shared.currentUser?.merchantReferenceNumber ?? "").\n https://lite.testbryteportal.com/\(Defaults.shared.currentUser?.merchantReferenceNumber ?? "")"
inviteLink = "Hey! Please download our TimeClock App with the link below. \n Your referral code is \(Defaults.shared.currentUser?.merchantReferenceNumber ?? "").\n https://lite.testbryteportal.com/referral/\(Defaults.shared.currentUser?.merchantReferenceNumber ?? "")"
}
@IBAction func backClicked(sender:UIButton){
self.popVC()
Expand Down
25 changes: 23 additions & 2 deletions Liteapp/Registration/InviteViaRefferalLinkVC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,39 @@ class InviteViaRefferalLinkVC:BaseViewController,StoryboardSceneBased{

override func viewDidLoad() {
super.viewDidLoad()

//https://lite.testbryteportal.com/referral/NAS0
// Do any additional setup after loading the view.
inviteLink = "Hey! Please download our TimeClock App with the link below. \n Your referral code is \(Defaults.shared.currentUser?.merchantReferenceNumber ?? "").\n https://lite.testbryteportal.com/\(Defaults.shared.currentUser?.merchantReferenceNumber ?? "")"
inviteLink = "Hey! Please download our TimeClock App with the link below. \n Your referral code is \(Defaults.shared.currentUser?.merchantReferenceNumber ?? "").\n https://lite.testbryteportal.com/referral/\(Defaults.shared.currentUser?.merchantReferenceNumber ?? "")"
lblCode.text = "\(Defaults.shared.currentUser?.merchantReferenceNumber ?? "")"
}
@IBAction func backClicked(sender:UIButton){
self.popVC()
}
@IBAction func copyClicked(sender:UIButton){
UIPasteboard.general.string = "\(Defaults.shared.currentUser?.merchantReferenceNumber ?? "")"
self.showToast(message:"Copied to clipboard", font: UIFont.RobotoRegular(size:16.0))
}



}
extension UIViewController {

func showToast(message : String, font: UIFont) {

let toastLabel = UILabel(frame: CGRect(x: self.view.frame.size.width/2 - 75, y: self.view.frame.size.height-100, width: 150, height: 35))
toastLabel.backgroundColor = UIColor.black.withAlphaComponent(0.6)
toastLabel.textColor = UIColor.white
toastLabel.font = font
toastLabel.textAlignment = .center;
toastLabel.text = message
toastLabel.alpha = 1.0
toastLabel.layer.cornerRadius = 10;
toastLabel.clipsToBounds = true
self.view.addSubview(toastLabel)
UIView.animate(withDuration: 4.0, delay: 0.1, options: .curveEaseOut, animations: {
toastLabel.alpha = 0.0
}, completion: {(isCompleted) in
toastLabel.removeFromSuperview()
})
} }
2 changes: 1 addition & 1 deletion Liteapp/Registration/InviteViaTextVC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class InviteViaTextVC:BaseViewController, StoryboardSceneBased,MFMailComposeView
super.viewDidLoad()

// Do any additional setup after loading the view.
inviteLink = "Hey! Please download our TimeClock App with the link below. \n Your referral code is \(Defaults.shared.currentUser?.merchantReferenceNumber ?? "").\n https://lite.testbryteportal.com/\(Defaults.shared.currentUser?.merchantReferenceNumber ?? "")"
inviteLink = "Hey! Please download our TimeClock App with the link below. \n Your referral code is \(Defaults.shared.currentUser?.merchantReferenceNumber ?? "").\n https://lite.testbryteportal.com/referral/\(Defaults.shared.currentUser?.merchantReferenceNumber ?? "")"
// contacts = self.getContactFromCNContact()
contactList = ContactsModel.generateModelArray()
allContactList = contactList
Expand Down
Loading

0 comments on commit a026b38

Please sign in to comment.