- Made new module for Cart
- Finalised Listing of CartList - Added pull to refresh and swipe to delete - Handled manual delete on icon click - Made CouponCart listing view controller - Added api to fetch the coupons - Added api to apply coupon with model - Made a coupon discount stack , will show up
This commit is contained in:
@@ -41,6 +41,15 @@
|
||||
525327D92BFCDDF700F64283 /* AuthFuncStartupSoundHandling.swift in Sources */ = {isa = PBXBuildFile; fileRef = 525327D82BFCDDF700F64283 /* AuthFuncStartupSoundHandling.swift */; };
|
||||
5257B2652BDFB6F50086D79B /* CheckPhoneHomeBtnOrNotch.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5257B2642BDFB6F50086D79B /* CheckPhoneHomeBtnOrNotch.swift */; };
|
||||
5258464F2C491829004F074B /* connectedness.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5258464E2C491829004F074B /* connectedness.swift */; };
|
||||
525861D02C4F9E3200C33C79 /* SwipeTableViewFont.swift in Sources */ = {isa = PBXBuildFile; fileRef = 525861CF2C4F9E3200C33C79 /* SwipeTableViewFont.swift */; };
|
||||
525861D22C4FC6C000C33C79 /* CartPaymentOptionsVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 525861D12C4FC6C000C33C79 /* CartPaymentOptionsVC.swift */; };
|
||||
525861D42C4FCCB500C33C79 /* CartPaymentOptionsVM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 525861D32C4FCCB500C33C79 /* CartPaymentOptionsVM.swift */; };
|
||||
525861D72C4FD38D00C33C79 /* CartPaymentOptionsCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 525861D62C4FD38D00C33C79 /* CartPaymentOptionsCell.xib */; };
|
||||
525861D82C4FD38D00C33C79 /* CartPaymentOptionsCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 525861D52C4FD38D00C33C79 /* CartPaymentOptionsCell.swift */; };
|
||||
525861DA2C4FE71100C33C79 /* CouponListDM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 525861D92C4FE71100C33C79 /* CouponListDM.swift */; };
|
||||
525861DD2C4FE7A100C33C79 /* CouponCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 525861DC2C4FE7A100C33C79 /* CouponCell.xib */; };
|
||||
525861DE2C4FE7A100C33C79 /* CouponCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 525861DB2C4FE7A100C33C79 /* CouponCell.swift */; };
|
||||
525861E02C4FF16700C33C79 /* CouponApplyDM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 525861DF2C4FF16700C33C79 /* CouponApplyDM.swift */; };
|
||||
525953CF2BE8B28F00191286 /* Utilities.swift in Sources */ = {isa = PBXBuildFile; fileRef = 525953CE2BE8B28F00191286 /* Utilities.swift */; };
|
||||
525953D12BE8B2B200191286 /* LLSpinner.swift in Sources */ = {isa = PBXBuildFile; fileRef = 525953D02BE8B2B200191286 /* LLSpinner.swift */; };
|
||||
525953D42BE8B2DF00191286 /* UIApplication.swift in Sources */ = {isa = PBXBuildFile; fileRef = 525953D32BE8B2DF00191286 /* UIApplication.swift */; };
|
||||
@@ -108,6 +117,12 @@
|
||||
52A6DCB82C4E754800F63C51 /* ShopProductDM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52A6DCB72C4E754800F63C51 /* ShopProductDM.swift */; };
|
||||
52A6DCBB2C4EA46400F63C51 /* ShopProductsCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 52A6DCBA2C4EA46400F63C51 /* ShopProductsCell.xib */; };
|
||||
52A6DCBC2C4EA46400F63C51 /* ShopProductsCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52A6DCB92C4EA46400F63C51 /* ShopProductsCell.swift */; };
|
||||
52A6DCBF2C4F8E7C00F63C51 /* Cart.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 52A6DCBE2C4F8E7C00F63C51 /* Cart.storyboard */; };
|
||||
52A6DCC52C4F8EA800F63C51 /* CartListVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52A6DCC42C4F8EA800F63C51 /* CartListVC.swift */; };
|
||||
52A6DCC72C4F8FD000F63C51 /* CartListVM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52A6DCC62C4F8FD000F63C51 /* CartListVM.swift */; };
|
||||
52A6DCC92C4F906900F63C51 /* CartListingDM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52A6DCC82C4F906900F63C51 /* CartListingDM.swift */; };
|
||||
52A6DCCC2C4F929B00F63C51 /* CartListCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52A6DCCA2C4F929B00F63C51 /* CartListCell.swift */; };
|
||||
52A6DCCD2C4F929B00F63C51 /* CartListCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 52A6DCCB2C4F929B00F63C51 /* CartListCell.xib */; };
|
||||
52A981CE2C1AFE66000E0BEC /* FavouriteListingDM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52A981CD2C1AFE66000E0BEC /* FavouriteListingDM.swift */; };
|
||||
52A981D02C1AFEE8000E0BEC /* MyListVM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52A981CF2C1AFEE8000E0BEC /* MyListVM.swift */; };
|
||||
52A981D72C1B0E27000E0BEC /* FavouriteCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52A981D52C1B0E27000E0BEC /* FavouriteCell.swift */; };
|
||||
@@ -341,6 +356,15 @@
|
||||
5257B2642BDFB6F50086D79B /* CheckPhoneHomeBtnOrNotch.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CheckPhoneHomeBtnOrNotch.swift; sourceTree = "<group>"; };
|
||||
5258464E2C491829004F074B /* connectedness.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = connectedness.swift; sourceTree = "<group>"; };
|
||||
525846502C491A9E004F074B /* speedchecker-sdk-ios-master */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = "speedchecker-sdk-ios-master"; path = "../../Downloads/speedchecker-sdk-ios-master"; sourceTree = "<group>"; };
|
||||
525861CF2C4F9E3200C33C79 /* SwipeTableViewFont.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwipeTableViewFont.swift; sourceTree = "<group>"; };
|
||||
525861D12C4FC6C000C33C79 /* CartPaymentOptionsVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CartPaymentOptionsVC.swift; sourceTree = "<group>"; };
|
||||
525861D32C4FCCB500C33C79 /* CartPaymentOptionsVM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CartPaymentOptionsVM.swift; sourceTree = "<group>"; };
|
||||
525861D52C4FD38D00C33C79 /* CartPaymentOptionsCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CartPaymentOptionsCell.swift; sourceTree = "<group>"; };
|
||||
525861D62C4FD38D00C33C79 /* CartPaymentOptionsCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CartPaymentOptionsCell.xib; sourceTree = "<group>"; };
|
||||
525861D92C4FE71100C33C79 /* CouponListDM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CouponListDM.swift; sourceTree = "<group>"; };
|
||||
525861DB2C4FE7A100C33C79 /* CouponCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CouponCell.swift; sourceTree = "<group>"; };
|
||||
525861DC2C4FE7A100C33C79 /* CouponCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CouponCell.xib; sourceTree = "<group>"; };
|
||||
525861DF2C4FF16700C33C79 /* CouponApplyDM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CouponApplyDM.swift; sourceTree = "<group>"; };
|
||||
525953CE2BE8B28F00191286 /* Utilities.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Utilities.swift; sourceTree = "<group>"; };
|
||||
525953D02BE8B2B200191286 /* LLSpinner.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LLSpinner.swift; sourceTree = "<group>"; };
|
||||
525953D32BE8B2DF00191286 /* UIApplication.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIApplication.swift; sourceTree = "<group>"; };
|
||||
@@ -409,6 +433,12 @@
|
||||
52A6DCB72C4E754800F63C51 /* ShopProductDM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShopProductDM.swift; sourceTree = "<group>"; };
|
||||
52A6DCB92C4EA46400F63C51 /* ShopProductsCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShopProductsCell.swift; sourceTree = "<group>"; };
|
||||
52A6DCBA2C4EA46400F63C51 /* ShopProductsCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ShopProductsCell.xib; sourceTree = "<group>"; };
|
||||
52A6DCBE2C4F8E7C00F63C51 /* Cart.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Cart.storyboard; sourceTree = "<group>"; };
|
||||
52A6DCC42C4F8EA800F63C51 /* CartListVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CartListVC.swift; sourceTree = "<group>"; };
|
||||
52A6DCC62C4F8FD000F63C51 /* CartListVM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CartListVM.swift; sourceTree = "<group>"; };
|
||||
52A6DCC82C4F906900F63C51 /* CartListingDM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CartListingDM.swift; sourceTree = "<group>"; };
|
||||
52A6DCCA2C4F929B00F63C51 /* CartListCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CartListCell.swift; sourceTree = "<group>"; };
|
||||
52A6DCCB2C4F929B00F63C51 /* CartListCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CartListCell.xib; sourceTree = "<group>"; };
|
||||
52A981CD2C1AFE66000E0BEC /* FavouriteListingDM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FavouriteListingDM.swift; sourceTree = "<group>"; };
|
||||
52A981CF2C1AFEE8000E0BEC /* MyListVM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyListVM.swift; sourceTree = "<group>"; };
|
||||
52A981D52C1B0E27000E0BEC /* FavouriteCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FavouriteCell.swift; sourceTree = "<group>"; };
|
||||
@@ -722,6 +752,7 @@
|
||||
523ED25C2BDA2BC700CFED02 /* WOKA */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
52A6DCBD2C4F8E7300F63C51 /* Cart */,
|
||||
52A6DCAF2C4E621800F63C51 /* BadgedBarButtonItem.swift */,
|
||||
52A6DC942C4E385500F63C51 /* Shop */,
|
||||
9CB3D0832C37BA470062869D /* Karaoke */,
|
||||
@@ -1065,6 +1096,59 @@
|
||||
path = Model;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
52A6DCBD2C4F8E7300F63C51 /* Cart */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
52A6DCC32C4F8E8900F63C51 /* Model */,
|
||||
52A6DCC22C4F8E8700F63C51 /* View */,
|
||||
52A6DCC12C4F8E8500F63C51 /* ViewModel */,
|
||||
52A6DCC02C4F8E8300F63C51 /* Controller */,
|
||||
52A6DCBE2C4F8E7C00F63C51 /* Cart.storyboard */,
|
||||
);
|
||||
path = Cart;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
52A6DCC02C4F8E8300F63C51 /* Controller */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
52A6DCC42C4F8EA800F63C51 /* CartListVC.swift */,
|
||||
525861D12C4FC6C000C33C79 /* CartPaymentOptionsVC.swift */,
|
||||
);
|
||||
path = Controller;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
52A6DCC12C4F8E8500F63C51 /* ViewModel */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
52A6DCC62C4F8FD000F63C51 /* CartListVM.swift */,
|
||||
525861D32C4FCCB500C33C79 /* CartPaymentOptionsVM.swift */,
|
||||
);
|
||||
path = ViewModel;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
52A6DCC22C4F8E8700F63C51 /* View */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
52A6DCCA2C4F929B00F63C51 /* CartListCell.swift */,
|
||||
52A6DCCB2C4F929B00F63C51 /* CartListCell.xib */,
|
||||
525861D52C4FD38D00C33C79 /* CartPaymentOptionsCell.swift */,
|
||||
525861D62C4FD38D00C33C79 /* CartPaymentOptionsCell.xib */,
|
||||
525861DB2C4FE7A100C33C79 /* CouponCell.swift */,
|
||||
525861DC2C4FE7A100C33C79 /* CouponCell.xib */,
|
||||
);
|
||||
path = View;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
52A6DCC32C4F8E8900F63C51 /* Model */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
52A6DCC82C4F906900F63C51 /* CartListingDM.swift */,
|
||||
525861D92C4FE71100C33C79 /* CouponListDM.swift */,
|
||||
525861DF2C4FF16700C33C79 /* CouponApplyDM.swift */,
|
||||
);
|
||||
path = Model;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
52BFB52B2C33DA9700BAAE15 /* Audio Books */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -1155,6 +1239,7 @@
|
||||
5219C2C12C086D9B00A1DF4D /* DataTypeConversion.swift */,
|
||||
9C7939142C0F23AA00F5D6E6 /* NsNotificationExtension.swift */,
|
||||
9CB4C5A82C118EF300737C00 /* NavBarColor.swift */,
|
||||
525861CF2C4F9E3200C33C79 /* SwipeTableViewFont.swift */,
|
||||
);
|
||||
path = Helpers;
|
||||
sourceTree = "<group>";
|
||||
@@ -1709,11 +1794,13 @@
|
||||
527AC6FE2C173A5100434FB7 /* SongListCell.xib in Resources */,
|
||||
523ED26A2BDA2BC900CFED02 /* Base in Resources */,
|
||||
52C8B05B2BDA5924003B51D0 /* WokaSplashSound.m4a in Resources */,
|
||||
525861D72C4FD38D00C33C79 /* CartPaymentOptionsCell.xib in Resources */,
|
||||
52D6A24B2C21B43300145908 /* WebSeriesCell.xib in Resources */,
|
||||
52DAC6482C21762900E2F85B /* WebSeries.storyboard in Resources */,
|
||||
527AC6F82C171C8F00434FB7 /* BlogsCell.xib in Resources */,
|
||||
52A6DC962C4E387F00F63C51 /* Shop.storyboard in Resources */,
|
||||
52A981D82C1B0E27000E0BEC /* FavouriteCell.xib in Resources */,
|
||||
52A6DCBF2C4F8E7C00F63C51 /* Cart.storyboard in Resources */,
|
||||
52C1A4E82C05C95D007BAA50 /* Theme.storyboard in Resources */,
|
||||
526A436F2C36A97400AE148F /* Games.storyboard in Resources */,
|
||||
522D65652C1ACE9C0021E505 /* UserNotificationCell.xib in Resources */,
|
||||
@@ -1730,6 +1817,8 @@
|
||||
52BFB52D2C33DAA500BAAE15 /* AudioBooks.storyboard in Resources */,
|
||||
52A6DC9F2C4E3AA600F63C51 /* ShopListingCell.xib in Resources */,
|
||||
9C834ED52C1C1F9200B29A9C /* Exo2-Bold.ttf in Resources */,
|
||||
52A6DCCD2C4F929B00F63C51 /* CartListCell.xib in Resources */,
|
||||
525861DD2C4FE7A100C33C79 /* CouponCell.xib in Resources */,
|
||||
9C834ED62C1C1F9200B29A9C /* Exo2-ExtraBold.ttf in Resources */,
|
||||
9C834ED72C1C1F9200B29A9C /* Exo2-Regular.ttf in Resources */,
|
||||
9C834ED82C1C1F9200B29A9C /* Exo2-Thin.ttf in Resources */,
|
||||
@@ -1818,6 +1907,7 @@
|
||||
files = (
|
||||
9C535DC62C00BF2400DA6DCD /* HomeExploreCell.swift in Sources */,
|
||||
52D774EF2BDFC50D001D87DE /* StringValidations.swift in Sources */,
|
||||
52A6DCC52C4F8EA800F63C51 /* CartListVC.swift in Sources */,
|
||||
52D6A2512C22B58200145908 /* WebSeriesShowListingCell.swift in Sources */,
|
||||
9C007F232C25603800F798C2 /* WebSeriesEpisodeCell.swift in Sources */,
|
||||
5272FCE32BDFDB05000ECB1D /* UserDetailsRegisterVC.swift in Sources */,
|
||||
@@ -1833,9 +1923,11 @@
|
||||
529B0DD62C070C0F00CFC54B /* GuestDataDM.swift in Sources */,
|
||||
5259545C2BEBB80400191286 /* AvatarDM.swift in Sources */,
|
||||
52C8B06C2BDA6E87003B51D0 /* LocalizedString.swift in Sources */,
|
||||
52A6DCC72C4F8FD000F63C51 /* CartListVM.swift in Sources */,
|
||||
525953D42BE8B2DF00191286 /* UIApplication.swift in Sources */,
|
||||
52C8EC802C358E75002DC35C /* AudioBookDetailsVC.swift in Sources */,
|
||||
52CC38C32BDF812F00B74C3E /* LocalisedElements.swift in Sources */,
|
||||
52A6DCCC2C4F929B00F63C51 /* CartListCell.swift in Sources */,
|
||||
5259545E2BEBBA1A00191286 /* LoadingIndicatorImageView.swift in Sources */,
|
||||
52B8D4DC2C04A25E00ED65F3 /* Delegate.swift in Sources */,
|
||||
52CA28FC2BE11A0400708B49 /* UserIntrestVM.swift in Sources */,
|
||||
@@ -1850,6 +1942,7 @@
|
||||
52B8D4DF2C04A25E00ED65F3 /* StatusBar.swift in Sources */,
|
||||
5259541D2BE8D94400191286 /* QueueHelper.swift in Sources */,
|
||||
525954232BE8F00400191286 /* BaseResponseModel.swift in Sources */,
|
||||
525861E02C4FF16700C33C79 /* CouponApplyDM.swift in Sources */,
|
||||
52A6DCB42C4E73F100F63C51 /* ShopProductsVM.swift in Sources */,
|
||||
9C27E1692BDB76F200EC1DA9 /* OnBoardVM.swift in Sources */,
|
||||
9C7939172C0F23E900F5D6E6 /* LinkTypeEnum.swift in Sources */,
|
||||
@@ -1881,6 +1974,7 @@
|
||||
52BC3BF22C170264002FACA6 /* MoreVM.swift in Sources */,
|
||||
9CB3D08F2C37D0D60062869D /* KaraokeListingDM.swift in Sources */,
|
||||
9CBE1B412C0F37B300CA6E61 /* DPDUIView+Extension.swift in Sources */,
|
||||
525861DE2C4FE7A100C33C79 /* CouponCell.swift in Sources */,
|
||||
9C27E1632BDB6F1900EC1DA9 /* AuthFunc.swift in Sources */,
|
||||
9C0A85412BEE35670093783D /* ResetPassUserNameVM.swift in Sources */,
|
||||
52C6E0292BE3B52500E22D59 /* SelectAvatarVM.swift in Sources */,
|
||||
@@ -1897,6 +1991,8 @@
|
||||
52D774ED2BDFC13F001D87DE /* OTPVM.swift in Sources */,
|
||||
52D23F112C465E6F003E743A /* LogoutPopupVC.swift in Sources */,
|
||||
525327D62BFCC23600F64283 /* SideMenuVM.swift in Sources */,
|
||||
525861D22C4FC6C000C33C79 /* CartPaymentOptionsVC.swift in Sources */,
|
||||
525861DA2C4FE71100C33C79 /* CouponListDM.swift in Sources */,
|
||||
9CBCB2A32BE50C95007D7934 /* ResetPassUserNameVC.swift in Sources */,
|
||||
52A3F6A52BECBA8D0000BB0B /* LinkedChildDM.swift in Sources */,
|
||||
52B8D4DE2C04A25E00ED65F3 /* SideMenuController.swift in Sources */,
|
||||
@@ -1940,6 +2036,7 @@
|
||||
522D655E2C1ACCF40021E505 /* UserNotificationDM.swift in Sources */,
|
||||
9C1C69FC2C106C240035B2C7 /* ContactSupportVM.swift in Sources */,
|
||||
52AF71F22C36B77B00BC5972 /* GamesDetailVC.swift in Sources */,
|
||||
525861D42C4FCCB500C33C79 /* CartPaymentOptionsVM.swift in Sources */,
|
||||
52A3F6AF2BECC0690000BB0B /* LinkedChildVM.swift in Sources */,
|
||||
52A6DCB02C4E621800F63C51 /* BadgedBarButtonItem.swift in Sources */,
|
||||
52C8EC7D2C3536E5002DC35C /* ContinueAudioCell.swift in Sources */,
|
||||
@@ -1991,6 +2088,7 @@
|
||||
522242682BFC74380085C632 /* TabBarVC.swift in Sources */,
|
||||
5242FE592C24203E0086A86D /* WebSeriesSeasonVC.swift in Sources */,
|
||||
9C27E1722BDB86B600EC1DA9 /* OnBoardCell.swift in Sources */,
|
||||
525861D82C4FD38D00C33C79 /* CartPaymentOptionsCell.swift in Sources */,
|
||||
529B0DD42C06156B00CFC54B /* LoginNavVC.swift in Sources */,
|
||||
52A981D72C1B0E27000E0BEC /* FavouriteCell.swift in Sources */,
|
||||
52C8B05F2BDA5AFA003B51D0 /* SplashVM.swift in Sources */,
|
||||
@@ -2014,11 +2112,13 @@
|
||||
525954342BEA620800191286 /* IntrestTopicDM.swift in Sources */,
|
||||
52BC3BE52C0E0326002FACA6 /* FaqCell.swift in Sources */,
|
||||
52663FF52BDFAB830001D8CE /* TextFieldErrorView.swift in Sources */,
|
||||
525861D02C4F9E3200C33C79 /* SwipeTableViewFont.swift in Sources */,
|
||||
5258464F2C491829004F074B /* connectedness.swift in Sources */,
|
||||
9CBE1B452C0F37B300CA6E61 /* DropDownCell.swift in Sources */,
|
||||
9C27E16D2BDB852F00EC1DA9 /* GVar.swift in Sources */,
|
||||
52B8D4E02C04A25E00ED65F3 /* UIView+Container.swift in Sources */,
|
||||
9C56E8462BDBEE6400E4CA14 /* EmailVC.swift in Sources */,
|
||||
52A6DCC92C4F906900F63C51 /* CartListingDM.swift in Sources */,
|
||||
522D65622C1ACDA40021E505 /* CommonNwCall.swift in Sources */,
|
||||
52D6A2482C21A3A500145908 /* WebSeriesVM.swift in Sources */,
|
||||
525327D92BFCDDF700F64283 /* AuthFuncStartupSoundHandling.swift in Sources */,
|
||||
|
||||
26
WOKA/Assets/Assets.xcassets/Shop/DeleteIcon.imageset/Contents.json
vendored
Normal file
26
WOKA/Assets/Assets.xcassets/Shop/DeleteIcon.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "delete-3-svgrepo-com.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "delete-3-svgrepo-com@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "delete-3-svgrepo-com@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
},
|
||||
"properties" : {
|
||||
"template-rendering-intent" : "template"
|
||||
}
|
||||
}
|
||||
BIN
WOKA/Assets/Assets.xcassets/Shop/DeleteIcon.imageset/delete-3-svgrepo-com.png
vendored
Normal file
BIN
WOKA/Assets/Assets.xcassets/Shop/DeleteIcon.imageset/delete-3-svgrepo-com.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 240 B |
BIN
WOKA/Assets/Assets.xcassets/Shop/DeleteIcon.imageset/delete-3-svgrepo-com@2x.png
vendored
Normal file
BIN
WOKA/Assets/Assets.xcassets/Shop/DeleteIcon.imageset/delete-3-svgrepo-com@2x.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 449 B |
BIN
WOKA/Assets/Assets.xcassets/Shop/DeleteIcon.imageset/delete-3-svgrepo-com@3x.png
vendored
Normal file
BIN
WOKA/Assets/Assets.xcassets/Shop/DeleteIcon.imageset/delete-3-svgrepo-com@3x.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 655 B |
24
WOKA/Assets/Assets.xcassets/Shop/TrashCan.imageset/Contents.json
vendored
Normal file
24
WOKA/Assets/Assets.xcassets/Shop/TrashCan.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "trash-bin.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
},
|
||||
"properties" : {
|
||||
"template-rendering-intent" : "template"
|
||||
}
|
||||
}
|
||||
BIN
WOKA/Assets/Assets.xcassets/Shop/TrashCan.imageset/trash-bin.png
vendored
Normal file
BIN
WOKA/Assets/Assets.xcassets/Shop/TrashCan.imageset/trash-bin.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 506 B |
@@ -1329,17 +1329,17 @@ Sent to Your Parent’s Email</string>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="BackgroundSplash" translatesAutoresizingMaskIntoConstraints="NO" id="kVU-tZ-Qxe">
|
||||
<rect key="frame" x="0.0" y="0.0" width="430" height="932"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="428" height="932"/>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="WokaLogo" translatesAutoresizingMaskIntoConstraints="NO" id="Ux8-r9-rZb">
|
||||
<rect key="frame" x="145" y="50" width="140" height="52.666666666666657"/>
|
||||
<rect key="frame" x="144" y="50" width="140" height="52.666666666666657"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" secondItem="Ux8-r9-rZb" secondAttribute="height" multiplier="8:3" id="3Bo-85-Opy"/>
|
||||
<constraint firstAttribute="width" constant="140" id="abR-fA-jTS"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="60" translatesAutoresizingMaskIntoConstraints="NO" id="OXs-y6-ZlP">
|
||||
<rect key="frame" x="36" y="132.66666666666669" width="374" height="675.33333333333326"/>
|
||||
<rect key="frame" x="34" y="132.66666666666669" width="374" height="675.33333333333326"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Your Email Looks Familiar!" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="wlw-Ne-TMy" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
|
||||
<rect key="frame" x="10" y="0.0" width="354" height="29"/>
|
||||
@@ -1367,10 +1367,10 @@ Sent to Your Parent’s Email</string>
|
||||
<edgeInsets key="layoutMargins" top="0.0" left="10" bottom="0.0" right="10"/>
|
||||
</stackView>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="35" translatesAutoresizingMaskIntoConstraints="NO" id="xXI-1K-L56">
|
||||
<rect key="frame" x="30" y="828" width="370" height="50"/>
|
||||
<rect key="frame" x="30" y="828" width="368" height="50"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Sli-1N-tGE" customClass="LocalisedElementsButton" customModule="WOKA" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="370" height="50"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="368" height="50"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="50" id="jaN-n0-fQU"/>
|
||||
</constraints>
|
||||
|
||||
396
WOKA/Cart/Cart.storyboard
Normal file
396
WOKA/Cart/Cart.storyboard
Normal file
@@ -0,0 +1,396 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina6_12" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/>
|
||||
<capability name="Named colors" minToolsVersion="9.0"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<customFonts key="customFonts">
|
||||
<array key="Exo2-Bold.ttf">
|
||||
<string>Exo2-Bold</string>
|
||||
</array>
|
||||
<array key="Exo2-Regular.ttf">
|
||||
<string>Exo2-Regular</string>
|
||||
</array>
|
||||
</customFonts>
|
||||
<scenes>
|
||||
<!--Cart ListVC-->
|
||||
<scene sceneID="s0d-6b-0kx">
|
||||
<objects>
|
||||
<viewController storyboardIdentifier="CartListVC" id="Y6W-OH-hqX" customClass="CartListVC" customModule="WOKA" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<view key="view" contentMode="scaleToFill" id="5EZ-qb-Rvc">
|
||||
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="ps3-jx-FQy">
|
||||
<rect key="frame" x="0.0" y="59" width="393" height="635.66666666666663"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</tableView>
|
||||
<stackView hidden="YES" opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="js7-GH-et3">
|
||||
<rect key="frame" x="71.666666666666671" y="276.66666666666669" width="249.66666666666663" height="200"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="SupportGirlImage" translatesAutoresizingMaskIntoConstraints="NO" id="tLb-Z0-okz">
|
||||
<rect key="frame" x="0.0" y="0.0" width="249.66666666666666" height="166"/>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Browse Shop to add items." textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bGT-dH-3MW" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="176" width="249.66666666666666" height="24"/>
|
||||
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="20"/>
|
||||
<color key="textColor" name="TextDarkBlue"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
</stackView>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="13" translatesAutoresizingMaskIntoConstraints="NO" id="82Y-4J-aTR">
|
||||
<rect key="frame" x="15" y="709.66666666666663" width="363" height="98.333333333333371"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="e4l-pV-7sR">
|
||||
<rect key="frame" x="0.0" y="0.0" width="363" height="0.66666666666666663"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="0.69999999999999996" id="lSI-3U-QLx"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" distribution="equalSpacing" translatesAutoresizingMaskIntoConstraints="NO" id="QuL-PJ-Oz3">
|
||||
<rect key="frame" x="0.0" y="13.666666666666744" width="363" height="21.666666666666671"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Total:" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="DO4-PA-00W" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="48" height="21.666666666666668"/>
|
||||
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="18"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Rs. 0" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0A4-Z2-5iu" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
|
||||
<rect key="frame" x="322" y="0.0" width="41" height="21.666666666666668"/>
|
||||
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="18"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
</stackView>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="rBM-1y-r0e" customClass="LocalisedElementsButton" customModule="WOKA" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="48.333333333333371" width="363" height="50"/>
|
||||
<color key="backgroundColor" red="0.035294117647058823" green="0.0" blue="0.36470588235294116" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="50" id="n6f-g2-3kT">
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<integer key="value" value="25"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</constraint>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="18"/>
|
||||
<color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" title="Checkout">
|
||||
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</state>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<integer key="value" value="25"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="checkoutBtnTapped:" destination="Y6W-OH-hqX" eventType="touchUpInside" id="MUq-v7-hcm"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
</stackView>
|
||||
</subviews>
|
||||
<viewLayoutGuide key="safeArea" id="vDu-zF-Fre"/>
|
||||
<color key="backgroundColor" systemColor="systemGreenColor"/>
|
||||
<constraints>
|
||||
<constraint firstItem="82Y-4J-aTR" firstAttribute="top" secondItem="ps3-jx-FQy" secondAttribute="bottom" constant="15" id="40j-QP-WcF"/>
|
||||
<constraint firstItem="ps3-jx-FQy" firstAttribute="top" secondItem="vDu-zF-Fre" secondAttribute="top" id="GxG-U0-lsF"/>
|
||||
<constraint firstItem="js7-GH-et3" firstAttribute="centerY" secondItem="ps3-jx-FQy" secondAttribute="centerY" id="MzS-lw-GBa"/>
|
||||
<constraint firstItem="vDu-zF-Fre" firstAttribute="trailing" secondItem="82Y-4J-aTR" secondAttribute="trailing" constant="15" id="OBf-P4-H5h"/>
|
||||
<constraint firstItem="vDu-zF-Fre" firstAttribute="trailing" secondItem="ps3-jx-FQy" secondAttribute="trailing" id="QJW-Tu-q8M"/>
|
||||
<constraint firstItem="82Y-4J-aTR" firstAttribute="leading" secondItem="vDu-zF-Fre" secondAttribute="leading" constant="15" id="SQf-Nf-euc"/>
|
||||
<constraint firstItem="ps3-jx-FQy" firstAttribute="leading" secondItem="vDu-zF-Fre" secondAttribute="leading" id="az7-kO-MHk"/>
|
||||
<constraint firstItem="js7-GH-et3" firstAttribute="centerX" secondItem="ps3-jx-FQy" secondAttribute="centerX" id="itJ-So-HpC"/>
|
||||
<constraint firstItem="vDu-zF-Fre" firstAttribute="bottom" secondItem="82Y-4J-aTR" secondAttribute="bottom" constant="10" id="m8t-lr-mdP"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<connections>
|
||||
<outlet property="checkoutBtn" destination="rBM-1y-r0e" id="wpF-D2-E7y"/>
|
||||
<outlet property="noDataStack" destination="js7-GH-et3" id="pOx-kO-LEi"/>
|
||||
<outlet property="tableView" destination="ps3-jx-FQy" id="LVw-4t-g5G"/>
|
||||
<outlet property="totalPrice" destination="0A4-Z2-5iu" id="Uma-Bw-FeN"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="Ief-a0-LHa" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="132" y="-34"/>
|
||||
</scene>
|
||||
<!--Cart Payment OptionsVC-->
|
||||
<scene sceneID="Igi-rP-Tdk">
|
||||
<objects>
|
||||
<viewController storyboardIdentifier="CartPaymentOptionsVC" id="lm3-5q-Mwn" customClass="CartPaymentOptionsVC" customModule="WOKA" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<view key="view" contentMode="scaleToFill" id="Qtr-gk-eud">
|
||||
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Y68-eb-iI3">
|
||||
<rect key="frame" x="0.0" y="74" width="393" height="744"/>
|
||||
<subviews>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="4FL-Qu-GXb">
|
||||
<rect key="frame" x="0.0" y="0.0" width="393" height="455.66666666666669"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Order Summary" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fbh-Ve-yLY" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
|
||||
<rect key="frame" x="5" y="4.9999999999999982" width="383" height="23.333333333333329"/>
|
||||
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="20"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" scrollEnabled="NO" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="qGY-nv-azT">
|
||||
<rect key="frame" x="5" y="38.333333333333329" width="383" height="99.999999999999986"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="100" id="cQ3-vj-QS5"/>
|
||||
</constraints>
|
||||
</tableView>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="ZuF-hT-QwS">
|
||||
<rect key="frame" x="5" y="148.33333333333334" width="383" height="50"/>
|
||||
<subviews>
|
||||
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="Enter coupon code" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="0cZ-tT-3PH" customClass="TextFieldShadow" customModule="WOKA" customModuleProvider="target">
|
||||
<rect key="frame" x="5" y="0.0" width="273" height="50"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<color key="tintColor" name="TextDarkBlue"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="50" id="2Ap-do-tSE"/>
|
||||
</constraints>
|
||||
<color key="textColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<fontDescription key="fontDescription" name="Exo2-Regular" family="Exo 2" pointSize="16"/>
|
||||
<textInputTraits key="textInputTraits" autocorrectionType="no" enablesReturnKeyAutomatically="YES"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="paddingLeftCustom">
|
||||
<real key="value" value="25"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="paddingRightCustom">
|
||||
<real key="value" value="25"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</textField>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="hLf-a9-uIi" customClass="LocalisedElementsButton" customModule="WOKA" customModuleProvider="target">
|
||||
<rect key="frame" x="288" y="0.0" width="90" height="50"/>
|
||||
<color key="backgroundColor" red="0.035294117649999998" green="0.0" blue="0.36470588240000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="90" id="AF1-MJ-EsE"/>
|
||||
<constraint firstAttribute="height" constant="50" id="G1D-NK-ekh">
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<integer key="value" value="25"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</constraint>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="18"/>
|
||||
<color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" title="Apply">
|
||||
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</state>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<integer key="value" value="25"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="applyBtnTapped:" destination="lm3-5q-Mwn" eventType="touchUpInside" id="D8q-xB-lfx"/>
|
||||
<action selector="checkoutBtnTapped:" destination="Y6W-OH-hqX" eventType="touchUpInside" id="xSr-bc-1cZ"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<edgeInsets key="layoutMargins" top="0.0" left="5" bottom="0.0" right="5"/>
|
||||
</stackView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="0M5-Sk-NNP">
|
||||
<rect key="frame" x="5" y="208.33333333333331" width="383" height="0.66666666666665719"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="0.69999999999999996" id="euT-bu-DWE"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Hjo-i3-vzd">
|
||||
<rect key="frame" x="5" y="219" width="383" height="34.333333333333343"/>
|
||||
<color key="tintColor" red="0.035294117649999998" green="0.0" blue="0.36470588240000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" title="All Offers & Coupons" image="chevron.forward.circle.fill" catalog="system"/>
|
||||
<buttonConfiguration key="configuration" style="plain" image="chevron.forward.circle.fill" catalog="system" imagePlacement="trailing" title="All Offers & Coupons" imagePadding="10"/>
|
||||
<connections>
|
||||
<action selector="offerCouponBtnTapped:" destination="lm3-5q-Mwn" eventType="touchUpInside" id="6ec-0S-Ymm"/>
|
||||
</connections>
|
||||
</button>
|
||||
<tableView hidden="YES" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="kB1-D9-Jpc">
|
||||
<rect key="frame" x="5" y="258.33333333333331" width="383" height="0.0"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" id="Uhk-ez-kna"/>
|
||||
</constraints>
|
||||
</tableView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="PfV-Yj-8cg">
|
||||
<rect key="frame" x="5" y="263.33333333333331" width="383" height="0.66666666666668561"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="0.69999999999999996" id="4xH-CV-oza"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="20" translatesAutoresizingMaskIntoConstraints="NO" id="IIC-eN-1kV">
|
||||
<rect key="frame" x="5" y="274" width="383" height="82.666666666666686"/>
|
||||
<subviews>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" distribution="equalSpacing" translatesAutoresizingMaskIntoConstraints="NO" id="0fF-q8-366">
|
||||
<rect key="frame" x="0.0" y="0.0" width="383" height="21"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Subtotal: " textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="X02-Xy-T6S" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="78" height="21"/>
|
||||
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="18"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Rs. 0" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="VJO-dL-zw7" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
|
||||
<rect key="frame" x="341.33333333333331" y="0.0" width="41.666666666666686" height="21"/>
|
||||
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="18"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
</stackView>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" distribution="equalSpacing" translatesAutoresizingMaskIntoConstraints="NO" id="ozO-f8-8kT">
|
||||
<rect key="frame" x="0.0" y="41" width="383" height="21"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Discount: " textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SjJ-9G-tNV" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="81.666666666666671" height="21"/>
|
||||
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="18"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Rs. 0" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Aru-WM-a5c" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
|
||||
<rect key="frame" x="341.33333333333331" y="0.0" width="41.666666666666686" height="21"/>
|
||||
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="18"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
</stackView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="VUT-AU-unP">
|
||||
<rect key="frame" x="0.0" y="82" width="383" height="0.6666666666666714"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="0.69999999999999996" id="JTK-Tg-kDT"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
</stackView>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="13" translatesAutoresizingMaskIntoConstraints="NO" id="qF1-U6-f3P">
|
||||
<rect key="frame" x="5" y="366.66666666666669" width="383" height="84"/>
|
||||
<subviews>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" distribution="equalSpacing" translatesAutoresizingMaskIntoConstraints="NO" id="YSF-eO-Ree">
|
||||
<rect key="frame" x="0.0" y="0.0" width="383" height="21"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Total Amount: " textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mDO-yI-336" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="116.33333333333333" height="21"/>
|
||||
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="18"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Rs. 0" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lH2-35-Ttu" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
|
||||
<rect key="frame" x="341.33333333333331" y="0.0" width="41.666666666666686" height="21"/>
|
||||
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="18"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
</stackView>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="rp4-qX-3OH" customClass="LocalisedElementsButton" customModule="WOKA" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="34" width="383" height="50"/>
|
||||
<color key="backgroundColor" red="0.035294117649999998" green="0.0" blue="0.36470588240000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="50" id="UFU-ci-N8q">
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<integer key="value" value="25"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</constraint>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="18"/>
|
||||
<color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" title="CONFIRM">
|
||||
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</state>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<integer key="value" value="25"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="checkoutBtnTapped:" destination="Y6W-OH-hqX" eventType="touchUpInside" id="HrW-XS-8za"/>
|
||||
<action selector="confirmBtnTapped:" destination="lm3-5q-Mwn" eventType="touchUpInside" id="bOx-qn-YYu"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
</stackView>
|
||||
</subviews>
|
||||
<edgeInsets key="layoutMargins" top="5" left="5" bottom="5" right="5"/>
|
||||
</stackView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="4FL-Qu-GXb" firstAttribute="top" secondItem="Y68-eb-iI3" secondAttribute="top" id="3bR-XE-nFb"/>
|
||||
<constraint firstItem="lDU-14-5MK" firstAttribute="trailing" secondItem="4FL-Qu-GXb" secondAttribute="trailing" id="4bG-ZU-qDL"/>
|
||||
<constraint firstItem="4FL-Qu-GXb" firstAttribute="leading" secondItem="lDU-14-5MK" secondAttribute="leading" id="7y9-cK-NmJ"/>
|
||||
<constraint firstItem="4FL-Qu-GXb" firstAttribute="width" secondItem="UOo-oh-s88" secondAttribute="width" id="IjY-v7-0Pu"/>
|
||||
<constraint firstAttribute="bottom" secondItem="4FL-Qu-GXb" secondAttribute="bottom" id="c68-Ls-V7j"/>
|
||||
</constraints>
|
||||
<viewLayoutGuide key="contentLayoutGuide" id="UOo-oh-s88"/>
|
||||
<viewLayoutGuide key="frameLayoutGuide" id="lDU-14-5MK"/>
|
||||
</scrollView>
|
||||
</subviews>
|
||||
<viewLayoutGuide key="safeArea" id="JMb-wJ-Nw4"/>
|
||||
<color key="backgroundColor" systemColor="systemGreenColor"/>
|
||||
<constraints>
|
||||
<constraint firstItem="Y68-eb-iI3" firstAttribute="trailing" secondItem="JMb-wJ-Nw4" secondAttribute="trailing" id="9Xk-Eg-bJm"/>
|
||||
<constraint firstItem="Y68-eb-iI3" firstAttribute="leading" secondItem="JMb-wJ-Nw4" secondAttribute="leading" id="Mgs-sm-hcj"/>
|
||||
<constraint firstItem="Y68-eb-iI3" firstAttribute="bottom" secondItem="JMb-wJ-Nw4" secondAttribute="bottom" id="hPj-lZ-JAl"/>
|
||||
<constraint firstItem="Y68-eb-iI3" firstAttribute="top" secondItem="JMb-wJ-Nw4" secondAttribute="top" constant="15" id="k5K-0b-4aY"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<connections>
|
||||
<outlet property="cartTableHeight" destination="cQ3-vj-QS5" id="etf-0A-WQV"/>
|
||||
<outlet property="cartTableView" destination="qGY-nv-azT" id="T2q-Sf-2aO"/>
|
||||
<outlet property="confirmBtn" destination="rp4-qX-3OH" id="xJQ-Rf-Bxz"/>
|
||||
<outlet property="couponAplliedStack" destination="IIC-eN-1kV" id="OGU-aS-hyh"/>
|
||||
<outlet property="couponCodeTF" destination="0cZ-tT-3PH" id="ITI-Fj-8r1"/>
|
||||
<outlet property="couponTableHeght" destination="Uhk-ez-kna" id="coX-6q-rQf"/>
|
||||
<outlet property="couponTableView" destination="kB1-D9-Jpc" id="Wqz-Rk-gfW"/>
|
||||
<outlet property="discountPrice" destination="Aru-WM-a5c" id="3Uo-mk-J79"/>
|
||||
<outlet property="scrollView" destination="Y68-eb-iI3" id="skF-g0-NEj"/>
|
||||
<outlet property="subtotalPrice" destination="VJO-dL-zw7" id="HIb-E5-in0"/>
|
||||
<outlet property="totalCartPrice" destination="lH2-35-Ttu" id="QiM-3w-f0q"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="Jy8-FK-dh0" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="907.63358778625945" y="-35.211267605633807"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<designables>
|
||||
<designable name="0cZ-tT-3PH">
|
||||
<size key="intrinsicContentSize" width="186.66666666666666" height="20.333333333333332"/>
|
||||
</designable>
|
||||
</designables>
|
||||
<resources>
|
||||
<image name="SupportGirlImage" width="166" height="166"/>
|
||||
<image name="chevron.forward.circle.fill" catalog="system" width="128" height="123"/>
|
||||
<namedColor name="TextDarkBlue">
|
||||
<color red="0.10599999874830246" green="0.050999999046325684" blue="0.60399997234344482" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</namedColor>
|
||||
<systemColor name="systemGreenColor">
|
||||
<color red="0.20392156862745098" green="0.7803921568627451" blue="0.34901960784313724" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</systemColor>
|
||||
</resources>
|
||||
</document>
|
||||
120
WOKA/Cart/Controller/CartListVC.swift
Normal file
120
WOKA/Cart/Controller/CartListVC.swift
Normal file
@@ -0,0 +1,120 @@
|
||||
//
|
||||
// CartListVC.swift
|
||||
// WOKA
|
||||
//
|
||||
// Created by MacBook Pro on 23/07/24.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class CartListVC: UIViewController {
|
||||
|
||||
@IBOutlet weak var tableView: UITableView!
|
||||
@IBOutlet weak var totalPrice: LocalisedElementsLabel!
|
||||
@IBOutlet weak var noDataStack: UIStackView!
|
||||
@IBOutlet weak var checkoutBtn: LocalisedElementsButton!
|
||||
var vm = CartListVM()
|
||||
|
||||
// MARK: - Life Cycle
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
vm.vc = self
|
||||
vm.initView()
|
||||
navigationController?.navigationBar.setBackgroundImage(UIImage(), for: .default)
|
||||
navigationController?.navigationBar.shadowImage = UIImage()
|
||||
}
|
||||
|
||||
override func viewWillAppear(_ animated: Bool) {
|
||||
super.viewWillAppear(animated)
|
||||
navigationController?.setNavigationBarHidden(false, animated: animated)
|
||||
}
|
||||
|
||||
override func viewDidAppear(_ animated: Bool) {
|
||||
self.navigationController?.setColor(color: .white)
|
||||
|
||||
}
|
||||
|
||||
override func viewWillDisappear(_ animated: Bool) {
|
||||
super.viewWillDisappear(animated)
|
||||
self.navigationController?.setNavigationBarHidden(true, animated: animated)
|
||||
}
|
||||
|
||||
override func viewDidDisappear(_ animated: Bool) {
|
||||
super.viewDidDisappear(animated)
|
||||
|
||||
// Customize the navigation bar's appearance
|
||||
self.navigationController?.setColor(color: .black)
|
||||
}
|
||||
|
||||
// MARK: - Tap Handler
|
||||
|
||||
@IBAction func checkoutBtnTapped(_ sender: LocalisedElementsButton) {
|
||||
let sb = UIStoryboard(name: K.StoryBoard.cart, bundle: nil)
|
||||
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.Cart.cartPaymentOptionsVC) as! CartPaymentOptionsVC
|
||||
vcPush.vm.cartListData = vm.cartListData
|
||||
vcPush.vm.cartTotalPrice = vm.totalAmount
|
||||
self.navigationController?.pushViewController(vcPush, animated: true)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - TableView DataSource , Delegates
|
||||
|
||||
extension CartListVC : TableViewSRC{
|
||||
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
|
||||
return vm.cartListData.count
|
||||
}
|
||||
|
||||
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
||||
let cell = tableView.dequeueReusableCell(withIdentifier: K.CellIdentifier.Cart.cartListCell) as! CartListCell
|
||||
let data = vm.cartListData[indexPath.row]
|
||||
cell.setData(data: data)
|
||||
cell.btnTapped = { [weak self] () -> Void in
|
||||
guard let self else{return}
|
||||
handleMoveToTrash(indexPath: indexPath.row)
|
||||
}
|
||||
return cell
|
||||
}
|
||||
|
||||
func tableView(_ tableView: UITableView,trailingSwipeActionsConfigurationForRowAt indexPath: IndexPath) -> UISwipeActionsConfiguration?{
|
||||
|
||||
// Trash action
|
||||
let trash = UIContextualAction(style: .destructive,title: "Delete") { [weak self] (action, view, completionHandler) in
|
||||
self?.handleMoveToTrash(indexPath: indexPath.row)
|
||||
completionHandler(true)
|
||||
}
|
||||
trash.backgroundColor = UIColor.red
|
||||
trash.image = UIImage(named: "DeleteIcon")?.withTintColor(UIColor.white)
|
||||
|
||||
tableView.swipeGestureFont(font: FontCustom.shareInstance.customFont(fontName: .Exo2_Medium, size: 14))
|
||||
|
||||
let configuration = UISwipeActionsConfiguration(actions: [trash])
|
||||
// If you do not want an action to run with a full swipe
|
||||
configuration.performsFirstActionWithFullSwipe = false
|
||||
return configuration
|
||||
}
|
||||
|
||||
private func handleMoveToTrash(indexPath : Int) {
|
||||
let sb = UIStoryboard(name: K.StoryBoard.customAlerts, bundle: nil)
|
||||
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.CustomAlerts.yesNoAlertVC) as! YesNoAlertVC
|
||||
vcPush.mainTitleText = "Alert!"
|
||||
vcPush.contentLabel = "Are you sure you want to remove item from cart?"
|
||||
vcPush.yesBtnText = "Remove"
|
||||
vcPush.noBtnText = "Cancel"
|
||||
vcPush.onDoneBlock = { [weak self] mode in
|
||||
switch mode{
|
||||
case .yes:
|
||||
guard let self else{return}
|
||||
if let shopMasterID = vm.cartListData[indexPath].id{
|
||||
vm.removeItemFromCart(shopMasterID: shopMasterID, index: indexPath)
|
||||
}
|
||||
case .no:
|
||||
print("no")
|
||||
}
|
||||
}
|
||||
vcPush.modalPresentationStyle = .overCurrentContext
|
||||
vcPush.modalTransitionStyle = .crossDissolve
|
||||
self.present(vcPush, animated: true)
|
||||
print(indexPath)
|
||||
}
|
||||
}
|
||||
124
WOKA/Cart/Controller/CartPaymentOptionsVC.swift
Normal file
124
WOKA/Cart/Controller/CartPaymentOptionsVC.swift
Normal file
@@ -0,0 +1,124 @@
|
||||
//
|
||||
// CartPaymentOptionsVC.swift
|
||||
// WOKA
|
||||
//
|
||||
// Created by MacBook Pro on 23/07/24.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class CartPaymentOptionsVC: UIViewController {
|
||||
|
||||
@IBOutlet weak var cartTableView: UITableView!
|
||||
@IBOutlet weak var cartTableHeight: NSLayoutConstraint!
|
||||
@IBOutlet weak var couponTableView: UITableView!
|
||||
@IBOutlet weak var couponTableHeght: NSLayoutConstraint!
|
||||
@IBOutlet weak var confirmBtn: LocalisedElementsButton!
|
||||
@IBOutlet weak var couponCodeTF: TextFieldShadow!
|
||||
@IBOutlet weak var totalCartPrice: LocalisedElementsLabel!
|
||||
@IBOutlet weak var scrollView: UIScrollView!
|
||||
|
||||
@IBOutlet weak var couponAplliedStack: UIStackView!
|
||||
@IBOutlet weak var subtotalPrice: LocalisedElementsLabel!
|
||||
@IBOutlet weak var discountPrice: LocalisedElementsLabel!
|
||||
|
||||
var vm = CartPaymentOptionsVM()
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
vm.vc = self
|
||||
vm.initView()
|
||||
navigationController?.navigationBar.setBackgroundImage(UIImage(), for: .default)
|
||||
navigationController?.navigationBar.shadowImage = UIImage()
|
||||
}
|
||||
|
||||
override func viewDidLayoutSubviews() {
|
||||
vm.updateCart()
|
||||
}
|
||||
|
||||
override func viewWillAppear(_ animated: Bool) {
|
||||
super.viewWillAppear(animated)
|
||||
navigationController?.setNavigationBarHidden(false, animated: animated)
|
||||
}
|
||||
|
||||
override func viewDidAppear(_ animated: Bool) {
|
||||
self.navigationController?.setColor(color: .white)
|
||||
|
||||
}
|
||||
|
||||
override func viewWillDisappear(_ animated: Bool) {
|
||||
super.viewWillDisappear(animated)
|
||||
self.navigationController?.setNavigationBarHidden(true, animated: animated)
|
||||
}
|
||||
|
||||
override func viewDidDisappear(_ animated: Bool) {
|
||||
super.viewDidDisappear(animated)
|
||||
|
||||
// Customize the navigation bar's appearance
|
||||
self.navigationController?.setColor(color: .black)
|
||||
}
|
||||
|
||||
@IBAction func offerCouponBtnTapped(_ sender: UIButton) {
|
||||
vm.isExpanded.toggle()
|
||||
|
||||
if vm.isExpanded{
|
||||
sender.setImage(UIImage(systemName: "chevron.down.circle.fill"), for: .normal)
|
||||
self.couponTableView.isHidden = false
|
||||
}else{
|
||||
sender.setImage(UIImage(systemName: "chevron.forward.circle.fill"), for: .normal)
|
||||
self.couponTableView.isHidden = true
|
||||
}
|
||||
}
|
||||
|
||||
@IBAction func confirmBtnTapped(_ sender: LocalisedElementsButton) {
|
||||
}
|
||||
|
||||
@IBAction func applyBtnTapped(_ sender: LocalisedElementsButton) {
|
||||
if self.couponCodeTF.text == "" {
|
||||
Utilities.alertWithBtn(title: "", msgBody: "Please enter coupon code", okBtnStr: "OK", vc: self)
|
||||
return
|
||||
}
|
||||
vm.applyCoupon(code: self.couponCodeTF.text!)
|
||||
}
|
||||
}
|
||||
// MARK: - TableView DataSource , Delegates
|
||||
|
||||
extension CartPaymentOptionsVC : TableViewSRC{
|
||||
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
|
||||
if tableView == cartTableView{
|
||||
return vm.cartListData.count
|
||||
}else{
|
||||
return vm.couponData.count
|
||||
}
|
||||
}
|
||||
|
||||
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
||||
if tableView == cartTableView{
|
||||
let cell = tableView.dequeueReusableCell(withIdentifier: K.CellIdentifier.Cart.cartPaymentOptionsCell) as! CartPaymentOptionsCell
|
||||
let data = vm.cartListData[indexPath.row]
|
||||
cell.setData(data: data)
|
||||
return cell
|
||||
}else{
|
||||
let cell = tableView.dequeueReusableCell(withIdentifier: K.CellIdentifier.Cart.couponCell) as! CouponCell
|
||||
let data = vm.couponData[indexPath.row]
|
||||
cell.setData(data: data)
|
||||
return cell
|
||||
}
|
||||
}
|
||||
|
||||
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
|
||||
if tableView == couponTableView{
|
||||
return 60
|
||||
}else{
|
||||
return UITableView.automaticDimension
|
||||
}
|
||||
}
|
||||
|
||||
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
|
||||
if tableView == couponTableView{
|
||||
let couponCode = vm.couponData[indexPath.row].couponCode
|
||||
self.couponCodeTF.text = couponCode
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
76
WOKA/Cart/Model/CartListingDM.swift
Normal file
76
WOKA/Cart/Model/CartListingDM.swift
Normal file
@@ -0,0 +1,76 @@
|
||||
//
|
||||
// CartListingDM.swift
|
||||
// WOKA
|
||||
//
|
||||
// Created by MacBook Pro on 23/07/24.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
// MARK: - CartListingDM
|
||||
struct CartListingDM: Codable {
|
||||
let result: [ResultData]?
|
||||
let cartTotalAmount: String?
|
||||
let cartQuantity, totalRecords: Int?
|
||||
var totalAmount : Double
|
||||
let userType: String?
|
||||
let addressAvailable: Bool?
|
||||
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case result
|
||||
case cartTotalAmount = "cart_total_amount"
|
||||
case totalAmount = "total_amount"
|
||||
case cartQuantity = "cart_quantity"
|
||||
case totalRecords = "total_records"
|
||||
case userType = "user_type"
|
||||
case addressAvailable = "address_available"
|
||||
}
|
||||
|
||||
|
||||
// MARK: - Result
|
||||
struct ResultData: Codable {
|
||||
let id: Int?
|
||||
let skuID, productName: String?
|
||||
let categoryMasterID, subCategoryMasterID: Int?
|
||||
let productPrice: String?
|
||||
let remainStockQuantity: Int?
|
||||
let stockStatus: String?
|
||||
// let taxCategory: JSONNull?
|
||||
let taxValue: String?
|
||||
let productQuantity: Int?
|
||||
let shopMasterDetail: ShopMasterDetail?
|
||||
let shopImage: [String]?
|
||||
let productFinalPrice : Double?
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case id
|
||||
case skuID = "sku_id"
|
||||
case productName = "product_name"
|
||||
case categoryMasterID = "category_master_id"
|
||||
case subCategoryMasterID = "sub_category_master_id"
|
||||
case productPrice = "product_price"
|
||||
case remainStockQuantity = "remain_stock_quantity"
|
||||
case stockStatus = "stock_status"
|
||||
case productFinalPrice = "product_final_price"
|
||||
// case taxCategory = "tax_category"
|
||||
case taxValue = "tax_value"
|
||||
case productQuantity = "product_quantity"
|
||||
case shopMasterDetail = "shop_master_detail"
|
||||
case shopImage = "shop_image"
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - ShopMasterDetail
|
||||
struct ShopMasterDetail: Codable {
|
||||
let id, productID: Int?
|
||||
let productNameEnglish, productNameHindi, descriptionEnglish, descriptionHindi: String?
|
||||
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case id
|
||||
case productID = "product_id"
|
||||
case productNameEnglish = "product_name_english"
|
||||
case productNameHindi = "product_name_hindi"
|
||||
case descriptionEnglish = "description_english"
|
||||
case descriptionHindi = "description_hindi"
|
||||
}
|
||||
}
|
||||
}
|
||||
19
WOKA/Cart/Model/CouponApplyDM.swift
Normal file
19
WOKA/Cart/Model/CouponApplyDM.swift
Normal file
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// CouponApplyDM.swift
|
||||
// WOKA
|
||||
//
|
||||
// Created by MacBook Pro on 23/07/24.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
// MARK: - CouponApplyDM
|
||||
struct CouponApplyDM: Codable {
|
||||
let cartTotalAmount, discountValue, cartDiscountedAmount: String?
|
||||
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case cartTotalAmount = "cart_total_amount"
|
||||
case discountValue = "discount_value"
|
||||
case cartDiscountedAmount = "cart_discounted_amount"
|
||||
}
|
||||
}
|
||||
51
WOKA/Cart/Model/CouponListDM.swift
Normal file
51
WOKA/Cart/Model/CouponListDM.swift
Normal file
@@ -0,0 +1,51 @@
|
||||
//
|
||||
// CouponListDM.swift
|
||||
// WOKA
|
||||
//
|
||||
// Created by MacBook Pro on 23/07/24.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
// MARK: - CouponListDM
|
||||
struct CouponListDM: Codable {
|
||||
let result: [ResultData]?
|
||||
let totalRecords: Int?
|
||||
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case result
|
||||
case totalRecords = "total_records"
|
||||
}
|
||||
|
||||
// MARK: - Result
|
||||
struct ResultData: Codable {
|
||||
let id: Int?
|
||||
let couponCode: String?
|
||||
let categoryMasterID, usageLimit, discountType: Int?
|
||||
let discountValue, startFrom, endDate: String?
|
||||
let category: Category?
|
||||
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case id
|
||||
case couponCode = "coupon_code"
|
||||
case categoryMasterID = "category_master_id"
|
||||
case usageLimit = "usage_limit"
|
||||
case discountType = "discount_type"
|
||||
case discountValue = "discount_value"
|
||||
case startFrom = "start_from"
|
||||
case endDate = "end_date"
|
||||
case category
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Category
|
||||
struct Category: Codable {
|
||||
let id: Int?
|
||||
let categoryName: String?
|
||||
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case id
|
||||
case categoryName = "category_name"
|
||||
}
|
||||
}
|
||||
}
|
||||
49
WOKA/Cart/View/CartListCell.swift
Normal file
49
WOKA/Cart/View/CartListCell.swift
Normal file
@@ -0,0 +1,49 @@
|
||||
//
|
||||
// CartListCell.swift
|
||||
// WOKA
|
||||
//
|
||||
// Created by MacBook Pro on 23/07/24.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class CartListCell: UITableViewCell {
|
||||
|
||||
@IBOutlet weak var productImage: UIImageView!
|
||||
@IBOutlet weak var productTitle: LocalisedElementsLabel!
|
||||
@IBOutlet weak var productStatus: LocalisedElementsLabel!
|
||||
@IBOutlet weak var productPrice: LocalisedElementsLabel!
|
||||
@IBOutlet weak var productQty: LocalisedElementsLabel!
|
||||
|
||||
typealias btnTappedBlock = () -> Void // 0 - plus 1 - minus
|
||||
var btnTapped : btnTappedBlock!
|
||||
|
||||
override func awakeFromNib() {
|
||||
super.awakeFromNib()
|
||||
self.backgroundColor = .clear
|
||||
// Initialization code
|
||||
}
|
||||
|
||||
override func setSelected(_ selected: Bool, animated: Bool) {
|
||||
super.setSelected(selected, animated: animated)
|
||||
|
||||
// Configure the view for the selected state
|
||||
}
|
||||
|
||||
func setData(data : CartListingDM.ResultData){
|
||||
self.productTitle.text = data.productName ?? "NA"
|
||||
self.productStatus.text = "Product_Status: " + (data.stockStatus ?? "NA")
|
||||
self.productPrice.text = data.productPrice ?? "Rs. 0"
|
||||
self.productQty.text = "Quantity: " + (data.productQuantity?.toString() ?? "1")
|
||||
|
||||
if let imageURL = data.shopImage?.first{
|
||||
self.productImage.imageURL(imageURL, color: UIColor.appColor(.TextDarkBlue)!)
|
||||
}
|
||||
}
|
||||
|
||||
@IBAction func deleteBtnTapped(_ sender: UIButton) {
|
||||
if btnTapped != nil {
|
||||
btnTapped()
|
||||
}
|
||||
}
|
||||
}
|
||||
141
WOKA/Cart/View/CartListCell.xib
Normal file
141
WOKA/Cart/View/CartListCell.xib
Normal file
@@ -0,0 +1,141 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina6_12" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/>
|
||||
<capability name="Named colors" minToolsVersion="9.0"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<customFonts key="customFonts">
|
||||
<array key="Exo2-Bold.ttf">
|
||||
<string>Exo2-Bold</string>
|
||||
</array>
|
||||
<array key="Exo2-Medium.ttf">
|
||||
<string>Exo2-Medium</string>
|
||||
</array>
|
||||
<array key="Exo2-Regular.ttf">
|
||||
<string>Exo2-Regular</string>
|
||||
</array>
|
||||
</customFonts>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" rowHeight="142" id="KGk-i7-Jjw" customClass="CartListCell" customModule="WOKA" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="370" height="142"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
|
||||
<rect key="frame" x="0.0" y="0.0" width="370" height="142"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" spacing="7" translatesAutoresizingMaskIntoConstraints="NO" id="D98-ed-7FW">
|
||||
<rect key="frame" x="13" y="7" width="344" height="128"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="rgj-u1-AfQ">
|
||||
<rect key="frame" x="6" y="6" width="100" height="116"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Y7T-6t-2qC">
|
||||
<rect key="frame" x="5" y="5" width="90" height="100"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<integer key="value" value="5"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="100" id="9T9-Nx-N8I"/>
|
||||
<constraint firstItem="Y7T-6t-2qC" firstAttribute="leading" secondItem="rgj-u1-AfQ" secondAttribute="leading" constant="5" id="B9x-Ak-aqy"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Y7T-6t-2qC" secondAttribute="trailing" constant="5" id="T4P-qN-NgN"/>
|
||||
<constraint firstItem="Y7T-6t-2qC" firstAttribute="top" secondItem="rgj-u1-AfQ" secondAttribute="top" constant="5" id="x1b-cf-Dd1"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="fillProportionally" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="hDg-3Z-Bxx">
|
||||
<rect key="frame" x="113" y="6" width="225" height="116"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Mixed title" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="y0k-Tm-SP5" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="225" height="24.666666666666668"/>
|
||||
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="15"/>
|
||||
<color key="textColor" name="ImageDarkBlue"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="1 Item" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="HEw-wi-peL" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="29.666666666666664" width="225" height="20.333333333333336"/>
|
||||
<fontDescription key="fontDescription" name="Exo2-Medium" family="Exo 2" pointSize="12"/>
|
||||
<color key="textColor" name="ImageDarkBlue"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Mixed title" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="x1w-Ci-sP7" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="55" width="225" height="20"/>
|
||||
<fontDescription key="fontDescription" name="Exo2-Regular" family="Exo 2" pointSize="12"/>
|
||||
<color key="textColor" red="0.035294117649999998" green="0.0" blue="0.36470588240000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="1tR-6T-n7r">
|
||||
<rect key="frame" x="0.0" y="80" width="225" height="36"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" text="Rs.350" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Qsz-SF-4LE" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="195" height="36"/>
|
||||
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="15"/>
|
||||
<color key="textColor" name="ImageDarkBlue"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="74b-BA-x46">
|
||||
<rect key="frame" x="195" y="0.0" width="30" height="36"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="30" id="aeb-P4-qGx"/>
|
||||
</constraints>
|
||||
<color key="tintColor" red="0.035294117649999998" green="0.0" blue="0.36470588240000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" image="TrashCan"/>
|
||||
<connections>
|
||||
<action selector="deleteBtnTapped:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="aGI-m2-zLv"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
</stackView>
|
||||
</subviews>
|
||||
</stackView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<edgeInsets key="layoutMargins" top="6" left="6" bottom="6" right="6"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<integer key="value" value="5"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</stackView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="D98-ed-7FW" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="13" id="Hjr-X9-FE3"/>
|
||||
<constraint firstAttribute="bottom" secondItem="D98-ed-7FW" secondAttribute="bottom" constant="7" id="OIN-zt-v9t"/>
|
||||
<constraint firstAttribute="trailing" secondItem="D98-ed-7FW" secondAttribute="trailing" constant="13" id="STL-O6-Jet"/>
|
||||
<constraint firstItem="D98-ed-7FW" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="7" id="ZIC-Mm-Gja"/>
|
||||
<constraint firstItem="Y7T-6t-2qC" firstAttribute="height" secondItem="H2p-sc-9uM" secondAttribute="height" multiplier="0.704225" id="lqd-M0-Ppa"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
|
||||
<connections>
|
||||
<outlet property="productImage" destination="Y7T-6t-2qC" id="lXM-2P-1zY"/>
|
||||
<outlet property="productPrice" destination="Qsz-SF-4LE" id="l8K-nc-NDY"/>
|
||||
<outlet property="productQty" destination="HEw-wi-peL" id="Amr-Uu-ZEq"/>
|
||||
<outlet property="productStatus" destination="x1w-Ci-sP7" id="DNU-o9-cWN"/>
|
||||
<outlet property="productTitle" destination="y0k-Tm-SP5" id="PYp-b4-K6M"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="167.93893129770993" y="23.239436619718312"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="TrashCan" width="21" height="21"/>
|
||||
<namedColor name="ImageDarkBlue">
|
||||
<color red="0.035000000149011612" green="0.0" blue="0.36500000953674316" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</namedColor>
|
||||
<systemColor name="systemBackgroundColor">
|
||||
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</systemColor>
|
||||
</resources>
|
||||
</document>
|
||||
36
WOKA/Cart/View/CartPaymentOptionsCell.swift
Normal file
36
WOKA/Cart/View/CartPaymentOptionsCell.swift
Normal file
@@ -0,0 +1,36 @@
|
||||
//
|
||||
// CartPaymentOptionsCell.swift
|
||||
// WOKA
|
||||
//
|
||||
// Created by MacBook Pro on 23/07/24.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class CartPaymentOptionsCell: UITableViewCell {
|
||||
|
||||
@IBOutlet weak var productTitle: LocalisedElementsLabel!
|
||||
@IBOutlet weak var productPrice: LocalisedElementsLabel!
|
||||
@IBOutlet weak var productImage: UIImageView!
|
||||
|
||||
override func awakeFromNib() {
|
||||
super.awakeFromNib()
|
||||
self.backgroundColor = .clear
|
||||
// Initialization code
|
||||
}
|
||||
|
||||
override func setSelected(_ selected: Bool, animated: Bool) {
|
||||
super.setSelected(selected, animated: animated)
|
||||
|
||||
// Configure the view for the selected state
|
||||
}
|
||||
|
||||
func setData(data : CartListingDM.ResultData){
|
||||
self.productTitle.text = data.productName ?? "NA"
|
||||
self.productPrice.text = K.ConstantString.rupeeSign + " " + (data.productFinalPrice?.toString() ?? "0.0")
|
||||
|
||||
if let imageURL = data.shopImage?.first{
|
||||
self.productImage.imageURL(imageURL, color: UIColor.appColor(.TextDarkBlue)!)
|
||||
}
|
||||
}
|
||||
}
|
||||
108
WOKA/Cart/View/CartPaymentOptionsCell.xib
Normal file
108
WOKA/Cart/View/CartPaymentOptionsCell.xib
Normal file
@@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina6_12" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/>
|
||||
<capability name="Named colors" minToolsVersion="9.0"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<customFonts key="customFonts">
|
||||
<array key="Exo2-Bold.ttf">
|
||||
<string>Exo2-Bold</string>
|
||||
</array>
|
||||
</customFonts>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" rowHeight="143" id="KGk-i7-Jjw" customClass="CartPaymentOptionsCell" customModule="WOKA" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="460" height="143"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
|
||||
<rect key="frame" x="0.0" y="0.0" width="460" height="143"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" alignment="top" spacing="7" translatesAutoresizingMaskIntoConstraints="NO" id="Znl-Ra-a6Y">
|
||||
<rect key="frame" x="10" y="7" width="440" height="129"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="egA-JO-kBA">
|
||||
<rect key="frame" x="0.0" y="0.0" width="100" height="105"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="boT-Xc-W2J">
|
||||
<rect key="frame" x="5" y="5" width="90" height="100"/>
|
||||
<color key="backgroundColor" systemColor="underPageBackgroundColor"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="100" id="KQA-hX-9mJ"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<integer key="value" value="5"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="boT-Xc-W2J" secondAttribute="trailing" constant="5" id="4lK-Q9-WEY"/>
|
||||
<constraint firstItem="boT-Xc-W2J" firstAttribute="top" secondItem="egA-JO-kBA" secondAttribute="top" constant="5" id="KOJ-P1-Q3p"/>
|
||||
<constraint firstAttribute="bottom" secondItem="boT-Xc-W2J" secondAttribute="bottom" id="XpR-L9-oty"/>
|
||||
<constraint firstItem="boT-Xc-W2J" firstAttribute="leading" secondItem="egA-JO-kBA" secondAttribute="leading" constant="5" id="flD-nY-mQY"/>
|
||||
<constraint firstAttribute="width" constant="100" id="v6V-p3-vTU"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="zlo-dL-zSh">
|
||||
<rect key="frame" x="107" y="0.0" width="333" height="51"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Mixed title" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ECN-tU-ctk" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
|
||||
<rect key="frame" x="2" y="5" width="329" height="18"/>
|
||||
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="15"/>
|
||||
<color key="textColor" name="ImageDarkBlue"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" text="Rs.350" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="iQk-hO-Mzn" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
|
||||
<rect key="frame" x="2" y="31" width="329" height="18"/>
|
||||
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="15"/>
|
||||
<color key="textColor" name="ImageDarkBlue"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<edgeInsets key="layoutMargins" top="5" left="2" bottom="2" right="2"/>
|
||||
</stackView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<integer key="value" value="5"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</stackView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="Znl-Ra-a6Y" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="10" id="LqP-n5-N1r"/>
|
||||
<constraint firstItem="Znl-Ra-a6Y" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="7" id="Rg6-4U-g9V"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Znl-Ra-a6Y" secondAttribute="bottom" constant="7" id="sTF-3L-UoI"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Znl-Ra-a6Y" secondAttribute="trailing" constant="10" id="wzd-Ca-4iu"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
|
||||
<connections>
|
||||
<outlet property="productImage" destination="boT-Xc-W2J" id="faf-Z1-Txp"/>
|
||||
<outlet property="productPrice" destination="iQk-hO-Mzn" id="Bvg-oS-LeI"/>
|
||||
<outlet property="productTitle" destination="ECN-tU-ctk" id="dQo-q7-p9z"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="331.29770992366412" y="10.211267605633804"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<namedColor name="ImageDarkBlue">
|
||||
<color red="0.035000000149011612" green="0.0" blue="0.36500000953674316" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</namedColor>
|
||||
<systemColor name="underPageBackgroundColor">
|
||||
<color red="0.70980392156862748" green="0.71764705882352942" blue="0.74117647058823533" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</systemColor>
|
||||
</resources>
|
||||
</document>
|
||||
34
WOKA/Cart/View/CouponCell.swift
Normal file
34
WOKA/Cart/View/CouponCell.swift
Normal file
@@ -0,0 +1,34 @@
|
||||
//
|
||||
// CouponCell.swift
|
||||
// WOKA
|
||||
//
|
||||
// Created by MacBook Pro on 23/07/24.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class CouponCell: UITableViewCell {
|
||||
|
||||
@IBOutlet weak var couponText: LocalisedElementsLabel!
|
||||
|
||||
override func awakeFromNib() {
|
||||
super.awakeFromNib()
|
||||
self.backgroundColor = .clear
|
||||
// Initialization code
|
||||
}
|
||||
|
||||
override func setSelected(_ selected: Bool, animated: Bool) {
|
||||
super.setSelected(selected, animated: animated)
|
||||
|
||||
}
|
||||
|
||||
func setData(data : CouponListDM.ResultData){
|
||||
// let double = data.discountValue?.toDouble()
|
||||
|
||||
if data.discountType == 1{ // Percentage
|
||||
self.couponText.text = (data.discountValue ?? "0.0") + "% Off with Coupon Code: " + (data.couponCode ?? "NA")
|
||||
}else{ // Amount
|
||||
self.couponText.text = K.ConstantString.rupeeSign + " " + (data.discountValue ?? "0.0") + " Off with Coupon Code: " + (data.couponCode ?? "NA")
|
||||
}
|
||||
}
|
||||
}
|
||||
73
WOKA/Cart/View/CouponCell.xib
Normal file
73
WOKA/Cart/View/CouponCell.xib
Normal file
@@ -0,0 +1,73 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina6_12" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/>
|
||||
<capability name="Named colors" minToolsVersion="9.0"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<customFonts key="customFonts">
|
||||
<array key="Exo2-Bold.ttf">
|
||||
<string>Exo2-Bold</string>
|
||||
</array>
|
||||
</customFonts>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="CouponCell" rowHeight="56" id="KGk-i7-Jjw" customClass="CouponCell" customModule="WOKA" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="368" height="56"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
|
||||
<rect key="frame" x="0.0" y="0.0" width="368" height="56"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<stackView opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="6Af-SH-oXG">
|
||||
<rect key="frame" x="10" y="5" width="348" height="46"/>
|
||||
<subviews>
|
||||
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="aQY-1O-lIH">
|
||||
<rect key="frame" x="0.0" y="0.0" width="20" height="46"/>
|
||||
<color key="backgroundColor" red="0.035294117649999998" green="0.0" blue="0.36470588240000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="20" id="JJr-zG-zms"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="MWy-QG-0WV" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
|
||||
<rect key="frame" x="30" y="0.0" width="318" height="46"/>
|
||||
<string key="text">Mixed title
|
||||
Mixed title</string>
|
||||
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="15"/>
|
||||
<color key="textColor" name="ImageDarkBlue"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<integer key="value" value="5"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</stackView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="6Af-SH-oXG" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="10" id="ZDs-88-3AL"/>
|
||||
<constraint firstAttribute="bottom" secondItem="6Af-SH-oXG" secondAttribute="bottom" constant="5" id="ct3-Og-ZI6"/>
|
||||
<constraint firstItem="6Af-SH-oXG" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="5" id="gOe-i3-orm"/>
|
||||
<constraint firstAttribute="trailing" secondItem="6Af-SH-oXG" secondAttribute="trailing" constant="10" id="pAH-ss-tWD"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
|
||||
<connections>
|
||||
<outlet property="couponText" destination="MWy-QG-0WV" id="pCG-vU-No4"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="166.41221374045801" y="-7.042253521126761"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<namedColor name="ImageDarkBlue">
|
||||
<color red="0.035000000149011612" green="0.0" blue="0.36500000953674316" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</namedColor>
|
||||
</resources>
|
||||
</document>
|
||||
166
WOKA/Cart/ViewModel/CartListVM.swift
Normal file
166
WOKA/Cart/ViewModel/CartListVM.swift
Normal file
@@ -0,0 +1,166 @@
|
||||
//
|
||||
// CartListVM.swift
|
||||
// WOKA
|
||||
//
|
||||
// Created by MacBook Pro on 23/07/24.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import Alamofire
|
||||
|
||||
class CartListVM{
|
||||
|
||||
weak var vc : CartListVC!
|
||||
var cartListData = [CartListingDM.ResultData]()
|
||||
|
||||
var totalAmount = 0.0 {
|
||||
didSet{
|
||||
vc.totalPrice.text = K.ConstantString.rupeeSign + " " + totalAmount.toString()
|
||||
}
|
||||
}
|
||||
|
||||
let refreshControl = UIRefreshControl()
|
||||
let feedbackGenerator = UIImpactFeedbackGenerator(style: .light)
|
||||
|
||||
func initView(){
|
||||
setupCell()
|
||||
Utilities.startProgressHUD()
|
||||
getCartList()
|
||||
addGradient()
|
||||
|
||||
vc.tableView.indicatorStyle = .white
|
||||
refreshControl.attributedTitle = NSAttributedString(string: "Refreshing...",attributes: [.foregroundColor: UIColor.appColor(.TextDarkBlue)!])
|
||||
refreshControl.tintColor = UIColor.appColor(.TextDarkBlue)!
|
||||
refreshControl.addTarget(self, action: #selector(self.refresh(_:)), for: .valueChanged)
|
||||
vc.tableView.addSubview(refreshControl)
|
||||
}
|
||||
|
||||
@objc func refresh(_ sender: AnyObject) {
|
||||
self.getCartList()
|
||||
}
|
||||
|
||||
func addGradient(){
|
||||
self.vc.title = "MY CART".localized(loc: AuthFunc.shareInstance.languageSelected.rawValue)
|
||||
let color1 = #colorLiteral(red: 0.6745098039, green: 0.6235294118, blue: 0.1725490196, alpha: 1)
|
||||
let color2 = #colorLiteral(red: 0.5450980392, green: 0.6745098039, blue: 0.1725490196, alpha: 1)
|
||||
|
||||
vc.view.applyGradient(colors: [color2, color1], startPoint: CGPoint(x: 0, y: 0), endPoint: CGPoint(x: 0.8, y: 0))
|
||||
}
|
||||
|
||||
func setupCell(){
|
||||
vc.tableView.register(UINib(nibName: K.CellIdentifier.Cart.cartListCell, bundle: nil), forCellReuseIdentifier: K.CellIdentifier.Cart.cartListCell)
|
||||
vc.tableView.delegate = vc.self
|
||||
vc.tableView.dataSource = vc.self
|
||||
}
|
||||
// MARK: - Get SuperCategory
|
||||
|
||||
func getCartList(){
|
||||
let headers : HTTPHeaders = ["access-token" : AuthFunc.shareInstance.getAccessToken()]
|
||||
|
||||
NetworkManager.shareInstance.apiRequest(url: APIEndPoints.Cart.cart_listing, method: .get,headers: headers) { [weak self](result : Result<BaseResponseModel<CartListingDM>, NetworkManager.APIError>) in
|
||||
switch result{
|
||||
case .success(let data):
|
||||
guard let self else{
|
||||
Utilities.dismissProgressHUD()
|
||||
return
|
||||
}
|
||||
switch data.success{
|
||||
case 0:
|
||||
/*
|
||||
Error
|
||||
*/
|
||||
Utilities.dismissProgressHUD()
|
||||
self.refreshControl.endRefreshing()
|
||||
self.checkCount()
|
||||
case 1:
|
||||
Utilities.dismissProgressHUD()
|
||||
self.refreshControl.endRefreshing()
|
||||
totalAmount = data.data?.totalAmount ?? 0.0
|
||||
|
||||
guard let data = data.data?.result else{return}
|
||||
self.cartListData = data
|
||||
self.vc.tableView.reloadData()
|
||||
feedbackGenerator.impactOccurred()
|
||||
self.checkCount()
|
||||
default:
|
||||
Utilities.dismissProgressHUD()
|
||||
break
|
||||
}
|
||||
case .failure(let error):
|
||||
guard let self else{
|
||||
Utilities.dismissProgressHUD()
|
||||
self?.refreshControl.endRefreshing()
|
||||
return
|
||||
}
|
||||
Utilities.dismissProgressHUD()
|
||||
self.refreshControl.endRefreshing()
|
||||
self.checkCount()
|
||||
Utilities.alertWithBtnCompletion(title: "Error", msgBody: error.localizedDescription, okBtnStr: "Retry?", vc: self.vc) { isDone in
|
||||
if isDone{
|
||||
self.getCartList()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func checkCount(){
|
||||
if self.cartListData.count == 0 {
|
||||
self.vc.noDataStack.isHidden = false
|
||||
self.vc.checkoutBtn.isEnabled = false
|
||||
self.vc.checkoutBtn.backgroundColor = #colorLiteral(red: 0.03529411765, green: 0, blue: 0.3647058824, alpha: 1).withAlphaComponent(0.7)
|
||||
} else{
|
||||
self.vc.noDataStack.isHidden = true
|
||||
self.vc.checkoutBtn.isEnabled = true
|
||||
self.vc.checkoutBtn.backgroundColor = #colorLiteral(red: 0.03529411765, green: 0, blue: 0.3647058824, alpha: 1)
|
||||
}
|
||||
}
|
||||
|
||||
func removeItemFromCart(shopMasterID : Int, index : Int){
|
||||
Utilities.startProgressHUD()
|
||||
let headers : HTTPHeaders = ["access-token" : AuthFunc.shareInstance.getAccessToken()]
|
||||
let params : Parameters = ["shop_master_id" : shopMasterID]
|
||||
NetworkManager.shareInstance.apiRequest(url: APIEndPoints.Cart.remove_cart, method: .post,parameters: params,headers: headers) { [weak self](result : Result<BaseResponseModel<CommonResponseModel>, NetworkManager.APIError>) in
|
||||
switch result{
|
||||
case .success(let data):
|
||||
guard let self else{
|
||||
Utilities.dismissProgressHUD()
|
||||
return
|
||||
}
|
||||
switch data.success{
|
||||
case 0:
|
||||
/*
|
||||
Error
|
||||
*/
|
||||
Utilities.dismissProgressHUD()
|
||||
Utilities.alertWithBtnCompletion(title: "Error", msgBody: data.message ?? K.ConstantString.unRecognised, okBtnStr: "Retry?", vc: self.vc) { isDone in
|
||||
if isDone{
|
||||
self.getCartList()
|
||||
}
|
||||
}
|
||||
case 1:
|
||||
Utilities.dismissProgressHUD()
|
||||
self.totalAmount = self.totalAmount - (self.cartListData[index].productFinalPrice ?? 0.0)
|
||||
self.cartListData.remove(at: index)
|
||||
self.vc.tableView.reloadData()
|
||||
self.checkCount()
|
||||
default:
|
||||
Utilities.dismissProgressHUD()
|
||||
break
|
||||
}
|
||||
case .failure(let error):
|
||||
guard let self else{
|
||||
Utilities.dismissProgressHUD()
|
||||
return
|
||||
}
|
||||
Utilities.dismissProgressHUD()
|
||||
self.refreshControl.endRefreshing()
|
||||
Utilities.alertWithBtnCompletion(title: "Error", msgBody: error.localizedDescription, okBtnStr: "Retry?", vc: self.vc) { isDone in
|
||||
if isDone{
|
||||
self.getCartList()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
147
WOKA/Cart/ViewModel/CartPaymentOptionsVM.swift
Normal file
147
WOKA/Cart/ViewModel/CartPaymentOptionsVM.swift
Normal file
@@ -0,0 +1,147 @@
|
||||
//
|
||||
// CartPaymentOptionsVM.swift
|
||||
// WOKA
|
||||
//
|
||||
// Created by MacBook Pro on 23/07/24.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import Alamofire
|
||||
|
||||
class CartPaymentOptionsVM{
|
||||
|
||||
weak var vc : CartPaymentOptionsVC!
|
||||
var cartListData = [CartListingDM.ResultData]()
|
||||
var couponData = [CouponListDM.ResultData]()
|
||||
var isExpanded = false
|
||||
var cartTotalPrice = 0.0
|
||||
|
||||
func initView(){
|
||||
vc.couponCodeTF.roundCorner()
|
||||
addGradient()
|
||||
vc.scrollView.indicatorStyle = .white
|
||||
setupCell()
|
||||
updateCart()
|
||||
getCouponAndOffers()
|
||||
}
|
||||
|
||||
func setupCell(){
|
||||
vc.cartTableView.register(UINib(nibName: K.CellIdentifier.Cart.cartPaymentOptionsCell, bundle: nil), forCellReuseIdentifier: K.CellIdentifier.Cart.cartPaymentOptionsCell)
|
||||
vc.cartTableView.delegate = vc.self
|
||||
vc.cartTableView.dataSource = vc.self
|
||||
|
||||
vc.couponTableView.register(UINib(nibName: K.CellIdentifier.Cart.couponCell, bundle: nil), forCellReuseIdentifier: K.CellIdentifier.Cart.couponCell)
|
||||
vc.couponTableView.delegate = vc.self
|
||||
vc.couponTableView.dataSource = vc.self
|
||||
}
|
||||
|
||||
func addGradient(){
|
||||
self.vc.title = "PAYMENT OPTIONS".localized(loc: AuthFunc.shareInstance.languageSelected.rawValue)
|
||||
let color1 = #colorLiteral(red: 0.6745098039, green: 0.6235294118, blue: 0.1725490196, alpha: 1)
|
||||
let color2 = #colorLiteral(red: 0.5450980392, green: 0.6745098039, blue: 0.1725490196, alpha: 1)
|
||||
|
||||
vc.view.applyGradient(colors: [color2, color1], startPoint: CGPoint(x: 0, y: 0), endPoint: CGPoint(x: 0.8, y: 0))
|
||||
}
|
||||
|
||||
func updateCart(){
|
||||
self.vc.cartTableView.reloadData()
|
||||
self.vc.cartTableHeight.constant = self.vc.cartTableView.contentSize.height + 100
|
||||
self.vc.cartTableView.layoutIfNeeded()
|
||||
self.vc.cartTableHeight.constant = self.vc.cartTableView.contentSize.height
|
||||
|
||||
self.vc.totalCartPrice.text = K.ConstantString.rupeeSign + " " + self.cartTotalPrice.toString()
|
||||
}
|
||||
|
||||
// MARK: - Get SuperCategory
|
||||
|
||||
func getCouponAndOffers(){
|
||||
let headers : HTTPHeaders = ["access-token" : AuthFunc.shareInstance.getAccessToken()]
|
||||
|
||||
NetworkManager.shareInstance.apiRequest(url: APIEndPoints.Cart.coupon_listing, method: .get,headers: headers) { [weak self](result : Result<BaseResponseModel<CouponListDM>, NetworkManager.APIError>) in
|
||||
switch result{
|
||||
case .success(let data):
|
||||
guard let self else{
|
||||
Utilities.dismissProgressHUD()
|
||||
return
|
||||
}
|
||||
switch data.success{
|
||||
case 0:
|
||||
/*
|
||||
Error
|
||||
*/
|
||||
Utilities.dismissProgressHUD()
|
||||
|
||||
case 1:
|
||||
Utilities.dismissProgressHUD()
|
||||
guard let data = data.data?.result else{return}
|
||||
self.couponData = data
|
||||
|
||||
self.vc.couponTableView.reloadData()
|
||||
self.vc.couponTableHeght.constant = self.vc.couponTableView.contentSize.height + 100
|
||||
self.vc.couponTableView.layoutIfNeeded()
|
||||
self.vc.couponTableHeght.constant = self.vc.couponTableView.contentSize.height
|
||||
default:
|
||||
Utilities.dismissProgressHUD()
|
||||
break
|
||||
}
|
||||
case .failure(let error):
|
||||
guard let self else{
|
||||
Utilities.dismissProgressHUD()
|
||||
return
|
||||
}
|
||||
Utilities.dismissProgressHUD()
|
||||
Utilities.alertWithBtnCompletion(title: "Error", msgBody: error.localizedDescription, okBtnStr: "Retry?", vc: self.vc) { isDone in
|
||||
if isDone{
|
||||
self.getCouponAndOffers()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func applyCoupon(code : String){
|
||||
let headers : HTTPHeaders = ["access-token" : AuthFunc.shareInstance.getAccessToken()]
|
||||
let params : Parameters = ["coupon_code" : "",
|
||||
"total_amount" : self.cartTotalPrice]
|
||||
self.vc.couponAplliedStack.isHidden = true
|
||||
|
||||
NetworkManager.shareInstance.apiRequest(url: APIEndPoints.Cart.applied_coupon_discount, method: .post,parameters: params,headers: headers) { [weak self](result : Result<BaseResponseModel<CouponApplyDM>, NetworkManager.APIError>) in
|
||||
switch result{
|
||||
case .success(let data):
|
||||
guard let self else{
|
||||
Utilities.dismissProgressHUD()
|
||||
return
|
||||
}
|
||||
switch data.success{
|
||||
case 0:
|
||||
/*
|
||||
Error
|
||||
*/
|
||||
Utilities.dismissProgressHUD()
|
||||
|
||||
case 1:
|
||||
Utilities.dismissProgressHUD()
|
||||
guard let data = data.data else{return}
|
||||
self.vc.subtotalPrice.text = data.cartTotalAmount
|
||||
self.vc.discountPrice.text = data.discountValue
|
||||
self.vc.totalCartPrice.text = data.cartDiscountedAmount
|
||||
self.vc.couponAplliedStack.isHidden = false
|
||||
default:
|
||||
Utilities.dismissProgressHUD()
|
||||
break
|
||||
}
|
||||
case .failure(let error):
|
||||
guard let self else{
|
||||
Utilities.dismissProgressHUD()
|
||||
return
|
||||
}
|
||||
Utilities.dismissProgressHUD()
|
||||
Utilities.alertWithBtnCompletion(title: "Error", msgBody: error.localizedDescription, okBtnStr: "Retry?", vc: self.vc) { isDone in
|
||||
if isDone{
|
||||
self.applyCoupon(code: self.vc.couponCodeTF.text ?? "")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -53,5 +53,11 @@ extension K{
|
||||
static let shopListingCell = "ShopListingCell"
|
||||
static let shopProductsCell = "ShopProductsCell"
|
||||
}
|
||||
|
||||
struct Cart{
|
||||
static let cartListCell = "CartListCell"
|
||||
static let cartPaymentOptionsCell = "CartPaymentOptionsCell"
|
||||
static let couponCell = "CouponCell"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,5 +31,7 @@ extension K{
|
||||
static let registerUser = "Please wait registering user."
|
||||
|
||||
static let error = "Error"
|
||||
|
||||
static let rupeeSign = "₹"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,5 +21,6 @@ extension K{
|
||||
static let Games = "Games"
|
||||
static let Karaoke = "Karaoke"
|
||||
static let shop = "Shop"
|
||||
static let cart = "Cart"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,5 +98,13 @@ extension K{
|
||||
static let shopCategoryVC = "ShopCategoryVC"
|
||||
static let shopProductsVC = "ShopProductsVC"
|
||||
}
|
||||
|
||||
// MARK: - Cart
|
||||
|
||||
struct Cart{
|
||||
static let cartListVC = "CartListVC"
|
||||
static let cartPaymentOptionsVC = "CartPaymentOptionsVC"
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ class Utilities{
|
||||
|
||||
|
||||
var messageMutableString = NSMutableAttributedString()
|
||||
messageMutableString = NSMutableAttributedString(string: msgBody as String, attributes: [NSAttributedString.Key.font:UIFont(name: "Nunito-Regular", size: 18)!])
|
||||
messageMutableString = NSMutableAttributedString(string: msgBody as String, attributes: [NSAttributedString.Key.font: FontCustom.shareInstance.customFont(fontName: .Exo2_Medium, size: 16)])
|
||||
messageMutableString.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor.black, range: NSRange(location:0,length:msgBody.count))
|
||||
alert.setValue(messageMutableString, forKey: "attributedMessage")
|
||||
|
||||
|
||||
@@ -26,8 +26,8 @@ extension UIImageView {
|
||||
activityIndicator.autoresizingMask = (UIView.AutoresizingMask(rawValue: UIView.AutoresizingMask.RawValue(UInt8(UIView.AutoresizingMask.flexibleRightMargin.rawValue) | UInt8(UIView.AutoresizingMask.flexibleLeftMargin.rawValue) | UInt8(UIView.AutoresizingMask.flexibleBottomMargin.rawValue) | UInt8(UIView.AutoresizingMask.flexibleTopMargin.rawValue))))
|
||||
|
||||
self.addSubview(activityIndicator)
|
||||
// Timer.scheduledTimer(withTimeInterval: 1.5, repeats: false) { _ in
|
||||
|
||||
// self.sd_setImage(with: <#T##URL?#>, placeholderImage: <#T##UIImage?#>)
|
||||
self.sd_setImage(with: URL(string: url.replacingOccurrences(of: " ", with: "%20"))) { (image, error, cacheType, url) in
|
||||
activityIndicator.stopAnimating()
|
||||
}
|
||||
|
||||
35
WOKA/Helpers/SwipeTableViewFont.swift
Normal file
35
WOKA/Helpers/SwipeTableViewFont.swift
Normal file
@@ -0,0 +1,35 @@
|
||||
//
|
||||
// SwipeTableViewFont.swift
|
||||
// WOKA
|
||||
//
|
||||
// Created by MacBook Pro on 23/07/24.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
extension UITableView{
|
||||
|
||||
func swipeGestureFont(font : UIFont){
|
||||
if #available(iOS 13.0, *) {
|
||||
for subview in self.subviews {
|
||||
if NSStringFromClass(type(of: subview)) == "_UITableViewCellSwipeContainerView" {
|
||||
for swipeContainerSubview in subview.subviews {
|
||||
if NSStringFromClass(type(of: swipeContainerSubview)) == "UISwipeActionPullView" {
|
||||
for case let button as UIButton in swipeContainerSubview.subviews {
|
||||
button.titleLabel?.font = font
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for subview in self.subviews {
|
||||
if NSStringFromClass(type(of: subview)) == "UISwipeActionPullView" {
|
||||
for case let button as UIButton in subview.subviews {
|
||||
button.titleLabel?.font = font
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -109,6 +109,13 @@ struct APIEndPoints {
|
||||
static let sub_category_listing = makeURL(path: "sub_category_listing")
|
||||
static let shop_product_listing = makeURL(path: "shop_product_listing")
|
||||
}
|
||||
|
||||
struct Cart{
|
||||
static let cart_listing = makeURL(path: "cart_listing")
|
||||
static let remove_cart = makeURL(path: "remove_cart")
|
||||
static let coupon_listing = makeURL(path: "coupon_listing")
|
||||
static let applied_coupon_discount = makeURL(path: "applied_coupon_discount")
|
||||
}
|
||||
|
||||
// Other endpoint categories...
|
||||
struct Links {
|
||||
|
||||
@@ -23,8 +23,9 @@ class MyOrdersVC: UIViewController {
|
||||
btn.badgeAnimation = true
|
||||
btn.setBadge(with: 1)
|
||||
btn.tapAction = {
|
||||
// do something
|
||||
print("tapped")
|
||||
let sb = UIStoryboard(name: K.StoryBoard.cart, bundle: nil)
|
||||
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.Cart.cartListVC) as! CartListVC
|
||||
self.navigationController?.pushViewController(vcPush, animated: true)
|
||||
}
|
||||
self.navigationItem.rightBarButtonItem = btn
|
||||
|
||||
|
||||
@@ -192,9 +192,12 @@ class ThemeOneVM{
|
||||
vc.gamesView.addTapGesture {
|
||||
ViewButtonAnimation.sharedInstance.btnTapped(in: self.vc, view: self.vc.gamesView) { [weak self] in
|
||||
guard let self else{return}
|
||||
let sb = UIStoryboard(name: K.StoryBoard.Games, bundle: nil)
|
||||
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.Games.gamesListVC) as! GamesListVC
|
||||
vc.navigationController?.pushViewController(vcPush, animated: true)
|
||||
// let sb = UIStoryboard(name: K.StoryBoard.Games, bundle: nil)
|
||||
// let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.Games.gamesListVC) as! GamesListVC
|
||||
// vc.navigationController?.pushViewController(vcPush, animated: true)
|
||||
let sb = UIStoryboard(name: K.StoryBoard.cart, bundle: nil)
|
||||
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.Cart.cartListVC) as! CartListVC
|
||||
self.vc.navigationController?.pushViewController(vcPush, animated: true)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user